@vesk/vesk-cli 0.2.51 → 0.2.53
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/cli.js +33 -4
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -3605,9 +3605,13 @@ function flattenLayoutChain(tree, pathParts, result = []) {
|
|
|
3605
3605
|
for (let i = 0; i < tree.length; i++) {
|
|
3606
3606
|
const node = tree[i];
|
|
3607
3607
|
if (node.isGroup) {
|
|
3608
|
+
const contributes = !!(node.layout || node.page);
|
|
3609
|
+
const marker = result.length;
|
|
3610
|
+
if (contributes) result.push(node);
|
|
3608
3611
|
const before = result.length;
|
|
3609
3612
|
flattenLayoutChain(node.children || [], pathParts, result);
|
|
3610
|
-
if (result.length > before)
|
|
3613
|
+
if (result.length > before) break;
|
|
3614
|
+
if (contributes) result.length = marker;
|
|
3611
3615
|
if (node.page && (pathParts.length === 0 || pathParts.every((p) => p === ""))) {
|
|
3612
3616
|
result.push(node);
|
|
3613
3617
|
break;
|
|
@@ -3668,7 +3672,7 @@ function matchRoute(tree, pathname) {
|
|
|
3668
3672
|
}
|
|
3669
3673
|
partIdx += segCount;
|
|
3670
3674
|
}
|
|
3671
|
-
return { matchChain, params };
|
|
3675
|
+
return { matchChain, params, pathname };
|
|
3672
3676
|
}
|
|
3673
3677
|
function buildTreeFromMap(routes, _options) {
|
|
3674
3678
|
const root3 = [];
|
|
@@ -30279,7 +30283,20 @@ function emitNode(ctx2, node, tracked2, effectsVar, parentVar, compPrefix = "__c
|
|
|
30279
30283
|
return null;
|
|
30280
30284
|
}
|
|
30281
30285
|
if (node instanceof SlotNode) {
|
|
30282
|
-
if (!parentVar)
|
|
30286
|
+
if (!parentVar) {
|
|
30287
|
+
if (ctx2.hydrate) {
|
|
30288
|
+
ctx2.push(`if (props.children !== undefined && props.children !== null) {`);
|
|
30289
|
+
ctx2.push(` if (typeof props.children === 'function') {`);
|
|
30290
|
+
ctx2.push(` __pendingChild = props.children(__hydrate);`);
|
|
30291
|
+
ctx2.push(` } else if (__hydrate && __hydrate.root) {`);
|
|
30292
|
+
ctx2.push(` __hydrate.root.appendChild(toDomNode(props.children));`);
|
|
30293
|
+
ctx2.push(` }`);
|
|
30294
|
+
ctx2.push(`}`);
|
|
30295
|
+
} else {
|
|
30296
|
+
ctx2.push(`if (props.children !== undefined && props.children !== null) __pendingChild = toDomNode(props.children);`);
|
|
30297
|
+
}
|
|
30298
|
+
return null;
|
|
30299
|
+
}
|
|
30283
30300
|
if (ctx2.hydrate) {
|
|
30284
30301
|
ctx2.push(`if (props.children !== undefined && props.children !== null) {`);
|
|
30285
30302
|
ctx2.push(` if (typeof props.children === 'function') {`);
|
|
@@ -52062,8 +52079,20 @@ function emitNode2(ctx2, node, tracked2, effectsVar, parentVar, compPrefix = "__
|
|
|
52062
52079
|
return null;
|
|
52063
52080
|
}
|
|
52064
52081
|
if (node instanceof SlotNode) {
|
|
52065
|
-
if (!parentVar)
|
|
52082
|
+
if (!parentVar) {
|
|
52083
|
+
if (ctx2.hydrate) {
|
|
52084
|
+
ctx2.push(`if (props.children !== undefined && props.children !== null) {`);
|
|
52085
|
+
ctx2.push(` if (typeof props.children === 'function') {`);
|
|
52086
|
+
ctx2.push(` __pendingChild = props.children(__hydrate);`);
|
|
52087
|
+
ctx2.push(` } else if (__hydrate && __hydrate.root) {`);
|
|
52088
|
+
ctx2.push(` __hydrate.root.appendChild(toDomNode(props.children));`);
|
|
52089
|
+
ctx2.push(` }`);
|
|
52090
|
+
ctx2.push(`}`);
|
|
52091
|
+
} else {
|
|
52092
|
+
ctx2.push(`if (props.children !== undefined && props.children !== null) __pendingChild = toDomNode(props.children);`);
|
|
52093
|
+
}
|
|
52066
52094
|
return null;
|
|
52095
|
+
}
|
|
52067
52096
|
if (ctx2.hydrate) {
|
|
52068
52097
|
ctx2.push(`if (props.children !== undefined && props.children !== null) {`);
|
|
52069
52098
|
ctx2.push(` if (typeof props.children === 'function') {`);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesk/vesk-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.53",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"description": "Vesk — compiler-first framework for the post-VDOM web. vesk dev, vesk build.",
|
|
6
6
|
"bin": {
|
|
@@ -8,10 +8,10 @@
|
|
|
8
8
|
},
|
|
9
9
|
"main": "./dist/cli.js",
|
|
10
10
|
"dependencies": {
|
|
11
|
-
"@vesk/adapter": "^0.2.
|
|
12
|
-
"@vesk/compiler": "^0.2.
|
|
13
|
-
"@vesk/plugin-tailwind": "^0.2.
|
|
14
|
-
"@vesk/runtime": "^0.2.
|
|
11
|
+
"@vesk/adapter": "^0.2.53",
|
|
12
|
+
"@vesk/compiler": "^0.2.53",
|
|
13
|
+
"@vesk/plugin-tailwind": "^0.2.53",
|
|
14
|
+
"@vesk/runtime": "^0.2.53",
|
|
15
15
|
"esrap": "^2.3.0",
|
|
16
16
|
"typescript": "^5.8.0",
|
|
17
17
|
"ws": "^8.18.0",
|