@constela/runtime 2.0.7 → 2.0.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 +1 -0
- package/dist/index.js +58 -63
- package/package.json +5 -5
package/dist/index.d.ts
CHANGED
package/dist/index.js
CHANGED
|
@@ -974,7 +974,6 @@ var GLOBAL_FUNCTIONS = {
|
|
|
974
974
|
getRadarAxes: (labels, cx, cy, radius) => getRadarAxes(labels, cx, cy, radius),
|
|
975
975
|
// Chart helpers - Utilities
|
|
976
976
|
getChartBounds: (data, valueKey) => getChartBounds(data, valueKey),
|
|
977
|
-
getLinePoints: (data, valueKey, width, height, padding) => getLinePoints(data, valueKey, width, height, padding),
|
|
978
977
|
generateTicks: (min, max, count) => generateTicks(min, max, count),
|
|
979
978
|
// Chart helpers - Data aggregation
|
|
980
979
|
binData: (data, valueKey, binCount) => binData(data, valueKey, binCount),
|
|
@@ -1592,26 +1591,6 @@ function getChartBounds(data, valueKey) {
|
|
|
1592
1591
|
max: Math.max(...values)
|
|
1593
1592
|
};
|
|
1594
1593
|
}
|
|
1595
|
-
function getLinePoints(data, valueKey, width, height, padding) {
|
|
1596
|
-
if (!Array.isArray(data) || data.length === 0) return void 0;
|
|
1597
|
-
if (typeof valueKey !== "string") return void 0;
|
|
1598
|
-
if (typeof width !== "number" || typeof height !== "number") return void 0;
|
|
1599
|
-
if (width <= 0 || height <= 0) return void 0;
|
|
1600
|
-
const pad = typeof padding === "number" ? padding : 40;
|
|
1601
|
-
if (typeof padding !== "undefined" && typeof padding !== "number") return void 0;
|
|
1602
|
-
const bounds = getChartBounds(data, valueKey);
|
|
1603
|
-
if (!bounds) return void 0;
|
|
1604
|
-
const { min, max } = bounds;
|
|
1605
|
-
const chartWidth = width - pad * 2;
|
|
1606
|
-
const chartHeight = height - pad * 2;
|
|
1607
|
-
return data.map((item, idx) => {
|
|
1608
|
-
const value = item[valueKey];
|
|
1609
|
-
if (typeof value !== "number") return { x: 0, y: 0 };
|
|
1610
|
-
const x2 = data.length === 1 ? pad : pad + idx / (data.length - 1) * chartWidth;
|
|
1611
|
-
const y2 = min === max ? pad + chartHeight / 2 : pad + chartHeight - scaleValue(value, min, max, 0, chartHeight);
|
|
1612
|
-
return { x: x2, y: y2 };
|
|
1613
|
-
});
|
|
1614
|
-
}
|
|
1615
1594
|
function generateTicks(min, max, count) {
|
|
1616
1595
|
if (typeof min !== "number" || typeof max !== "number" || typeof count !== "number") {
|
|
1617
1596
|
return [];
|
|
@@ -15192,7 +15171,7 @@ function renderElement(node, ctx) {
|
|
|
15192
15171
|
}
|
|
15193
15172
|
} else {
|
|
15194
15173
|
const cleanup = createEffect(() => {
|
|
15195
|
-
const value = evaluate(propValue, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } });
|
|
15174
|
+
const value = evaluate(propValue, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } });
|
|
15196
15175
|
applyProp(el, propName, value, useSvgNamespace);
|
|
15197
15176
|
});
|
|
15198
15177
|
ctx.cleanups?.push(cleanup);
|
|
@@ -15247,7 +15226,7 @@ function applyProp(el, propName, value, isSvg = false) {
|
|
|
15247
15226
|
function renderText(node, ctx) {
|
|
15248
15227
|
const textNode = document.createTextNode("");
|
|
15249
15228
|
const cleanup = createEffect(() => {
|
|
15250
|
-
const value = evaluate(node.value, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } });
|
|
15229
|
+
const value = evaluate(node.value, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } });
|
|
15251
15230
|
textNode.textContent = formatValue(value);
|
|
15252
15231
|
});
|
|
15253
15232
|
ctx.cleanups?.push(cleanup);
|
|
@@ -15268,7 +15247,7 @@ function renderIf(node, ctx) {
|
|
|
15268
15247
|
let currentBranch = "none";
|
|
15269
15248
|
let branchCleanups = [];
|
|
15270
15249
|
const effectCleanup = createEffect(() => {
|
|
15271
|
-
const condition = evaluate(node.condition, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } });
|
|
15250
|
+
const condition = evaluate(node.condition, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } });
|
|
15272
15251
|
const shouldShowThen = Boolean(condition);
|
|
15273
15252
|
const newBranch = shouldShowThen ? "then" : node.else ? "else" : "none";
|
|
15274
15253
|
if (newBranch !== currentBranch) {
|
|
@@ -15346,7 +15325,7 @@ function renderEach(node, ctx) {
|
|
|
15346
15325
|
let currentNodes = [];
|
|
15347
15326
|
let itemCleanups = [];
|
|
15348
15327
|
const effectCleanup = createEffect(() => {
|
|
15349
|
-
const items = evaluate(node.items, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } });
|
|
15328
|
+
const items = evaluate(node.items, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } });
|
|
15350
15329
|
if (!hasKey || !node.key) {
|
|
15351
15330
|
for (const cleanup of itemCleanups) {
|
|
15352
15331
|
cleanup();
|
|
@@ -15405,7 +15384,8 @@ function renderEach(node, ctx) {
|
|
|
15405
15384
|
locals: tempLocals,
|
|
15406
15385
|
...ctx.refs && { refs: ctx.refs },
|
|
15407
15386
|
...ctx.imports && { imports: ctx.imports },
|
|
15408
|
-
...ctx.route && { route: ctx.route }
|
|
15387
|
+
...ctx.route && { route: ctx.route },
|
|
15388
|
+
...ctx.styles && { styles: ctx.styles }
|
|
15409
15389
|
});
|
|
15410
15390
|
if (seenKeys.has(keyValue)) {
|
|
15411
15391
|
if (typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production") {
|
|
@@ -15497,7 +15477,7 @@ function renderMarkdown(node, ctx) {
|
|
|
15497
15477
|
const container = document.createElement("div");
|
|
15498
15478
|
container.className = "constela-markdown";
|
|
15499
15479
|
const cleanup = createEffect(() => {
|
|
15500
|
-
const content = evaluate(node.content, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } });
|
|
15480
|
+
const content = evaluate(node.content, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } });
|
|
15501
15481
|
const html6 = parseMarkdown(String(content ?? ""));
|
|
15502
15482
|
container.innerHTML = html6;
|
|
15503
15483
|
});
|
|
@@ -15512,8 +15492,8 @@ function renderCode(node, ctx) {
|
|
|
15512
15492
|
container.appendChild(pre);
|
|
15513
15493
|
pre.appendChild(codeEl);
|
|
15514
15494
|
const cleanup = createEffect(() => {
|
|
15515
|
-
const language = String(evaluate(node.language, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } }) ?? "plaintext");
|
|
15516
|
-
const content = String(evaluate(node.content, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route } }) ?? "");
|
|
15495
|
+
const language = String(evaluate(node.language, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } }) ?? "plaintext");
|
|
15496
|
+
const content = String(evaluate(node.content, { state: ctx.state, locals: ctx.locals, ...ctx.refs && { refs: ctx.refs }, ...ctx.imports && { imports: ctx.imports }, ...ctx.route && { route: ctx.route }, ...ctx.styles && { styles: ctx.styles } }) ?? "");
|
|
15517
15497
|
codeEl.className = `language-${language || "plaintext"}`;
|
|
15518
15498
|
codeEl.dataset["language"] = language || "plaintext";
|
|
15519
15499
|
container.dataset["language"] = language || "plaintext";
|
|
@@ -15568,26 +15548,22 @@ function renderPortal(node, ctx) {
|
|
|
15568
15548
|
}
|
|
15569
15549
|
function createLocalStateStore(stateDefs, ctx) {
|
|
15570
15550
|
const signals = {};
|
|
15571
|
-
const evaluatedValues = {};
|
|
15572
15551
|
for (const [name, def] of Object.entries(stateDefs)) {
|
|
15573
15552
|
const initial = def.initial;
|
|
15574
15553
|
let initialValue;
|
|
15575
15554
|
if (initial && typeof initial === "object" && "expr" in initial) {
|
|
15576
15555
|
const evalCtx = {
|
|
15577
15556
|
state: ctx.state,
|
|
15578
|
-
locals:
|
|
15579
|
-
...ctx.locals,
|
|
15580
|
-
...evaluatedValues
|
|
15581
|
-
}
|
|
15557
|
+
locals: ctx.locals
|
|
15582
15558
|
};
|
|
15583
15559
|
if (ctx.route) evalCtx.route = ctx.route;
|
|
15584
15560
|
if (ctx.imports) evalCtx.imports = ctx.imports;
|
|
15561
|
+
if (ctx.styles) evalCtx.styles = ctx.styles;
|
|
15585
15562
|
initialValue = evaluate(initial, evalCtx);
|
|
15586
15563
|
} else {
|
|
15587
15564
|
initialValue = initial;
|
|
15588
15565
|
}
|
|
15589
15566
|
signals[name] = createSignal(initialValue);
|
|
15590
|
-
evaluatedValues[name] = initialValue;
|
|
15591
15567
|
}
|
|
15592
15568
|
return {
|
|
15593
15569
|
get(name) {
|
|
@@ -15704,7 +15680,9 @@ function createApp(program, mount) {
|
|
|
15704
15680
|
actions,
|
|
15705
15681
|
locals: {},
|
|
15706
15682
|
cleanups,
|
|
15707
|
-
refs
|
|
15683
|
+
refs,
|
|
15684
|
+
...program.importData && { imports: program.importData },
|
|
15685
|
+
...program.styles && { styles: program.styles }
|
|
15708
15686
|
};
|
|
15709
15687
|
const rootNode = render(program.view, ctx);
|
|
15710
15688
|
mount.appendChild(rootNode);
|
|
@@ -15918,26 +15896,22 @@ function createReactiveLocals2(baseLocals, itemSignal, indexSignal, itemName, in
|
|
|
15918
15896
|
}
|
|
15919
15897
|
function createLocalStateStore2(stateDefs, ctx) {
|
|
15920
15898
|
const signals = {};
|
|
15921
|
-
const evaluatedValues = {};
|
|
15922
15899
|
for (const [name, def] of Object.entries(stateDefs)) {
|
|
15923
15900
|
const initial = def.initial;
|
|
15924
15901
|
let initialValue;
|
|
15925
15902
|
if (initial && typeof initial === "object" && "expr" in initial) {
|
|
15926
15903
|
const evalCtx = {
|
|
15927
15904
|
state: ctx.state,
|
|
15928
|
-
locals:
|
|
15929
|
-
...ctx.locals,
|
|
15930
|
-
...evaluatedValues
|
|
15931
|
-
}
|
|
15905
|
+
locals: ctx.locals
|
|
15932
15906
|
};
|
|
15933
15907
|
if (ctx.route) evalCtx.route = ctx.route;
|
|
15934
15908
|
if (ctx.imports) evalCtx.imports = ctx.imports;
|
|
15909
|
+
if (ctx.styles) evalCtx.styles = ctx.styles;
|
|
15935
15910
|
initialValue = evaluate(initial, evalCtx);
|
|
15936
15911
|
} else {
|
|
15937
15912
|
initialValue = initial;
|
|
15938
15913
|
}
|
|
15939
15914
|
signals[name] = createSignal(initialValue);
|
|
15940
|
-
evaluatedValues[name] = initialValue;
|
|
15941
15915
|
}
|
|
15942
15916
|
return {
|
|
15943
15917
|
get(name) {
|
|
@@ -16038,7 +16012,8 @@ function hydrateApp(options) {
|
|
|
16038
16012
|
cleanups,
|
|
16039
16013
|
refs,
|
|
16040
16014
|
...program.importData && { imports: program.importData },
|
|
16041
|
-
...route && { route }
|
|
16015
|
+
...route && { route },
|
|
16016
|
+
...program.styles && { styles: program.styles }
|
|
16042
16017
|
};
|
|
16043
16018
|
const firstChild = container.firstElementChild;
|
|
16044
16019
|
if (firstChild) {
|
|
@@ -16186,7 +16161,8 @@ function hydrateElement(node, el, ctx) {
|
|
|
16186
16161
|
state: ctx.state,
|
|
16187
16162
|
locals: ctx.locals,
|
|
16188
16163
|
...ctx.imports && { imports: ctx.imports },
|
|
16189
|
-
...ctx.route && { route: ctx.route }
|
|
16164
|
+
...ctx.route && { route: ctx.route },
|
|
16165
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16190
16166
|
});
|
|
16191
16167
|
applyProp2(el, propName, value);
|
|
16192
16168
|
});
|
|
@@ -16256,7 +16232,8 @@ function hydrateChildren(children, parent, ctx) {
|
|
|
16256
16232
|
state: ctx.state,
|
|
16257
16233
|
locals: ctx.locals,
|
|
16258
16234
|
...ctx.imports && { imports: ctx.imports },
|
|
16259
|
-
...ctx.route && { route: ctx.route }
|
|
16235
|
+
...ctx.route && { route: ctx.route },
|
|
16236
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16260
16237
|
});
|
|
16261
16238
|
const clientBranch = Boolean(clientCondition) ? "then" : ifNode.else ? "else" : "none";
|
|
16262
16239
|
const ssrInfo = ifMarkerIndex < ifMarkers.length ? ifMarkers[ifMarkerIndex] : null;
|
|
@@ -16289,7 +16266,8 @@ function hydrateChildren(children, parent, ctx) {
|
|
|
16289
16266
|
state: ctx.state,
|
|
16290
16267
|
locals: ctx.locals,
|
|
16291
16268
|
...ctx.imports && { imports: ctx.imports },
|
|
16292
|
-
...ctx.route && { route: ctx.route }
|
|
16269
|
+
...ctx.route && { route: ctx.route },
|
|
16270
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16293
16271
|
});
|
|
16294
16272
|
const itemCount = Array.isArray(items) ? items.length : 0;
|
|
16295
16273
|
if (itemCount > 0) {
|
|
@@ -16318,7 +16296,8 @@ function hydrateTextGroup(nodes, textNode, ctx) {
|
|
|
16318
16296
|
state: ctx.state,
|
|
16319
16297
|
locals: ctx.locals,
|
|
16320
16298
|
...ctx.imports && { imports: ctx.imports },
|
|
16321
|
-
...ctx.route && { route: ctx.route }
|
|
16299
|
+
...ctx.route && { route: ctx.route },
|
|
16300
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16322
16301
|
});
|
|
16323
16302
|
combinedText += formatValue2(value);
|
|
16324
16303
|
}
|
|
@@ -16359,7 +16338,8 @@ function hydrateText(node, textNode, ctx) {
|
|
|
16359
16338
|
state: ctx.state,
|
|
16360
16339
|
locals: ctx.locals,
|
|
16361
16340
|
...ctx.imports && { imports: ctx.imports },
|
|
16362
|
-
...ctx.route && { route: ctx.route }
|
|
16341
|
+
...ctx.route && { route: ctx.route },
|
|
16342
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16363
16343
|
});
|
|
16364
16344
|
textNode.textContent = formatValue2(value);
|
|
16365
16345
|
});
|
|
@@ -16389,7 +16369,8 @@ function hydrateIf(node, initialDomNode, ctx, branchInfo) {
|
|
|
16389
16369
|
state: ctx.state,
|
|
16390
16370
|
locals: ctx.locals,
|
|
16391
16371
|
...ctx.imports && { imports: ctx.imports },
|
|
16392
|
-
...ctx.route && { route: ctx.route }
|
|
16372
|
+
...ctx.route && { route: ctx.route },
|
|
16373
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16393
16374
|
});
|
|
16394
16375
|
currentBranch = Boolean(initialCondition) ? "then" : node.else ? "else" : "none";
|
|
16395
16376
|
}
|
|
@@ -16411,7 +16392,8 @@ function hydrateIf(node, initialDomNode, ctx, branchInfo) {
|
|
|
16411
16392
|
state: ctx.state,
|
|
16412
16393
|
locals: ctx.locals,
|
|
16413
16394
|
...ctx.imports && { imports: ctx.imports },
|
|
16414
|
-
...ctx.route && { route: ctx.route }
|
|
16395
|
+
...ctx.route && { route: ctx.route },
|
|
16396
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16415
16397
|
});
|
|
16416
16398
|
const shouldShowThen = Boolean(condition);
|
|
16417
16399
|
const newBranch = shouldShowThen ? "then" : node.else ? "else" : "none";
|
|
@@ -16436,7 +16418,8 @@ function hydrateIf(node, initialDomNode, ctx, branchInfo) {
|
|
|
16436
16418
|
actions: ctx.actions,
|
|
16437
16419
|
locals: ctx.locals,
|
|
16438
16420
|
cleanups: localCleanups,
|
|
16439
|
-
...ctx.imports && { imports: ctx.imports }
|
|
16421
|
+
...ctx.imports && { imports: ctx.imports },
|
|
16422
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16440
16423
|
};
|
|
16441
16424
|
if (newBranch === "then") {
|
|
16442
16425
|
currentNode = render(node.then, branchCtx);
|
|
@@ -16477,7 +16460,8 @@ function hydrateIfWithoutDom(node, parent, nextSibling, ctx, branchInfo) {
|
|
|
16477
16460
|
state: ctx.state,
|
|
16478
16461
|
locals: ctx.locals,
|
|
16479
16462
|
...ctx.imports && { imports: ctx.imports },
|
|
16480
|
-
...ctx.route && { route: ctx.route }
|
|
16463
|
+
...ctx.route && { route: ctx.route },
|
|
16464
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16481
16465
|
});
|
|
16482
16466
|
const shouldShowThen = Boolean(condition);
|
|
16483
16467
|
const newBranch = shouldShowThen ? "then" : node.else ? "else" : "none";
|
|
@@ -16503,7 +16487,8 @@ function hydrateIfWithoutDom(node, parent, nextSibling, ctx, branchInfo) {
|
|
|
16503
16487
|
locals: ctx.locals,
|
|
16504
16488
|
cleanups: localCleanups,
|
|
16505
16489
|
...ctx.imports && { imports: ctx.imports },
|
|
16506
|
-
...ctx.route && { route: ctx.route }
|
|
16490
|
+
...ctx.route && { route: ctx.route },
|
|
16491
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16507
16492
|
};
|
|
16508
16493
|
if (newBranch === "then") {
|
|
16509
16494
|
currentNode = render(node.then, branchCtx);
|
|
@@ -16543,7 +16528,8 @@ function hydrateEachEmpty(node, parent, insertBefore, ctx) {
|
|
|
16543
16528
|
state: ctx.state,
|
|
16544
16529
|
locals: ctx.locals,
|
|
16545
16530
|
...ctx.imports && { imports: ctx.imports },
|
|
16546
|
-
...ctx.route && { route: ctx.route }
|
|
16531
|
+
...ctx.route && { route: ctx.route },
|
|
16532
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16547
16533
|
});
|
|
16548
16534
|
if (!hasKey || !node.key) {
|
|
16549
16535
|
for (const cleanup of itemCleanups) {
|
|
@@ -16571,7 +16557,8 @@ function hydrateEachEmpty(node, parent, insertBefore, ctx) {
|
|
|
16571
16557
|
actions: ctx.actions,
|
|
16572
16558
|
locals: itemLocals,
|
|
16573
16559
|
cleanups: localCleanups,
|
|
16574
|
-
...ctx.imports && { imports: ctx.imports }
|
|
16560
|
+
...ctx.imports && { imports: ctx.imports },
|
|
16561
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16575
16562
|
};
|
|
16576
16563
|
const itemNode = render(node.body, itemCtx);
|
|
16577
16564
|
currentNodes.push(itemNode);
|
|
@@ -16604,7 +16591,8 @@ function hydrateEachEmpty(node, parent, insertBefore, ctx) {
|
|
|
16604
16591
|
state: ctx.state,
|
|
16605
16592
|
locals: tempLocals,
|
|
16606
16593
|
...ctx.imports && { imports: ctx.imports },
|
|
16607
|
-
...ctx.route && { route: ctx.route }
|
|
16594
|
+
...ctx.route && { route: ctx.route },
|
|
16595
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16608
16596
|
});
|
|
16609
16597
|
if (seenKeys.has(keyValue)) {
|
|
16610
16598
|
if (typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production") {
|
|
@@ -16634,7 +16622,8 @@ function hydrateEachEmpty(node, parent, insertBefore, ctx) {
|
|
|
16634
16622
|
actions: ctx.actions,
|
|
16635
16623
|
locals: reactiveLocals,
|
|
16636
16624
|
cleanups: localCleanups,
|
|
16637
|
-
...ctx.imports && { imports: ctx.imports }
|
|
16625
|
+
...ctx.imports && { imports: ctx.imports },
|
|
16626
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16638
16627
|
};
|
|
16639
16628
|
const itemNode = render(node.body, itemCtx);
|
|
16640
16629
|
const newState = {
|
|
@@ -16696,7 +16685,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16696
16685
|
state: ctx.state,
|
|
16697
16686
|
locals: ctx.locals,
|
|
16698
16687
|
...ctx.imports && { imports: ctx.imports },
|
|
16699
|
-
...ctx.route && { route: ctx.route }
|
|
16688
|
+
...ctx.route && { route: ctx.route },
|
|
16689
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16700
16690
|
});
|
|
16701
16691
|
let isFirstRun = true;
|
|
16702
16692
|
if (Array.isArray(initialItems) && initialItems.length > 0) {
|
|
@@ -16714,7 +16704,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16714
16704
|
state: ctx.state,
|
|
16715
16705
|
locals: tempLocals,
|
|
16716
16706
|
...ctx.imports && { imports: ctx.imports },
|
|
16717
|
-
...ctx.route && { route: ctx.route }
|
|
16707
|
+
...ctx.route && { route: ctx.route },
|
|
16708
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16718
16709
|
});
|
|
16719
16710
|
if (seenKeys.has(keyValue)) {
|
|
16720
16711
|
if (typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production") {
|
|
@@ -16786,7 +16777,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16786
16777
|
state: ctx.state,
|
|
16787
16778
|
locals: ctx.locals,
|
|
16788
16779
|
...ctx.imports && { imports: ctx.imports },
|
|
16789
|
-
...ctx.route && { route: ctx.route }
|
|
16780
|
+
...ctx.route && { route: ctx.route },
|
|
16781
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16790
16782
|
});
|
|
16791
16783
|
if (isFirstRun) {
|
|
16792
16784
|
isFirstRun = false;
|
|
@@ -16818,7 +16810,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16818
16810
|
actions: ctx.actions,
|
|
16819
16811
|
locals: itemLocals,
|
|
16820
16812
|
cleanups: localCleanups,
|
|
16821
|
-
...ctx.imports && { imports: ctx.imports }
|
|
16813
|
+
...ctx.imports && { imports: ctx.imports },
|
|
16814
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16822
16815
|
};
|
|
16823
16816
|
const itemNode = render(node.body, itemCtx);
|
|
16824
16817
|
currentNodes.push(itemNode);
|
|
@@ -16851,7 +16844,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16851
16844
|
state: ctx.state,
|
|
16852
16845
|
locals: tempLocals,
|
|
16853
16846
|
...ctx.imports && { imports: ctx.imports },
|
|
16854
|
-
...ctx.route && { route: ctx.route }
|
|
16847
|
+
...ctx.route && { route: ctx.route },
|
|
16848
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16855
16849
|
});
|
|
16856
16850
|
if (seenKeys.has(keyValue)) {
|
|
16857
16851
|
if (typeof process !== "undefined" && process.env?.["NODE_ENV"] !== "production") {
|
|
@@ -16881,7 +16875,8 @@ function hydrateEach(node, firstItemDomNode, ctx) {
|
|
|
16881
16875
|
actions: ctx.actions,
|
|
16882
16876
|
locals: reactiveLocals,
|
|
16883
16877
|
cleanups: localCleanups,
|
|
16884
|
-
...ctx.imports && { imports: ctx.imports }
|
|
16878
|
+
...ctx.imports && { imports: ctx.imports },
|
|
16879
|
+
...ctx.styles && { styles: ctx.styles }
|
|
16885
16880
|
};
|
|
16886
16881
|
const itemNode = render(node.body, itemCtx);
|
|
16887
16882
|
const newState = {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@constela/runtime",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.9",
|
|
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/compiler": "0.15.
|
|
22
|
-
"@constela/core": "0.18.
|
|
21
|
+
"@constela/compiler": "0.15.12",
|
|
22
|
+
"@constela/core": "0.18.5"
|
|
23
23
|
},
|
|
24
24
|
"devDependencies": {
|
|
25
25
|
"@types/dompurify": "^3.2.0",
|
|
@@ -29,10 +29,10 @@
|
|
|
29
29
|
"tsup": "^8.0.0",
|
|
30
30
|
"typescript": "^5.3.0",
|
|
31
31
|
"vitest": "^2.0.0",
|
|
32
|
-
"@constela/server": "14.0.
|
|
32
|
+
"@constela/server": "14.0.6"
|
|
33
33
|
},
|
|
34
34
|
"peerDependencies": {
|
|
35
|
-
"@constela/ai": "3.0.
|
|
35
|
+
"@constela/ai": "3.0.5"
|
|
36
36
|
},
|
|
37
37
|
"peerDependenciesMeta": {
|
|
38
38
|
"@constela/ai": {
|