@sprlab/wccompiler 0.16.1 → 0.16.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/lib/codegen.js +5 -0
  2. package/package.json +1 -1
package/lib/codegen.js CHANGED
@@ -1548,6 +1548,11 @@ export function generateComponent(parseResult, options = {}) {
1548
1548
  lines.push(` __val ? this.${ab.varName}.classList.add(__k) : this.${ab.varName}.classList.remove(__k);`);
1549
1549
  lines.push(' }');
1550
1550
  lines.push(' }));');
1551
+ } else if (ab.expression.trimStart().startsWith('[')) {
1552
+ // Array expression: join with spaces
1553
+ lines.push(' this.__disposers.push(__effect(() => {');
1554
+ lines.push(` this.${ab.varName}.className = (${expr}).join(' ');`);
1555
+ lines.push(' }));');
1551
1556
  } else {
1552
1557
  // String expression: set className
1553
1558
  lines.push(' this.__disposers.push(__effect(() => {');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sprlab/wccompiler",
3
- "version": "0.16.1",
3
+ "version": "0.16.2",
4
4
  "description": "Zero-runtime compiler that transforms .wcc single-file components into native web components with signals-based reactivity",
5
5
  "type": "module",
6
6
  "exports": {