@vue/compiler-sfc 3.4.34 → 3.4.36
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 +3 -3
- package/dist/compiler-sfc.esm-browser.js +123 -83
- package/package.json +8 -8
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.36
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -4813,7 +4813,7 @@ types$1.UNIVERSAL = UNIVERSAL;
|
|
|
4813
4813
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
4814
4814
|
function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
4815
4815
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
4816
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike
|
|
4816
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
4817
4817
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
4818
4818
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
4819
4819
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -20857,7 +20857,7 @@ function isStaticNode(node) {
|
|
|
20857
20857
|
return false;
|
|
20858
20858
|
}
|
|
20859
20859
|
|
|
20860
|
-
const version = "3.4.
|
|
20860
|
+
const version = "3.4.36";
|
|
20861
20861
|
const parseCache = parseCache$1;
|
|
20862
20862
|
const errorMessages = {
|
|
20863
20863
|
...CompilerDOM.errorMessages,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-sfc v3.4.
|
|
2
|
+
* @vue/compiler-sfc v3.4.36
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -725,13 +725,13 @@ const decodeMap = new Map([
|
|
|
725
725
|
* Polyfill for `String.fromCodePoint`. It is used to create a string from a Unicode code point.
|
|
726
726
|
*/
|
|
727
727
|
const fromCodePoint =
|
|
728
|
-
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition,
|
|
728
|
+
// eslint-disable-next-line @typescript-eslint/no-unnecessary-condition, n/no-unsupported-features/es-builtins
|
|
729
729
|
(_a$1 = String.fromCodePoint) !== null && _a$1 !== void 0 ? _a$1 : function (codePoint) {
|
|
730
730
|
let output = "";
|
|
731
|
-
if (codePoint >
|
|
732
|
-
codePoint -=
|
|
733
|
-
output += String.fromCharCode(((codePoint >>> 10) &
|
|
734
|
-
codePoint =
|
|
731
|
+
if (codePoint > 65535) {
|
|
732
|
+
codePoint -= 65536;
|
|
733
|
+
output += String.fromCharCode(((codePoint >>> 10) & 1023) | 55296);
|
|
734
|
+
codePoint = 56320 | (codePoint & 1023);
|
|
735
735
|
}
|
|
736
736
|
output += String.fromCharCode(codePoint);
|
|
737
737
|
return output;
|
|
@@ -743,8 +743,9 @@ const fromCodePoint =
|
|
|
743
743
|
*/
|
|
744
744
|
function replaceCodePoint(codePoint) {
|
|
745
745
|
var _a;
|
|
746
|
-
if ((codePoint >=
|
|
747
|
-
|
|
746
|
+
if ((codePoint >= 55296 && codePoint <= 57343) ||
|
|
747
|
+
codePoint > 1114111) {
|
|
748
|
+
return 65533;
|
|
748
749
|
}
|
|
749
750
|
return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
|
|
750
751
|
}
|
|
@@ -765,7 +766,7 @@ var CharCodes;
|
|
|
765
766
|
CharCodes[CharCodes["UPPER_Z"] = 90] = "UPPER_Z";
|
|
766
767
|
})(CharCodes || (CharCodes = {}));
|
|
767
768
|
/** Bit that needs to be set to convert an upper case ASCII character to lower case */
|
|
768
|
-
const TO_LOWER_BIT =
|
|
769
|
+
const TO_LOWER_BIT = 32;
|
|
769
770
|
var BinTrieFlags;
|
|
770
771
|
(function (BinTrieFlags) {
|
|
771
772
|
BinTrieFlags[BinTrieFlags["VALUE_LENGTH"] = 49152] = "VALUE_LENGTH";
|
|
@@ -866,32 +867,32 @@ class EntityDecoder {
|
|
|
866
867
|
* Mirrors the implementation of `getDecoder`, but with the ability to stop decoding if the
|
|
867
868
|
* entity is incomplete, and resume when the next string is written.
|
|
868
869
|
*
|
|
869
|
-
* @param
|
|
870
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
870
871
|
* @param offset The offset at which the entity begins. Should be 0 if this is not the first call.
|
|
871
872
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
872
873
|
*/
|
|
873
|
-
write(
|
|
874
|
+
write(input, offset) {
|
|
874
875
|
switch (this.state) {
|
|
875
876
|
case EntityDecoderState.EntityStart: {
|
|
876
|
-
if (
|
|
877
|
+
if (input.charCodeAt(offset) === CharCodes.NUM) {
|
|
877
878
|
this.state = EntityDecoderState.NumericStart;
|
|
878
879
|
this.consumed += 1;
|
|
879
|
-
return this.stateNumericStart(
|
|
880
|
+
return this.stateNumericStart(input, offset + 1);
|
|
880
881
|
}
|
|
881
882
|
this.state = EntityDecoderState.NamedEntity;
|
|
882
|
-
return this.stateNamedEntity(
|
|
883
|
+
return this.stateNamedEntity(input, offset);
|
|
883
884
|
}
|
|
884
885
|
case EntityDecoderState.NumericStart: {
|
|
885
|
-
return this.stateNumericStart(
|
|
886
|
+
return this.stateNumericStart(input, offset);
|
|
886
887
|
}
|
|
887
888
|
case EntityDecoderState.NumericDecimal: {
|
|
888
|
-
return this.stateNumericDecimal(
|
|
889
|
+
return this.stateNumericDecimal(input, offset);
|
|
889
890
|
}
|
|
890
891
|
case EntityDecoderState.NumericHex: {
|
|
891
|
-
return this.stateNumericHex(
|
|
892
|
+
return this.stateNumericHex(input, offset);
|
|
892
893
|
}
|
|
893
894
|
case EntityDecoderState.NamedEntity: {
|
|
894
|
-
return this.stateNamedEntity(
|
|
895
|
+
return this.stateNamedEntity(input, offset);
|
|
895
896
|
}
|
|
896
897
|
}
|
|
897
898
|
}
|
|
@@ -900,28 +901,28 @@ class EntityDecoder {
|
|
|
900
901
|
*
|
|
901
902
|
* Equivalent to the `Numeric character reference state` in the HTML spec.
|
|
902
903
|
*
|
|
903
|
-
* @param
|
|
904
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
904
905
|
* @param offset The current offset.
|
|
905
906
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
906
907
|
*/
|
|
907
|
-
stateNumericStart(
|
|
908
|
-
if (offset >=
|
|
908
|
+
stateNumericStart(input, offset) {
|
|
909
|
+
if (offset >= input.length) {
|
|
909
910
|
return -1;
|
|
910
911
|
}
|
|
911
|
-
if ((
|
|
912
|
+
if ((input.charCodeAt(offset) | TO_LOWER_BIT) === CharCodes.LOWER_X) {
|
|
912
913
|
this.state = EntityDecoderState.NumericHex;
|
|
913
914
|
this.consumed += 1;
|
|
914
|
-
return this.stateNumericHex(
|
|
915
|
+
return this.stateNumericHex(input, offset + 1);
|
|
915
916
|
}
|
|
916
917
|
this.state = EntityDecoderState.NumericDecimal;
|
|
917
|
-
return this.stateNumericDecimal(
|
|
918
|
+
return this.stateNumericDecimal(input, offset);
|
|
918
919
|
}
|
|
919
|
-
addToNumericResult(
|
|
920
|
+
addToNumericResult(input, start, end, base) {
|
|
920
921
|
if (start !== end) {
|
|
921
922
|
const digitCount = end - start;
|
|
922
923
|
this.result =
|
|
923
924
|
this.result * Math.pow(base, digitCount) +
|
|
924
|
-
parseInt(
|
|
925
|
+
Number.parseInt(input.substr(start, digitCount), base);
|
|
925
926
|
this.consumed += digitCount;
|
|
926
927
|
}
|
|
927
928
|
}
|
|
@@ -930,23 +931,23 @@ class EntityDecoder {
|
|
|
930
931
|
*
|
|
931
932
|
* Equivalent to the `Hexademical character reference state` in the HTML spec.
|
|
932
933
|
*
|
|
933
|
-
* @param
|
|
934
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
934
935
|
* @param offset The current offset.
|
|
935
936
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
936
937
|
*/
|
|
937
|
-
stateNumericHex(
|
|
938
|
-
const
|
|
939
|
-
while (offset <
|
|
940
|
-
const char =
|
|
938
|
+
stateNumericHex(input, offset) {
|
|
939
|
+
const startIndex = offset;
|
|
940
|
+
while (offset < input.length) {
|
|
941
|
+
const char = input.charCodeAt(offset);
|
|
941
942
|
if (isNumber$2(char) || isHexadecimalCharacter(char)) {
|
|
942
943
|
offset += 1;
|
|
943
944
|
}
|
|
944
945
|
else {
|
|
945
|
-
this.addToNumericResult(
|
|
946
|
+
this.addToNumericResult(input, startIndex, offset, 16);
|
|
946
947
|
return this.emitNumericEntity(char, 3);
|
|
947
948
|
}
|
|
948
949
|
}
|
|
949
|
-
this.addToNumericResult(
|
|
950
|
+
this.addToNumericResult(input, startIndex, offset, 16);
|
|
950
951
|
return -1;
|
|
951
952
|
}
|
|
952
953
|
/**
|
|
@@ -954,23 +955,23 @@ class EntityDecoder {
|
|
|
954
955
|
*
|
|
955
956
|
* Equivalent to the `Decimal character reference state` in the HTML spec.
|
|
956
957
|
*
|
|
957
|
-
* @param
|
|
958
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
958
959
|
* @param offset The current offset.
|
|
959
960
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
960
961
|
*/
|
|
961
|
-
stateNumericDecimal(
|
|
962
|
-
const
|
|
963
|
-
while (offset <
|
|
964
|
-
const char =
|
|
962
|
+
stateNumericDecimal(input, offset) {
|
|
963
|
+
const startIndex = offset;
|
|
964
|
+
while (offset < input.length) {
|
|
965
|
+
const char = input.charCodeAt(offset);
|
|
965
966
|
if (isNumber$2(char)) {
|
|
966
967
|
offset += 1;
|
|
967
968
|
}
|
|
968
969
|
else {
|
|
969
|
-
this.addToNumericResult(
|
|
970
|
+
this.addToNumericResult(input, startIndex, offset, 10);
|
|
970
971
|
return this.emitNumericEntity(char, 2);
|
|
971
972
|
}
|
|
972
973
|
}
|
|
973
|
-
this.addToNumericResult(
|
|
974
|
+
this.addToNumericResult(input, startIndex, offset, 10);
|
|
974
975
|
return -1;
|
|
975
976
|
}
|
|
976
977
|
/**
|
|
@@ -1014,17 +1015,17 @@ class EntityDecoder {
|
|
|
1014
1015
|
*
|
|
1015
1016
|
* Equivalent to the `Named character reference state` in the HTML spec.
|
|
1016
1017
|
*
|
|
1017
|
-
* @param
|
|
1018
|
+
* @param input The string containing the entity (or a continuation of the entity).
|
|
1018
1019
|
* @param offset The current offset.
|
|
1019
1020
|
* @returns The number of characters that were consumed, or -1 if the entity is incomplete.
|
|
1020
1021
|
*/
|
|
1021
|
-
stateNamedEntity(
|
|
1022
|
+
stateNamedEntity(input, offset) {
|
|
1022
1023
|
const { decodeTree } = this;
|
|
1023
1024
|
let current = decodeTree[this.treeIndex];
|
|
1024
1025
|
// The mask is the number of bytes of the value, including the current byte.
|
|
1025
1026
|
let valueLength = (current & BinTrieFlags.VALUE_LENGTH) >> 14;
|
|
1026
|
-
for (; offset <
|
|
1027
|
-
const char =
|
|
1027
|
+
for (; offset < input.length; offset++, this.excess++) {
|
|
1028
|
+
const char = input.charCodeAt(offset);
|
|
1028
1029
|
this.treeIndex = determineBranch(decodeTree, current, this.treeIndex + Math.max(1, valueLength), char);
|
|
1029
1030
|
if (this.treeIndex < 0) {
|
|
1030
1031
|
return this.result === 0 ||
|
|
@@ -1131,28 +1132,28 @@ class EntityDecoder {
|
|
|
1131
1132
|
* @returns A function that decodes entities in a string.
|
|
1132
1133
|
*/
|
|
1133
1134
|
function getDecoder(decodeTree) {
|
|
1134
|
-
let
|
|
1135
|
-
const decoder = new EntityDecoder(decodeTree, (
|
|
1136
|
-
return function decodeWithTrie(
|
|
1135
|
+
let returnValue = "";
|
|
1136
|
+
const decoder = new EntityDecoder(decodeTree, (data) => (returnValue += fromCodePoint(data)));
|
|
1137
|
+
return function decodeWithTrie(input, decodeMode) {
|
|
1137
1138
|
let lastIndex = 0;
|
|
1138
1139
|
let offset = 0;
|
|
1139
|
-
while ((offset =
|
|
1140
|
-
|
|
1140
|
+
while ((offset = input.indexOf("&", offset)) >= 0) {
|
|
1141
|
+
returnValue += input.slice(lastIndex, offset);
|
|
1141
1142
|
decoder.startEntity(decodeMode);
|
|
1142
|
-
const
|
|
1143
|
+
const length = decoder.write(input,
|
|
1143
1144
|
// Skip the "&"
|
|
1144
1145
|
offset + 1);
|
|
1145
|
-
if (
|
|
1146
|
+
if (length < 0) {
|
|
1146
1147
|
lastIndex = offset + decoder.end();
|
|
1147
1148
|
break;
|
|
1148
1149
|
}
|
|
1149
|
-
lastIndex = offset +
|
|
1150
|
-
// If `
|
|
1151
|
-
offset =
|
|
1150
|
+
lastIndex = offset + length;
|
|
1151
|
+
// If `length` is 0, skip the current `&` and continue.
|
|
1152
|
+
offset = length === 0 ? lastIndex + 1 : lastIndex;
|
|
1152
1153
|
}
|
|
1153
|
-
const result =
|
|
1154
|
+
const result = returnValue + input.slice(lastIndex);
|
|
1154
1155
|
// Make sure we don't keep a reference to the final string.
|
|
1155
|
-
|
|
1156
|
+
returnValue = "";
|
|
1156
1157
|
return result;
|
|
1157
1158
|
};
|
|
1158
1159
|
}
|
|
@@ -1166,31 +1167,31 @@ function getDecoder(decodeTree) {
|
|
|
1166
1167
|
* @param char The current character.
|
|
1167
1168
|
* @returns The index of the next node, or -1 if no branch is taken.
|
|
1168
1169
|
*/
|
|
1169
|
-
function determineBranch(decodeTree, current,
|
|
1170
|
+
function determineBranch(decodeTree, current, nodeIndex, char) {
|
|
1170
1171
|
const branchCount = (current & BinTrieFlags.BRANCH_LENGTH) >> 7;
|
|
1171
1172
|
const jumpOffset = current & BinTrieFlags.JUMP_TABLE;
|
|
1172
1173
|
// Case 1: Single branch encoded in jump offset
|
|
1173
1174
|
if (branchCount === 0) {
|
|
1174
|
-
return jumpOffset !== 0 && char === jumpOffset ?
|
|
1175
|
+
return jumpOffset !== 0 && char === jumpOffset ? nodeIndex : -1;
|
|
1175
1176
|
}
|
|
1176
1177
|
// Case 2: Multiple branches encoded in jump table
|
|
1177
1178
|
if (jumpOffset) {
|
|
1178
1179
|
const value = char - jumpOffset;
|
|
1179
1180
|
return value < 0 || value >= branchCount
|
|
1180
1181
|
? -1
|
|
1181
|
-
: decodeTree[
|
|
1182
|
+
: decodeTree[nodeIndex + value] - 1;
|
|
1182
1183
|
}
|
|
1183
1184
|
// Case 3: Multiple branches encoded in dictionary
|
|
1184
1185
|
// Binary search for the character.
|
|
1185
|
-
let lo =
|
|
1186
|
+
let lo = nodeIndex;
|
|
1186
1187
|
let hi = lo + branchCount - 1;
|
|
1187
1188
|
while (lo <= hi) {
|
|
1188
1189
|
const mid = (lo + hi) >>> 1;
|
|
1189
|
-
const
|
|
1190
|
-
if (
|
|
1190
|
+
const midValue = decodeTree[mid];
|
|
1191
|
+
if (midValue < char) {
|
|
1191
1192
|
lo = mid + 1;
|
|
1192
1193
|
}
|
|
1193
|
-
else if (
|
|
1194
|
+
else if (midValue > char) {
|
|
1194
1195
|
hi = mid - 1;
|
|
1195
1196
|
}
|
|
1196
1197
|
else {
|
|
@@ -1204,12 +1205,12 @@ getDecoder(xmlDecodeTree);
|
|
|
1204
1205
|
/**
|
|
1205
1206
|
* Decodes an HTML string.
|
|
1206
1207
|
*
|
|
1207
|
-
* @param
|
|
1208
|
+
* @param htmlString The string to decode.
|
|
1208
1209
|
* @param mode The decoding mode.
|
|
1209
1210
|
* @returns The decoded string.
|
|
1210
1211
|
*/
|
|
1211
|
-
function decodeHTML(
|
|
1212
|
-
return htmlDecoder(
|
|
1212
|
+
function decodeHTML(htmlString, mode = DecodingMode.Legacy) {
|
|
1213
|
+
return htmlDecoder(htmlString, mode);
|
|
1213
1214
|
}
|
|
1214
1215
|
|
|
1215
1216
|
const defaultDelimitersOpen = new Uint8Array([123, 123]);
|
|
@@ -16594,6 +16595,16 @@ function walkIdentifiers(root, onIdentifier, includeAll = false, parentStack = [
|
|
|
16594
16595
|
(id) => markScopeIdentifier(node, id, knownIds)
|
|
16595
16596
|
);
|
|
16596
16597
|
}
|
|
16598
|
+
} else if (node.type === "CatchClause" && node.param) {
|
|
16599
|
+
for (const id of extractIdentifiers$1(node.param)) {
|
|
16600
|
+
markScopeIdentifier(node, id, knownIds);
|
|
16601
|
+
}
|
|
16602
|
+
} else if (isForStatement(node)) {
|
|
16603
|
+
walkForStatement(
|
|
16604
|
+
node,
|
|
16605
|
+
false,
|
|
16606
|
+
(id) => markScopeIdentifier(node, id, knownIds)
|
|
16607
|
+
);
|
|
16597
16608
|
}
|
|
16598
16609
|
},
|
|
16599
16610
|
leave(node, parent) {
|
|
@@ -16674,14 +16685,20 @@ function walkBlockDeclarations(block, onIdent) {
|
|
|
16674
16685
|
} else if (stmt.type === "FunctionDeclaration" || stmt.type === "ClassDeclaration") {
|
|
16675
16686
|
if (stmt.declare || !stmt.id) continue;
|
|
16676
16687
|
onIdent(stmt.id);
|
|
16677
|
-
} else if (stmt
|
|
16678
|
-
|
|
16679
|
-
|
|
16680
|
-
|
|
16681
|
-
|
|
16682
|
-
|
|
16683
|
-
|
|
16684
|
-
|
|
16688
|
+
} else if (isForStatement(stmt)) {
|
|
16689
|
+
walkForStatement(stmt, true, onIdent);
|
|
16690
|
+
}
|
|
16691
|
+
}
|
|
16692
|
+
}
|
|
16693
|
+
function isForStatement(stmt) {
|
|
16694
|
+
return stmt.type === "ForOfStatement" || stmt.type === "ForInStatement" || stmt.type === "ForStatement";
|
|
16695
|
+
}
|
|
16696
|
+
function walkForStatement(stmt, isVar, onIdent) {
|
|
16697
|
+
const variable = stmt.type === "ForStatement" ? stmt.init : stmt.left;
|
|
16698
|
+
if (variable && variable.type === "VariableDeclaration" && (variable.kind === "var" ? isVar : !isVar)) {
|
|
16699
|
+
for (const decl of variable.declarations) {
|
|
16700
|
+
for (const id of extractIdentifiers$1(decl.id)) {
|
|
16701
|
+
onIdent(id);
|
|
16685
16702
|
}
|
|
16686
16703
|
}
|
|
16687
16704
|
}
|
|
@@ -16768,7 +16785,7 @@ function isReferenced(node, parent, grandparent) {
|
|
|
16768
16785
|
if (parent.key === node) {
|
|
16769
16786
|
return !!parent.computed;
|
|
16770
16787
|
}
|
|
16771
|
-
return !grandparent
|
|
16788
|
+
return !grandparent;
|
|
16772
16789
|
case "ClassProperty":
|
|
16773
16790
|
if (parent.key === node) {
|
|
16774
16791
|
return !!parent.computed;
|
|
@@ -31059,6 +31076,25 @@ const ssrTransformElement = (node, context) => {
|
|
|
31059
31076
|
])
|
|
31060
31077
|
];
|
|
31061
31078
|
}
|
|
31079
|
+
} else if (directives.length && !node.children.length) {
|
|
31080
|
+
const tempId = `_temp${context.temps++}`;
|
|
31081
|
+
propsExp.arguments = [
|
|
31082
|
+
createAssignmentExpression(
|
|
31083
|
+
createSimpleExpression(tempId, false),
|
|
31084
|
+
mergedProps
|
|
31085
|
+
)
|
|
31086
|
+
];
|
|
31087
|
+
rawChildrenMap.set(
|
|
31088
|
+
node,
|
|
31089
|
+
createConditionalExpression(
|
|
31090
|
+
createSimpleExpression(`"textContent" in ${tempId}`, false),
|
|
31091
|
+
createCallExpression(context.helper(SSR_INTERPOLATE), [
|
|
31092
|
+
createSimpleExpression(`${tempId}.textContent`, false)
|
|
31093
|
+
]),
|
|
31094
|
+
createSimpleExpression(`${tempId}.innerHTML ?? ''`, false),
|
|
31095
|
+
false
|
|
31096
|
+
)
|
|
31097
|
+
);
|
|
31062
31098
|
}
|
|
31063
31099
|
if (needTagForRuntime) {
|
|
31064
31100
|
propsExp.arguments.push(`"${node.tag}"`);
|
|
@@ -31347,7 +31383,7 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
31347
31383
|
context.pushStringPart(` ${scopeId}`);
|
|
31348
31384
|
}
|
|
31349
31385
|
context.pushStringPart(`>`);
|
|
31350
|
-
processChildren(node, context, false, true);
|
|
31386
|
+
processChildren(node, context, false, true, true);
|
|
31351
31387
|
context.pushStringPart(`</${tag.value.content}>`);
|
|
31352
31388
|
}
|
|
31353
31389
|
} else {
|
|
@@ -34471,11 +34507,11 @@ function cleanSource(nodes) {
|
|
|
34471
34507
|
})
|
|
34472
34508
|
}
|
|
34473
34509
|
|
|
34474
|
-
function
|
|
34510
|
+
function markTreeDirty(node) {
|
|
34475
34511
|
node[isClean$1] = false;
|
|
34476
34512
|
if (node.proxyOf.nodes) {
|
|
34477
34513
|
for (let i of node.proxyOf.nodes) {
|
|
34478
|
-
|
|
34514
|
+
markTreeDirty(i);
|
|
34479
34515
|
}
|
|
34480
34516
|
}
|
|
34481
34517
|
}
|
|
@@ -34609,7 +34645,11 @@ let Container$7 = class Container extends Node$1 {
|
|
|
34609
34645
|
insertBefore(exist, add) {
|
|
34610
34646
|
let existIndex = this.index(exist);
|
|
34611
34647
|
let type = existIndex === 0 ? 'prepend' : false;
|
|
34612
|
-
let nodes = this.normalize(
|
|
34648
|
+
let nodes = this.normalize(
|
|
34649
|
+
add,
|
|
34650
|
+
this.proxyOf.nodes[existIndex],
|
|
34651
|
+
type
|
|
34652
|
+
).reverse();
|
|
34613
34653
|
existIndex = this.index(exist);
|
|
34614
34654
|
for (let node of nodes) this.proxyOf.nodes.splice(existIndex, 0, node);
|
|
34615
34655
|
|
|
@@ -34665,7 +34705,7 @@ let Container$7 = class Container extends Node$1 {
|
|
|
34665
34705
|
if (!i[my$1]) Container.rebuild(i);
|
|
34666
34706
|
i = i.proxyOf;
|
|
34667
34707
|
if (i.parent) i.parent.removeChild(i);
|
|
34668
|
-
if (i[isClean$1])
|
|
34708
|
+
if (i[isClean$1]) markTreeDirty(i);
|
|
34669
34709
|
if (typeof i.raws.before === 'undefined') {
|
|
34670
34710
|
if (sample && typeof sample.raws.before !== 'undefined') {
|
|
34671
34711
|
i.raws.before = sample.raws.before.replace(/\S/g, '');
|
|
@@ -36526,7 +36566,7 @@ let Root$2 = root$2;
|
|
|
36526
36566
|
|
|
36527
36567
|
let Processor$1 = class Processor {
|
|
36528
36568
|
constructor(plugins = []) {
|
|
36529
|
-
this.version = '8.4.
|
|
36569
|
+
this.version = '8.4.40';
|
|
36530
36570
|
this.plugins = this.normalize(plugins);
|
|
36531
36571
|
}
|
|
36532
36572
|
|
|
@@ -37198,7 +37238,7 @@ types.UNIVERSAL = UNIVERSAL;
|
|
|
37198
37238
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
37199
37239
|
function _interopRequireWildcard(obj, nodeInterop) { if (obj && obj.__esModule) { return obj; } if (obj === null || typeof obj !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
37200
37240
|
function _interopRequireDefault(obj) { return obj && obj.__esModule ? obj : { "default": obj }; }
|
|
37201
|
-
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike
|
|
37241
|
+
function _createForOfIteratorHelperLoose(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (it) return (it = it.call(o)).next.bind(it); if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; return function () { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
|
|
37202
37242
|
function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
|
|
37203
37243
|
function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
|
|
37204
37244
|
function _defineProperties(target, props) { for (var i = 0; i < props.length; i++) { var descriptor = props[i]; descriptor.enumerable = descriptor.enumerable || false; descriptor.configurable = true; if ("value" in descriptor) descriptor.writable = true; Object.defineProperty(target, descriptor.key, descriptor); } }
|
|
@@ -48435,7 +48475,7 @@ var __spreadValues = (a, b) => {
|
|
|
48435
48475
|
}
|
|
48436
48476
|
return a;
|
|
48437
48477
|
};
|
|
48438
|
-
const version = "3.4.
|
|
48478
|
+
const version = "3.4.36";
|
|
48439
48479
|
const parseCache = parseCache$1;
|
|
48440
48480
|
const errorMessages = __spreadValues(__spreadValues({}, errorMessages$1), DOMErrorMessages);
|
|
48441
48481
|
const walk = walk$2;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.36",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -45,12 +45,12 @@
|
|
|
45
45
|
"@babel/parser": "^7.24.7",
|
|
46
46
|
"estree-walker": "^2.0.2",
|
|
47
47
|
"magic-string": "^0.30.10",
|
|
48
|
-
"postcss": "^8.4.
|
|
48
|
+
"postcss": "^8.4.40",
|
|
49
49
|
"source-map-js": "^1.2.0",
|
|
50
|
-
"@vue/compiler-core": "3.4.
|
|
51
|
-
"@vue/
|
|
52
|
-
"@vue/compiler-
|
|
53
|
-
"@vue/
|
|
50
|
+
"@vue/compiler-core": "3.4.36",
|
|
51
|
+
"@vue/compiler-ssr": "3.4.36",
|
|
52
|
+
"@vue/compiler-dom": "3.4.36",
|
|
53
|
+
"@vue/shared": "3.4.36"
|
|
54
54
|
},
|
|
55
55
|
"devDependencies": {
|
|
56
56
|
"@babel/types": "^7.24.7",
|
|
@@ -58,9 +58,9 @@
|
|
|
58
58
|
"hash-sum": "^2.0.0",
|
|
59
59
|
"lru-cache": "10.1.0",
|
|
60
60
|
"merge-source-map": "^1.1.0",
|
|
61
|
-
"minimatch": "
|
|
61
|
+
"minimatch": "~9.0.5",
|
|
62
62
|
"postcss-modules": "^6.0.0",
|
|
63
|
-
"postcss-selector-parser": "^6.1.
|
|
63
|
+
"postcss-selector-parser": "^6.1.1",
|
|
64
64
|
"pug": "^3.0.3",
|
|
65
65
|
"sass": "^1.77.8"
|
|
66
66
|
}
|