@fictjs/compiler 0.2.3 → 0.3.0
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/README.md +5 -0
- package/dist/index.cjs +1016 -429
- package/dist/index.d.cts +37 -0
- package/dist/index.d.ts +37 -0
- package/dist/index.js +1016 -429
- package/package.json +10 -10
package/dist/index.cjs
CHANGED
|
@@ -30,9 +30,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
|
|
|
30
30
|
));
|
|
31
31
|
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
32
32
|
|
|
33
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
33
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/shallowEqual.js
|
|
34
34
|
var require_shallowEqual = __commonJS({
|
|
35
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
35
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/shallowEqual.js"(exports2) {
|
|
36
36
|
"use strict";
|
|
37
37
|
Object.defineProperty(exports2, "__esModule", {
|
|
38
38
|
value: true
|
|
@@ -50,9 +50,9 @@ var require_shallowEqual = __commonJS({
|
|
|
50
50
|
}
|
|
51
51
|
});
|
|
52
52
|
|
|
53
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
53
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/deprecationWarning.js
|
|
54
54
|
var require_deprecationWarning = __commonJS({
|
|
55
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
55
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/deprecationWarning.js"(exports2) {
|
|
56
56
|
"use strict";
|
|
57
57
|
Object.defineProperty(exports2, "__esModule", {
|
|
58
58
|
value: true
|
|
@@ -98,9 +98,9 @@ ${trace}`);
|
|
|
98
98
|
}
|
|
99
99
|
});
|
|
100
100
|
|
|
101
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
101
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/generated/index.js
|
|
102
102
|
var require_generated = __commonJS({
|
|
103
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
103
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/generated/index.js"(exports2) {
|
|
104
104
|
"use strict";
|
|
105
105
|
Object.defineProperty(exports2, "__esModule", {
|
|
106
106
|
value: true
|
|
@@ -2898,9 +2898,9 @@ var require_generated = __commonJS({
|
|
|
2898
2898
|
}
|
|
2899
2899
|
});
|
|
2900
2900
|
|
|
2901
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
2901
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/matchesPattern.js
|
|
2902
2902
|
var require_matchesPattern = __commonJS({
|
|
2903
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
2903
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/matchesPattern.js"(exports2) {
|
|
2904
2904
|
"use strict";
|
|
2905
2905
|
Object.defineProperty(exports2, "__esModule", {
|
|
2906
2906
|
value: true
|
|
@@ -2945,9 +2945,9 @@ var require_matchesPattern = __commonJS({
|
|
|
2945
2945
|
}
|
|
2946
2946
|
});
|
|
2947
2947
|
|
|
2948
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
2948
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js
|
|
2949
2949
|
var require_buildMatchMemberExpression = __commonJS({
|
|
2950
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
2950
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/buildMatchMemberExpression.js"(exports2) {
|
|
2951
2951
|
"use strict";
|
|
2952
2952
|
Object.defineProperty(exports2, "__esModule", {
|
|
2953
2953
|
value: true
|
|
@@ -2961,9 +2961,9 @@ var require_buildMatchMemberExpression = __commonJS({
|
|
|
2961
2961
|
}
|
|
2962
2962
|
});
|
|
2963
2963
|
|
|
2964
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
2964
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isReactComponent.js
|
|
2965
2965
|
var require_isReactComponent = __commonJS({
|
|
2966
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
2966
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isReactComponent.js"(exports2) {
|
|
2967
2967
|
"use strict";
|
|
2968
2968
|
Object.defineProperty(exports2, "__esModule", {
|
|
2969
2969
|
value: true
|
|
@@ -2975,9 +2975,9 @@ var require_isReactComponent = __commonJS({
|
|
|
2975
2975
|
}
|
|
2976
2976
|
});
|
|
2977
2977
|
|
|
2978
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
2978
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isCompatTag.js
|
|
2979
2979
|
var require_isCompatTag = __commonJS({
|
|
2980
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
2980
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/react/isCompatTag.js"(exports2) {
|
|
2981
2981
|
"use strict";
|
|
2982
2982
|
Object.defineProperty(exports2, "__esModule", {
|
|
2983
2983
|
value: true
|
|
@@ -2989,9 +2989,9 @@ var require_isCompatTag = __commonJS({
|
|
|
2989
2989
|
}
|
|
2990
2990
|
});
|
|
2991
2991
|
|
|
2992
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
2992
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isType.js
|
|
2993
2993
|
var require_isType = __commonJS({
|
|
2994
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
2994
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isType.js"(exports2) {
|
|
2995
2995
|
"use strict";
|
|
2996
2996
|
Object.defineProperty(exports2, "__esModule", {
|
|
2997
2997
|
value: true
|
|
@@ -3009,9 +3009,9 @@ var require_isType = __commonJS({
|
|
|
3009
3009
|
}
|
|
3010
3010
|
});
|
|
3011
3011
|
|
|
3012
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3012
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isPlaceholderType.js
|
|
3013
3013
|
var require_isPlaceholderType = __commonJS({
|
|
3014
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3014
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isPlaceholderType.js"(exports2) {
|
|
3015
3015
|
"use strict";
|
|
3016
3016
|
Object.defineProperty(exports2, "__esModule", {
|
|
3017
3017
|
value: true
|
|
@@ -3027,9 +3027,9 @@ var require_isPlaceholderType = __commonJS({
|
|
|
3027
3027
|
}
|
|
3028
3028
|
});
|
|
3029
3029
|
|
|
3030
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3030
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/is.js
|
|
3031
3031
|
var require_is = __commonJS({
|
|
3032
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3032
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/is.js"(exports2) {
|
|
3033
3033
|
"use strict";
|
|
3034
3034
|
Object.defineProperty(exports2, "__esModule", {
|
|
3035
3035
|
value: true
|
|
@@ -3228,9 +3228,9 @@ var require_lib = __commonJS({
|
|
|
3228
3228
|
}
|
|
3229
3229
|
});
|
|
3230
3230
|
|
|
3231
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3231
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidIdentifier.js
|
|
3232
3232
|
var require_isValidIdentifier = __commonJS({
|
|
3233
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3233
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidIdentifier.js"(exports2) {
|
|
3234
3234
|
"use strict";
|
|
3235
3235
|
Object.defineProperty(exports2, "__esModule", {
|
|
3236
3236
|
value: true
|
|
@@ -3545,9 +3545,9 @@ var require_lib2 = __commonJS({
|
|
|
3545
3545
|
}
|
|
3546
3546
|
});
|
|
3547
3547
|
|
|
3548
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3548
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/index.js
|
|
3549
3549
|
var require_constants = __commonJS({
|
|
3550
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3550
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/index.js"(exports2) {
|
|
3551
3551
|
"use strict";
|
|
3552
3552
|
Object.defineProperty(exports2, "__esModule", {
|
|
3553
3553
|
value: true
|
|
@@ -3574,16 +3574,14 @@ var require_constants = __commonJS({
|
|
|
3574
3574
|
optional: ["typeAnnotation", "typeParameters", "returnType"],
|
|
3575
3575
|
force: ["start", "loc", "end"]
|
|
3576
3576
|
};
|
|
3577
|
-
|
|
3578
|
-
|
|
3579
|
-
exports2.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
|
|
3580
|
-
}
|
|
3577
|
+
exports2.BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
|
3578
|
+
exports2.NOT_LOCAL_BINDING = Symbol.for("should not be considered a local binding");
|
|
3581
3579
|
}
|
|
3582
3580
|
});
|
|
3583
3581
|
|
|
3584
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3582
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/utils.js
|
|
3585
3583
|
var require_utils = __commonJS({
|
|
3586
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3584
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/utils.js"(exports2) {
|
|
3587
3585
|
"use strict";
|
|
3588
3586
|
Object.defineProperty(exports2, "__esModule", {
|
|
3589
3587
|
value: true
|
|
@@ -3882,9 +3880,9 @@ ${errors.join("\n")}`);
|
|
|
3882
3880
|
}
|
|
3883
3881
|
});
|
|
3884
3882
|
|
|
3885
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
3883
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/core.js
|
|
3886
3884
|
var require_core = __commonJS({
|
|
3887
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
3885
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/core.js"(exports2) {
|
|
3888
3886
|
"use strict";
|
|
3889
3887
|
Object.defineProperty(exports2, "__esModule", {
|
|
3890
3888
|
value: true
|
|
@@ -4353,8 +4351,6 @@ var require_core = __commonJS({
|
|
|
4353
4351
|
validate: (0, _utils.chain)((0, _utils.assertValueType)("number"), Object.assign(function(node, key, val) {
|
|
4354
4352
|
if (1 / val < 0 || !Number.isFinite(val)) {
|
|
4355
4353
|
const error = new Error(`NumericLiterals must be non-negative finite numbers. You can use t.valueToNode(${val}) instead.`);
|
|
4356
|
-
{
|
|
4357
|
-
}
|
|
4358
4354
|
}
|
|
4359
4355
|
}, {
|
|
4360
4356
|
type: "number"
|
|
@@ -4962,13 +4958,13 @@ var require_core = __commonJS({
|
|
|
4962
4958
|
attributes: {
|
|
4963
4959
|
optional: true,
|
|
4964
4960
|
validate: (0, _utils.arrayOfType)("ImportAttribute")
|
|
4965
|
-
},
|
|
4966
|
-
assertions: {
|
|
4967
|
-
deprecated: true,
|
|
4968
|
-
optional: true,
|
|
4969
|
-
validate: (0, _utils.arrayOfType)("ImportAttribute")
|
|
4970
4961
|
}
|
|
4971
4962
|
};
|
|
4963
|
+
importAttributes.assertions = {
|
|
4964
|
+
deprecated: true,
|
|
4965
|
+
optional: true,
|
|
4966
|
+
validate: (0, _utils.arrayOfType)("ImportAttribute")
|
|
4967
|
+
};
|
|
4972
4968
|
defineType("ExportAllDeclaration", {
|
|
4973
4969
|
builder: ["source"],
|
|
4974
4970
|
visitor: ["source", "attributes", "assertions"],
|
|
@@ -5615,9 +5611,9 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
5615
5611
|
}
|
|
5616
5612
|
});
|
|
5617
5613
|
|
|
5618
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
5614
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/flow.js
|
|
5619
5615
|
var require_flow = __commonJS({
|
|
5620
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
5616
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/flow.js"() {
|
|
5621
5617
|
"use strict";
|
|
5622
5618
|
var _core = require_core();
|
|
5623
5619
|
var _utils = require_utils();
|
|
@@ -6113,9 +6109,9 @@ var require_flow = __commonJS({
|
|
|
6113
6109
|
}
|
|
6114
6110
|
});
|
|
6115
6111
|
|
|
6116
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6112
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/jsx.js
|
|
6117
6113
|
var require_jsx = __commonJS({
|
|
6118
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6114
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/jsx.js"() {
|
|
6119
6115
|
"use strict";
|
|
6120
6116
|
var _utils = require_utils();
|
|
6121
6117
|
var defineType = (0, _utils.defineAliasedType)("JSX");
|
|
@@ -6273,9 +6269,9 @@ var require_jsx = __commonJS({
|
|
|
6273
6269
|
}
|
|
6274
6270
|
});
|
|
6275
6271
|
|
|
6276
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6272
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/placeholders.js
|
|
6277
6273
|
var require_placeholders = __commonJS({
|
|
6278
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6274
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/placeholders.js"(exports2) {
|
|
6279
6275
|
"use strict";
|
|
6280
6276
|
Object.defineProperty(exports2, "__esModule", {
|
|
6281
6277
|
value: true
|
|
@@ -6303,19 +6299,17 @@ var require_placeholders = __commonJS({
|
|
|
6303
6299
|
}
|
|
6304
6300
|
});
|
|
6305
6301
|
|
|
6306
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6302
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/misc.js
|
|
6307
6303
|
var require_misc = __commonJS({
|
|
6308
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6304
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/misc.js"() {
|
|
6309
6305
|
"use strict";
|
|
6310
6306
|
var _utils = require_utils();
|
|
6311
6307
|
var _placeholders = require_placeholders();
|
|
6312
6308
|
var _core = require_core();
|
|
6313
6309
|
var defineType = (0, _utils.defineAliasedType)("Miscellaneous");
|
|
6314
|
-
{
|
|
6315
|
-
|
|
6316
|
-
|
|
6317
|
-
});
|
|
6318
|
-
}
|
|
6310
|
+
defineType("Noop", {
|
|
6311
|
+
visitor: []
|
|
6312
|
+
});
|
|
6319
6313
|
defineType("Placeholder", {
|
|
6320
6314
|
visitor: [],
|
|
6321
6315
|
builder: ["expectedNode", "name"],
|
|
@@ -6339,9 +6333,9 @@ var require_misc = __commonJS({
|
|
|
6339
6333
|
}
|
|
6340
6334
|
});
|
|
6341
6335
|
|
|
6342
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6336
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/experimental.js
|
|
6343
6337
|
var require_experimental = __commonJS({
|
|
6344
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6338
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/experimental.js"() {
|
|
6345
6339
|
"use strict";
|
|
6346
6340
|
var _utils = require_utils();
|
|
6347
6341
|
(0, _utils.default)("ArgumentPlaceholder", {});
|
|
@@ -6418,17 +6412,15 @@ var require_experimental = __commonJS({
|
|
|
6418
6412
|
visitor: ["elements"],
|
|
6419
6413
|
aliases: ["Expression"]
|
|
6420
6414
|
});
|
|
6421
|
-
{
|
|
6422
|
-
|
|
6423
|
-
|
|
6424
|
-
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6429
|
-
|
|
6430
|
-
});
|
|
6431
|
-
}
|
|
6415
|
+
(0, _utils.default)("DecimalLiteral", {
|
|
6416
|
+
builder: ["value"],
|
|
6417
|
+
fields: {
|
|
6418
|
+
value: {
|
|
6419
|
+
validate: (0, _utils.assertValueType)("string")
|
|
6420
|
+
}
|
|
6421
|
+
},
|
|
6422
|
+
aliases: ["Expression", "Pureish", "Literal", "Immutable"]
|
|
6423
|
+
});
|
|
6432
6424
|
(0, _utils.default)("ModuleExpression", {
|
|
6433
6425
|
visitor: ["body"],
|
|
6434
6426
|
fields: {
|
|
@@ -6470,9 +6462,9 @@ var require_experimental = __commonJS({
|
|
|
6470
6462
|
}
|
|
6471
6463
|
});
|
|
6472
6464
|
|
|
6473
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6465
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/typescript.js
|
|
6474
6466
|
var require_typescript = __commonJS({
|
|
6475
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6467
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/typescript.js"() {
|
|
6476
6468
|
"use strict";
|
|
6477
6469
|
var _utils = require_utils();
|
|
6478
6470
|
var _core = require_core();
|
|
@@ -6784,16 +6776,14 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
6784
6776
|
}
|
|
6785
6777
|
}
|
|
6786
6778
|
});
|
|
6787
|
-
{
|
|
6788
|
-
|
|
6789
|
-
|
|
6790
|
-
|
|
6791
|
-
|
|
6792
|
-
|
|
6793
|
-
|
|
6794
|
-
|
|
6795
|
-
});
|
|
6796
|
-
}
|
|
6779
|
+
defineType("TSExpressionWithTypeArguments", {
|
|
6780
|
+
aliases: ["TSType"],
|
|
6781
|
+
visitor: ["expression", "typeParameters"],
|
|
6782
|
+
fields: {
|
|
6783
|
+
expression: (0, _utils.validateType)("TSEntityName"),
|
|
6784
|
+
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
|
|
6785
|
+
}
|
|
6786
|
+
});
|
|
6797
6787
|
defineType("TSInterfaceDeclaration", {
|
|
6798
6788
|
aliases: ["Statement", "Declaration"],
|
|
6799
6789
|
visitor: ["id", "typeParameters", "extends", "body"],
|
|
@@ -6853,20 +6843,18 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
6853
6843
|
members: (0, _utils.validateArrayOfType)("TSEnumMember")
|
|
6854
6844
|
}
|
|
6855
6845
|
});
|
|
6856
|
-
{
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
6861
|
-
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
});
|
|
6869
|
-
}
|
|
6846
|
+
defineType("TSEnumDeclaration", {
|
|
6847
|
+
aliases: ["Statement", "Declaration"],
|
|
6848
|
+
visitor: ["id", "members"],
|
|
6849
|
+
fields: {
|
|
6850
|
+
declare: (0, _utils.validateOptional)(bool),
|
|
6851
|
+
const: (0, _utils.validateOptional)(bool),
|
|
6852
|
+
id: (0, _utils.validateType)("Identifier"),
|
|
6853
|
+
members: (0, _utils.validateArrayOfType)("TSEnumMember"),
|
|
6854
|
+
initializer: (0, _utils.validateOptionalType)("Expression"),
|
|
6855
|
+
body: (0, _utils.validateOptionalType)("TSEnumBody")
|
|
6856
|
+
}
|
|
6857
|
+
});
|
|
6870
6858
|
defineType("TSEnumMember", {
|
|
6871
6859
|
visitor: ["id", "initializer"],
|
|
6872
6860
|
fields: {
|
|
@@ -6900,15 +6888,18 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
6900
6888
|
aliases: ["TSType"],
|
|
6901
6889
|
builder: ["argument", "qualifier", "typeParameters"],
|
|
6902
6890
|
visitor: ["argument", "options", "qualifier", "typeParameters"],
|
|
6903
|
-
fields: {
|
|
6904
|
-
argument: (0, _utils.validateType)("StringLiteral")
|
|
6905
|
-
|
|
6906
|
-
|
|
6891
|
+
fields: Object.assign({}, {
|
|
6892
|
+
argument: (0, _utils.validateType)("StringLiteral")
|
|
6893
|
+
}, {
|
|
6894
|
+
qualifier: (0, _utils.validateOptionalType)("TSEntityName")
|
|
6895
|
+
}, {
|
|
6896
|
+
typeParameters: (0, _utils.validateOptionalType)("TSTypeParameterInstantiation")
|
|
6897
|
+
}, {
|
|
6907
6898
|
options: {
|
|
6908
6899
|
validate: (0, _utils.assertNodeType)("ObjectExpression"),
|
|
6909
6900
|
optional: true
|
|
6910
6901
|
}
|
|
6911
|
-
}
|
|
6902
|
+
})
|
|
6912
6903
|
});
|
|
6913
6904
|
defineType("TSImportEqualsDeclaration", {
|
|
6914
6905
|
aliases: ["Statement", "Declaration"],
|
|
@@ -7003,9 +6994,9 @@ Expected ${val.length + 1} quasis but got ${node.quasis.length}`);
|
|
|
7003
6994
|
}
|
|
7004
6995
|
});
|
|
7005
6996
|
|
|
7006
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
6997
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/deprecated-aliases.js
|
|
7007
6998
|
var require_deprecated_aliases = __commonJS({
|
|
7008
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
6999
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/deprecated-aliases.js"(exports2) {
|
|
7009
7000
|
"use strict";
|
|
7010
7001
|
Object.defineProperty(exports2, "__esModule", {
|
|
7011
7002
|
value: true
|
|
@@ -7017,9 +7008,9 @@ var require_deprecated_aliases = __commonJS({
|
|
|
7017
7008
|
}
|
|
7018
7009
|
});
|
|
7019
7010
|
|
|
7020
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
7011
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/index.js
|
|
7021
7012
|
var require_definitions = __commonJS({
|
|
7022
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
7013
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/definitions/index.js"(exports2) {
|
|
7023
7014
|
"use strict";
|
|
7024
7015
|
Object.defineProperty(exports2, "__esModule", {
|
|
7025
7016
|
value: true
|
|
@@ -7126,9 +7117,9 @@ var require_definitions = __commonJS({
|
|
|
7126
7117
|
}
|
|
7127
7118
|
});
|
|
7128
7119
|
|
|
7129
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
7120
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/validate.js
|
|
7130
7121
|
var require_validate = __commonJS({
|
|
7131
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
7122
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/validate.js"(exports2) {
|
|
7132
7123
|
"use strict";
|
|
7133
7124
|
Object.defineProperty(exports2, "__esModule", {
|
|
7134
7125
|
value: true
|
|
@@ -7171,9 +7162,9 @@ var require_validate = __commonJS({
|
|
|
7171
7162
|
}
|
|
7172
7163
|
});
|
|
7173
7164
|
|
|
7174
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
7165
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/lowercase.js
|
|
7175
7166
|
var require_lowercase = __commonJS({
|
|
7176
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
7167
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/lowercase.js"(exports2) {
|
|
7177
7168
|
"use strict";
|
|
7178
7169
|
Object.defineProperty(exports2, "__esModule", {
|
|
7179
7170
|
value: true
|
|
@@ -10070,9 +10061,9 @@ var require_lowercase = __commonJS({
|
|
|
10070
10061
|
}
|
|
10071
10062
|
});
|
|
10072
10063
|
|
|
10073
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10064
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/uppercase.js
|
|
10074
10065
|
var require_uppercase = __commonJS({
|
|
10075
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10066
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/uppercase.js"(exports2) {
|
|
10076
10067
|
"use strict";
|
|
10077
10068
|
Object.defineProperty(exports2, "__esModule", {
|
|
10078
10069
|
value: true
|
|
@@ -10083,9 +10074,7 @@ var require_uppercase = __commonJS({
|
|
|
10083
10074
|
var b = require_lowercase();
|
|
10084
10075
|
var _deprecationWarning = require_deprecationWarning();
|
|
10085
10076
|
function alias(lowercase) {
|
|
10086
|
-
|
|
10087
|
-
return b[lowercase];
|
|
10088
|
-
}
|
|
10077
|
+
return b[lowercase];
|
|
10089
10078
|
}
|
|
10090
10079
|
var ArrayExpression = exports2.ArrayExpression = alias("arrayExpression");
|
|
10091
10080
|
var AssignmentExpression = exports2.AssignmentExpression = alias("assignmentExpression");
|
|
@@ -10347,9 +10336,9 @@ var require_uppercase = __commonJS({
|
|
|
10347
10336
|
}
|
|
10348
10337
|
});
|
|
10349
10338
|
|
|
10350
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10339
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/index.js
|
|
10351
10340
|
var require_generated2 = __commonJS({
|
|
10352
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10341
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/generated/index.js"(exports2) {
|
|
10353
10342
|
"use strict";
|
|
10354
10343
|
Object.defineProperty(exports2, "__esModule", {
|
|
10355
10344
|
value: true
|
|
@@ -10379,9 +10368,9 @@ var require_generated2 = __commonJS({
|
|
|
10379
10368
|
}
|
|
10380
10369
|
});
|
|
10381
10370
|
|
|
10382
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10371
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js
|
|
10383
10372
|
var require_cleanJSXElementLiteralChild = __commonJS({
|
|
10384
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10373
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/react/cleanJSXElementLiteralChild.js"(exports2) {
|
|
10385
10374
|
"use strict";
|
|
10386
10375
|
Object.defineProperty(exports2, "__esModule", {
|
|
10387
10376
|
value: true
|
|
@@ -10422,9 +10411,9 @@ var require_cleanJSXElementLiteralChild = __commonJS({
|
|
|
10422
10411
|
}
|
|
10423
10412
|
});
|
|
10424
10413
|
|
|
10425
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10414
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/react/buildChildren.js
|
|
10426
10415
|
var require_buildChildren = __commonJS({
|
|
10427
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10416
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/react/buildChildren.js"(exports2) {
|
|
10428
10417
|
"use strict";
|
|
10429
10418
|
Object.defineProperty(exports2, "__esModule", {
|
|
10430
10419
|
value: true
|
|
@@ -10449,9 +10438,9 @@ var require_buildChildren = __commonJS({
|
|
|
10449
10438
|
}
|
|
10450
10439
|
});
|
|
10451
10440
|
|
|
10452
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10441
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNode.js
|
|
10453
10442
|
var require_isNode = __commonJS({
|
|
10454
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10443
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNode.js"(exports2) {
|
|
10455
10444
|
"use strict";
|
|
10456
10445
|
Object.defineProperty(exports2, "__esModule", {
|
|
10457
10446
|
value: true
|
|
@@ -10464,9 +10453,9 @@ var require_isNode = __commonJS({
|
|
|
10464
10453
|
}
|
|
10465
10454
|
});
|
|
10466
10455
|
|
|
10467
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10456
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/assertNode.js
|
|
10468
10457
|
var require_assertNode = __commonJS({
|
|
10469
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10458
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/assertNode.js"(exports2) {
|
|
10470
10459
|
"use strict";
|
|
10471
10460
|
Object.defineProperty(exports2, "__esModule", {
|
|
10472
10461
|
value: true
|
|
@@ -10483,9 +10472,9 @@ var require_assertNode = __commonJS({
|
|
|
10483
10472
|
}
|
|
10484
10473
|
});
|
|
10485
10474
|
|
|
10486
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
10475
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/generated/index.js
|
|
10487
10476
|
var require_generated3 = __commonJS({
|
|
10488
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
10477
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/asserts/generated/index.js"(exports2) {
|
|
10489
10478
|
"use strict";
|
|
10490
10479
|
Object.defineProperty(exports2, "__esModule", {
|
|
10491
10480
|
value: true
|
|
@@ -11737,9 +11726,9 @@ var require_generated3 = __commonJS({
|
|
|
11737
11726
|
}
|
|
11738
11727
|
});
|
|
11739
11728
|
|
|
11740
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11729
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js
|
|
11741
11730
|
var require_createTypeAnnotationBasedOnTypeof = __commonJS({
|
|
11742
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11731
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createTypeAnnotationBasedOnTypeof.js"(exports2) {
|
|
11743
11732
|
"use strict";
|
|
11744
11733
|
Object.defineProperty(exports2, "__esModule", {
|
|
11745
11734
|
value: true
|
|
@@ -11771,9 +11760,9 @@ var require_createTypeAnnotationBasedOnTypeof = __commonJS({
|
|
|
11771
11760
|
}
|
|
11772
11761
|
});
|
|
11773
11762
|
|
|
11774
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11763
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js
|
|
11775
11764
|
var require_removeTypeDuplicates = __commonJS({
|
|
11776
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11765
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/flow/removeTypeDuplicates.js"(exports2) {
|
|
11777
11766
|
"use strict";
|
|
11778
11767
|
Object.defineProperty(exports2, "__esModule", {
|
|
11779
11768
|
value: true
|
|
@@ -11839,9 +11828,9 @@ var require_removeTypeDuplicates = __commonJS({
|
|
|
11839
11828
|
}
|
|
11840
11829
|
});
|
|
11841
11830
|
|
|
11842
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11831
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js
|
|
11843
11832
|
var require_createFlowUnionType = __commonJS({
|
|
11844
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11833
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/flow/createFlowUnionType.js"(exports2) {
|
|
11845
11834
|
"use strict";
|
|
11846
11835
|
Object.defineProperty(exports2, "__esModule", {
|
|
11847
11836
|
value: true
|
|
@@ -11860,9 +11849,9 @@ var require_createFlowUnionType = __commonJS({
|
|
|
11860
11849
|
}
|
|
11861
11850
|
});
|
|
11862
11851
|
|
|
11863
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11852
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js
|
|
11864
11853
|
var require_removeTypeDuplicates2 = __commonJS({
|
|
11865
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11854
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/typescript/removeTypeDuplicates.js"(exports2) {
|
|
11866
11855
|
"use strict";
|
|
11867
11856
|
Object.defineProperty(exports2, "__esModule", {
|
|
11868
11857
|
value: true
|
|
@@ -11929,9 +11918,9 @@ var require_removeTypeDuplicates2 = __commonJS({
|
|
|
11929
11918
|
}
|
|
11930
11919
|
});
|
|
11931
11920
|
|
|
11932
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11921
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js
|
|
11933
11922
|
var require_createTSUnionType = __commonJS({
|
|
11934
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11923
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/typescript/createTSUnionType.js"(exports2) {
|
|
11935
11924
|
"use strict";
|
|
11936
11925
|
Object.defineProperty(exports2, "__esModule", {
|
|
11937
11926
|
value: true
|
|
@@ -11954,9 +11943,9 @@ var require_createTSUnionType = __commonJS({
|
|
|
11954
11943
|
}
|
|
11955
11944
|
});
|
|
11956
11945
|
|
|
11957
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11946
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/productions.js
|
|
11958
11947
|
var require_productions = __commonJS({
|
|
11959
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11948
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/builders/productions.js"(exports2) {
|
|
11960
11949
|
"use strict";
|
|
11961
11950
|
Object.defineProperty(exports2, "__esModule", {
|
|
11962
11951
|
value: true
|
|
@@ -11969,9 +11958,9 @@ var require_productions = __commonJS({
|
|
|
11969
11958
|
}
|
|
11970
11959
|
});
|
|
11971
11960
|
|
|
11972
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
11961
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneNode.js
|
|
11973
11962
|
var require_cloneNode = __commonJS({
|
|
11974
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
11963
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneNode.js"(exports2) {
|
|
11975
11964
|
"use strict";
|
|
11976
11965
|
Object.defineProperty(exports2, "__esModule", {
|
|
11977
11966
|
value: true
|
|
@@ -12079,9 +12068,9 @@ var require_cloneNode = __commonJS({
|
|
|
12079
12068
|
}
|
|
12080
12069
|
});
|
|
12081
12070
|
|
|
12082
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12071
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/clone.js
|
|
12083
12072
|
var require_clone = __commonJS({
|
|
12084
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12073
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/clone.js"(exports2) {
|
|
12085
12074
|
"use strict";
|
|
12086
12075
|
Object.defineProperty(exports2, "__esModule", {
|
|
12087
12076
|
value: true
|
|
@@ -12094,9 +12083,9 @@ var require_clone = __commonJS({
|
|
|
12094
12083
|
}
|
|
12095
12084
|
});
|
|
12096
12085
|
|
|
12097
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12086
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeep.js
|
|
12098
12087
|
var require_cloneDeep = __commonJS({
|
|
12099
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12088
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeep.js"(exports2) {
|
|
12100
12089
|
"use strict";
|
|
12101
12090
|
Object.defineProperty(exports2, "__esModule", {
|
|
12102
12091
|
value: true
|
|
@@ -12109,9 +12098,9 @@ var require_cloneDeep = __commonJS({
|
|
|
12109
12098
|
}
|
|
12110
12099
|
});
|
|
12111
12100
|
|
|
12112
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12101
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js
|
|
12113
12102
|
var require_cloneDeepWithoutLoc = __commonJS({
|
|
12114
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12103
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneDeepWithoutLoc.js"(exports2) {
|
|
12115
12104
|
"use strict";
|
|
12116
12105
|
Object.defineProperty(exports2, "__esModule", {
|
|
12117
12106
|
value: true
|
|
@@ -12124,9 +12113,9 @@ var require_cloneDeepWithoutLoc = __commonJS({
|
|
|
12124
12113
|
}
|
|
12125
12114
|
});
|
|
12126
12115
|
|
|
12127
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12116
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js
|
|
12128
12117
|
var require_cloneWithoutLoc = __commonJS({
|
|
12129
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12118
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/clone/cloneWithoutLoc.js"(exports2) {
|
|
12130
12119
|
"use strict";
|
|
12131
12120
|
Object.defineProperty(exports2, "__esModule", {
|
|
12132
12121
|
value: true
|
|
@@ -12139,9 +12128,9 @@ var require_cloneWithoutLoc = __commonJS({
|
|
|
12139
12128
|
}
|
|
12140
12129
|
});
|
|
12141
12130
|
|
|
12142
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12131
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComments.js
|
|
12143
12132
|
var require_addComments = __commonJS({
|
|
12144
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12133
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComments.js"(exports2) {
|
|
12145
12134
|
"use strict";
|
|
12146
12135
|
Object.defineProperty(exports2, "__esModule", {
|
|
12147
12136
|
value: true
|
|
@@ -12164,9 +12153,9 @@ var require_addComments = __commonJS({
|
|
|
12164
12153
|
}
|
|
12165
12154
|
});
|
|
12166
12155
|
|
|
12167
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12156
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComment.js
|
|
12168
12157
|
var require_addComment = __commonJS({
|
|
12169
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12158
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/addComment.js"(exports2) {
|
|
12170
12159
|
"use strict";
|
|
12171
12160
|
Object.defineProperty(exports2, "__esModule", {
|
|
12172
12161
|
value: true
|
|
@@ -12182,9 +12171,9 @@ var require_addComment = __commonJS({
|
|
|
12182
12171
|
}
|
|
12183
12172
|
});
|
|
12184
12173
|
|
|
12185
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12174
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/inherit.js
|
|
12186
12175
|
var require_inherit = __commonJS({
|
|
12187
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12176
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/utils/inherit.js"(exports2) {
|
|
12188
12177
|
"use strict";
|
|
12189
12178
|
Object.defineProperty(exports2, "__esModule", {
|
|
12190
12179
|
value: true
|
|
@@ -12198,9 +12187,9 @@ var require_inherit = __commonJS({
|
|
|
12198
12187
|
}
|
|
12199
12188
|
});
|
|
12200
12189
|
|
|
12201
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12190
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritInnerComments.js
|
|
12202
12191
|
var require_inheritInnerComments = __commonJS({
|
|
12203
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12192
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritInnerComments.js"(exports2) {
|
|
12204
12193
|
"use strict";
|
|
12205
12194
|
Object.defineProperty(exports2, "__esModule", {
|
|
12206
12195
|
value: true
|
|
@@ -12213,9 +12202,9 @@ var require_inheritInnerComments = __commonJS({
|
|
|
12213
12202
|
}
|
|
12214
12203
|
});
|
|
12215
12204
|
|
|
12216
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12205
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritLeadingComments.js
|
|
12217
12206
|
var require_inheritLeadingComments = __commonJS({
|
|
12218
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12207
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritLeadingComments.js"(exports2) {
|
|
12219
12208
|
"use strict";
|
|
12220
12209
|
Object.defineProperty(exports2, "__esModule", {
|
|
12221
12210
|
value: true
|
|
@@ -12228,9 +12217,9 @@ var require_inheritLeadingComments = __commonJS({
|
|
|
12228
12217
|
}
|
|
12229
12218
|
});
|
|
12230
12219
|
|
|
12231
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12220
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritTrailingComments.js
|
|
12232
12221
|
var require_inheritTrailingComments = __commonJS({
|
|
12233
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12222
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritTrailingComments.js"(exports2) {
|
|
12234
12223
|
"use strict";
|
|
12235
12224
|
Object.defineProperty(exports2, "__esModule", {
|
|
12236
12225
|
value: true
|
|
@@ -12243,9 +12232,9 @@ var require_inheritTrailingComments = __commonJS({
|
|
|
12243
12232
|
}
|
|
12244
12233
|
});
|
|
12245
12234
|
|
|
12246
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12235
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritsComments.js
|
|
12247
12236
|
var require_inheritsComments = __commonJS({
|
|
12248
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12237
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/inheritsComments.js"(exports2) {
|
|
12249
12238
|
"use strict";
|
|
12250
12239
|
Object.defineProperty(exports2, "__esModule", {
|
|
12251
12240
|
value: true
|
|
@@ -12263,9 +12252,9 @@ var require_inheritsComments = __commonJS({
|
|
|
12263
12252
|
}
|
|
12264
12253
|
});
|
|
12265
12254
|
|
|
12266
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12255
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/removeComments.js
|
|
12267
12256
|
var require_removeComments = __commonJS({
|
|
12268
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12257
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/comments/removeComments.js"(exports2) {
|
|
12269
12258
|
"use strict";
|
|
12270
12259
|
Object.defineProperty(exports2, "__esModule", {
|
|
12271
12260
|
value: true
|
|
@@ -12281,9 +12270,9 @@ var require_removeComments = __commonJS({
|
|
|
12281
12270
|
}
|
|
12282
12271
|
});
|
|
12283
12272
|
|
|
12284
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12273
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/generated/index.js
|
|
12285
12274
|
var require_generated4 = __commonJS({
|
|
12286
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12275
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/constants/generated/index.js"(exports2) {
|
|
12287
12276
|
"use strict";
|
|
12288
12277
|
Object.defineProperty(exports2, "__esModule", {
|
|
12289
12278
|
value: true
|
|
@@ -12344,9 +12333,9 @@ var require_generated4 = __commonJS({
|
|
|
12344
12333
|
}
|
|
12345
12334
|
});
|
|
12346
12335
|
|
|
12347
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12336
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBlock.js
|
|
12348
12337
|
var require_toBlock = __commonJS({
|
|
12349
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12338
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBlock.js"(exports2) {
|
|
12350
12339
|
"use strict";
|
|
12351
12340
|
Object.defineProperty(exports2, "__esModule", {
|
|
12352
12341
|
value: true
|
|
@@ -12376,9 +12365,9 @@ var require_toBlock = __commonJS({
|
|
|
12376
12365
|
}
|
|
12377
12366
|
});
|
|
12378
12367
|
|
|
12379
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12368
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/ensureBlock.js
|
|
12380
12369
|
var require_ensureBlock = __commonJS({
|
|
12381
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12370
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/ensureBlock.js"(exports2) {
|
|
12382
12371
|
"use strict";
|
|
12383
12372
|
Object.defineProperty(exports2, "__esModule", {
|
|
12384
12373
|
value: true
|
|
@@ -12393,9 +12382,9 @@ var require_ensureBlock = __commonJS({
|
|
|
12393
12382
|
}
|
|
12394
12383
|
});
|
|
12395
12384
|
|
|
12396
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12385
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toIdentifier.js
|
|
12397
12386
|
var require_toIdentifier = __commonJS({
|
|
12398
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12387
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toIdentifier.js"(exports2) {
|
|
12399
12388
|
"use strict";
|
|
12400
12389
|
Object.defineProperty(exports2, "__esModule", {
|
|
12401
12390
|
value: true
|
|
@@ -12421,9 +12410,9 @@ var require_toIdentifier = __commonJS({
|
|
|
12421
12410
|
}
|
|
12422
12411
|
});
|
|
12423
12412
|
|
|
12424
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12413
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js
|
|
12425
12414
|
var require_toBindingIdentifierName = __commonJS({
|
|
12426
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12415
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toBindingIdentifierName.js"(exports2) {
|
|
12427
12416
|
"use strict";
|
|
12428
12417
|
Object.defineProperty(exports2, "__esModule", {
|
|
12429
12418
|
value: true
|
|
@@ -12438,9 +12427,9 @@ var require_toBindingIdentifierName = __commonJS({
|
|
|
12438
12427
|
}
|
|
12439
12428
|
});
|
|
12440
12429
|
|
|
12441
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12430
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toComputedKey.js
|
|
12442
12431
|
var require_toComputedKey = __commonJS({
|
|
12443
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12432
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toComputedKey.js"(exports2) {
|
|
12444
12433
|
"use strict";
|
|
12445
12434
|
Object.defineProperty(exports2, "__esModule", {
|
|
12446
12435
|
value: true
|
|
@@ -12455,9 +12444,9 @@ var require_toComputedKey = __commonJS({
|
|
|
12455
12444
|
}
|
|
12456
12445
|
});
|
|
12457
12446
|
|
|
12458
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12447
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toExpression.js
|
|
12459
12448
|
var require_toExpression = __commonJS({
|
|
12460
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12449
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toExpression.js"(exports2) {
|
|
12461
12450
|
"use strict";
|
|
12462
12451
|
Object.defineProperty(exports2, "__esModule", {
|
|
12463
12452
|
value: true
|
|
@@ -12486,9 +12475,9 @@ var require_toExpression = __commonJS({
|
|
|
12486
12475
|
}
|
|
12487
12476
|
});
|
|
12488
12477
|
|
|
12489
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12478
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverseFast.js
|
|
12490
12479
|
var require_traverseFast = __commonJS({
|
|
12491
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12480
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverseFast.js"(exports2) {
|
|
12492
12481
|
"use strict";
|
|
12493
12482
|
Object.defineProperty(exports2, "__esModule", {
|
|
12494
12483
|
value: true
|
|
@@ -12529,9 +12518,9 @@ var require_traverseFast = __commonJS({
|
|
|
12529
12518
|
}
|
|
12530
12519
|
});
|
|
12531
12520
|
|
|
12532
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12521
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removeProperties.js
|
|
12533
12522
|
var require_removeProperties = __commonJS({
|
|
12534
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12523
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removeProperties.js"(exports2) {
|
|
12535
12524
|
"use strict";
|
|
12536
12525
|
Object.defineProperty(exports2, "__esModule", {
|
|
12537
12526
|
value: true
|
|
@@ -12546,7 +12535,7 @@ var require_removeProperties = __commonJS({
|
|
|
12546
12535
|
if (node[key] != null) node[key] = void 0;
|
|
12547
12536
|
}
|
|
12548
12537
|
for (const key of Object.keys(node)) {
|
|
12549
|
-
if (key
|
|
12538
|
+
if (key.startsWith("_") && node[key] != null) node[key] = void 0;
|
|
12550
12539
|
}
|
|
12551
12540
|
const symbols = Object.getOwnPropertySymbols(node);
|
|
12552
12541
|
for (const sym of symbols) {
|
|
@@ -12556,9 +12545,9 @@ var require_removeProperties = __commonJS({
|
|
|
12556
12545
|
}
|
|
12557
12546
|
});
|
|
12558
12547
|
|
|
12559
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12548
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js
|
|
12560
12549
|
var require_removePropertiesDeep = __commonJS({
|
|
12561
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12550
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/removePropertiesDeep.js"(exports2) {
|
|
12562
12551
|
"use strict";
|
|
12563
12552
|
Object.defineProperty(exports2, "__esModule", {
|
|
12564
12553
|
value: true
|
|
@@ -12573,9 +12562,9 @@ var require_removePropertiesDeep = __commonJS({
|
|
|
12573
12562
|
}
|
|
12574
12563
|
});
|
|
12575
12564
|
|
|
12576
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12565
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toKeyAlias.js
|
|
12577
12566
|
var require_toKeyAlias = __commonJS({
|
|
12578
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12567
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toKeyAlias.js"(exports2) {
|
|
12579
12568
|
"use strict";
|
|
12580
12569
|
Object.defineProperty(exports2, "__esModule", {
|
|
12581
12570
|
value: true
|
|
@@ -12614,9 +12603,9 @@ var require_toKeyAlias = __commonJS({
|
|
|
12614
12603
|
}
|
|
12615
12604
|
});
|
|
12616
12605
|
|
|
12617
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12606
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toStatement.js
|
|
12618
12607
|
var require_toStatement = __commonJS({
|
|
12619
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12608
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toStatement.js"(exports2) {
|
|
12620
12609
|
"use strict";
|
|
12621
12610
|
Object.defineProperty(exports2, "__esModule", {
|
|
12622
12611
|
value: true
|
|
@@ -12656,9 +12645,9 @@ var require_toStatement = __commonJS({
|
|
|
12656
12645
|
}
|
|
12657
12646
|
});
|
|
12658
12647
|
|
|
12659
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12648
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/valueToNode.js
|
|
12660
12649
|
var require_valueToNode = __commonJS({
|
|
12661
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12650
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/valueToNode.js"(exports2) {
|
|
12662
12651
|
"use strict";
|
|
12663
12652
|
Object.defineProperty(exports2, "__esModule", {
|
|
12664
12653
|
value: true
|
|
@@ -12747,9 +12736,9 @@ var require_valueToNode = __commonJS({
|
|
|
12747
12736
|
}
|
|
12748
12737
|
});
|
|
12749
12738
|
|
|
12750
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12739
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js
|
|
12751
12740
|
var require_appendToMemberExpression = __commonJS({
|
|
12752
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12741
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/appendToMemberExpression.js"(exports2) {
|
|
12753
12742
|
"use strict";
|
|
12754
12743
|
Object.defineProperty(exports2, "__esModule", {
|
|
12755
12744
|
value: true
|
|
@@ -12765,9 +12754,9 @@ var require_appendToMemberExpression = __commonJS({
|
|
|
12765
12754
|
}
|
|
12766
12755
|
});
|
|
12767
12756
|
|
|
12768
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12757
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/inherits.js
|
|
12769
12758
|
var require_inherits = __commonJS({
|
|
12770
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12759
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/inherits.js"(exports2) {
|
|
12771
12760
|
"use strict";
|
|
12772
12761
|
Object.defineProperty(exports2, "__esModule", {
|
|
12773
12762
|
value: true
|
|
@@ -12783,7 +12772,7 @@ var require_inherits = __commonJS({
|
|
|
12783
12772
|
}
|
|
12784
12773
|
}
|
|
12785
12774
|
for (const key of Object.keys(parent)) {
|
|
12786
|
-
if (key
|
|
12775
|
+
if (key.startsWith("_") && key !== "__clone") {
|
|
12787
12776
|
child[key] = parent[key];
|
|
12788
12777
|
}
|
|
12789
12778
|
}
|
|
@@ -12796,9 +12785,9 @@ var require_inherits = __commonJS({
|
|
|
12796
12785
|
}
|
|
12797
12786
|
});
|
|
12798
12787
|
|
|
12799
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12788
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js
|
|
12800
12789
|
var require_prependToMemberExpression = __commonJS({
|
|
12801
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12790
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/modifications/prependToMemberExpression.js"(exports2) {
|
|
12802
12791
|
"use strict";
|
|
12803
12792
|
Object.defineProperty(exports2, "__esModule", {
|
|
12804
12793
|
value: true
|
|
@@ -12816,9 +12805,9 @@ var require_prependToMemberExpression = __commonJS({
|
|
|
12816
12805
|
}
|
|
12817
12806
|
});
|
|
12818
12807
|
|
|
12819
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12808
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js
|
|
12820
12809
|
var require_getAssignmentIdentifiers = __commonJS({
|
|
12821
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12810
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getAssignmentIdentifiers.js"(exports2) {
|
|
12822
12811
|
"use strict";
|
|
12823
12812
|
Object.defineProperty(exports2, "__esModule", {
|
|
12824
12813
|
value: true
|
|
@@ -12867,9 +12856,9 @@ var require_getAssignmentIdentifiers = __commonJS({
|
|
|
12867
12856
|
}
|
|
12868
12857
|
});
|
|
12869
12858
|
|
|
12870
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12859
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js
|
|
12871
12860
|
var require_getBindingIdentifiers = __commonJS({
|
|
12872
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12861
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getBindingIdentifiers.js"(exports2) {
|
|
12873
12862
|
"use strict";
|
|
12874
12863
|
Object.defineProperty(exports2, "__esModule", {
|
|
12875
12864
|
value: true
|
|
@@ -12972,9 +12961,9 @@ var require_getBindingIdentifiers = __commonJS({
|
|
|
12972
12961
|
}
|
|
12973
12962
|
});
|
|
12974
12963
|
|
|
12975
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12964
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js
|
|
12976
12965
|
var require_getOuterBindingIdentifiers = __commonJS({
|
|
12977
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12966
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getOuterBindingIdentifiers.js"(exports2) {
|
|
12978
12967
|
"use strict";
|
|
12979
12968
|
Object.defineProperty(exports2, "__esModule", {
|
|
12980
12969
|
value: true
|
|
@@ -12988,9 +12977,9 @@ var require_getOuterBindingIdentifiers = __commonJS({
|
|
|
12988
12977
|
}
|
|
12989
12978
|
});
|
|
12990
12979
|
|
|
12991
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
12980
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getFunctionName.js
|
|
12992
12981
|
var require_getFunctionName = __commonJS({
|
|
12993
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
12982
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/retrievers/getFunctionName.js"(exports2) {
|
|
12994
12983
|
"use strict";
|
|
12995
12984
|
Object.defineProperty(exports2, "__esModule", {
|
|
12996
12985
|
value: true
|
|
@@ -13055,9 +13044,9 @@ var require_getFunctionName = __commonJS({
|
|
|
13055
13044
|
}
|
|
13056
13045
|
});
|
|
13057
13046
|
|
|
13058
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13047
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverse.js
|
|
13059
13048
|
var require_traverse = __commonJS({
|
|
13060
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13049
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/traverse/traverse.js"(exports2) {
|
|
13061
13050
|
"use strict";
|
|
13062
13051
|
Object.defineProperty(exports2, "__esModule", {
|
|
13063
13052
|
value: true
|
|
@@ -13108,9 +13097,9 @@ var require_traverse = __commonJS({
|
|
|
13108
13097
|
}
|
|
13109
13098
|
});
|
|
13110
13099
|
|
|
13111
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13100
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBinding.js
|
|
13112
13101
|
var require_isBinding = __commonJS({
|
|
13113
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13102
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBinding.js"(exports2) {
|
|
13114
13103
|
"use strict";
|
|
13115
13104
|
Object.defineProperty(exports2, "__esModule", {
|
|
13116
13105
|
value: true
|
|
@@ -13138,30 +13127,25 @@ var require_isBinding = __commonJS({
|
|
|
13138
13127
|
}
|
|
13139
13128
|
});
|
|
13140
13129
|
|
|
13141
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13130
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isLet.js
|
|
13142
13131
|
var require_isLet = __commonJS({
|
|
13143
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13132
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isLet.js"(exports2) {
|
|
13144
13133
|
"use strict";
|
|
13145
13134
|
Object.defineProperty(exports2, "__esModule", {
|
|
13146
13135
|
value: true
|
|
13147
13136
|
});
|
|
13148
13137
|
exports2.default = isLet;
|
|
13149
13138
|
var _index = require_generated();
|
|
13150
|
-
|
|
13151
|
-
BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
|
13152
|
-
}
|
|
13153
|
-
var BLOCK_SCOPED_SYMBOL;
|
|
13139
|
+
var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
|
13154
13140
|
function isLet(node) {
|
|
13155
|
-
|
|
13156
|
-
return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
|
|
13157
|
-
}
|
|
13141
|
+
return (0, _index.isVariableDeclaration)(node) && (node.kind !== "var" || node[BLOCK_SCOPED_SYMBOL]);
|
|
13158
13142
|
}
|
|
13159
13143
|
}
|
|
13160
13144
|
});
|
|
13161
13145
|
|
|
13162
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13146
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBlockScoped.js
|
|
13163
13147
|
var require_isBlockScoped = __commonJS({
|
|
13164
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13148
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isBlockScoped.js"(exports2) {
|
|
13165
13149
|
"use strict";
|
|
13166
13150
|
Object.defineProperty(exports2, "__esModule", {
|
|
13167
13151
|
value: true
|
|
@@ -13175,9 +13159,9 @@ var require_isBlockScoped = __commonJS({
|
|
|
13175
13159
|
}
|
|
13176
13160
|
});
|
|
13177
13161
|
|
|
13178
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13162
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isImmutable.js
|
|
13179
13163
|
var require_isImmutable = __commonJS({
|
|
13180
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13164
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isImmutable.js"(exports2) {
|
|
13181
13165
|
"use strict";
|
|
13182
13166
|
Object.defineProperty(exports2, "__esModule", {
|
|
13183
13167
|
value: true
|
|
@@ -13199,9 +13183,9 @@ var require_isImmutable = __commonJS({
|
|
|
13199
13183
|
}
|
|
13200
13184
|
});
|
|
13201
13185
|
|
|
13202
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13186
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNodesEquivalent.js
|
|
13203
13187
|
var require_isNodesEquivalent = __commonJS({
|
|
13204
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13188
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isNodesEquivalent.js"(exports2) {
|
|
13205
13189
|
"use strict";
|
|
13206
13190
|
Object.defineProperty(exports2, "__esModule", {
|
|
13207
13191
|
value: true
|
|
@@ -13259,9 +13243,9 @@ var require_isNodesEquivalent = __commonJS({
|
|
|
13259
13243
|
}
|
|
13260
13244
|
});
|
|
13261
13245
|
|
|
13262
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13246
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isReferenced.js
|
|
13263
13247
|
var require_isReferenced = __commonJS({
|
|
13264
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13248
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isReferenced.js"(exports2) {
|
|
13265
13249
|
"use strict";
|
|
13266
13250
|
Object.defineProperty(exports2, "__esModule", {
|
|
13267
13251
|
value: true
|
|
@@ -13294,7 +13278,7 @@ var require_isReferenced = __commonJS({
|
|
|
13294
13278
|
if (parent.key === node) {
|
|
13295
13279
|
return !!parent.computed;
|
|
13296
13280
|
}
|
|
13297
|
-
return
|
|
13281
|
+
return (grandparent == null ? void 0 : grandparent.type) !== "ObjectPattern";
|
|
13298
13282
|
case "ClassProperty":
|
|
13299
13283
|
case "ClassAccessorProperty":
|
|
13300
13284
|
if (parent.key === node) {
|
|
@@ -13358,9 +13342,9 @@ var require_isReferenced = __commonJS({
|
|
|
13358
13342
|
}
|
|
13359
13343
|
});
|
|
13360
13344
|
|
|
13361
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13345
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isScope.js
|
|
13362
13346
|
var require_isScope = __commonJS({
|
|
13363
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13347
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isScope.js"(exports2) {
|
|
13364
13348
|
"use strict";
|
|
13365
13349
|
Object.defineProperty(exports2, "__esModule", {
|
|
13366
13350
|
value: true
|
|
@@ -13379,9 +13363,9 @@ var require_isScope = __commonJS({
|
|
|
13379
13363
|
}
|
|
13380
13364
|
});
|
|
13381
13365
|
|
|
13382
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13366
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isSpecifierDefault.js
|
|
13383
13367
|
var require_isSpecifierDefault = __commonJS({
|
|
13384
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13368
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isSpecifierDefault.js"(exports2) {
|
|
13385
13369
|
"use strict";
|
|
13386
13370
|
Object.defineProperty(exports2, "__esModule", {
|
|
13387
13371
|
value: true
|
|
@@ -13396,9 +13380,9 @@ var require_isSpecifierDefault = __commonJS({
|
|
|
13396
13380
|
}
|
|
13397
13381
|
});
|
|
13398
13382
|
|
|
13399
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13383
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidES3Identifier.js
|
|
13400
13384
|
var require_isValidES3Identifier = __commonJS({
|
|
13401
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13385
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isValidES3Identifier.js"(exports2) {
|
|
13402
13386
|
"use strict";
|
|
13403
13387
|
Object.defineProperty(exports2, "__esModule", {
|
|
13404
13388
|
value: true
|
|
@@ -13412,32 +13396,27 @@ var require_isValidES3Identifier = __commonJS({
|
|
|
13412
13396
|
}
|
|
13413
13397
|
});
|
|
13414
13398
|
|
|
13415
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13399
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isVar.js
|
|
13416
13400
|
var require_isVar = __commonJS({
|
|
13417
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13401
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/validators/isVar.js"(exports2) {
|
|
13418
13402
|
"use strict";
|
|
13419
13403
|
Object.defineProperty(exports2, "__esModule", {
|
|
13420
13404
|
value: true
|
|
13421
13405
|
});
|
|
13422
13406
|
exports2.default = isVar;
|
|
13423
13407
|
var _index = require_generated();
|
|
13424
|
-
|
|
13425
|
-
BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
|
13426
|
-
}
|
|
13427
|
-
var BLOCK_SCOPED_SYMBOL;
|
|
13408
|
+
var BLOCK_SCOPED_SYMBOL = Symbol.for("var used to be block scoped");
|
|
13428
13409
|
function isVar(node) {
|
|
13429
|
-
{
|
|
13430
|
-
|
|
13431
|
-
|
|
13432
|
-
}) && !node[BLOCK_SCOPED_SYMBOL];
|
|
13433
|
-
}
|
|
13410
|
+
return (0, _index.isVariableDeclaration)(node, {
|
|
13411
|
+
kind: "var"
|
|
13412
|
+
}) && !node[BLOCK_SCOPED_SYMBOL];
|
|
13434
13413
|
}
|
|
13435
13414
|
}
|
|
13436
13415
|
});
|
|
13437
13416
|
|
|
13438
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13417
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js
|
|
13439
13418
|
var require_gatherSequenceExpressions = __commonJS({
|
|
13440
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13419
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/gatherSequenceExpressions.js"(exports2) {
|
|
13441
13420
|
"use strict";
|
|
13442
13421
|
Object.defineProperty(exports2, "__esModule", {
|
|
13443
13422
|
value: true
|
|
@@ -13503,9 +13482,9 @@ var require_gatherSequenceExpressions = __commonJS({
|
|
|
13503
13482
|
}
|
|
13504
13483
|
});
|
|
13505
13484
|
|
|
13506
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13485
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toSequenceExpression.js
|
|
13507
13486
|
var require_toSequenceExpression = __commonJS({
|
|
13508
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13487
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/converters/toSequenceExpression.js"(exports2) {
|
|
13509
13488
|
"use strict";
|
|
13510
13489
|
Object.defineProperty(exports2, "__esModule", {
|
|
13511
13490
|
value: true
|
|
@@ -13525,9 +13504,9 @@ var require_toSequenceExpression = __commonJS({
|
|
|
13525
13504
|
}
|
|
13526
13505
|
});
|
|
13527
13506
|
|
|
13528
|
-
// ../../node_modules/.pnpm/@babel+types@7.28.
|
|
13507
|
+
// ../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.js
|
|
13529
13508
|
var require_lib3 = __commonJS({
|
|
13530
|
-
"../../node_modules/.pnpm/@babel+types@7.28.
|
|
13509
|
+
"../../node_modules/.pnpm/@babel+types@7.28.6/node_modules/@babel/types/lib/index.js"(exports2) {
|
|
13531
13510
|
"use strict";
|
|
13532
13511
|
Object.defineProperty(exports2, "__esModule", {
|
|
13533
13512
|
value: true
|
|
@@ -14103,9 +14082,7 @@ var require_lib3 = __commonJS({
|
|
|
14103
14082
|
isCompatTag: _isCompatTag.default,
|
|
14104
14083
|
buildChildren: _buildChildren.default
|
|
14105
14084
|
};
|
|
14106
|
-
|
|
14107
|
-
exports2.toSequenceExpression = _toSequenceExpression.default;
|
|
14108
|
-
}
|
|
14085
|
+
exports2.toSequenceExpression = _toSequenceExpression.default;
|
|
14109
14086
|
if (process.env.BABEL_TYPES_8_BREAKING) {
|
|
14110
14087
|
console.warn("BABEL_TYPES_8_BREAKING is not supported anymore. Use the latest Babel 8.0.0 pre-release instead!");
|
|
14111
14088
|
}
|
|
@@ -14167,6 +14144,7 @@ var RUNTIME_HELPERS = {
|
|
|
14167
14144
|
propsRest: "__fictPropsRest",
|
|
14168
14145
|
mergeProps: "mergeProps",
|
|
14169
14146
|
prop: "prop",
|
|
14147
|
+
keyed: "keyed",
|
|
14170
14148
|
runInScope: "runInScope",
|
|
14171
14149
|
createElement: "createElement",
|
|
14172
14150
|
conditional: "createConditional",
|
|
@@ -14201,6 +14179,7 @@ var RUNTIME_ALIASES = {
|
|
|
14201
14179
|
propGetter: "__fictProp",
|
|
14202
14180
|
propsRest: "__fictPropsRest",
|
|
14203
14181
|
prop: "prop",
|
|
14182
|
+
keyed: "keyed",
|
|
14204
14183
|
mergeProps: "mergeProps",
|
|
14205
14184
|
runInScope: "runInScope",
|
|
14206
14185
|
createElement: "createElement",
|
|
@@ -15313,8 +15292,18 @@ function convertFunction(name, params, body, options) {
|
|
|
15313
15292
|
loc: options?.loc ?? null
|
|
15314
15293
|
};
|
|
15315
15294
|
}
|
|
15316
|
-
function convertStatementsToHIRFunction(name, statements) {
|
|
15317
|
-
|
|
15295
|
+
function convertStatementsToHIRFunction(name, statements, options) {
|
|
15296
|
+
const prevOptions = activeBuildOptions;
|
|
15297
|
+
if (options) {
|
|
15298
|
+
activeBuildOptions = options;
|
|
15299
|
+
}
|
|
15300
|
+
try {
|
|
15301
|
+
return convertFunction(name, [], statements, { loc: getLoc(statements[0]) });
|
|
15302
|
+
} finally {
|
|
15303
|
+
if (options) {
|
|
15304
|
+
activeBuildOptions = prevOptions;
|
|
15305
|
+
}
|
|
15306
|
+
}
|
|
15318
15307
|
}
|
|
15319
15308
|
function convertAssignmentValue(expr) {
|
|
15320
15309
|
const right = convertExpression(expr.right);
|
|
@@ -15832,9 +15821,9 @@ function processStatement(stmt, bb, jumpTarget, ctx) {
|
|
|
15832
15821
|
}
|
|
15833
15822
|
return bb;
|
|
15834
15823
|
}
|
|
15835
|
-
function convertExpression(node) {
|
|
15824
|
+
function convertExpression(node, options) {
|
|
15836
15825
|
const loc = getLoc(node);
|
|
15837
|
-
const convertCallArguments = (args) => args.map((arg) => {
|
|
15826
|
+
const convertCallArguments = (args, reactiveScope) => args.map((arg) => {
|
|
15838
15827
|
if (t.isSpreadElement(arg)) {
|
|
15839
15828
|
return {
|
|
15840
15829
|
kind: "SpreadElement",
|
|
@@ -15842,9 +15831,25 @@ function convertExpression(node) {
|
|
|
15842
15831
|
loc: getLoc(arg)
|
|
15843
15832
|
};
|
|
15844
15833
|
}
|
|
15845
|
-
if (t.isExpression(arg))
|
|
15834
|
+
if (t.isExpression(arg)) {
|
|
15835
|
+
if (reactiveScope && arg === args[0] && (t.isArrowFunctionExpression(arg) || t.isFunctionExpression(arg))) {
|
|
15836
|
+
return convertExpression(arg, { reactiveScope });
|
|
15837
|
+
}
|
|
15838
|
+
return convertExpression(arg);
|
|
15839
|
+
}
|
|
15846
15840
|
return void 0;
|
|
15847
15841
|
}).filter(Boolean);
|
|
15842
|
+
const resolveReactiveScope = (callee) => {
|
|
15843
|
+
const reactiveScopes = activeBuildOptions?.reactiveScopes;
|
|
15844
|
+
if (!reactiveScopes || reactiveScopes.size === 0) return void 0;
|
|
15845
|
+
if (t.isIdentifier(callee)) {
|
|
15846
|
+
return reactiveScopes.has(callee.name) ? callee.name : void 0;
|
|
15847
|
+
}
|
|
15848
|
+
if ((t.isMemberExpression(callee) || t.isOptionalMemberExpression(callee)) && !callee.computed && t.isIdentifier(callee.property)) {
|
|
15849
|
+
return reactiveScopes.has(callee.property.name) ? callee.property.name : void 0;
|
|
15850
|
+
}
|
|
15851
|
+
return void 0;
|
|
15852
|
+
};
|
|
15848
15853
|
if (t.isParenthesizedExpression(node) && t.isExpression(node.expression)) {
|
|
15849
15854
|
return convertExpression(node.expression);
|
|
15850
15855
|
}
|
|
@@ -15891,10 +15896,11 @@ function convertExpression(node) {
|
|
|
15891
15896
|
if (t.isCallExpression(node)) {
|
|
15892
15897
|
const callee = normalizeMacroCallee(node.callee);
|
|
15893
15898
|
const pure = hasPureAnnotation(node) || hasPureAnnotation(node.callee);
|
|
15899
|
+
const reactiveScope = resolveReactiveScope(node.callee);
|
|
15894
15900
|
const call = {
|
|
15895
15901
|
kind: "CallExpression",
|
|
15896
15902
|
callee: convertExpression(callee),
|
|
15897
|
-
arguments: convertCallArguments(node.arguments),
|
|
15903
|
+
arguments: convertCallArguments(node.arguments, reactiveScope),
|
|
15898
15904
|
...pure ? { pure: true } : null,
|
|
15899
15905
|
loc
|
|
15900
15906
|
};
|
|
@@ -16104,6 +16110,7 @@ function convertExpression(node) {
|
|
|
16104
16110
|
body: nested.blocks,
|
|
16105
16111
|
isExpression: false,
|
|
16106
16112
|
isAsync: node.async,
|
|
16113
|
+
reactiveScope: options?.reactiveScope,
|
|
16107
16114
|
loc
|
|
16108
16115
|
};
|
|
16109
16116
|
return arrow;
|
|
@@ -16116,6 +16123,7 @@ function convertExpression(node) {
|
|
|
16116
16123
|
body: convertExpression(node.body),
|
|
16117
16124
|
isExpression: true,
|
|
16118
16125
|
isAsync: node.async,
|
|
16126
|
+
reactiveScope: options?.reactiveScope,
|
|
16119
16127
|
loc
|
|
16120
16128
|
};
|
|
16121
16129
|
return arrow;
|
|
@@ -16135,6 +16143,7 @@ function convertExpression(node) {
|
|
|
16135
16143
|
params: nested.params,
|
|
16136
16144
|
body: nested.blocks,
|
|
16137
16145
|
isAsync: node.async,
|
|
16146
|
+
reactiveScope: options?.reactiveScope,
|
|
16138
16147
|
loc
|
|
16139
16148
|
};
|
|
16140
16149
|
return fn;
|
|
@@ -16205,10 +16214,11 @@ function convertExpression(node) {
|
|
|
16205
16214
|
}
|
|
16206
16215
|
if (t.isOptionalCallExpression(node)) {
|
|
16207
16216
|
const callee = normalizeMacroCallee(node.callee);
|
|
16217
|
+
const reactiveScope = resolveReactiveScope(node.callee);
|
|
16208
16218
|
return {
|
|
16209
16219
|
kind: "OptionalCallExpression",
|
|
16210
16220
|
callee: convertExpression(callee),
|
|
16211
|
-
arguments: convertCallArguments(node.arguments),
|
|
16221
|
+
arguments: convertCallArguments(node.arguments, reactiveScope),
|
|
16212
16222
|
optional: node.optional,
|
|
16213
16223
|
...hasPureAnnotation(node) || hasPureAnnotation(node.callee) ? { pure: true } : null,
|
|
16214
16224
|
loc
|
|
@@ -16396,16 +16406,57 @@ function shouldMemoizeRegion(region) {
|
|
|
16396
16406
|
}
|
|
16397
16407
|
|
|
16398
16408
|
// src/module-metadata.ts
|
|
16399
|
-
var import_node_path = __toESM(require("path"), 1);
|
|
16400
16409
|
var import_node_fs = require("fs");
|
|
16410
|
+
var import_node_path = __toESM(require("path"), 1);
|
|
16411
|
+
var import_node_url = require("url");
|
|
16401
16412
|
var globalMetadata = /* @__PURE__ */ new Map();
|
|
16402
16413
|
var MODULE_EXTENSIONS = [".ts", ".tsx", ".js", ".jsx", ".mjs", ".cjs", ".mts", ".cts"];
|
|
16414
|
+
var DEFAULT_META_EXTENSION = ".fict.meta.json";
|
|
16403
16415
|
function normalizeFileName(fileName) {
|
|
16404
|
-
|
|
16416
|
+
let normalized = fileName;
|
|
16417
|
+
const queryStart = normalized.indexOf("?");
|
|
16418
|
+
if (queryStart !== -1) {
|
|
16419
|
+
normalized = normalized.slice(0, queryStart);
|
|
16420
|
+
}
|
|
16421
|
+
if (normalized.startsWith("/@fs/")) {
|
|
16422
|
+
normalized = normalized.slice("/@fs/".length);
|
|
16423
|
+
}
|
|
16424
|
+
if (normalized.startsWith("file://")) {
|
|
16425
|
+
try {
|
|
16426
|
+
normalized = (0, import_node_url.fileURLToPath)(normalized);
|
|
16427
|
+
} catch {
|
|
16428
|
+
}
|
|
16429
|
+
}
|
|
16430
|
+
return import_node_path.default.resolve(normalized);
|
|
16405
16431
|
}
|
|
16406
16432
|
function getMetadataStore(options) {
|
|
16407
16433
|
return options?.moduleMetadata ?? globalMetadata;
|
|
16408
16434
|
}
|
|
16435
|
+
function getMetadataExtension(options) {
|
|
16436
|
+
return options?.moduleMetadataExtension ?? DEFAULT_META_EXTENSION;
|
|
16437
|
+
}
|
|
16438
|
+
function getMetadataFilePath(fileName, options) {
|
|
16439
|
+
return `${normalizeFileName(fileName)}${getMetadataExtension(options)}`;
|
|
16440
|
+
}
|
|
16441
|
+
function shouldEmitModuleMetadata(options) {
|
|
16442
|
+
const opt = options?.emitModuleMetadata;
|
|
16443
|
+
if (opt === true) return true;
|
|
16444
|
+
if (opt === false) return false;
|
|
16445
|
+
if (options?.moduleMetadata || options?.resolveModuleMetadata) return false;
|
|
16446
|
+
return true;
|
|
16447
|
+
}
|
|
16448
|
+
function readMetadataFromDisk(fileName, store, options) {
|
|
16449
|
+
const metaPath = getMetadataFilePath(fileName, options);
|
|
16450
|
+
if (!(0, import_node_fs.existsSync)(metaPath)) return void 0;
|
|
16451
|
+
try {
|
|
16452
|
+
const raw = (0, import_node_fs.readFileSync)(metaPath, "utf8");
|
|
16453
|
+
const parsed = JSON.parse(raw);
|
|
16454
|
+
store.set(normalizeFileName(fileName), parsed);
|
|
16455
|
+
return parsed;
|
|
16456
|
+
} catch {
|
|
16457
|
+
return void 0;
|
|
16458
|
+
}
|
|
16459
|
+
}
|
|
16409
16460
|
function isFile(pathName) {
|
|
16410
16461
|
try {
|
|
16411
16462
|
return (0, import_node_fs.statSync)(pathName).isFile();
|
|
@@ -16436,23 +16487,64 @@ function resolveImportSource(source, importer, store) {
|
|
|
16436
16487
|
}
|
|
16437
16488
|
return void 0;
|
|
16438
16489
|
}
|
|
16490
|
+
function resolveImportSourceByMetadata(source, importer, options) {
|
|
16491
|
+
if (!importer) return void 0;
|
|
16492
|
+
const isAbsolute = import_node_path.default.isAbsolute(source);
|
|
16493
|
+
if (!isAbsolute && !source.startsWith(".")) return void 0;
|
|
16494
|
+
const base = isAbsolute ? source : import_node_path.default.resolve(import_node_path.default.dirname(importer), source);
|
|
16495
|
+
const normalized = normalizeFileName(base);
|
|
16496
|
+
const metaExt = getMetadataExtension(options);
|
|
16497
|
+
const candidates = [];
|
|
16498
|
+
const ext = import_node_path.default.extname(normalized);
|
|
16499
|
+
if (ext) {
|
|
16500
|
+
candidates.push(normalized);
|
|
16501
|
+
} else {
|
|
16502
|
+
for (const suffix of MODULE_EXTENSIONS) {
|
|
16503
|
+
candidates.push(`${normalized}${suffix}`);
|
|
16504
|
+
}
|
|
16505
|
+
}
|
|
16506
|
+
for (const suffix of MODULE_EXTENSIONS) {
|
|
16507
|
+
candidates.push(import_node_path.default.join(normalized, `index${suffix}`));
|
|
16508
|
+
}
|
|
16509
|
+
for (const candidate of candidates) {
|
|
16510
|
+
if ((0, import_node_fs.existsSync)(`${candidate}${metaExt}`)) {
|
|
16511
|
+
return candidate;
|
|
16512
|
+
}
|
|
16513
|
+
}
|
|
16514
|
+
return void 0;
|
|
16515
|
+
}
|
|
16439
16516
|
function resolveModuleMetadata(source, importer, options) {
|
|
16440
16517
|
if (options?.resolveModuleMetadata) {
|
|
16441
16518
|
const resolved = options.resolveModuleMetadata(source, importer);
|
|
16442
16519
|
if (resolved) return resolved;
|
|
16443
16520
|
}
|
|
16444
16521
|
const store = getMetadataStore(options);
|
|
16445
|
-
|
|
16522
|
+
let resolvedKey = resolveImportSource(source, importer, store);
|
|
16523
|
+
if (!resolvedKey) {
|
|
16524
|
+
resolvedKey = resolveImportSourceByMetadata(source, importer, options);
|
|
16525
|
+
}
|
|
16446
16526
|
if (resolvedKey) {
|
|
16447
|
-
|
|
16527
|
+
const existing = store.get(resolvedKey);
|
|
16528
|
+
if (existing) return existing;
|
|
16529
|
+
const loaded2 = readMetadataFromDisk(resolvedKey, store, options);
|
|
16530
|
+
if (loaded2) return loaded2;
|
|
16448
16531
|
}
|
|
16449
16532
|
if (store.has(source)) return store.get(source);
|
|
16533
|
+
const loaded = readMetadataFromDisk(source, store, options);
|
|
16534
|
+
if (loaded) return loaded;
|
|
16450
16535
|
return void 0;
|
|
16451
16536
|
}
|
|
16452
16537
|
function setModuleMetadata(fileName, metadata, options) {
|
|
16453
16538
|
if (!fileName) return;
|
|
16454
16539
|
const store = getMetadataStore(options);
|
|
16455
|
-
|
|
16540
|
+
const normalized = normalizeFileName(fileName);
|
|
16541
|
+
store.set(normalized, metadata);
|
|
16542
|
+
if (!shouldEmitModuleMetadata(options)) return;
|
|
16543
|
+
try {
|
|
16544
|
+
const metaPath = getMetadataFilePath(normalized, options);
|
|
16545
|
+
(0, import_node_fs.writeFileSync)(metaPath, JSON.stringify(metadata), "utf8");
|
|
16546
|
+
} catch {
|
|
16547
|
+
}
|
|
16456
16548
|
}
|
|
16457
16549
|
function clearModuleMetadata(options) {
|
|
16458
16550
|
const store = getMetadataStore(options);
|
|
@@ -16617,7 +16709,9 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
|
|
|
16617
16709
|
return false;
|
|
16618
16710
|
};
|
|
16619
16711
|
const isRuntimeMergeProps = () => !ctx.shadowedNames?.has(RUNTIME_ALIASES.mergeProps) && !ctx.localDeclaredNames?.has(RUNTIME_ALIASES.mergeProps) && (!ctx.moduleDeclaredNames?.has(RUNTIME_ALIASES.mergeProps) || (ctx.moduleRuntimeNames?.has(RUNTIME_ALIASES.mergeProps) ?? false));
|
|
16712
|
+
const isRuntimeKeyed = () => !ctx.shadowedNames?.has(RUNTIME_ALIASES.keyed) && !ctx.localDeclaredNames?.has(RUNTIME_ALIASES.keyed) && (!ctx.moduleDeclaredNames?.has(RUNTIME_ALIASES.keyed) || (ctx.moduleRuntimeNames?.has(RUNTIME_ALIASES.keyed) ?? false));
|
|
16620
16713
|
const isMergePropsCall = (expr) => expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === RUNTIME_ALIASES.mergeProps && isRuntimeMergeProps();
|
|
16714
|
+
const isKeyedCall = (expr) => expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === RUNTIME_ALIASES.keyed && isRuntimeKeyed();
|
|
16621
16715
|
const isDynamicMemberSpread = (expr) => {
|
|
16622
16716
|
if (expr.kind !== "MemberExpression" && expr.kind !== "OptionalMemberExpression") return false;
|
|
16623
16717
|
if (expr.computed) return true;
|
|
@@ -16668,6 +16762,14 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
|
|
|
16668
16762
|
if (!base) return false;
|
|
16669
16763
|
return ctx.storeVars?.has(helpers.deSSAVarName(base)) ?? false;
|
|
16670
16764
|
};
|
|
16765
|
+
const getKeyedCandidate = (expr) => {
|
|
16766
|
+
if (expr.kind !== "MemberExpression") return null;
|
|
16767
|
+
if (!expr.computed || expr.optional) return null;
|
|
16768
|
+
if (expr.property.kind === "Literal" && (typeof expr.property.value === "string" || typeof expr.property.value === "number")) {
|
|
16769
|
+
return null;
|
|
16770
|
+
}
|
|
16771
|
+
return { base: expr.object, key: expr.property };
|
|
16772
|
+
};
|
|
16671
16773
|
const flushBucket = () => {
|
|
16672
16774
|
if (bucket.length === 0) return;
|
|
16673
16775
|
segments.push({ kind: "object", properties: bucket });
|
|
@@ -16730,9 +16832,11 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
|
|
|
16730
16832
|
ctx.inPropsContext = prevPropsCtx;
|
|
16731
16833
|
}
|
|
16732
16834
|
const baseIdent = attr.value.kind === "Identifier" ? helpers.deSSAVarName(attr.value.name) : void 0;
|
|
16835
|
+
const keyedCandidate = getKeyedCandidate(attr.value);
|
|
16836
|
+
const keyedBaseIdent = keyedCandidate && keyedCandidate.base.kind === "Identifier" ? helpers.deSSAVarName(keyedCandidate.base.name) : void 0;
|
|
16733
16837
|
const isAccessorBase = baseIdent && ((ctx.memoVars?.has(baseIdent) ?? false) || (ctx.signalVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false));
|
|
16734
16838
|
const isStoreBase = baseIdent ? ctx.storeVars?.has(baseIdent) ?? false : false;
|
|
16735
|
-
const alreadyGetter = isFunctionLike || (baseIdent ? isStoreBase || (ctx.memoVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false) : false);
|
|
16839
|
+
const alreadyGetter = isFunctionLike || isKeyedCall(attr.value) || (baseIdent ? isStoreBase || (ctx.memoVars?.has(baseIdent) ?? false) || (ctx.aliasVars?.has(baseIdent) ?? false) : false);
|
|
16736
16840
|
const usesTracked = (!ctx.nonReactiveScopeDepth || ctx.nonReactiveScopeDepth === 0) && helpers.expressionUsesTracked(attr.value, ctx) && !alreadyGetter;
|
|
16737
16841
|
const trackedExpr = usesTracked ? helpers.lowerTrackedExpression(
|
|
16738
16842
|
attr.value,
|
|
@@ -16741,12 +16845,21 @@ function buildPropsPlan(attributes, children, ctx, helpers) {
|
|
|
16741
16845
|
const useMemoProp = usesTracked && trackedExpr && t4.isExpression(trackedExpr) && !t4.isIdentifier(trackedExpr) && !t4.isMemberExpression(trackedExpr) && !t4.isLiteral(trackedExpr);
|
|
16742
16846
|
const forceMemoProp = usesTracked && isDynamicStoreMember(attr.value);
|
|
16743
16847
|
const shouldMemoProp = useMemoProp || forceMemoProp;
|
|
16848
|
+
const canKeyed = usesTracked && keyedCandidate && keyedBaseIdent && !(ctx.signalVars?.has(keyedBaseIdent) ?? false) && !(ctx.memoVars?.has(keyedBaseIdent) ?? false) && !(ctx.aliasVars?.has(keyedBaseIdent) ?? false) && !(ctx.functionVars?.has(keyedBaseIdent) ?? false);
|
|
16744
16849
|
const valueExpr = !isFunctionLike && isAccessorBase && baseIdent ? (() => {
|
|
16745
16850
|
ctx.helpersUsed.add("propGetter");
|
|
16746
16851
|
return t4.callExpression(t4.identifier(RUNTIME_ALIASES.propGetter), [
|
|
16747
16852
|
t4.arrowFunctionExpression([], t4.callExpression(t4.identifier(baseIdent), []))
|
|
16748
16853
|
]);
|
|
16749
16854
|
})() : usesTracked && t4.isExpression(lowered) ? (() => {
|
|
16855
|
+
if (canKeyed && keyedCandidate) {
|
|
16856
|
+
ctx.helpersUsed.add("keyed");
|
|
16857
|
+
const keyExpr = helpers.lowerDomExpression(keyedCandidate.key, ctx);
|
|
16858
|
+
return t4.callExpression(t4.identifier(RUNTIME_ALIASES.keyed), [
|
|
16859
|
+
t4.identifier(keyedBaseIdent),
|
|
16860
|
+
t4.arrowFunctionExpression([], keyExpr)
|
|
16861
|
+
]);
|
|
16862
|
+
}
|
|
16750
16863
|
if (shouldMemoProp) {
|
|
16751
16864
|
ctx.helpersUsed.add("prop");
|
|
16752
16865
|
return t4.callExpression(t4.identifier(RUNTIME_ALIASES.prop), [
|
|
@@ -18649,6 +18762,16 @@ function createPropsShape() {
|
|
|
18649
18762
|
source: { kind: "props" }
|
|
18650
18763
|
};
|
|
18651
18764
|
}
|
|
18765
|
+
function createStoreShape(name) {
|
|
18766
|
+
return {
|
|
18767
|
+
knownKeys: /* @__PURE__ */ new Set(),
|
|
18768
|
+
mutableKeys: /* @__PURE__ */ new Set(),
|
|
18769
|
+
dynamicAccess: false,
|
|
18770
|
+
escapes: false,
|
|
18771
|
+
isSpread: false,
|
|
18772
|
+
source: { kind: "store", name }
|
|
18773
|
+
};
|
|
18774
|
+
}
|
|
18652
18775
|
function cloneKeyContext(ctx) {
|
|
18653
18776
|
const cloneMap = (map) => {
|
|
18654
18777
|
const next = /* @__PURE__ */ new Map();
|
|
@@ -18726,7 +18849,7 @@ function resolveNarrowedKeys(expr, ctx) {
|
|
|
18726
18849
|
}
|
|
18727
18850
|
return null;
|
|
18728
18851
|
}
|
|
18729
|
-
function resolveKeySet(expr, ctx) {
|
|
18852
|
+
function resolveKeySet(expr, ctx, shapes) {
|
|
18730
18853
|
if (expr.kind === "Identifier") {
|
|
18731
18854
|
const set = ctx.keySets.get(expr.name);
|
|
18732
18855
|
return set ? new Set(set) : null;
|
|
@@ -18745,7 +18868,7 @@ function resolveKeySet(expr, ctx) {
|
|
|
18745
18868
|
if (expr.callee.kind === "MemberExpression") {
|
|
18746
18869
|
const object = expr.callee.object;
|
|
18747
18870
|
const property = expr.callee.property;
|
|
18748
|
-
if (object.kind === "Identifier" && object.name === "Object" && !expr.callee.computed && property.kind === "Identifier" && property.name === "keys" && expr.arguments.length === 1) {
|
|
18871
|
+
if (object.kind === "Identifier" && object.name === "Object" && !expr.callee.computed && property.kind === "Identifier" && (property.name === "keys" || property.name === "getOwnPropertyNames") && expr.arguments.length === 1) {
|
|
18749
18872
|
const arg = expr.arguments[0];
|
|
18750
18873
|
if (arg.kind === "ObjectExpression") {
|
|
18751
18874
|
const values = [];
|
|
@@ -18764,12 +18887,18 @@ function resolveKeySet(expr, ctx) {
|
|
|
18764
18887
|
}
|
|
18765
18888
|
return values.length > 0 ? new Set(values) : null;
|
|
18766
18889
|
}
|
|
18890
|
+
if (arg.kind === "Identifier" && shapes) {
|
|
18891
|
+
const shape = shapes.get(arg.name);
|
|
18892
|
+
if (shape && shape.knownKeys.size > 0 && !shape.dynamicAccess && !shape.escapes && shape.mutableKeys.size === 0) {
|
|
18893
|
+
return new Set(Array.from(shape.knownKeys));
|
|
18894
|
+
}
|
|
18895
|
+
}
|
|
18767
18896
|
}
|
|
18768
18897
|
}
|
|
18769
18898
|
}
|
|
18770
18899
|
if (expr.kind === "ConditionalExpression") {
|
|
18771
|
-
const consequent = resolveKeySet(expr.consequent, ctx);
|
|
18772
|
-
const alternate = resolveKeySet(expr.alternate, ctx);
|
|
18900
|
+
const consequent = resolveKeySet(expr.consequent, ctx, shapes);
|
|
18901
|
+
const alternate = resolveKeySet(expr.alternate, ctx, shapes);
|
|
18773
18902
|
if (consequent && alternate) {
|
|
18774
18903
|
return /* @__PURE__ */ new Set([...consequent, ...alternate]);
|
|
18775
18904
|
}
|
|
@@ -18777,7 +18906,7 @@ function resolveKeySet(expr, ctx) {
|
|
|
18777
18906
|
}
|
|
18778
18907
|
if (expr.kind === "SequenceExpression" && expr.expressions.length > 0) {
|
|
18779
18908
|
const last = expr.expressions[expr.expressions.length - 1];
|
|
18780
|
-
return resolveKeySet(last, ctx);
|
|
18909
|
+
return resolveKeySet(last, ctx, shapes);
|
|
18781
18910
|
}
|
|
18782
18911
|
return null;
|
|
18783
18912
|
}
|
|
@@ -18793,6 +18922,26 @@ function extractEqualityNarrowing(expr) {
|
|
|
18793
18922
|
};
|
|
18794
18923
|
}
|
|
18795
18924
|
}
|
|
18925
|
+
if (expr.kind === "LogicalExpression" && expr.operator === "&&") {
|
|
18926
|
+
const left = extractEqualityNarrowing(expr.left);
|
|
18927
|
+
const right = extractEqualityNarrowing(expr.right);
|
|
18928
|
+
if (left && right && left.name === right.name && left.kind === right.kind) {
|
|
18929
|
+
if (left.kind === "eq") {
|
|
18930
|
+
const intersection = /* @__PURE__ */ new Set();
|
|
18931
|
+
for (const value of left.values) {
|
|
18932
|
+
if (right.values.has(value)) intersection.add(value);
|
|
18933
|
+
}
|
|
18934
|
+
return intersection.size > 0 ? { name: left.name, values: intersection, kind: "eq" } : null;
|
|
18935
|
+
}
|
|
18936
|
+
if (left.kind === "neq") {
|
|
18937
|
+
const union = /* @__PURE__ */ new Set();
|
|
18938
|
+
for (const value of left.values) union.add(value);
|
|
18939
|
+
for (const value of right.values) union.add(value);
|
|
18940
|
+
return { name: left.name, values: union, kind: "neq" };
|
|
18941
|
+
}
|
|
18942
|
+
}
|
|
18943
|
+
return left ?? right;
|
|
18944
|
+
}
|
|
18796
18945
|
if (expr.kind !== "BinaryExpression") return null;
|
|
18797
18946
|
const isEq = expr.operator === "===";
|
|
18798
18947
|
const isNeq = expr.operator === "!==";
|
|
@@ -18834,20 +18983,20 @@ function applyNarrowing(ctx, name, values) {
|
|
|
18834
18983
|
ctx.values.delete(name);
|
|
18835
18984
|
}
|
|
18836
18985
|
}
|
|
18837
|
-
function applyKeyAssignment(ctx, name, expr) {
|
|
18986
|
+
function applyKeyAssignment(ctx, name, expr, shapes) {
|
|
18838
18987
|
ctx.values.delete(name);
|
|
18839
18988
|
ctx.keySets.delete(name);
|
|
18840
18989
|
let assignedKeys = null;
|
|
18841
18990
|
let keySet = null;
|
|
18842
18991
|
if (expr.kind === "Identifier") {
|
|
18843
18992
|
assignedKeys = resolveNarrowedKeys(expr, ctx);
|
|
18844
|
-
keySet = resolveKeySet(expr, ctx);
|
|
18993
|
+
keySet = resolveKeySet(expr, ctx, shapes);
|
|
18845
18994
|
if (ctx.keySets.has(expr.name)) {
|
|
18846
18995
|
ctx.keySets.delete(expr.name);
|
|
18847
18996
|
}
|
|
18848
18997
|
} else {
|
|
18849
18998
|
assignedKeys = resolveNarrowedKeys(expr, ctx);
|
|
18850
|
-
keySet = resolveKeySet(expr, ctx);
|
|
18999
|
+
keySet = resolveKeySet(expr, ctx, shapes);
|
|
18851
19000
|
}
|
|
18852
19001
|
if (assignedKeys && assignedKeys.size > 0) {
|
|
18853
19002
|
ctx.values.set(name, new Set(assignedKeys));
|
|
@@ -18911,6 +19060,13 @@ function analyzeObjectShapes(fn) {
|
|
|
18911
19060
|
const propertySubscription = /* @__PURE__ */ new Map();
|
|
18912
19061
|
const spreadWrapping = /* @__PURE__ */ new Set();
|
|
18913
19062
|
for (const [name, shape] of shapes) {
|
|
19063
|
+
if (shape.source.kind === "store") {
|
|
19064
|
+
const reads = propertyReads.get(name);
|
|
19065
|
+
if (reads && reads.size > 0) {
|
|
19066
|
+
propertySubscription.set(name, reads);
|
|
19067
|
+
}
|
|
19068
|
+
continue;
|
|
19069
|
+
}
|
|
18914
19070
|
if (shape.dynamicAccess || shape.source.kind === "unknown") {
|
|
18915
19071
|
wholeObjectSubscription.add(name);
|
|
18916
19072
|
} else if (shape.isSpread && !shape.escapes) {
|
|
@@ -19017,6 +19173,16 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
|
|
|
19017
19173
|
if (node.pattern) {
|
|
19018
19174
|
clearPatternBindings(node.pattern, bodyCtx);
|
|
19019
19175
|
}
|
|
19176
|
+
if (node.iterable.kind === "Identifier") {
|
|
19177
|
+
const keySet = ctx.keySets.get(node.iterable.name);
|
|
19178
|
+
if (keySet) {
|
|
19179
|
+
if (node.pattern && t2.isIdentifier(node.pattern)) {
|
|
19180
|
+
bodyCtx.values.set(node.pattern.name, new Set(keySet));
|
|
19181
|
+
} else {
|
|
19182
|
+
bodyCtx.values.set(node.variable, new Set(keySet));
|
|
19183
|
+
}
|
|
19184
|
+
}
|
|
19185
|
+
}
|
|
19020
19186
|
analyzeStructuredNode(node.body, shapes, propertyReads, bodyCtx);
|
|
19021
19187
|
}
|
|
19022
19188
|
return;
|
|
@@ -19029,6 +19195,17 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
|
|
|
19029
19195
|
if (node.pattern) {
|
|
19030
19196
|
clearPatternBindings(node.pattern, bodyCtx);
|
|
19031
19197
|
}
|
|
19198
|
+
if (node.object.kind === "Identifier") {
|
|
19199
|
+
const shape = shapes.get(node.object.name);
|
|
19200
|
+
if (shape && shape.knownKeys.size > 0 && !shape.dynamicAccess && !shape.escapes && shape.mutableKeys.size === 0) {
|
|
19201
|
+
const keySet = new Set(shape.knownKeys);
|
|
19202
|
+
if (node.pattern && t2.isIdentifier(node.pattern)) {
|
|
19203
|
+
bodyCtx.values.set(node.pattern.name, keySet);
|
|
19204
|
+
} else {
|
|
19205
|
+
bodyCtx.values.set(node.variable, keySet);
|
|
19206
|
+
}
|
|
19207
|
+
}
|
|
19208
|
+
}
|
|
19032
19209
|
analyzeStructuredNode(node.body, shapes, propertyReads, bodyCtx);
|
|
19033
19210
|
}
|
|
19034
19211
|
return;
|
|
@@ -19064,7 +19241,7 @@ function analyzeStructuredNode(node, shapes, propertyReads, ctx) {
|
|
|
19064
19241
|
}
|
|
19065
19242
|
function analyzeInstruction(instr, shapes, propertyReads, ctx) {
|
|
19066
19243
|
if (instr.kind === "Assign") {
|
|
19067
|
-
applyKeyAssignment(ctx, instr.target.name, instr.value);
|
|
19244
|
+
applyKeyAssignment(ctx, instr.target.name, instr.value, shapes);
|
|
19068
19245
|
const valueShape = analyzeExpression(instr.value, shapes, propertyReads, ctx);
|
|
19069
19246
|
if (valueShape) {
|
|
19070
19247
|
const existing = shapes.get(instr.target.name);
|
|
@@ -19182,15 +19359,22 @@ function analyzeExpression(expr, shapes, propertyReads, ctx) {
|
|
|
19182
19359
|
markEscaping(arg, shapes);
|
|
19183
19360
|
}
|
|
19184
19361
|
let returnedShape = null;
|
|
19185
|
-
if (expr.callee.kind === "Identifier" && expr.callee.name === "$state" && expr.arguments[0]) {
|
|
19362
|
+
if (expr.callee.kind === "Identifier" && (expr.callee.name === "$state" || expr.callee.name === "$store") && expr.arguments[0]) {
|
|
19186
19363
|
returnedShape = analyzeExpression(
|
|
19187
19364
|
expr.arguments[0],
|
|
19188
19365
|
shapes,
|
|
19189
19366
|
propertyReads,
|
|
19190
19367
|
ctx
|
|
19191
19368
|
);
|
|
19369
|
+
if (expr.callee.name === "$store") {
|
|
19370
|
+
if (!returnedShape) {
|
|
19371
|
+
returnedShape = createStoreShape();
|
|
19372
|
+
} else {
|
|
19373
|
+
returnedShape.source = { kind: "store" };
|
|
19374
|
+
}
|
|
19375
|
+
}
|
|
19192
19376
|
}
|
|
19193
|
-
if (!(expr.callee.kind === "Identifier" && expr.callee.name === "$state")) {
|
|
19377
|
+
if (!(expr.callee.kind === "Identifier" && (expr.callee.name === "$state" || expr.callee.name === "$store"))) {
|
|
19194
19378
|
analyzeExpression(expr.callee, shapes, propertyReads, ctx);
|
|
19195
19379
|
}
|
|
19196
19380
|
expr.arguments.slice(returnedShape ? 1 : 0).forEach((arg) => analyzeExpression(arg, shapes, propertyReads, ctx));
|
|
@@ -19229,7 +19413,7 @@ function analyzeExpression(expr, shapes, propertyReads, ctx) {
|
|
|
19229
19413
|
}
|
|
19230
19414
|
case "AssignmentExpression": {
|
|
19231
19415
|
if (expr.left.kind === "Identifier") {
|
|
19232
|
-
applyKeyAssignment(ctx, expr.left.name, expr.right);
|
|
19416
|
+
applyKeyAssignment(ctx, expr.left.name, expr.right, shapes);
|
|
19233
19417
|
}
|
|
19234
19418
|
if (expr.left.kind === "MemberExpression") {
|
|
19235
19419
|
const base = getBaseIdentifier(expr.left.object);
|
|
@@ -19725,6 +19909,10 @@ function expressionUsesTracked(expr, ctx) {
|
|
|
19725
19909
|
return expr.expressions.some((e) => expressionUsesTracked(e, ctx));
|
|
19726
19910
|
case "SpreadElement":
|
|
19727
19911
|
return expressionUsesTracked(expr.argument, ctx);
|
|
19912
|
+
case "UnaryExpression":
|
|
19913
|
+
return expressionUsesTracked(expr.argument, ctx);
|
|
19914
|
+
case "UpdateExpression":
|
|
19915
|
+
return expressionUsesTracked(expr.argument, ctx);
|
|
19728
19916
|
default:
|
|
19729
19917
|
return false;
|
|
19730
19918
|
}
|
|
@@ -19863,6 +20051,12 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
|
|
|
19863
20051
|
case "if": {
|
|
19864
20052
|
const prevConditional = ctx.inConditional ?? 0;
|
|
19865
20053
|
ctx.inConditional = prevConditional + 1;
|
|
20054
|
+
const inNonReactiveScope = !!(ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0);
|
|
20055
|
+
const mightWrapInEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx);
|
|
20056
|
+
const prevNonReactiveDepth = ctx.nonReactiveScopeDepth ?? 0;
|
|
20057
|
+
if (mightWrapInEffect) {
|
|
20058
|
+
ctx.nonReactiveScopeDepth = prevNonReactiveDepth + 1;
|
|
20059
|
+
}
|
|
19866
20060
|
const conseqStmts = lowerNodeWithRegionContext(
|
|
19867
20061
|
node.consequent,
|
|
19868
20062
|
t4,
|
|
@@ -19871,6 +20065,9 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
|
|
|
19871
20065
|
regionCtx
|
|
19872
20066
|
);
|
|
19873
20067
|
const altStmts = node.alternate ? lowerNodeWithRegionContext(node.alternate, t4, ctx, declaredVars, regionCtx) : null;
|
|
20068
|
+
if (mightWrapInEffect) {
|
|
20069
|
+
ctx.nonReactiveScopeDepth = prevNonReactiveDepth;
|
|
20070
|
+
}
|
|
19874
20071
|
ctx.inConditional = prevConditional;
|
|
19875
20072
|
const conseqReactiveOnly = nodeIsPureReactiveScope(node.consequent, ctx.memoMacroNames);
|
|
19876
20073
|
const altReactiveOnly = node.alternate ? nodeIsPureReactiveScope(node.alternate, ctx.memoMacroNames) : false;
|
|
@@ -19919,13 +20116,17 @@ function lowerNodeWithRegionContext(node, t4, ctx, declaredVars, regionCtx) {
|
|
|
19919
20116
|
}
|
|
19920
20117
|
return stmts;
|
|
19921
20118
|
}
|
|
20119
|
+
const conseqIsEmpty = conseqStmts.length === 0;
|
|
20120
|
+
const altIsEmpty = !altStmts || altStmts.length === 0;
|
|
20121
|
+
if (conseqIsEmpty && altIsEmpty) {
|
|
20122
|
+
return [];
|
|
20123
|
+
}
|
|
19922
20124
|
const ifStmt = t4.ifStatement(
|
|
19923
20125
|
testExpr,
|
|
19924
20126
|
t4.blockStatement(conseqStmts),
|
|
19925
20127
|
altStmts ? t4.blockStatement(altStmts) : null
|
|
19926
20128
|
);
|
|
19927
|
-
const
|
|
19928
|
-
const shouldWrapEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx) && !statementHasEarlyExit(ifStmt, t4);
|
|
20129
|
+
const shouldWrapEffect = mightWrapInEffect && !statementHasEarlyExit(ifStmt, t4);
|
|
19929
20130
|
if (shouldWrapEffect) {
|
|
19930
20131
|
const effectFn = t4.arrowFunctionExpression([], t4.blockStatement([ifStmt]));
|
|
19931
20132
|
return [t4.expressionStatement(buildEffectCall(ctx, t4, effectFn))];
|
|
@@ -20146,7 +20347,7 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
|
|
|
20146
20347
|
}
|
|
20147
20348
|
case "if": {
|
|
20148
20349
|
const inNonReactiveScope = !!(ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0);
|
|
20149
|
-
const
|
|
20350
|
+
const mightWrapInEffect = ctx.wrapTrackedExpressions !== false && !ctx.inRegionMemo && !inNonReactiveScope && expressionUsesTracked(node.test, ctx);
|
|
20150
20351
|
const lowerChild = (child, forceNonReactive) => {
|
|
20151
20352
|
if (!child) return [];
|
|
20152
20353
|
if (!forceNonReactive) {
|
|
@@ -20176,8 +20377,8 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
|
|
|
20176
20377
|
ctx.nonReactiveScopeDepth = prevDepth;
|
|
20177
20378
|
}
|
|
20178
20379
|
};
|
|
20179
|
-
let consequent = lowerChild(node.consequent,
|
|
20180
|
-
let alternate = node.alternate ? lowerChild(node.alternate,
|
|
20380
|
+
let consequent = lowerChild(node.consequent, mightWrapInEffect);
|
|
20381
|
+
let alternate = node.alternate ? lowerChild(node.alternate, mightWrapInEffect) : [];
|
|
20181
20382
|
if (consequent.length === 0 && alternate.length === 0) return [];
|
|
20182
20383
|
const buildIfStmt = (cons, alt) => t4.ifStatement(
|
|
20183
20384
|
lowerExpressionWithDeSSA(node.test, ctx),
|
|
@@ -20185,8 +20386,9 @@ function lowerStructuredNodeForRegion(node, region, t4, ctx, declaredVars, regio
|
|
|
20185
20386
|
alt.length > 0 ? t4.blockStatement(alt) : null
|
|
20186
20387
|
);
|
|
20187
20388
|
let ifStmt = buildIfStmt(consequent, alternate);
|
|
20188
|
-
const
|
|
20189
|
-
|
|
20389
|
+
const hasEarlyExit = statementHasEarlyExit(ifStmt, t4);
|
|
20390
|
+
const shouldWrapEffect = mightWrapInEffect && !hasEarlyExit;
|
|
20391
|
+
if (!shouldWrapEffect && mightWrapInEffect && !hasEarlyExit) {
|
|
20190
20392
|
consequent = lowerChild(node.consequent, false);
|
|
20191
20393
|
alternate = node.alternate ? lowerChild(node.alternate, false) : [];
|
|
20192
20394
|
if (consequent.length === 0 && alternate.length === 0) return [];
|
|
@@ -20648,19 +20850,6 @@ function wrapInMemo(region, t4, declaredVars, ctx, bodyStatementsOverride, outpu
|
|
|
20648
20850
|
);
|
|
20649
20851
|
ctx.memoVars?.add(name);
|
|
20650
20852
|
}
|
|
20651
|
-
if (region.hasControlFlow && getterOutputs.length > 0) {
|
|
20652
|
-
const effectBody = t4.blockStatement(
|
|
20653
|
-
getterOutputs.map((name) => t4.expressionStatement(t4.callExpression(t4.identifier(name), [])))
|
|
20654
|
-
);
|
|
20655
|
-
statements.push(
|
|
20656
|
-
t4.expressionStatement(
|
|
20657
|
-
buildEffectCall(ctx, t4, t4.arrowFunctionExpression([], effectBody), {
|
|
20658
|
-
slot: ctx.inModule ? void 0 : reserveHookSlot(ctx),
|
|
20659
|
-
forceSlot: true
|
|
20660
|
-
})
|
|
20661
|
-
)
|
|
20662
|
-
);
|
|
20663
|
-
}
|
|
20664
20853
|
}
|
|
20665
20854
|
return statements;
|
|
20666
20855
|
}
|
|
@@ -20906,11 +21095,15 @@ function reserveHookSlot(ctx) {
|
|
|
20906
21095
|
ctx.nextHookSlot = slot + 1;
|
|
20907
21096
|
return slot;
|
|
20908
21097
|
}
|
|
21098
|
+
function createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4) {
|
|
21099
|
+
ctx.trackedVars.delete(baseName2);
|
|
21100
|
+
ctx.memoVars?.delete(baseName2);
|
|
21101
|
+
return t4.variableDeclaration("let", [t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)]);
|
|
21102
|
+
}
|
|
20909
21103
|
function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
|
|
20910
21104
|
if (instr.kind === "Assign") {
|
|
20911
21105
|
const ssaName = instr.target.name;
|
|
20912
21106
|
const baseName2 = deSSAVarName(ssaName);
|
|
20913
|
-
const memoMacroNames = ctx.memoMacroNames ?? /* @__PURE__ */ new Set(["$memo", "createMemo"]);
|
|
20914
21107
|
const declKindRaw = instr.declarationKind;
|
|
20915
21108
|
propagateHookResultAlias(baseName2, instr.value, ctx);
|
|
20916
21109
|
const hookMember = resolveHookMemberValue(instr.value, ctx);
|
|
@@ -20960,12 +21153,14 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
|
|
|
20960
21153
|
const isShadowDeclaration = !!declKind && declaredVars.has(baseName2);
|
|
20961
21154
|
const treatAsTracked = !isShadowDeclaration && isTracked;
|
|
20962
21155
|
const isDestructuringTemp = baseName2.startsWith("__destruct_");
|
|
20963
|
-
const
|
|
21156
|
+
const callKind = getReactiveCallKind(instr.value, ctx);
|
|
21157
|
+
const isStateCall2 = callKind === "signal";
|
|
20964
21158
|
const inRegionMemo = ctx.inRegionMemo ?? false;
|
|
20965
21159
|
const isFunctionValue = instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression";
|
|
20966
|
-
const isAccessorReturningCall = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" &&
|
|
21160
|
+
const isAccessorReturningCall = callKind === "memo" || instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "prop";
|
|
20967
21161
|
const isReactiveObjectCall = instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && ["mergeProps"].includes(instr.value.callee.name);
|
|
20968
21162
|
const isMemoReturningCall = isAccessorReturningCall || isReactiveObjectCall;
|
|
21163
|
+
const needsMutable = ctx.mutatedVars?.has(baseName2) ?? false;
|
|
20969
21164
|
const lowerAssignedValue = (forceAssigned = false) => lowerExpressionWithDeSSA(instr.value, ctx, forceAssigned || isFunctionValue);
|
|
20970
21165
|
const buildDerivedMemoCall = (expr) => {
|
|
20971
21166
|
const slot = !ctx.inModule && inRegionMemo ? reserveHookSlot(ctx) : void 0;
|
|
@@ -20976,7 +21171,6 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
|
|
|
20976
21171
|
}
|
|
20977
21172
|
if (declKind) {
|
|
20978
21173
|
const normalizedDecl = isStateCall2 || dependsOnTracked && !isDestructuringTemp ? "const" : declKind;
|
|
20979
|
-
const needsMutable = ctx.mutatedVars?.has(baseName2) ?? false;
|
|
20980
21174
|
const isExternalAlias = declKind === "const" && instr.value.kind === "Identifier" && !(ctx.scopes?.byName?.has(deSSAVarName(instr.value.name)) ?? false);
|
|
20981
21175
|
const fallbackDecl = !treatAsTracked && (!dependsOnTracked || isDestructuringTemp) ? declKind === "const" && (needsMutable || isExternalAlias) ? "let" : declKind : normalizedDecl;
|
|
20982
21176
|
declaredVars.add(baseName2);
|
|
@@ -20992,7 +21186,11 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
|
|
|
20992
21186
|
}
|
|
20993
21187
|
const derivedExpr = lowerAssignedValue(true);
|
|
20994
21188
|
if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
|
|
20995
|
-
return
|
|
21189
|
+
return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
|
|
21190
|
+
}
|
|
21191
|
+
if (needsMutable) {
|
|
21192
|
+
ctx.memoVars?.delete(baseName2);
|
|
21193
|
+
return t4.variableDeclaration("let", [
|
|
20996
21194
|
t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
|
|
20997
21195
|
]);
|
|
20998
21196
|
}
|
|
@@ -21019,7 +21217,11 @@ function instructionToStatement(instr, t4, declaredVars, ctx, _buildMemoCall) {
|
|
|
21019
21217
|
}
|
|
21020
21218
|
const derivedExpr = lowerAssignedValue(true);
|
|
21021
21219
|
if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
|
|
21022
|
-
return
|
|
21220
|
+
return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
|
|
21221
|
+
}
|
|
21222
|
+
if (needsMutable) {
|
|
21223
|
+
ctx.memoVars?.delete(baseName2);
|
|
21224
|
+
return t4.variableDeclaration("let", [
|
|
21023
21225
|
t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
|
|
21024
21226
|
]);
|
|
21025
21227
|
}
|
|
@@ -21134,7 +21336,10 @@ Consider:
|
|
|
21134
21336
|
if (dependsOnTracked) {
|
|
21135
21337
|
const derivedExpr = lowerAssignedValue(true);
|
|
21136
21338
|
if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
|
|
21137
|
-
return
|
|
21339
|
+
return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
|
|
21340
|
+
}
|
|
21341
|
+
if (needsMutable) {
|
|
21342
|
+
return t4.variableDeclaration("let", [
|
|
21138
21343
|
t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
|
|
21139
21344
|
]);
|
|
21140
21345
|
}
|
|
@@ -21161,6 +21366,9 @@ Consider:
|
|
|
21161
21366
|
if (dependsOnTracked) {
|
|
21162
21367
|
const derivedExpr = lowerAssignedValue(true);
|
|
21163
21368
|
if (ctx.nonReactiveScopeDepth && ctx.nonReactiveScopeDepth > 0) {
|
|
21369
|
+
return createNonReactiveVarDecl(baseName2, derivedExpr, ctx, t4);
|
|
21370
|
+
}
|
|
21371
|
+
if (needsMutable) {
|
|
21164
21372
|
return t4.variableDeclaration("let", [
|
|
21165
21373
|
t4.variableDeclarator(t4.identifier(baseName2), derivedExpr)
|
|
21166
21374
|
]);
|
|
@@ -21206,7 +21414,8 @@ Consider:
|
|
|
21206
21414
|
const loweredExpr = lowerExpressionWithDeSSA(instr.value, ctx);
|
|
21207
21415
|
const effectBody = depReads.length > 0 ? ctx.t.blockStatement([...depReads, ctx.t.expressionStatement(loweredExpr)]) : loweredExpr;
|
|
21208
21416
|
const effectFn = ctx.t.isBlockStatement(effectBody) ? t4.arrowFunctionExpression([], effectBody) : t4.arrowFunctionExpression([], effectBody);
|
|
21209
|
-
|
|
21417
|
+
const slot = ctx.inModule ? void 0 : reserveHookSlot(ctx);
|
|
21418
|
+
return t4.expressionStatement(buildEffectCall(ctx, t4, effectFn, { slot }));
|
|
21210
21419
|
}
|
|
21211
21420
|
return t4.expressionStatement(lowerExpressionWithDeSSA(instr.value, ctx));
|
|
21212
21421
|
}
|
|
@@ -21856,6 +22065,9 @@ function createCodegenContext(t4) {
|
|
|
21856
22065
|
t: t4,
|
|
21857
22066
|
moduleDeclaredNames: /* @__PURE__ */ new Set(),
|
|
21858
22067
|
moduleRuntimeNames: /* @__PURE__ */ new Set(),
|
|
22068
|
+
moduleRuntimeImportMap: /* @__PURE__ */ new Map(),
|
|
22069
|
+
moduleRuntimeNamespaceImports: /* @__PURE__ */ new Set(),
|
|
22070
|
+
stateMacroNames: /* @__PURE__ */ new Set(),
|
|
21859
22071
|
localDeclaredNames: /* @__PURE__ */ new Set(),
|
|
21860
22072
|
helpersUsed: /* @__PURE__ */ new Set(),
|
|
21861
22073
|
tempCounter: 0,
|
|
@@ -21915,9 +22127,10 @@ function withGetterCache(ctx, fn) {
|
|
|
21915
22127
|
ctx.getterCacheEnabled = prevEnabled;
|
|
21916
22128
|
return { result, cacheDeclarations };
|
|
21917
22129
|
}
|
|
21918
|
-
function collectHookReactiveVars(fn) {
|
|
22130
|
+
function collectHookReactiveVars(fn, ctx) {
|
|
21919
22131
|
const signalVars = /* @__PURE__ */ new Set();
|
|
21920
22132
|
const storeVars = /* @__PURE__ */ new Set();
|
|
22133
|
+
const memoVars = /* @__PURE__ */ new Set();
|
|
21921
22134
|
const functionVars = /* @__PURE__ */ new Set();
|
|
21922
22135
|
const mutatedVars = /* @__PURE__ */ new Set();
|
|
21923
22136
|
for (const block of fn.blocks) {
|
|
@@ -21927,11 +22140,14 @@ function collectHookReactiveVars(fn) {
|
|
|
21927
22140
|
if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
|
|
21928
22141
|
functionVars.add(target);
|
|
21929
22142
|
}
|
|
21930
|
-
if (instr.value.kind === "CallExpression"
|
|
21931
|
-
|
|
22143
|
+
if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
|
|
22144
|
+
const callKind = getReactiveCallKind(instr.value, ctx);
|
|
22145
|
+
if (callKind === "signal") {
|
|
21932
22146
|
signalVars.add(target);
|
|
21933
|
-
} else if (
|
|
22147
|
+
} else if (callKind === "store") {
|
|
21934
22148
|
storeVars.add(target);
|
|
22149
|
+
} else if (callKind === "memo") {
|
|
22150
|
+
memoVars.add(target);
|
|
21935
22151
|
}
|
|
21936
22152
|
}
|
|
21937
22153
|
if (!instr.declarationKind) {
|
|
@@ -21942,11 +22158,14 @@ function collectHookReactiveVars(fn) {
|
|
|
21942
22158
|
}
|
|
21943
22159
|
}
|
|
21944
22160
|
}
|
|
21945
|
-
return { signalVars, storeVars, functionVars, mutatedVars };
|
|
22161
|
+
return { signalVars, storeVars, memoVars, functionVars, mutatedVars };
|
|
21946
22162
|
}
|
|
21947
22163
|
function analyzeHookReturnInfo(fn, ctx) {
|
|
21948
22164
|
if (!isHookName(fn.name)) return null;
|
|
21949
|
-
const { signalVars, storeVars, functionVars, mutatedVars } = collectHookReactiveVars(
|
|
22165
|
+
const { signalVars, storeVars, memoVars, functionVars, mutatedVars } = collectHookReactiveVars(
|
|
22166
|
+
fn,
|
|
22167
|
+
ctx
|
|
22168
|
+
);
|
|
21950
22169
|
const tmpCtx = createCodegenContext(ctx.t);
|
|
21951
22170
|
tmpCtx.signalVars = new Set(signalVars);
|
|
21952
22171
|
tmpCtx.storeVars = new Set(storeVars);
|
|
@@ -21954,9 +22173,9 @@ function analyzeHookReturnInfo(fn, ctx) {
|
|
|
21954
22173
|
tmpCtx.mutatedVars = new Set(mutatedVars);
|
|
21955
22174
|
tmpCtx.aliasVars = /* @__PURE__ */ new Set();
|
|
21956
22175
|
tmpCtx.trackedVars = /* @__PURE__ */ new Set();
|
|
21957
|
-
tmpCtx.memoVars =
|
|
22176
|
+
tmpCtx.memoVars = new Set(memoVars);
|
|
21958
22177
|
const scopeResult = analyzeReactiveScopesWithSSA(fn);
|
|
21959
|
-
detectDerivedCycles(fn, scopeResult);
|
|
22178
|
+
detectDerivedCycles(fn, scopeResult, ctx);
|
|
21960
22179
|
tmpCtx.scopes = scopeResult;
|
|
21961
22180
|
const regionResult = generateRegions(fn, scopeResult);
|
|
21962
22181
|
tmpCtx.regions = flattenRegions(regionResult.topLevelRegions);
|
|
@@ -22098,23 +22317,32 @@ function getCachedGetterExpression(ctx, getterName, callExpr) {
|
|
|
22098
22317
|
}
|
|
22099
22318
|
return ctx.t.identifier(existingEntry);
|
|
22100
22319
|
}
|
|
22101
|
-
function getOrCreateHoistedTemplate(html, ctx) {
|
|
22320
|
+
function getOrCreateHoistedTemplate(html, ctx, isSVG, isMathML) {
|
|
22102
22321
|
if (!ctx.inListRender || !ctx.hoistedTemplates || !ctx.hoistedTemplateStatements) {
|
|
22103
22322
|
return null;
|
|
22104
22323
|
}
|
|
22105
|
-
const
|
|
22324
|
+
const cacheKey = isSVG ? `svg:${html}` : isMathML ? `mathml:${html}` : html;
|
|
22325
|
+
const existing = ctx.hoistedTemplates.get(cacheKey);
|
|
22106
22326
|
if (existing) {
|
|
22107
22327
|
return existing;
|
|
22108
22328
|
}
|
|
22109
22329
|
const { t: t4 } = ctx;
|
|
22110
22330
|
ctx.helpersUsed.add("template");
|
|
22111
22331
|
const tmplId = genTemp(ctx, "htmpl");
|
|
22112
|
-
ctx.hoistedTemplates.set(
|
|
22332
|
+
ctx.hoistedTemplates.set(cacheKey, tmplId);
|
|
22333
|
+
const templateArgs = [t4.stringLiteral(html)];
|
|
22334
|
+
if (isSVG || isMathML) {
|
|
22335
|
+
templateArgs.push(t4.identifier("undefined"));
|
|
22336
|
+
templateArgs.push(isSVG ? t4.booleanLiteral(true) : t4.identifier("undefined"));
|
|
22337
|
+
if (isMathML) {
|
|
22338
|
+
templateArgs.push(t4.booleanLiteral(true));
|
|
22339
|
+
}
|
|
22340
|
+
}
|
|
22113
22341
|
ctx.hoistedTemplateStatements.push(
|
|
22114
22342
|
t4.variableDeclaration("const", [
|
|
22115
22343
|
t4.variableDeclarator(
|
|
22116
22344
|
tmplId,
|
|
22117
|
-
t4.callExpression(t4.identifier(RUNTIME_ALIASES.template),
|
|
22345
|
+
t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), templateArgs)
|
|
22118
22346
|
)
|
|
22119
22347
|
])
|
|
22120
22348
|
);
|
|
@@ -22156,7 +22384,7 @@ function matchesListKeyPattern(expr, ctx) {
|
|
|
22156
22384
|
const exprPropName = expr.property.kind === "Identifier" ? expr.property.name : String(expr.property.value);
|
|
22157
22385
|
return exprPropName === keyPropName;
|
|
22158
22386
|
}
|
|
22159
|
-
function detectDerivedCycles(fn, _scopeResult) {
|
|
22387
|
+
function detectDerivedCycles(fn, _scopeResult, ctx) {
|
|
22160
22388
|
if (debugEnabled("cycles_throw")) {
|
|
22161
22389
|
throw new Error("cycle check invoked");
|
|
22162
22390
|
}
|
|
@@ -22165,11 +22393,12 @@ function detectDerivedCycles(fn, _scopeResult) {
|
|
|
22165
22393
|
for (const instr of block.instructions) {
|
|
22166
22394
|
if (instr.kind !== "Assign") continue;
|
|
22167
22395
|
const target = deSSAVarName(instr.target.name);
|
|
22168
|
-
const
|
|
22169
|
-
const
|
|
22396
|
+
const callKind = getReactiveCallKind(instr.value, ctx);
|
|
22397
|
+
const isSignalCall = callKind === "signal";
|
|
22398
|
+
const isStoreCall = callKind === "store";
|
|
22170
22399
|
const prev = declared.get(target);
|
|
22171
22400
|
declared.set(target, {
|
|
22172
|
-
|
|
22401
|
+
isSignal: (prev?.isSignal ?? false) || isSignalCall,
|
|
22173
22402
|
isStore: (prev?.isStore ?? false) || isStoreCall,
|
|
22174
22403
|
declaredHere: prev?.declaredHere || !!instr.declarationKind,
|
|
22175
22404
|
count: (prev?.count ?? 0) + 1
|
|
@@ -22182,7 +22411,7 @@ function detectDerivedCycles(fn, _scopeResult) {
|
|
|
22182
22411
|
if (instr.kind !== "Assign") continue;
|
|
22183
22412
|
const target = deSSAVarName(instr.target.name);
|
|
22184
22413
|
const declInfo = declared.get(target);
|
|
22185
|
-
if (declInfo?.
|
|
22414
|
+
if (declInfo?.isSignal || declInfo?.isStore || !declInfo?.declaredHere) continue;
|
|
22186
22415
|
if ((declInfo.count ?? 0) !== 1) continue;
|
|
22187
22416
|
const deps = graph.get(target) ?? /* @__PURE__ */ new Set();
|
|
22188
22417
|
const rawDeps = /* @__PURE__ */ new Set();
|
|
@@ -22190,7 +22419,7 @@ function detectDerivedCycles(fn, _scopeResult) {
|
|
|
22190
22419
|
for (const dep of rawDeps) {
|
|
22191
22420
|
const base = deSSAVarName(dep.split(".")[0] ?? dep);
|
|
22192
22421
|
const depInfo = declared.get(base);
|
|
22193
|
-
if (depInfo && depInfo.declaredHere && !depInfo.
|
|
22422
|
+
if (depInfo && depInfo.declaredHere && !depInfo.isSignal && !depInfo.isStore && (depInfo.count ?? 0) === 1) {
|
|
22194
22423
|
deps.add(base);
|
|
22195
22424
|
}
|
|
22196
22425
|
}
|
|
@@ -22902,20 +23131,28 @@ function lowerInstruction(instr, ctx) {
|
|
|
22902
23131
|
}
|
|
22903
23132
|
}
|
|
22904
23133
|
if (ctx.signalVars?.has(baseName2)) {
|
|
23134
|
+
ctx.currentAssignmentName = baseName2;
|
|
23135
|
+
const loweredValue = (() => {
|
|
23136
|
+
try {
|
|
23137
|
+
return lowerTrackedExpression(instr.value, ctx);
|
|
23138
|
+
} finally {
|
|
23139
|
+
ctx.currentAssignmentName = void 0;
|
|
23140
|
+
}
|
|
23141
|
+
})();
|
|
22905
23142
|
return applyLoc(
|
|
22906
|
-
t4.expressionStatement(
|
|
22907
|
-
t4.callExpression(t4.identifier(baseName2), [lowerTrackedExpression(instr.value, ctx)])
|
|
22908
|
-
)
|
|
23143
|
+
t4.expressionStatement(t4.callExpression(t4.identifier(baseName2), [loweredValue]))
|
|
22909
23144
|
);
|
|
22910
23145
|
}
|
|
23146
|
+
ctx.currentAssignmentName = baseName2;
|
|
23147
|
+
const loweredAssign = (() => {
|
|
23148
|
+
try {
|
|
23149
|
+
return lowerTrackedExpression(instr.value, ctx);
|
|
23150
|
+
} finally {
|
|
23151
|
+
ctx.currentAssignmentName = void 0;
|
|
23152
|
+
}
|
|
23153
|
+
})();
|
|
22911
23154
|
return applyLoc(
|
|
22912
|
-
t4.expressionStatement(
|
|
22913
|
-
t4.assignmentExpression(
|
|
22914
|
-
"=",
|
|
22915
|
-
t4.identifier(baseName2),
|
|
22916
|
-
lowerTrackedExpression(instr.value, ctx)
|
|
22917
|
-
)
|
|
22918
|
-
)
|
|
23155
|
+
t4.expressionStatement(t4.assignmentExpression("=", t4.identifier(baseName2), loweredAssign))
|
|
22919
23156
|
);
|
|
22920
23157
|
}
|
|
22921
23158
|
if (instr.kind === "Expression") {
|
|
@@ -22933,16 +23170,18 @@ function lowerTerminator(block, ctx) {
|
|
|
22933
23170
|
const applyLoc = (stmts) => stmts.map((stmt) => setNodeLoc(stmt, baseLoc));
|
|
22934
23171
|
switch (block.terminator.kind) {
|
|
22935
23172
|
case "Return": {
|
|
22936
|
-
const prevRegion = ctx.currentRegion;
|
|
22937
23173
|
const preserveAccessors = ctx.currentFnIsHook;
|
|
22938
|
-
|
|
23174
|
+
const prevHookFlag = ctx.currentFnIsHook;
|
|
23175
|
+
if (preserveAccessors) ctx.currentFnIsHook = false;
|
|
22939
23176
|
ctx.inReturn = true;
|
|
22940
23177
|
let retExpr = block.terminator.argument ? lowerTrackedExpression(block.terminator.argument, ctx) : null;
|
|
23178
|
+
ctx.inReturn = false;
|
|
23179
|
+
if (preserveAccessors) {
|
|
23180
|
+
ctx.currentFnIsHook = prevHookFlag;
|
|
23181
|
+
}
|
|
22941
23182
|
if (preserveAccessors && retExpr) {
|
|
22942
23183
|
retExpr = unwrapAccessorCalls(retExpr, ctx);
|
|
22943
23184
|
}
|
|
22944
|
-
ctx.inReturn = false;
|
|
22945
|
-
ctx.currentRegion = prevRegion;
|
|
22946
23185
|
return applyLoc([t4.returnStatement(retExpr)]);
|
|
22947
23186
|
}
|
|
22948
23187
|
case "Throw":
|
|
@@ -23102,17 +23341,92 @@ function collectDeclaredNames(body, t4) {
|
|
|
23102
23341
|
}
|
|
23103
23342
|
return declared;
|
|
23104
23343
|
}
|
|
23105
|
-
|
|
23106
|
-
|
|
23107
|
-
|
|
23344
|
+
var RUNTIME_IMPORT_MODULES = /* @__PURE__ */ new Set([
|
|
23345
|
+
RUNTIME_MODULE,
|
|
23346
|
+
"@fictjs/runtime",
|
|
23347
|
+
"@fictjs/runtime/advanced",
|
|
23348
|
+
"fict",
|
|
23349
|
+
"fict/advanced"
|
|
23350
|
+
]);
|
|
23351
|
+
function collectRuntimeImports(body, t4) {
|
|
23352
|
+
const names = /* @__PURE__ */ new Set();
|
|
23353
|
+
const importMap = /* @__PURE__ */ new Map();
|
|
23354
|
+
const namespaces = /* @__PURE__ */ new Set();
|
|
23108
23355
|
for (const stmt of body) {
|
|
23109
23356
|
if (!t4.isImportDeclaration(stmt)) continue;
|
|
23110
|
-
if (
|
|
23357
|
+
if (stmt.importKind === "type") continue;
|
|
23358
|
+
if (!RUNTIME_IMPORT_MODULES.has(stmt.source.value)) continue;
|
|
23111
23359
|
for (const spec of stmt.specifiers) {
|
|
23112
|
-
|
|
23360
|
+
if (t4.isImportSpecifier(spec) && spec.importKind === "type") {
|
|
23361
|
+
continue;
|
|
23362
|
+
}
|
|
23363
|
+
names.add(spec.local.name);
|
|
23364
|
+
if (t4.isImportSpecifier(spec)) {
|
|
23365
|
+
const importedName = t4.isIdentifier(spec.imported) ? spec.imported.name : spec.imported.value;
|
|
23366
|
+
importMap.set(spec.local.name, importedName);
|
|
23367
|
+
} else if (t4.isImportNamespaceSpecifier(spec) || t4.isImportDefaultSpecifier(spec)) {
|
|
23368
|
+
namespaces.add(spec.local.name);
|
|
23369
|
+
}
|
|
23113
23370
|
}
|
|
23114
23371
|
}
|
|
23115
|
-
return
|
|
23372
|
+
return { names, importMap, namespaces };
|
|
23373
|
+
}
|
|
23374
|
+
var RUNTIME_REACTIVE_CREATORS = /* @__PURE__ */ new Map([
|
|
23375
|
+
["createSignal", "signal"],
|
|
23376
|
+
["createStore", "store"],
|
|
23377
|
+
["createMemo", "memo"]
|
|
23378
|
+
]);
|
|
23379
|
+
function isNameShadowed(name, ctx) {
|
|
23380
|
+
return !!(ctx.shadowedNames?.has(name) || ctx.localDeclaredNames?.has(name));
|
|
23381
|
+
}
|
|
23382
|
+
function getRuntimeImportedKind(name, ctx) {
|
|
23383
|
+
if (isNameShadowed(name, ctx)) return null;
|
|
23384
|
+
const imported = ctx.moduleRuntimeImportMap?.get(name);
|
|
23385
|
+
if (!imported) return null;
|
|
23386
|
+
return RUNTIME_REACTIVE_CREATORS.get(imported) ?? null;
|
|
23387
|
+
}
|
|
23388
|
+
function getRuntimeMemberKind(expr, ctx) {
|
|
23389
|
+
if (expr.kind !== "MemberExpression" && expr.kind !== "OptionalMemberExpression") return null;
|
|
23390
|
+
if (expr.object.kind !== "Identifier") return null;
|
|
23391
|
+
const objectName = deSSAVarName(expr.object.name);
|
|
23392
|
+
if (isNameShadowed(objectName, ctx)) return null;
|
|
23393
|
+
if (!ctx.moduleRuntimeNamespaceImports?.has(objectName)) return null;
|
|
23394
|
+
const propName = getStaticPropName(expr.property, expr.computed);
|
|
23395
|
+
if (typeof propName !== "string") return null;
|
|
23396
|
+
return RUNTIME_REACTIVE_CREATORS.get(propName) ?? null;
|
|
23397
|
+
}
|
|
23398
|
+
function getReactiveCallKind(expr, ctx) {
|
|
23399
|
+
if (expr.kind !== "CallExpression" && expr.kind !== "OptionalCallExpression") return null;
|
|
23400
|
+
const callee = expr.callee;
|
|
23401
|
+
if (callee.kind === "Identifier") {
|
|
23402
|
+
const name = deSSAVarName(callee.name);
|
|
23403
|
+
if (ctx.stateMacroNames?.has(name)) return "signal";
|
|
23404
|
+
if (name === "$store") return "store";
|
|
23405
|
+
if (ctx.memoMacroNames?.has(name)) return "memo";
|
|
23406
|
+
return getRuntimeImportedKind(name, ctx);
|
|
23407
|
+
}
|
|
23408
|
+
return getRuntimeMemberKind(callee, ctx);
|
|
23409
|
+
}
|
|
23410
|
+
function getReactiveCallKindFromBabel(callExpr, ctx, t4) {
|
|
23411
|
+
const callee = callExpr.callee;
|
|
23412
|
+
if (t4.isIdentifier(callee)) {
|
|
23413
|
+
const name = callee.name;
|
|
23414
|
+
if (ctx.stateMacroNames?.has(name)) return "signal";
|
|
23415
|
+
if (name === "$store") return "store";
|
|
23416
|
+
if (ctx.memoMacroNames?.has(name)) return "memo";
|
|
23417
|
+
return getRuntimeImportedKind(name, ctx);
|
|
23418
|
+
}
|
|
23419
|
+
if (t4.isMemberExpression(callee) || t4.isOptionalMemberExpression(callee)) {
|
|
23420
|
+
const memberCallee = callee;
|
|
23421
|
+
if (!t4.isIdentifier(memberCallee.object)) return null;
|
|
23422
|
+
const objectName = memberCallee.object.name;
|
|
23423
|
+
if (isNameShadowed(objectName, ctx)) return null;
|
|
23424
|
+
if (!ctx.moduleRuntimeNamespaceImports?.has(objectName)) return null;
|
|
23425
|
+
const propName = t4.isIdentifier(memberCallee.property) ? memberCallee.property.name : t4.isStringLiteral(memberCallee.property) ? memberCallee.property.value : t4.isNumericLiteral(memberCallee.property) ? String(memberCallee.property.value) : null;
|
|
23426
|
+
if (!propName) return null;
|
|
23427
|
+
return RUNTIME_REACTIVE_CREATORS.get(propName) ?? null;
|
|
23428
|
+
}
|
|
23429
|
+
return null;
|
|
23116
23430
|
}
|
|
23117
23431
|
function addImportedReactiveBinding(name, kind, ctx) {
|
|
23118
23432
|
const base = deSSAVarName(name);
|
|
@@ -23177,7 +23491,7 @@ function classifyReactiveExport(name, ctx) {
|
|
|
23177
23491
|
if (ctx.memoVars?.has(base)) return "memo";
|
|
23178
23492
|
return null;
|
|
23179
23493
|
}
|
|
23180
|
-
function buildModuleReactiveMetadata(body, ctx, t4, options
|
|
23494
|
+
function buildModuleReactiveMetadata(body, ctx, t4, options) {
|
|
23181
23495
|
const metadata = { exports: {} };
|
|
23182
23496
|
const hookExports = {};
|
|
23183
23497
|
const addExport = (exportName, localName) => {
|
|
@@ -23264,13 +23578,9 @@ function buildModuleReactiveMetadata(body, ctx, t4, options, stateMacroNames, me
|
|
|
23264
23578
|
addExport("default", decl.id.name);
|
|
23265
23579
|
} else if (t4.isClassDeclaration(decl) && decl.id) {
|
|
23266
23580
|
addExport("default", decl.id.name);
|
|
23267
|
-
} else if (t4.isCallExpression(decl)
|
|
23268
|
-
const
|
|
23269
|
-
|
|
23270
|
-
addDefaultExportKind(callee === "$store" ? "store" : "signal");
|
|
23271
|
-
} else if (memoMacroNames.has(callee)) {
|
|
23272
|
-
addDefaultExportKind("memo");
|
|
23273
|
-
}
|
|
23581
|
+
} else if (t4.isCallExpression(decl) || t4.isOptionalCallExpression(decl)) {
|
|
23582
|
+
const kind = getReactiveCallKindFromBabel(decl, ctx, t4);
|
|
23583
|
+
addDefaultExportKind(kind);
|
|
23274
23584
|
}
|
|
23275
23585
|
}
|
|
23276
23586
|
}
|
|
@@ -23487,6 +23797,45 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
|
|
|
23487
23797
|
return lowerBlocksToStatements(blocks);
|
|
23488
23798
|
}
|
|
23489
23799
|
};
|
|
23800
|
+
const lowerReactiveScopeExpression = (fnExpr) => {
|
|
23801
|
+
if (!fnExpr.reactiveScope) return null;
|
|
23802
|
+
const blocks = Array.isArray(fnExpr.body) ? fnExpr.body : [
|
|
23803
|
+
{
|
|
23804
|
+
id: 0,
|
|
23805
|
+
instructions: [],
|
|
23806
|
+
terminator: {
|
|
23807
|
+
kind: "Return",
|
|
23808
|
+
argument: fnExpr.body
|
|
23809
|
+
}
|
|
23810
|
+
}
|
|
23811
|
+
];
|
|
23812
|
+
const fn = {
|
|
23813
|
+
params: fnExpr.params,
|
|
23814
|
+
blocks,
|
|
23815
|
+
meta: {
|
|
23816
|
+
fromExpression: true,
|
|
23817
|
+
isArrow: fnExpr.kind === "ArrowFunction",
|
|
23818
|
+
hasExpressionBody: fnExpr.kind === "ArrowFunction" && fnExpr.isExpression,
|
|
23819
|
+
isAsync: fnExpr.isAsync ?? false
|
|
23820
|
+
},
|
|
23821
|
+
loc: fnExpr.loc ?? null
|
|
23822
|
+
};
|
|
23823
|
+
const lowered = lowerFunctionWithRegions(fn, ctx, { forceHookContext: true });
|
|
23824
|
+
if (!lowered) return null;
|
|
23825
|
+
const params = lowered.params;
|
|
23826
|
+
if (fnExpr.kind === "ArrowFunction") {
|
|
23827
|
+
const arrow = t4.arrowFunctionExpression(params, lowered.body);
|
|
23828
|
+
arrow.async = lowered.async;
|
|
23829
|
+
return arrow;
|
|
23830
|
+
}
|
|
23831
|
+
const fnExprAst = t4.functionExpression(
|
|
23832
|
+
fnExpr.name ? t4.identifier(deSSAVarName(fnExpr.name)) : null,
|
|
23833
|
+
params,
|
|
23834
|
+
lowered.body
|
|
23835
|
+
);
|
|
23836
|
+
fnExprAst.async = lowered.async;
|
|
23837
|
+
return fnExprAst;
|
|
23838
|
+
};
|
|
23490
23839
|
switch (expr.kind) {
|
|
23491
23840
|
case "Identifier":
|
|
23492
23841
|
return t4.identifier(deSSAVarName(expr.name));
|
|
@@ -23508,6 +23857,22 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
|
|
|
23508
23857
|
case "CallExpression": {
|
|
23509
23858
|
if (expr.callee.kind === "Identifier" && expr.callee.name === "$state") {
|
|
23510
23859
|
const args = lowerCallArguments(expr.arguments);
|
|
23860
|
+
const includeDevtools = ctx.options?.dev !== false;
|
|
23861
|
+
if (includeDevtools) {
|
|
23862
|
+
const options = [];
|
|
23863
|
+
if (ctx.currentAssignmentName) {
|
|
23864
|
+
options.push(
|
|
23865
|
+
t4.objectProperty(t4.identifier("name"), t4.stringLiteral(ctx.currentAssignmentName))
|
|
23866
|
+
);
|
|
23867
|
+
}
|
|
23868
|
+
if (expr.loc) {
|
|
23869
|
+
const source = `${ctx.options?.filename ?? ""}:${expr.loc.start.line}:${expr.loc.start.column}`;
|
|
23870
|
+
options.push(t4.objectProperty(t4.identifier("devToolsSource"), t4.stringLiteral(source)));
|
|
23871
|
+
}
|
|
23872
|
+
if (options.length > 0) {
|
|
23873
|
+
args.push(t4.objectExpression(options));
|
|
23874
|
+
}
|
|
23875
|
+
}
|
|
23511
23876
|
if (ctx.inModule) {
|
|
23512
23877
|
ctx.helpersUsed.add("signal");
|
|
23513
23878
|
return t4.callExpression(t4.identifier(RUNTIME_ALIASES.signal), args);
|
|
@@ -23519,6 +23884,34 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
|
|
|
23519
23884
|
...args
|
|
23520
23885
|
]);
|
|
23521
23886
|
}
|
|
23887
|
+
if (expr.callee.kind === "Identifier") {
|
|
23888
|
+
const memoCalleeName = deSSAVarName(expr.callee.name);
|
|
23889
|
+
if (ctx.memoMacroNames?.has(memoCalleeName)) {
|
|
23890
|
+
const args = lowerCallArguments(expr.arguments);
|
|
23891
|
+
const includeDevtools = ctx.options?.dev !== false;
|
|
23892
|
+
if (includeDevtools && expr.arguments.length === 1) {
|
|
23893
|
+
const options = [];
|
|
23894
|
+
if (ctx.currentAssignmentName) {
|
|
23895
|
+
options.push(
|
|
23896
|
+
t4.objectProperty(t4.identifier("name"), t4.stringLiteral(ctx.currentAssignmentName))
|
|
23897
|
+
);
|
|
23898
|
+
}
|
|
23899
|
+
if (expr.loc) {
|
|
23900
|
+
const source = `${ctx.options?.filename ?? ""}:${expr.loc.start.line}:${expr.loc.start.column}`;
|
|
23901
|
+
options.push(
|
|
23902
|
+
t4.objectProperty(t4.identifier("devToolsSource"), t4.stringLiteral(source))
|
|
23903
|
+
);
|
|
23904
|
+
}
|
|
23905
|
+
if (options.length > 0) {
|
|
23906
|
+
args.push(t4.objectExpression(options));
|
|
23907
|
+
}
|
|
23908
|
+
}
|
|
23909
|
+
return t4.callExpression(
|
|
23910
|
+
lowerExpression(expr.callee, ctx),
|
|
23911
|
+
args
|
|
23912
|
+
);
|
|
23913
|
+
}
|
|
23914
|
+
}
|
|
23522
23915
|
if (expr.callee.kind === "Identifier" && expr.callee.name === "$effect") {
|
|
23523
23916
|
const args = lowerCallArguments(
|
|
23524
23917
|
expr.arguments,
|
|
@@ -23697,6 +24090,8 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
|
|
|
23697
24090
|
case "JSXElement":
|
|
23698
24091
|
return lowerJSXElement(expr, ctx);
|
|
23699
24092
|
case "ArrowFunction": {
|
|
24093
|
+
const reactiveLowered = lowerReactiveScopeExpression(expr);
|
|
24094
|
+
if (reactiveLowered) return reactiveLowered;
|
|
23700
24095
|
const paramIds = mapParams(expr.params);
|
|
23701
24096
|
const shadowed = new Set(expr.params.map((p) => deSSAVarName(p.name)));
|
|
23702
24097
|
const localDeclared = collectLocalDeclaredNames(
|
|
@@ -23743,6 +24138,8 @@ function lowerExpressionImpl(expr, ctx, _isAssigned = false) {
|
|
|
23743
24138
|
);
|
|
23744
24139
|
}
|
|
23745
24140
|
case "FunctionExpression": {
|
|
24141
|
+
const reactiveLowered = lowerReactiveScopeExpression(expr);
|
|
24142
|
+
if (reactiveLowered) return reactiveLowered;
|
|
23746
24143
|
const paramIds = mapParams(expr.params);
|
|
23747
24144
|
const shadowed = new Set(expr.params.map((p) => deSSAVarName(p.name)));
|
|
23748
24145
|
const localDeclared = collectLocalDeclaredNames(expr.params, expr.body, t4);
|
|
@@ -24095,6 +24492,18 @@ function collectExpressionDependencies(expr, deps) {
|
|
|
24095
24492
|
deps.add(deSSAVarName(expr.name));
|
|
24096
24493
|
return;
|
|
24097
24494
|
}
|
|
24495
|
+
if (expr.kind === "ArrowFunction") {
|
|
24496
|
+
if (expr.isExpression && !Array.isArray(expr.body)) {
|
|
24497
|
+
collectExpressionDependencies(expr.body, deps);
|
|
24498
|
+
} else if (Array.isArray(expr.body)) {
|
|
24499
|
+
collectBlockDependencies(expr.body, deps);
|
|
24500
|
+
}
|
|
24501
|
+
return;
|
|
24502
|
+
}
|
|
24503
|
+
if (expr.kind === "FunctionExpression") {
|
|
24504
|
+
collectBlockDependencies(expr.body, deps);
|
|
24505
|
+
return;
|
|
24506
|
+
}
|
|
24098
24507
|
if (expr.kind === "MemberExpression") {
|
|
24099
24508
|
const path2 = getMemberDependencyPath(expr);
|
|
24100
24509
|
if (path2) deps.add(path2);
|
|
@@ -24143,6 +24552,51 @@ function collectExpressionDependencies(expr, deps) {
|
|
|
24143
24552
|
return;
|
|
24144
24553
|
}
|
|
24145
24554
|
}
|
|
24555
|
+
function collectBlockDependencies(blocks, deps) {
|
|
24556
|
+
for (const block of blocks) {
|
|
24557
|
+
for (const instr of block.instructions) {
|
|
24558
|
+
switch (instr.kind) {
|
|
24559
|
+
case "Assign":
|
|
24560
|
+
case "Expression":
|
|
24561
|
+
collectExpressionDependencies(instr.value, deps);
|
|
24562
|
+
break;
|
|
24563
|
+
case "Phi":
|
|
24564
|
+
for (const source of instr.sources) {
|
|
24565
|
+
deps.add(deSSAVarName(source.id.name));
|
|
24566
|
+
}
|
|
24567
|
+
break;
|
|
24568
|
+
default:
|
|
24569
|
+
break;
|
|
24570
|
+
}
|
|
24571
|
+
}
|
|
24572
|
+
const term = block.terminator;
|
|
24573
|
+
switch (term.kind) {
|
|
24574
|
+
case "Return":
|
|
24575
|
+
if (term.argument) collectExpressionDependencies(term.argument, deps);
|
|
24576
|
+
break;
|
|
24577
|
+
case "Throw":
|
|
24578
|
+
collectExpressionDependencies(term.argument, deps);
|
|
24579
|
+
break;
|
|
24580
|
+
case "Branch":
|
|
24581
|
+
collectExpressionDependencies(term.test, deps);
|
|
24582
|
+
break;
|
|
24583
|
+
case "Switch":
|
|
24584
|
+
collectExpressionDependencies(term.discriminant, deps);
|
|
24585
|
+
for (const c of term.cases) {
|
|
24586
|
+
if (c.test) collectExpressionDependencies(c.test, deps);
|
|
24587
|
+
}
|
|
24588
|
+
break;
|
|
24589
|
+
case "ForOf":
|
|
24590
|
+
collectExpressionDependencies(term.iterable, deps);
|
|
24591
|
+
break;
|
|
24592
|
+
case "ForIn":
|
|
24593
|
+
collectExpressionDependencies(term.object, deps);
|
|
24594
|
+
break;
|
|
24595
|
+
default:
|
|
24596
|
+
break;
|
|
24597
|
+
}
|
|
24598
|
+
}
|
|
24599
|
+
}
|
|
24146
24600
|
function normalizeDependencyKey2(name) {
|
|
24147
24601
|
return name.split(".").map((part) => deSSAVarName(part)).join(".");
|
|
24148
24602
|
}
|
|
@@ -24319,6 +24773,9 @@ function replaceIdentifiersWithOverrides(node, overrides, t4, parentKind, parent
|
|
|
24319
24773
|
}
|
|
24320
24774
|
return;
|
|
24321
24775
|
}
|
|
24776
|
+
const isMethodCallMember = (t4.isMemberExpression(node) || t4.isOptionalMemberExpression(node)) && !node.computed && t4.isIdentifier(node.property) && ["call", "apply", "bind"].includes(
|
|
24777
|
+
node.property.name
|
|
24778
|
+
);
|
|
24322
24779
|
for (const key of Object.keys(node)) {
|
|
24323
24780
|
if (key === "type" || key === "loc" || key === "start" || key === "end") continue;
|
|
24324
24781
|
if (t4.isObjectProperty(node) && key === "key" && !node.computed) {
|
|
@@ -24327,6 +24784,9 @@ function replaceIdentifiersWithOverrides(node, overrides, t4, parentKind, parent
|
|
|
24327
24784
|
if ((t4.isMemberExpression(node) || t4.isOptionalMemberExpression(node)) && key === "property" && !node.computed) {
|
|
24328
24785
|
continue;
|
|
24329
24786
|
}
|
|
24787
|
+
if (isMethodCallMember && key === "object") {
|
|
24788
|
+
continue;
|
|
24789
|
+
}
|
|
24330
24790
|
const value = node[key];
|
|
24331
24791
|
if (Array.isArray(value)) {
|
|
24332
24792
|
for (const item of value) {
|
|
@@ -24559,7 +25019,13 @@ function normalizeHIRAttrName(name) {
|
|
|
24559
25019
|
if (name === "htmlFor") return "for";
|
|
24560
25020
|
return name;
|
|
24561
25021
|
}
|
|
24562
|
-
function
|
|
25022
|
+
function resolveNamespaceContext(tagName, parentNamespace) {
|
|
25023
|
+
if (tagName === "svg") return "svg";
|
|
25024
|
+
if (tagName === "math") return "mathml";
|
|
25025
|
+
if (tagName === "foreignObject" && parentNamespace === "svg") return null;
|
|
25026
|
+
return parentNamespace;
|
|
25027
|
+
}
|
|
25028
|
+
function extractHIRStaticHtml(jsx, ctx, parentPath = [], namespace = null) {
|
|
24563
25029
|
if (jsx.isComponent || typeof jsx.tagName !== "string") {
|
|
24564
25030
|
return {
|
|
24565
25031
|
html: "<!---->",
|
|
@@ -24573,6 +25039,7 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
|
|
|
24573
25039
|
};
|
|
24574
25040
|
}
|
|
24575
25041
|
const tagName = jsx.tagName;
|
|
25042
|
+
const resolvedNamespace = resolveNamespaceContext(tagName, namespace);
|
|
24576
25043
|
let html = `<${tagName}`;
|
|
24577
25044
|
const bindings = [];
|
|
24578
25045
|
for (const attr of jsx.attributes) {
|
|
@@ -24672,7 +25139,7 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
|
|
|
24672
25139
|
}
|
|
24673
25140
|
} else if (child.kind === "element") {
|
|
24674
25141
|
const childPath = [...parentPath, childIndex];
|
|
24675
|
-
const childResult = extractHIRStaticHtml(child.value, ctx, childPath);
|
|
25142
|
+
const childResult = extractHIRStaticHtml(child.value, ctx, childPath, resolvedNamespace);
|
|
24676
25143
|
html += childResult.html;
|
|
24677
25144
|
bindings.push(...childResult.bindings);
|
|
24678
25145
|
childIndex++;
|
|
@@ -24683,26 +25150,42 @@ function extractHIRStaticHtml(jsx, ctx, parentPath = []) {
|
|
|
24683
25150
|
bindings.push({
|
|
24684
25151
|
type: "text",
|
|
24685
25152
|
path: [...parentPath, childIndex],
|
|
24686
|
-
expr: child.value
|
|
25153
|
+
expr: child.value,
|
|
25154
|
+
// Track namespace for dynamic text bindings
|
|
25155
|
+
namespace: resolvedNamespace
|
|
24687
25156
|
});
|
|
24688
25157
|
} else {
|
|
24689
25158
|
html += "<!---->";
|
|
24690
25159
|
bindings.push({
|
|
24691
25160
|
type: "child",
|
|
24692
25161
|
path: [...parentPath, childIndex],
|
|
24693
|
-
expr: child.value
|
|
25162
|
+
expr: child.value,
|
|
25163
|
+
// Track namespace for dynamic child bindings
|
|
25164
|
+
namespace: resolvedNamespace
|
|
24694
25165
|
});
|
|
24695
25166
|
}
|
|
24696
25167
|
childIndex++;
|
|
24697
25168
|
}
|
|
24698
25169
|
}
|
|
24699
25170
|
html += `</${tagName}>`;
|
|
24700
|
-
|
|
25171
|
+
const needsSVG = namespace === "svg" && tagName !== "svg";
|
|
25172
|
+
const needsMathML = namespace === "mathml" && tagName !== "math";
|
|
25173
|
+
return {
|
|
25174
|
+
html,
|
|
25175
|
+
bindings,
|
|
25176
|
+
isSVG: needsSVG || void 0,
|
|
25177
|
+
isMathML: needsMathML || void 0
|
|
25178
|
+
};
|
|
24701
25179
|
}
|
|
24702
25180
|
function lowerIntrinsicElement(jsx, ctx) {
|
|
24703
25181
|
const { t: t4 } = ctx;
|
|
24704
25182
|
const statements = [];
|
|
24705
|
-
const { html, bindings } = extractHIRStaticHtml(
|
|
25183
|
+
const { html, bindings, isSVG, isMathML } = extractHIRStaticHtml(
|
|
25184
|
+
jsx,
|
|
25185
|
+
ctx,
|
|
25186
|
+
[],
|
|
25187
|
+
ctx.namespaceContext ?? null
|
|
25188
|
+
);
|
|
24706
25189
|
const allDeps = /* @__PURE__ */ new Set();
|
|
24707
25190
|
for (const binding of bindings) {
|
|
24708
25191
|
if (binding.expr) collectExpressionDependencies(binding.expr, allDeps);
|
|
@@ -24728,7 +25211,7 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24728
25211
|
ctx.needsCtx = true;
|
|
24729
25212
|
}
|
|
24730
25213
|
}
|
|
24731
|
-
const hoistedTmplId = getOrCreateHoistedTemplate(html, ctx);
|
|
25214
|
+
const hoistedTmplId = getOrCreateHoistedTemplate(html, ctx, isSVG, isMathML);
|
|
24732
25215
|
const rootId = genTemp(ctx, "root");
|
|
24733
25216
|
if (hoistedTmplId) {
|
|
24734
25217
|
statements.push(
|
|
@@ -24739,11 +25222,19 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24739
25222
|
} else {
|
|
24740
25223
|
ctx.helpersUsed.add("template");
|
|
24741
25224
|
const tmplId = genTemp(ctx, "tmpl");
|
|
25225
|
+
const templateArgs = [t4.stringLiteral(html)];
|
|
25226
|
+
if (isSVG || isMathML) {
|
|
25227
|
+
templateArgs.push(t4.identifier("undefined"));
|
|
25228
|
+
templateArgs.push(isSVG ? t4.booleanLiteral(true) : t4.identifier("undefined"));
|
|
25229
|
+
if (isMathML) {
|
|
25230
|
+
templateArgs.push(t4.booleanLiteral(true));
|
|
25231
|
+
}
|
|
25232
|
+
}
|
|
24742
25233
|
statements.push(
|
|
24743
25234
|
t4.variableDeclaration("const", [
|
|
24744
25235
|
t4.variableDeclarator(
|
|
24745
25236
|
tmplId,
|
|
24746
|
-
t4.callExpression(t4.identifier(RUNTIME_ALIASES.template),
|
|
25237
|
+
t4.callExpression(t4.identifier(RUNTIME_ALIASES.template), templateArgs)
|
|
24747
25238
|
)
|
|
24748
25239
|
])
|
|
24749
25240
|
);
|
|
@@ -24756,6 +25247,12 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24756
25247
|
const elId = rootId;
|
|
24757
25248
|
const nodeCache = /* @__PURE__ */ new Map();
|
|
24758
25249
|
nodeCache.set("", elId);
|
|
25250
|
+
const tagName = typeof jsx.tagName === "string" ? jsx.tagName : null;
|
|
25251
|
+
const prevNamespace = ctx.namespaceContext;
|
|
25252
|
+
if (tagName) {
|
|
25253
|
+
const elementNamespace = resolveNamespaceContext(tagName, ctx.namespaceContext ?? null);
|
|
25254
|
+
ctx.namespaceContext = elementNamespace;
|
|
25255
|
+
}
|
|
24759
25256
|
const pathStatements = [];
|
|
24760
25257
|
for (const binding of bindings) {
|
|
24761
25258
|
resolveHIRBindingPath(binding.path, nodeCache, pathStatements, ctx);
|
|
@@ -24770,23 +25267,17 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24770
25267
|
const hirDataBinding = isDelegated && binding.expr ? extractDelegatedEventDataFromHIR(binding.expr, ctx) : null;
|
|
24771
25268
|
if (hirDataBinding) {
|
|
24772
25269
|
ctx.delegatedEventsUsed?.add(eventName);
|
|
24773
|
-
const handlerExpr = lowerExpression(hirDataBinding.handler, ctx);
|
|
25270
|
+
const handlerExpr = hirDataBinding.handler.kind === "Identifier" ? t4.identifier(hirDataBinding.handler.name) : lowerExpression(hirDataBinding.handler, ctx);
|
|
24774
25271
|
const dataExpr = lowerDomExpression(hirDataBinding.data, ctx, containingRegion, {
|
|
24775
25272
|
skipHookAccessors: false,
|
|
24776
25273
|
skipRegionRootOverride: true
|
|
24777
25274
|
});
|
|
24778
|
-
const dataParam = t4.identifier("__data");
|
|
24779
|
-
const eventParam = t4.identifier("_e");
|
|
24780
|
-
const wrappedHandler = t4.arrowFunctionExpression(
|
|
24781
|
-
[dataParam, eventParam],
|
|
24782
|
-
t4.callExpression(handlerExpr, [dataParam])
|
|
24783
|
-
);
|
|
24784
25275
|
statements.push(
|
|
24785
25276
|
t4.expressionStatement(
|
|
24786
25277
|
t4.assignmentExpression(
|
|
24787
25278
|
"=",
|
|
24788
25279
|
t4.memberExpression(targetId, t4.identifier(`$$${eventName}`)),
|
|
24789
|
-
|
|
25280
|
+
handlerExpr
|
|
24790
25281
|
)
|
|
24791
25282
|
)
|
|
24792
25283
|
);
|
|
@@ -24820,16 +25311,54 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24820
25311
|
if (fn.params.length > 0) return fn;
|
|
24821
25312
|
return t4.functionExpression(fn.id, [eventParam], fn.body, fn.generator, fn.async);
|
|
24822
25313
|
}
|
|
24823
|
-
|
|
25314
|
+
if (t4.isIdentifier(fn) || t4.isMemberExpression(fn)) {
|
|
25315
|
+
return fn;
|
|
25316
|
+
}
|
|
25317
|
+
if (t4.isCallExpression(fn) && fn.arguments.length === 0 && (t4.isIdentifier(fn.callee) || t4.isMemberExpression(fn.callee))) {
|
|
25318
|
+
return fn.callee;
|
|
25319
|
+
}
|
|
25320
|
+
return t4.functionExpression(
|
|
25321
|
+
null,
|
|
24824
25322
|
[eventParam],
|
|
24825
|
-
t4.
|
|
25323
|
+
t4.blockStatement([
|
|
25324
|
+
t4.returnStatement(
|
|
25325
|
+
t4.callExpression(
|
|
25326
|
+
t4.memberExpression(fn, t4.identifier("call")),
|
|
25327
|
+
[t4.thisExpression(), eventParam]
|
|
25328
|
+
)
|
|
25329
|
+
)
|
|
25330
|
+
])
|
|
24826
25331
|
);
|
|
24827
25332
|
};
|
|
24828
25333
|
const handlerExpr = !isFn && shouldWrapHandler ? t4.arrowFunctionExpression([], valueExpr) : ensureHandlerParam(valueExpr);
|
|
24829
|
-
|
|
25334
|
+
let dataBinding = isDelegated && !shouldWrapHandler ? extractDelegatedEventData(valueExpr, t4) : null;
|
|
25335
|
+
if (dataBinding && t4.isIdentifier(dataBinding.handler)) {
|
|
25336
|
+
const handlerName = dataBinding.handler.name;
|
|
25337
|
+
if (ctx.signalVars?.has(handlerName) || ctx.memoVars?.has(handlerName) || ctx.aliasVars?.has(handlerName) || ctx.storeVars?.has(handlerName) || ctx.trackedVars.has(handlerName)) {
|
|
25338
|
+
dataBinding = null;
|
|
25339
|
+
}
|
|
25340
|
+
}
|
|
24830
25341
|
if (isDelegated) {
|
|
24831
25342
|
ctx.delegatedEventsUsed?.add(eventName);
|
|
24832
|
-
|
|
25343
|
+
let handlerName = null;
|
|
25344
|
+
if (t4.isIdentifier(valueExpr)) {
|
|
25345
|
+
handlerName = valueExpr.name;
|
|
25346
|
+
} else if (t4.isCallExpression(valueExpr) && valueExpr.arguments.length === 0 && t4.isIdentifier(valueExpr.callee)) {
|
|
25347
|
+
handlerName = valueExpr.callee.name;
|
|
25348
|
+
}
|
|
25349
|
+
const handlerForCall = handlerName ? t4.identifier(handlerName) : t4.cloneNode(valueExpr, true);
|
|
25350
|
+
const finalHandler = !isFn && shouldWrapHandler ? t4.functionExpression(
|
|
25351
|
+
null,
|
|
25352
|
+
[eventParam],
|
|
25353
|
+
t4.blockStatement([
|
|
25354
|
+
t4.returnStatement(
|
|
25355
|
+
t4.callExpression(t4.memberExpression(handlerForCall, t4.identifier("call")), [
|
|
25356
|
+
t4.thisExpression(),
|
|
25357
|
+
eventParam
|
|
25358
|
+
])
|
|
25359
|
+
)
|
|
25360
|
+
])
|
|
25361
|
+
) : handlerExpr;
|
|
24833
25362
|
const normalizeHandler = (expr) => {
|
|
24834
25363
|
if (t4.isCallExpression(expr) && (t4.isIdentifier(expr.callee) || t4.isMemberExpression(expr.callee))) {
|
|
24835
25364
|
return expr.callee;
|
|
@@ -24842,19 +25371,7 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24842
25371
|
const dataForDelegate = dataBinding?.data && (t4.isArrowFunctionExpression(dataBinding.data) || t4.isFunctionExpression(dataBinding.data) ? dataBinding.data : t4.arrowFunctionExpression([], dataBinding.data));
|
|
24843
25372
|
const handlerForDelegate = normalizedDataHandler ?? (dataBinding ? normalizeHandler(handlerExpr) : finalHandler);
|
|
24844
25373
|
const handlerIsCallableExpr = t4.isArrowFunctionExpression(handlerForDelegate) || t4.isFunctionExpression(handlerForDelegate) || t4.isIdentifier(handlerForDelegate) || t4.isMemberExpression(handlerForDelegate);
|
|
24845
|
-
|
|
24846
|
-
if (dataForDelegate) {
|
|
24847
|
-
let payloadExpr;
|
|
24848
|
-
if (t4.isArrowFunctionExpression(dataForDelegate) && dataForDelegate.params.length === 0) {
|
|
24849
|
-
payloadExpr = t4.isBlockStatement(dataForDelegate.body) ? t4.callExpression(t4.arrowFunctionExpression([], dataForDelegate.body), []) : dataForDelegate.body;
|
|
24850
|
-
} else {
|
|
24851
|
-
payloadExpr = t4.callExpression(dataForDelegate, []);
|
|
24852
|
-
}
|
|
24853
|
-
handlerToAssign = t4.arrowFunctionExpression(
|
|
24854
|
-
[eventParam],
|
|
24855
|
-
t4.callExpression(handlerForDelegate, [payloadExpr])
|
|
24856
|
-
);
|
|
24857
|
-
}
|
|
25374
|
+
const handlerToAssign = handlerIsCallableExpr ? handlerForDelegate : t4.arrowFunctionExpression([eventParam], handlerForDelegate);
|
|
24858
25375
|
statements.push(
|
|
24859
25376
|
t4.expressionStatement(
|
|
24860
25377
|
t4.assignmentExpression(
|
|
@@ -24993,10 +25510,18 @@ function lowerIntrinsicElement(jsx, ctx) {
|
|
|
24993
25510
|
);
|
|
24994
25511
|
}
|
|
24995
25512
|
} else if (binding.type === "child" && binding.expr) {
|
|
24996
|
-
emitHIRChildBinding(
|
|
25513
|
+
emitHIRChildBinding(
|
|
25514
|
+
targetId,
|
|
25515
|
+
binding.expr,
|
|
25516
|
+
statements,
|
|
25517
|
+
ctx,
|
|
25518
|
+
containingRegion,
|
|
25519
|
+
binding.namespace
|
|
25520
|
+
);
|
|
24997
25521
|
}
|
|
24998
25522
|
}
|
|
24999
25523
|
applyRegionToContext(ctx, prevRegion ?? null);
|
|
25524
|
+
ctx.namespaceContext = prevNamespace;
|
|
25000
25525
|
statements.push(t4.returnStatement(elId));
|
|
25001
25526
|
const body = t4.blockStatement(statements);
|
|
25002
25527
|
if (shouldMemo && containingRegion) {
|
|
@@ -25047,9 +25572,12 @@ function resolveHIRBindingPath(path2, cache, statements, ctx) {
|
|
|
25047
25572
|
cache.set(key, varId);
|
|
25048
25573
|
return varId;
|
|
25049
25574
|
}
|
|
25050
|
-
function emitHIRChildBinding(markerId, expr, statements, ctx, containingRegion) {
|
|
25575
|
+
function emitHIRChildBinding(markerId, expr, statements, ctx, containingRegion, namespace) {
|
|
25051
25576
|
const { t: t4 } = ctx;
|
|
25052
25577
|
const parentId = t4.memberExpression(markerId, t4.identifier("parentNode"));
|
|
25578
|
+
if (namespace !== void 0) {
|
|
25579
|
+
ctx.namespaceContext = namespace;
|
|
25580
|
+
}
|
|
25053
25581
|
if (expr.kind === "CallExpression" && expr.callee.kind === "Identifier" && expr.callee.name === "createPortal") {
|
|
25054
25582
|
ctx.helpersUsed.add("onDestroy");
|
|
25055
25583
|
const portalId = genTemp(ctx, "portal");
|
|
@@ -25271,7 +25799,7 @@ function extractDelegatedEventData(expr, t4) {
|
|
|
25271
25799
|
const bodyExpr = t4.isBlockStatement(expr.body) ? expr.body.body.length === 1 && t4.isReturnStatement(expr.body.body[0]) && expr.body.body[0].argument && t4.isExpression(expr.body.body[0].argument) ? expr.body.body[0].argument : null : expr.body;
|
|
25272
25800
|
if (!bodyExpr || !t4.isCallExpression(bodyExpr)) return null;
|
|
25273
25801
|
if (paramNames.some((name) => expressionUsesIdentifier(bodyExpr, name, t4))) return null;
|
|
25274
|
-
if (!t4.isIdentifier(bodyExpr.callee)
|
|
25802
|
+
if (!t4.isIdentifier(bodyExpr.callee)) return null;
|
|
25275
25803
|
if (bodyExpr.arguments.length === 0) return null;
|
|
25276
25804
|
if (bodyExpr.arguments.length > 1) return null;
|
|
25277
25805
|
const dataArg = bodyExpr.arguments[0];
|
|
@@ -25297,12 +25825,16 @@ function extractDelegatedEventDataFromHIR(expr, ctx) {
|
|
|
25297
25825
|
if (callee.kind !== "Identifier") {
|
|
25298
25826
|
return null;
|
|
25299
25827
|
}
|
|
25828
|
+
const handlerName = callee.name;
|
|
25829
|
+
if (ctx.signalVars?.has(handlerName) || ctx.memoVars?.has(handlerName) || ctx.aliasVars?.has(handlerName) || ctx.storeVars?.has(handlerName) || ctx.trackedVars.has(handlerName)) {
|
|
25830
|
+
return null;
|
|
25831
|
+
}
|
|
25300
25832
|
if (bodyExpr.arguments.length !== 1) {
|
|
25301
25833
|
return null;
|
|
25302
25834
|
}
|
|
25303
25835
|
if (callee.kind === "Identifier") {
|
|
25304
|
-
const
|
|
25305
|
-
const isTrackedAccessor = ctx.signalVars?.has(
|
|
25836
|
+
const handlerName2 = deSSAVarName(callee.name);
|
|
25837
|
+
const isTrackedAccessor = ctx.signalVars?.has(handlerName2) || ctx.memoVars?.has(handlerName2) || ctx.aliasVars?.has(handlerName2);
|
|
25306
25838
|
if (isTrackedAccessor) {
|
|
25307
25839
|
return null;
|
|
25308
25840
|
}
|
|
@@ -25841,19 +26373,26 @@ function lowerHIRWithRegions(program, t4, options, macroAliases) {
|
|
|
25841
26373
|
const emittedFunctionNames = /* @__PURE__ */ new Set();
|
|
25842
26374
|
const originalBody = program.originalBody ?? [];
|
|
25843
26375
|
ctx.moduleDeclaredNames = collectDeclaredNames(originalBody, t4);
|
|
25844
|
-
|
|
26376
|
+
const runtimeImports = collectRuntimeImports(originalBody, t4);
|
|
26377
|
+
ctx.moduleRuntimeNames = runtimeImports.names;
|
|
26378
|
+
ctx.moduleRuntimeImportMap = runtimeImports.importMap;
|
|
26379
|
+
ctx.moduleRuntimeNamespaceImports = runtimeImports.namespaces;
|
|
25845
26380
|
applyImportedReactiveMetadata(originalBody, ctx, t4, options);
|
|
25846
26381
|
const stateMacroNames = /* @__PURE__ */ new Set(["$state", ...macroAliases?.state ?? []]);
|
|
25847
26382
|
const memoMacroNames = new Set(macroAliases?.memo ?? ctx.memoMacroNames ?? []);
|
|
25848
26383
|
if (!memoMacroNames.has("$memo")) memoMacroNames.add("$memo");
|
|
25849
26384
|
if (!memoMacroNames.has("createMemo")) memoMacroNames.add("createMemo");
|
|
26385
|
+
ctx.stateMacroNames = stateMacroNames;
|
|
25850
26386
|
ctx.memoMacroNames = memoMacroNames;
|
|
25851
26387
|
for (const stmt of originalBody) {
|
|
25852
26388
|
if (t4.isVariableDeclaration(stmt)) {
|
|
25853
26389
|
for (const decl of stmt.declarations) {
|
|
25854
|
-
if (t4.isIdentifier(decl.id) && decl.init && t4.isCallExpression(decl.init)
|
|
25855
|
-
|
|
25856
|
-
if (
|
|
26390
|
+
if (t4.isIdentifier(decl.id) && decl.init && (t4.isCallExpression(decl.init) || t4.isOptionalCallExpression(decl.init))) {
|
|
26391
|
+
const callKind = getReactiveCallKindFromBabel(decl.init, ctx, t4);
|
|
26392
|
+
if (callKind === "signal") {
|
|
26393
|
+
ctx.trackedVars.add(decl.id.name);
|
|
26394
|
+
} else if (callKind === "store") {
|
|
26395
|
+
ctx.trackedVars.add(decl.id.name);
|
|
25857
26396
|
ctx.storeVars?.add(decl.id.name);
|
|
25858
26397
|
}
|
|
25859
26398
|
}
|
|
@@ -26082,22 +26621,20 @@ function lowerHIRWithRegions(program, t4, options, macroAliases) {
|
|
|
26082
26621
|
ctx.helpersUsed.add("popContext");
|
|
26083
26622
|
body.push(t4.expressionStatement(t4.callExpression(t4.identifier(RUNTIME_ALIASES.popContext), [])));
|
|
26084
26623
|
}
|
|
26085
|
-
const moduleMeta = buildModuleReactiveMetadata(
|
|
26086
|
-
originalBody,
|
|
26087
|
-
ctx,
|
|
26088
|
-
t4,
|
|
26089
|
-
options,
|
|
26090
|
-
stateMacroNames,
|
|
26091
|
-
memoMacroNames
|
|
26092
|
-
);
|
|
26624
|
+
const moduleMeta = buildModuleReactiveMetadata(originalBody, ctx, t4, options);
|
|
26093
26625
|
setModuleMetadata(options?.filename, moduleMeta, options);
|
|
26094
26626
|
return t4.file(t4.program(attachHelperImports(ctx, body, t4)));
|
|
26095
26627
|
}
|
|
26096
26628
|
function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segment", existingAliases) {
|
|
26097
26629
|
if (statements.length === 0) return { statements: [], aliases: /* @__PURE__ */ new Set() };
|
|
26098
|
-
const
|
|
26630
|
+
const reactiveScopes = ctx.options?.reactiveScopes;
|
|
26631
|
+
const fn = convertStatementsToHIRFunction(
|
|
26632
|
+
name,
|
|
26633
|
+
statements,
|
|
26634
|
+
reactiveScopes && reactiveScopes.length > 0 ? { reactiveScopes: new Set(reactiveScopes) } : void 0
|
|
26635
|
+
);
|
|
26099
26636
|
const scopeResult = analyzeReactiveScopesWithSSA(fn);
|
|
26100
|
-
detectDerivedCycles(fn, scopeResult);
|
|
26637
|
+
detectDerivedCycles(fn, scopeResult, ctx);
|
|
26101
26638
|
ctx.scopes = scopeResult;
|
|
26102
26639
|
const regionResult = generateRegions(fn, scopeResult);
|
|
26103
26640
|
ctx.regions = flattenRegions(regionResult.topLevelRegions);
|
|
@@ -26109,10 +26646,12 @@ function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segme
|
|
|
26109
26646
|
const functionVars = ctx.functionVars ?? /* @__PURE__ */ new Set();
|
|
26110
26647
|
const signalVars = ctx.signalVars ?? /* @__PURE__ */ new Set();
|
|
26111
26648
|
const storeVars = ctx.storeVars ?? /* @__PURE__ */ new Set();
|
|
26649
|
+
const memoVars = ctx.memoVars ?? /* @__PURE__ */ new Set();
|
|
26112
26650
|
const mutatedVars = /* @__PURE__ */ new Set();
|
|
26113
26651
|
ctx.functionVars = functionVars;
|
|
26114
26652
|
ctx.signalVars = signalVars;
|
|
26115
26653
|
ctx.storeVars = storeVars;
|
|
26654
|
+
ctx.memoVars = memoVars;
|
|
26116
26655
|
ctx.mutatedVars = mutatedVars;
|
|
26117
26656
|
for (const block of fn.blocks) {
|
|
26118
26657
|
for (const instr of block.instructions) {
|
|
@@ -26121,11 +26660,14 @@ function lowerTopLevelStatementBlock(statements, ctx, t4, name = "__module_segme
|
|
|
26121
26660
|
if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
|
|
26122
26661
|
functionVars.add(target);
|
|
26123
26662
|
}
|
|
26124
|
-
if (instr.value.kind === "CallExpression"
|
|
26125
|
-
|
|
26663
|
+
if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
|
|
26664
|
+
const callKind = getReactiveCallKind(instr.value, ctx);
|
|
26665
|
+
if (callKind === "signal") {
|
|
26126
26666
|
signalVars.add(target);
|
|
26127
|
-
} else if (
|
|
26667
|
+
} else if (callKind === "store") {
|
|
26128
26668
|
storeVars.add(target);
|
|
26669
|
+
} else if (callKind === "memo") {
|
|
26670
|
+
memoVars.add(target);
|
|
26129
26671
|
}
|
|
26130
26672
|
}
|
|
26131
26673
|
if (!instr.declarationKind) {
|
|
@@ -26242,7 +26784,7 @@ function transformControlFlowReturns(statements, ctx) {
|
|
|
26242
26784
|
}
|
|
26243
26785
|
return null;
|
|
26244
26786
|
}
|
|
26245
|
-
function lowerFunctionWithRegions(fn, ctx) {
|
|
26787
|
+
function lowerFunctionWithRegions(fn, ctx, options) {
|
|
26246
26788
|
const { t: t4 } = ctx;
|
|
26247
26789
|
const prevTracked = ctx.trackedVars;
|
|
26248
26790
|
const prevSignalVars = ctx.signalVars;
|
|
@@ -26301,8 +26843,15 @@ function lowerFunctionWithRegions(fn, ctx) {
|
|
|
26301
26843
|
if (instr.value.kind === "ArrowFunction" || instr.value.kind === "FunctionExpression") {
|
|
26302
26844
|
ctx.functionVars?.add(target);
|
|
26303
26845
|
}
|
|
26304
|
-
if (instr.value.kind === "CallExpression"
|
|
26305
|
-
ctx
|
|
26846
|
+
if (instr.value.kind === "CallExpression" || instr.value.kind === "OptionalCallExpression") {
|
|
26847
|
+
const callKind = getReactiveCallKind(instr.value, ctx);
|
|
26848
|
+
if (callKind === "signal") {
|
|
26849
|
+
ctx.signalVars?.add(target);
|
|
26850
|
+
} else if (callKind === "store") {
|
|
26851
|
+
ctx.storeVars?.add(target);
|
|
26852
|
+
} else if (callKind === "memo") {
|
|
26853
|
+
ctx.memoVars?.add(target);
|
|
26854
|
+
}
|
|
26306
26855
|
}
|
|
26307
26856
|
if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && isHookName(instr.value.callee.name)) {
|
|
26308
26857
|
hookResultVars.add(target);
|
|
@@ -26311,9 +26860,6 @@ function lowerFunctionWithRegions(fn, ctx) {
|
|
|
26311
26860
|
if (instr.value.kind === "MemberExpression" && instr.value.object.kind === "Identifier" && hookResultVars.has(deSSAVarName(instr.value.object.name))) {
|
|
26312
26861
|
hookAccessorAliases.add(target);
|
|
26313
26862
|
}
|
|
26314
|
-
if (instr.value.kind === "CallExpression" && instr.value.callee.kind === "Identifier" && instr.value.callee.name === "$store") {
|
|
26315
|
-
ctx.storeVars?.add(target);
|
|
26316
|
-
}
|
|
26317
26863
|
if (!instr.declarationKind) {
|
|
26318
26864
|
ctx.mutatedVars?.add(target);
|
|
26319
26865
|
}
|
|
@@ -26326,15 +26872,18 @@ function lowerFunctionWithRegions(fn, ctx) {
|
|
|
26326
26872
|
ctx.aliasVars?.add(name);
|
|
26327
26873
|
ctx.trackedVars.add(name);
|
|
26328
26874
|
});
|
|
26329
|
-
const inferredHook = isHookLikeFunction(fn);
|
|
26875
|
+
const inferredHook = options?.forceHookContext ? true : isHookLikeFunction(fn);
|
|
26330
26876
|
const scopeResult = analyzeReactiveScopesWithSSA(fn);
|
|
26331
|
-
detectDerivedCycles(fn, scopeResult);
|
|
26877
|
+
detectDerivedCycles(fn, scopeResult, ctx);
|
|
26332
26878
|
ctx.scopes = scopeResult;
|
|
26333
26879
|
const regionResult = generateRegions(fn, scopeResult);
|
|
26334
26880
|
const prevHookFlag = ctx.currentFnIsHook;
|
|
26335
26881
|
ctx.currentFnIsHook = inferredHook;
|
|
26336
26882
|
const isComponent = !!(fn.name && fn.name[0] === fn.name[0]?.toUpperCase());
|
|
26337
26883
|
ctx.isComponentFn = isComponent;
|
|
26884
|
+
if (!isComponent && !inferredHook) {
|
|
26885
|
+
ctx.inModule = true;
|
|
26886
|
+
}
|
|
26338
26887
|
const rawPropsParam = fn.params.length === 1 && fn.params[0] ? deSSAVarName(fn.params[0].name) : void 0;
|
|
26339
26888
|
if (isComponent && rawPropsParam) {
|
|
26340
26889
|
ctx.propsParamName = rawPropsParam;
|
|
@@ -30448,18 +30997,6 @@ function isInsideConditional(path2) {
|
|
|
30448
30997
|
(p) => p.isIfStatement?.() || p.isConditionalExpression?.() || p.isSwitchCase?.()
|
|
30449
30998
|
);
|
|
30450
30999
|
}
|
|
30451
|
-
function isInsideNestedFunction(path2) {
|
|
30452
|
-
let depth = 0;
|
|
30453
|
-
let current = path2;
|
|
30454
|
-
while (current) {
|
|
30455
|
-
if (current.isFunction?.()) {
|
|
30456
|
-
depth++;
|
|
30457
|
-
if (depth > 1) return true;
|
|
30458
|
-
}
|
|
30459
|
-
current = current.parentPath;
|
|
30460
|
-
}
|
|
30461
|
-
return false;
|
|
30462
|
-
}
|
|
30463
31000
|
function isInsideJSX(path2) {
|
|
30464
31001
|
return !!path2.findParent((p) => p.isJSXElement?.() || p.isJSXFragment?.());
|
|
30465
31002
|
}
|
|
@@ -30843,6 +31380,54 @@ function createHIREntrypointVisitor(t4, options) {
|
|
|
30843
31380
|
filename: fileName
|
|
30844
31381
|
};
|
|
30845
31382
|
const isHookName2 = (name) => !!name && /^use[A-Z]/.test(name);
|
|
31383
|
+
const reactiveScopesSet = new Set(options.reactiveScopes ?? []);
|
|
31384
|
+
const resolveReactiveScopeName = (callee) => {
|
|
31385
|
+
if (reactiveScopesSet.size === 0) return null;
|
|
31386
|
+
if (t4.isIdentifier(callee)) {
|
|
31387
|
+
return reactiveScopesSet.has(callee.name) ? callee.name : null;
|
|
31388
|
+
}
|
|
31389
|
+
if ((t4.isMemberExpression(callee) || t4.isOptionalMemberExpression(callee)) && !callee.computed && t4.isIdentifier(callee.property)) {
|
|
31390
|
+
return reactiveScopesSet.has(callee.property.name) ? callee.property.name : null;
|
|
31391
|
+
}
|
|
31392
|
+
return null;
|
|
31393
|
+
};
|
|
31394
|
+
const isReactiveScopeCallback = (fnPath) => {
|
|
31395
|
+
if (reactiveScopesSet.size === 0) return false;
|
|
31396
|
+
const parent = fnPath.parentPath;
|
|
31397
|
+
if (!parent || !(parent.isCallExpression() || parent.isOptionalCallExpression())) {
|
|
31398
|
+
return false;
|
|
31399
|
+
}
|
|
31400
|
+
if (parent.node.arguments[0] !== fnPath.node) return false;
|
|
31401
|
+
const callee = parent.node.callee;
|
|
31402
|
+
return !!resolveReactiveScopeName(callee);
|
|
31403
|
+
};
|
|
31404
|
+
const isReactiveScopeCallbackNode = (fnNode, parentNode) => {
|
|
31405
|
+
if (reactiveScopesSet.size === 0) return false;
|
|
31406
|
+
if (!parentNode) return false;
|
|
31407
|
+
if (!t4.isCallExpression(parentNode) && !t4.isOptionalCallExpression(parentNode)) {
|
|
31408
|
+
return false;
|
|
31409
|
+
}
|
|
31410
|
+
if (parentNode.arguments[0] !== fnNode) return false;
|
|
31411
|
+
return !!resolveReactiveScopeName(parentNode.callee);
|
|
31412
|
+
};
|
|
31413
|
+
const isInsideNestedFunctionWithReactiveScopes = (nodePath) => {
|
|
31414
|
+
let depth = 0;
|
|
31415
|
+
let current = nodePath;
|
|
31416
|
+
while (current) {
|
|
31417
|
+
if (current.isFunction?.()) {
|
|
31418
|
+
depth++;
|
|
31419
|
+
if (isReactiveScopeCallbackNode(
|
|
31420
|
+
current.node,
|
|
31421
|
+
current.parentPath?.node
|
|
31422
|
+
)) {
|
|
31423
|
+
return depth > 1;
|
|
31424
|
+
}
|
|
31425
|
+
if (depth > 1) return true;
|
|
31426
|
+
}
|
|
31427
|
+
current = current.parentPath;
|
|
31428
|
+
}
|
|
31429
|
+
return false;
|
|
31430
|
+
};
|
|
30846
31431
|
const getFunctionName = (fnPath) => {
|
|
30847
31432
|
return fnPath.isFunctionDeclaration() && fnPath.node.id ? fnPath.node.id.name : fnPath.isFunctionExpression() && fnPath.node.id ? fnPath.node.id.name : fnPath.parentPath.isVariableDeclarator() && t4.isIdentifier(fnPath.parentPath.node.id) && fnPath.parentPath.node.init === fnPath.node ? fnPath.parentPath.node.id.name : void 0;
|
|
30848
31433
|
};
|
|
@@ -30854,7 +31439,7 @@ function createHIREntrypointVisitor(t4, options) {
|
|
|
30854
31439
|
const name = getFunctionName(fnPath);
|
|
30855
31440
|
return isHookName2(name);
|
|
30856
31441
|
};
|
|
30857
|
-
const isComponentOrHookDefinition = (fnPath) => isComponentDefinition(fnPath) || isHookDefinition(fnPath);
|
|
31442
|
+
const isComponentOrHookDefinition = (fnPath) => isComponentDefinition(fnPath) || isHookDefinition(fnPath) || isReactiveScopeCallback(fnPath);
|
|
30858
31443
|
const isComponentLike = (fnPath) => {
|
|
30859
31444
|
const name = getFunctionName(fnPath);
|
|
30860
31445
|
return name && isComponentName2(name) || isHookName2(name) || functionHasJSX(fnPath) || functionUsesStateLike(fnPath, t4);
|
|
@@ -31087,7 +31672,7 @@ Signals must be created at the top level of components for stable identity.
|
|
|
31087
31672
|
Move the $state() declaration before the loop/condition.`
|
|
31088
31673
|
);
|
|
31089
31674
|
}
|
|
31090
|
-
if (
|
|
31675
|
+
if (isInsideNestedFunctionWithReactiveScopes(varPath)) {
|
|
31091
31676
|
throw varPath.buildCodeFrameError(
|
|
31092
31677
|
`$state() cannot be declared inside nested functions.
|
|
31093
31678
|
|
|
@@ -31172,7 +31757,7 @@ Move the declaration to the top of your component.
|
|
|
31172
31757
|
For dynamic collections, consider using $store with an array/object.`
|
|
31173
31758
|
);
|
|
31174
31759
|
}
|
|
31175
|
-
if (
|
|
31760
|
+
if (isInsideNestedFunctionWithReactiveScopes(callPath)) {
|
|
31176
31761
|
throw callPath.buildCodeFrameError(
|
|
31177
31762
|
`$state() cannot be declared inside nested functions.
|
|
31178
31763
|
|
|
@@ -31199,7 +31784,7 @@ For conditional effects, use a condition inside the effect body instead:
|
|
|
31199
31784
|
$effect(() => { if (condition) { /* ... */ } })`
|
|
31200
31785
|
);
|
|
31201
31786
|
}
|
|
31202
|
-
if (
|
|
31787
|
+
if (isInsideNestedFunctionWithReactiveScopes(callPath)) {
|
|
31203
31788
|
throw callPath.buildCodeFrameError(
|
|
31204
31789
|
`$effect() cannot be called inside nested functions.
|
|
31205
31790
|
|
|
@@ -31233,7 +31818,7 @@ or extract the nested logic into a custom hook (useXxx).`
|
|
|
31233
31818
|
`${calleeId}() must be called inside a component or hook (useX)`
|
|
31234
31819
|
);
|
|
31235
31820
|
}
|
|
31236
|
-
if (isInsideLoop(callPath) || isInsideConditional(callPath) ||
|
|
31821
|
+
if (isInsideLoop(callPath) || isInsideConditional(callPath) || isInsideNestedFunctionWithReactiveScopes(callPath)) {
|
|
31237
31822
|
throw callPath.buildCodeFrameError(
|
|
31238
31823
|
`${calleeId}() must be called at the top level of a component or hook (no loops/conditions/nested functions)`
|
|
31239
31824
|
);
|
|
@@ -31414,7 +31999,8 @@ or extract the nested logic into a custom hook (useXxx).`
|
|
|
31414
31999
|
{
|
|
31415
32000
|
dev,
|
|
31416
32001
|
fileName,
|
|
31417
|
-
onWarn: warn
|
|
32002
|
+
onWarn: warn,
|
|
32003
|
+
reactiveScopes: reactiveScopesSet
|
|
31418
32004
|
}
|
|
31419
32005
|
);
|
|
31420
32006
|
const optimized = optionsWithWarnings.optimize ? optimizeHIR(hir, {
|
|
@@ -31447,6 +32033,7 @@ var createFictPlugin = (0, import_helper_plugin_utils.declare)(
|
|
|
31447
32033
|
optimize: options.optimize ?? true,
|
|
31448
32034
|
optimizeLevel: options.optimizeLevel ?? "safe",
|
|
31449
32035
|
inlineDerivedMemos: options.inlineDerivedMemos ?? true,
|
|
32036
|
+
emitModuleMetadata: options.emitModuleMetadata ?? "auto",
|
|
31450
32037
|
dev: options.dev ?? (process.env.NODE_ENV !== "production" && process.env.NODE_ENV !== "test")
|
|
31451
32038
|
};
|
|
31452
32039
|
return {
|