@constela/runtime 4.0.0 → 4.0.1
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.js +6 -2
- package/package.json +4 -4
package/dist/index.js
CHANGED
|
@@ -14704,13 +14704,14 @@ function renderPortal(node, ctx) {
|
|
|
14704
14704
|
}
|
|
14705
14705
|
function createLocalStateStore(stateDefs, ctx) {
|
|
14706
14706
|
const signals = {};
|
|
14707
|
+
const progressiveLocals = { ...ctx.locals };
|
|
14707
14708
|
for (const [name, def] of Object.entries(stateDefs)) {
|
|
14708
14709
|
const initial = def.initial;
|
|
14709
14710
|
let initialValue;
|
|
14710
14711
|
if (initial && typeof initial === "object" && "expr" in initial) {
|
|
14711
14712
|
const evalCtx = {
|
|
14712
14713
|
state: ctx.state,
|
|
14713
|
-
locals:
|
|
14714
|
+
locals: progressiveLocals
|
|
14714
14715
|
};
|
|
14715
14716
|
if (ctx.route) evalCtx.route = ctx.route;
|
|
14716
14717
|
if (ctx.imports) evalCtx.imports = ctx.imports;
|
|
@@ -14720,6 +14721,7 @@ function createLocalStateStore(stateDefs, ctx) {
|
|
|
14720
14721
|
initialValue = initial;
|
|
14721
14722
|
}
|
|
14722
14723
|
signals[name] = createSignal(initialValue);
|
|
14724
|
+
progressiveLocals[name] = initialValue;
|
|
14723
14725
|
}
|
|
14724
14726
|
return {
|
|
14725
14727
|
get(name) {
|
|
@@ -15052,13 +15054,14 @@ function createReactiveLocals2(baseLocals, itemSignal, indexSignal, itemName, in
|
|
|
15052
15054
|
}
|
|
15053
15055
|
function createLocalStateStore2(stateDefs, ctx) {
|
|
15054
15056
|
const signals = {};
|
|
15057
|
+
const progressiveLocals = { ...ctx.locals };
|
|
15055
15058
|
for (const [name, def] of Object.entries(stateDefs)) {
|
|
15056
15059
|
const initial = def.initial;
|
|
15057
15060
|
let initialValue;
|
|
15058
15061
|
if (initial && typeof initial === "object" && "expr" in initial) {
|
|
15059
15062
|
const evalCtx = {
|
|
15060
15063
|
state: ctx.state,
|
|
15061
|
-
locals:
|
|
15064
|
+
locals: progressiveLocals
|
|
15062
15065
|
};
|
|
15063
15066
|
if (ctx.route) evalCtx.route = ctx.route;
|
|
15064
15067
|
if (ctx.imports) evalCtx.imports = ctx.imports;
|
|
@@ -15068,6 +15071,7 @@ function createLocalStateStore2(stateDefs, ctx) {
|
|
|
15068
15071
|
initialValue = initial;
|
|
15069
15072
|
}
|
|
15070
15073
|
signals[name] = createSignal(initialValue);
|
|
15074
|
+
progressiveLocals[name] = initialValue;
|
|
15071
15075
|
}
|
|
15072
15076
|
return {
|
|
15073
15077
|
get(name) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/runtime",
|
|
3
|
-
"version": "4.0.
|
|
3
|
+
"version": "4.0.1",
|
|
4
4
|
"description": "Runtime DOM renderer for Constela UI framework",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
"dompurify": "^3.3.1",
|
|
19
19
|
"marked": "^17.0.1",
|
|
20
20
|
"shiki": "^3.20.0",
|
|
21
|
-
"@constela/
|
|
22
|
-
"@constela/
|
|
21
|
+
"@constela/core": "0.20.0",
|
|
22
|
+
"@constela/compiler": "0.15.15"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/dompurify": "^3.2.0",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"tsup": "^8.0.0",
|
|
30
30
|
"typescript": "^5.3.0",
|
|
31
31
|
"vitest": "^2.0.0",
|
|
32
|
-
"@constela/server": "16.0.
|
|
32
|
+
"@constela/server": "16.0.1"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
35
|
"@constela/ai": "5.0.0"
|