@vue/compiler-sfc 3.4.0-rc.1 → 3.4.0-rc.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/compiler-sfc.cjs.js +6 -1
- package/dist/compiler-sfc.d.ts +55 -0
- package/dist/compiler-sfc.esm-browser.js +158 -141
- package/package.json +5 -5
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -20567,8 +20567,12 @@ function isStaticNode(node) {
|
|
|
20567
20567
|
return false;
|
|
20568
20568
|
}
|
|
20569
20569
|
|
|
20570
|
-
const version = "3.4.0-rc.
|
|
20570
|
+
const version = "3.4.0-rc.2";
|
|
20571
20571
|
const parseCache = parseCache$1;
|
|
20572
|
+
const errorMessages = {
|
|
20573
|
+
...CompilerDOM.errorMessages,
|
|
20574
|
+
...CompilerDOM.DOMErrorMessages
|
|
20575
|
+
};
|
|
20572
20576
|
const walk = estreeWalker.walk;
|
|
20573
20577
|
const shouldTransformRef = () => false;
|
|
20574
20578
|
|
|
@@ -20583,6 +20587,7 @@ exports.compileScript = compileScript;
|
|
|
20583
20587
|
exports.compileStyle = compileStyle;
|
|
20584
20588
|
exports.compileStyleAsync = compileStyleAsync;
|
|
20585
20589
|
exports.compileTemplate = compileTemplate;
|
|
20590
|
+
exports.errorMessages = errorMessages;
|
|
20586
20591
|
exports.extractRuntimeEmits = extractRuntimeEmits;
|
|
20587
20592
|
exports.extractRuntimeProps = extractRuntimeProps;
|
|
20588
20593
|
exports.inferRuntimeType = inferRuntimeType;
|
package/dist/compiler-sfc.d.ts
CHANGED
|
@@ -468,6 +468,61 @@ export declare function extractRuntimeEmits(ctx: TypeResolveContext): Set<string
|
|
|
468
468
|
export declare const version: string;
|
|
469
469
|
|
|
470
470
|
export declare const parseCache: Map<string, SFCParseResult>;
|
|
471
|
+
export declare const errorMessages: {
|
|
472
|
+
0: string;
|
|
473
|
+
1: string;
|
|
474
|
+
2: string;
|
|
475
|
+
3: string;
|
|
476
|
+
4: string;
|
|
477
|
+
5: string;
|
|
478
|
+
6: string;
|
|
479
|
+
7: string;
|
|
480
|
+
8: string;
|
|
481
|
+
9: string;
|
|
482
|
+
10: string;
|
|
483
|
+
11: string;
|
|
484
|
+
12: string;
|
|
485
|
+
13: string;
|
|
486
|
+
14: string;
|
|
487
|
+
15: string;
|
|
488
|
+
16: string;
|
|
489
|
+
17: string;
|
|
490
|
+
18: string;
|
|
491
|
+
19: string;
|
|
492
|
+
20: string;
|
|
493
|
+
21: string;
|
|
494
|
+
22: string;
|
|
495
|
+
23: string;
|
|
496
|
+
24: string;
|
|
497
|
+
25: string;
|
|
498
|
+
26: string;
|
|
499
|
+
27: string;
|
|
500
|
+
28: string;
|
|
501
|
+
29: string;
|
|
502
|
+
30: string;
|
|
503
|
+
31: string;
|
|
504
|
+
32: string;
|
|
505
|
+
33: string;
|
|
506
|
+
34: string;
|
|
507
|
+
35: string;
|
|
508
|
+
36: string;
|
|
509
|
+
37: string;
|
|
510
|
+
38: string;
|
|
511
|
+
39: string;
|
|
512
|
+
40: string;
|
|
513
|
+
41: string;
|
|
514
|
+
42: string;
|
|
515
|
+
43: string;
|
|
516
|
+
44: string;
|
|
517
|
+
45: string;
|
|
518
|
+
46: string;
|
|
519
|
+
47: string;
|
|
520
|
+
48: string;
|
|
521
|
+
49: string;
|
|
522
|
+
50: string;
|
|
523
|
+
51: string;
|
|
524
|
+
52: string;
|
|
525
|
+
};
|
|
471
526
|
|
|
472
527
|
export declare const walk: any;
|
|
473
528
|
|
|
@@ -2150,7 +2150,7 @@ function defaultOnWarn(msg) {
|
|
|
2150
2150
|
console.warn(`[Vue warn] ${msg.message}`);
|
|
2151
2151
|
}
|
|
2152
2152
|
function createCompilerError(code, loc, messages, additionalMessage) {
|
|
2153
|
-
const msg = (messages || errorMessages)[code] + (additionalMessage || ``) ;
|
|
2153
|
+
const msg = (messages || errorMessages$1)[code] + (additionalMessage || ``) ;
|
|
2154
2154
|
const error = new SyntaxError(String(msg));
|
|
2155
2155
|
error.code = code;
|
|
2156
2156
|
error.loc = loc;
|
|
@@ -2264,7 +2264,7 @@ const ErrorCodes = {
|
|
|
2264
2264
|
"__EXTEND_POINT__": 52,
|
|
2265
2265
|
"52": "__EXTEND_POINT__"
|
|
2266
2266
|
};
|
|
2267
|
-
const errorMessages = {
|
|
2267
|
+
const errorMessages$1 = {
|
|
2268
2268
|
// parse errors
|
|
2269
2269
|
[0]: "Illegal comment.",
|
|
2270
2270
|
[1]: "CDATA section is allowed only in XML context.",
|
|
@@ -25778,7 +25778,7 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
|
|
|
25778
25778
|
createTemplateLiteral: createTemplateLiteral,
|
|
25779
25779
|
createTransformContext: createTransformContext,
|
|
25780
25780
|
createVNodeCall: createVNodeCall,
|
|
25781
|
-
errorMessages: errorMessages,
|
|
25781
|
+
errorMessages: errorMessages$1,
|
|
25782
25782
|
extractIdentifiers: extractIdentifiers$1,
|
|
25783
25783
|
findDir: findDir,
|
|
25784
25784
|
findProp: findProp,
|
|
@@ -30834,21 +30834,21 @@ function parseUriParts(urlString) {
|
|
|
30834
30834
|
return urlParse(isString$2(urlString) ? urlString : "", false, true);
|
|
30835
30835
|
}
|
|
30836
30836
|
|
|
30837
|
-
var __defProp$
|
|
30837
|
+
var __defProp$9 = Object.defineProperty;
|
|
30838
30838
|
var __defProps$8 = Object.defineProperties;
|
|
30839
30839
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
30840
|
-
var __getOwnPropSymbols$
|
|
30841
|
-
var __hasOwnProp$
|
|
30842
|
-
var __propIsEnum$
|
|
30843
|
-
var __defNormalProp$
|
|
30844
|
-
var __spreadValues$
|
|
30840
|
+
var __getOwnPropSymbols$9 = Object.getOwnPropertySymbols;
|
|
30841
|
+
var __hasOwnProp$9 = Object.prototype.hasOwnProperty;
|
|
30842
|
+
var __propIsEnum$9 = Object.prototype.propertyIsEnumerable;
|
|
30843
|
+
var __defNormalProp$9 = (obj, key, value) => key in obj ? __defProp$9(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
30844
|
+
var __spreadValues$9 = (a, b) => {
|
|
30845
30845
|
for (var prop in b || (b = {}))
|
|
30846
|
-
if (__hasOwnProp$
|
|
30847
|
-
__defNormalProp$
|
|
30848
|
-
if (__getOwnPropSymbols$
|
|
30849
|
-
for (var prop of __getOwnPropSymbols$
|
|
30850
|
-
if (__propIsEnum$
|
|
30851
|
-
__defNormalProp$
|
|
30846
|
+
if (__hasOwnProp$9.call(b, prop))
|
|
30847
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
30848
|
+
if (__getOwnPropSymbols$9)
|
|
30849
|
+
for (var prop of __getOwnPropSymbols$9(b)) {
|
|
30850
|
+
if (__propIsEnum$9.call(b, prop))
|
|
30851
|
+
__defNormalProp$9(a, prop, b[prop]);
|
|
30852
30852
|
}
|
|
30853
30853
|
return a;
|
|
30854
30854
|
};
|
|
@@ -30866,11 +30866,11 @@ const defaultAssetUrlOptions = {
|
|
|
30866
30866
|
};
|
|
30867
30867
|
const normalizeOptions = (options) => {
|
|
30868
30868
|
if (Object.keys(options).some((key) => isArray$3(options[key]))) {
|
|
30869
|
-
return __spreadProps$8(__spreadValues$
|
|
30869
|
+
return __spreadProps$8(__spreadValues$9({}, defaultAssetUrlOptions), {
|
|
30870
30870
|
tags: options
|
|
30871
30871
|
});
|
|
30872
30872
|
}
|
|
30873
|
-
return __spreadValues$
|
|
30873
|
+
return __spreadValues$9(__spreadValues$9({}, defaultAssetUrlOptions), options);
|
|
30874
30874
|
};
|
|
30875
30875
|
const createAssetUrlTransformWithOptions = (options) => {
|
|
30876
30876
|
return (node, context) => transformAssetUrl(node, context, options);
|
|
@@ -31730,21 +31730,21 @@ function ssrProcessTransition(node, context) {
|
|
|
31730
31730
|
}
|
|
31731
31731
|
}
|
|
31732
31732
|
|
|
31733
|
-
var __defProp$
|
|
31733
|
+
var __defProp$8 = Object.defineProperty;
|
|
31734
31734
|
var __defProps$7 = Object.defineProperties;
|
|
31735
31735
|
var __getOwnPropDescs$7 = Object.getOwnPropertyDescriptors;
|
|
31736
|
-
var __getOwnPropSymbols$
|
|
31737
|
-
var __hasOwnProp$
|
|
31738
|
-
var __propIsEnum$
|
|
31739
|
-
var __defNormalProp$
|
|
31740
|
-
var __spreadValues$
|
|
31736
|
+
var __getOwnPropSymbols$8 = Object.getOwnPropertySymbols;
|
|
31737
|
+
var __hasOwnProp$8 = Object.prototype.hasOwnProperty;
|
|
31738
|
+
var __propIsEnum$8 = Object.prototype.propertyIsEnumerable;
|
|
31739
|
+
var __defNormalProp$8 = (obj, key, value) => key in obj ? __defProp$8(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
31740
|
+
var __spreadValues$8 = (a, b) => {
|
|
31741
31741
|
for (var prop in b || (b = {}))
|
|
31742
|
-
if (__hasOwnProp$
|
|
31743
|
-
__defNormalProp$
|
|
31744
|
-
if (__getOwnPropSymbols$
|
|
31745
|
-
for (var prop of __getOwnPropSymbols$
|
|
31746
|
-
if (__propIsEnum$
|
|
31747
|
-
__defNormalProp$
|
|
31742
|
+
if (__hasOwnProp$8.call(b, prop))
|
|
31743
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
31744
|
+
if (__getOwnPropSymbols$8)
|
|
31745
|
+
for (var prop of __getOwnPropSymbols$8(b)) {
|
|
31746
|
+
if (__propIsEnum$8.call(b, prop))
|
|
31747
|
+
__defNormalProp$8(a, prop, b[prop]);
|
|
31748
31748
|
}
|
|
31749
31749
|
return a;
|
|
31750
31750
|
};
|
|
@@ -31892,16 +31892,16 @@ function ssrProcessComponent(node, context, parent) {
|
|
|
31892
31892
|
const rawOptionsMap = /* @__PURE__ */ new WeakMap();
|
|
31893
31893
|
const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true);
|
|
31894
31894
|
const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms];
|
|
31895
|
-
const vnodeDirectiveTransforms = __spreadValues$
|
|
31895
|
+
const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms);
|
|
31896
31896
|
function createVNodeSlotBranch(slotProps, vFor, children, parentContext) {
|
|
31897
31897
|
const rawOptions = rawOptionsMap.get(parentContext.root);
|
|
31898
|
-
const subOptions = __spreadProps$7(__spreadValues$
|
|
31898
|
+
const subOptions = __spreadProps$7(__spreadValues$8({}, rawOptions), {
|
|
31899
31899
|
// overwrite with vnode-based transforms
|
|
31900
31900
|
nodeTransforms: [
|
|
31901
31901
|
...vnodeNodeTransforms,
|
|
31902
31902
|
...rawOptions.nodeTransforms || []
|
|
31903
31903
|
],
|
|
31904
|
-
directiveTransforms: __spreadValues$
|
|
31904
|
+
directiveTransforms: __spreadValues$8(__spreadValues$8({}, vnodeDirectiveTransforms), rawOptions.directiveTransforms || {})
|
|
31905
31905
|
});
|
|
31906
31906
|
const wrapperProps = [];
|
|
31907
31907
|
if (slotProps) {
|
|
@@ -31934,8 +31934,8 @@ function subTransform(node, options, parentContext) {
|
|
|
31934
31934
|
const childRoot = createRoot([node]);
|
|
31935
31935
|
const childContext = createTransformContext(childRoot, options);
|
|
31936
31936
|
childContext.ssr = false;
|
|
31937
|
-
childContext.scopes = __spreadValues$
|
|
31938
|
-
childContext.identifiers = __spreadValues$
|
|
31937
|
+
childContext.scopes = __spreadValues$8({}, parentContext.scopes);
|
|
31938
|
+
childContext.identifiers = __spreadValues$8({}, parentContext.identifiers);
|
|
31939
31939
|
childContext.imports = parentContext.imports;
|
|
31940
31940
|
traverseNode(childRoot, childContext);
|
|
31941
31941
|
["helpers", "components", "directives"].forEach((key) => {
|
|
@@ -32384,27 +32384,27 @@ function injectCssVars(node) {
|
|
|
32384
32384
|
}
|
|
32385
32385
|
}
|
|
32386
32386
|
|
|
32387
|
-
var __defProp$
|
|
32387
|
+
var __defProp$7 = Object.defineProperty;
|
|
32388
32388
|
var __defProps$6 = Object.defineProperties;
|
|
32389
32389
|
var __getOwnPropDescs$6 = Object.getOwnPropertyDescriptors;
|
|
32390
|
-
var __getOwnPropSymbols$
|
|
32391
|
-
var __hasOwnProp$
|
|
32392
|
-
var __propIsEnum$
|
|
32393
|
-
var __defNormalProp$
|
|
32394
|
-
var __spreadValues$
|
|
32390
|
+
var __getOwnPropSymbols$7 = Object.getOwnPropertySymbols;
|
|
32391
|
+
var __hasOwnProp$7 = Object.prototype.hasOwnProperty;
|
|
32392
|
+
var __propIsEnum$7 = Object.prototype.propertyIsEnumerable;
|
|
32393
|
+
var __defNormalProp$7 = (obj, key, value) => key in obj ? __defProp$7(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
32394
|
+
var __spreadValues$7 = (a, b) => {
|
|
32395
32395
|
for (var prop in b || (b = {}))
|
|
32396
|
-
if (__hasOwnProp$
|
|
32397
|
-
__defNormalProp$
|
|
32398
|
-
if (__getOwnPropSymbols$
|
|
32399
|
-
for (var prop of __getOwnPropSymbols$
|
|
32400
|
-
if (__propIsEnum$
|
|
32401
|
-
__defNormalProp$
|
|
32396
|
+
if (__hasOwnProp$7.call(b, prop))
|
|
32397
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
32398
|
+
if (__getOwnPropSymbols$7)
|
|
32399
|
+
for (var prop of __getOwnPropSymbols$7(b)) {
|
|
32400
|
+
if (__propIsEnum$7.call(b, prop))
|
|
32401
|
+
__defNormalProp$7(a, prop, b[prop]);
|
|
32402
32402
|
}
|
|
32403
32403
|
return a;
|
|
32404
32404
|
};
|
|
32405
32405
|
var __spreadProps$6 = (a, b) => __defProps$6(a, __getOwnPropDescs$6(b));
|
|
32406
32406
|
function compile(source, options = {}) {
|
|
32407
|
-
options = __spreadProps$6(__spreadValues$
|
|
32407
|
+
options = __spreadProps$6(__spreadValues$7(__spreadValues$7({}, options), parserOptions), {
|
|
32408
32408
|
ssr: true,
|
|
32409
32409
|
inSSR: true,
|
|
32410
32410
|
scopeId: options.mode === "function" ? null : options.scopeId,
|
|
@@ -32416,7 +32416,7 @@ function compile(source, options = {}) {
|
|
|
32416
32416
|
});
|
|
32417
32417
|
const ast = typeof source === "string" ? baseParse(source, options) : source;
|
|
32418
32418
|
rawOptionsMap.set(ast, options);
|
|
32419
|
-
transform(ast, __spreadProps$6(__spreadValues$
|
|
32419
|
+
transform(ast, __spreadProps$6(__spreadValues$7({}, options), {
|
|
32420
32420
|
hoistStatic: false,
|
|
32421
32421
|
nodeTransforms: [
|
|
32422
32422
|
ssrTransformIf,
|
|
@@ -32433,7 +32433,7 @@ function compile(source, options = {}) {
|
|
|
32433
32433
|
...options.nodeTransforms || []
|
|
32434
32434
|
// user transforms
|
|
32435
32435
|
],
|
|
32436
|
-
directiveTransforms: __spreadValues$
|
|
32436
|
+
directiveTransforms: __spreadValues$7({
|
|
32437
32437
|
// reusing core v-bind
|
|
32438
32438
|
bind: transformBind,
|
|
32439
32439
|
on: transformOn$1,
|
|
@@ -32484,21 +32484,21 @@ function warn(msg) {
|
|
|
32484
32484
|
);
|
|
32485
32485
|
}
|
|
32486
32486
|
|
|
32487
|
-
var __defProp$
|
|
32487
|
+
var __defProp$6 = Object.defineProperty;
|
|
32488
32488
|
var __defProps$5 = Object.defineProperties;
|
|
32489
32489
|
var __getOwnPropDescs$5 = Object.getOwnPropertyDescriptors;
|
|
32490
|
-
var __getOwnPropSymbols$
|
|
32491
|
-
var __hasOwnProp$
|
|
32492
|
-
var __propIsEnum$
|
|
32493
|
-
var __defNormalProp$
|
|
32494
|
-
var __spreadValues$
|
|
32490
|
+
var __getOwnPropSymbols$6 = Object.getOwnPropertySymbols;
|
|
32491
|
+
var __hasOwnProp$6 = Object.prototype.hasOwnProperty;
|
|
32492
|
+
var __propIsEnum$6 = Object.prototype.propertyIsEnumerable;
|
|
32493
|
+
var __defNormalProp$6 = (obj, key, value) => key in obj ? __defProp$6(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
32494
|
+
var __spreadValues$6 = (a, b) => {
|
|
32495
32495
|
for (var prop in b || (b = {}))
|
|
32496
|
-
if (__hasOwnProp$
|
|
32497
|
-
__defNormalProp$
|
|
32498
|
-
if (__getOwnPropSymbols$
|
|
32499
|
-
for (var prop of __getOwnPropSymbols$
|
|
32500
|
-
if (__propIsEnum$
|
|
32501
|
-
__defNormalProp$
|
|
32496
|
+
if (__hasOwnProp$6.call(b, prop))
|
|
32497
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
32498
|
+
if (__getOwnPropSymbols$6)
|
|
32499
|
+
for (var prop of __getOwnPropSymbols$6(b)) {
|
|
32500
|
+
if (__propIsEnum$6.call(b, prop))
|
|
32501
|
+
__defNormalProp$6(a, prop, b[prop]);
|
|
32502
32502
|
}
|
|
32503
32503
|
return a;
|
|
32504
32504
|
};
|
|
@@ -32508,7 +32508,7 @@ function preprocess$1({ source, filename, preprocessOptions }, preprocessor) {
|
|
|
32508
32508
|
let err = null;
|
|
32509
32509
|
preprocessor.render(
|
|
32510
32510
|
source,
|
|
32511
|
-
__spreadValues$
|
|
32511
|
+
__spreadValues$6({ filename }, preprocessOptions),
|
|
32512
32512
|
(_err, _res) => {
|
|
32513
32513
|
if (_err)
|
|
32514
32514
|
err = _err;
|
|
@@ -32529,7 +32529,7 @@ function compileTemplate(options) {
|
|
|
32529
32529
|
const preprocessor = preprocessLang ? preprocessCustomRequire ? preprocessCustomRequire(preprocessLang) : void 0 : false;
|
|
32530
32530
|
if (preprocessor) {
|
|
32531
32531
|
try {
|
|
32532
|
-
return doCompileTemplate(__spreadProps$5(__spreadValues$
|
|
32532
|
+
return doCompileTemplate(__spreadProps$5(__spreadValues$6({}, options), {
|
|
32533
32533
|
source: preprocess$1(options, preprocessor),
|
|
32534
32534
|
ast: void 0
|
|
32535
32535
|
// invalidate AST if template goes through preprocessor
|
|
@@ -32610,7 +32610,7 @@ function doCompileTemplate({
|
|
|
32610
32610
|
);
|
|
32611
32611
|
inAST = createRoot(template.children, inAST.source);
|
|
32612
32612
|
}
|
|
32613
|
-
let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$
|
|
32613
|
+
let { code, ast, preamble, map } = compiler.compile(inAST || source, __spreadProps$5(__spreadValues$6({
|
|
32614
32614
|
mode: "module",
|
|
32615
32615
|
prefixIdentifiers: true,
|
|
32616
32616
|
hoistStatic: true,
|
|
@@ -43915,28 +43915,28 @@ function merge(oldMap, newMap) {
|
|
|
43915
43915
|
|
|
43916
43916
|
var merge$1 = /*@__PURE__*/getDefaultExportFromCjs(mergeSourceMap);
|
|
43917
43917
|
|
|
43918
|
-
var __defProp$
|
|
43918
|
+
var __defProp$5 = Object.defineProperty;
|
|
43919
43919
|
var __defProps$4 = Object.defineProperties;
|
|
43920
43920
|
var __getOwnPropDescs$4 = Object.getOwnPropertyDescriptors;
|
|
43921
|
-
var __getOwnPropSymbols$
|
|
43922
|
-
var __hasOwnProp$
|
|
43923
|
-
var __propIsEnum$
|
|
43924
|
-
var __defNormalProp$
|
|
43925
|
-
var __spreadValues$
|
|
43921
|
+
var __getOwnPropSymbols$5 = Object.getOwnPropertySymbols;
|
|
43922
|
+
var __hasOwnProp$5 = Object.prototype.hasOwnProperty;
|
|
43923
|
+
var __propIsEnum$5 = Object.prototype.propertyIsEnumerable;
|
|
43924
|
+
var __defNormalProp$5 = (obj, key, value) => key in obj ? __defProp$5(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
43925
|
+
var __spreadValues$5 = (a, b) => {
|
|
43926
43926
|
for (var prop in b || (b = {}))
|
|
43927
|
-
if (__hasOwnProp$
|
|
43928
|
-
__defNormalProp$
|
|
43929
|
-
if (__getOwnPropSymbols$
|
|
43930
|
-
for (var prop of __getOwnPropSymbols$
|
|
43931
|
-
if (__propIsEnum$
|
|
43932
|
-
__defNormalProp$
|
|
43927
|
+
if (__hasOwnProp$5.call(b, prop))
|
|
43928
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
43929
|
+
if (__getOwnPropSymbols$5)
|
|
43930
|
+
for (var prop of __getOwnPropSymbols$5(b)) {
|
|
43931
|
+
if (__propIsEnum$5.call(b, prop))
|
|
43932
|
+
__defNormalProp$5(a, prop, b[prop]);
|
|
43933
43933
|
}
|
|
43934
43934
|
return a;
|
|
43935
43935
|
};
|
|
43936
43936
|
var __spreadProps$4 = (a, b) => __defProps$4(a, __getOwnPropDescs$4(b));
|
|
43937
43937
|
const scss = (source, map, options, load = require) => {
|
|
43938
43938
|
const nodeSass = load("sass");
|
|
43939
|
-
const finalOptions = __spreadProps$4(__spreadValues$
|
|
43939
|
+
const finalOptions = __spreadProps$4(__spreadValues$5({}, options), {
|
|
43940
43940
|
data: getSource(source, options.filename, options.additionalData),
|
|
43941
43941
|
file: options.filename,
|
|
43942
43942
|
outFile: options.filename,
|
|
@@ -43964,7 +43964,7 @@ const scss = (source, map, options, load = require) => {
|
|
|
43964
43964
|
const sass = (source, map, options, load) => scss(
|
|
43965
43965
|
source,
|
|
43966
43966
|
map,
|
|
43967
|
-
__spreadProps$4(__spreadValues$
|
|
43967
|
+
__spreadProps$4(__spreadValues$5({}, options), {
|
|
43968
43968
|
indentedSyntax: true
|
|
43969
43969
|
}),
|
|
43970
43970
|
load
|
|
@@ -43975,7 +43975,7 @@ const less = (source, map, options, load = require) => {
|
|
|
43975
43975
|
let error = null;
|
|
43976
43976
|
nodeLess.render(
|
|
43977
43977
|
getSource(source, options.filename, options.additionalData),
|
|
43978
|
-
__spreadProps$4(__spreadValues$
|
|
43978
|
+
__spreadProps$4(__spreadValues$5({}, options), { syncImport: true }),
|
|
43979
43979
|
(err, output) => {
|
|
43980
43980
|
error = err;
|
|
43981
43981
|
result = output;
|
|
@@ -44035,32 +44035,32 @@ const processors = {
|
|
|
44035
44035
|
stylus: styl
|
|
44036
44036
|
};
|
|
44037
44037
|
|
|
44038
|
-
var __defProp$
|
|
44038
|
+
var __defProp$4 = Object.defineProperty;
|
|
44039
44039
|
var __defProps$3 = Object.defineProperties;
|
|
44040
44040
|
var __getOwnPropDescs$3 = Object.getOwnPropertyDescriptors;
|
|
44041
|
-
var __getOwnPropSymbols$
|
|
44042
|
-
var __hasOwnProp$
|
|
44043
|
-
var __propIsEnum$
|
|
44044
|
-
var __defNormalProp$
|
|
44045
|
-
var __spreadValues$
|
|
44041
|
+
var __getOwnPropSymbols$4 = Object.getOwnPropertySymbols;
|
|
44042
|
+
var __hasOwnProp$4 = Object.prototype.hasOwnProperty;
|
|
44043
|
+
var __propIsEnum$4 = Object.prototype.propertyIsEnumerable;
|
|
44044
|
+
var __defNormalProp$4 = (obj, key, value) => key in obj ? __defProp$4(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
44045
|
+
var __spreadValues$4 = (a, b) => {
|
|
44046
44046
|
for (var prop in b || (b = {}))
|
|
44047
|
-
if (__hasOwnProp$
|
|
44048
|
-
__defNormalProp$
|
|
44049
|
-
if (__getOwnPropSymbols$
|
|
44050
|
-
for (var prop of __getOwnPropSymbols$
|
|
44051
|
-
if (__propIsEnum$
|
|
44052
|
-
__defNormalProp$
|
|
44047
|
+
if (__hasOwnProp$4.call(b, prop))
|
|
44048
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
44049
|
+
if (__getOwnPropSymbols$4)
|
|
44050
|
+
for (var prop of __getOwnPropSymbols$4(b)) {
|
|
44051
|
+
if (__propIsEnum$4.call(b, prop))
|
|
44052
|
+
__defNormalProp$4(a, prop, b[prop]);
|
|
44053
44053
|
}
|
|
44054
44054
|
return a;
|
|
44055
44055
|
};
|
|
44056
44056
|
var __spreadProps$3 = (a, b) => __defProps$3(a, __getOwnPropDescs$3(b));
|
|
44057
44057
|
function compileStyle(options) {
|
|
44058
|
-
return doCompileStyle(__spreadProps$3(__spreadValues$
|
|
44058
|
+
return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), {
|
|
44059
44059
|
isAsync: false
|
|
44060
44060
|
}));
|
|
44061
44061
|
}
|
|
44062
44062
|
function compileStyleAsync(options) {
|
|
44063
|
-
return doCompileStyle(__spreadProps$3(__spreadValues$
|
|
44063
|
+
return doCompileStyle(__spreadProps$3(__spreadValues$4({}, options), {
|
|
44064
44064
|
isAsync: true
|
|
44065
44065
|
}));
|
|
44066
44066
|
}
|
|
@@ -44099,7 +44099,7 @@ function doCompileStyle(options) {
|
|
|
44099
44099
|
);
|
|
44100
44100
|
}
|
|
44101
44101
|
}
|
|
44102
|
-
const postCSSOptions = __spreadProps$3(__spreadValues$
|
|
44102
|
+
const postCSSOptions = __spreadProps$3(__spreadValues$4({}, postcssOptions), {
|
|
44103
44103
|
to: filename,
|
|
44104
44104
|
from: filename
|
|
44105
44105
|
});
|
|
@@ -44170,7 +44170,7 @@ function preprocess(options, preprocessor) {
|
|
|
44170
44170
|
return preprocessor(
|
|
44171
44171
|
options.source,
|
|
44172
44172
|
options.inMap || options.map,
|
|
44173
|
-
__spreadValues$
|
|
44173
|
+
__spreadValues$4({
|
|
44174
44174
|
filename: options.filename
|
|
44175
44175
|
}, options.preprocessOptions),
|
|
44176
44176
|
options.preprocessCustomRequire
|
|
@@ -45737,21 +45737,21 @@ function specifierEnd(s, end, nodeEnd) {
|
|
|
45737
45737
|
return hasCommas ? end : oldEnd;
|
|
45738
45738
|
}
|
|
45739
45739
|
|
|
45740
|
-
var __defProp$
|
|
45740
|
+
var __defProp$3 = Object.defineProperty;
|
|
45741
45741
|
var __defProps$2 = Object.defineProperties;
|
|
45742
45742
|
var __getOwnPropDescs$2 = Object.getOwnPropertyDescriptors;
|
|
45743
|
-
var __getOwnPropSymbols$
|
|
45744
|
-
var __hasOwnProp$
|
|
45745
|
-
var __propIsEnum$
|
|
45746
|
-
var __defNormalProp$
|
|
45747
|
-
var __spreadValues$
|
|
45743
|
+
var __getOwnPropSymbols$3 = Object.getOwnPropertySymbols;
|
|
45744
|
+
var __hasOwnProp$3 = Object.prototype.hasOwnProperty;
|
|
45745
|
+
var __propIsEnum$3 = Object.prototype.propertyIsEnumerable;
|
|
45746
|
+
var __defNormalProp$3 = (obj, key, value) => key in obj ? __defProp$3(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
45747
|
+
var __spreadValues$3 = (a, b) => {
|
|
45748
45748
|
for (var prop in b || (b = {}))
|
|
45749
|
-
if (__hasOwnProp$
|
|
45750
|
-
__defNormalProp$
|
|
45751
|
-
if (__getOwnPropSymbols$
|
|
45752
|
-
for (var prop of __getOwnPropSymbols$
|
|
45753
|
-
if (__propIsEnum$
|
|
45754
|
-
__defNormalProp$
|
|
45749
|
+
if (__hasOwnProp$3.call(b, prop))
|
|
45750
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
45751
|
+
if (__getOwnPropSymbols$3)
|
|
45752
|
+
for (var prop of __getOwnPropSymbols$3(b)) {
|
|
45753
|
+
if (__propIsEnum$3.call(b, prop))
|
|
45754
|
+
__defNormalProp$3(a, prop, b[prop]);
|
|
45755
45755
|
}
|
|
45756
45756
|
return a;
|
|
45757
45757
|
};
|
|
@@ -45789,7 +45789,7 @@ function processNormalScript(ctx, scopeId) {
|
|
|
45789
45789
|
export default ${defaultVar}`;
|
|
45790
45790
|
}
|
|
45791
45791
|
}
|
|
45792
|
-
return __spreadProps$2(__spreadValues$
|
|
45792
|
+
return __spreadProps$2(__spreadValues$3({}, script), {
|
|
45793
45793
|
content,
|
|
45794
45794
|
map,
|
|
45795
45795
|
bindings,
|
|
@@ -45800,21 +45800,21 @@ export default ${defaultVar}`;
|
|
|
45800
45800
|
}
|
|
45801
45801
|
}
|
|
45802
45802
|
|
|
45803
|
-
var __defProp$
|
|
45803
|
+
var __defProp$2 = Object.defineProperty;
|
|
45804
45804
|
var __defProps$1 = Object.defineProperties;
|
|
45805
45805
|
var __getOwnPropDescs$1 = Object.getOwnPropertyDescriptors;
|
|
45806
|
-
var __getOwnPropSymbols$
|
|
45807
|
-
var __hasOwnProp$
|
|
45808
|
-
var __propIsEnum$
|
|
45809
|
-
var __defNormalProp$
|
|
45810
|
-
var __spreadValues$
|
|
45806
|
+
var __getOwnPropSymbols$2 = Object.getOwnPropertySymbols;
|
|
45807
|
+
var __hasOwnProp$2 = Object.prototype.hasOwnProperty;
|
|
45808
|
+
var __propIsEnum$2 = Object.prototype.propertyIsEnumerable;
|
|
45809
|
+
var __defNormalProp$2 = (obj, key, value) => key in obj ? __defProp$2(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
45810
|
+
var __spreadValues$2 = (a, b) => {
|
|
45811
45811
|
for (var prop in b || (b = {}))
|
|
45812
|
-
if (__hasOwnProp$
|
|
45813
|
-
__defNormalProp$
|
|
45814
|
-
if (__getOwnPropSymbols$
|
|
45815
|
-
for (var prop of __getOwnPropSymbols$
|
|
45816
|
-
if (__propIsEnum$
|
|
45817
|
-
__defNormalProp$
|
|
45812
|
+
if (__hasOwnProp$2.call(b, prop))
|
|
45813
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
45814
|
+
if (__getOwnPropSymbols$2)
|
|
45815
|
+
for (var prop of __getOwnPropSymbols$2(b)) {
|
|
45816
|
+
if (__propIsEnum$2.call(b, prop))
|
|
45817
|
+
__defNormalProp$2(a, prop, b[prop]);
|
|
45818
45818
|
}
|
|
45819
45819
|
return a;
|
|
45820
45820
|
};
|
|
@@ -46211,7 +46211,7 @@ function resolveTemplateKeys(ctx, node, scope) {
|
|
|
46211
46211
|
const resolved = resolveStringType(ctx, e, scope);
|
|
46212
46212
|
const restResolved = resolveTemplateKeys(
|
|
46213
46213
|
ctx,
|
|
46214
|
-
__spreadProps$1(__spreadValues$
|
|
46214
|
+
__spreadProps$1(__spreadValues$2({}, node), {
|
|
46215
46215
|
expressions: node.expressions.slice(1),
|
|
46216
46216
|
quasis: q ? node.quasis.slice(1) : node.quasis
|
|
46217
46217
|
}),
|
|
@@ -46242,14 +46242,14 @@ function resolveBuiltin(ctx, node, name, scope, typeParameters) {
|
|
|
46242
46242
|
case "Partial": {
|
|
46243
46243
|
const res2 = { props: {}, calls: t.calls };
|
|
46244
46244
|
Object.keys(t.props).forEach((key) => {
|
|
46245
|
-
res2.props[key] = __spreadProps$1(__spreadValues$
|
|
46245
|
+
res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: true });
|
|
46246
46246
|
});
|
|
46247
46247
|
return res2;
|
|
46248
46248
|
}
|
|
46249
46249
|
case "Required": {
|
|
46250
46250
|
const res2 = { props: {}, calls: t.calls };
|
|
46251
46251
|
Object.keys(t.props).forEach((key) => {
|
|
46252
|
-
res2.props[key] = __spreadProps$1(__spreadValues$
|
|
46252
|
+
res2.props[key] = __spreadProps$1(__spreadValues$2({}, t.props[key]), { optional: false });
|
|
46253
46253
|
});
|
|
46254
46254
|
return res2;
|
|
46255
46255
|
}
|
|
@@ -47766,21 +47766,21 @@ function processAwait(ctx, node, needSemi, isStatement) {
|
|
|
47766
47766
|
);
|
|
47767
47767
|
}
|
|
47768
47768
|
|
|
47769
|
-
var __defProp = Object.defineProperty;
|
|
47769
|
+
var __defProp$1 = Object.defineProperty;
|
|
47770
47770
|
var __defProps = Object.defineProperties;
|
|
47771
47771
|
var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
|
|
47772
|
-
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
47773
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
47774
|
-
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
47775
|
-
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
47776
|
-
var __spreadValues = (a, b) => {
|
|
47772
|
+
var __getOwnPropSymbols$1 = Object.getOwnPropertySymbols;
|
|
47773
|
+
var __hasOwnProp$1 = Object.prototype.hasOwnProperty;
|
|
47774
|
+
var __propIsEnum$1 = Object.prototype.propertyIsEnumerable;
|
|
47775
|
+
var __defNormalProp$1 = (obj, key, value) => key in obj ? __defProp$1(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
47776
|
+
var __spreadValues$1 = (a, b) => {
|
|
47777
47777
|
for (var prop in b || (b = {}))
|
|
47778
|
-
if (__hasOwnProp.call(b, prop))
|
|
47779
|
-
__defNormalProp(a, prop, b[prop]);
|
|
47780
|
-
if (__getOwnPropSymbols)
|
|
47781
|
-
for (var prop of __getOwnPropSymbols(b)) {
|
|
47782
|
-
if (__propIsEnum.call(b, prop))
|
|
47783
|
-
__defNormalProp(a, prop, b[prop]);
|
|
47778
|
+
if (__hasOwnProp$1.call(b, prop))
|
|
47779
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
47780
|
+
if (__getOwnPropSymbols$1)
|
|
47781
|
+
for (var prop of __getOwnPropSymbols$1(b)) {
|
|
47782
|
+
if (__propIsEnum$1.call(b, prop))
|
|
47783
|
+
__defNormalProp$1(a, prop, b[prop]);
|
|
47784
47784
|
}
|
|
47785
47785
|
return a;
|
|
47786
47786
|
};
|
|
@@ -48231,7 +48231,7 @@ let __temp${any}, __restore${any}
|
|
|
48231
48231
|
}
|
|
48232
48232
|
let returned;
|
|
48233
48233
|
if (!options.inlineTemplate || !sfc.template && ctx.hasDefaultExportRender) {
|
|
48234
|
-
const allBindings = __spreadValues(__spreadValues({}, scriptBindings), setupBindings);
|
|
48234
|
+
const allBindings = __spreadValues$1(__spreadValues$1({}, scriptBindings), setupBindings);
|
|
48235
48235
|
for (const key in ctx.userImports) {
|
|
48236
48236
|
if (!ctx.userImports[key].isType && ctx.userImports[key].isUsedInTemplate) {
|
|
48237
48237
|
allBindings[key] = true;
|
|
@@ -48254,7 +48254,7 @@ let __temp${any}, __restore${any}
|
|
|
48254
48254
|
if (options.templateOptions && options.templateOptions.ssr) {
|
|
48255
48255
|
hasInlinedSsrRenderFn = true;
|
|
48256
48256
|
}
|
|
48257
|
-
const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues({
|
|
48257
|
+
const { code, ast, preamble, tips, errors } = compileTemplate(__spreadProps(__spreadValues$1({
|
|
48258
48258
|
filename,
|
|
48259
48259
|
ast: sfc.template.ast,
|
|
48260
48260
|
source: sfc.template.content,
|
|
@@ -48264,7 +48264,7 @@ let __temp${any}, __restore${any}
|
|
|
48264
48264
|
scoped: sfc.styles.some((s) => s.scoped),
|
|
48265
48265
|
isProd: options.isProd,
|
|
48266
48266
|
ssrCssVars: sfc.cssVars,
|
|
48267
|
-
compilerOptions: __spreadProps(__spreadValues({}, options.templateOptions && options.templateOptions.compilerOptions), {
|
|
48267
|
+
compilerOptions: __spreadProps(__spreadValues$1({}, options.templateOptions && options.templateOptions.compilerOptions), {
|
|
48268
48268
|
inline: true,
|
|
48269
48269
|
isTS: ctx.isTS,
|
|
48270
48270
|
bindingMetadata: ctx.bindingMetadata
|
|
@@ -48386,7 +48386,7 @@ ${exposeCall}`
|
|
|
48386
48386
|
`
|
|
48387
48387
|
);
|
|
48388
48388
|
}
|
|
48389
|
-
return __spreadProps(__spreadValues({}, scriptSetup), {
|
|
48389
|
+
return __spreadProps(__spreadValues$1({}, scriptSetup), {
|
|
48390
48390
|
bindings: ctx.bindingMetadata,
|
|
48391
48391
|
imports: ctx.userImports,
|
|
48392
48392
|
content: ctx.s.toString(),
|
|
@@ -48556,9 +48556,26 @@ function isStaticNode(node) {
|
|
|
48556
48556
|
return false;
|
|
48557
48557
|
}
|
|
48558
48558
|
|
|
48559
|
-
|
|
48559
|
+
var __defProp = Object.defineProperty;
|
|
48560
|
+
var __getOwnPropSymbols = Object.getOwnPropertySymbols;
|
|
48561
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
48562
|
+
var __propIsEnum = Object.prototype.propertyIsEnumerable;
|
|
48563
|
+
var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
|
|
48564
|
+
var __spreadValues = (a, b) => {
|
|
48565
|
+
for (var prop in b || (b = {}))
|
|
48566
|
+
if (__hasOwnProp.call(b, prop))
|
|
48567
|
+
__defNormalProp(a, prop, b[prop]);
|
|
48568
|
+
if (__getOwnPropSymbols)
|
|
48569
|
+
for (var prop of __getOwnPropSymbols(b)) {
|
|
48570
|
+
if (__propIsEnum.call(b, prop))
|
|
48571
|
+
__defNormalProp(a, prop, b[prop]);
|
|
48572
|
+
}
|
|
48573
|
+
return a;
|
|
48574
|
+
};
|
|
48575
|
+
const version = "3.4.0-rc.2";
|
|
48560
48576
|
const parseCache = parseCache$1;
|
|
48577
|
+
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48561
48578
|
const walk = walk$2;
|
|
48562
48579
|
const shouldTransformRef = () => false;
|
|
48563
48580
|
|
|
48564
|
-
export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers };
|
|
48581
|
+
export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, errorMessages, extractIdentifiers$1 as extractIdentifiers, extractRuntimeEmits, extractRuntimeProps, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransformRef, version, walk, walkIdentifiers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.4.0-rc.
|
|
3
|
+
"version": "3.4.0-rc.2",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -37,10 +37,10 @@
|
|
|
37
37
|
"magic-string": "^0.30.5",
|
|
38
38
|
"postcss": "^8.4.32",
|
|
39
39
|
"source-map-js": "^1.0.2",
|
|
40
|
-
"@vue/compiler-core": "3.4.0-rc.
|
|
41
|
-
"@vue/compiler-ssr": "3.4.0-rc.
|
|
42
|
-
"@vue/compiler-dom": "3.4.0-rc.
|
|
43
|
-
"@vue/shared": "3.4.0-rc.
|
|
40
|
+
"@vue/compiler-core": "3.4.0-rc.2",
|
|
41
|
+
"@vue/compiler-ssr": "3.4.0-rc.2",
|
|
42
|
+
"@vue/compiler-dom": "3.4.0-rc.2",
|
|
43
|
+
"@vue/shared": "3.4.0-rc.2"
|
|
44
44
|
},
|
|
45
45
|
"devDependencies": {
|
|
46
46
|
"@babel/types": "^7.23.6",
|