mirror of
https://github.com/MioMioOS/MioIsland
synced 2026-04-21 21:47:47 +00:00
Replace with native .bundle plugin architecture in next commits. Old declarative system (themes/buddy/sound JSON) removed entirely. Co-Authored-By: Claude Opus 4.6 (1M context) <[email protected]>
24 lines
495 B
JavaScript
24 lines
495 B
JavaScript
'use strict'
|
|
|
|
let Node = require('./node')
|
|
|
|
class Declaration extends Node {
|
|
get variable() {
|
|
return this.prop.startsWith('--') || this.prop[0] === '$'
|
|
}
|
|
|
|
constructor(defaults) {
|
|
if (
|
|
defaults &&
|
|
typeof defaults.value !== 'undefined' &&
|
|
typeof defaults.value !== 'string'
|
|
) {
|
|
defaults = { ...defaults, value: String(defaults.value) }
|
|
}
|
|
super(defaults)
|
|
this.type = 'decl'
|
|
}
|
|
}
|
|
|
|
module.exports = Declaration
|
|
Declaration.default = Declaration
|