@vue/compiler-sfc 3.5.23 → 3.5.25
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.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -25083,7 +25083,7 @@ function mergeSourceMaps(scriptMap, templateMap, templateLineOffset) {
|
|
|
25083
25083
|
return generator.toJSON();
|
|
25084
25084
|
}
|
|
25085
25085
|
|
|
25086
|
-
const version = "3.5.
|
|
25086
|
+
const version = "3.5.25";
|
|
25087
25087
|
const parseCache = parseCache$1;
|
|
25088
25088
|
const errorMessages = {
|
|
25089
25089
|
...CompilerDOM.errorMessages,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.5.
|
|
2
|
+
* @vue/compiler-sfc v3.5.25
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -18025,6 +18025,20 @@ function getMemoedVNodeCall(node) {
|
|
|
18025
18025
|
}
|
|
18026
18026
|
}
|
|
18027
18027
|
const forAliasRE = /([\s\S]*?)\s+(?:in|of)\s+(\S[\s\S]*)/;
|
|
18028
|
+
function isAllWhitespace(str) {
|
|
18029
|
+
for (let i = 0; i < str.length; i++) {
|
|
18030
|
+
if (!isWhitespace(str.charCodeAt(i))) {
|
|
18031
|
+
return false;
|
|
18032
|
+
}
|
|
18033
|
+
}
|
|
18034
|
+
return true;
|
|
18035
|
+
}
|
|
18036
|
+
function isWhitespaceText(node) {
|
|
18037
|
+
return node.type === 2 && isAllWhitespace(node.content) || node.type === 12 && isWhitespaceText(node.content);
|
|
18038
|
+
}
|
|
18039
|
+
function isCommentOrWhitespace(node) {
|
|
18040
|
+
return node.type === 3 || isWhitespaceText(node);
|
|
18041
|
+
}
|
|
18028
18042
|
|
|
18029
18043
|
const defaultParserOptions = {
|
|
18030
18044
|
parseMode: "base",
|
|
@@ -18561,14 +18575,6 @@ function condenseWhitespace(nodes) {
|
|
|
18561
18575
|
}
|
|
18562
18576
|
return removedWhitespace ? nodes.filter(Boolean) : nodes;
|
|
18563
18577
|
}
|
|
18564
|
-
function isAllWhitespace(str) {
|
|
18565
|
-
for (let i = 0; i < str.length; i++) {
|
|
18566
|
-
if (!isWhitespace(str.charCodeAt(i))) {
|
|
18567
|
-
return false;
|
|
18568
|
-
}
|
|
18569
|
-
}
|
|
18570
|
-
return true;
|
|
18571
|
-
}
|
|
18572
18578
|
function hasNewlineChar(str) {
|
|
18573
18579
|
for (let i = 0; i < str.length; i++) {
|
|
18574
18580
|
const c = str.charCodeAt(i);
|
|
@@ -23681,17 +23687,14 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
23681
23687
|
knownIds
|
|
23682
23688
|
);
|
|
23683
23689
|
const children = [];
|
|
23684
|
-
const isTSNode = TS_NODE_TYPES.includes(ast.type);
|
|
23685
23690
|
ids.sort((a, b) => a.start - b.start);
|
|
23686
23691
|
ids.forEach((id, i) => {
|
|
23687
23692
|
const start = id.start - 1;
|
|
23688
23693
|
const end = id.end - 1;
|
|
23689
23694
|
const last = ids[i - 1];
|
|
23690
|
-
|
|
23691
|
-
|
|
23692
|
-
|
|
23693
|
-
children.push(leadingText + (id.prefix || ``));
|
|
23694
|
-
}
|
|
23695
|
+
const leadingText = rawExp.slice(last ? last.end - 1 : 0, start);
|
|
23696
|
+
if (leadingText.length || id.prefix) {
|
|
23697
|
+
children.push(leadingText + (id.prefix || ``));
|
|
23695
23698
|
}
|
|
23696
23699
|
const source = rawExp.slice(start, end);
|
|
23697
23700
|
children.push(
|
|
@@ -23706,7 +23709,7 @@ function processExpression(node, context, asParams = false, asRawStatements = fa
|
|
|
23706
23709
|
id.isConstant ? 3 : 0
|
|
23707
23710
|
)
|
|
23708
23711
|
);
|
|
23709
|
-
if (i === ids.length - 1 && end < rawExp.length
|
|
23712
|
+
if (i === ids.length - 1 && end < rawExp.length) {
|
|
23710
23713
|
children.push(rawExp.slice(end));
|
|
23711
23714
|
}
|
|
23712
23715
|
});
|
|
@@ -23803,13 +23806,11 @@ function processIf(node, dir, context, processCodegen) {
|
|
|
23803
23806
|
let i = siblings.indexOf(node);
|
|
23804
23807
|
while (i-- >= -1) {
|
|
23805
23808
|
const sibling = siblings[i];
|
|
23806
|
-
if (sibling && sibling
|
|
23807
|
-
context.removeNode(sibling);
|
|
23808
|
-
comments.unshift(sibling);
|
|
23809
|
-
continue;
|
|
23810
|
-
}
|
|
23811
|
-
if (sibling && sibling.type === 2 && !sibling.content.trim().length) {
|
|
23809
|
+
if (sibling && isCommentOrWhitespace(sibling)) {
|
|
23812
23810
|
context.removeNode(sibling);
|
|
23811
|
+
if (sibling.type === 3) {
|
|
23812
|
+
comments.unshift(sibling);
|
|
23813
|
+
}
|
|
23813
23814
|
continue;
|
|
23814
23815
|
}
|
|
23815
23816
|
if (sibling && sibling.type === 9) {
|
|
@@ -24327,7 +24328,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
24327
24328
|
let prev;
|
|
24328
24329
|
while (j--) {
|
|
24329
24330
|
prev = children[j];
|
|
24330
|
-
if (
|
|
24331
|
+
if (!isCommentOrWhitespace(prev)) {
|
|
24331
24332
|
break;
|
|
24332
24333
|
}
|
|
24333
24334
|
}
|
|
@@ -24402,7 +24403,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
24402
24403
|
} else if (implicitDefaultChildren.length && // #3766
|
|
24403
24404
|
// with whitespace: 'preserve', whitespaces between slots will end up in
|
|
24404
24405
|
// implicitDefaultChildren. Ignore if all implicit children are whitespaces.
|
|
24405
|
-
implicitDefaultChildren.
|
|
24406
|
+
!implicitDefaultChildren.every(isWhitespaceText)) {
|
|
24406
24407
|
if (hasNamedDefaultSlot) {
|
|
24407
24408
|
context.onError(
|
|
24408
24409
|
createCompilerError(
|
|
@@ -24475,11 +24476,6 @@ function hasForwardedSlots(children) {
|
|
|
24475
24476
|
}
|
|
24476
24477
|
return false;
|
|
24477
24478
|
}
|
|
24478
|
-
function isNonWhitespaceContent(node) {
|
|
24479
|
-
if (node.type !== 2 && node.type !== 12)
|
|
24480
|
-
return true;
|
|
24481
|
-
return node.type === 2 ? !!node.content.trim() : isNonWhitespaceContent(node.content);
|
|
24482
|
-
}
|
|
24483
24479
|
|
|
24484
24480
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
24485
24481
|
const transformElement = (node, context) => {
|
|
@@ -26046,7 +26042,7 @@ const transformTransition = (node, context) => {
|
|
|
26046
26042
|
};
|
|
26047
26043
|
function hasMultipleChildren(node) {
|
|
26048
26044
|
const children = node.children = node.children.filter(
|
|
26049
|
-
(c) =>
|
|
26045
|
+
(c) => !isCommentOrWhitespace(c)
|
|
26050
26046
|
);
|
|
26051
26047
|
const child = children[0];
|
|
26052
26048
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(hasMultipleChildren);
|
|
@@ -26625,6 +26621,8 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
|
|
|
26625
26621
|
hasScopeRef: hasScopeRef,
|
|
26626
26622
|
helperNameMap: helperNameMap,
|
|
26627
26623
|
injectProp: injectProp,
|
|
26624
|
+
isAllWhitespace: isAllWhitespace,
|
|
26625
|
+
isCommentOrWhitespace: isCommentOrWhitespace,
|
|
26628
26626
|
isCoreComponent: isCoreComponent,
|
|
26629
26627
|
isFnExpression: isFnExpression,
|
|
26630
26628
|
isFnExpressionBrowser: isFnExpressionBrowser,
|
|
@@ -26646,6 +26644,7 @@ var CompilerDOM = /*#__PURE__*/Object.freeze({
|
|
|
26646
26644
|
isText: isText$1,
|
|
26647
26645
|
isVPre: isVPre,
|
|
26648
26646
|
isVSlot: isVSlot,
|
|
26647
|
+
isWhitespaceText: isWhitespaceText,
|
|
26649
26648
|
locStub: locStub,
|
|
26650
26649
|
noopDirectiveTransform: noopDirectiveTransform,
|
|
26651
26650
|
parse: parse$3,
|
|
@@ -33049,11 +33048,11 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
33049
33048
|
}
|
|
33050
33049
|
if (node.tagType === 0) {
|
|
33051
33050
|
const res = { props: [] };
|
|
33052
|
-
const defaultProps = [
|
|
33053
|
-
// default value binding for text type inputs
|
|
33054
|
-
createObjectProperty(`value`, model)
|
|
33055
|
-
];
|
|
33056
33051
|
if (node.tag === "input") {
|
|
33052
|
+
const defaultProps = [
|
|
33053
|
+
// default value binding for text type inputs
|
|
33054
|
+
createObjectProperty(`value`, model)
|
|
33055
|
+
];
|
|
33057
33056
|
const type = findProp(node, "type");
|
|
33058
33057
|
if (type) {
|
|
33059
33058
|
const value = findValueBinding(node);
|
|
@@ -50633,7 +50632,7 @@ var __spreadValues = (a, b) => {
|
|
|
50633
50632
|
}
|
|
50634
50633
|
return a;
|
|
50635
50634
|
};
|
|
50636
|
-
const version = "3.5.
|
|
50635
|
+
const version = "3.5.25";
|
|
50637
50636
|
const parseCache = parseCache$1;
|
|
50638
50637
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
50639
50638
|
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.25",
|
|
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.21",
|
|
48
48
|
"postcss": "^8.5.6",
|
|
49
49
|
"source-map-js": "^1.2.1",
|
|
50
|
-
"@vue/compiler-core": "3.5.
|
|
51
|
-
"@vue/compiler-
|
|
52
|
-
"@vue/compiler-
|
|
53
|
-
"@vue/shared": "3.5.
|
|
50
|
+
"@vue/compiler-core": "3.5.25",
|
|
51
|
+
"@vue/compiler-ssr": "3.5.25",
|
|
52
|
+
"@vue/compiler-dom": "3.5.25",
|
|
53
|
+
"@vue/shared": "3.5.25"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.28.5",
|