@vesk/vesk-cli 0.2.39 → 0.2.40
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 +7 -5
- package/package.json +5 -5
package/dist/cli.js
CHANGED
|
@@ -19926,7 +19926,7 @@ function containsJSX(node) {
|
|
|
19926
19926
|
return false;
|
|
19927
19927
|
}
|
|
19928
19928
|
function slotReadPropName(expr) {
|
|
19929
|
-
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === "props" && expr.property.type === "Identifier") {
|
|
19929
|
+
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === (__propsParam || "props") && expr.property.type === "Identifier") {
|
|
19930
19930
|
return expr.property.name;
|
|
19931
19931
|
}
|
|
19932
19932
|
return null;
|
|
@@ -20130,7 +20130,7 @@ function processJSXChildren(source, children) {
|
|
|
20130
20130
|
i++;
|
|
20131
20131
|
continue;
|
|
20132
20132
|
}
|
|
20133
|
-
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === "props" && expr.property.type === "Identifier" && expr.property.name === "children" || expr.type === "Identifier" && expr.name === "children") {
|
|
20133
|
+
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === (__propsParam || "props") && expr.property.type === "Identifier" && expr.property.name === "children" || expr.type === "Identifier" && expr.name === "children") {
|
|
20134
20134
|
result.push(new SlotNode());
|
|
20135
20135
|
i++;
|
|
20136
20136
|
continue;
|
|
@@ -20200,7 +20200,7 @@ function exprToIR(source, expr) {
|
|
|
20200
20200
|
const consequent = exprToIR(source, expr.right);
|
|
20201
20201
|
return [new OpaqueDynamicRegion(condExpr, consequent)];
|
|
20202
20202
|
}
|
|
20203
|
-
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === "props" && expr.property.type === "Identifier" && expr.property.name === "children" || expr.type === "Identifier" && expr.name === "children") {
|
|
20203
|
+
if (expr.type === "MemberExpression" && !expr.computed && expr.object.type === "Identifier" && expr.object.name === (__propsParam || "props") && expr.property.type === "Identifier" && expr.property.name === "children" || expr.type === "Identifier" && expr.name === "children") {
|
|
20204
20204
|
return [new SlotNode()];
|
|
20205
20205
|
}
|
|
20206
20206
|
const slotName = slotReadPropName(expr);
|
|
@@ -20728,6 +20728,7 @@ function generateIR(ast, source, filename) {
|
|
|
20728
20728
|
const isClientComp = !!inner.client;
|
|
20729
20729
|
const prevSlotProps = __slotProps;
|
|
20730
20730
|
__slotProps = slotPropNamesFromType(propsType);
|
|
20731
|
+
__propsParam = propsAlias || null;
|
|
20731
20732
|
if (isStatementMode(bodyStmts)) {
|
|
20732
20733
|
const raw2 = processStatementModeBody(source, bodyStmts, file);
|
|
20733
20734
|
const { body, css } = extractStyle(raw2);
|
|
@@ -20771,7 +20772,7 @@ function generateIR(ast, source, filename) {
|
|
|
20771
20772
|
const guardBody = buildGuardChain(source, guardClauses, mainReturn);
|
|
20772
20773
|
const { body, css } = extractStyle([...preamble, ...guardBody]);
|
|
20773
20774
|
validateBlocks(name, isClientComp, body, file, source);
|
|
20774
|
-
const comp = new ComponentIR(name, paramNames, body, { exported, defaultExport, isClient: inner.client, isAsync: inner.async, ssrAwait: componentUsesFetch(body), propsType });
|
|
20775
|
+
const comp = new ComponentIR(name, paramNames, body, { exported, defaultExport, isClient: inner.client, isAsync: inner.async, ssrAwait: componentUsesFetch(body), propsType, propsAlias });
|
|
20775
20776
|
comp.style = css;
|
|
20776
20777
|
components.push(comp);
|
|
20777
20778
|
__slotProps = prevSlotProps;
|
|
@@ -20865,7 +20866,7 @@ function generateIR(ast, source, filename) {
|
|
|
20865
20866
|
}
|
|
20866
20867
|
return new IRRoot(components, imports, importedNames, staticProps, loadFn, topLevelCode);
|
|
20867
20868
|
}
|
|
20868
|
-
var __vskAnnotations, __slotProps;
|
|
20869
|
+
var __vskAnnotations, __slotProps, __propsParam;
|
|
20869
20870
|
var init_ir_generator = __esm({
|
|
20870
20871
|
"../compiler/src/ir-generator.ts"() {
|
|
20871
20872
|
"use strict";
|
|
@@ -20879,6 +20880,7 @@ var init_ir_generator = __esm({
|
|
|
20879
20880
|
init_tokens();
|
|
20880
20881
|
__vskAnnotations = [];
|
|
20881
20882
|
__slotProps = null;
|
|
20883
|
+
__propsParam = null;
|
|
20882
20884
|
}
|
|
20883
20885
|
});
|
|
20884
20886
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vesk/vesk-cli",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.40",
|
|
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.40",
|
|
12
|
+
"@vesk/compiler": "^0.2.40",
|
|
13
|
+
"@vesk/plugin-tailwind": "^0.2.40",
|
|
14
|
+
"@vesk/runtime": "^0.2.40",
|
|
15
15
|
"esrap": "^2.3.0",
|
|
16
16
|
"typescript": "^5.8.0",
|
|
17
17
|
"ws": "^8.18.0",
|