@vue/compiler-sfc 3.3.5 → 3.3.7
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 +229 -175
- package/dist/compiler-sfc.esm-browser.js +140 -75
- package/package.json +6 -7
package/dist/compiler-sfc.cjs.js
CHANGED
|
@@ -2189,7 +2189,10 @@ function getImportsExpressionExp(path2, hash, loc, context) {
|
|
|
2189
2189
|
loc,
|
|
2190
2190
|
3
|
|
2191
2191
|
);
|
|
2192
|
-
context.imports.push({
|
|
2192
|
+
context.imports.push({
|
|
2193
|
+
exp,
|
|
2194
|
+
path: decodeURIComponent(path2)
|
|
2195
|
+
});
|
|
2193
2196
|
}
|
|
2194
2197
|
if (!hash) {
|
|
2195
2198
|
return exp;
|
|
@@ -4254,6 +4257,7 @@ function doCompileTemplate({
|
|
|
4254
4257
|
slotted,
|
|
4255
4258
|
sourceMap: true,
|
|
4256
4259
|
...compilerOptions,
|
|
4260
|
+
hmr: !isProd,
|
|
4257
4261
|
nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []),
|
|
4258
4262
|
filename,
|
|
4259
4263
|
onError: (e) => errors.push(e),
|
|
@@ -11854,6 +11858,122 @@ function words(string, pattern, guard) {
|
|
|
11854
11858
|
|
|
11855
11859
|
var lodash_camelcase = camelCase;
|
|
11856
11860
|
|
|
11861
|
+
var BulkUpdateDecorator_1;
|
|
11862
|
+
var hasRequiredBulkUpdateDecorator;
|
|
11863
|
+
|
|
11864
|
+
function requireBulkUpdateDecorator () {
|
|
11865
|
+
if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1;
|
|
11866
|
+
hasRequiredBulkUpdateDecorator = 1;
|
|
11867
|
+
const BULK_SIZE = 2000;
|
|
11868
|
+
|
|
11869
|
+
// We are using an object instead of a Map as this will stay static during the runtime
|
|
11870
|
+
// so access to it can be optimized by v8
|
|
11871
|
+
const digestCaches = {};
|
|
11872
|
+
|
|
11873
|
+
class BulkUpdateDecorator {
|
|
11874
|
+
/**
|
|
11875
|
+
* @param {Hash | function(): Hash} hashOrFactory function to create a hash
|
|
11876
|
+
* @param {string=} hashKey key for caching
|
|
11877
|
+
*/
|
|
11878
|
+
constructor(hashOrFactory, hashKey) {
|
|
11879
|
+
this.hashKey = hashKey;
|
|
11880
|
+
|
|
11881
|
+
if (typeof hashOrFactory === "function") {
|
|
11882
|
+
this.hashFactory = hashOrFactory;
|
|
11883
|
+
this.hash = undefined;
|
|
11884
|
+
} else {
|
|
11885
|
+
this.hashFactory = undefined;
|
|
11886
|
+
this.hash = hashOrFactory;
|
|
11887
|
+
}
|
|
11888
|
+
|
|
11889
|
+
this.buffer = "";
|
|
11890
|
+
}
|
|
11891
|
+
|
|
11892
|
+
/**
|
|
11893
|
+
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
11894
|
+
* @param {string|Buffer} data data
|
|
11895
|
+
* @param {string=} inputEncoding data encoding
|
|
11896
|
+
* @returns {this} updated hash
|
|
11897
|
+
*/
|
|
11898
|
+
update(data, inputEncoding) {
|
|
11899
|
+
if (
|
|
11900
|
+
inputEncoding !== undefined ||
|
|
11901
|
+
typeof data !== "string" ||
|
|
11902
|
+
data.length > BULK_SIZE
|
|
11903
|
+
) {
|
|
11904
|
+
if (this.hash === undefined) {
|
|
11905
|
+
this.hash = this.hashFactory();
|
|
11906
|
+
}
|
|
11907
|
+
|
|
11908
|
+
if (this.buffer.length > 0) {
|
|
11909
|
+
this.hash.update(this.buffer);
|
|
11910
|
+
this.buffer = "";
|
|
11911
|
+
}
|
|
11912
|
+
|
|
11913
|
+
this.hash.update(data, inputEncoding);
|
|
11914
|
+
} else {
|
|
11915
|
+
this.buffer += data;
|
|
11916
|
+
|
|
11917
|
+
if (this.buffer.length > BULK_SIZE) {
|
|
11918
|
+
if (this.hash === undefined) {
|
|
11919
|
+
this.hash = this.hashFactory();
|
|
11920
|
+
}
|
|
11921
|
+
|
|
11922
|
+
this.hash.update(this.buffer);
|
|
11923
|
+
this.buffer = "";
|
|
11924
|
+
}
|
|
11925
|
+
}
|
|
11926
|
+
|
|
11927
|
+
return this;
|
|
11928
|
+
}
|
|
11929
|
+
|
|
11930
|
+
/**
|
|
11931
|
+
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
11932
|
+
* @param {string=} encoding encoding of the return value
|
|
11933
|
+
* @returns {string|Buffer} digest
|
|
11934
|
+
*/
|
|
11935
|
+
digest(encoding) {
|
|
11936
|
+
let digestCache;
|
|
11937
|
+
|
|
11938
|
+
const buffer = this.buffer;
|
|
11939
|
+
|
|
11940
|
+
if (this.hash === undefined) {
|
|
11941
|
+
// short data for hash, we can use caching
|
|
11942
|
+
const cacheKey = `${this.hashKey}-${encoding}`;
|
|
11943
|
+
|
|
11944
|
+
digestCache = digestCaches[cacheKey];
|
|
11945
|
+
|
|
11946
|
+
if (digestCache === undefined) {
|
|
11947
|
+
digestCache = digestCaches[cacheKey] = new Map();
|
|
11948
|
+
}
|
|
11949
|
+
|
|
11950
|
+
const cacheEntry = digestCache.get(buffer);
|
|
11951
|
+
|
|
11952
|
+
if (cacheEntry !== undefined) {
|
|
11953
|
+
return cacheEntry;
|
|
11954
|
+
}
|
|
11955
|
+
|
|
11956
|
+
this.hash = this.hashFactory();
|
|
11957
|
+
}
|
|
11958
|
+
|
|
11959
|
+
if (buffer.length > 0) {
|
|
11960
|
+
this.hash.update(buffer);
|
|
11961
|
+
}
|
|
11962
|
+
|
|
11963
|
+
const digestResult = this.hash.digest(encoding);
|
|
11964
|
+
|
|
11965
|
+
if (digestCache !== undefined) {
|
|
11966
|
+
digestCache.set(buffer, digestResult);
|
|
11967
|
+
}
|
|
11968
|
+
|
|
11969
|
+
return digestResult;
|
|
11970
|
+
}
|
|
11971
|
+
}
|
|
11972
|
+
|
|
11973
|
+
BulkUpdateDecorator_1 = BulkUpdateDecorator;
|
|
11974
|
+
return BulkUpdateDecorator_1;
|
|
11975
|
+
}
|
|
11976
|
+
|
|
11857
11977
|
var wasmHash = {exports: {}};
|
|
11858
11978
|
|
|
11859
11979
|
/*
|
|
@@ -12076,27 +12196,27 @@ function requireWasmHash () {
|
|
|
12076
12196
|
Author Tobias Koppers @sokra
|
|
12077
12197
|
*/
|
|
12078
12198
|
|
|
12079
|
-
var
|
|
12080
|
-
var
|
|
12199
|
+
var md4_1;
|
|
12200
|
+
var hasRequiredMd4;
|
|
12081
12201
|
|
|
12082
|
-
function
|
|
12083
|
-
if (
|
|
12084
|
-
|
|
12202
|
+
function requireMd4 () {
|
|
12203
|
+
if (hasRequiredMd4) return md4_1;
|
|
12204
|
+
hasRequiredMd4 = 1;
|
|
12085
12205
|
|
|
12086
12206
|
const create = requireWasmHash();
|
|
12087
12207
|
|
|
12088
|
-
//#region wasm code:
|
|
12089
|
-
const
|
|
12208
|
+
//#region wasm code: md4 (../../../assembly/hash/md4.asm.ts) --initialMemory 1
|
|
12209
|
+
const md4 = new WebAssembly.Module(
|
|
12090
12210
|
Buffer.from(
|
|
12091
|
-
//
|
|
12092
|
-
"
|
|
12211
|
+
// 2150 bytes
|
|
12212
|
+
"AGFzbQEAAAABCAJgAX8AYAAAAwUEAQAAAAUDAQABBhoFfwFBAAt/AUEAC38BQQALfwFBAAt/AUEACwciBARpbml0AAAGdXBkYXRlAAIFZmluYWwAAwZtZW1vcnkCAAqFEAQmAEGBxpS6BiQBQYnXtv5+JAJB/rnrxXkkA0H2qMmBASQEQQAkAAvMCgEYfyMBIQojAiEGIwMhByMEIQgDQCAAIAVLBEAgBSgCCCINIAcgBiAFKAIEIgsgCCAHIAUoAgAiDCAKIAggBiAHIAhzcXNqakEDdyIDIAYgB3Nxc2pqQQd3IgEgAyAGc3FzampBC3chAiAFKAIUIg8gASACIAUoAhAiCSADIAEgBSgCDCIOIAYgAyACIAEgA3Nxc2pqQRN3IgQgASACc3FzampBA3ciAyACIARzcXNqakEHdyEBIAUoAiAiEiADIAEgBSgCHCIRIAQgAyAFKAIYIhAgAiAEIAEgAyAEc3FzampBC3ciAiABIANzcXNqakETdyIEIAEgAnNxc2pqQQN3IQMgBSgCLCIVIAQgAyAFKAIoIhQgAiAEIAUoAiQiEyABIAIgAyACIARzcXNqakEHdyIBIAMgBHNxc2pqQQt3IgIgASADc3FzampBE3chBCAPIBAgCSAVIBQgEyAFKAI4IhYgAiAEIAUoAjQiFyABIAIgBSgCMCIYIAMgASAEIAEgAnNxc2pqQQN3IgEgAiAEc3FzampBB3ciAiABIARzcXNqakELdyIDIAkgAiAMIAEgBSgCPCIJIAQgASADIAEgAnNxc2pqQRN3IgEgAiADcnEgAiADcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyaiASakGZ84nUBWpBCXciAyAPIAQgCyACIBggASADIAIgBHJxIAIgBHFyampBmfOJ1AVqQQ13IgEgAyAEcnEgAyAEcXJqakGZ84nUBWpBA3ciAiABIANycSABIANxcmpqQZnzidQFakEFdyIEIAEgAnJxIAEgAnFyampBmfOJ1AVqQQl3IgMgECAEIAIgFyABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmogDWpBmfOJ1AVqQQN3IgIgASADcnEgASADcXJqakGZ84nUBWpBBXciBCABIAJycSABIAJxcmpqQZnzidQFakEJdyIDIBEgBCAOIAIgFiABIAMgAiAEcnEgAiAEcXJqakGZ84nUBWpBDXciASADIARycSADIARxcmpqQZnzidQFakEDdyICIAEgA3JxIAEgA3FyampBmfOJ1AVqQQV3IgQgASACcnEgASACcXJqakGZ84nUBWpBCXciAyAMIAIgAyAJIAEgAyACIARycSACIARxcmpqQZnzidQFakENdyIBcyAEc2pqQaHX5/YGakEDdyICIAQgASACcyADc2ogEmpBodfn9gZqQQl3IgRzIAFzampBodfn9gZqQQt3IgMgAiADIBggASADIARzIAJzampBodfn9gZqQQ93IgFzIARzaiANakGh1+f2BmpBA3ciAiAUIAQgASACcyADc2pqQaHX5/YGakEJdyIEcyABc2pqQaHX5/YGakELdyIDIAsgAiADIBYgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgIgEyAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3chAyAKIA4gAiADIBcgASADIARzIAJzampBodfn9gZqQQ93IgFzIARzampBodfn9gZqQQN3IgJqIQogBiAJIAEgESADIAIgFSAEIAEgAnMgA3NqakGh1+f2BmpBCXciBHMgAXNqakGh1+f2BmpBC3ciAyAEcyACc2pqQaHX5/YGakEPd2ohBiADIAdqIQcgBCAIaiEIIAVBQGshBQwBCwsgCiQBIAYkAiAHJAMgCCQECw0AIAAQASMAIABqJAAL/wQCA38BfiMAIABqrUIDhiEEIABByABqQUBxIgJBCGshAyAAIgFBAWohACABQYABOgAAA0AgACACSUEAIABBB3EbBEAgAEEAOgAAIABBAWohAAwBCwsDQCAAIAJJBEAgAEIANwMAIABBCGohAAwBCwsgAyAENwMAIAIQAUEAIwGtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEIIwKtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEQIwOtIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAEEYIwStIgRC//8DgyAEQoCA/P8Pg0IQhoQiBEL/gYCA8B+DIARCgP6DgIDgP4NCCIaEIgRCj4C8gPCBwAeDQgiGIARC8IHAh4CegPgAg0IEiIQiBEKGjJiw4MCBgwZ8QgSIQoGChIiQoMCAAYNCJ34gBEKw4MCBg4aMmDCEfDcDAAs=",
|
|
12093
12213
|
"base64"
|
|
12094
12214
|
)
|
|
12095
12215
|
);
|
|
12096
12216
|
//#endregion
|
|
12097
12217
|
|
|
12098
|
-
|
|
12099
|
-
return
|
|
12218
|
+
md4_1 = create.bind(null, md4, [], 64, 32);
|
|
12219
|
+
return md4_1;
|
|
12100
12220
|
}
|
|
12101
12221
|
|
|
12102
12222
|
var BatchedHash_1;
|
|
@@ -12177,143 +12297,27 @@ function requireBatchedHash () {
|
|
|
12177
12297
|
Author Tobias Koppers @sokra
|
|
12178
12298
|
*/
|
|
12179
12299
|
|
|
12180
|
-
var
|
|
12181
|
-
var
|
|
12300
|
+
var xxhash64_1;
|
|
12301
|
+
var hasRequiredXxhash64;
|
|
12182
12302
|
|
|
12183
|
-
function
|
|
12184
|
-
if (
|
|
12185
|
-
|
|
12303
|
+
function requireXxhash64 () {
|
|
12304
|
+
if (hasRequiredXxhash64) return xxhash64_1;
|
|
12305
|
+
hasRequiredXxhash64 = 1;
|
|
12186
12306
|
|
|
12187
12307
|
const create = requireWasmHash();
|
|
12188
12308
|
|
|
12189
|
-
//#region wasm code:
|
|
12190
|
-
const
|
|
12309
|
+
//#region wasm code: xxhash64 (../../../assembly/hash/xxhash64.asm.ts) --initialMemory 1
|
|
12310
|
+
const xxhash64 = new WebAssembly.Module(
|
|
12191
12311
|
Buffer.from(
|
|
12192
|
-
//
|
|
12193
|
-
"
|
|
12312
|
+
// 1173 bytes
|
|
12313
|
+
"AGFzbQEAAAABCAJgAX8AYAAAAwQDAQAABQMBAAEGGgV+AUIAC34BQgALfgFCAAt+AUIAC34BQgALByIEBGluaXQAAAZ1cGRhdGUAAQVmaW5hbAACBm1lbW9yeQIACrUIAzAAQtbrgu7q/Yn14AAkAELP1tO+0ser2UIkAUIAJAJC+erQ0OfJoeThACQDQgAkBAvUAQIBfwR+IABFBEAPCyMEIACtfCQEIwAhAiMBIQMjAiEEIwMhBQNAIAIgASkDAELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiECIAMgASkDCELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEDIAQgASkDEELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEEIAUgASkDGELP1tO+0ser2UJ+fEIfiUKHla+vmLbem55/fiEFIAAgAUEgaiIBSw0ACyACJAAgAyQBIAQkAiAFJAMLqwYCAX8EfiMEQgBSBH4jACICQgGJIwEiA0IHiXwjAiIEQgyJfCMDIgVCEol8IAJCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0gA0LP1tO+0ser2UJ+Qh+JQoeVr6+Ytt6bnn9+hUKHla+vmLbem55/fkKdo7Xqg7GNivoAfSAEQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IAVCz9bTvtLHq9lCfkIfiUKHla+vmLbem55/foVCh5Wvr5i23puef35CnaO16oOxjYr6AH0FQsXP2bLx5brqJwsjBCAArXx8IQIDQCABQQhqIABNBEAgAiABKQMAQs/W077Sx6vZQn5CH4lCh5Wvr5i23puef36FQhuJQoeVr6+Ytt6bnn9+Qp2jteqDsY2K+gB9IQIgAUEIaiEBDAELCyABQQRqIABNBEACfyACIAE1AgBCh5Wvr5i23puef36FQheJQs/W077Sx6vZQn5C+fPd8Zn2masWfCECIAFBBGoLIQELA0AgACABRwRAIAIgATEAAELFz9my8eW66id+hUILiUKHla+vmLbem55/fiECIAFBAWohAQwBCwtBACACIAJCIYiFQs/W077Sx6vZQn4iAiACQh2IhUL5893xmfaZqxZ+IgIgAkIgiIUiAkIgiCIDQv//A4NCIIYgA0KAgPz/D4NCEIiEIgNC/4GAgPAfg0IQhiADQoD+g4CA4D+DQgiIhCIDQo+AvIDwgcAHg0IIhiADQvCBwIeAnoD4AINCBIiEIgNChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IANCsODAgYOGjJgwhHw3AwBBCCACQv////8PgyICQv//A4NCIIYgAkKAgPz/D4NCEIiEIgJC/4GAgPAfg0IQhiACQoD+g4CA4D+DQgiIhCICQo+AvIDwgcAHg0IIhiACQvCBwIeAnoD4AINCBIiEIgJChoyYsODAgYMGfEIEiEKBgoSIkKDAgAGDQid+IAJCsODAgYOGjJgwhHw3AwAL",
|
|
12194
12314
|
"base64"
|
|
12195
12315
|
)
|
|
12196
12316
|
);
|
|
12197
12317
|
//#endregion
|
|
12198
12318
|
|
|
12199
|
-
|
|
12200
|
-
return
|
|
12201
|
-
}
|
|
12202
|
-
|
|
12203
|
-
var BulkUpdateDecorator_1;
|
|
12204
|
-
var hasRequiredBulkUpdateDecorator;
|
|
12205
|
-
|
|
12206
|
-
function requireBulkUpdateDecorator () {
|
|
12207
|
-
if (hasRequiredBulkUpdateDecorator) return BulkUpdateDecorator_1;
|
|
12208
|
-
hasRequiredBulkUpdateDecorator = 1;
|
|
12209
|
-
const BULK_SIZE = 2000;
|
|
12210
|
-
|
|
12211
|
-
// We are using an object instead of a Map as this will stay static during the runtime
|
|
12212
|
-
// so access to it can be optimized by v8
|
|
12213
|
-
const digestCaches = {};
|
|
12214
|
-
|
|
12215
|
-
class BulkUpdateDecorator {
|
|
12216
|
-
/**
|
|
12217
|
-
* @param {Hash | function(): Hash} hashOrFactory function to create a hash
|
|
12218
|
-
* @param {string=} hashKey key for caching
|
|
12219
|
-
*/
|
|
12220
|
-
constructor(hashOrFactory, hashKey) {
|
|
12221
|
-
this.hashKey = hashKey;
|
|
12222
|
-
|
|
12223
|
-
if (typeof hashOrFactory === "function") {
|
|
12224
|
-
this.hashFactory = hashOrFactory;
|
|
12225
|
-
this.hash = undefined;
|
|
12226
|
-
} else {
|
|
12227
|
-
this.hashFactory = undefined;
|
|
12228
|
-
this.hash = hashOrFactory;
|
|
12229
|
-
}
|
|
12230
|
-
|
|
12231
|
-
this.buffer = "";
|
|
12232
|
-
}
|
|
12233
|
-
|
|
12234
|
-
/**
|
|
12235
|
-
* Update hash {@link https://nodejs.org/api/crypto.html#crypto_hash_update_data_inputencoding}
|
|
12236
|
-
* @param {string|Buffer} data data
|
|
12237
|
-
* @param {string=} inputEncoding data encoding
|
|
12238
|
-
* @returns {this} updated hash
|
|
12239
|
-
*/
|
|
12240
|
-
update(data, inputEncoding) {
|
|
12241
|
-
if (
|
|
12242
|
-
inputEncoding !== undefined ||
|
|
12243
|
-
typeof data !== "string" ||
|
|
12244
|
-
data.length > BULK_SIZE
|
|
12245
|
-
) {
|
|
12246
|
-
if (this.hash === undefined) {
|
|
12247
|
-
this.hash = this.hashFactory();
|
|
12248
|
-
}
|
|
12249
|
-
|
|
12250
|
-
if (this.buffer.length > 0) {
|
|
12251
|
-
this.hash.update(this.buffer);
|
|
12252
|
-
this.buffer = "";
|
|
12253
|
-
}
|
|
12254
|
-
|
|
12255
|
-
this.hash.update(data, inputEncoding);
|
|
12256
|
-
} else {
|
|
12257
|
-
this.buffer += data;
|
|
12258
|
-
|
|
12259
|
-
if (this.buffer.length > BULK_SIZE) {
|
|
12260
|
-
if (this.hash === undefined) {
|
|
12261
|
-
this.hash = this.hashFactory();
|
|
12262
|
-
}
|
|
12263
|
-
|
|
12264
|
-
this.hash.update(this.buffer);
|
|
12265
|
-
this.buffer = "";
|
|
12266
|
-
}
|
|
12267
|
-
}
|
|
12268
|
-
|
|
12269
|
-
return this;
|
|
12270
|
-
}
|
|
12271
|
-
|
|
12272
|
-
/**
|
|
12273
|
-
* Calculates the digest {@link https://nodejs.org/api/crypto.html#crypto_hash_digest_encoding}
|
|
12274
|
-
* @param {string=} encoding encoding of the return value
|
|
12275
|
-
* @returns {string|Buffer} digest
|
|
12276
|
-
*/
|
|
12277
|
-
digest(encoding) {
|
|
12278
|
-
let digestCache;
|
|
12279
|
-
|
|
12280
|
-
const buffer = this.buffer;
|
|
12281
|
-
|
|
12282
|
-
if (this.hash === undefined) {
|
|
12283
|
-
// short data for hash, we can use caching
|
|
12284
|
-
const cacheKey = `${this.hashKey}-${encoding}`;
|
|
12285
|
-
|
|
12286
|
-
digestCache = digestCaches[cacheKey];
|
|
12287
|
-
|
|
12288
|
-
if (digestCache === undefined) {
|
|
12289
|
-
digestCache = digestCaches[cacheKey] = new Map();
|
|
12290
|
-
}
|
|
12291
|
-
|
|
12292
|
-
const cacheEntry = digestCache.get(buffer);
|
|
12293
|
-
|
|
12294
|
-
if (cacheEntry !== undefined) {
|
|
12295
|
-
return cacheEntry;
|
|
12296
|
-
}
|
|
12297
|
-
|
|
12298
|
-
this.hash = this.hashFactory();
|
|
12299
|
-
}
|
|
12300
|
-
|
|
12301
|
-
if (buffer.length > 0) {
|
|
12302
|
-
this.hash.update(buffer);
|
|
12303
|
-
}
|
|
12304
|
-
|
|
12305
|
-
const digestResult = this.hash.digest(encoding);
|
|
12306
|
-
|
|
12307
|
-
if (digestCache !== undefined) {
|
|
12308
|
-
digestCache.set(buffer, digestResult);
|
|
12309
|
-
}
|
|
12310
|
-
|
|
12311
|
-
return digestResult;
|
|
12312
|
-
}
|
|
12313
|
-
}
|
|
12314
|
-
|
|
12315
|
-
BulkUpdateDecorator_1 = BulkUpdateDecorator;
|
|
12316
|
-
return BulkUpdateDecorator_1;
|
|
12319
|
+
xxhash64_1 = create.bind(null, xxhash64, [], 32, 16);
|
|
12320
|
+
return xxhash64_1;
|
|
12317
12321
|
}
|
|
12318
12322
|
|
|
12319
12323
|
const baseEncodeTables = {
|
|
@@ -13818,9 +13822,19 @@ function localizeNode(rule, mode, localAliasMap) {
|
|
|
13818
13822
|
hasLocals: false,
|
|
13819
13823
|
explicit: context.explicit,
|
|
13820
13824
|
};
|
|
13821
|
-
newNodes = node.map((childNode) =>
|
|
13822
|
-
|
|
13823
|
-
|
|
13825
|
+
newNodes = node.map((childNode) => {
|
|
13826
|
+
const newContext = {
|
|
13827
|
+
...childContext,
|
|
13828
|
+
enforceNoSpacing: false,
|
|
13829
|
+
};
|
|
13830
|
+
|
|
13831
|
+
const result = transform(childNode, newContext);
|
|
13832
|
+
|
|
13833
|
+
childContext.global = newContext.global;
|
|
13834
|
+
childContext.hasLocals = newContext.hasLocals;
|
|
13835
|
+
|
|
13836
|
+
return result;
|
|
13837
|
+
});
|
|
13824
13838
|
|
|
13825
13839
|
node = node.clone();
|
|
13826
13840
|
node.nodes = normalizeNodeArray(newNodes);
|
|
@@ -13961,19 +13975,34 @@ function localizeDeclNode(node, context) {
|
|
|
13961
13975
|
return node;
|
|
13962
13976
|
}
|
|
13963
13977
|
|
|
13964
|
-
|
|
13965
|
-
|
|
13966
|
-
|
|
13967
|
-
|
|
13968
|
-
|
|
13969
|
-
|
|
13970
|
-
|
|
13971
|
-
|
|
13978
|
+
// `none` is special value, other is global values
|
|
13979
|
+
const specialKeywords = [
|
|
13980
|
+
"none",
|
|
13981
|
+
"inherit",
|
|
13982
|
+
"initial",
|
|
13983
|
+
"revert",
|
|
13984
|
+
"revert-layer",
|
|
13985
|
+
"unset",
|
|
13986
|
+
];
|
|
13972
13987
|
|
|
13973
13988
|
function localizeDeclarationValues(localize, declaration, context) {
|
|
13974
13989
|
const valueNodes = valueParser(declaration.value);
|
|
13975
13990
|
|
|
13976
13991
|
valueNodes.walk((node, index, nodes) => {
|
|
13992
|
+
if (
|
|
13993
|
+
node.type === "function" &&
|
|
13994
|
+
(node.value.toLowerCase() === "var" || node.value.toLowerCase() === "env")
|
|
13995
|
+
) {
|
|
13996
|
+
return false;
|
|
13997
|
+
}
|
|
13998
|
+
|
|
13999
|
+
if (
|
|
14000
|
+
node.type === "word" &&
|
|
14001
|
+
specialKeywords.includes(node.value.toLowerCase())
|
|
14002
|
+
) {
|
|
14003
|
+
return;
|
|
14004
|
+
}
|
|
14005
|
+
|
|
13977
14006
|
const subContext = {
|
|
13978
14007
|
options: context.options,
|
|
13979
14008
|
global: context.global,
|
|
@@ -13990,57 +14019,80 @@ function localizeDeclaration(declaration, context) {
|
|
|
13990
14019
|
const isAnimation = /animation$/i.test(declaration.prop);
|
|
13991
14020
|
|
|
13992
14021
|
if (isAnimation) {
|
|
13993
|
-
|
|
14022
|
+
// letter
|
|
14023
|
+
// An uppercase letter or a lowercase letter.
|
|
14024
|
+
//
|
|
14025
|
+
// ident-start code point
|
|
14026
|
+
// A letter, a non-ASCII code point, or U+005F LOW LINE (_).
|
|
14027
|
+
//
|
|
14028
|
+
// ident code point
|
|
14029
|
+
// An ident-start code point, a digit, or U+002D HYPHEN-MINUS (-).
|
|
14030
|
+
|
|
14031
|
+
// We don't validate `hex digits`, because we don't need it, it is work of linters.
|
|
14032
|
+
const validIdent =
|
|
14033
|
+
/^-?([a-z\u0080-\uFFFF_]|(\\[^\r\n\f])|-)((\\[^\r\n\f])|[a-z\u0080-\uFFFF_0-9-])*$/i;
|
|
13994
14034
|
|
|
13995
14035
|
/*
|
|
13996
14036
|
The spec defines some keywords that you can use to describe properties such as the timing
|
|
13997
14037
|
function. These are still valid animation names, so as long as there is a property that accepts
|
|
13998
14038
|
a keyword, it is given priority. Only when all the properties that can take a keyword are
|
|
13999
14039
|
exhausted can the animation name be set to the keyword. I.e.
|
|
14000
|
-
|
|
14040
|
+
|
|
14001
14041
|
animation: infinite infinite;
|
|
14002
|
-
|
|
14042
|
+
|
|
14003
14043
|
The animation will repeat an infinite number of times from the first argument, and will have an
|
|
14004
14044
|
animation name of infinite from the second.
|
|
14005
14045
|
*/
|
|
14006
14046
|
const animationKeywords = {
|
|
14047
|
+
// animation-direction
|
|
14048
|
+
$normal: 1,
|
|
14049
|
+
$reverse: 1,
|
|
14007
14050
|
$alternate: 1,
|
|
14008
14051
|
"$alternate-reverse": 1,
|
|
14052
|
+
// animation-fill-mode
|
|
14053
|
+
$forwards: 1,
|
|
14009
14054
|
$backwards: 1,
|
|
14010
14055
|
$both: 1,
|
|
14056
|
+
// animation-iteration-count
|
|
14057
|
+
$infinite: 1,
|
|
14058
|
+
// animation-play-state
|
|
14059
|
+
$paused: 1,
|
|
14060
|
+
$running: 1,
|
|
14061
|
+
// animation-timing-function
|
|
14011
14062
|
$ease: 1,
|
|
14012
14063
|
"$ease-in": 1,
|
|
14013
|
-
"$ease-in-out": 1,
|
|
14014
14064
|
"$ease-out": 1,
|
|
14015
|
-
$
|
|
14016
|
-
$infinite: 1,
|
|
14065
|
+
"$ease-in-out": 1,
|
|
14017
14066
|
$linear: 1,
|
|
14018
|
-
$none: Infinity, // No matter how many times you write none, it will never be an animation name
|
|
14019
|
-
$normal: 1,
|
|
14020
|
-
$paused: 1,
|
|
14021
|
-
$reverse: 1,
|
|
14022
|
-
$running: 1,
|
|
14023
14067
|
"$step-end": 1,
|
|
14024
14068
|
"$step-start": 1,
|
|
14069
|
+
// Special
|
|
14070
|
+
$none: Infinity, // No matter how many times you write none, it will never be an animation name
|
|
14071
|
+
// Global values
|
|
14025
14072
|
$initial: Infinity,
|
|
14026
14073
|
$inherit: Infinity,
|
|
14027
14074
|
$unset: Infinity,
|
|
14075
|
+
$revert: Infinity,
|
|
14076
|
+
"$revert-layer": Infinity,
|
|
14028
14077
|
};
|
|
14029
14078
|
let parsedAnimationKeywords = {};
|
|
14030
|
-
let stepsFunctionNode = null;
|
|
14031
14079
|
const valueNodes = valueParser(declaration.value).walk((node) => {
|
|
14032
|
-
|
|
14080
|
+
// If div-token appeared (represents as comma ','), a possibility of an animation-keywords should be reflesh.
|
|
14033
14081
|
if (node.type === "div") {
|
|
14034
14082
|
parsedAnimationKeywords = {};
|
|
14083
|
+
|
|
14084
|
+
return;
|
|
14085
|
+
}
|
|
14086
|
+
// Do not handle nested functions
|
|
14087
|
+
else if (node.type === "function") {
|
|
14088
|
+
return false;
|
|
14035
14089
|
}
|
|
14036
|
-
|
|
14037
|
-
|
|
14090
|
+
// Ignore all except word
|
|
14091
|
+
else if (node.type !== "word") {
|
|
14092
|
+
return;
|
|
14038
14093
|
}
|
|
14039
|
-
|
|
14040
|
-
|
|
14041
|
-
!isWordAFunctionArgument(node, stepsFunctionNode)
|
|
14042
|
-
? node.value.toLowerCase()
|
|
14043
|
-
: null;
|
|
14094
|
+
|
|
14095
|
+
const value = node.type === "word" ? node.value.toLowerCase() : null;
|
|
14044
14096
|
|
|
14045
14097
|
let shouldParseAnimationName = false;
|
|
14046
14098
|
|
|
@@ -14065,6 +14117,7 @@ function localizeDeclaration(declaration, context) {
|
|
|
14065
14117
|
localizeNextItem: shouldParseAnimationName && !context.global,
|
|
14066
14118
|
localAliasMap: context.localAliasMap,
|
|
14067
14119
|
};
|
|
14120
|
+
|
|
14068
14121
|
return localizeDeclNode(node, subContext);
|
|
14069
14122
|
});
|
|
14070
14123
|
|
|
@@ -15469,6 +15522,7 @@ function specifierEnd(s, end, nodeEnd) {
|
|
|
15469
15522
|
|
|
15470
15523
|
const normalScriptDefaultVar = `__default__`;
|
|
15471
15524
|
function processNormalScript(ctx, scopeId) {
|
|
15525
|
+
var _a;
|
|
15472
15526
|
const script = ctx.descriptor.script;
|
|
15473
15527
|
if (script.lang && !ctx.isJS && !ctx.isTS) {
|
|
15474
15528
|
return script;
|
|
@@ -15507,7 +15561,7 @@ function processNormalScript(ctx, scopeId) {
|
|
|
15507
15561
|
const s = new MagicString(content);
|
|
15508
15562
|
rewriteDefaultAST(scriptAst.body, s, defaultVar);
|
|
15509
15563
|
content = s.toString();
|
|
15510
|
-
if (cssVars.length) {
|
|
15564
|
+
if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) {
|
|
15511
15565
|
content += genNormalScriptCssVarsCode(
|
|
15512
15566
|
cssVars,
|
|
15513
15567
|
bindings,
|
|
@@ -15555,7 +15609,7 @@ class ScriptCompileContext {
|
|
|
15555
15609
|
this.hasDefineModelCall = false;
|
|
15556
15610
|
this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null);
|
|
15557
15611
|
// defineModel
|
|
15558
|
-
this.modelDecls =
|
|
15612
|
+
this.modelDecls = /* @__PURE__ */ Object.create(null);
|
|
15559
15613
|
// codegen
|
|
15560
15614
|
this.bindingMetadata = {};
|
|
15561
15615
|
this.helperImports = /* @__PURE__ */ new Set();
|
|
@@ -18192,7 +18246,7 @@ function importSourceToScope(ctx, node, scope, source) {
|
|
|
18192
18246
|
let resolved = scope.resolvedImportSources[source];
|
|
18193
18247
|
if (!resolved) {
|
|
18194
18248
|
if (source.startsWith(".")) {
|
|
18195
|
-
const filename = joinPaths(scope.filename,
|
|
18249
|
+
const filename = joinPaths(path$3.dirname(scope.filename), source);
|
|
18196
18250
|
resolved = resolveExt(filename, fs);
|
|
18197
18251
|
} else {
|
|
18198
18252
|
if (!ts) {
|
|
@@ -20021,7 +20075,7 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|
|
20021
20075
|
}
|
|
20022
20076
|
}
|
|
20023
20077
|
if (sfc.cssVars.length && // no need to do this when targeting SSR
|
|
20024
|
-
!(
|
|
20078
|
+
!((_a = options.templateOptions) == null ? void 0 : _a.ssr)) {
|
|
20025
20079
|
ctx.helperImports.add(CSS_VARS_HELPER);
|
|
20026
20080
|
ctx.helperImports.add("unref");
|
|
20027
20081
|
ctx.s.prependLeft(
|
|
@@ -20407,7 +20461,7 @@ function isStaticNode(node) {
|
|
|
20407
20461
|
return false;
|
|
20408
20462
|
}
|
|
20409
20463
|
|
|
20410
|
-
const version = "3.3.
|
|
20464
|
+
const version = "3.3.7";
|
|
20411
20465
|
const walk = estreeWalker.walk;
|
|
20412
20466
|
|
|
20413
20467
|
exports.babelParse = parser$2.parse;
|
|
@@ -16281,9 +16281,13 @@ function walk$2(node, context, doNotHoistNode = false) {
|
|
|
16281
16281
|
context.transformHoist(children, context, node);
|
|
16282
16282
|
}
|
|
16283
16283
|
if (hoistedCount && hoistedCount === originalCount && node.type === 1 && node.tagType === 0 && node.codegenNode && node.codegenNode.type === 13 && isArray$3(node.codegenNode.children)) {
|
|
16284
|
-
|
|
16284
|
+
const hoisted = context.hoist(
|
|
16285
16285
|
createArrayExpression(node.codegenNode.children)
|
|
16286
16286
|
);
|
|
16287
|
+
if (context.hmr) {
|
|
16288
|
+
hoisted.content = `[...${hoisted.content}]`;
|
|
16289
|
+
}
|
|
16290
|
+
node.codegenNode.children = hoisted;
|
|
16287
16291
|
}
|
|
16288
16292
|
}
|
|
16289
16293
|
function getConstantType(node, context) {
|
|
@@ -16456,6 +16460,7 @@ function createTransformContext(root, {
|
|
|
16456
16460
|
filename = "",
|
|
16457
16461
|
prefixIdentifiers = false,
|
|
16458
16462
|
hoistStatic: hoistStatic2 = false,
|
|
16463
|
+
hmr = false,
|
|
16459
16464
|
cacheHandlers = false,
|
|
16460
16465
|
nodeTransforms = [],
|
|
16461
16466
|
directiveTransforms = {},
|
|
@@ -16481,6 +16486,7 @@ function createTransformContext(root, {
|
|
|
16481
16486
|
selfName: nameMatch && capitalize$1(camelize(nameMatch[1])),
|
|
16482
16487
|
prefixIdentifiers,
|
|
16483
16488
|
hoistStatic: hoistStatic2,
|
|
16489
|
+
hmr,
|
|
16484
16490
|
cacheHandlers,
|
|
16485
16491
|
nodeTransforms,
|
|
16486
16492
|
directiveTransforms,
|
|
@@ -16506,7 +16512,7 @@ function createTransformContext(root, {
|
|
|
16506
16512
|
directives: /* @__PURE__ */ new Set(),
|
|
16507
16513
|
hoists: [],
|
|
16508
16514
|
imports: [],
|
|
16509
|
-
constantCache: /* @__PURE__ */ new
|
|
16515
|
+
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
16510
16516
|
temps: 0,
|
|
16511
16517
|
cached: 0,
|
|
16512
16518
|
identifiers: /* @__PURE__ */ Object.create(null),
|
|
@@ -22029,7 +22035,7 @@ const trackVForSlotScopes = (node, context) => {
|
|
|
22029
22035
|
}
|
|
22030
22036
|
}
|
|
22031
22037
|
};
|
|
22032
|
-
const buildClientSlotFn = (props, children, loc) => createFunctionExpression(
|
|
22038
|
+
const buildClientSlotFn = (props, _vForExp, children, loc) => createFunctionExpression(
|
|
22033
22039
|
props,
|
|
22034
22040
|
children,
|
|
22035
22041
|
false,
|
|
@@ -22054,7 +22060,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
22054
22060
|
slotsProperties.push(
|
|
22055
22061
|
createObjectProperty(
|
|
22056
22062
|
arg || createSimpleExpression("default", true),
|
|
22057
|
-
buildSlotFn(exp, children, loc)
|
|
22063
|
+
buildSlotFn(exp, void 0, children, loc)
|
|
22058
22064
|
)
|
|
22059
22065
|
);
|
|
22060
22066
|
}
|
|
@@ -22091,10 +22097,15 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
22091
22097
|
} else {
|
|
22092
22098
|
hasDynamicSlots = true;
|
|
22093
22099
|
}
|
|
22094
|
-
const
|
|
22100
|
+
const vFor = findDir(slotElement, "for");
|
|
22101
|
+
const slotFunction = buildSlotFn(
|
|
22102
|
+
slotProps,
|
|
22103
|
+
vFor == null ? void 0 : vFor.exp,
|
|
22104
|
+
slotChildren,
|
|
22105
|
+
slotLoc
|
|
22106
|
+
);
|
|
22095
22107
|
let vIf;
|
|
22096
22108
|
let vElse;
|
|
22097
|
-
let vFor;
|
|
22098
22109
|
if (vIf = findDir(slotElement, "if")) {
|
|
22099
22110
|
hasDynamicSlots = true;
|
|
22100
22111
|
dynamicSlots.push(
|
|
@@ -22139,7 +22150,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
22139
22150
|
createCompilerError(30, vElse.loc)
|
|
22140
22151
|
);
|
|
22141
22152
|
}
|
|
22142
|
-
} else if (vFor
|
|
22153
|
+
} else if (vFor) {
|
|
22143
22154
|
hasDynamicSlots = true;
|
|
22144
22155
|
const parseResult = vFor.parseResult || parseForExpression(vFor.exp, context);
|
|
22145
22156
|
if (parseResult) {
|
|
@@ -22180,7 +22191,7 @@ function buildSlots(node, context, buildSlotFn = buildClientSlotFn) {
|
|
|
22180
22191
|
}
|
|
22181
22192
|
if (!onComponentSlot) {
|
|
22182
22193
|
const buildDefaultSlotProperty = (props, children2) => {
|
|
22183
|
-
const fn = buildSlotFn(props, children2, loc);
|
|
22194
|
+
const fn = buildSlotFn(props, void 0, children2, loc);
|
|
22184
22195
|
return createObjectProperty(`default`, fn);
|
|
22185
22196
|
};
|
|
22186
22197
|
if (!hasTemplateSlots) {
|
|
@@ -31665,7 +31676,10 @@ function getImportsExpressionExp(path2, hash, loc, context) {
|
|
|
31665
31676
|
loc,
|
|
31666
31677
|
3
|
|
31667
31678
|
);
|
|
31668
|
-
context.imports.push({
|
|
31679
|
+
context.imports.push({
|
|
31680
|
+
exp,
|
|
31681
|
+
path: decodeURIComponent(path2)
|
|
31682
|
+
});
|
|
31669
31683
|
}
|
|
31670
31684
|
if (!hash) {
|
|
31671
31685
|
return exp;
|
|
@@ -32028,7 +32042,7 @@ function ssrProcessTeleport(node, context) {
|
|
|
32028
32042
|
);
|
|
32029
32043
|
}
|
|
32030
32044
|
|
|
32031
|
-
const wipMap$
|
|
32045
|
+
const wipMap$3 = /* @__PURE__ */ new WeakMap();
|
|
32032
32046
|
function ssrTransformSuspense(node, context) {
|
|
32033
32047
|
return () => {
|
|
32034
32048
|
if (node.children.length) {
|
|
@@ -32037,29 +32051,33 @@ function ssrTransformSuspense(node, context) {
|
|
|
32037
32051
|
// to be immediately set
|
|
32038
32052
|
wipSlots: []
|
|
32039
32053
|
};
|
|
32040
|
-
wipMap$
|
|
32041
|
-
wipEntry.slotsExp = buildSlots(
|
|
32042
|
-
|
|
32043
|
-
|
|
32044
|
-
|
|
32045
|
-
|
|
32046
|
-
|
|
32047
|
-
|
|
32048
|
-
|
|
32049
|
-
|
|
32050
|
-
|
|
32051
|
-
|
|
32052
|
-
|
|
32053
|
-
|
|
32054
|
-
|
|
32055
|
-
|
|
32056
|
-
|
|
32057
|
-
|
|
32054
|
+
wipMap$3.set(node, wipEntry);
|
|
32055
|
+
wipEntry.slotsExp = buildSlots(
|
|
32056
|
+
node,
|
|
32057
|
+
context,
|
|
32058
|
+
(_props, _vForExp, children, loc) => {
|
|
32059
|
+
const fn = createFunctionExpression(
|
|
32060
|
+
[],
|
|
32061
|
+
void 0,
|
|
32062
|
+
// no return, assign body later
|
|
32063
|
+
true,
|
|
32064
|
+
// newline
|
|
32065
|
+
false,
|
|
32066
|
+
// suspense slots are not treated as normal slots
|
|
32067
|
+
loc
|
|
32068
|
+
);
|
|
32069
|
+
wipEntry.wipSlots.push({
|
|
32070
|
+
fn,
|
|
32071
|
+
children
|
|
32072
|
+
});
|
|
32073
|
+
return fn;
|
|
32074
|
+
}
|
|
32075
|
+
).slots;
|
|
32058
32076
|
}
|
|
32059
32077
|
};
|
|
32060
32078
|
}
|
|
32061
32079
|
function ssrProcessSuspense(node, context) {
|
|
32062
|
-
const wipEntry = wipMap$
|
|
32080
|
+
const wipEntry = wipMap$3.get(node);
|
|
32063
32081
|
if (!wipEntry) {
|
|
32064
32082
|
return;
|
|
32065
32083
|
}
|
|
@@ -32365,7 +32383,7 @@ function ssrProcessElement(node, context) {
|
|
|
32365
32383
|
}
|
|
32366
32384
|
}
|
|
32367
32385
|
|
|
32368
|
-
const wipMap$
|
|
32386
|
+
const wipMap$2 = /* @__PURE__ */ new WeakMap();
|
|
32369
32387
|
function ssrTransformTransitionGroup(node, context) {
|
|
32370
32388
|
return () => {
|
|
32371
32389
|
const tag = findProp(node, "tag");
|
|
@@ -32386,23 +32404,27 @@ function ssrTransformTransitionGroup(node, context) {
|
|
|
32386
32404
|
buildSSRProps(props, directives, context)
|
|
32387
32405
|
]);
|
|
32388
32406
|
}
|
|
32389
|
-
wipMap$
|
|
32407
|
+
wipMap$2.set(node, {
|
|
32390
32408
|
tag,
|
|
32391
|
-
propsExp
|
|
32409
|
+
propsExp,
|
|
32410
|
+
scopeId: context.scopeId || null
|
|
32392
32411
|
});
|
|
32393
32412
|
}
|
|
32394
32413
|
};
|
|
32395
32414
|
}
|
|
32396
32415
|
function ssrProcessTransitionGroup(node, context) {
|
|
32397
|
-
const entry = wipMap$
|
|
32416
|
+
const entry = wipMap$2.get(node);
|
|
32398
32417
|
if (entry) {
|
|
32399
|
-
const { tag, propsExp } = entry;
|
|
32418
|
+
const { tag, propsExp, scopeId } = entry;
|
|
32400
32419
|
if (tag.type === 7) {
|
|
32401
32420
|
context.pushStringPart(`<`);
|
|
32402
32421
|
context.pushStringPart(tag.exp);
|
|
32403
32422
|
if (propsExp) {
|
|
32404
32423
|
context.pushStringPart(propsExp);
|
|
32405
32424
|
}
|
|
32425
|
+
if (scopeId) {
|
|
32426
|
+
context.pushStringPart(` ${scopeId}`);
|
|
32427
|
+
}
|
|
32406
32428
|
context.pushStringPart(`>`);
|
|
32407
32429
|
processChildren(
|
|
32408
32430
|
node,
|
|
@@ -32424,6 +32446,9 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
32424
32446
|
if (propsExp) {
|
|
32425
32447
|
context.pushStringPart(propsExp);
|
|
32426
32448
|
}
|
|
32449
|
+
if (scopeId) {
|
|
32450
|
+
context.pushStringPart(` ${scopeId}`);
|
|
32451
|
+
}
|
|
32427
32452
|
context.pushStringPart(`>`);
|
|
32428
32453
|
processChildren(node, context, false, true);
|
|
32429
32454
|
context.pushStringPart(`</${tag.value.content}>`);
|
|
@@ -32433,6 +32458,25 @@ function ssrProcessTransitionGroup(node, context) {
|
|
|
32433
32458
|
}
|
|
32434
32459
|
}
|
|
32435
32460
|
|
|
32461
|
+
const wipMap$1 = /* @__PURE__ */ new WeakMap();
|
|
32462
|
+
function ssrTransformTransition(node, context) {
|
|
32463
|
+
return () => {
|
|
32464
|
+
const appear = findProp(node, "appear", false, true);
|
|
32465
|
+
wipMap$1.set(node, !!appear);
|
|
32466
|
+
};
|
|
32467
|
+
}
|
|
32468
|
+
function ssrProcessTransition(node, context) {
|
|
32469
|
+
node.children = node.children.filter((c) => c.type !== 3);
|
|
32470
|
+
const appear = wipMap$1.get(node);
|
|
32471
|
+
if (appear) {
|
|
32472
|
+
context.pushStringPart(`<template>`);
|
|
32473
|
+
processChildren(node, context, false, true);
|
|
32474
|
+
context.pushStringPart(`</template>`);
|
|
32475
|
+
} else {
|
|
32476
|
+
processChildren(node, context, false, true);
|
|
32477
|
+
}
|
|
32478
|
+
}
|
|
32479
|
+
|
|
32436
32480
|
var __defProp$8 = Object.defineProperty;
|
|
32437
32481
|
var __defProps$8 = Object.defineProperties;
|
|
32438
32482
|
var __getOwnPropDescs$8 = Object.getOwnPropertyDescriptors;
|
|
@@ -32470,9 +32514,10 @@ const ssrTransformComponent = (node, context) => {
|
|
|
32470
32514
|
if (isSymbol$1(component)) {
|
|
32471
32515
|
if (component === SUSPENSE) {
|
|
32472
32516
|
return ssrTransformSuspense(node, context);
|
|
32473
|
-
}
|
|
32474
|
-
if (component === TRANSITION_GROUP) {
|
|
32517
|
+
} else if (component === TRANSITION_GROUP) {
|
|
32475
32518
|
return ssrTransformTransitionGroup(node, context);
|
|
32519
|
+
} else if (component === TRANSITION) {
|
|
32520
|
+
return ssrTransformTransition(node);
|
|
32476
32521
|
}
|
|
32477
32522
|
return;
|
|
32478
32523
|
}
|
|
@@ -32480,8 +32525,10 @@ const ssrTransformComponent = (node, context) => {
|
|
|
32480
32525
|
const clonedNode = clone(node);
|
|
32481
32526
|
return function ssrPostTransformComponent() {
|
|
32482
32527
|
if (clonedNode.children.length) {
|
|
32483
|
-
buildSlots(clonedNode, context, (props, children) => {
|
|
32484
|
-
vnodeBranches.push(
|
|
32528
|
+
buildSlots(clonedNode, context, (props, vFor, children) => {
|
|
32529
|
+
vnodeBranches.push(
|
|
32530
|
+
createVNodeSlotBranch(props, vFor, children, context)
|
|
32531
|
+
);
|
|
32485
32532
|
return createFunctionExpression(void 0);
|
|
32486
32533
|
});
|
|
32487
32534
|
}
|
|
@@ -32500,7 +32547,7 @@ const ssrTransformComponent = (node, context) => {
|
|
|
32500
32547
|
}
|
|
32501
32548
|
const wipEntries = [];
|
|
32502
32549
|
wipMap.set(node, wipEntries);
|
|
32503
|
-
const buildSSRSlotFn = (props, children, loc) => {
|
|
32550
|
+
const buildSSRSlotFn = (props, _vForExp, children, loc) => {
|
|
32504
32551
|
const param0 = props && stringifyExpression(props) || `_`;
|
|
32505
32552
|
const fn = createFunctionExpression(
|
|
32506
32553
|
[param0, `_push`, `_parent`, `_scopeId`],
|
|
@@ -32557,7 +32604,7 @@ function ssrProcessComponent(node, context, parent) {
|
|
|
32557
32604
|
context.pushStringPart(``);
|
|
32558
32605
|
}
|
|
32559
32606
|
if (component === TRANSITION) {
|
|
32560
|
-
|
|
32607
|
+
return ssrProcessTransition(node, context);
|
|
32561
32608
|
}
|
|
32562
32609
|
processChildren(node, context);
|
|
32563
32610
|
}
|
|
@@ -32593,7 +32640,7 @@ const rawOptionsMap = /* @__PURE__ */ new WeakMap();
|
|
|
32593
32640
|
const [baseNodeTransforms, baseDirectiveTransforms] = getBaseTransformPreset(true);
|
|
32594
32641
|
const vnodeNodeTransforms = [...baseNodeTransforms, ...DOMNodeTransforms];
|
|
32595
32642
|
const vnodeDirectiveTransforms = __spreadValues$8(__spreadValues$8({}, baseDirectiveTransforms), DOMDirectiveTransforms);
|
|
32596
|
-
function createVNodeSlotBranch(props, children, parentContext) {
|
|
32643
|
+
function createVNodeSlotBranch(props, vForExp, children, parentContext) {
|
|
32597
32644
|
const rawOptions = rawOptionsMap.get(parentContext.root);
|
|
32598
32645
|
const subOptions = __spreadProps$8(__spreadValues$8({}, rawOptions), {
|
|
32599
32646
|
// overwrite with vnode-based transforms
|
|
@@ -32609,8 +32656,8 @@ function createVNodeSlotBranch(props, children, parentContext) {
|
|
|
32609
32656
|
tag: "template",
|
|
32610
32657
|
tagType: 3,
|
|
32611
32658
|
isSelfClosing: false,
|
|
32612
|
-
// important: provide v-slot="props" on the wrapper for
|
|
32613
|
-
// scope analysis
|
|
32659
|
+
// important: provide v-slot="props" and v-for="exp" on the wrapper for
|
|
32660
|
+
// proper scope analysis
|
|
32614
32661
|
props: [
|
|
32615
32662
|
{
|
|
32616
32663
|
type: 7,
|
|
@@ -32619,6 +32666,14 @@ function createVNodeSlotBranch(props, children, parentContext) {
|
|
|
32619
32666
|
arg: void 0,
|
|
32620
32667
|
modifiers: [],
|
|
32621
32668
|
loc: locStub
|
|
32669
|
+
},
|
|
32670
|
+
{
|
|
32671
|
+
type: 7,
|
|
32672
|
+
name: "for",
|
|
32673
|
+
exp: vForExp,
|
|
32674
|
+
arg: void 0,
|
|
32675
|
+
modifiers: [],
|
|
32676
|
+
loc: locStub
|
|
32622
32677
|
}
|
|
32623
32678
|
],
|
|
32624
32679
|
children,
|
|
@@ -32824,6 +32879,38 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
32824
32879
|
);
|
|
32825
32880
|
}
|
|
32826
32881
|
}
|
|
32882
|
+
function processOption(plainNode) {
|
|
32883
|
+
if (plainNode.tag === "option") {
|
|
32884
|
+
if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
|
|
32885
|
+
const value = findValueBinding(plainNode);
|
|
32886
|
+
plainNode.ssrCodegenNode.elements.push(
|
|
32887
|
+
createConditionalExpression(
|
|
32888
|
+
createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
|
|
32889
|
+
createConditionalExpression(
|
|
32890
|
+
createCallExpression(`Array.isArray`, [model]),
|
|
32891
|
+
createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
|
|
32892
|
+
model,
|
|
32893
|
+
value
|
|
32894
|
+
]),
|
|
32895
|
+
createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
|
|
32896
|
+
model,
|
|
32897
|
+
value
|
|
32898
|
+
])
|
|
32899
|
+
)
|
|
32900
|
+
]),
|
|
32901
|
+
createSimpleExpression(" selected", true),
|
|
32902
|
+
createSimpleExpression("", true),
|
|
32903
|
+
false
|
|
32904
|
+
/* no newline */
|
|
32905
|
+
)
|
|
32906
|
+
);
|
|
32907
|
+
}
|
|
32908
|
+
} else if (plainNode.tag === "optgroup") {
|
|
32909
|
+
plainNode.children.forEach(
|
|
32910
|
+
(option) => processOption(option)
|
|
32911
|
+
);
|
|
32912
|
+
}
|
|
32913
|
+
}
|
|
32827
32914
|
if (node.tagType === 0) {
|
|
32828
32915
|
const res = { props: [] };
|
|
32829
32916
|
const defaultProps = [
|
|
@@ -32906,33 +32993,9 @@ const ssrTransformModel = (dir, node, context) => {
|
|
|
32906
32993
|
checkDuplicatedValue();
|
|
32907
32994
|
node.children = [createInterpolation(model, model.loc)];
|
|
32908
32995
|
} else if (node.tag === "select") {
|
|
32909
|
-
node.children.forEach((
|
|
32910
|
-
if (
|
|
32911
|
-
|
|
32912
|
-
if (plainNode.props.findIndex((p) => p.name === "selected") === -1) {
|
|
32913
|
-
const value = findValueBinding(plainNode);
|
|
32914
|
-
plainNode.ssrCodegenNode.elements.push(
|
|
32915
|
-
createConditionalExpression(
|
|
32916
|
-
createCallExpression(context.helper(SSR_INCLUDE_BOOLEAN_ATTR), [
|
|
32917
|
-
createConditionalExpression(
|
|
32918
|
-
createCallExpression(`Array.isArray`, [model]),
|
|
32919
|
-
createCallExpression(context.helper(SSR_LOOSE_CONTAIN), [
|
|
32920
|
-
model,
|
|
32921
|
-
value
|
|
32922
|
-
]),
|
|
32923
|
-
createCallExpression(context.helper(SSR_LOOSE_EQUAL), [
|
|
32924
|
-
model,
|
|
32925
|
-
value
|
|
32926
|
-
])
|
|
32927
|
-
)
|
|
32928
|
-
]),
|
|
32929
|
-
createSimpleExpression(" selected", true),
|
|
32930
|
-
createSimpleExpression("", true),
|
|
32931
|
-
false
|
|
32932
|
-
/* no newline */
|
|
32933
|
-
)
|
|
32934
|
-
);
|
|
32935
|
-
}
|
|
32996
|
+
node.children.forEach((child) => {
|
|
32997
|
+
if (child.type === 1) {
|
|
32998
|
+
processOption(child);
|
|
32936
32999
|
}
|
|
32937
33000
|
});
|
|
32938
33001
|
} else {
|
|
@@ -33292,6 +33355,7 @@ function doCompileTemplate({
|
|
|
33292
33355
|
slotted,
|
|
33293
33356
|
sourceMap: true
|
|
33294
33357
|
}, compilerOptions), {
|
|
33358
|
+
hmr: !isProd,
|
|
33295
33359
|
nodeTransforms: nodeTransforms.concat(compilerOptions.nodeTransforms || []),
|
|
33296
33360
|
filename,
|
|
33297
33361
|
onError: (e) => errors.push(e),
|
|
@@ -46859,6 +46923,7 @@ var __spreadValues$2 = (a, b) => {
|
|
|
46859
46923
|
var __spreadProps$2 = (a, b) => __defProps$2(a, __getOwnPropDescs$2(b));
|
|
46860
46924
|
const normalScriptDefaultVar = `__default__`;
|
|
46861
46925
|
function processNormalScript(ctx, scopeId) {
|
|
46926
|
+
var _a;
|
|
46862
46927
|
const script = ctx.descriptor.script;
|
|
46863
46928
|
if (script.lang && !ctx.isJS && !ctx.isTS) {
|
|
46864
46929
|
return script;
|
|
@@ -46897,7 +46962,7 @@ function processNormalScript(ctx, scopeId) {
|
|
|
46897
46962
|
const s = new MagicString(content);
|
|
46898
46963
|
rewriteDefaultAST(scriptAst.body, s, defaultVar);
|
|
46899
46964
|
content = s.toString();
|
|
46900
|
-
if (cssVars.length) {
|
|
46965
|
+
if (cssVars.length && !((_a = ctx.options.templateOptions) == null ? void 0 : _a.ssr)) {
|
|
46901
46966
|
content += genNormalScriptCssVarsCode(
|
|
46902
46967
|
cssVars,
|
|
46903
46968
|
bindings,
|
|
@@ -46944,7 +47009,7 @@ class ScriptCompileContext {
|
|
|
46944
47009
|
this.hasDefineModelCall = false;
|
|
46945
47010
|
this.propsDestructuredBindings = /* @__PURE__ */ Object.create(null);
|
|
46946
47011
|
// defineModel
|
|
46947
|
-
this.modelDecls =
|
|
47012
|
+
this.modelDecls = /* @__PURE__ */ Object.create(null);
|
|
46948
47013
|
// codegen
|
|
46949
47014
|
this.bindingMetadata = {};
|
|
46950
47015
|
this.helperImports = /* @__PURE__ */ new Set();
|
|
@@ -47567,7 +47632,7 @@ function importSourceToScope(ctx, node, scope, source) {
|
|
|
47567
47632
|
let resolved = scope.resolvedImportSources[source];
|
|
47568
47633
|
if (!resolved) {
|
|
47569
47634
|
if (source.startsWith(".")) {
|
|
47570
|
-
const filename = joinPaths(scope.filename,
|
|
47635
|
+
const filename = joinPaths(dirname$2(scope.filename), source);
|
|
47571
47636
|
resolved = resolveExt(filename, fs);
|
|
47572
47637
|
} else {
|
|
47573
47638
|
{
|
|
@@ -49331,7 +49396,7 @@ const ${normalScriptDefaultVar} = ${defaultSpecifier.local.name}
|
|
|
49331
49396
|
}
|
|
49332
49397
|
}
|
|
49333
49398
|
if (sfc.cssVars.length && // no need to do this when targeting SSR
|
|
49334
|
-
!(
|
|
49399
|
+
!((_a = options.templateOptions) == null ? void 0 : _a.ssr)) {
|
|
49335
49400
|
ctx.helperImports.add(CSS_VARS_HELPER);
|
|
49336
49401
|
ctx.helperImports.add("unref");
|
|
49337
49402
|
ctx.s.prependLeft(
|
|
@@ -49712,7 +49777,7 @@ function isStaticNode(node) {
|
|
|
49712
49777
|
return false;
|
|
49713
49778
|
}
|
|
49714
49779
|
|
|
49715
|
-
const version = "3.3.
|
|
49780
|
+
const version = "3.3.7";
|
|
49716
49781
|
const walk = walk$1;
|
|
49717
49782
|
|
|
49718
49783
|
export { MagicString, parse_1$1 as babelParse, compileScript, compileStyle, compileStyleAsync, compileTemplate, extractIdentifiers, generateCodeFrame, inferRuntimeType, invalidateTypeCache, isInDestructureAssignment, isStaticProperty, parse$7 as parse, parseCache, registerTS, resolveTypeElements, rewriteDefault, rewriteDefaultAST, shouldTransform as shouldTransformRef, transform as transformRef, transformAST as transformRefAST, version, walk, walkIdentifiers };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/compiler-sfc",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.7",
|
|
4
4
|
"description": "@vue/compiler-sfc",
|
|
5
5
|
"main": "dist/compiler-sfc.cjs.js",
|
|
6
6
|
"module": "dist/compiler-sfc.esm-browser.js",
|
|
@@ -33,11 +33,11 @@
|
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/compiler-sfc#readme",
|
|
34
34
|
"dependencies": {
|
|
35
35
|
"@babel/parser": "^7.23.0",
|
|
36
|
-
"@vue/compiler-core": "3.3.
|
|
37
|
-
"@vue/compiler-dom": "3.3.
|
|
38
|
-
"@vue/compiler-ssr": "3.3.
|
|
39
|
-
"@vue/reactivity-transform": "3.3.
|
|
40
|
-
"@vue/shared": "3.3.
|
|
36
|
+
"@vue/compiler-core": "3.3.7",
|
|
37
|
+
"@vue/compiler-dom": "3.3.7",
|
|
38
|
+
"@vue/compiler-ssr": "3.3.7",
|
|
39
|
+
"@vue/reactivity-transform": "3.3.7",
|
|
40
|
+
"@vue/shared": "3.3.7",
|
|
41
41
|
"estree-walker": "^2.0.2",
|
|
42
42
|
"magic-string": "^0.30.5",
|
|
43
43
|
"postcss": "^8.4.31",
|
|
@@ -45,7 +45,6 @@
|
|
|
45
45
|
},
|
|
46
46
|
"devDependencies": {
|
|
47
47
|
"@babel/types": "^7.23.0",
|
|
48
|
-
"@types/estree": "^0.0.52",
|
|
49
48
|
"@vue/consolidate": "^0.17.3",
|
|
50
49
|
"hash-sum": "^2.0.0",
|
|
51
50
|
"lru-cache": "^10.0.1",
|