feat: V1 prototype — Vite/React/TS tileset generator
- Scaffold: package.json, tsconfig.json, vite.config.ts, index.html - src/lib/imageProcessor.ts: full pipeline (normalize, offset, seam repair, export, validation) - src/components/UploadPanel.tsx: drag-and-drop, file picker, clipboard paste - src/components/SettingsPanel.tsx: all controls per spec - src/components/PreviewPanel.tsx: Original / Tileable / Repeated tabs - src/components/ErrorBanner.tsx: dismissible error/warning banners - src/App.tsx: root component wiring everything together - src/index.css: dark premium glassmorphism theme w/ Inter font
This commit is contained in:
+27
@@ -0,0 +1,27 @@
|
||||
'use strict'
|
||||
|
||||
let Container = require('./container')
|
||||
let list = require('./list')
|
||||
|
||||
class Rule extends Container {
|
||||
get selectors() {
|
||||
return list.comma(this.selector)
|
||||
}
|
||||
|
||||
set selectors(values) {
|
||||
let match = this.selector ? this.selector.match(/,\s*/) : null
|
||||
let sep = match ? match[0] : ',' + this.raw('between', 'beforeOpen')
|
||||
this.selector = values.join(sep)
|
||||
}
|
||||
|
||||
constructor(defaults) {
|
||||
super(defaults)
|
||||
this.type = 'rule'
|
||||
if (!this.nodes) this.nodes = []
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = Rule
|
||||
Rule.default = Rule
|
||||
|
||||
Container.registerRule(Rule)
|
||||
Reference in New Issue
Block a user