xmlui 0.6.4 → 0.6.6
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/{apiInterceptorWorker-CsQWBvhF.mjs → apiInterceptorWorker-CoxC5ubF.mjs} +555 -541
- package/dist/{index-Dj3m1yCq.mjs → index-vlF_Dmo0.mjs} +11668 -10735
- package/dist/index.css +1 -1
- package/dist/scripts/src/components-core/container/ContainerComponentDef.js +17 -0
- package/dist/scripts/src/parsers/scripting/Parser.js +44 -1
- package/dist/style.css +1 -1
- package/dist/xmlui-metadata.mjs +2670 -1840
- package/dist/xmlui-metadata.umd.js +1 -1
- package/dist/xmlui-standalone.umd.js +187 -177
- package/dist/xmlui.d.ts +1 -0
- package/dist/xmlui.mjs +1 -1
- package/dist/xmlui.umd.js +93 -93
- package/package.json +4 -1
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.isContainerLike = isContainerLike;
|
|
4
|
+
// Tests if the particular component definition needs to be wrapped with an inline container
|
|
5
|
+
function isContainerLike(node) {
|
|
6
|
+
if (node.type === "Container") {
|
|
7
|
+
return true;
|
|
8
|
+
}
|
|
9
|
+
return !!(node.loaders ||
|
|
10
|
+
node.vars ||
|
|
11
|
+
node.uses ||
|
|
12
|
+
node.contextVars ||
|
|
13
|
+
// TODO: Check if this is needed
|
|
14
|
+
// node.props?.uses !== undefined ||
|
|
15
|
+
node.functions ||
|
|
16
|
+
node.scriptCollected);
|
|
17
|
+
}
|
|
@@ -1003,8 +1003,14 @@ class Parser {
|
|
|
1003
1003
|
break;
|
|
1004
1004
|
case "SeqE":
|
|
1005
1005
|
isValid = exprList.parenthesized === 1;
|
|
1006
|
+
let spreadFound = false;
|
|
1006
1007
|
if (isValid) {
|
|
1007
1008
|
for (const expr of exprList.expressions) {
|
|
1009
|
+
// --- Spread operator can be used only in the last position
|
|
1010
|
+
if (spreadFound) {
|
|
1011
|
+
isValid = false;
|
|
1012
|
+
break;
|
|
1013
|
+
}
|
|
1008
1014
|
switch (expr.type) {
|
|
1009
1015
|
case "IdE":
|
|
1010
1016
|
isValid = !expr.parenthesized;
|
|
@@ -1028,6 +1034,15 @@ class Parser {
|
|
|
1028
1034
|
}
|
|
1029
1035
|
break;
|
|
1030
1036
|
}
|
|
1037
|
+
case "SpreadE": {
|
|
1038
|
+
spreadFound = true;
|
|
1039
|
+
if (expr.operand.type !== "IdE") {
|
|
1040
|
+
isValid = false;
|
|
1041
|
+
break;
|
|
1042
|
+
}
|
|
1043
|
+
args.push(expr);
|
|
1044
|
+
break;
|
|
1045
|
+
}
|
|
1031
1046
|
default:
|
|
1032
1047
|
isValid = false;
|
|
1033
1048
|
break;
|
|
@@ -1051,6 +1066,14 @@ class Parser {
|
|
|
1051
1066
|
args.push(des);
|
|
1052
1067
|
}
|
|
1053
1068
|
break;
|
|
1069
|
+
case "SpreadE":
|
|
1070
|
+
if (exprList.operand.type !== "IdE") {
|
|
1071
|
+
isValid = false;
|
|
1072
|
+
break;
|
|
1073
|
+
}
|
|
1074
|
+
isValid = true;
|
|
1075
|
+
args.push(exprList);
|
|
1076
|
+
break;
|
|
1054
1077
|
default:
|
|
1055
1078
|
isValid = false;
|
|
1056
1079
|
}
|
|
@@ -1307,8 +1330,13 @@ class Parser {
|
|
|
1307
1330
|
break;
|
|
1308
1331
|
case "SeqE":
|
|
1309
1332
|
isValid = left.parenthesized === 1;
|
|
1333
|
+
let spreadFound = false;
|
|
1310
1334
|
if (isValid) {
|
|
1311
1335
|
for (const expr of left.expressions) {
|
|
1336
|
+
if (spreadFound) {
|
|
1337
|
+
isValid = false;
|
|
1338
|
+
break;
|
|
1339
|
+
}
|
|
1312
1340
|
switch (expr.type) {
|
|
1313
1341
|
case "IdE":
|
|
1314
1342
|
isValid = !expr.parenthesized;
|
|
@@ -1332,6 +1360,15 @@ class Parser {
|
|
|
1332
1360
|
}
|
|
1333
1361
|
break;
|
|
1334
1362
|
}
|
|
1363
|
+
case "SpreadE": {
|
|
1364
|
+
spreadFound = true;
|
|
1365
|
+
if (expr.operand.type !== "IdE") {
|
|
1366
|
+
isValid = false;
|
|
1367
|
+
break;
|
|
1368
|
+
}
|
|
1369
|
+
args.push(expr);
|
|
1370
|
+
break;
|
|
1371
|
+
}
|
|
1335
1372
|
default:
|
|
1336
1373
|
isValid = false;
|
|
1337
1374
|
break;
|
|
@@ -1355,6 +1392,12 @@ class Parser {
|
|
|
1355
1392
|
args.push(des);
|
|
1356
1393
|
}
|
|
1357
1394
|
break;
|
|
1395
|
+
case "SpreadE":
|
|
1396
|
+
isValid = left.operand.type === "IdE";
|
|
1397
|
+
if (isValid) {
|
|
1398
|
+
args.push(left);
|
|
1399
|
+
}
|
|
1400
|
+
break;
|
|
1358
1401
|
default:
|
|
1359
1402
|
isValid = false;
|
|
1360
1403
|
}
|
|
@@ -2711,4 +2754,4 @@ class Parser {
|
|
|
2711
2754
|
}
|
|
2712
2755
|
}
|
|
2713
2756
|
exports.Parser = Parser;
|
|
2714
|
-
"TypeError: Cannot read properties of undefined (reading 'canBeUnary')\n at Parser.parseUnaryOrPrefixExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:2041:38)\n at Parser.parseExponentialExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1985:25)\n at Parser.parseMultExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1951:25)\n at Parser.parseAddExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1917:25)\n at Par…nExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1835:25)\n at Parser.parseEquExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1793:25)\n at Parser.parseBitwiseAndExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1760:25)\n at Parser.parseBitwiseXorExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1727:25)\n at Parser.parseBitwiseOrExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1694:25)";
|
|
2757
|
+
("TypeError: Cannot read properties of undefined (reading 'canBeUnary')\n at Parser.parseUnaryOrPrefixExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:2041:38)\n at Parser.parseExponentialExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1985:25)\n at Parser.parseMultExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1951:25)\n at Parser.parseAddExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1917:25)\n at Par…nExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1835:25)\n at Parser.parseEquExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1793:25)\n at Parser.parseBitwiseAndExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1760:25)\n at Parser.parseBitwiseXorExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1727:25)\n at Parser.parseBitwiseOrExpr (/home/ez/code/work/xmlui/xmlui/src/parsers/scripting/Parser.ts:1694:25)");
|