@barefootjs/jsx 0.18.3 → 0.18.5
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/adapters/parsed-expr-emitter.d.ts +41 -2
- package/dist/adapters/parsed-expr-emitter.d.ts.map +1 -1
- package/dist/expression-parser.d.ts +2 -1
- package/dist/expression-parser.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +172 -48
- package/dist/ir-to-client-js/collect-elements.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/build-event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts +10 -0
- package/dist/ir-to-client-js/control-flow/plan/event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/control-flow/stringify/event-delegation.d.ts.map +1 -1
- package/dist/ir-to-client-js/csr-substitute.d.ts +1 -0
- package/dist/ir-to-client-js/csr-substitute.d.ts.map +1 -1
- package/dist/ir-to-client-js/html-template.d.ts.map +1 -1
- package/dist/ir-to-client-js/types.d.ts +9 -0
- package/dist/ir-to-client-js/types.d.ts.map +1 -1
- package/dist/ir-to-client-js/utils.d.ts +25 -0
- package/dist/ir-to-client-js/utils.d.ts.map +1 -1
- package/dist/jsx-to-ir.d.ts.map +1 -1
- package/dist/types.d.ts +66 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/__snapshots__/doc-examples.test.ts.snap +1 -1
- package/src/__tests__/event-delegation-index-param.test.ts +130 -0
- package/src/__tests__/expression-parser.test.ts +38 -0
- package/src/__tests__/ir-const-resolution.test.ts +1 -1
- package/src/__tests__/ir-provider.test.ts +2 -2
- package/src/__tests__/ir-walker.test.ts +1 -0
- package/src/__tests__/materialize-getter-calls.test.ts +1 -0
- package/src/__tests__/tagged-template-interleave.test.ts +2 -2
- package/src/adapters/parsed-expr-emitter.ts +76 -1
- package/src/expression-parser.ts +59 -25
- package/src/index.ts +1 -1
- package/src/ir-to-client-js/collect-elements.ts +3 -0
- package/src/ir-to-client-js/control-flow/plan/build-event-delegation.ts +6 -0
- package/src/ir-to-client-js/control-flow/plan/event-delegation.ts +10 -0
- package/src/ir-to-client-js/control-flow/stringify/event-delegation.ts +31 -7
- package/src/ir-to-client-js/csr-substitute.ts +1 -1
- package/src/ir-to-client-js/html-template.ts +57 -11
- package/src/ir-to-client-js/types.ts +10 -0
- package/src/ir-to-client-js/utils.ts +34 -1
- package/src/jsx-to-ir.ts +110 -13
- package/src/types.ts +68 -0
package/dist/index.js
CHANGED
|
@@ -206,7 +206,6 @@ var UNSUPPORTED_METHODS = new Set([
|
|
|
206
206
|
"some",
|
|
207
207
|
"forEach",
|
|
208
208
|
"flatMap",
|
|
209
|
-
"replaceAll",
|
|
210
209
|
"charAt",
|
|
211
210
|
"charCodeAt",
|
|
212
211
|
"codePointAt",
|
|
@@ -481,6 +480,9 @@ function convertNode(node, raw) {
|
|
|
481
480
|
if (callee.property === "trim") {
|
|
482
481
|
return { kind: "array-method", method: "trim", object: callee.object, args };
|
|
483
482
|
}
|
|
483
|
+
if (callee.property === "trimStart" || callee.property === "trimEnd") {
|
|
484
|
+
return { kind: "array-method", method: callee.property, object: callee.object, args };
|
|
485
|
+
}
|
|
484
486
|
if (callee.property === "toFixed") {
|
|
485
487
|
return { kind: "array-method", method: "toFixed", object: callee.object, args };
|
|
486
488
|
}
|
|
@@ -506,24 +508,25 @@ function convertNode(node, raw) {
|
|
|
506
508
|
}
|
|
507
509
|
return { kind: "array-method", method: callee.property, object: callee.object, args };
|
|
508
510
|
}
|
|
509
|
-
if (callee.property === "replace") {
|
|
511
|
+
if (callee.property === "replace" || callee.property === "replaceAll") {
|
|
512
|
+
const method = callee.property;
|
|
510
513
|
if (args.length < 2) {
|
|
511
514
|
return {
|
|
512
515
|
kind: "unsupported",
|
|
513
516
|
raw,
|
|
514
|
-
reason:
|
|
517
|
+
reason: `\`.${method}(${args.length === 0 ? "" : "pattern"})\` needs both a pattern and a replacement — JS coerces the missing argument to the string "undefined", a degenerate result. Pass both arguments, or pre-compute the value before the template.`
|
|
515
518
|
};
|
|
516
519
|
}
|
|
517
520
|
const patternNode = node.arguments[0];
|
|
518
521
|
if (patternNode && ts2.isRegularExpressionLiteral(patternNode)) {
|
|
519
|
-
return { kind: "array-method", method
|
|
522
|
+
return { kind: "array-method", method, object: callee.object, args };
|
|
520
523
|
}
|
|
521
524
|
const badArg = args[0].kind === "unsupported" || args[0].kind === "object-literal" ? args[0] : args[1].kind === "unsupported" || args[1].kind === "object-literal" ? args[1] : undefined;
|
|
522
525
|
if (badArg) {
|
|
523
526
|
const reason = badArg.kind === "unsupported" ? badArg.reason : "Unsupported syntax: ObjectLiteralExpression";
|
|
524
527
|
return { kind: "unsupported", raw, reason };
|
|
525
528
|
}
|
|
526
|
-
return { kind: "array-method", method
|
|
529
|
+
return { kind: "array-method", method, object: callee.object, args };
|
|
527
530
|
}
|
|
528
531
|
if (callee.property === "repeat") {
|
|
529
532
|
return { kind: "array-method", method: "repeat", object: callee.object, args };
|
|
@@ -558,7 +561,7 @@ function convertNode(node, raw) {
|
|
|
558
561
|
if (ts2.isPropertyAccessExpression(node)) {
|
|
559
562
|
const object = convertNode(node.expression, raw);
|
|
560
563
|
const property = node.name.text;
|
|
561
|
-
return { kind: "member", object, property, computed: false };
|
|
564
|
+
return { kind: "member", object, property, computed: false, optional: !!node.questionDotToken };
|
|
562
565
|
}
|
|
563
566
|
if (ts2.isElementAccessExpression(node)) {
|
|
564
567
|
const object = convertNode(node.expression, raw);
|
|
@@ -567,10 +570,10 @@ function convertNode(node, raw) {
|
|
|
567
570
|
return { kind: "unsupported", raw, reason: "Element access with no index expression" };
|
|
568
571
|
}
|
|
569
572
|
if (ts2.isNumericLiteral(argNode)) {
|
|
570
|
-
return { kind: "member", object, property: argNode.text, computed: true };
|
|
573
|
+
return { kind: "member", object, property: argNode.text, computed: true, optional: !!node.questionDotToken };
|
|
571
574
|
}
|
|
572
575
|
if (ts2.isStringLiteral(argNode)) {
|
|
573
|
-
return { kind: "member", object, property: argNode.text, computed: true };
|
|
576
|
+
return { kind: "member", object, property: argNode.text, computed: true, optional: !!node.questionDotToken };
|
|
574
577
|
}
|
|
575
578
|
const index = convertNode(argNode, raw);
|
|
576
579
|
if (index.kind === "unsupported" || index.kind === "object-literal")
|
|
@@ -1121,7 +1124,7 @@ function substituteDestructuredFields(expr, fieldMap, syntheticParam, restName)
|
|
|
1121
1124
|
return e;
|
|
1122
1125
|
let node = { kind: "identifier", name: syntheticParam };
|
|
1123
1126
|
for (const segment of entry.path) {
|
|
1124
|
-
node = { kind: "member", object: node, property: segment, computed: false };
|
|
1127
|
+
node = { kind: "member", object: node, property: segment, computed: false, optional: false };
|
|
1125
1128
|
}
|
|
1126
1129
|
if (entry.defaultExpr) {
|
|
1127
1130
|
return { kind: "logical", op: "??", left: node, right: entry.defaultExpr };
|
|
@@ -1136,10 +1139,11 @@ function substituteDestructuredFields(expr, fieldMap, syntheticParam, restName)
|
|
|
1136
1139
|
kind: "member",
|
|
1137
1140
|
object: { kind: "identifier", name: syntheticParam },
|
|
1138
1141
|
property: e.property,
|
|
1139
|
-
computed: false
|
|
1142
|
+
computed: false,
|
|
1143
|
+
optional: e.optional
|
|
1140
1144
|
};
|
|
1141
1145
|
}
|
|
1142
|
-
return { kind: "member", object: walk(e.object), property: e.property, computed: e.computed };
|
|
1146
|
+
return { kind: "member", object: walk(e.object), property: e.property, computed: e.computed, optional: e.optional };
|
|
1143
1147
|
case "index-access":
|
|
1144
1148
|
return { kind: "index-access", object: walk(e.object), index: walk(e.index) };
|
|
1145
1149
|
case "binary":
|
|
@@ -1251,10 +1255,10 @@ function checkSupport(expr) {
|
|
|
1251
1255
|
return { supported: true, level: "L2" };
|
|
1252
1256
|
}
|
|
1253
1257
|
case "array-method": {
|
|
1254
|
-
if (expr.method === "replace" && expr.args[0]?.kind === "regex") {
|
|
1258
|
+
if ((expr.method === "replace" || expr.method === "replaceAll") && expr.args[0]?.kind === "regex") {
|
|
1255
1259
|
return {
|
|
1256
1260
|
supported: false,
|
|
1257
|
-
reason:
|
|
1261
|
+
reason: `String.prototype.${expr.method} supports only a string pattern + string replacement (the regex form is deferred); use a string pattern or wrap the expression in /* @client */`
|
|
1258
1262
|
};
|
|
1259
1263
|
}
|
|
1260
1264
|
const objSupport = checkSupport(expr.object);
|
|
@@ -1628,7 +1632,7 @@ function inlineBinding(expr, name, value) {
|
|
|
1628
1632
|
case "call":
|
|
1629
1633
|
return { kind: "call", callee: walk(e.callee, enclosing), args: e.args.map((a) => walk(a, enclosing)) };
|
|
1630
1634
|
case "member":
|
|
1631
|
-
return { kind: "member", object: walk(e.object, enclosing), property: e.property, computed: e.computed };
|
|
1635
|
+
return { kind: "member", object: walk(e.object, enclosing), property: e.property, computed: e.computed, optional: e.optional };
|
|
1632
1636
|
case "index-access":
|
|
1633
1637
|
return { kind: "index-access", object: walk(e.object, enclosing), index: walk(e.index, enclosing) };
|
|
1634
1638
|
case "binary":
|
|
@@ -1879,7 +1883,7 @@ function materializeGetterCalls(expr, names) {
|
|
|
1879
1883
|
alternate: rw(expr.alternate)
|
|
1880
1884
|
};
|
|
1881
1885
|
case "member":
|
|
1882
|
-
return { kind: "member", object: rw(expr.object), property: expr.property, computed: expr.computed };
|
|
1886
|
+
return { kind: "member", object: rw(expr.object), property: expr.property, computed: expr.computed, optional: expr.optional };
|
|
1883
1887
|
case "index-access":
|
|
1884
1888
|
return { kind: "index-access", object: rw(expr.object), index: rw(expr.index) };
|
|
1885
1889
|
case "template-literal":
|
|
@@ -2293,13 +2297,23 @@ function attrValueToString(value, opts) {
|
|
|
2293
2297
|
return null;
|
|
2294
2298
|
}
|
|
2295
2299
|
}
|
|
2300
|
+
function applyObjectIterationWrap(node, arrayExpr) {
|
|
2301
|
+
if (node.objectIteration === "entries")
|
|
2302
|
+
return `Object.entries(${arrayExpr})`;
|
|
2303
|
+
if (node.objectIteration === "keys")
|
|
2304
|
+
return `Object.keys(${arrayExpr})`;
|
|
2305
|
+
if (node.objectIteration === "values")
|
|
2306
|
+
return `Object.values(${arrayExpr})`;
|
|
2307
|
+
return arrayExpr;
|
|
2308
|
+
}
|
|
2296
2309
|
function buildChainedArrayExpr(elem) {
|
|
2297
|
-
|
|
2310
|
+
const chained = buildLoopChainExpr({
|
|
2298
2311
|
base: elem.array,
|
|
2299
2312
|
sortComparator: elem.sortComparator,
|
|
2300
2313
|
filterPredicate: elem.filterPredicate,
|
|
2301
2314
|
chainOrder: elem.chainOrder
|
|
2302
2315
|
});
|
|
2316
|
+
return applyObjectIterationWrap(elem, chained);
|
|
2303
2317
|
}
|
|
2304
2318
|
function loopOffsetTerms(offset) {
|
|
2305
2319
|
if (!offset)
|
|
@@ -2971,7 +2985,7 @@ function normalizeSignalInitial(signal, propsObjectName) {
|
|
|
2971
2985
|
}
|
|
2972
2986
|
|
|
2973
2987
|
// src/ir-to-client-js/html-template.ts
|
|
2974
|
-
import { BF_PARENT_SCOPE_PLACEHOLDER, BF_SCOPE } from "@barefootjs/shared";
|
|
2988
|
+
import { BF_PARENT_SCOPE_PLACEHOLDER, BF_SCOPE, escapeHtml } from "@barefootjs/shared";
|
|
2975
2989
|
function createStringProtector() {
|
|
2976
2990
|
const strings = [];
|
|
2977
2991
|
const protect = (s) => {
|
|
@@ -3073,6 +3087,24 @@ function applyIterationShape(node, arrayExpr, indexParam) {
|
|
|
3073
3087
|
callbackParam: `(${node.param})`
|
|
3074
3088
|
};
|
|
3075
3089
|
}
|
|
3090
|
+
if (node.objectIteration === "entries") {
|
|
3091
|
+
return {
|
|
3092
|
+
array: `Object.entries(${arrayExpr})`,
|
|
3093
|
+
callbackParam: node.index ? `([${node.index}, ${node.param}])` : `(${node.param}${indexParam})`
|
|
3094
|
+
};
|
|
3095
|
+
}
|
|
3096
|
+
if (node.objectIteration === "keys") {
|
|
3097
|
+
return {
|
|
3098
|
+
array: `Object.keys(${arrayExpr})`,
|
|
3099
|
+
callbackParam: `(${node.param})`
|
|
3100
|
+
};
|
|
3101
|
+
}
|
|
3102
|
+
if (node.objectIteration === "values") {
|
|
3103
|
+
return {
|
|
3104
|
+
array: `Object.values(${arrayExpr})`,
|
|
3105
|
+
callbackParam: `(${node.param})`
|
|
3106
|
+
};
|
|
3107
|
+
}
|
|
3076
3108
|
return { array: arrayExpr, callbackParam: `(${node.param}${indexParam})` };
|
|
3077
3109
|
}
|
|
3078
3110
|
function childrenPropEntry(children, recurse) {
|
|
@@ -3132,7 +3164,7 @@ function renderTemplateAttrPart(attr, attrName, wrap, restSpreadNames) {
|
|
|
3132
3164
|
case "boolean-attr":
|
|
3133
3165
|
return attrName;
|
|
3134
3166
|
case "literal":
|
|
3135
|
-
return `${attrName}="${v.value}"`;
|
|
3167
|
+
return `${attrName}="${escapeHtml(v.value)}"`;
|
|
3136
3168
|
case "expression": {
|
|
3137
3169
|
const valExpr = wrap(v.expr);
|
|
3138
3170
|
return templateAttrExpr(attrName, valExpr, v.presenceOrUndefined);
|
|
@@ -3263,7 +3295,7 @@ function irToHtmlTemplate(node, restSpreadNames, loopDepth = 0, loopParams, bran
|
|
|
3263
3295
|
return `<${node.tag}${attrs ? " " + attrs : ""} />`;
|
|
3264
3296
|
}
|
|
3265
3297
|
case "text":
|
|
3266
|
-
return node.value;
|
|
3298
|
+
return escapeHtml(node.value);
|
|
3267
3299
|
case "expression":
|
|
3268
3300
|
if (node.expr === "null" || node.expr === "undefined")
|
|
3269
3301
|
return "";
|
|
@@ -3371,7 +3403,7 @@ function buildLoopSkeletonTemplate(node, safe) {
|
|
|
3371
3403
|
const v = a.value;
|
|
3372
3404
|
switch (v.kind) {
|
|
3373
3405
|
case "literal":
|
|
3374
|
-
attrParts.push(`${toHtmlAttrName(a.name)}="${v.value}"`);
|
|
3406
|
+
attrParts.push(`${toHtmlAttrName(a.name)}="${escapeHtml(v.value)}"`);
|
|
3375
3407
|
break;
|
|
3376
3408
|
case "boolean-attr":
|
|
3377
3409
|
attrParts.push(toHtmlAttrName(a.name));
|
|
@@ -3406,7 +3438,7 @@ function buildLoopSkeletonTemplate(node, safe) {
|
|
|
3406
3438
|
return `<${node.tag}${attrs ? " " + attrs : ""} />`;
|
|
3407
3439
|
}
|
|
3408
3440
|
case "text":
|
|
3409
|
-
return node.value;
|
|
3441
|
+
return escapeHtml(node.value);
|
|
3410
3442
|
case "expression":
|
|
3411
3443
|
if (node.expr === "null" || node.expr === "undefined")
|
|
3412
3444
|
return "";
|
|
@@ -3458,7 +3490,7 @@ function irToPlaceholderTemplate(node, restSpreadNames, loopDepth = 0, loopParam
|
|
|
3458
3490
|
return `<${node.tag}${attrs ? " " + attrs : ""} />`;
|
|
3459
3491
|
}
|
|
3460
3492
|
case "text":
|
|
3461
|
-
return node.value;
|
|
3493
|
+
return escapeHtml(node.value);
|
|
3462
3494
|
case "expression":
|
|
3463
3495
|
if (node.expr === "null" || node.expr === "undefined")
|
|
3464
3496
|
return "";
|
|
@@ -3650,7 +3682,7 @@ function irToComponentTemplateWithOpts(node, opts) {
|
|
|
3650
3682
|
return templateAttrExpr(keyName, transformExpr(tmplStr));
|
|
3651
3683
|
}
|
|
3652
3684
|
case "literal":
|
|
3653
|
-
return `${keyName}="${v.value}"`;
|
|
3685
|
+
return `${keyName}="${escapeHtml(v.value)}"`;
|
|
3654
3686
|
default:
|
|
3655
3687
|
return "";
|
|
3656
3688
|
}
|
|
@@ -3660,7 +3692,7 @@ function irToComponentTemplateWithOpts(node, opts) {
|
|
|
3660
3692
|
case "boolean-attr":
|
|
3661
3693
|
return attrName;
|
|
3662
3694
|
case "literal":
|
|
3663
|
-
return `${attrName}="${v.value}"`;
|
|
3695
|
+
return `${attrName}="${escapeHtml(v.value)}"`;
|
|
3664
3696
|
case "expression":
|
|
3665
3697
|
return templateAttrExpr(attrName, transformExpr(v.expr, v.templateExpr), v.presenceOrUndefined);
|
|
3666
3698
|
case "template": {
|
|
@@ -3686,7 +3718,7 @@ function irToComponentTemplateWithOpts(node, opts) {
|
|
|
3686
3718
|
return `<${node.tag}${attrs ? " " + attrs : ""} />`;
|
|
3687
3719
|
}
|
|
3688
3720
|
case "text":
|
|
3689
|
-
return node.value;
|
|
3721
|
+
return escapeHtml(node.value);
|
|
3690
3722
|
case "expression":
|
|
3691
3723
|
if (node.expr === "null" || node.expr === "undefined")
|
|
3692
3724
|
return "";
|
|
@@ -3978,7 +4010,7 @@ function generateCsrTemplateWithOpts(node, opts) {
|
|
|
3978
4010
|
case "boolean-attr":
|
|
3979
4011
|
return attrName;
|
|
3980
4012
|
case "literal":
|
|
3981
|
-
return `${attrName}="${v.value}"`;
|
|
4013
|
+
return `${attrName}="${escapeHtml(v.value)}"`;
|
|
3982
4014
|
case "expression":
|
|
3983
4015
|
return templateAttrExpr(attrName, transformExpr(v.expr, v.templateExpr), v.presenceOrUndefined);
|
|
3984
4016
|
case "template": {
|
|
@@ -4004,7 +4036,7 @@ function generateCsrTemplateWithOpts(node, opts) {
|
|
|
4004
4036
|
return `<${node.tag}${attrs ? " " + attrs : ""} />`;
|
|
4005
4037
|
}
|
|
4006
4038
|
case "text":
|
|
4007
|
-
return node.value;
|
|
4039
|
+
return escapeHtml(node.value);
|
|
4008
4040
|
case "expression":
|
|
4009
4041
|
if (node.expr === "null" || node.expr === "undefined")
|
|
4010
4042
|
return "";
|
|
@@ -8034,6 +8066,7 @@ function resolveFreeRefs(node, env) {
|
|
|
8034
8066
|
}
|
|
8035
8067
|
|
|
8036
8068
|
// src/jsx-to-ir.ts
|
|
8069
|
+
import { toHTMLAttrName, decodeEntities } from "@barefootjs/shared";
|
|
8037
8070
|
var CLIENT_DIRECTIVE_INTERIOR_RE2 = /^\s*@client\s*$/;
|
|
8038
8071
|
var BLOCK_COMMENT_RE2 = /\/\*([\s\S]*?)\*\//g;
|
|
8039
8072
|
function hasLeadingClientDirective(expr, sourceFile) {
|
|
@@ -8182,6 +8215,7 @@ function createTransformContext(analyzer) {
|
|
|
8182
8215
|
isRoot: true,
|
|
8183
8216
|
insideComponentChildren: false,
|
|
8184
8217
|
loopParams: new Set,
|
|
8218
|
+
loopDepth: 0,
|
|
8185
8219
|
patterns: {
|
|
8186
8220
|
signals: analyzer.signals.map((s) => ({
|
|
8187
8221
|
getter: s.getter,
|
|
@@ -8835,7 +8869,7 @@ function transformText(node, ctx) {
|
|
|
8835
8869
|
}
|
|
8836
8870
|
return {
|
|
8837
8871
|
type: "text",
|
|
8838
|
-
value: text,
|
|
8872
|
+
value: decodeEntities(text),
|
|
8839
8873
|
loc: getSourceLocation(node, ctx.sourceFile, ctx.filePath)
|
|
8840
8874
|
};
|
|
8841
8875
|
}
|
|
@@ -9391,6 +9425,22 @@ function isIteratorShapeCall(node) {
|
|
|
9391
9425
|
return null;
|
|
9392
9426
|
return { array: node.expression.expression, shape: name };
|
|
9393
9427
|
}
|
|
9428
|
+
function isObjectIteratorCall(node) {
|
|
9429
|
+
if (!ts11.isCallExpression(node))
|
|
9430
|
+
return null;
|
|
9431
|
+
if (!ts11.isPropertyAccessExpression(node.expression))
|
|
9432
|
+
return null;
|
|
9433
|
+
if (!ts11.isIdentifier(node.expression.expression))
|
|
9434
|
+
return null;
|
|
9435
|
+
if (node.expression.expression.text !== "Object")
|
|
9436
|
+
return null;
|
|
9437
|
+
if (node.arguments.length !== 1)
|
|
9438
|
+
return null;
|
|
9439
|
+
const name = node.expression.name.text;
|
|
9440
|
+
if (name !== "entries" && name !== "keys" && name !== "values")
|
|
9441
|
+
return null;
|
|
9442
|
+
return { object: node.arguments[0], shape: name };
|
|
9443
|
+
}
|
|
9394
9444
|
function extractSortComparator(callback, _method, ctx) {
|
|
9395
9445
|
const outerRaw = ctx.getJS(callback);
|
|
9396
9446
|
const unsupported = () => ({
|
|
@@ -9809,6 +9859,7 @@ function extractItemConditionalKey(cond) {
|
|
|
9809
9859
|
}
|
|
9810
9860
|
function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
9811
9861
|
const isNested = ctx.loopParams.size > 0;
|
|
9862
|
+
const depth = ctx.loopDepth;
|
|
9812
9863
|
const propAccess = node.expression;
|
|
9813
9864
|
const mapSource = propAccess.expression;
|
|
9814
9865
|
let array = "";
|
|
@@ -9821,6 +9872,7 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
9821
9872
|
let templateMapPreamble;
|
|
9822
9873
|
let typedMapPreamble;
|
|
9823
9874
|
let iterationShape;
|
|
9875
|
+
let objectIteration;
|
|
9824
9876
|
const setArray = (node2) => {
|
|
9825
9877
|
array = ctx.getJS(node2);
|
|
9826
9878
|
templateArray = rewriteBarePropRefs2(array, node2, ctx);
|
|
@@ -9835,6 +9887,12 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
9835
9887
|
} else if (iteratorInfo.shape === "keys") {
|
|
9836
9888
|
iterationShape = "keys";
|
|
9837
9889
|
}
|
|
9890
|
+
} else {
|
|
9891
|
+
const objectIteratorInfo = isObjectIteratorCall(mapSource);
|
|
9892
|
+
if (objectIteratorInfo) {
|
|
9893
|
+
chainSource = objectIteratorInfo.object;
|
|
9894
|
+
objectIteration = objectIteratorInfo.shape;
|
|
9895
|
+
}
|
|
9838
9896
|
}
|
|
9839
9897
|
const filterInfo = isFilterCall(chainSource);
|
|
9840
9898
|
const sortInfo = isSortCall(chainSource);
|
|
@@ -9932,7 +9990,8 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
9932
9990
|
if (firstParam.type) {
|
|
9933
9991
|
paramType = firstParam.type.getText(ctx.sourceFile);
|
|
9934
9992
|
}
|
|
9935
|
-
|
|
9993
|
+
const isEntriesShape = iterationShape === "entries" || objectIteration === "entries";
|
|
9994
|
+
if (isEntriesShape && ts11.isArrayBindingPattern(firstParam.name)) {
|
|
9936
9995
|
const elements = firstParam.name.elements.filter((el) => !ts11.isOmittedExpression(el));
|
|
9937
9996
|
if (elements.length === 2 && ts11.isBindingElement(elements[0]) && ts11.isIdentifier(elements[0].name) && ts11.isBindingElement(elements[1]) && ts11.isIdentifier(elements[1].name)) {
|
|
9938
9997
|
index = elements[0].name.text;
|
|
@@ -9954,7 +10013,7 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
9954
10013
|
}
|
|
9955
10014
|
}
|
|
9956
10015
|
}
|
|
9957
|
-
if (callback.parameters.length > 1 && iterationShape !== "entries") {
|
|
10016
|
+
if (callback.parameters.length > 1 && iterationShape !== "entries" && objectIteration !== "entries") {
|
|
9958
10017
|
const secondParam = callback.parameters[1];
|
|
9959
10018
|
index = secondParam.name.getText(ctx.sourceFile);
|
|
9960
10019
|
if (secondParam.type) {
|
|
@@ -9969,6 +10028,7 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
9969
10028
|
}
|
|
9970
10029
|
if (index)
|
|
9971
10030
|
ctx.loopParams.add(index);
|
|
10031
|
+
ctx.loopDepth++;
|
|
9972
10032
|
const tryTransformRenderableBody = (expr) => {
|
|
9973
10033
|
if (!ts11.isBinaryExpression(expr))
|
|
9974
10034
|
return;
|
|
@@ -10065,6 +10125,7 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
10065
10125
|
}
|
|
10066
10126
|
if (index)
|
|
10067
10127
|
ctx.loopParams.delete(index);
|
|
10128
|
+
ctx.loopDepth--;
|
|
10068
10129
|
}
|
|
10069
10130
|
if (children.length === 0 && !flatMapCallback) {
|
|
10070
10131
|
return null;
|
|
@@ -10093,7 +10154,7 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
10093
10154
|
const callsReactive = exprCallsReactiveGetters(arrayExpr, ctx);
|
|
10094
10155
|
const hasCalls = exprHasFunctionCalls(arrayExpr);
|
|
10095
10156
|
const isDirectPropArray = method !== "flatMap" && isArrayExprDirectPropRef(arrayExpr, ctx);
|
|
10096
|
-
const isStaticArray = !isSignalOrMemoArray(array, ctx) && !isDirectPropArray && !hasCalls;
|
|
10157
|
+
const isStaticArray = !isSignalOrMemoArray(array, ctx) && !isDirectPropArray && !hasCalls && !objectIteration;
|
|
10097
10158
|
const nestedComponents = collectNestedComponents(children).filter((c) => c.name !== childComponent?.name);
|
|
10098
10159
|
return {
|
|
10099
10160
|
type: "loop",
|
|
@@ -10120,6 +10181,8 @@ function transformMapCall(node, ctx, isClientOnly = false, method = "map") {
|
|
|
10120
10181
|
sortComparator,
|
|
10121
10182
|
chainOrder,
|
|
10122
10183
|
iterationShape,
|
|
10184
|
+
objectIteration,
|
|
10185
|
+
depth,
|
|
10123
10186
|
clientOnly: isClientOnly || undefined,
|
|
10124
10187
|
mapPreamble,
|
|
10125
10188
|
templateMapPreamble,
|
|
@@ -10310,27 +10373,28 @@ function processAttributes(attributes, ctx) {
|
|
|
10310
10373
|
}
|
|
10311
10374
|
if (!ts11.isJsxAttribute(attr))
|
|
10312
10375
|
continue;
|
|
10313
|
-
const
|
|
10314
|
-
if (
|
|
10376
|
+
const rawName = attr.name.getText(ctx.sourceFile);
|
|
10377
|
+
if (rawName === "ref") {
|
|
10315
10378
|
if (attr.initializer && ts11.isJsxExpression(attr.initializer) && attr.initializer.expression) {
|
|
10316
10379
|
reportJsxBranchLocalInCallback(attr.initializer.expression, ctx);
|
|
10317
10380
|
ref = ctx.getJS(attr.initializer.expression);
|
|
10318
10381
|
}
|
|
10319
10382
|
continue;
|
|
10320
10383
|
}
|
|
10321
|
-
if (/^on[A-Z]/.test(
|
|
10384
|
+
if (/^on[A-Z]/.test(rawName)) {
|
|
10322
10385
|
if (attr.initializer && ts11.isJsxExpression(attr.initializer) && attr.initializer.expression) {
|
|
10323
|
-
const eventName =
|
|
10386
|
+
const eventName = rawName.slice(2).toLowerCase();
|
|
10324
10387
|
reportJsxBranchLocalInCallback(attr.initializer.expression, ctx);
|
|
10325
10388
|
events.push({
|
|
10326
10389
|
name: eventName,
|
|
10327
|
-
originalAttr:
|
|
10390
|
+
originalAttr: rawName,
|
|
10328
10391
|
handler: ctx.getJS(attr.initializer.expression),
|
|
10329
10392
|
loc: getSourceLocation(attr, ctx.sourceFile, ctx.filePath)
|
|
10330
10393
|
});
|
|
10331
10394
|
}
|
|
10332
10395
|
continue;
|
|
10333
10396
|
}
|
|
10397
|
+
const name = toHTMLAttrName(rawName);
|
|
10334
10398
|
let value = getAttributeValue(attr, ctx);
|
|
10335
10399
|
let clientOnly;
|
|
10336
10400
|
if (attr.initializer && ts11.isJsxExpression(attr.initializer) && attr.initializer.expression) {
|
|
@@ -10361,7 +10425,7 @@ function getAttributeValue(attr, ctx) {
|
|
|
10361
10425
|
return AttrValueOf.booleanAttr();
|
|
10362
10426
|
}
|
|
10363
10427
|
if (ts11.isStringLiteral(attr.initializer)) {
|
|
10364
|
-
return AttrValueOf.literal(attr.initializer.text);
|
|
10428
|
+
return AttrValueOf.literal(decodeEntities(attr.initializer.text));
|
|
10365
10429
|
}
|
|
10366
10430
|
if (ts11.isJsxExpression(attr.initializer) && attr.initializer.expression) {
|
|
10367
10431
|
let expr = attr.initializer.expression;
|
|
@@ -11675,6 +11739,7 @@ function collectInnerLoops(nodes, siblingOffsets, outerLoopParam, ctx, options)
|
|
|
11675
11739
|
bodyIsMultiRoot: n.bodyIsMultiRoot,
|
|
11676
11740
|
bodyIsItemConditional: n.bodyIsItemConditional,
|
|
11677
11741
|
iterationShape: n.iterationShape,
|
|
11742
|
+
objectIteration: n.objectIteration,
|
|
11678
11743
|
containerSlotId: scope.parentSlotId,
|
|
11679
11744
|
template,
|
|
11680
11745
|
mapPreamble: n.mapPreamble,
|
|
@@ -11896,6 +11961,7 @@ function collectElements(node, ctx, siblingOffsets, insideConditional = false) {
|
|
|
11896
11961
|
bodyIsMultiRoot: l.bodyIsMultiRoot,
|
|
11897
11962
|
bodyIsItemConditional: l.bodyIsItemConditional,
|
|
11898
11963
|
iterationShape: l.iterationShape,
|
|
11964
|
+
objectIteration: l.objectIteration,
|
|
11899
11965
|
template,
|
|
11900
11966
|
staticItemTemplate,
|
|
11901
11967
|
skeletonTemplate,
|
|
@@ -12095,6 +12161,7 @@ function collectBranchLoops(node, ctx, siblingOffsets) {
|
|
|
12095
12161
|
bodyIsMultiRoot: n.bodyIsMultiRoot,
|
|
12096
12162
|
bodyIsItemConditional: n.bodyIsItemConditional,
|
|
12097
12163
|
iterationShape: n.iterationShape,
|
|
12164
|
+
objectIteration: n.objectIteration,
|
|
12098
12165
|
template: childTemplate,
|
|
12099
12166
|
containerSlotId: containerSlot,
|
|
12100
12167
|
mapPreamble: n.mapPreamble ?? null,
|
|
@@ -15564,6 +15631,7 @@ function buildDynamicLoopDelegationPlan(elem, profileComponentName) {
|
|
|
15564
15631
|
param: elem.param,
|
|
15565
15632
|
paramBindings: elem.paramBindings,
|
|
15566
15633
|
key: elem.key,
|
|
15634
|
+
index: elem.index,
|
|
15567
15635
|
mapPreamble: elem.mapPreamble ?? null
|
|
15568
15636
|
})
|
|
15569
15637
|
};
|
|
@@ -15579,6 +15647,7 @@ function buildBranchLoopDelegationPlan(loop, cv, profileComponentName) {
|
|
|
15579
15647
|
param: loop.param,
|
|
15580
15648
|
paramBindings: loop.paramBindings,
|
|
15581
15649
|
key: loop.key,
|
|
15650
|
+
index: loop.index,
|
|
15582
15651
|
mapPreamble: loop.mapPreamble ?? null
|
|
15583
15652
|
})
|
|
15584
15653
|
};
|
|
@@ -15594,7 +15663,8 @@ function buildStaticArrayDelegationPlan(elem, profileComponentName) {
|
|
|
15594
15663
|
arrayExpr: buildChainedArrayExpr(elem),
|
|
15595
15664
|
param: elem.param,
|
|
15596
15665
|
mapPreamble: elem.mapPreamble ?? null,
|
|
15597
|
-
offset: elem.offset ?? null
|
|
15666
|
+
offset: elem.offset ?? null,
|
|
15667
|
+
indexParam: elem.index ?? null
|
|
15598
15668
|
}
|
|
15599
15669
|
};
|
|
15600
15670
|
}
|
|
@@ -15609,7 +15679,8 @@ function buildKeyedOrIndexLookup(args) {
|
|
|
15609
15679
|
paramBindings: args.paramBindings,
|
|
15610
15680
|
keyWithItem,
|
|
15611
15681
|
mapPreamble: args.mapPreamble,
|
|
15612
|
-
hasBindings
|
|
15682
|
+
hasBindings,
|
|
15683
|
+
indexParam: args.index
|
|
15613
15684
|
};
|
|
15614
15685
|
}
|
|
15615
15686
|
return {
|
|
@@ -15617,7 +15688,8 @@ function buildKeyedOrIndexLookup(args) {
|
|
|
15617
15688
|
arrayExpr: args.array,
|
|
15618
15689
|
param: args.param,
|
|
15619
15690
|
mapPreamble: args.mapPreamble,
|
|
15620
|
-
hasBindings
|
|
15691
|
+
hasBindings,
|
|
15692
|
+
indexParam: args.index
|
|
15621
15693
|
};
|
|
15622
15694
|
}
|
|
15623
15695
|
|
|
@@ -16660,6 +16732,13 @@ function withTurn(call, componentName, childSlotId, eventName) {
|
|
|
16660
16732
|
const id = JSON.stringify(`${componentName}#handler:${childSlotId}:${eventName}`);
|
|
16661
16733
|
return `beginTurn(${id}); try { ${call} } finally { endTurn() }`;
|
|
16662
16734
|
}
|
|
16735
|
+
function indexBindingLine(handler, indexParam, indexExpr) {
|
|
16736
|
+
if (!indexParam || indexParam === indexExpr)
|
|
16737
|
+
return null;
|
|
16738
|
+
if (!extractFreeIdentifiersFromText(handler).has(indexParam))
|
|
16739
|
+
return null;
|
|
16740
|
+
return `const ${indexParam} = ${indexExpr}`;
|
|
16741
|
+
}
|
|
16663
16742
|
function stringifyEventDelegation(lines, plan) {
|
|
16664
16743
|
const { containerVar, events, itemLookup, profileComponentName } = plan;
|
|
16665
16744
|
const eventsByName = new Map;
|
|
@@ -16705,8 +16784,9 @@ function stringifyEventDelegation(lines, plan) {
|
|
|
16705
16784
|
}
|
|
16706
16785
|
}
|
|
16707
16786
|
function emitKeyedLookup(ls, ev, handlerCall, lookup) {
|
|
16708
|
-
const { arrayExpr, param, keyWithItem, mapPreamble, hasBindings } = lookup;
|
|
16787
|
+
const { arrayExpr, param, keyWithItem, mapPreamble, hasBindings, indexParam } = lookup;
|
|
16709
16788
|
if (ev.nestedLoops.length === 0) {
|
|
16789
|
+
const idxLine2 = indexBindingLine(ev.handler, indexParam, `${arrayExpr}.findIndex(item => String(${keyWithItem}) === key)`);
|
|
16710
16790
|
ls.push(` const li = ${varSlotId(ev.childSlotId)}El.closest('[${DATA_KEY}]')`);
|
|
16711
16791
|
ls.push(` if (li) {`);
|
|
16712
16792
|
ls.push(` const key = li.getAttribute('${DATA_KEY}')`);
|
|
@@ -16716,13 +16796,18 @@ function emitKeyedLookup(ls, ev, handlerCall, lookup) {
|
|
|
16716
16796
|
ls.push(` const ${param} = __bfLoopItem`);
|
|
16717
16797
|
if (mapPreamble)
|
|
16718
16798
|
ls.push(` ${mapPreamble}`);
|
|
16799
|
+
if (idxLine2)
|
|
16800
|
+
ls.push(` ${idxLine2}`);
|
|
16719
16801
|
ls.push(` ${handlerCall}`);
|
|
16720
16802
|
ls.push(` }`);
|
|
16721
16803
|
} else {
|
|
16722
16804
|
ls.push(` const ${param} = ${arrayExpr}.find(item => String(${keyWithItem}) === key)`);
|
|
16723
16805
|
if (mapPreamble)
|
|
16724
16806
|
ls.push(` ${mapPreamble}`);
|
|
16725
|
-
|
|
16807
|
+
if (idxLine2)
|
|
16808
|
+
ls.push(` if (${param}) { ${idxLine2}; ${handlerCall} }`);
|
|
16809
|
+
else
|
|
16810
|
+
ls.push(` if (${param}) ${handlerCall}`);
|
|
16726
16811
|
}
|
|
16727
16812
|
ls.push(` }`);
|
|
16728
16813
|
return;
|
|
@@ -16751,10 +16836,15 @@ function emitKeyedLookup(ls, ev, handlerCall, lookup) {
|
|
|
16751
16836
|
const allParams = [outerGuard, ...ev.nestedLoops.map((n) => n.param)];
|
|
16752
16837
|
if (mapPreamble)
|
|
16753
16838
|
ls.push(` ${mapPreamble}`);
|
|
16754
|
-
|
|
16839
|
+
const idxLine = indexBindingLine(ev.handler, indexParam, `${arrayExpr}.findIndex(item => String(${keyWithItem}) === outerKey)`);
|
|
16840
|
+
if (idxLine)
|
|
16841
|
+
ls.push(` if (${allParams.join(" && ")}) { ${idxLine}; ${handlerCall} }`);
|
|
16842
|
+
else
|
|
16843
|
+
ls.push(` if (${allParams.join(" && ")}) ${handlerCall}`);
|
|
16755
16844
|
}
|
|
16756
16845
|
function emitDynamicIndexLookup(ls, ev, handlerCall, lookup) {
|
|
16757
|
-
const { arrayExpr, param, mapPreamble, hasBindings } = lookup;
|
|
16846
|
+
const { arrayExpr, param, mapPreamble, hasBindings, indexParam } = lookup;
|
|
16847
|
+
const idxLine = indexBindingLine(ev.handler, indexParam, "idx");
|
|
16758
16848
|
ls.push(` const li = ${varSlotId(ev.childSlotId)}El.closest('li, [bf-i]')`);
|
|
16759
16849
|
ls.push(` if (li && li.parentElement) {`);
|
|
16760
16850
|
ls.push(` const idx = Array.from(li.parentElement.children).indexOf(li)`);
|
|
@@ -16764,18 +16854,24 @@ function emitDynamicIndexLookup(ls, ev, handlerCall, lookup) {
|
|
|
16764
16854
|
ls.push(` const ${param} = __bfLoopItem`);
|
|
16765
16855
|
if (mapPreamble)
|
|
16766
16856
|
ls.push(` ${mapPreamble}`);
|
|
16857
|
+
if (idxLine)
|
|
16858
|
+
ls.push(` ${idxLine}`);
|
|
16767
16859
|
ls.push(` ${handlerCall}`);
|
|
16768
16860
|
ls.push(` }`);
|
|
16769
16861
|
} else {
|
|
16770
16862
|
ls.push(` const ${param} = ${arrayExpr}[idx]`);
|
|
16771
16863
|
if (mapPreamble)
|
|
16772
16864
|
ls.push(` ${mapPreamble}`);
|
|
16773
|
-
|
|
16865
|
+
if (idxLine)
|
|
16866
|
+
ls.push(` if (${param}) { ${idxLine}; ${handlerCall} }`);
|
|
16867
|
+
else
|
|
16868
|
+
ls.push(` if (${param}) ${handlerCall}`);
|
|
16774
16869
|
}
|
|
16775
16870
|
ls.push(` }`);
|
|
16776
16871
|
}
|
|
16777
16872
|
function emitStaticIndexLookup(ls, ev, handlerCall, lookup, containerVar) {
|
|
16778
|
-
const { arrayExpr, param, mapPreamble, offset } = lookup;
|
|
16873
|
+
const { arrayExpr, param, mapPreamble, offset, indexParam } = lookup;
|
|
16874
|
+
const idxLine = indexBindingLine(ev.handler, indexParam, "__idx");
|
|
16779
16875
|
ls.push(` let __el = ${varSlotId(ev.childSlotId)}El`);
|
|
16780
16876
|
ls.push(` while (__el.parentElement && __el.parentElement !== ${containerVar}) __el = __el.parentElement`);
|
|
16781
16877
|
ls.push(` if (__el.parentElement === ${containerVar}) {`);
|
|
@@ -16784,7 +16880,10 @@ function emitStaticIndexLookup(ls, ev, handlerCall, lookup, containerVar) {
|
|
|
16784
16880
|
ls.push(` const ${param} = ${arrayExpr}[__idx]`);
|
|
16785
16881
|
if (mapPreamble)
|
|
16786
16882
|
ls.push(` ${mapPreamble}`);
|
|
16787
|
-
|
|
16883
|
+
if (idxLine)
|
|
16884
|
+
ls.push(` if (${param}) { ${idxLine}; ${handlerCall} }`);
|
|
16885
|
+
else
|
|
16886
|
+
ls.push(` if (${param}) ${handlerCall}`);
|
|
16788
16887
|
ls.push(` }`);
|
|
16789
16888
|
}
|
|
16790
16889
|
|
|
@@ -20006,6 +20105,28 @@ export default ${this.componentName}` : "";
|
|
|
20006
20105
|
}
|
|
20007
20106
|
var testAdapter = new TestAdapter;
|
|
20008
20107
|
// src/adapters/parsed-expr-emitter.ts
|
|
20108
|
+
function isStringTypedOperand(expr, isStringName) {
|
|
20109
|
+
if (expr.kind === "literal" && expr.literalType === "string")
|
|
20110
|
+
return true;
|
|
20111
|
+
if (expr.kind === "template-literal")
|
|
20112
|
+
return true;
|
|
20113
|
+
if (expr.kind === "call" && expr.callee.kind === "identifier" && expr.args.length === 0) {
|
|
20114
|
+
return isStringName(expr.callee.name);
|
|
20115
|
+
}
|
|
20116
|
+
if (expr.kind === "member" && expr.object.kind === "identifier" && expr.object.name === "props") {
|
|
20117
|
+
return isStringName(expr.property);
|
|
20118
|
+
}
|
|
20119
|
+
if (expr.kind === "binary" && expr.op === "+") {
|
|
20120
|
+
return isStringTypedOperand(expr.left, isStringName) || isStringTypedOperand(expr.right, isStringName);
|
|
20121
|
+
}
|
|
20122
|
+
return false;
|
|
20123
|
+
}
|
|
20124
|
+
function isStringConcatBinary(op, left, right, isStringName) {
|
|
20125
|
+
return op === "+" && (isStringTypedOperand(left, isStringName) || isStringTypedOperand(right, isStringName));
|
|
20126
|
+
}
|
|
20127
|
+
function groupBinaryOperand(operand, emitted) {
|
|
20128
|
+
return operand.kind === "binary" || operand.kind === "logical" || operand.kind === "conditional" ? `(${emitted})` : emitted;
|
|
20129
|
+
}
|
|
20009
20130
|
function emitParsedExpr(expr, emitter) {
|
|
20010
20131
|
const emit = (child) => emitParsedExpr(child, emitter);
|
|
20011
20132
|
switch (expr.kind) {
|
|
@@ -20020,7 +20141,7 @@ function emitParsedExpr(expr, emitter) {
|
|
|
20020
20141
|
return emitter.call(expr.callee, expr.args, emit);
|
|
20021
20142
|
}
|
|
20022
20143
|
case "member":
|
|
20023
|
-
return emitter.member(expr.object, expr.property, expr.computed, emit);
|
|
20144
|
+
return emitter.member(expr.object, expr.property, expr.computed, expr.optional, emit);
|
|
20024
20145
|
case "index-access":
|
|
20025
20146
|
return emitter.indexAccess(expr.object, expr.index, emit);
|
|
20026
20147
|
case "binary":
|
|
@@ -23068,11 +23189,14 @@ export {
|
|
|
23068
23189
|
joinProfilerEvents,
|
|
23069
23190
|
isValidHelperId,
|
|
23070
23191
|
isSupported,
|
|
23192
|
+
isStringTypedOperand,
|
|
23193
|
+
isStringConcatBinary,
|
|
23071
23194
|
isLowerableObjectRestDestructure,
|
|
23072
23195
|
isLowerableLoopDestructure,
|
|
23073
23196
|
isBooleanAttr,
|
|
23074
23197
|
importsSearchParams,
|
|
23075
23198
|
identifierPath,
|
|
23199
|
+
groupBinaryOperand,
|
|
23076
23200
|
graphToJSON,
|
|
23077
23201
|
getLoweringPlugins,
|
|
23078
23202
|
getCompilerCounters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"collect-elements.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/collect-elements.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAoC,KAAK,MAAM,EAAmC,MAAM,aAAa,CAAA;AACzH,OAAO,KAAK,EAAE,eAAe,EAA+H,iBAAiB,EAA0B,oBAAoB,EAAc,UAAU,EAAE,MAAM,YAAY,CAAA;AAwGvQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA0C7E;AAyBD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,EAAE,wBAIpC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,cAAc,CAAC,EAAE,MAAM,EACvB,GAAG,CAAC,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,wBAAwB,GACjC,UAAU,EAAE,
|
|
1
|
+
{"version":3,"file":"collect-elements.d.ts","sourceRoot":"","sources":["../../src/ir-to-client-js/collect-elements.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,KAAK,MAAM,EAAoC,KAAK,MAAM,EAAmC,MAAM,aAAa,CAAA;AACzH,OAAO,KAAK,EAAE,eAAe,EAA+H,iBAAiB,EAA0B,oBAAoB,EAAc,UAAU,EAAE,MAAM,YAAY,CAAA;AAwGvQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+BG;AACH,wBAAgB,yBAAyB,CAAC,IAAI,EAAE,MAAM,GAAG,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,CA0C7E;AAyBD;;;;;;;;;;GAUG;AACH,MAAM,WAAW,wBAAwB;IACvC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAA;IAC7B;;;;;OAKG;IACH,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB;;;;;;;OAOG;IACH,cAAc,CAAC,EAAE,OAAO,CAAA;CACzB;AAED,4DAA4D;AAC5D,eAAO,MAAM,sBAAsB,EAAE,wBAIpC,CAAA;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,iBAAiB,CAC/B,KAAK,EAAE,MAAM,EAAE,EACf,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,cAAc,CAAC,EAAE,MAAM,EACvB,GAAG,CAAC,EAAE,eAAe,EACrB,OAAO,CAAC,EAAE,wBAAwB,GACjC,UAAU,EAAE,CA0Id;AAqKD;;;;;;;GAOG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,eAAe,EACpB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,iBAAiB,UAAQ,GACxB,IAAI,CAqPN;AA+WD;;;;;;;;;;GAUG;AAEH;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,wBAAwB,CACtC,QAAQ,EAAE,SAAS,MAAM,EAAE,EAC3B,GAAG,EAAE,eAAe,EACpB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,SAAS,EAAE,MAAM,EACjB,iBAAiB,EAAE,SAAS,OAAO,aAAa,EAAE,gBAAgB,EAAE,GAAG,SAAS,GAC/E,iBAAiB,CAUnB;AAED,wBAAgB,4BAA4B,CAC1C,IAAI,EAAE,MAAM,EACZ,GAAG,EAAE,eAAe,EACpB,cAAc,EAAE,GAAG,CAAC,MAAM,EAAE,MAAM,EAAE,CAAC,EACrC,SAAS,CAAC,EAAE,MAAM,EAClB,iBAAiB,CAAC,EAAE,SAAS,OAAO,aAAa,EAAE,gBAAgB,EAAE,GACpE,oBAAoB,EAAE,CA4DxB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"build-event-delegation.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-event-delegation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,YAAY,CAAA;AAEnB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,YAAY,EAClB,oBAAoB,CAAC,EAAE,MAAM,GAC5B,mBAAmB,
|
|
1
|
+
{"version":3,"file":"build-event-delegation.d.ts","sourceRoot":"","sources":["../../../../src/ir-to-client-js/control-flow/plan/build-event-delegation.ts"],"names":[],"mappings":"AAAA;;;;;;;;;GASG;AAEH,OAAO,KAAK,EAAE,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAE9E,OAAO,KAAK,EACV,mBAAmB,EAEpB,MAAM,YAAY,CAAA;AAEnB,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,YAAY,EAClB,oBAAoB,CAAC,EAAE,MAAM,GAC5B,mBAAmB,CAmBrB;AAKD,wBAAgB,6BAA6B,CAC3C,IAAI,EAAE,UAAU,EAChB,EAAE,EAAE,MAAM,EACV,oBAAoB,CAAC,EAAE,MAAM,GAC5B,mBAAmB,CAgBrB;AAED;;;;GAIG;AACH,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,YAAY,EAClB,oBAAoB,CAAC,EAAE,MAAM,GAC5B,mBAAmB,CAkBrB;AA0CD,YAAY,EAAE,cAAc,EAAE,CAAA"}
|