@constela/compiler 0.15.6 → 0.15.7
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 +5 -1
- package/dist/index.js +7 -0
- package/package.json +2 -2
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 | 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;
|
|
449
449
|
interface CompiledLitExpr {
|
|
450
450
|
expr: 'lit';
|
|
451
451
|
value: string | number | boolean | null | unknown[];
|
|
@@ -455,6 +455,10 @@ interface CompiledStateExpr {
|
|
|
455
455
|
name: string;
|
|
456
456
|
path?: string;
|
|
457
457
|
}
|
|
458
|
+
interface CompiledLocalExpr {
|
|
459
|
+
expr: 'local';
|
|
460
|
+
name: string;
|
|
461
|
+
}
|
|
458
462
|
interface CompiledVarExpr {
|
|
459
463
|
expr: 'var';
|
|
460
464
|
name: string;
|
package/dist/index.js
CHANGED
|
@@ -1339,6 +1339,13 @@ function transformExpression(expr, ctx) {
|
|
|
1339
1339
|
}
|
|
1340
1340
|
return stateExpr;
|
|
1341
1341
|
}
|
|
1342
|
+
case "local": {
|
|
1343
|
+
const localExpr = {
|
|
1344
|
+
expr: "local",
|
|
1345
|
+
name: expr.name
|
|
1346
|
+
};
|
|
1347
|
+
return localExpr;
|
|
1348
|
+
}
|
|
1342
1349
|
case "var": {
|
|
1343
1350
|
const varExpr = {
|
|
1344
1351
|
expr: "var",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/compiler",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.7",
|
|
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.
|
|
18
|
+
"@constela/core": "0.18.1"
|
|
19
19
|
},
|
|
20
20
|
"devDependencies": {
|
|
21
21
|
"@types/node": "^20.10.0",
|