@constela/compiler 0.15.7 → 0.15.9

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.
package/dist/index.d.ts CHANGED
@@ -445,7 +445,7 @@ interface CompiledPortalNode {
445
445
  target: 'body' | 'head' | string;
446
446
  children: CompiledNode[];
447
447
  }
448
- type CompiledExpression = CompiledLitExpr | CompiledStateExpr | CompiledLocalExpr | CompiledVarExpr | CompiledBinExpr | CompiledNotExpr | CompiledCondExpr | CompiledGetExpr | CompiledRouteExpr | CompiledImportExpr | CompiledDataExpr | CompiledRefExpr | CompiledIndexExpr | CompiledParamExpr | CompiledStyleExpr | CompiledConcatExpr | CompiledValidityExpr | CompiledCallExpr | CompiledLambdaExpr | CompiledArrayExpr;
448
+ type CompiledExpression = CompiledLitExpr | CompiledStateExpr | CompiledLocalExpr | CompiledVarExpr | CompiledBinExpr | CompiledNotExpr | CompiledCondExpr | CompiledGetExpr | CompiledRouteExpr | CompiledImportExpr | CompiledDataExpr | CompiledRefExpr | CompiledIndexExpr | CompiledParamExpr | CompiledStyleExpr | CompiledConcatExpr | CompiledValidityExpr | CompiledCallExpr | CompiledLambdaExpr | CompiledArrayExpr | CompiledObjExpr;
449
449
  interface CompiledLitExpr {
450
450
  expr: 'lit';
451
451
  value: string | number | boolean | null | unknown[];
@@ -540,6 +540,10 @@ interface CompiledArrayExpr {
540
540
  expr: 'array';
541
541
  elements: CompiledExpression[];
542
542
  }
543
+ interface CompiledObjExpr {
544
+ expr: 'obj';
545
+ props: Record<string, CompiledExpression>;
546
+ }
543
547
  /**
544
548
  * Compiled event handler options for special events like intersect
545
549
  */
package/dist/index.js CHANGED
@@ -1503,6 +1503,17 @@ function transformExpression(expr, ctx) {
1503
1503
  elements: arrayExpr.elements.map((elem) => transformExpression(elem, ctx))
1504
1504
  };
1505
1505
  }
1506
+ case "obj": {
1507
+ const objExpr = expr;
1508
+ const props = {};
1509
+ for (const [key, value] of Object.entries(objExpr.props)) {
1510
+ props[key] = transformExpression(value, ctx);
1511
+ }
1512
+ return {
1513
+ expr: "obj",
1514
+ props
1515
+ };
1516
+ }
1506
1517
  }
1507
1518
  }
1508
1519
  function transformEventHandler(handler, ctx) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@constela/compiler",
3
- "version": "0.15.7",
3
+ "version": "0.15.9",
4
4
  "description": "Compiler for Constela UI framework - AST to Program transformation",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -15,7 +15,7 @@
15
15
  "dist"
16
16
  ],
17
17
  "dependencies": {
18
- "@constela/core": "0.18.1"
18
+ "@constela/core": "0.18.3"
19
19
  },
20
20
  "devDependencies": {
21
21
  "@types/node": "^20.10.0",