@vue/compiler-sfc 3.5.0 → 3.5.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
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.5.
|
|
2
|
+
* @vue/compiler-sfc v3.5.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -19507,7 +19507,7 @@ function genRuntimeProps(ctx) {
|
|
|
19507
19507
|
);
|
|
19508
19508
|
}
|
|
19509
19509
|
if (defaults.length) {
|
|
19510
|
-
propsDecls =
|
|
19510
|
+
propsDecls = `/*@__PURE__*/${ctx.helper(
|
|
19511
19511
|
`mergeDefaults`
|
|
19512
19512
|
)}(${propsDecls}, {
|
|
19513
19513
|
${defaults.join(",\n ")}
|
|
@@ -19519,7 +19519,7 @@ function genRuntimeProps(ctx) {
|
|
|
19519
19519
|
}
|
|
19520
19520
|
const modelsDecls = genModelProps(ctx);
|
|
19521
19521
|
if (propsDecls && modelsDecls) {
|
|
19522
|
-
return
|
|
19522
|
+
return `/*@__PURE__*/${ctx.helper(
|
|
19523
19523
|
"mergeModels"
|
|
19524
19524
|
)}(${propsDecls}, ${modelsDecls})`;
|
|
19525
19525
|
} else {
|
|
@@ -19543,7 +19543,7 @@ function extractRuntimeProps(ctx) {
|
|
|
19543
19543
|
${propStrings.join(",\n ")}
|
|
19544
19544
|
}`;
|
|
19545
19545
|
if (ctx.propsRuntimeDefaults && !hasStaticDefaults) {
|
|
19546
|
-
propsDecls =
|
|
19546
|
+
propsDecls = `/*@__PURE__*/${ctx.helper(
|
|
19547
19547
|
"mergeDefaults"
|
|
19548
19548
|
)}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`;
|
|
19549
19549
|
}
|
|
@@ -19887,7 +19887,7 @@ function genRuntimeEmits(ctx) {
|
|
|
19887
19887
|
}
|
|
19888
19888
|
if (ctx.hasDefineModelCall) {
|
|
19889
19889
|
let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`;
|
|
19890
|
-
emitsDecl = emitsDecl ?
|
|
19890
|
+
emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper(
|
|
19891
19891
|
"mergeModels"
|
|
19892
19892
|
)}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl;
|
|
19893
19893
|
}
|
|
@@ -20647,7 +20647,7 @@ return ${returned}
|
|
|
20647
20647
|
ctx.s.prependLeft(
|
|
20648
20648
|
startOffset,
|
|
20649
20649
|
`
|
|
20650
|
-
${genDefaultAs}
|
|
20650
|
+
${genDefaultAs} /*@__PURE__*/${ctx.helper(
|
|
20651
20651
|
`defineComponent`
|
|
20652
20652
|
)}({${def}${runtimeOptions}
|
|
20653
20653
|
${hasAwait ? `async ` : ``}setup(${args}) {
|
|
@@ -20659,7 +20659,7 @@ ${exposeCall}`
|
|
|
20659
20659
|
ctx.s.prependLeft(
|
|
20660
20660
|
startOffset,
|
|
20661
20661
|
`
|
|
20662
|
-
${genDefaultAs}
|
|
20662
|
+
${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions}
|
|
20663
20663
|
${hasAwait ? `async ` : ``}setup(${args}) {
|
|
20664
20664
|
${exposeCall}`
|
|
20665
20665
|
);
|
|
@@ -20856,7 +20856,7 @@ function isStaticNode(node) {
|
|
|
20856
20856
|
return false;
|
|
20857
20857
|
}
|
|
20858
20858
|
|
|
20859
|
-
const version = "3.5.
|
|
20859
|
+
const version = "3.5.2";
|
|
20860
20860
|
const parseCache = parseCache$1;
|
|
20861
20861
|
const errorMessages = {
|
|
20862
20862
|
...CompilerDOM.errorMessages,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.5.
|
|
2
|
+
* @vue/compiler-sfc v3.5.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -17420,7 +17420,7 @@ const tokenizer$2 = new Tokenizer$1(stack, {
|
|
|
17420
17420
|
rawName: raw,
|
|
17421
17421
|
exp: void 0,
|
|
17422
17422
|
arg: void 0,
|
|
17423
|
-
modifiers: raw === "." ? ["prop"] : [],
|
|
17423
|
+
modifiers: raw === "." ? [createSimpleExpression("prop")] : [],
|
|
17424
17424
|
loc: getLoc(start)
|
|
17425
17425
|
};
|
|
17426
17426
|
if (name === "pre") {
|
|
@@ -17463,7 +17463,8 @@ const tokenizer$2 = new Tokenizer$1(stack, {
|
|
|
17463
17463
|
setLocEnd(arg.loc, end);
|
|
17464
17464
|
}
|
|
17465
17465
|
} else {
|
|
17466
|
-
|
|
17466
|
+
const exp = createSimpleExpression(mod, true, getLoc(start, end));
|
|
17467
|
+
currentProp.modifiers.push(exp);
|
|
17467
17468
|
}
|
|
17468
17469
|
},
|
|
17469
17470
|
onattribdata(start, end) {
|
|
@@ -21913,7 +21914,7 @@ var SourceMapGenerator$6 = sourceMap$2.SourceMapGenerator = sourceMapGenerator$1
|
|
|
21913
21914
|
var SourceMapConsumer$5 = sourceMap$2.SourceMapConsumer = sourceMapConsumer$1.SourceMapConsumer;
|
|
21914
21915
|
sourceMap$2.SourceNode = sourceNode$1.SourceNode;
|
|
21915
21916
|
|
|
21916
|
-
const PURE_ANNOTATION =
|
|
21917
|
+
const PURE_ANNOTATION = `/*@__PURE__*/`;
|
|
21917
21918
|
const aliasHelper = (s) => `${helperNameMap[s]}: _${helperNameMap[s]}`;
|
|
21918
21919
|
function createCodegenContext(ast, {
|
|
21919
21920
|
mode = "function",
|
|
@@ -23163,7 +23164,7 @@ const transformBind = (dir, _node, context) => {
|
|
|
23163
23164
|
} else if (!arg.isStatic) {
|
|
23164
23165
|
arg.content = `${arg.content} || ""`;
|
|
23165
23166
|
}
|
|
23166
|
-
if (modifiers.
|
|
23167
|
+
if (modifiers.some((mod) => mod.content === "camel")) {
|
|
23167
23168
|
if (arg.type === 4) {
|
|
23168
23169
|
if (arg.isStatic) {
|
|
23169
23170
|
arg.content = camelize(arg.content);
|
|
@@ -23176,10 +23177,10 @@ const transformBind = (dir, _node, context) => {
|
|
|
23176
23177
|
}
|
|
23177
23178
|
}
|
|
23178
23179
|
if (!context.inSSR) {
|
|
23179
|
-
if (modifiers.
|
|
23180
|
+
if (modifiers.some((mod) => mod.content === "prop")) {
|
|
23180
23181
|
injectPrefix(arg, ".");
|
|
23181
23182
|
}
|
|
23182
|
-
if (modifiers.
|
|
23183
|
+
if (modifiers.some((mod) => mod.content === "attr")) {
|
|
23183
23184
|
injectPrefix(arg, "^");
|
|
23184
23185
|
}
|
|
23185
23186
|
}
|
|
@@ -24078,7 +24079,7 @@ function buildProps(node, context, props = node.props, isComponent, isDynamicCom
|
|
|
24078
24079
|
}
|
|
24079
24080
|
continue;
|
|
24080
24081
|
}
|
|
24081
|
-
if (isVBind && modifiers.
|
|
24082
|
+
if (isVBind && modifiers.some((mod) => mod.content === "prop")) {
|
|
24082
24083
|
patchFlag |= 32;
|
|
24083
24084
|
}
|
|
24084
24085
|
const directiveTransform = context.directiveTransforms[name];
|
|
@@ -24644,7 +24645,7 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
24644
24645
|
props[1].value = context.cache(props[1].value);
|
|
24645
24646
|
}
|
|
24646
24647
|
if (dir.modifiers.length && node.tagType === 1) {
|
|
24647
|
-
const modifiers = dir.modifiers.map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
24648
|
+
const modifiers = dir.modifiers.map((m) => m.content).map((m) => (isSimpleIdentifier(m) ? m : JSON.stringify(m)) + `: true`).join(`, `);
|
|
24648
24649
|
const modifiersKey = arg ? isStaticExp(arg) ? `${arg.content}Modifiers` : createCompoundExpression([arg, ' + "Modifiers"']) : `modelModifiers`;
|
|
24649
24650
|
props.push(
|
|
24650
24651
|
createObjectProperty(
|
|
@@ -25072,7 +25073,7 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
25072
25073
|
const nonKeyModifiers = [];
|
|
25073
25074
|
const eventOptionModifiers = [];
|
|
25074
25075
|
for (let i = 0; i < modifiers.length; i++) {
|
|
25075
|
-
const modifier = modifiers[i];
|
|
25076
|
+
const modifier = modifiers[i].content;
|
|
25076
25077
|
if (isEventOptionModifier(modifier)) {
|
|
25077
25078
|
eventOptionModifiers.push(modifier);
|
|
25078
25079
|
} else {
|
|
@@ -47511,7 +47512,7 @@ function genRuntimeProps(ctx) {
|
|
|
47511
47512
|
);
|
|
47512
47513
|
}
|
|
47513
47514
|
if (defaults.length) {
|
|
47514
|
-
propsDecls =
|
|
47515
|
+
propsDecls = `/*@__PURE__*/${ctx.helper(
|
|
47515
47516
|
`mergeDefaults`
|
|
47516
47517
|
)}(${propsDecls}, {
|
|
47517
47518
|
${defaults.join(",\n ")}
|
|
@@ -47523,7 +47524,7 @@ function genRuntimeProps(ctx) {
|
|
|
47523
47524
|
}
|
|
47524
47525
|
const modelsDecls = genModelProps(ctx);
|
|
47525
47526
|
if (propsDecls && modelsDecls) {
|
|
47526
|
-
return
|
|
47527
|
+
return `/*@__PURE__*/${ctx.helper(
|
|
47527
47528
|
"mergeModels"
|
|
47528
47529
|
)}(${propsDecls}, ${modelsDecls})`;
|
|
47529
47530
|
} else {
|
|
@@ -47547,7 +47548,7 @@ function extractRuntimeProps(ctx) {
|
|
|
47547
47548
|
${propStrings.join(",\n ")}
|
|
47548
47549
|
}`;
|
|
47549
47550
|
if (ctx.propsRuntimeDefaults && !hasStaticDefaults) {
|
|
47550
|
-
propsDecls =
|
|
47551
|
+
propsDecls = `/*@__PURE__*/${ctx.helper(
|
|
47551
47552
|
"mergeDefaults"
|
|
47552
47553
|
)}(${propsDecls}, ${ctx.getString(ctx.propsRuntimeDefaults)})`;
|
|
47553
47554
|
}
|
|
@@ -47891,7 +47892,7 @@ function genRuntimeEmits(ctx) {
|
|
|
47891
47892
|
}
|
|
47892
47893
|
if (ctx.hasDefineModelCall) {
|
|
47893
47894
|
let modelEmitsDecl = `[${Object.keys(ctx.modelDecls).map((n) => JSON.stringify(`update:${n}`)).join(", ")}]`;
|
|
47894
|
-
emitsDecl = emitsDecl ?
|
|
47895
|
+
emitsDecl = emitsDecl ? `/*@__PURE__*/${ctx.helper(
|
|
47895
47896
|
"mergeModels"
|
|
47896
47897
|
)}(${emitsDecl}, ${modelEmitsDecl})` : modelEmitsDecl;
|
|
47897
47898
|
}
|
|
@@ -48666,7 +48667,7 @@ return ${returned}
|
|
|
48666
48667
|
ctx.s.prependLeft(
|
|
48667
48668
|
startOffset,
|
|
48668
48669
|
`
|
|
48669
|
-
${genDefaultAs}
|
|
48670
|
+
${genDefaultAs} /*@__PURE__*/${ctx.helper(
|
|
48670
48671
|
`defineComponent`
|
|
48671
48672
|
)}({${def}${runtimeOptions}
|
|
48672
48673
|
${hasAwait ? `async ` : ``}setup(${args}) {
|
|
@@ -48678,7 +48679,7 @@ ${exposeCall}`
|
|
|
48678
48679
|
ctx.s.prependLeft(
|
|
48679
48680
|
startOffset,
|
|
48680
48681
|
`
|
|
48681
|
-
${genDefaultAs}
|
|
48682
|
+
${genDefaultAs} /*@__PURE__*/Object.assign(${defaultExport ? `${normalScriptDefaultVar}, ` : ""}${definedOptions ? `${definedOptions}, ` : ""}{${runtimeOptions}
|
|
48682
48683
|
${hasAwait ? `async ` : ``}setup(${args}) {
|
|
48683
48684
|
${exposeCall}`
|
|
48684
48685
|
);
|
|
@@ -48890,7 +48891,7 @@ var __spreadValues = (a, b) => {
|
|
|
48890
48891
|
}
|
|
48891
48892
|
return a;
|
|
48892
48893
|
};
|
|
48893
|
-
const version = "3.5.
|
|
48894
|
+
const version = "3.5.2";
|
|
48894
48895
|
const parseCache = parseCache$1;
|
|
48895
48896
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48896
48897
|
const walk = walk$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.2",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -47,10 +47,10 @@
|
|
|
47
47
|
"magic-string": "^0.30.11",
|
|
48
48
|
"postcss": "^8.4.44",
|
|
49
49
|
"source-map-js": "^1.2.0",
|
|
50
|
-
"@vue/compiler-core": "3.5.
|
|
51
|
-
"@vue/compiler-dom": "3.5.
|
|
52
|
-
"@vue/shared": "3.5.
|
|
53
|
-
"@vue/compiler-ssr": "3.5.
|
|
50
|
+
"@vue/compiler-core": "3.5.2",
|
|
51
|
+
"@vue/compiler-dom": "3.5.2",
|
|
52
|
+
"@vue/shared": "3.5.2",
|
|
53
|
+
"@vue/compiler-ssr": "3.5.2"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.25.2",
|