@dcloudio/uni-cli-shared 3.0.0-5000720260410001 → 3.0.0-5010520260709001
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/constants.d.ts +1 -3
- package/dist/constants.js +2 -6
- package/dist/deps.d.ts +1 -0
- package/dist/deps.js +22 -13
- package/dist/dom2/fontFamily.d.ts +4 -0
- package/dist/dom2/fontFamily.js +21 -0
- package/dist/dom2/index.d.ts +3 -0
- package/dist/dom2/index.js +3 -0
- package/dist/dom2/rootScrollView.d.ts +47 -0
- package/dist/dom2/rootScrollView.js +283 -0
- package/dist/dom2/sharedData.d.ts +4 -0
- package/dist/dom2/sharedData.js +40 -5
- package/dist/dom2/vue.d.ts +16 -0
- package/dist/dom2/vue.js +37 -0
- package/dist/easycom.d.ts +1 -0
- package/dist/easycom.js +23 -9
- package/dist/env/define.d.ts +0 -1
- package/dist/env/define.js +3 -11
- package/dist/hbx/alias.js +64 -10
- package/dist/hbx/log.js +9 -2
- package/dist/index.d.ts +2 -1
- package/dist/index.js +3 -1
- package/dist/json/app/manifest/plus.js +9 -1
- package/dist/json/app/pages/definePage.js +3 -1
- package/dist/json/index.d.ts +1 -1
- package/dist/json/index.js +2 -1
- package/dist/json/mp/index.d.ts +2 -0
- package/dist/json/mp/index.js +23 -1
- package/dist/json/mp/jsonFile.d.ts +3 -2
- package/dist/json/mp/jsonFile.js +83 -13
- package/dist/json/mp/pages.d.ts +1 -0
- package/dist/json/mp/pages.js +6 -2
- package/dist/json/mp/subpackage.d.ts +26 -0
- package/dist/json/mp/subpackage.js +236 -0
- package/dist/json/uni-x/index.d.ts +6 -0
- package/dist/json/uni-x/index.js +54 -1
- package/dist/json/uni-x/manifest.d.ts +1 -1
- package/dist/json/uni-x/manifest.js +2 -1
- package/dist/json/utils.js +24 -0
- package/dist/logs/console.js +4 -1
- package/dist/messages/en.d.ts +11 -2
- package/dist/messages/en.js +11 -2
- package/dist/messages/index.d.ts +22 -4
- package/dist/messages/zh_CN.d.ts +11 -2
- package/dist/messages/zh_CN.js +11 -2
- package/dist/mp/style.js +6 -2
- package/dist/mp/usingComponents.d.ts +7 -5
- package/dist/mp/usingComponents.js +63 -34
- package/dist/postcss/plugins/stylePluginExternal.d.ts +9 -10
- package/dist/postcss/plugins/stylePluginExternal.js +51 -45
- package/dist/resolve.d.ts +1 -0
- package/dist/resolve.js +9 -2
- package/dist/uni_modules.cloud.d.ts +7 -1
- package/dist/uni_modules.cloud.js +131 -14
- package/dist/uni_modules.js +3 -2
- package/dist/utils.js +5 -0
- package/dist/uts.d.ts +1 -0
- package/dist/uts.js +90 -6
- package/dist/vite/autoImport.js +7 -4
- package/dist/vite/cloud.js +13 -6
- package/dist/vite/extApi.js +4 -1
- package/dist/vite/plugins/cssScoped.js +11 -2
- package/dist/vite/plugins/easycom.js +3 -1
- package/dist/vite/plugins/inject.js +11 -3
- package/dist/vite/plugins/json.js +2 -69
- package/dist/vite/plugins/jsonJs.js +41 -3
- package/dist/vite/plugins/pre.js +2 -0
- package/dist/vite/plugins/sfc.js +4 -1
- package/dist/vite/plugins/stats.d.ts +5 -1
- package/dist/vite/plugins/stats.js +74 -3
- package/dist/vite/plugins/uts/uni_modules.d.ts +1 -1
- package/dist/vite/plugins/uts/uni_modules.js +30 -12
- package/dist/vite/plugins/vitejs/plugins/asset.js +14 -1
- package/dist/vite/plugins/vitejs/plugins/css.d.ts +2 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +45 -6
- package/dist/vue/transforms/index.d.ts +1 -0
- package/dist/vue/transforms/index.js +2 -1
- package/dist/vue/transforms/transformTeleport.d.ts +2 -0
- package/dist/vue/transforms/transformTeleport.js +68 -0
- package/dist/vue/transforms/x/transformDirection.js +33 -4
- package/dist/workers.d.ts +1 -0
- package/dist/workers.js +12 -5
- package/dist/x.d.ts +11 -0
- package/dist/x.js +43 -0
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.cjs +0 -7
- package/lib/dom2/app/@vitejs/plugin-vue/dist/index.mjs +0 -7
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.js +58 -63
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.cjs.prod.js +58 -63
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.d.ts +7 -1
- package/lib/dom2/app/@vue/compiler-core/dist/compiler-core.esm-bundler.js +22 -47
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.js +12 -23
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +12 -22
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.js +23 -74
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-browser.prod.js +5 -5
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.esm-bundler.js +3 -20
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.js +310 -363
- package/lib/dom2/app/@vue/compiler-dom/dist/compiler-dom.global.prod.js +5 -5
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.cjs.js +810 -579
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.d.ts +33 -11114
- package/lib/dom2/app/@vue/compiler-sfc/dist/compiler-sfc.esm-browser.js +1638 -1250
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.cjs.js +1031 -599
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.d.ts +470 -328
- package/lib/dom2/app/@vue/compiler-vapor/dist/compiler-vapor.esm-browser.js +1154 -709
- package/lib/dom2/app/@vue/compiler-vapor-dom2/dist/compiler-vapor-dom2.cjs.js +1 -1
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.js +16 -25
- package/lib/dom2/app/@vue/shared/dist/shared.cjs.prod.js +16 -25
- package/lib/dom2/app/@vue/shared/dist/shared.d.ts +5 -0
- package/lib/dom2/app/@vue/shared/dist/shared.esm-bundler.js +11 -23
- package/package.json +6 -6
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-vapor v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-vapor v3.6.0-beta.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
//#region \0rolldown/runtime.js
|
|
7
|
-
var __commonJSMin = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
|
|
8
|
-
|
|
7
|
+
var __commonJSMin = (cb, mod) => () => (mod || (cb((mod = { exports: {} }).exports, mod), cb = null), mod.exports);
|
|
9
8
|
//#endregion
|
|
10
9
|
//#region packages/shared/src/makeMap.ts
|
|
11
10
|
/**
|
|
@@ -21,15 +20,13 @@ function makeMap(str) {
|
|
|
21
20
|
for (const key of str.split(",")) map[key] = 1;
|
|
22
21
|
return (val) => val in map;
|
|
23
22
|
}
|
|
24
|
-
|
|
25
23
|
//#endregion
|
|
26
24
|
//#region \0polyfill-node.global.js
|
|
27
25
|
var _polyfill_node_global_default = typeof _polyfill_node_global_default !== "undefined" ? _polyfill_node_global_default : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {};
|
|
28
|
-
|
|
29
26
|
//#endregion
|
|
30
27
|
//#region packages/shared/src/general.ts
|
|
31
28
|
const EMPTY_OBJ = Object.freeze({});
|
|
32
|
-
|
|
29
|
+
Object.freeze([]);
|
|
33
30
|
const NOOP = () => {};
|
|
34
31
|
/**
|
|
35
32
|
* Always return false.
|
|
@@ -42,6 +39,7 @@ const remove = (arr, el) => {
|
|
|
42
39
|
};
|
|
43
40
|
const isArray$1 = Array.isArray;
|
|
44
41
|
const isString = (val) => typeof val === "string";
|
|
42
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
45
43
|
const isBuiltInDirective = /* @__PURE__ */ makeMap("bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo");
|
|
46
44
|
const cacheStringFunction = (fn) => {
|
|
47
45
|
const cache = Object.create(null);
|
|
@@ -55,11 +53,6 @@ const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
|
55
53
|
* @private
|
|
56
54
|
*/
|
|
57
55
|
const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
58
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
59
|
-
/**
|
|
60
|
-
* @private
|
|
61
|
-
*/
|
|
62
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
63
56
|
/**
|
|
64
57
|
* @private
|
|
65
58
|
*/
|
|
@@ -88,12 +81,21 @@ function genPropsAccessExp(name) {
|
|
|
88
81
|
function canSetValueDirectly(tagName) {
|
|
89
82
|
return tagName !== "PROGRESS" && !tagName.includes("-");
|
|
90
83
|
}
|
|
91
|
-
|
|
84
|
+
const isGloballyAllowed = /* @__PURE__ */ makeMap("Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt,console,Error,Symbol");
|
|
92
85
|
//#endregion
|
|
93
|
-
//#region packages/shared/src/
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
86
|
+
//#region packages/shared/src/normalizeProp.ts
|
|
87
|
+
function normalizeClass(value) {
|
|
88
|
+
let res = "";
|
|
89
|
+
if (isString(value)) res = value;
|
|
90
|
+
else if (isArray$1(value)) for (let i = 0; i < value.length; i++) {
|
|
91
|
+
const normalized = normalizeClass(value[i]);
|
|
92
|
+
if (normalized) res += normalized + " ";
|
|
93
|
+
}
|
|
94
|
+
else if (isObject(value)) {
|
|
95
|
+
for (const name in value) if (value[name]) res += name + " ";
|
|
96
|
+
}
|
|
97
|
+
return res.trim();
|
|
98
|
+
}
|
|
97
99
|
//#endregion
|
|
98
100
|
//#region packages/shared/src/domTagConfig.ts
|
|
99
101
|
const HTML_TAGS = "html,body,base,head,link,meta,style,title,address,article,aside,footer,header,hgroup,h1,h2,h3,h4,h5,h6,nav,section,div,dd,dl,dt,figcaption,figure,picture,hr,img,li,main,ol,p,pre,ul,a,b,abbr,bdi,bdo,br,cite,code,data,dfn,em,i,kbd,mark,q,rp,rt,ruby,s,samp,small,span,strong,sub,sup,time,u,var,wbr,area,audio,map,track,video,embed,object,param,source,canvas,script,noscript,del,ins,caption,col,colgroup,table,thead,tbody,td,th,tr,button,datalist,fieldset,form,input,label,legend,meter,optgroup,option,output,progress,select,textarea,details,dialog,menu,summary,template,blockquote,iframe,tfoot";
|
|
@@ -144,25 +146,6 @@ const isInlineTag = /* @__PURE__ */ makeMap(INLINE_TAGS);
|
|
|
144
146
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
145
147
|
*/
|
|
146
148
|
const isBlockTag = /* @__PURE__ */ makeMap(BLOCK_TAGS);
|
|
147
|
-
|
|
148
|
-
//#endregion
|
|
149
|
-
//#region packages/shared/src/domAttrConfig.ts
|
|
150
|
-
/**
|
|
151
|
-
* On the client we only need to offer special cases for boolean attributes that
|
|
152
|
-
* have different names from their corresponding dom properties:
|
|
153
|
-
* - itemscope -> N/A
|
|
154
|
-
* - allowfullscreen -> allowFullscreen
|
|
155
|
-
* - formnovalidate -> formNoValidate
|
|
156
|
-
* - ismap -> isMap
|
|
157
|
-
* - nomodule -> noModule
|
|
158
|
-
* - novalidate -> noValidate
|
|
159
|
-
* - readonly -> readOnly
|
|
160
|
-
*/
|
|
161
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
162
|
-
/**
|
|
163
|
-
* The full list is needed during SSR to produce the correct initial markup.
|
|
164
|
-
*/
|
|
165
|
-
const isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + ",async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected");
|
|
166
149
|
function shouldSetAsAttr(tagName, key) {
|
|
167
150
|
if (key === "spellcheck" || key === "draggable" || key === "translate" || key === "autocorrect") return true;
|
|
168
151
|
if (key === "form") return true;
|
|
@@ -172,7 +155,6 @@ function shouldSetAsAttr(tagName, key) {
|
|
|
172
155
|
if (key === "sandbox" && tagName === "IFRAME") return true;
|
|
173
156
|
return false;
|
|
174
157
|
}
|
|
175
|
-
|
|
176
158
|
//#endregion
|
|
177
159
|
//#region packages/shared/src/escapeHtml.ts
|
|
178
160
|
const escapeRE = /["'&<>]/;
|
|
@@ -209,7 +191,6 @@ function escapeHtml(string) {
|
|
|
209
191
|
}
|
|
210
192
|
return lastIndex !== index ? html + str.slice(lastIndex, index) : html;
|
|
211
193
|
}
|
|
212
|
-
|
|
213
194
|
//#endregion
|
|
214
195
|
//#region packages/compiler-core/src/runtimeHelpers.ts
|
|
215
196
|
const FRAGMENT = Symbol(`Fragment`);
|
|
@@ -304,7 +285,6 @@ function registerRuntimeHelpers(helpers) {
|
|
|
304
285
|
helperNameMap[s] = helpers[s];
|
|
305
286
|
});
|
|
306
287
|
}
|
|
307
|
-
|
|
308
288
|
//#endregion
|
|
309
289
|
//#region packages/compiler-core/src/ast.ts
|
|
310
290
|
const locStub = {
|
|
@@ -345,7 +325,6 @@ function createSimpleExpression(content, isStatic = false, loc = locStub, constT
|
|
|
345
325
|
constType: isStatic ? 3 : constType
|
|
346
326
|
};
|
|
347
327
|
}
|
|
348
|
-
|
|
349
328
|
//#endregion
|
|
350
329
|
//#region node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode-codepoint.js
|
|
351
330
|
var _a;
|
|
@@ -402,7 +381,6 @@ function replaceCodePoint(codePoint) {
|
|
|
402
381
|
if (codePoint >= 55296 && codePoint <= 57343 || codePoint > 1114111) return 65533;
|
|
403
382
|
return (_a = decodeMap.get(codePoint)) !== null && _a !== void 0 ? _a : codePoint;
|
|
404
383
|
}
|
|
405
|
-
|
|
406
384
|
//#endregion
|
|
407
385
|
//#region \0polyfill-node.buffer.js
|
|
408
386
|
var lookup = [];
|
|
@@ -558,7 +536,6 @@ var isArray = Array.isArray || function(arr) {
|
|
|
558
536
|
* @author Feross Aboukhadijeh <feross@feross.org> <http://feross.org>
|
|
559
537
|
* @license MIT
|
|
560
538
|
*/
|
|
561
|
-
var INSPECT_MAX_BYTES = 50;
|
|
562
539
|
/**
|
|
563
540
|
* If `Buffer.TYPED_ARRAY_SUPPORT`:
|
|
564
541
|
* === true Use Uint8Array implementation (fastest)
|
|
@@ -584,7 +561,7 @@ var INSPECT_MAX_BYTES = 50;
|
|
|
584
561
|
* get the Object implementation, which is slower but behaves correctly.
|
|
585
562
|
*/
|
|
586
563
|
Buffer$1.TYPED_ARRAY_SUPPORT = _polyfill_node_global_default.TYPED_ARRAY_SUPPORT !== void 0 ? _polyfill_node_global_default.TYPED_ARRAY_SUPPORT : true;
|
|
587
|
-
|
|
564
|
+
kMaxLength();
|
|
588
565
|
function kMaxLength() {
|
|
589
566
|
return Buffer$1.TYPED_ARRAY_SUPPORT ? 2147483647 : 1073741823;
|
|
590
567
|
}
|
|
@@ -879,7 +856,7 @@ Buffer$1.prototype.equals = function equals(b) {
|
|
|
879
856
|
};
|
|
880
857
|
Buffer$1.prototype.inspect = function inspect() {
|
|
881
858
|
var str = "";
|
|
882
|
-
var max =
|
|
859
|
+
var max = 50;
|
|
883
860
|
if (this.length > 0) {
|
|
884
861
|
str = this.toString("hex", 0, max).match(/.{2}/g).join(" ");
|
|
885
862
|
if (this.length > max) str += " ... ";
|
|
@@ -1652,7 +1629,6 @@ function isFastBuffer(obj) {
|
|
|
1652
1629
|
function isSlowBuffer(obj) {
|
|
1653
1630
|
return typeof obj.readFloatLE === "function" && typeof obj.slice === "function" && isFastBuffer(obj.slice(0, 0));
|
|
1654
1631
|
}
|
|
1655
|
-
|
|
1656
1632
|
//#endregion
|
|
1657
1633
|
//#region node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/decode-shared.js
|
|
1658
1634
|
function decodeBase64(input) {
|
|
@@ -1666,11 +1642,9 @@ function decodeBase64(input) {
|
|
|
1666
1642
|
}
|
|
1667
1643
|
return out;
|
|
1668
1644
|
}
|
|
1669
|
-
|
|
1670
1645
|
//#endregion
|
|
1671
1646
|
//#region node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/generated/decode-data-html.js
|
|
1672
1647
|
const htmlDecodeTree = /* @__PURE__ */ decodeBase64("QR08ALkAAgH6AYsDNQR2BO0EPgXZBQEGLAbdBxMISQrvCmQLfQurDKQNLw4fD4YPpA+6D/IPAAAAAAAAAAAAAAAAKhBMEY8TmxUWF2EYLBkxGuAa3RsJHDscWR8YIC8jSCSIJcMl6ie3Ku8rEC0CLjoupS7kLgAIRU1hYmNmZ2xtbm9wcnN0dVQAWgBeAGUAaQBzAHcAfgCBAIQAhwCSAJoAoACsALMAbABpAGcAO4DGAMZAUAA7gCYAJkBjAHUAdABlADuAwQDBQHIiZXZlAAJhAAFpeW0AcgByAGMAO4DCAMJAEGRyAADgNdgE3XIAYQB2AGUAO4DAAMBA8CFoYZFj4SFjcgBhZAAAoFMqAAFncIsAjgBvAG4ABGFmAADgNdg43fAlbHlGdW5jdGlvbgCgYSBpAG4AZwA7gMUAxUAAAWNzpACoAHIAAOA12Jzc6SFnbgCgVCJpAGwAZABlADuAwwDDQG0AbAA7gMQAxEAABGFjZWZvcnN1xQDYANoA7QDxAPYA+QD8AAABY3LJAM8AayNzbGFzaAAAoBYidgHTANUAAKDnKmUAZAAAoAYjeQARZIABY3J0AOAA5QDrAGEidXNlAACgNSLuI291bGxpcwCgLCFhAJJjcgAA4DXYBd1wAGYAAOA12Dnd5SF2ZdhiYwDyAOoAbSJwZXEAAKBOIgAHSE9hY2RlZmhpbG9yc3UXARoBHwE6AVIBVQFiAWQBZgGCAakB6QHtAfIBYwB5ACdkUABZADuAqQCpQIABY3B5ACUBKAE1AfUhdGUGYWmg0iJ0KGFsRGlmZmVyZW50aWFsRAAAoEUhbCJleXMAAKAt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
1649
|
//#region node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/internal/bin-trie-flags.js
|
|
1676
1650
|
/**
|
|
@@ -1690,7 +1664,6 @@ var BinTrieFlags;
|
|
|
1690
1664
|
BinTrieFlags[BinTrieFlags["BRANCH_LENGTH"] = 8064] = "BRANCH_LENGTH";
|
|
1691
1665
|
BinTrieFlags[BinTrieFlags["JUMP_TABLE"] = 127] = "JUMP_TABLE";
|
|
1692
1666
|
})(BinTrieFlags || (BinTrieFlags = {}));
|
|
1693
|
-
|
|
1694
1667
|
//#endregion
|
|
1695
1668
|
//#region node_modules/.pnpm/entities@7.0.1/node_modules/entities/dist/esm/decode.js
|
|
1696
1669
|
var CharCodes;
|
|
@@ -2076,7 +2049,6 @@ const htmlDecoder = /* @__PURE__ */ getDecoder(htmlDecodeTree);
|
|
|
2076
2049
|
function decodeHTML(htmlString, mode = DecodingMode.Legacy) {
|
|
2077
2050
|
return htmlDecoder(htmlString, mode);
|
|
2078
2051
|
}
|
|
2079
|
-
|
|
2080
2052
|
//#endregion
|
|
2081
2053
|
//#region packages/compiler-core/src/tokenizer.ts
|
|
2082
2054
|
/**
|
|
@@ -2824,7 +2796,6 @@ var Tokenizer = class {
|
|
|
2824
2796
|
}
|
|
2825
2797
|
}
|
|
2826
2798
|
};
|
|
2827
|
-
|
|
2828
2799
|
//#endregion
|
|
2829
2800
|
//#region packages/compiler-core/src/errors.ts
|
|
2830
2801
|
function defaultOnError(error) {
|
|
@@ -2897,10 +2868,9 @@ const errorMessages = {
|
|
|
2897
2868
|
[51]: `"scopeId" option is only supported in module mode.`,
|
|
2898
2869
|
[54]: ``
|
|
2899
2870
|
};
|
|
2900
|
-
|
|
2901
2871
|
//#endregion
|
|
2902
|
-
//#region node_modules/.pnpm
|
|
2903
|
-
var
|
|
2872
|
+
//#region node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
|
|
2873
|
+
var import_lib = (/* @__PURE__ */ __commonJSMin(((exports) => {
|
|
2904
2874
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
2905
2875
|
function _objectWithoutPropertiesLoose(r, e) {
|
|
2906
2876
|
if (null == r) return {};
|
|
@@ -3220,11 +3190,10 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
3220
3190
|
for (const reasonCode of Object.keys(argument)) {
|
|
3221
3191
|
const template = argument[reasonCode];
|
|
3222
3192
|
const _ref = typeof template === "string" ? { message: () => template } : typeof template === "function" ? { message: template } : template, { message } = _ref, rest = _objectWithoutPropertiesLoose(_ref, _excluded);
|
|
3223
|
-
const toMessage = typeof message === "string" ? () => message : message;
|
|
3224
3193
|
ParseErrorConstructors[reasonCode] = toParseErrorConstructor(Object.assign({
|
|
3225
3194
|
code: "BABEL_PARSER_SYNTAX_ERROR",
|
|
3226
3195
|
reasonCode,
|
|
3227
|
-
toMessage
|
|
3196
|
+
toMessage: typeof message === "string" ? () => message : message
|
|
3228
3197
|
}, syntaxPlugin ? { syntaxPlugin } : {}, rest));
|
|
3229
3198
|
}
|
|
3230
3199
|
return ParseErrorConstructors;
|
|
@@ -5444,7 +5413,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5444
5413
|
}
|
|
5445
5414
|
flowParseDeclareVariable(node) {
|
|
5446
5415
|
this.next();
|
|
5447
|
-
node.id = this.flowParseTypeAnnotatableIdentifier(
|
|
5416
|
+
node.id = this.flowParseTypeAnnotatableIdentifier();
|
|
5448
5417
|
this.scope.declareName(node.id.name, 5, node.id.loc.start);
|
|
5449
5418
|
this.semicolon();
|
|
5450
5419
|
return this.finishNode(node, "DeclareVariable");
|
|
@@ -5588,9 +5557,14 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5588
5557
|
if (!reservedTypes.has(word)) return;
|
|
5589
5558
|
this.raise(declaration ? FlowErrors.AssignReservedType : FlowErrors.UnexpectedReservedType, startLoc, { reservedType: word });
|
|
5590
5559
|
}
|
|
5591
|
-
|
|
5560
|
+
flowParseRestrictedIdentifierName(liberal, declaration) {
|
|
5592
5561
|
this.checkReservedType(this.state.value, this.state.startLoc, declaration);
|
|
5593
|
-
return this.
|
|
5562
|
+
return this.parseIdentifierName(liberal);
|
|
5563
|
+
}
|
|
5564
|
+
flowParseRestrictedIdentifier(liberal, declaration) {
|
|
5565
|
+
const node = this.startNode();
|
|
5566
|
+
const name = this.flowParseRestrictedIdentifierName(liberal, declaration);
|
|
5567
|
+
return this.createIdentifier(node, name);
|
|
5594
5568
|
}
|
|
5595
5569
|
flowParseTypeAlias(node) {
|
|
5596
5570
|
node.id = this.flowParseRestrictedIdentifier(false, true);
|
|
@@ -5614,14 +5588,21 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
5614
5588
|
this.semicolon();
|
|
5615
5589
|
return this.finishNode(node, "OpaqueType");
|
|
5616
5590
|
}
|
|
5591
|
+
flowParseTypeParameterBound() {
|
|
5592
|
+
if (this.match(14) || this.isContextual(81)) {
|
|
5593
|
+
const node = this.startNode();
|
|
5594
|
+
this.next();
|
|
5595
|
+
node.typeAnnotation = this.flowParseType();
|
|
5596
|
+
return this.finishNode(node, "TypeAnnotation");
|
|
5597
|
+
}
|
|
5598
|
+
}
|
|
5617
5599
|
flowParseTypeParameter(requireDefault = false) {
|
|
5618
5600
|
const nodeStartLoc = this.state.startLoc;
|
|
5619
5601
|
const node = this.startNode();
|
|
5620
5602
|
const variance = this.flowParseVariance();
|
|
5621
|
-
|
|
5622
|
-
node.name = ident.name;
|
|
5603
|
+
node.name = this.flowParseRestrictedIdentifierName();
|
|
5623
5604
|
node.variance = variance;
|
|
5624
|
-
node.bound =
|
|
5605
|
+
node.bound = this.flowParseTypeParameterBound();
|
|
5625
5606
|
if (this.match(29)) {
|
|
5626
5607
|
this.eat(29);
|
|
5627
5608
|
node.default = this.flowParseType();
|
|
@@ -6179,13 +6160,11 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
6179
6160
|
node.typeAnnotation = this.flowParseTypeInitialiser();
|
|
6180
6161
|
return this.finishNode(node, "TypeAnnotation");
|
|
6181
6162
|
}
|
|
6182
|
-
flowParseTypeAnnotatableIdentifier(
|
|
6183
|
-
const
|
|
6184
|
-
|
|
6185
|
-
|
|
6186
|
-
|
|
6187
|
-
}
|
|
6188
|
-
return ident;
|
|
6163
|
+
flowParseTypeAnnotatableIdentifier() {
|
|
6164
|
+
const node = this.startNode();
|
|
6165
|
+
const name = this.parseIdentifierName();
|
|
6166
|
+
if (this.match(14)) node.typeAnnotation = this.flowParseTypeAnnotation();
|
|
6167
|
+
return this.createIdentifier(node, name);
|
|
6189
6168
|
}
|
|
6190
6169
|
typeCastToParameter(node) {
|
|
6191
6170
|
node.expression.typeAnnotation = node.typeAnnotation;
|
|
@@ -7981,6 +7960,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7981
7960
|
adjustInnerComments(node, node.properties, commentWS);
|
|
7982
7961
|
break;
|
|
7983
7962
|
case "CallExpression":
|
|
7963
|
+
case "NewExpression":
|
|
7984
7964
|
case "OptionalCallExpression":
|
|
7985
7965
|
adjustInnerComments(node, node.arguments, commentWS);
|
|
7986
7966
|
break;
|
|
@@ -7993,6 +7973,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
7993
7973
|
case "ObjectMethod":
|
|
7994
7974
|
case "ClassMethod":
|
|
7995
7975
|
case "ClassPrivateMethod":
|
|
7976
|
+
case "TSTypeParameterDeclaration":
|
|
7996
7977
|
adjustInnerComments(node, node.params, commentWS);
|
|
7997
7978
|
break;
|
|
7998
7979
|
case "ArrayExpression":
|
|
@@ -8009,6 +7990,9 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
8009
7990
|
case "TSEnumBody":
|
|
8010
7991
|
adjustInnerComments(node, node.members, commentWS);
|
|
8011
7992
|
break;
|
|
7993
|
+
case "TSInterfaceBody":
|
|
7994
|
+
adjustInnerComments(node, node.body, commentWS);
|
|
7995
|
+
break;
|
|
8012
7996
|
default:
|
|
8013
7997
|
if (node.type === "RecordExpression") {
|
|
8014
7998
|
adjustInnerComments(node, node.properties, commentWS);
|
|
@@ -9565,7 +9549,8 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
9565
9549
|
const oldInModule = this.inModule;
|
|
9566
9550
|
this.inModule = inModule;
|
|
9567
9551
|
const oldScope = this.scope;
|
|
9568
|
-
|
|
9552
|
+
const ScopeHandler = this.getScopeHandler();
|
|
9553
|
+
this.scope = new ScopeHandler(this, inModule);
|
|
9569
9554
|
const oldProdParam = this.prodParam;
|
|
9570
9555
|
this.prodParam = new ProductionParameterHandler();
|
|
9571
9556
|
const oldClassScope = this.classScope;
|
|
@@ -13012,7 +12997,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
13012
12997
|
this.resetPreviousNodeTrailingComments(id);
|
|
13013
12998
|
this.next();
|
|
13014
12999
|
return this.parseAsyncFunctionExpression(this.startNodeAtNode(id));
|
|
13015
|
-
} else if (tokenIsIdentifier(type)) if (this.lookaheadCharCode() === 61) return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
|
|
13000
|
+
} else if (tokenIsIdentifier(type)) if (canBeArrow && this.lookaheadCharCode() === 61) return this.parseAsyncArrowUnaryFunction(this.startNodeAtNode(id));
|
|
13016
13001
|
else return id;
|
|
13017
13002
|
else if (type === 90) {
|
|
13018
13003
|
this.resetPreviousNodeTrailingComments(id);
|
|
@@ -15439,7 +15424,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15439
15424
|
for (const typeName of Object.keys(internalTokenTypes)) tokenTypes[typeName] = getExportedToken(internalTokenTypes[typeName]);
|
|
15440
15425
|
return tokenTypes;
|
|
15441
15426
|
}
|
|
15442
|
-
|
|
15427
|
+
generateExportedTokenTypes(tt);
|
|
15443
15428
|
function getParser(options, input) {
|
|
15444
15429
|
let cls = Parser;
|
|
15445
15430
|
const pluginsMap = /* @__PURE__ */ new Map();
|
|
@@ -15470,11 +15455,7 @@ var require_lib = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
15470
15455
|
}
|
|
15471
15456
|
exports.parse = parse;
|
|
15472
15457
|
exports.parseExpression = parseExpression;
|
|
15473
|
-
}));
|
|
15474
|
-
|
|
15475
|
-
//#endregion
|
|
15476
|
-
//#region node_modules/.pnpm/estree-walker@2.0.2/node_modules/estree-walker/dist/esm/estree-walker.js
|
|
15477
|
-
var import_lib = require_lib();
|
|
15458
|
+
})))();
|
|
15478
15459
|
/** @typedef { import('estree').BaseNode} BaseNode */
|
|
15479
15460
|
/** @typedef {{
|
|
15480
15461
|
skip: () => void;
|
|
@@ -15615,7 +15596,6 @@ var SyncWalker = class extends WalkerBase {
|
|
|
15615
15596
|
function walk(ast, { enter, leave }) {
|
|
15616
15597
|
return new SyncWalker(enter, leave).visit(ast, null);
|
|
15617
15598
|
}
|
|
15618
|
-
|
|
15619
15599
|
//#endregion
|
|
15620
15600
|
//#region packages/compiler-core/src/babelUtils.ts
|
|
15621
15601
|
/**
|
|
@@ -15855,7 +15835,6 @@ function isConstantNode(node, bindings) {
|
|
|
15855
15835
|
}
|
|
15856
15836
|
return false;
|
|
15857
15837
|
}
|
|
15858
|
-
|
|
15859
15838
|
//#endregion
|
|
15860
15839
|
//#region packages/compiler-core/src/utils.ts
|
|
15861
15840
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
@@ -15978,7 +15957,6 @@ function isWhitespaceText(node) {
|
|
|
15978
15957
|
function isCommentOrWhitespace(node) {
|
|
15979
15958
|
return node.type === 3 || isWhitespaceText(node);
|
|
15980
15959
|
}
|
|
15981
|
-
|
|
15982
15960
|
//#endregion
|
|
15983
15961
|
//#region packages/compiler-core/src/parser.ts
|
|
15984
15962
|
const defaultParserOptions = {
|
|
@@ -16158,10 +16136,10 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
16158
16136
|
};
|
|
16159
16137
|
if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
|
|
16160
16138
|
} else {
|
|
16161
|
-
let expParseMode =
|
|
16162
|
-
if (currentProp.name === "for") expParseMode =
|
|
16163
|
-
else if (currentProp.name === "slot") expParseMode =
|
|
16164
|
-
else if (currentProp.name === "on" && currentAttrValue.includes(";")) expParseMode =
|
|
16139
|
+
let expParseMode = 0;
|
|
16140
|
+
if (currentProp.name === "for") expParseMode = 3;
|
|
16141
|
+
else if (currentProp.name === "slot") expParseMode = 1;
|
|
16142
|
+
else if (currentProp.name === "on" && currentAttrValue.includes(";")) expParseMode = 2;
|
|
16165
16143
|
currentProp.exp = createExp(currentAttrValue, false, getLoc(currentAttrStartIndex, currentAttrEndIndex), 0, expParseMode);
|
|
16166
16144
|
if (currentProp.name === "for") currentProp.forParseResult = parseForExpression(currentProp.exp);
|
|
16167
16145
|
}
|
|
@@ -16233,7 +16211,7 @@ function parseForExpression(input) {
|
|
|
16233
16211
|
const [, LHS, RHS] = inMatch;
|
|
16234
16212
|
const createAliasExpression = (content, offset, asParam = false) => {
|
|
16235
16213
|
const start = loc.start.offset + offset;
|
|
16236
|
-
return createExp(content, false, getLoc(start, start + content.length), 0, asParam ?
|
|
16214
|
+
return createExp(content, false, getLoc(start, start + content.length), 0, asParam ? 1 : 0);
|
|
16237
16215
|
};
|
|
16238
16216
|
const result = {
|
|
16239
16217
|
source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
|
|
@@ -16438,9 +16416,9 @@ var ExpParseMode = /* @__PURE__ */ function(ExpParseMode) {
|
|
|
16438
16416
|
ExpParseMode[ExpParseMode["Skip"] = 3] = "Skip";
|
|
16439
16417
|
return ExpParseMode;
|
|
16440
16418
|
}(ExpParseMode || {});
|
|
16441
|
-
function createExp(content, isStatic = false, loc, constType = 0, parseMode =
|
|
16419
|
+
function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0) {
|
|
16442
16420
|
const exp = createSimpleExpression(content, isStatic, loc, constType);
|
|
16443
|
-
if (!isStatic && currentOptions.prefixIdentifiers && parseMode !==
|
|
16421
|
+
if (!isStatic && currentOptions.prefixIdentifiers && parseMode !== 3 && content.trim()) {
|
|
16444
16422
|
if (isSimpleIdentifier(content)) {
|
|
16445
16423
|
exp.ast = null;
|
|
16446
16424
|
return exp;
|
|
@@ -16448,8 +16426,8 @@ function createExp(content, isStatic = false, loc, constType = 0, parseMode = Ex
|
|
|
16448
16426
|
try {
|
|
16449
16427
|
const plugins = currentOptions.expressionPlugins;
|
|
16450
16428
|
const options = { plugins: plugins ? [...plugins, "typescript"] : ["typescript"] };
|
|
16451
|
-
if (parseMode ===
|
|
16452
|
-
else if (parseMode ===
|
|
16429
|
+
if (parseMode === 2) exp.ast = (0, import_lib.parse)(` ${content} `, options).program;
|
|
16430
|
+
else if (parseMode === 1) exp.ast = (0, import_lib.parseExpression)(`(${content})=>{}`, options);
|
|
16453
16431
|
else exp.ast = (0, import_lib.parseExpression)(`(${content})`, options);
|
|
16454
16432
|
} catch (e) {
|
|
16455
16433
|
exp.ast = false;
|
|
@@ -16493,14 +16471,12 @@ function baseParse(input, options) {
|
|
|
16493
16471
|
currentRoot = null;
|
|
16494
16472
|
return root;
|
|
16495
16473
|
}
|
|
16496
|
-
|
|
16497
16474
|
//#endregion
|
|
16498
16475
|
//#region packages/compiler-core/src/transform.ts
|
|
16499
16476
|
function getSelfName(filename) {
|
|
16500
16477
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
16501
16478
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
16502
16479
|
}
|
|
16503
|
-
|
|
16504
16480
|
//#endregion
|
|
16505
16481
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64.js
|
|
16506
16482
|
var require_base64 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -16535,7 +16511,6 @@ var require_base64 = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16535
16511
|
return -1;
|
|
16536
16512
|
};
|
|
16537
16513
|
}));
|
|
16538
|
-
|
|
16539
16514
|
//#endregion
|
|
16540
16515
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/base64-vlq.js
|
|
16541
16516
|
var require_base64_vlq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -16601,7 +16576,6 @@ var require_base64_vlq = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16601
16576
|
aOutParam.rest = aIndex;
|
|
16602
16577
|
};
|
|
16603
16578
|
}));
|
|
16604
|
-
|
|
16605
16579
|
//#endregion
|
|
16606
16580
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/util.js
|
|
16607
16581
|
var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -16947,7 +16921,6 @@ var require_util = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
16947
16921
|
}
|
|
16948
16922
|
exports.computeSourceURL = computeSourceURL;
|
|
16949
16923
|
}));
|
|
16950
|
-
|
|
16951
16924
|
//#endregion
|
|
16952
16925
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/array-set.js
|
|
16953
16926
|
var require_array_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -17040,7 +17013,6 @@ var require_array_set = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17040
17013
|
};
|
|
17041
17014
|
exports.ArraySet = ArraySet;
|
|
17042
17015
|
}));
|
|
17043
|
-
|
|
17044
17016
|
//#endregion
|
|
17045
17017
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/mapping-list.js
|
|
17046
17018
|
var require_mapping_list = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -17110,7 +17082,6 @@ var require_mapping_list = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17110
17082
|
};
|
|
17111
17083
|
exports.MappingList = MappingList;
|
|
17112
17084
|
}));
|
|
17113
|
-
|
|
17114
17085
|
//#endregion
|
|
17115
17086
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-generator.js
|
|
17116
17087
|
var require_source_map_generator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -17395,7 +17366,6 @@ var require_source_map_generator = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17395
17366
|
};
|
|
17396
17367
|
exports.SourceMapGenerator = SourceMapGenerator;
|
|
17397
17368
|
}));
|
|
17398
|
-
|
|
17399
17369
|
//#endregion
|
|
17400
17370
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/binary-search.js
|
|
17401
17371
|
var require_binary_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -17457,7 +17427,6 @@ var require_binary_search = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17457
17427
|
return index;
|
|
17458
17428
|
};
|
|
17459
17429
|
}));
|
|
17460
|
-
|
|
17461
17430
|
//#endregion
|
|
17462
17431
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/quick-sort.js
|
|
17463
17432
|
var require_quick_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -17540,7 +17509,6 @@ var require_quick_sort = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
17540
17509
|
doQuickSort(ary, comparator, start, ary.length - 1);
|
|
17541
17510
|
};
|
|
17542
17511
|
}));
|
|
17543
|
-
|
|
17544
17512
|
//#endregion
|
|
17545
17513
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-map-consumer.js
|
|
17546
17514
|
var require_source_map_consumer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -18317,7 +18285,6 @@ var require_source_map_consumer = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18317
18285
|
};
|
|
18318
18286
|
exports.IndexedSourceMapConsumer = IndexedSourceMapConsumer;
|
|
18319
18287
|
}));
|
|
18320
|
-
|
|
18321
18288
|
//#endregion
|
|
18322
18289
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/lib/source-node.js
|
|
18323
18290
|
var require_source_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -18602,7 +18569,6 @@ var require_source_node = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18602
18569
|
};
|
|
18603
18570
|
exports.SourceNode = SourceNode;
|
|
18604
18571
|
}));
|
|
18605
|
-
|
|
18606
18572
|
//#endregion
|
|
18607
18573
|
//#region node_modules/.pnpm/source-map-js@1.2.1/node_modules/source-map-js/source-map.js
|
|
18608
18574
|
var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
@@ -18610,11 +18576,9 @@ var require_source_map = /* @__PURE__ */ __commonJSMin(((exports) => {
|
|
|
18610
18576
|
exports.SourceMapConsumer = require_source_map_consumer().SourceMapConsumer;
|
|
18611
18577
|
exports.SourceNode = require_source_node().SourceNode;
|
|
18612
18578
|
}));
|
|
18613
|
-
|
|
18614
18579
|
//#endregion
|
|
18615
18580
|
//#region packages/compiler-core/src/transforms/transformExpression.ts
|
|
18616
18581
|
const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this");
|
|
18617
|
-
|
|
18618
18582
|
//#endregion
|
|
18619
18583
|
//#region packages/compiler-dom/src/runtimeHelpers.ts
|
|
18620
18584
|
const V_MODEL_RADIO = Symbol(`vModelRadio`);
|
|
@@ -18639,7 +18603,6 @@ registerRuntimeHelpers({
|
|
|
18639
18603
|
[TRANSITION]: `Transition`,
|
|
18640
18604
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
18641
18605
|
});
|
|
18642
|
-
|
|
18643
18606
|
//#endregion
|
|
18644
18607
|
//#region packages/compiler-dom/src/parserOptions.ts
|
|
18645
18608
|
const parserOptions = {
|
|
@@ -18670,7 +18633,6 @@ const parserOptions = {
|
|
|
18670
18633
|
return ns;
|
|
18671
18634
|
}
|
|
18672
18635
|
};
|
|
18673
|
-
|
|
18674
18636
|
//#endregion
|
|
18675
18637
|
//#region packages/compiler-dom/src/errors.ts
|
|
18676
18638
|
function createDOMCompilerError(code, loc) {
|
|
@@ -18690,7 +18652,6 @@ const DOMErrorMessages = {
|
|
|
18690
18652
|
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
18691
18653
|
[65]: ``
|
|
18692
18654
|
};
|
|
18693
|
-
|
|
18694
18655
|
//#endregion
|
|
18695
18656
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
18696
18657
|
const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`);
|
|
@@ -18722,7 +18683,6 @@ const resolveModifiers = (key, modifiers, context, loc) => {
|
|
|
18722
18683
|
eventOptionModifiers
|
|
18723
18684
|
};
|
|
18724
18685
|
};
|
|
18725
|
-
|
|
18726
18686
|
//#endregion
|
|
18727
18687
|
//#region packages/compiler-dom/src/transforms/Transition.ts
|
|
18728
18688
|
function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
|
|
@@ -18750,7 +18710,6 @@ function defaultHasMultipleChildren(node) {
|
|
|
18750
18710
|
const child = children[0];
|
|
18751
18711
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
18752
18712
|
}
|
|
18753
|
-
|
|
18754
18713
|
//#endregion
|
|
18755
18714
|
//#region packages/compiler-dom/src/htmlNesting.ts
|
|
18756
18715
|
/**
|
|
@@ -18941,13 +18900,99 @@ const knownInvalidParents = {
|
|
|
18941
18900
|
h5: headings,
|
|
18942
18901
|
h6: headings
|
|
18943
18902
|
};
|
|
18944
|
-
|
|
18945
18903
|
//#endregion
|
|
18946
18904
|
//#region packages/compiler-dom/src/index.ts
|
|
18947
18905
|
function parse(template, options = {}) {
|
|
18948
18906
|
return baseParse(template, extend({}, parserOptions, options));
|
|
18949
18907
|
}
|
|
18950
|
-
|
|
18908
|
+
//#endregion
|
|
18909
|
+
//#region packages/compiler-vapor/src/ir/component.ts
|
|
18910
|
+
const IRDynamicPropsKind = {
|
|
18911
|
+
"EXPRESSION": 0,
|
|
18912
|
+
"0": "EXPRESSION",
|
|
18913
|
+
"ATTRIBUTE": 1,
|
|
18914
|
+
"1": "ATTRIBUTE"
|
|
18915
|
+
};
|
|
18916
|
+
const IRSlotType = {
|
|
18917
|
+
"STATIC": 0,
|
|
18918
|
+
"0": "STATIC",
|
|
18919
|
+
"DYNAMIC": 1,
|
|
18920
|
+
"1": "DYNAMIC",
|
|
18921
|
+
"LOOP": 2,
|
|
18922
|
+
"2": "LOOP",
|
|
18923
|
+
"CONDITIONAL": 3,
|
|
18924
|
+
"3": "CONDITIONAL",
|
|
18925
|
+
"EXPRESSION": 4,
|
|
18926
|
+
"4": "EXPRESSION"
|
|
18927
|
+
};
|
|
18928
|
+
//#endregion
|
|
18929
|
+
//#region packages/compiler-vapor/src/ir/index.ts
|
|
18930
|
+
const IRNodeTypes = {
|
|
18931
|
+
"ROOT": 0,
|
|
18932
|
+
"0": "ROOT",
|
|
18933
|
+
"BLOCK": 1,
|
|
18934
|
+
"1": "BLOCK",
|
|
18935
|
+
"SET_BLOCK_KEY": 2,
|
|
18936
|
+
"2": "SET_BLOCK_KEY",
|
|
18937
|
+
"SET_PROP": 3,
|
|
18938
|
+
"3": "SET_PROP",
|
|
18939
|
+
"SET_DYNAMIC_PROPS": 4,
|
|
18940
|
+
"4": "SET_DYNAMIC_PROPS",
|
|
18941
|
+
"SET_TEXT": 5,
|
|
18942
|
+
"5": "SET_TEXT",
|
|
18943
|
+
"SET_EVENT": 6,
|
|
18944
|
+
"6": "SET_EVENT",
|
|
18945
|
+
"SET_DYNAMIC_EVENTS": 7,
|
|
18946
|
+
"7": "SET_DYNAMIC_EVENTS",
|
|
18947
|
+
"SET_HTML": 8,
|
|
18948
|
+
"8": "SET_HTML",
|
|
18949
|
+
"SET_TEMPLATE_REF": 9,
|
|
18950
|
+
"9": "SET_TEMPLATE_REF",
|
|
18951
|
+
"INSERT_NODE": 10,
|
|
18952
|
+
"10": "INSERT_NODE",
|
|
18953
|
+
"PREPEND_NODE": 11,
|
|
18954
|
+
"11": "PREPEND_NODE",
|
|
18955
|
+
"CREATE_COMPONENT_NODE": 12,
|
|
18956
|
+
"12": "CREATE_COMPONENT_NODE",
|
|
18957
|
+
"SLOT_OUTLET_NODE": 13,
|
|
18958
|
+
"13": "SLOT_OUTLET_NODE",
|
|
18959
|
+
"DIRECTIVE": 14,
|
|
18960
|
+
"14": "DIRECTIVE",
|
|
18961
|
+
"IF": 15,
|
|
18962
|
+
"15": "IF",
|
|
18963
|
+
"FOR": 16,
|
|
18964
|
+
"16": "FOR",
|
|
18965
|
+
"KEY": 17,
|
|
18966
|
+
"17": "KEY",
|
|
18967
|
+
"GET_TEXT_CHILD": 18,
|
|
18968
|
+
"18": "GET_TEXT_CHILD",
|
|
18969
|
+
"GET_INSERTION_PARENT": 19,
|
|
18970
|
+
"19": "GET_INSERTION_PARENT",
|
|
18971
|
+
"SET_CHANGE_PROP": 20,
|
|
18972
|
+
"20": "SET_CHANGE_PROP"
|
|
18973
|
+
};
|
|
18974
|
+
var TemplateRegistry = class {
|
|
18975
|
+
constructor() {
|
|
18976
|
+
this.entries = [];
|
|
18977
|
+
}
|
|
18978
|
+
keys() {
|
|
18979
|
+
return this.entries.map(({ content }) => content);
|
|
18980
|
+
}
|
|
18981
|
+
};
|
|
18982
|
+
const DynamicFlag = {
|
|
18983
|
+
"NONE": 0,
|
|
18984
|
+
"0": "NONE",
|
|
18985
|
+
"REFERENCED": 1,
|
|
18986
|
+
"1": "REFERENCED",
|
|
18987
|
+
"NON_TEMPLATE": 2,
|
|
18988
|
+
"2": "NON_TEMPLATE",
|
|
18989
|
+
"INSERT": 4,
|
|
18990
|
+
"4": "INSERT"
|
|
18991
|
+
};
|
|
18992
|
+
function isBlockOperation(op) {
|
|
18993
|
+
const type = op.type;
|
|
18994
|
+
return type === 12 || type === 13 || type === 15 || type === 17 || type === 16;
|
|
18995
|
+
}
|
|
18951
18996
|
//#endregion
|
|
18952
18997
|
//#region packages/compiler-vapor/src/transforms/utils.ts
|
|
18953
18998
|
const newDynamic = () => ({
|
|
@@ -18989,7 +19034,7 @@ function wrapTemplate(node, dirs) {
|
|
|
18989
19034
|
const reserved = [];
|
|
18990
19035
|
const pass = [];
|
|
18991
19036
|
node.props.forEach((prop) => {
|
|
18992
|
-
if (prop.type === 7 && dirs.includes(prop.name)) reserved.push(prop);
|
|
19037
|
+
if (prop.type === 7 && (dirs.includes(prop.name) || prop.name === "bind" && prop.arg && prop.arg.type === 4 && prop.arg.content === "key" && dirs.includes("key"))) reserved.push(prop);
|
|
18993
19038
|
else pass.push(prop);
|
|
18994
19039
|
});
|
|
18995
19040
|
return extend({}, node, {
|
|
@@ -19003,7 +19048,6 @@ function wrapTemplate(node, dirs) {
|
|
|
19003
19048
|
const EMPTY_EXPRESSION = createSimpleExpression("", true);
|
|
19004
19049
|
const TEXT_PLACEHOLDER = "__vapor_dom2_text_placeholder__";
|
|
19005
19050
|
const TEXT_NODE_PLACEHOLDER = "__vapor_dom2_text_node_placeholder__";
|
|
19006
|
-
|
|
19007
19051
|
//#endregion
|
|
19008
19052
|
//#region packages/compiler-vapor/src/utils.ts
|
|
19009
19053
|
const findProp = findProp$1;
|
|
@@ -19018,7 +19062,7 @@ function isConstantExpression(exp) {
|
|
|
19018
19062
|
function isStaticExpression(node, bindings) {
|
|
19019
19063
|
if (node.ast) return isConstantNode(node.ast, bindings);
|
|
19020
19064
|
else if (node.ast === null) {
|
|
19021
|
-
if (!node.isStatic && (node.content === "true" || node.content === "false")) return true;
|
|
19065
|
+
if (!node.isStatic && (node.content === "true" || node.content === "false" || node.content === "null")) return true;
|
|
19022
19066
|
return bindings[node.content] === "literal-const";
|
|
19023
19067
|
}
|
|
19024
19068
|
return false;
|
|
@@ -19049,13 +19093,6 @@ function getLiteralExpressionValue(exp, excludeNumber) {
|
|
|
19049
19093
|
}
|
|
19050
19094
|
return exp.isStatic ? exp.content : null;
|
|
19051
19095
|
}
|
|
19052
|
-
function isInTransition(context) {
|
|
19053
|
-
const parentNode = context.parent && context.parent.node;
|
|
19054
|
-
return !!(parentNode && isTransitionNode(parentNode));
|
|
19055
|
-
}
|
|
19056
|
-
function isTransitionNode(node) {
|
|
19057
|
-
return node.type === 1 && isTransitionTag(node.tag);
|
|
19058
|
-
}
|
|
19059
19096
|
function isTransitionTag(tag) {
|
|
19060
19097
|
tag = tag.toLowerCase();
|
|
19061
19098
|
return tag === "transition" || tag === "vaportransition";
|
|
@@ -19074,11 +19111,15 @@ function isTeleportTag(tag) {
|
|
|
19074
19111
|
}
|
|
19075
19112
|
function isBuiltInComponent(tag) {
|
|
19076
19113
|
if (isTeleportTag(tag)) return "VaporTeleport";
|
|
19114
|
+
else if (tag === "Suspense" || tag === "suspense") return "Suspense";
|
|
19077
19115
|
else if (isKeepAliveTag(tag)) return "VaporKeepAlive";
|
|
19078
19116
|
else if (isTransitionTag(tag)) return "VaporTransition";
|
|
19079
19117
|
else if (isTransitionGroupTag(tag)) return "VaporTransitionGroup";
|
|
19080
19118
|
}
|
|
19081
|
-
|
|
19119
|
+
function getBlockShape(block) {
|
|
19120
|
+
if (block.returns.length === 0) return 0;
|
|
19121
|
+
return block.returns.length === 1 ? 1 : 2;
|
|
19122
|
+
}
|
|
19082
19123
|
//#endregion
|
|
19083
19124
|
//#region packages/compiler-vapor/src/transform.ts
|
|
19084
19125
|
const generatedVarRE = /^[nxr](\d+)$/;
|
|
@@ -19092,6 +19133,8 @@ var TransformContext = class TransformContext {
|
|
|
19092
19133
|
this.index = 0;
|
|
19093
19134
|
this.block = this.ir.block;
|
|
19094
19135
|
this.template = "";
|
|
19136
|
+
this.templateRoot = false;
|
|
19137
|
+
this.templateIndexMap = /* @__PURE__ */ new Map();
|
|
19095
19138
|
this.childrenTemplate = [];
|
|
19096
19139
|
this.dynamic = this.ir.block.dynamic;
|
|
19097
19140
|
this.imports = [];
|
|
@@ -19101,9 +19144,12 @@ var TransformContext = class TransformContext {
|
|
|
19101
19144
|
this.component = this.ir.component;
|
|
19102
19145
|
this.directive = this.ir.directive;
|
|
19103
19146
|
this.slots = [];
|
|
19147
|
+
this.effectIndex = this.block.effect.length;
|
|
19148
|
+
this.operationIndex = this.block.operation.length;
|
|
19104
19149
|
this.isLastEffectiveChild = true;
|
|
19105
19150
|
this.isOnRightmostPath = true;
|
|
19106
|
-
this.
|
|
19151
|
+
this.templateCloseTags = void 0;
|
|
19152
|
+
this.templateCloseBlocks = false;
|
|
19107
19153
|
this.globalId = 0;
|
|
19108
19154
|
this.nextIdMap = null;
|
|
19109
19155
|
this.ifIndex = 0;
|
|
@@ -19118,20 +19164,28 @@ var TransformContext = class TransformContext {
|
|
|
19118
19164
|
this.initNextIdMap();
|
|
19119
19165
|
}
|
|
19120
19166
|
enterBlock(ir, isVFor = false) {
|
|
19121
|
-
const { block, template, dynamic, childrenTemplate, slots } = this;
|
|
19167
|
+
const { block, template, templateRoot, templateIndexMap, dynamic, childrenTemplate, slots, effectIndex, operationIndex } = this;
|
|
19122
19168
|
this.block = ir;
|
|
19123
19169
|
this.dynamic = ir.dynamic;
|
|
19124
19170
|
this.template = "";
|
|
19171
|
+
this.templateRoot = false;
|
|
19172
|
+
this.templateIndexMap = templateIndexMap;
|
|
19125
19173
|
this.childrenTemplate = [];
|
|
19126
19174
|
this.slots = [];
|
|
19175
|
+
this.effectIndex = ir.effect.length;
|
|
19176
|
+
this.operationIndex = ir.operation.length;
|
|
19127
19177
|
isVFor && this.inVFor++;
|
|
19128
19178
|
return () => {
|
|
19129
19179
|
this.registerTemplate();
|
|
19130
19180
|
this.block = block;
|
|
19131
19181
|
this.template = template;
|
|
19182
|
+
this.templateRoot = templateRoot;
|
|
19183
|
+
this.templateIndexMap = templateIndexMap;
|
|
19132
19184
|
this.dynamic = dynamic;
|
|
19133
19185
|
this.childrenTemplate = childrenTemplate;
|
|
19134
19186
|
this.slots = slots;
|
|
19187
|
+
this.effectIndex = effectIndex;
|
|
19188
|
+
this.operationIndex = operationIndex;
|
|
19135
19189
|
isVFor && this.inVFor--;
|
|
19136
19190
|
};
|
|
19137
19191
|
}
|
|
@@ -19156,60 +19210,107 @@ var TransformContext = class TransformContext {
|
|
|
19156
19210
|
nextIfIndex() {
|
|
19157
19211
|
return this.ifIndex++;
|
|
19158
19212
|
}
|
|
19159
|
-
|
|
19160
|
-
|
|
19213
|
+
getTemplateNamespace() {
|
|
19214
|
+
return this.node.type === 1 ? this.node.ns : 0;
|
|
19215
|
+
}
|
|
19216
|
+
canUseStaticTemplate() {
|
|
19217
|
+
if (!this.template) return false;
|
|
19218
|
+
if (this.inVFor) return false;
|
|
19219
|
+
if (this.dynamic.hasDynamicChild) return false;
|
|
19220
|
+
if (this.block.effect.length !== this.effectIndex) return false;
|
|
19221
|
+
if (this.block.operation.length !== this.operationIndex) return false;
|
|
19222
|
+
if (this.node.type === 2 || this.node.type === 3) return true;
|
|
19223
|
+
return this.node.type === 1 && this.node.tagType === 0 && !(this.options.isCustomElement(this.node.tag) || this.node.tag === "template");
|
|
19224
|
+
}
|
|
19225
|
+
pushTemplate(content, { root = false, static: isStatic = false } = {}) {
|
|
19226
|
+
const templateKey = JSON.stringify([
|
|
19227
|
+
this.getTemplateNamespace(),
|
|
19228
|
+
root,
|
|
19229
|
+
isStatic,
|
|
19230
|
+
content
|
|
19231
|
+
]);
|
|
19232
|
+
const existingIndex = this.templateIndexMap.get(templateKey);
|
|
19161
19233
|
if (existingIndex !== void 0) return existingIndex;
|
|
19162
|
-
const
|
|
19163
|
-
this.ir.template.
|
|
19164
|
-
this.ir.
|
|
19234
|
+
const ns = this.getTemplateNamespace();
|
|
19235
|
+
const newIndex = this.ir.template.entries.length;
|
|
19236
|
+
this.ir.template.entries.push({
|
|
19237
|
+
content,
|
|
19238
|
+
ns,
|
|
19239
|
+
root,
|
|
19240
|
+
static: isStatic
|
|
19241
|
+
});
|
|
19242
|
+
this.templateIndexMap.set(templateKey, newIndex);
|
|
19165
19243
|
return newIndex;
|
|
19166
19244
|
}
|
|
19167
19245
|
registerTemplate() {
|
|
19168
19246
|
if (!this.template) return -1;
|
|
19169
|
-
const id = this.pushTemplate(this.template
|
|
19247
|
+
const id = this.pushTemplate(this.template, {
|
|
19248
|
+
root: this.templateRoot,
|
|
19249
|
+
static: this.canUseStaticTemplate()
|
|
19250
|
+
});
|
|
19170
19251
|
return this.dynamic.template = id;
|
|
19171
19252
|
}
|
|
19172
|
-
registerEffect(expressions, operation, getIndex
|
|
19253
|
+
registerEffect(expressions, operation, getIndex, getOperationIndex) {
|
|
19173
19254
|
const operations = [operation].flat();
|
|
19174
19255
|
expressions = expressions.filter((exp) => !isConstantExpression(exp));
|
|
19175
19256
|
if (this.inVOnce || expressions.length === 0 || expressions.every((e) => isStaticExpression(e, this.root.options.bindingMetadata))) {
|
|
19176
19257
|
if (getOperationIndex) {
|
|
19177
|
-
|
|
19258
|
+
const index = getOperationIndex();
|
|
19259
|
+
this.block.operation.splice(index, 0, ...operations);
|
|
19260
|
+
this.shiftOperationBoundaries(index, operations.length);
|
|
19178
19261
|
return;
|
|
19179
19262
|
}
|
|
19180
19263
|
return this.registerOperation(...operations);
|
|
19181
19264
|
}
|
|
19182
|
-
this.block.effect.
|
|
19265
|
+
const index = getIndex ? getIndex() : this.block.effect.length;
|
|
19266
|
+
this.block.effect.splice(index, 0, {
|
|
19183
19267
|
expressions,
|
|
19184
19268
|
operations
|
|
19185
19269
|
});
|
|
19270
|
+
if (getIndex) this.shiftEffectBoundaries(index);
|
|
19186
19271
|
}
|
|
19187
19272
|
registerOperation(...node) {
|
|
19188
19273
|
this.block.operation.push(...node);
|
|
19189
19274
|
}
|
|
19275
|
+
effectBoundary() {
|
|
19276
|
+
return {
|
|
19277
|
+
operationIndex: this.operationIndex,
|
|
19278
|
+
effectIndex: this.effectIndex
|
|
19279
|
+
};
|
|
19280
|
+
}
|
|
19190
19281
|
create(node, index) {
|
|
19191
19282
|
let effectiveParent = this;
|
|
19192
19283
|
while (effectiveParent && effectiveParent.node.type === 1 && effectiveParent.node.tagType === 3) effectiveParent = effectiveParent.parent;
|
|
19193
19284
|
const isLastEffectiveChild = this.isEffectivelyLastChild(index);
|
|
19194
19285
|
const isOnRightmostPath = this.isOnRightmostPath && isLastEffectiveChild;
|
|
19195
|
-
let hasInlineAncestorNeedingClose = this.hasInlineAncestorNeedingClose;
|
|
19196
|
-
if (this.node.type === 1) {
|
|
19197
|
-
if (this.node.tag === "template") hasInlineAncestorNeedingClose = false;
|
|
19198
|
-
else if (!hasInlineAncestorNeedingClose && !this.isOnRightmostPath && isInlineTag(this.node.tag)) hasInlineAncestorNeedingClose = true;
|
|
19199
|
-
}
|
|
19200
19286
|
return Object.assign(Object.create(TransformContext.prototype), this, {
|
|
19201
19287
|
node,
|
|
19202
19288
|
parent: this,
|
|
19203
19289
|
index,
|
|
19204
19290
|
template: "",
|
|
19291
|
+
templateRoot: false,
|
|
19205
19292
|
childrenTemplate: [],
|
|
19293
|
+
templateIndexMap: this.templateIndexMap,
|
|
19206
19294
|
dynamic: newDynamic(),
|
|
19295
|
+
effectIndex: this.block.effect.length,
|
|
19296
|
+
operationIndex: this.block.operation.length,
|
|
19207
19297
|
effectiveParent,
|
|
19208
19298
|
isLastEffectiveChild,
|
|
19209
19299
|
isOnRightmostPath,
|
|
19210
|
-
|
|
19300
|
+
templateCloseTags: this.templateCloseTags,
|
|
19301
|
+
templateCloseBlocks: this.templateCloseBlocks
|
|
19211
19302
|
});
|
|
19212
19303
|
}
|
|
19304
|
+
shiftEffectBoundaries(index, dynamic = this.dynamic) {
|
|
19305
|
+
const operation = dynamic.operation;
|
|
19306
|
+
if (operation && isBlockOperation(operation) && operation.effectIndex !== void 0 && operation.effectIndex >= index) operation.effectIndex++;
|
|
19307
|
+
for (const child of dynamic.children) this.shiftEffectBoundaries(index, child);
|
|
19308
|
+
}
|
|
19309
|
+
shiftOperationBoundaries(index, offset, dynamic = this.dynamic) {
|
|
19310
|
+
const operation = dynamic.operation;
|
|
19311
|
+
if (operation && isBlockOperation(operation) && operation.operationIndex !== void 0 && operation.operationIndex >= index) operation.operationIndex += offset;
|
|
19312
|
+
for (const child of dynamic.children) this.shiftOperationBoundaries(index, offset, child);
|
|
19313
|
+
}
|
|
19213
19314
|
isEffectivelyLastChild(index) {
|
|
19214
19315
|
const children = this.node.children;
|
|
19215
19316
|
if (!children) return true;
|
|
@@ -19247,14 +19348,11 @@ function transform(node, options = {}) {
|
|
|
19247
19348
|
type: 0,
|
|
19248
19349
|
node,
|
|
19249
19350
|
source: node.source,
|
|
19250
|
-
template:
|
|
19251
|
-
templateIndexMap: /* @__PURE__ */ new Map(),
|
|
19252
|
-
rootTemplateIndexes: /* @__PURE__ */ new Set(),
|
|
19351
|
+
template: new TemplateRegistry(),
|
|
19253
19352
|
component: /* @__PURE__ */ new Set(),
|
|
19254
19353
|
directive: /* @__PURE__ */ new Set(),
|
|
19255
19354
|
block: newBlock(node),
|
|
19256
|
-
hasTemplateRef: false
|
|
19257
|
-
hasDeferredVShow: false
|
|
19355
|
+
hasTemplateRef: false
|
|
19258
19356
|
};
|
|
19259
19357
|
const context = new TransformContext(ir, node, options);
|
|
19260
19358
|
transformNode(context);
|
|
@@ -19321,7 +19419,6 @@ function getNextId(map, n) {
|
|
|
19321
19419
|
if (map && map.has(n)) return map.get(n);
|
|
19322
19420
|
return n;
|
|
19323
19421
|
}
|
|
19324
|
-
|
|
19325
19422
|
//#endregion
|
|
19326
19423
|
//#region packages/compiler-vapor/src/generators/utils.ts
|
|
19327
19424
|
var import_source_map = require_source_map();
|
|
@@ -19403,6 +19500,9 @@ function genCall(name, ...frags) {
|
|
|
19403
19500
|
hasPlaceholder ? name[1] : "null"
|
|
19404
19501
|
], ...frags)];
|
|
19405
19502
|
}
|
|
19503
|
+
function getParserOptions(plugins) {
|
|
19504
|
+
return { plugins: plugins ? plugins.some((plugin) => plugin === "typescript") ? plugins : [...plugins, "typescript"] : ["typescript"] };
|
|
19505
|
+
}
|
|
19406
19506
|
function codeFragmentToString(code, context) {
|
|
19407
19507
|
const { options: { sourceMap } } = context;
|
|
19408
19508
|
const filename = context.options.relativeFilename || context.options.filename;
|
|
@@ -19466,85 +19566,6 @@ function codeFragmentToString(code, context) {
|
|
|
19466
19566
|
});
|
|
19467
19567
|
}
|
|
19468
19568
|
}
|
|
19469
|
-
|
|
19470
|
-
//#endregion
|
|
19471
|
-
//#region packages/compiler-vapor/src/ir/component.ts
|
|
19472
|
-
const IRDynamicPropsKind = {
|
|
19473
|
-
"EXPRESSION": 0,
|
|
19474
|
-
"0": "EXPRESSION",
|
|
19475
|
-
"ATTRIBUTE": 1,
|
|
19476
|
-
"1": "ATTRIBUTE"
|
|
19477
|
-
};
|
|
19478
|
-
const IRSlotType = {
|
|
19479
|
-
"STATIC": 0,
|
|
19480
|
-
"0": "STATIC",
|
|
19481
|
-
"DYNAMIC": 1,
|
|
19482
|
-
"1": "DYNAMIC",
|
|
19483
|
-
"LOOP": 2,
|
|
19484
|
-
"2": "LOOP",
|
|
19485
|
-
"CONDITIONAL": 3,
|
|
19486
|
-
"3": "CONDITIONAL",
|
|
19487
|
-
"EXPRESSION": 4,
|
|
19488
|
-
"4": "EXPRESSION"
|
|
19489
|
-
};
|
|
19490
|
-
|
|
19491
|
-
//#endregion
|
|
19492
|
-
//#region packages/compiler-vapor/src/ir/index.ts
|
|
19493
|
-
const IRNodeTypes = {
|
|
19494
|
-
"ROOT": 0,
|
|
19495
|
-
"0": "ROOT",
|
|
19496
|
-
"BLOCK": 1,
|
|
19497
|
-
"1": "BLOCK",
|
|
19498
|
-
"SET_PROP": 2,
|
|
19499
|
-
"2": "SET_PROP",
|
|
19500
|
-
"SET_DYNAMIC_PROPS": 3,
|
|
19501
|
-
"3": "SET_DYNAMIC_PROPS",
|
|
19502
|
-
"SET_TEXT": 4,
|
|
19503
|
-
"4": "SET_TEXT",
|
|
19504
|
-
"SET_EVENT": 5,
|
|
19505
|
-
"5": "SET_EVENT",
|
|
19506
|
-
"SET_DYNAMIC_EVENTS": 6,
|
|
19507
|
-
"6": "SET_DYNAMIC_EVENTS",
|
|
19508
|
-
"SET_HTML": 7,
|
|
19509
|
-
"7": "SET_HTML",
|
|
19510
|
-
"SET_TEMPLATE_REF": 8,
|
|
19511
|
-
"8": "SET_TEMPLATE_REF",
|
|
19512
|
-
"INSERT_NODE": 9,
|
|
19513
|
-
"9": "INSERT_NODE",
|
|
19514
|
-
"PREPEND_NODE": 10,
|
|
19515
|
-
"10": "PREPEND_NODE",
|
|
19516
|
-
"CREATE_COMPONENT_NODE": 11,
|
|
19517
|
-
"11": "CREATE_COMPONENT_NODE",
|
|
19518
|
-
"SLOT_OUTLET_NODE": 12,
|
|
19519
|
-
"12": "SLOT_OUTLET_NODE",
|
|
19520
|
-
"DIRECTIVE": 13,
|
|
19521
|
-
"13": "DIRECTIVE",
|
|
19522
|
-
"IF": 14,
|
|
19523
|
-
"14": "IF",
|
|
19524
|
-
"FOR": 15,
|
|
19525
|
-
"15": "FOR",
|
|
19526
|
-
"GET_TEXT_CHILD": 16,
|
|
19527
|
-
"16": "GET_TEXT_CHILD",
|
|
19528
|
-
"GET_INSERTION_PARENT": 17,
|
|
19529
|
-
"17": "GET_INSERTION_PARENT",
|
|
19530
|
-
"SET_CHANGE_PROP": 18,
|
|
19531
|
-
"18": "SET_CHANGE_PROP"
|
|
19532
|
-
};
|
|
19533
|
-
const DynamicFlag = {
|
|
19534
|
-
"NONE": 0,
|
|
19535
|
-
"0": "NONE",
|
|
19536
|
-
"REFERENCED": 1,
|
|
19537
|
-
"1": "REFERENCED",
|
|
19538
|
-
"NON_TEMPLATE": 2,
|
|
19539
|
-
"2": "NON_TEMPLATE",
|
|
19540
|
-
"INSERT": 4,
|
|
19541
|
-
"4": "INSERT"
|
|
19542
|
-
};
|
|
19543
|
-
function isBlockOperation(op) {
|
|
19544
|
-
const type = op.type;
|
|
19545
|
-
return type === 11 || type === 12 || type === 14 || type === 15;
|
|
19546
|
-
}
|
|
19547
|
-
|
|
19548
19569
|
//#endregion
|
|
19549
19570
|
//#region packages/compiler-vapor/src/generators/dom.ts
|
|
19550
19571
|
function genInsertNode({ parent, elements, anchor }, { helper }) {
|
|
@@ -19555,7 +19576,6 @@ function genInsertNode({ parent, elements, anchor }, { helper }) {
|
|
|
19555
19576
|
function genPrependNode(oper, { helper }) {
|
|
19556
19577
|
return [NEWLINE, ...genCall(helper("prepend"), `n${oper.parent}`, ...oper.elements.map((el) => `n${el}`))];
|
|
19557
19578
|
}
|
|
19558
|
-
|
|
19559
19579
|
//#endregion
|
|
19560
19580
|
//#region packages/compiler-vapor/src/generators/expression.ts
|
|
19561
19581
|
function genExpression(node, context, assignment) {
|
|
@@ -19674,8 +19694,9 @@ function canPrefix(name) {
|
|
|
19674
19694
|
}
|
|
19675
19695
|
function processExpressions(context, expressions, shouldDeclare) {
|
|
19676
19696
|
const { seenVariable, variableToExpMap, expToVariableMap, seenIdentifier, updatedVariable } = analyzeExpressions(expressions);
|
|
19677
|
-
const
|
|
19678
|
-
const
|
|
19697
|
+
const reservedNames = new Set(seenIdentifier);
|
|
19698
|
+
const varDeclarations = processRepeatedVariables(context, seenVariable, variableToExpMap, expToVariableMap, seenIdentifier, updatedVariable, reservedNames);
|
|
19699
|
+
const expDeclarations = processRepeatedExpressions(context, expressions, varDeclarations, updatedVariable, expToVariableMap, reservedNames);
|
|
19679
19700
|
return genDeclarations([...varDeclarations, ...expDeclarations], context, shouldDeclare);
|
|
19680
19701
|
}
|
|
19681
19702
|
function analyzeExpressions(expressions) {
|
|
@@ -19705,14 +19726,17 @@ function analyzeExpressions(expressions) {
|
|
|
19705
19726
|
walkIdentifiers(exp.ast, (currentNode, parent, parentStack) => {
|
|
19706
19727
|
if (parent && isMemberExpression(parent) && !seenParents.has(parent)) {
|
|
19707
19728
|
seenParents.add(parent);
|
|
19729
|
+
let hasGlobalIdentifier = false;
|
|
19708
19730
|
const memberExp = extractMemberExpression(parent, (id) => {
|
|
19709
19731
|
registerVariable(id.name, exp, true, {
|
|
19710
19732
|
start: id.start,
|
|
19711
19733
|
end: id.end
|
|
19712
19734
|
});
|
|
19735
|
+
if (isGloballyAllowed(id.name)) hasGlobalIdentifier = true;
|
|
19713
19736
|
});
|
|
19714
19737
|
const parentOfMemberExp = parentStack[parentStack.length - 2];
|
|
19715
19738
|
if (parentOfMemberExp && isCallExpression(parentOfMemberExp)) return;
|
|
19739
|
+
if (hasGlobalIdentifier) return;
|
|
19716
19740
|
registerVariable(memberExp, exp, false, {
|
|
19717
19741
|
start: parent.start,
|
|
19718
19742
|
end: parent.end
|
|
@@ -19731,14 +19755,15 @@ function analyzeExpressions(expressions) {
|
|
|
19731
19755
|
updatedVariable
|
|
19732
19756
|
};
|
|
19733
19757
|
}
|
|
19734
|
-
function processRepeatedVariables(context, seenVariable, variableToExpMap, expToVariableMap, seenIdentifier, updatedVariable) {
|
|
19758
|
+
function processRepeatedVariables(context, seenVariable, variableToExpMap, expToVariableMap, seenIdentifier, updatedVariable, reservedNames) {
|
|
19735
19759
|
const declarations = [];
|
|
19736
19760
|
const expToReplacementMap = /* @__PURE__ */ new Map();
|
|
19737
19761
|
for (const [name, exps] of variableToExpMap) {
|
|
19738
19762
|
if (updatedVariable.has(name)) continue;
|
|
19763
|
+
if (isGloballyAllowed(name)) continue;
|
|
19739
19764
|
if (seenVariable[name] > 1 && exps.size > 0) {
|
|
19740
19765
|
const isIdentifier = seenIdentifier.has(name);
|
|
19741
|
-
const varName = isIdentifier ? name : genVarName(name);
|
|
19766
|
+
const varName = isIdentifier ? name : getUniqueDeclarationName(genVarName(name), reservedNames);
|
|
19742
19767
|
exps.forEach((node) => {
|
|
19743
19768
|
if (node.ast && varName !== name) {
|
|
19744
19769
|
const replacements = expToReplacementMap.get(node) || [];
|
|
@@ -19770,7 +19795,7 @@ function processRepeatedVariables(context, seenVariable, variableToExpMap, expTo
|
|
|
19770
19795
|
}))).sort((a, b) => b.end - a.end).forEach(({ start, end, name }) => {
|
|
19771
19796
|
exp.content = exp.content.slice(0, start - 1) + name + exp.content.slice(end - 1);
|
|
19772
19797
|
});
|
|
19773
|
-
exp.ast = parseExp(context, exp.content
|
|
19798
|
+
exp.ast = parseExp(context, exp.content);
|
|
19774
19799
|
}
|
|
19775
19800
|
return declarations;
|
|
19776
19801
|
}
|
|
@@ -19786,45 +19811,44 @@ function shouldDeclareVariable(name, expToVariableMap, exps) {
|
|
|
19786
19811
|
if (vars.every((v) => v.every((e, idx) => e === first[idx]))) return false;
|
|
19787
19812
|
return true;
|
|
19788
19813
|
}
|
|
19789
|
-
function processRepeatedExpressions(context, expressions, varDeclarations, updatedVariable, expToVariableMap) {
|
|
19814
|
+
function processRepeatedExpressions(context, expressions, varDeclarations, updatedVariable, expToVariableMap, reservedNames) {
|
|
19790
19815
|
const declarations = [];
|
|
19791
19816
|
const seenExp = expressions.reduce((acc, exp) => {
|
|
19792
19817
|
const vars = expToVariableMap.get(exp);
|
|
19793
19818
|
if (!vars) return acc;
|
|
19794
19819
|
const variables = vars.map((v) => v.name);
|
|
19795
|
-
if (exp.ast && exp.ast.type !== "Identifier" && !(variables && variables.some((v) => updatedVariable.has(v)))) acc[exp.content] = (acc[exp.content] || 0) + 1;
|
|
19820
|
+
if (exp.ast && exp.ast.type !== "Identifier" && !(variables && variables.some((v) => updatedVariable.has(v))) && !variables.some((v) => isGloballyAllowed(v))) acc[exp.content] = (acc[exp.content] || 0) + 1;
|
|
19796
19821
|
return acc;
|
|
19797
19822
|
}, Object.create(null));
|
|
19798
19823
|
Object.entries(seenExp).forEach(([content, count]) => {
|
|
19799
19824
|
if (count > 1) {
|
|
19800
|
-
const
|
|
19801
|
-
|
|
19802
|
-
const
|
|
19803
|
-
|
|
19804
|
-
|
|
19805
|
-
|
|
19806
|
-
|
|
19807
|
-
|
|
19808
|
-
varDeclarations.splice(i, 1);
|
|
19809
|
-
}
|
|
19825
|
+
const delVars = {};
|
|
19826
|
+
for (let i = varDeclarations.length - 1; i >= 0; i--) {
|
|
19827
|
+
const item = varDeclarations[i];
|
|
19828
|
+
if (!item.exps || !item.seenCount) continue;
|
|
19829
|
+
if ([...item.exps].every((node) => node.content === content && item.seenCount === count)) {
|
|
19830
|
+
delVars[item.name] = item.rawName;
|
|
19831
|
+
reservedNames.delete(item.name);
|
|
19832
|
+
varDeclarations.splice(i, 1);
|
|
19810
19833
|
}
|
|
19811
|
-
const value = extend({}, expressions.find((exp) => exp.content === content));
|
|
19812
|
-
Object.keys(delVars).forEach((name) => {
|
|
19813
|
-
value.content = value.content.replace(name, delVars[name]);
|
|
19814
|
-
if (value.ast) value.ast = parseExp(context, value.content, value.loc);
|
|
19815
|
-
});
|
|
19816
|
-
declarations.push({
|
|
19817
|
-
name: varName,
|
|
19818
|
-
value
|
|
19819
|
-
});
|
|
19820
19834
|
}
|
|
19835
|
+
const value = extend({}, expressions.find((exp) => exp.content === content));
|
|
19836
|
+
Object.keys(delVars).forEach((name) => {
|
|
19837
|
+
value.content = value.content.replace(name, delVars[name]);
|
|
19838
|
+
if (value.ast) value.ast = parseExp(context, value.content);
|
|
19839
|
+
});
|
|
19840
|
+
const varName = getUniqueDeclarationName(genVarName(content), reservedNames);
|
|
19841
|
+
declarations.push({
|
|
19842
|
+
name: varName,
|
|
19843
|
+
value
|
|
19844
|
+
});
|
|
19821
19845
|
expressions.forEach((exp) => {
|
|
19822
19846
|
if (exp.content === content) {
|
|
19823
19847
|
exp.content = varName;
|
|
19824
19848
|
exp.ast = null;
|
|
19825
19849
|
} else if (exp.content.includes(content)) {
|
|
19826
19850
|
exp.content = exp.content.replace(new RegExp(escapeRegExp(content), "g"), varName);
|
|
19827
|
-
exp.ast = parseExp(context, exp.content
|
|
19851
|
+
exp.ast = parseExp(context, exp.content);
|
|
19828
19852
|
}
|
|
19829
19853
|
});
|
|
19830
19854
|
}
|
|
@@ -19845,10 +19869,11 @@ function genDeclarations(declarations, context, shouldDeclare) {
|
|
|
19845
19869
|
});
|
|
19846
19870
|
declarations.forEach(({ name, isIdentifier, value }) => {
|
|
19847
19871
|
if (!isIdentifier) {
|
|
19848
|
-
const varName =
|
|
19872
|
+
const varName = `_${name}`;
|
|
19849
19873
|
varNames.add(varName);
|
|
19850
19874
|
if (shouldDeclare) push(`const `);
|
|
19851
19875
|
push(`${varName} = `, ...context.withId(() => genExpression(value, context), ids), NEWLINE);
|
|
19876
|
+
ids[name] = varName;
|
|
19852
19877
|
}
|
|
19853
19878
|
});
|
|
19854
19879
|
return {
|
|
@@ -19861,10 +19886,8 @@ function escapeRegExp(string) {
|
|
|
19861
19886
|
return string.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
19862
19887
|
}
|
|
19863
19888
|
function parseExp(context, content, loc) {
|
|
19864
|
-
const plugins = context.options.expressionPlugins;
|
|
19865
|
-
const options = { plugins: plugins ? [...plugins, "typescript"] : ["typescript"] };
|
|
19866
19889
|
try {
|
|
19867
|
-
return (0, import_lib.parseExpression)(`(${content})`, options);
|
|
19890
|
+
return (0, import_lib.parseExpression)(`(${content})`, getParserOptions(context.options.expressionPlugins));
|
|
19868
19891
|
} catch (e) {
|
|
19869
19892
|
if (loc) {
|
|
19870
19893
|
const error = new SyntaxError(e.message);
|
|
@@ -19878,6 +19901,14 @@ function parseExp(context, content, loc) {
|
|
|
19878
19901
|
function genVarName(exp) {
|
|
19879
19902
|
return `${exp.replace(/[^a-zA-Z0-9]/g, "_").replace(/_+/g, "_").replace(/_+$/, "")}`;
|
|
19880
19903
|
}
|
|
19904
|
+
function getUniqueDeclarationName(baseName, reservedNames) {
|
|
19905
|
+
const normalizedBase = baseName || "exp";
|
|
19906
|
+
let name = normalizedBase;
|
|
19907
|
+
let i = 1;
|
|
19908
|
+
while (reservedNames.has(name)) name = `${normalizedBase}_${i++}`;
|
|
19909
|
+
reservedNames.add(name);
|
|
19910
|
+
return name;
|
|
19911
|
+
}
|
|
19881
19912
|
function extractMemberExpression(exp, onIdentifier) {
|
|
19882
19913
|
if (!exp) return "";
|
|
19883
19914
|
switch (exp.type) {
|
|
@@ -19901,7 +19932,6 @@ const isCallExpression = (node) => {
|
|
|
19901
19932
|
const isMemberExpression = (node) => {
|
|
19902
19933
|
return node.type === "MemberExpression" || node.type === "OptionalMemberExpression" || node.type === "TSNonNullExpression";
|
|
19903
19934
|
};
|
|
19904
|
-
|
|
19905
19935
|
//#endregion
|
|
19906
19936
|
//#region packages/compiler-vapor/src/generators/event.ts
|
|
19907
19937
|
function genSetEvent(oper, context) {
|
|
@@ -19946,7 +19976,7 @@ function genSetEvent(oper, context) {
|
|
|
19946
19976
|
return genMulti(DELIMITERS_OBJECT_NEWLINE, effect && ["effect: true"], ...options.map((option) => [`${option}: true`]));
|
|
19947
19977
|
}
|
|
19948
19978
|
function isSameDelegateEvent(op) {
|
|
19949
|
-
if (op.type ===
|
|
19979
|
+
if (op.type === 6 && op !== oper && op.delegate && op.element === oper.element && op.key.content === key.content) return true;
|
|
19950
19980
|
}
|
|
19951
19981
|
}
|
|
19952
19982
|
function genSetDynamicEvents(oper, context) {
|
|
@@ -20013,7 +20043,6 @@ function isConstantBinding(value, context) {
|
|
|
20013
20043
|
if (context.options.bindingMetadata[value.content] === "setup-const") return true;
|
|
20014
20044
|
}
|
|
20015
20045
|
}
|
|
20016
|
-
|
|
20017
20046
|
//#endregion
|
|
20018
20047
|
//#region packages/compiler-vapor/src/generators/for.ts
|
|
20019
20048
|
function genFor(oper, context) {
|
|
@@ -20045,16 +20074,12 @@ function genFor(oper, context) {
|
|
|
20045
20074
|
idMap[rawIndex] = `${indexVar}.value`;
|
|
20046
20075
|
idMap[indexVar] = null;
|
|
20047
20076
|
}
|
|
20048
|
-
const { selectorPatterns, keyOnlyBindingPatterns } = matchPatterns(render, keyProp, idMap);
|
|
20077
|
+
const { selectorPatterns, keyOnlyBindingPatterns } = matchPatterns(render, keyProp, idMap, context);
|
|
20049
20078
|
const selectorDeclarations = [];
|
|
20050
|
-
const
|
|
20079
|
+
const selectorName = (i) => selectorPatterns.length > 1 ? `_selector${id}_${i}` : `_selector${id}`;
|
|
20051
20080
|
for (let i = 0; i < selectorPatterns.length; i++) {
|
|
20052
20081
|
const { selector } = selectorPatterns[i];
|
|
20053
|
-
const selectorName = `
|
|
20054
|
-
selectorDeclarations.push(`let ${selectorName}`, NEWLINE);
|
|
20055
|
-
if (i === 0) selectorSetup.push(`({ createSelector }) => {`, INDENT_START);
|
|
20056
|
-
selectorSetup.push(NEWLINE, `${selectorName} = `, ...genCall(`createSelector`, [`() => `, ...genExpression(selector, context)]));
|
|
20057
|
-
if (i === selectorPatterns.length - 1) selectorSetup.push(INDENT_END, NEWLINE, "}");
|
|
20082
|
+
selectorDeclarations.push(`const ${selectorName(i)} = `, ...genCall(helper("createSelector"), [`() => `, ...genExpression(selector, context)]), NEWLINE);
|
|
20058
20083
|
}
|
|
20059
20084
|
const blockFn = context.withId(() => {
|
|
20060
20085
|
const frag = [];
|
|
@@ -20063,7 +20088,7 @@ function genFor(oper, context) {
|
|
|
20063
20088
|
const patternFrag = [];
|
|
20064
20089
|
for (let i = 0; i < selectorPatterns.length; i++) {
|
|
20065
20090
|
const { effect } = selectorPatterns[i];
|
|
20066
|
-
patternFrag.push(NEWLINE,
|
|
20091
|
+
patternFrag.push(NEWLINE, `${selectorName(i)}(`, ...genExpression(keyProp, context), `, () => {`, INDENT_START);
|
|
20067
20092
|
for (const oper of effect.operations) patternFrag.push(...genOperation(oper, context));
|
|
20068
20093
|
patternFrag.push(INDENT_END, NEWLINE, `})`);
|
|
20069
20094
|
}
|
|
@@ -20079,11 +20104,14 @@ function genFor(oper, context) {
|
|
|
20079
20104
|
if (onlyChild) flags |= 1;
|
|
20080
20105
|
if (component) flags |= 2;
|
|
20081
20106
|
if (once) flags |= 4;
|
|
20107
|
+
const onResetCalls = [];
|
|
20108
|
+
for (let i = 0; i < selectorPatterns.length; i++) onResetCalls.push(NEWLINE, `n${id}.onReset(${selectorName(i)}.reset)`);
|
|
20082
20109
|
return [
|
|
20083
20110
|
NEWLINE,
|
|
20084
20111
|
...selectorDeclarations,
|
|
20085
20112
|
`const n${id} = `,
|
|
20086
|
-
...genCall([helper("createFor"), "undefined"], sourceExpr, blockFn, genCallback(keyProp), flags ? String(flags) : void 0,
|
|
20113
|
+
...genCall([helper("createFor"), "undefined"], sourceExpr, blockFn, genCallback(keyProp), flags ? String(flags) : void 0),
|
|
20114
|
+
...onResetCalls
|
|
20087
20115
|
];
|
|
20088
20116
|
function genCallback(expr) {
|
|
20089
20117
|
if (!expr) return false;
|
|
@@ -20171,35 +20199,49 @@ function buildDestructureIdMap(idToPathMap, baseAccessor, plugins) {
|
|
|
20171
20199
|
}
|
|
20172
20200
|
if (pathInfo.dynamic) {
|
|
20173
20201
|
const node = idMap[id] = createSimpleExpression(path);
|
|
20174
|
-
node.ast = (0, import_lib.parseExpression)(`(${path})`,
|
|
20202
|
+
node.ast = (0, import_lib.parseExpression)(`(${path})`, getParserOptions(plugins));
|
|
20175
20203
|
} else idMap[id] = path;
|
|
20176
20204
|
} else idMap[id] = path;
|
|
20177
20205
|
});
|
|
20178
20206
|
return idMap;
|
|
20179
20207
|
}
|
|
20180
|
-
function matchPatterns(render, keyProp, idMap) {
|
|
20208
|
+
function matchPatterns(render, keyProp, idMap, context) {
|
|
20181
20209
|
const selectorPatterns = [];
|
|
20182
20210
|
const keyOnlyBindingPatterns = [];
|
|
20183
|
-
|
|
20211
|
+
const removedEffectIndexes = [];
|
|
20212
|
+
render.effect = render.effect.filter((effect, index) => {
|
|
20184
20213
|
if (keyProp !== void 0) {
|
|
20185
|
-
const selector = matchSelectorPattern(effect, keyProp.content, idMap);
|
|
20214
|
+
const selector = matchSelectorPattern(effect, keyProp.content, idMap, context);
|
|
20186
20215
|
if (selector) {
|
|
20187
20216
|
selectorPatterns.push(selector);
|
|
20217
|
+
removedEffectIndexes.push(index);
|
|
20188
20218
|
return false;
|
|
20189
20219
|
}
|
|
20190
20220
|
const keyOnly = matchKeyOnlyBindingPattern(effect, keyProp.content);
|
|
20191
20221
|
if (keyOnly) {
|
|
20192
20222
|
keyOnlyBindingPatterns.push(keyOnly);
|
|
20223
|
+
removedEffectIndexes.push(index);
|
|
20193
20224
|
return false;
|
|
20194
20225
|
}
|
|
20195
20226
|
}
|
|
20196
20227
|
return true;
|
|
20197
20228
|
});
|
|
20229
|
+
if (removedEffectIndexes.length) shiftEffectBoundaries(render.dynamic, removedEffectIndexes);
|
|
20198
20230
|
return {
|
|
20199
20231
|
keyOnlyBindingPatterns,
|
|
20200
20232
|
selectorPatterns
|
|
20201
20233
|
};
|
|
20202
20234
|
}
|
|
20235
|
+
function shiftEffectBoundaries(dynamic, removedEffectIndexes) {
|
|
20236
|
+
const operation = dynamic.operation;
|
|
20237
|
+
if (operation && isBlockOperation(operation) && operation.effectIndex !== void 0) {
|
|
20238
|
+
let offset = 0;
|
|
20239
|
+
for (const removedIndex of removedEffectIndexes) if (removedIndex < operation.effectIndex) offset++;
|
|
20240
|
+
else break;
|
|
20241
|
+
operation.effectIndex -= offset;
|
|
20242
|
+
}
|
|
20243
|
+
for (const child of dynamic.children) shiftEffectBoundaries(child, removedEffectIndexes);
|
|
20244
|
+
}
|
|
20203
20245
|
function matchKeyOnlyBindingPattern(effect, key) {
|
|
20204
20246
|
if (effect.expressions.length === 1) {
|
|
20205
20247
|
const { ast, content } = effect.expressions[0];
|
|
@@ -20208,7 +20250,7 @@ function matchKeyOnlyBindingPattern(effect, key) {
|
|
|
20208
20250
|
}
|
|
20209
20251
|
}
|
|
20210
20252
|
}
|
|
20211
|
-
function matchSelectorPattern(effect, key, idMap) {
|
|
20253
|
+
function matchSelectorPattern(effect, key, idMap, context) {
|
|
20212
20254
|
if (effect.expressions.length === 1) {
|
|
20213
20255
|
const { ast, content } = effect.expressions[0];
|
|
20214
20256
|
if (typeof ast === "object" && ast) {
|
|
@@ -20233,17 +20275,11 @@ function matchSelectorPattern(effect, key, idMap) {
|
|
|
20233
20275
|
}, false);
|
|
20234
20276
|
if (!hasExtraId) {
|
|
20235
20277
|
const name = content.slice(selector.start - 1, selector.end - 1);
|
|
20278
|
+
const selectorExpression = createSimpleExpression(name, false, selector.loc);
|
|
20279
|
+
selectorExpression.ast = (0, import_lib.parseExpression)(`(${name})`, getParserOptions(context.options.expressionPlugins));
|
|
20236
20280
|
return {
|
|
20237
20281
|
effect,
|
|
20238
|
-
selector:
|
|
20239
|
-
content: name,
|
|
20240
|
-
ast: extend({}, selector, {
|
|
20241
|
-
start: 1,
|
|
20242
|
-
end: name.length + 1
|
|
20243
|
-
}),
|
|
20244
|
-
loc: selector.loc,
|
|
20245
|
-
isStatic: false
|
|
20246
|
-
}
|
|
20282
|
+
selector: selectorExpression
|
|
20247
20283
|
};
|
|
20248
20284
|
}
|
|
20249
20285
|
}
|
|
@@ -20273,7 +20309,6 @@ function isKeyOnlyBinding(expr, key, source) {
|
|
|
20273
20309
|
} });
|
|
20274
20310
|
return only;
|
|
20275
20311
|
}
|
|
20276
|
-
|
|
20277
20312
|
//#endregion
|
|
20278
20313
|
//#region packages/compiler-vapor/src/generators/html.ts
|
|
20279
20314
|
function genSetHtml(oper, context) {
|
|
@@ -20281,12 +20316,11 @@ function genSetHtml(oper, context) {
|
|
|
20281
20316
|
const { value, element, isComponent } = oper;
|
|
20282
20317
|
return [NEWLINE, ...genCall(isComponent ? helper("setBlockHtml") : helper("setHtml"), `n${element}`, genExpression(value, context))];
|
|
20283
20318
|
}
|
|
20284
|
-
|
|
20285
20319
|
//#endregion
|
|
20286
20320
|
//#region packages/compiler-vapor/src/generators/if.ts
|
|
20287
20321
|
function genIf(oper, context, isNested = false) {
|
|
20288
20322
|
const { helper } = context;
|
|
20289
|
-
const { condition, positive, negative, once, index } = oper;
|
|
20323
|
+
const { condition, positive, negative, once, index, blockShape } = oper;
|
|
20290
20324
|
const [frag, push] = buildCodeFragment();
|
|
20291
20325
|
const conditionExpr = [
|
|
20292
20326
|
"() => (",
|
|
@@ -20298,16 +20332,16 @@ function genIf(oper, context, isNested = false) {
|
|
|
20298
20332
|
if (negative) if (negative.type === 1) negativeArg = genBlock(negative, context);
|
|
20299
20333
|
else negativeArg = ["() => ", ...genIf(negative, context, true)];
|
|
20300
20334
|
if (!isNested) push(NEWLINE, `const n${oper.id} = `);
|
|
20301
|
-
push(...genCall(helper("createIf"), conditionExpr, positiveArg, negativeArg, once && "true", index !== void 0 && negative && String(index)));
|
|
20335
|
+
push(...genCall(helper("createIf"), conditionExpr, positiveArg, negativeArg, String(blockShape), once && "true", index !== void 0 && negative && String(index)));
|
|
20302
20336
|
return frag;
|
|
20303
20337
|
}
|
|
20304
|
-
|
|
20305
20338
|
//#endregion
|
|
20306
20339
|
//#region packages/compiler-vapor/src/generators/prop.ts
|
|
20307
20340
|
const helpers = {
|
|
20308
20341
|
setText: { name: "setText" },
|
|
20309
20342
|
setHtml: { name: "setHtml" },
|
|
20310
20343
|
setClass: { name: "setClass" },
|
|
20344
|
+
setClassName: { name: "setClassName" },
|
|
20311
20345
|
setStyle: { name: "setStyle" },
|
|
20312
20346
|
setValue: { name: "setValue" },
|
|
20313
20347
|
setAttr: {
|
|
@@ -20327,9 +20361,132 @@ function genSetProp(oper, context) {
|
|
|
20327
20361
|
const { helper } = context;
|
|
20328
20362
|
const { prop: { key, values, modifier }, tag } = oper;
|
|
20329
20363
|
const resolvedHelper = getRuntimeHelper(tag, key.content, modifier);
|
|
20364
|
+
if (key.content === "class" && !resolvedHelper.isSVG && resolvedHelper.name === "setClass") {
|
|
20365
|
+
const className = genSetClassName(oper, context);
|
|
20366
|
+
if (className) return className;
|
|
20367
|
+
}
|
|
20330
20368
|
const propValue = genPropValue(values, context);
|
|
20331
20369
|
return [NEWLINE, ...genCall([helper(resolvedHelper.name), null], `n${oper.element}`, resolvedHelper.needKey ? genExpression(key, context) : false, propValue, resolvedHelper.isSVG && "true")];
|
|
20332
20370
|
}
|
|
20371
|
+
const MAX_CLASS_NAME_ENTRIES = 31;
|
|
20372
|
+
function genSetClassName(oper, context) {
|
|
20373
|
+
const info = resolveClassName(oper.prop.values, context);
|
|
20374
|
+
if (!info) return;
|
|
20375
|
+
const { helper } = context;
|
|
20376
|
+
const flags = genClassFlags(info.entries, context);
|
|
20377
|
+
const classFragments = info.entries.map((entry) => JSON.stringify(!info.prefix && info.entries.length === 1 ? entry.className : ` ${entry.className}`));
|
|
20378
|
+
const fragments = classFragments.length === 1 ? classFragments[0] : genMulti(DELIMITERS_ARRAY, ...classFragments);
|
|
20379
|
+
return [NEWLINE, ...genCall([helper("setClassName"), "\"\""], `n${oper.element}`, flags, fragments, info.prefix && JSON.stringify(info.prefix), info.suffix && JSON.stringify(info.suffix))];
|
|
20380
|
+
}
|
|
20381
|
+
function resolveClassName(values, context) {
|
|
20382
|
+
let prefix = "";
|
|
20383
|
+
let suffix = "";
|
|
20384
|
+
const entries = [];
|
|
20385
|
+
let sawDynamic = false;
|
|
20386
|
+
let sawSuffix = false;
|
|
20387
|
+
for (const value of values) {
|
|
20388
|
+
const staticValue = getLiteralExpressionValue(value, true);
|
|
20389
|
+
if (staticValue != null) {
|
|
20390
|
+
const normalized = normalizeClass(staticValue);
|
|
20391
|
+
if (normalized) if (sawSuffix) suffix = appendClass(suffix, normalized);
|
|
20392
|
+
else if (sawDynamic) {
|
|
20393
|
+
sawSuffix = true;
|
|
20394
|
+
suffix = appendClass(suffix, normalized);
|
|
20395
|
+
} else prefix = appendClass(prefix, normalized);
|
|
20396
|
+
continue;
|
|
20397
|
+
}
|
|
20398
|
+
const ast = value.ast;
|
|
20399
|
+
if (!ast || sawSuffix) return;
|
|
20400
|
+
sawDynamic = true;
|
|
20401
|
+
if (ast.type === "ObjectExpression") {
|
|
20402
|
+
if (!resolveObjectClassName(value, ast, entries, context)) return;
|
|
20403
|
+
} else if (ast.type === "ConditionalExpression") {
|
|
20404
|
+
if (!resolveConditionalClassName(value, ast, entries, context)) return;
|
|
20405
|
+
} else return;
|
|
20406
|
+
}
|
|
20407
|
+
return entries.length && entries.length <= MAX_CLASS_NAME_ENTRIES ? {
|
|
20408
|
+
prefix,
|
|
20409
|
+
suffix,
|
|
20410
|
+
entries
|
|
20411
|
+
} : void 0;
|
|
20412
|
+
}
|
|
20413
|
+
function resolveObjectClassName(source, ast, entries, context) {
|
|
20414
|
+
for (const prop of ast.properties) {
|
|
20415
|
+
if (prop.type !== "ObjectProperty" || prop.computed) return false;
|
|
20416
|
+
const rawClassName = getObjectPropertyName(prop);
|
|
20417
|
+
if (rawClassName == null) return false;
|
|
20418
|
+
const className = normalizeClass(rawClassName);
|
|
20419
|
+
if (!className) continue;
|
|
20420
|
+
const value = getBooleanValue(prop.value);
|
|
20421
|
+
entries.push({
|
|
20422
|
+
className,
|
|
20423
|
+
value,
|
|
20424
|
+
condition: value == null ? createSubExpression(source, prop.value, context) : void 0
|
|
20425
|
+
});
|
|
20426
|
+
}
|
|
20427
|
+
return true;
|
|
20428
|
+
}
|
|
20429
|
+
function resolveConditionalClassName(source, ast, entries, context) {
|
|
20430
|
+
const consequent = getStringClassValue(ast.consequent);
|
|
20431
|
+
const alternate = getStringClassValue(ast.alternate);
|
|
20432
|
+
if (consequent && alternate === "") {
|
|
20433
|
+
entries.push({
|
|
20434
|
+
className: consequent,
|
|
20435
|
+
condition: createSubExpression(source, ast.test, context)
|
|
20436
|
+
});
|
|
20437
|
+
return true;
|
|
20438
|
+
} else if (alternate && consequent === "") {
|
|
20439
|
+
entries.push({
|
|
20440
|
+
className: alternate,
|
|
20441
|
+
condition: createSubExpression(source, ast.test, context),
|
|
20442
|
+
negate: true
|
|
20443
|
+
});
|
|
20444
|
+
return true;
|
|
20445
|
+
}
|
|
20446
|
+
return false;
|
|
20447
|
+
}
|
|
20448
|
+
function genClassFlags(entries, context) {
|
|
20449
|
+
const values = [];
|
|
20450
|
+
entries.forEach((entry, index) => {
|
|
20451
|
+
if (index) values.push(" | ");
|
|
20452
|
+
const bit = 1 << index;
|
|
20453
|
+
if (entry.value != null) {
|
|
20454
|
+
values.push(entry.value ? String(bit) : "0");
|
|
20455
|
+
return;
|
|
20456
|
+
}
|
|
20457
|
+
values.push("(", ...genExpression(entry.condition, context), entry.negate ? ` ? 0 : ${bit}` : ` ? ${bit} : 0`, ")");
|
|
20458
|
+
});
|
|
20459
|
+
return values;
|
|
20460
|
+
}
|
|
20461
|
+
function appendClass(base, value) {
|
|
20462
|
+
return base ? value ? `${base} ${value}` : base : value;
|
|
20463
|
+
}
|
|
20464
|
+
function getObjectPropertyName(prop) {
|
|
20465
|
+
const key = prop.key;
|
|
20466
|
+
if (key.type === "Identifier") return key.name;
|
|
20467
|
+
else if (key.type === "StringLiteral") return key.value;
|
|
20468
|
+
else if (key.type === "NumericLiteral") return String(key.value);
|
|
20469
|
+
}
|
|
20470
|
+
function getStringClassValue(node) {
|
|
20471
|
+
if (node.type === "StringLiteral") return normalizeClass(node.value);
|
|
20472
|
+
else if (node.type === "TemplateLiteral" && node.expressions.length === 0) return normalizeClass(node.quasis[0].value.cooked || "");
|
|
20473
|
+
else if (node.type === "NullLiteral" || node.type === "BooleanLiteral" && !node.value) return "";
|
|
20474
|
+
}
|
|
20475
|
+
function getBooleanValue(node) {
|
|
20476
|
+
if (node.type === "BooleanLiteral") return node.value;
|
|
20477
|
+
}
|
|
20478
|
+
function createSubExpression(source, node, context) {
|
|
20479
|
+
const start = node.start == null ? 0 : node.start - 1;
|
|
20480
|
+
const end = node.end == null ? source.content.length : node.end - 1;
|
|
20481
|
+
const content = source.content.slice(start, end);
|
|
20482
|
+
const expression = createSimpleExpression(content, false, {
|
|
20483
|
+
start: advancePositionWithClone(source.loc.start, source.content, start),
|
|
20484
|
+
end: advancePositionWithClone(source.loc.start, source.content, end),
|
|
20485
|
+
source: content
|
|
20486
|
+
});
|
|
20487
|
+
expression.ast = isSimpleIdentifier(content) ? null : (0, import_lib.parseExpression)(`(${content})`, getParserOptions(context.options.expressionPlugins));
|
|
20488
|
+
return expression;
|
|
20489
|
+
}
|
|
20333
20490
|
function genDynamicProps$1(oper, context) {
|
|
20334
20491
|
const { helper } = context;
|
|
20335
20492
|
const isSVG = isSVGTag(oper.tag);
|
|
@@ -20391,7 +20548,6 @@ function getSpecialHelper(keyName, tagName, isSVG) {
|
|
|
20391
20548
|
else if (keyName === "innerHTML") return helpers.setHtml;
|
|
20392
20549
|
else if (keyName === "textContent") return helpers.setText;
|
|
20393
20550
|
}
|
|
20394
|
-
|
|
20395
20551
|
//#endregion
|
|
20396
20552
|
//#region packages/compiler-vapor/src/generators/templateRef.ts
|
|
20397
20553
|
const setTemplateRefIdent = `_setTemplateRef`;
|
|
@@ -20406,7 +20562,6 @@ function genRefValue(value, context) {
|
|
|
20406
20562
|
}
|
|
20407
20563
|
return [genExpression(value, context)];
|
|
20408
20564
|
}
|
|
20409
|
-
|
|
20410
20565
|
//#endregion
|
|
20411
20566
|
//#region packages/compiler-vapor/src/generators/text.ts
|
|
20412
20567
|
function genSetText(oper, context) {
|
|
@@ -20426,23 +20581,16 @@ function combineValues(values, context) {
|
|
|
20426
20581
|
function genGetTextChild(oper, context) {
|
|
20427
20582
|
return [NEWLINE, `const x${oper.parent} = ${context.helper("txt")}(n${oper.parent})`];
|
|
20428
20583
|
}
|
|
20429
|
-
|
|
20430
20584
|
//#endregion
|
|
20431
20585
|
//#region packages/compiler-vapor/src/generators/vShow.ts
|
|
20432
20586
|
function genVShow(oper, context) {
|
|
20433
|
-
const {
|
|
20434
|
-
return [
|
|
20435
|
-
|
|
20436
|
-
|
|
20437
|
-
|
|
20438
|
-
|
|
20439
|
-
...genExpression(oper.dir.exp, context),
|
|
20440
|
-
`)`
|
|
20441
|
-
]),
|
|
20442
|
-
deferred ? `)` : void 0
|
|
20443
|
-
];
|
|
20587
|
+
const { element } = oper;
|
|
20588
|
+
return [NEWLINE, ...genCall(context.helper("applyVShow"), `n${element}`, [
|
|
20589
|
+
`() => (`,
|
|
20590
|
+
...genExpression(oper.dir.exp, context),
|
|
20591
|
+
`)`
|
|
20592
|
+
])];
|
|
20444
20593
|
}
|
|
20445
|
-
|
|
20446
20594
|
//#endregion
|
|
20447
20595
|
//#region packages/compiler-vapor/src/generators/vModel.ts
|
|
20448
20596
|
const helperMap = {
|
|
@@ -20467,7 +20615,6 @@ function genModelHandler(exp, context) {
|
|
|
20467
20615
|
")"
|
|
20468
20616
|
];
|
|
20469
20617
|
}
|
|
20470
|
-
|
|
20471
20618
|
//#endregion
|
|
20472
20619
|
//#region packages/compiler-vapor/src/generators/directive.ts
|
|
20473
20620
|
function genBuiltinDirective(oper, context) {
|
|
@@ -20505,9 +20652,8 @@ function genDirectiveModifiers(modifiers) {
|
|
|
20505
20652
|
return modifiers.map((value) => `${isSimpleIdentifier(value) ? value : JSON.stringify(value)}: true`).join(", ");
|
|
20506
20653
|
}
|
|
20507
20654
|
function filterCustomDirectives(id, operations) {
|
|
20508
|
-
return operations.filter((oper) => oper.type ===
|
|
20655
|
+
return operations.filter((oper) => oper.type === 14 && oper.element === id && !oper.builtin);
|
|
20509
20656
|
}
|
|
20510
|
-
|
|
20511
20657
|
//#endregion
|
|
20512
20658
|
//#region packages/compiler-vapor/src/generators/component.ts
|
|
20513
20659
|
function genCreateComponent(operation, context) {
|
|
@@ -20529,11 +20675,11 @@ function genCreateComponent(operation, context) {
|
|
|
20529
20675
|
];
|
|
20530
20676
|
}, []),
|
|
20531
20677
|
`const n${operation.id} = `,
|
|
20532
|
-
...genCall(operation.dynamic && !operation.dynamic.isStatic ? helper("createDynamicComponent") : operation.
|
|
20678
|
+
...genCall(operation.dynamic && !operation.dynamic.isStatic ? helper("createDynamicComponent") : operation.useCreateElement ? helper("createPlainElement") : operation.asset ? helper("createComponentWithFallback") : helper("createComponent"), tag, rawProps, rawSlots, root ? "true" : false, once && "true"),
|
|
20533
20679
|
...genDirectivesForElement(operation.id, context)
|
|
20534
20680
|
];
|
|
20535
20681
|
function genTag() {
|
|
20536
|
-
if (operation.
|
|
20682
|
+
if (operation.useCreateElement) return JSON.stringify(operation.tag);
|
|
20537
20683
|
else if (operation.dynamic) if (operation.dynamic.isStatic) return genCall(helper("resolveDynamicComponent"), genExpression(operation.dynamic, context));
|
|
20538
20684
|
else return [
|
|
20539
20685
|
"() => (",
|
|
@@ -20681,7 +20827,7 @@ function genDynamicProps(props, context) {
|
|
|
20681
20827
|
];
|
|
20682
20828
|
entries.push([
|
|
20683
20829
|
...updateKey,
|
|
20684
|
-
":
|
|
20830
|
+
": ",
|
|
20685
20831
|
...genModelHandler(p.values[0], context)
|
|
20686
20832
|
]);
|
|
20687
20833
|
const { modelModifiers } = p;
|
|
@@ -20692,10 +20838,10 @@ function genDynamicProps(props, context) {
|
|
|
20692
20838
|
" + \"Modifiers\"]"
|
|
20693
20839
|
];
|
|
20694
20840
|
const modifiersVal = genDirectiveModifiers(modelModifiers);
|
|
20695
|
-
entries.push([...modifiersKey, `:
|
|
20841
|
+
entries.push([...modifiersKey, `: { ${modifiersVal} }`]);
|
|
20696
20842
|
}
|
|
20697
20843
|
expr = genMulti(DELIMITERS_OBJECT_NEWLINE, ...entries);
|
|
20698
|
-
} else expr = genMulti(DELIMITERS_OBJECT, genProp(p, context));
|
|
20844
|
+
} else expr = genMulti(DELIMITERS_OBJECT, genProp(p, context, false, false));
|
|
20699
20845
|
else {
|
|
20700
20846
|
expr = genExpression(p.value, context);
|
|
20701
20847
|
if (p.handler) expr = genCall(helper("toHandlers"), expr);
|
|
@@ -20708,12 +20854,12 @@ function genDynamicProps(props, context) {
|
|
|
20708
20854
|
}
|
|
20709
20855
|
if (frags.length) return genMulti(DELIMITERS_ARRAY_NEWLINE, ...frags);
|
|
20710
20856
|
}
|
|
20711
|
-
function genProp(prop, context, isStatic) {
|
|
20857
|
+
function genProp(prop, context, isStatic, wrapHandler = true) {
|
|
20712
20858
|
const values = genPropValue(prop.values, context);
|
|
20713
20859
|
return [
|
|
20714
20860
|
...genPropKey(prop, context),
|
|
20715
20861
|
": ",
|
|
20716
|
-
...prop.handler ? genEventHandler(context, prop.values, prop.handlerModifiers, true,
|
|
20862
|
+
...prop.handler ? genEventHandler(context, prop.values, prop.handlerModifiers, true, wrapHandler) : isStatic ? [
|
|
20717
20863
|
"() => (",
|
|
20718
20864
|
...values,
|
|
20719
20865
|
")"
|
|
@@ -20750,11 +20896,23 @@ function genDynamicSlot(slot, context, withFunction = false) {
|
|
|
20750
20896
|
frag = genConditionalSlot(slot, context);
|
|
20751
20897
|
break;
|
|
20752
20898
|
}
|
|
20753
|
-
|
|
20899
|
+
if (!withFunction) return frag;
|
|
20900
|
+
return needsDynamicSlotSourceCtx(slot) ? [
|
|
20901
|
+
`${context.helper("withVaporCtx")}(() => (`,
|
|
20902
|
+
...frag,
|
|
20903
|
+
"))"
|
|
20904
|
+
] : [
|
|
20754
20905
|
"() => (",
|
|
20755
20906
|
...frag,
|
|
20756
20907
|
")"
|
|
20757
|
-
]
|
|
20908
|
+
];
|
|
20909
|
+
}
|
|
20910
|
+
function needsDynamicSlotSourceCtx(slot) {
|
|
20911
|
+
switch (slot.slotType) {
|
|
20912
|
+
case 1: return needsVaporCtx(slot.fn);
|
|
20913
|
+
case 2: return needsVaporCtx(slot.fn);
|
|
20914
|
+
case 3: return needsDynamicSlotSourceCtx(slot.positive) || (slot.negative ? needsDynamicSlotSourceCtx(slot.negative) : false);
|
|
20915
|
+
}
|
|
20758
20916
|
}
|
|
20759
20917
|
function genBasicDynamicSlot(slot, context) {
|
|
20760
20918
|
const { name, fn } = slot;
|
|
@@ -20800,7 +20958,7 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
20800
20958
|
let propsName;
|
|
20801
20959
|
let exitScope;
|
|
20802
20960
|
let depth;
|
|
20803
|
-
const { props,
|
|
20961
|
+
const { props, node } = oper;
|
|
20804
20962
|
const idToPathMap = props ? parseValueDestructure(props, context) : /* @__PURE__ */ new Map();
|
|
20805
20963
|
if (props) if (props.ast) {
|
|
20806
20964
|
[depth, exitScope] = context.enterScope();
|
|
@@ -20810,16 +20968,6 @@ function genSlotBlockWithProps(oper, context) {
|
|
|
20810
20968
|
if (propsName) idMap[propsName] = null;
|
|
20811
20969
|
let blockFn = context.withId(() => genBlock(oper, context, propsName ? [propsName] : []), idMap);
|
|
20812
20970
|
exitScope && exitScope();
|
|
20813
|
-
if (key) blockFn = [
|
|
20814
|
-
`() => {`,
|
|
20815
|
-
INDENT_START,
|
|
20816
|
-
NEWLINE,
|
|
20817
|
-
`return `,
|
|
20818
|
-
...genCall(context.helper("createKeyedFragment"), [`() => `, ...genExpression(key, context)], blockFn),
|
|
20819
|
-
INDENT_END,
|
|
20820
|
-
NEWLINE,
|
|
20821
|
-
`}`
|
|
20822
|
-
];
|
|
20823
20971
|
if (node.type === 1) {
|
|
20824
20972
|
if (needsVaporCtx(oper)) blockFn = [
|
|
20825
20973
|
`${context.helper("withVaporCtx")}(`,
|
|
@@ -20845,11 +20993,11 @@ function hasComponentOrSlotInBlock(block) {
|
|
|
20845
20993
|
function hasComponentOrSlotInDynamic(dynamic) {
|
|
20846
20994
|
if (dynamic.operation) {
|
|
20847
20995
|
const type = dynamic.operation.type;
|
|
20848
|
-
if (type ===
|
|
20849
|
-
if (type ===
|
|
20996
|
+
if (type === 12 || type === 13) return true;
|
|
20997
|
+
if (type === 15) {
|
|
20850
20998
|
if (hasComponentOrSlotInIf(dynamic.operation)) return true;
|
|
20851
20999
|
}
|
|
20852
|
-
if (type ===
|
|
21000
|
+
if (type === 16) {
|
|
20853
21001
|
if (hasComponentOrSlotInBlock(dynamic.operation.render)) return true;
|
|
20854
21002
|
}
|
|
20855
21003
|
}
|
|
@@ -20858,12 +21006,12 @@ function hasComponentOrSlotInDynamic(dynamic) {
|
|
|
20858
21006
|
}
|
|
20859
21007
|
function hasComponentOrSlotInOperations(operations) {
|
|
20860
21008
|
for (const op of operations) switch (op.type) {
|
|
20861
|
-
case
|
|
20862
|
-
case
|
|
20863
|
-
case
|
|
21009
|
+
case 12:
|
|
21010
|
+
case 13: return true;
|
|
21011
|
+
case 15:
|
|
20864
21012
|
if (hasComponentOrSlotInIf(op)) return true;
|
|
20865
21013
|
break;
|
|
20866
|
-
case
|
|
21014
|
+
case 16:
|
|
20867
21015
|
if (hasComponentOrSlotInBlock(op.render)) return true;
|
|
20868
21016
|
break;
|
|
20869
21017
|
}
|
|
@@ -20875,7 +21023,6 @@ function hasComponentOrSlotInIf(node) {
|
|
|
20875
21023
|
else return hasComponentOrSlotInBlock(node.negative);
|
|
20876
21024
|
return false;
|
|
20877
21025
|
}
|
|
20878
|
-
|
|
20879
21026
|
//#endregion
|
|
20880
21027
|
//#region packages/compiler-vapor/src/generators/slotOutlet.ts
|
|
20881
21028
|
function genSlotOutlet(oper, context) {
|
|
@@ -20892,7 +21039,22 @@ function genSlotOutlet(oper, context) {
|
|
|
20892
21039
|
push(NEWLINE, `const n${id} = `, ...genCall(helper("createSlot"), nameExpr, genRawProps(oper.props, context) || "null", fallbackArg, noSlotted && "true", once && "true"));
|
|
20893
21040
|
return frag;
|
|
20894
21041
|
}
|
|
20895
|
-
|
|
21042
|
+
//#endregion
|
|
21043
|
+
//#region packages/compiler-vapor/src/generators/key.ts
|
|
21044
|
+
function genKey(oper, context) {
|
|
21045
|
+
const { id, value, block } = oper;
|
|
21046
|
+
const [frag, push] = buildCodeFragment();
|
|
21047
|
+
const blockFn = genBlock(block, context);
|
|
21048
|
+
push(NEWLINE, `const n${id} = `, ...genCall(context.helper("createKeyedFragment"), [
|
|
21049
|
+
`() => (`,
|
|
21050
|
+
...genExpression(value, context),
|
|
21051
|
+
")"
|
|
21052
|
+
], blockFn));
|
|
21053
|
+
return frag;
|
|
21054
|
+
}
|
|
21055
|
+
function genSetBlockKey(oper, context) {
|
|
21056
|
+
return [NEWLINE, ...genCall(context.helper("setBlockKey"), `n${oper.element}`, genExpression(oper.value, context))];
|
|
21057
|
+
}
|
|
20896
21058
|
//#endregion
|
|
20897
21059
|
//#region packages/compiler-vapor/src/generators/operation.ts
|
|
20898
21060
|
function genOperations(opers, context) {
|
|
@@ -20908,26 +21070,26 @@ function genOperationWithInsertionState(oper, context) {
|
|
|
20908
21070
|
}
|
|
20909
21071
|
function genOperation(oper, context) {
|
|
20910
21072
|
switch (oper.type) {
|
|
20911
|
-
case 2: return
|
|
20912
|
-
case 3: return
|
|
20913
|
-
case 4: return
|
|
20914
|
-
case 5: return
|
|
20915
|
-
case 6: return
|
|
20916
|
-
case 7: return
|
|
20917
|
-
case 8: return
|
|
20918
|
-
case 9: return
|
|
20919
|
-
case 10: return
|
|
20920
|
-
case
|
|
20921
|
-
case 15: return
|
|
20922
|
-
case
|
|
20923
|
-
case
|
|
20924
|
-
case
|
|
20925
|
-
case
|
|
20926
|
-
case
|
|
20927
|
-
case 18: return
|
|
20928
|
-
|
|
20929
|
-
|
|
20930
|
-
|
|
21073
|
+
case 2: return genSetBlockKey(oper, context);
|
|
21074
|
+
case 3: return genSetProp(oper, context);
|
|
21075
|
+
case 4: return genDynamicProps$1(oper, context);
|
|
21076
|
+
case 5: return genSetText(oper, context);
|
|
21077
|
+
case 6: return genSetEvent(oper, context);
|
|
21078
|
+
case 7: return genSetDynamicEvents(oper, context);
|
|
21079
|
+
case 8: return genSetHtml(oper, context);
|
|
21080
|
+
case 9: return genSetTemplateRef(oper, context);
|
|
21081
|
+
case 10: return genInsertNode(oper, context);
|
|
21082
|
+
case 11: return genPrependNode(oper, context);
|
|
21083
|
+
case 15: return genIf(oper, context);
|
|
21084
|
+
case 16: return genFor(oper, context);
|
|
21085
|
+
case 17: return genKey(oper, context);
|
|
21086
|
+
case 12: return genCreateComponent(oper, context);
|
|
21087
|
+
case 13: return genSlotOutlet(oper, context);
|
|
21088
|
+
case 14: return genBuiltinDirective(oper, context);
|
|
21089
|
+
case 18: return genGetTextChild(oper, context);
|
|
21090
|
+
case 19: return [];
|
|
21091
|
+
case 20: return [];
|
|
21092
|
+
default: throw new Error(`Unhandled operation type in genOperation: ${oper}`);
|
|
20931
21093
|
}
|
|
20932
21094
|
}
|
|
20933
21095
|
function genEffects(effects, context, genExtraFrag) {
|
|
@@ -20967,22 +21129,24 @@ function genEffect({ operations }, context) {
|
|
|
20967
21129
|
return frag;
|
|
20968
21130
|
}
|
|
20969
21131
|
function genInsertionState(operation, context) {
|
|
20970
|
-
const { parent, anchor, logicalIndex, append
|
|
20971
|
-
return [NEWLINE, ...genCall(context.helper("setInsertionState"), `n${parent}`, anchor == null ? void 0 : anchor === -1 ? `0` : append ? "null" : `n${anchor}`, logicalIndex !== void 0 ? String(logicalIndex) : void 0
|
|
21132
|
+
const { parent, anchor, logicalIndex, append } = operation;
|
|
21133
|
+
return [NEWLINE, ...genCall(context.helper("setInsertionState"), `n${parent}`, anchor == null ? void 0 : anchor === -1 ? `0` : append ? "null" : `n${anchor}`, logicalIndex !== void 0 ? String(logicalIndex) : void 0)];
|
|
20972
21134
|
}
|
|
20973
|
-
|
|
20974
21135
|
//#endregion
|
|
20975
21136
|
//#region packages/compiler-vapor/src/generators/template.ts
|
|
20976
|
-
function genTemplates(templates,
|
|
21137
|
+
function genTemplates(templates, context) {
|
|
20977
21138
|
const result = [];
|
|
20978
|
-
|
|
20979
|
-
|
|
20980
|
-
|
|
20981
|
-
|
|
21139
|
+
templates.forEach(({ content, ns, root, static: isStatic }, i) => {
|
|
21140
|
+
let args = JSON.stringify(content).replace(IMPORT_EXPR_RE, `" + $1 + "`);
|
|
21141
|
+
if (root) args += ", true";
|
|
21142
|
+
else if (isStatic || ns) args += ", false";
|
|
21143
|
+
if (isStatic || ns) args += `, ${isStatic ? "true" : "false"}`;
|
|
21144
|
+
if (ns) args += `, ${ns}`;
|
|
21145
|
+
result.push(`const ${context.tName(i)} = ${context.helper("template")}(${args})\n`);
|
|
20982
21146
|
});
|
|
20983
21147
|
return result.join("");
|
|
20984
21148
|
}
|
|
20985
|
-
function genSelf(dynamic, context) {
|
|
21149
|
+
function genSelf(dynamic, context, flushBeforeDynamic) {
|
|
20986
21150
|
const [frag, push] = buildCodeFragment();
|
|
20987
21151
|
const { id, template, operation, hasDynamicChild } = dynamic;
|
|
20988
21152
|
if (id !== void 0 && template !== void 0) {
|
|
@@ -20990,10 +21154,10 @@ function genSelf(dynamic, context) {
|
|
|
20990
21154
|
push(...genDirectivesForElement(id, context));
|
|
20991
21155
|
}
|
|
20992
21156
|
if (operation) push(...genOperationWithInsertionState(operation, context));
|
|
20993
|
-
if (hasDynamicChild) push(...genChildren(dynamic, context, push, `n${id}
|
|
21157
|
+
if (hasDynamicChild) push(...genChildren(dynamic, context, push, `n${id}`, flushBeforeDynamic));
|
|
20994
21158
|
return frag;
|
|
20995
21159
|
}
|
|
20996
|
-
function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}
|
|
21160
|
+
function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`, flushBeforeDynamic) {
|
|
20997
21161
|
const { helper } = context;
|
|
20998
21162
|
const [frag, push] = buildCodeFragment();
|
|
20999
21163
|
const { children } = dynamic;
|
|
@@ -21002,12 +21166,14 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
|
|
|
21002
21166
|
for (const [index, child] of children.entries()) {
|
|
21003
21167
|
if (child.flags & 2) offset--;
|
|
21004
21168
|
if (child.flags & 4 && child.template != null) {
|
|
21005
|
-
|
|
21169
|
+
flushBeforeDynamic && flushBeforeDynamic(child, push);
|
|
21170
|
+
push(...genSelf(child, context, flushBeforeDynamic));
|
|
21006
21171
|
continue;
|
|
21007
21172
|
}
|
|
21008
21173
|
const id = child.flags & 1 ? child.flags & 4 ? child.anchor : child.id : void 0;
|
|
21009
21174
|
if (id === void 0 && !child.hasDynamicChild) {
|
|
21010
|
-
|
|
21175
|
+
flushBeforeDynamic && flushBeforeDynamic(child, push);
|
|
21176
|
+
push(...genSelf(child, context, flushBeforeDynamic));
|
|
21011
21177
|
continue;
|
|
21012
21178
|
}
|
|
21013
21179
|
const elementIndex = index + offset;
|
|
@@ -21023,14 +21189,16 @@ function genChildren(dynamic, context, pushBlock, from = `n${dynamic.id}`) {
|
|
|
21023
21189
|
else if (elementIndex > 1) init = genCall(helper("nthChild"), from, String(elementIndex), logicalIndex);
|
|
21024
21190
|
pushBlock(...init);
|
|
21025
21191
|
}
|
|
21026
|
-
if (id === child.anchor && !child.hasDynamicChild)
|
|
21192
|
+
if (id === child.anchor && !child.hasDynamicChild) {
|
|
21193
|
+
flushBeforeDynamic && flushBeforeDynamic(child, push);
|
|
21194
|
+
push(...genSelf(child, context, flushBeforeDynamic));
|
|
21195
|
+
}
|
|
21027
21196
|
if (id !== void 0) push(...genDirectivesForElement(id, context));
|
|
21028
21197
|
prev = [variable, elementIndex];
|
|
21029
|
-
push(...genChildren(child, context, pushBlock, variable));
|
|
21198
|
+
push(...genChildren(child, context, pushBlock, variable, flushBeforeDynamic));
|
|
21030
21199
|
}
|
|
21031
21200
|
return frag;
|
|
21032
21201
|
}
|
|
21033
|
-
|
|
21034
21202
|
//#endregion
|
|
21035
21203
|
//#region packages/compiler-vapor/src/generators/block.ts
|
|
21036
21204
|
function genBlock(oper, context, args = [], root) {
|
|
@@ -21058,11 +21226,30 @@ function genBlockContent(block, context, root, genEffectsExtraFrag) {
|
|
|
21058
21226
|
}
|
|
21059
21227
|
genResolveAssets("directive", "resolveDirective");
|
|
21060
21228
|
}
|
|
21061
|
-
|
|
21062
|
-
|
|
21063
|
-
|
|
21064
|
-
|
|
21065
|
-
|
|
21229
|
+
let operationIndex = 0;
|
|
21230
|
+
let effectIndex = 0;
|
|
21231
|
+
const flushPendingOperations = (operationEnd, effectEnd, push) => {
|
|
21232
|
+
while (operationIndex < operationEnd) {
|
|
21233
|
+
push(...genOperationWithInsertionState(operation[operationIndex], context));
|
|
21234
|
+
operationIndex++;
|
|
21235
|
+
}
|
|
21236
|
+
if (effectIndex < effectEnd) {
|
|
21237
|
+
push(...genEffects(effect.slice(effectIndex, effectEnd), context));
|
|
21238
|
+
effectIndex = effectEnd;
|
|
21239
|
+
}
|
|
21240
|
+
};
|
|
21241
|
+
const flushBeforeDynamic = (dynamic, push) => {
|
|
21242
|
+
const operation = dynamic.operation;
|
|
21243
|
+
if (operation && isBlockOperation(operation) && operation.operationIndex !== void 0 && operation.effectIndex !== void 0) flushPendingOperations(operation.operationIndex, operation.effectIndex, push);
|
|
21244
|
+
};
|
|
21245
|
+
for (const child of dynamic.children) {
|
|
21246
|
+
flushBeforeDynamic(child, push);
|
|
21247
|
+
push(...genSelf(child, context, flushBeforeDynamic));
|
|
21248
|
+
}
|
|
21249
|
+
for (const child of dynamic.children) if (!child.hasDynamicChild) push(...genChildren(child, context, push, `n${child.id}`, flushBeforeDynamic));
|
|
21250
|
+
if (operationIndex < operation.length) push(...genOperations(operation.slice(operationIndex), context));
|
|
21251
|
+
if (effectIndex < effect.length) push(...genEffects(effect.slice(effectIndex), context, genEffectsExtraFrag));
|
|
21252
|
+
else if (genEffectsExtraFrag) push(...genEffects([], context, genEffectsExtraFrag));
|
|
21066
21253
|
push(NEWLINE, `return `);
|
|
21067
21254
|
const returnNodes = returns.map((n) => `n${n}`);
|
|
21068
21255
|
push(...returnNodes.length > 1 ? genMulti(DELIMITERS_ARRAY, ...returnNodes) : [returnNodes[0] || "null"]);
|
|
@@ -21072,7 +21259,6 @@ function genBlockContent(block, context, root, genEffectsExtraFrag) {
|
|
|
21072
21259
|
for (const name of context.ir[kind]) push(NEWLINE, `const ${toValidAssetId(name, kind)} = `, ...genCall(context.helper(helper), JSON.stringify(name)));
|
|
21073
21260
|
}
|
|
21074
21261
|
}
|
|
21075
|
-
|
|
21076
21262
|
//#endregion
|
|
21077
21263
|
//#region packages/compiler-vapor/src/generate.ts
|
|
21078
21264
|
const idWithTrailingDigitsRE = /^([A-Za-z_$][\w$]*)(\d+)$/;
|
|
@@ -21149,7 +21335,7 @@ var CodegenContext = class {
|
|
|
21149
21335
|
this.nextIdMap = /* @__PURE__ */ new Map();
|
|
21150
21336
|
this.lastIdMap = /* @__PURE__ */ new Map();
|
|
21151
21337
|
this.lastTIndex = -1;
|
|
21152
|
-
|
|
21338
|
+
const defaultOptions = {
|
|
21153
21339
|
mode: "module",
|
|
21154
21340
|
prefixIdentifiers: true,
|
|
21155
21341
|
sourceMap: false,
|
|
@@ -21164,7 +21350,8 @@ var CodegenContext = class {
|
|
|
21164
21350
|
inline: false,
|
|
21165
21351
|
bindingMetadata: {},
|
|
21166
21352
|
expressionPlugins: []
|
|
21167
|
-
}
|
|
21353
|
+
};
|
|
21354
|
+
this.options = extend(defaultOptions, options);
|
|
21168
21355
|
this.block = ir.block;
|
|
21169
21356
|
this.bindingNames = new Set(this.options.bindingMetadata ? Object.keys(this.options.bindingMetadata) : []);
|
|
21170
21357
|
this.initNextIdMap();
|
|
@@ -21181,12 +21368,11 @@ function generate(ir, options = {}) {
|
|
|
21181
21368
|
if (!inline) push(NEWLINE, `export function ${functionName}(${signature}) {`);
|
|
21182
21369
|
push(INDENT_START);
|
|
21183
21370
|
if (ir.hasTemplateRef) push(NEWLINE, `const ${setTemplateRefIdent} = ${context.helper("createTemplateRefSetter")}()`);
|
|
21184
|
-
if (ir.hasDeferredVShow) push(NEWLINE, `const deferredApplyVShows = []`);
|
|
21185
21371
|
push(...genBlockContent(ir.block, context, true));
|
|
21186
21372
|
push(INDENT_END, NEWLINE);
|
|
21187
21373
|
if (!inline) push("}");
|
|
21188
21374
|
const delegates = genDelegates(context);
|
|
21189
|
-
const templates = genTemplates(ir.template
|
|
21375
|
+
const templates = genTemplates(ir.template.entries, context);
|
|
21190
21376
|
const preamble = genHelperImports(context) + genAssetImports(context) + templates + delegates;
|
|
21191
21377
|
const newlineCount = [...preamble].filter((c) => c === "\n").length;
|
|
21192
21378
|
if (newlineCount && !inline) frag.unshift(...new Array(newlineCount).fill(LF));
|
|
@@ -21217,85 +21403,104 @@ function genAssetImports({ ir }) {
|
|
|
21217
21403
|
}
|
|
21218
21404
|
return imports;
|
|
21219
21405
|
}
|
|
21220
|
-
|
|
21221
21406
|
//#endregion
|
|
21222
|
-
//#region packages/compiler-vapor/src/transforms/
|
|
21223
|
-
|
|
21224
|
-
|
|
21225
|
-
|
|
21226
|
-
|
|
21227
|
-
const childContext = context.create(child, i);
|
|
21228
|
-
transformNode(childContext);
|
|
21229
|
-
const childDynamic = childContext.dynamic;
|
|
21230
|
-
if (isFragment) {
|
|
21231
|
-
childContext.reference();
|
|
21232
|
-
childContext.registerTemplate();
|
|
21233
|
-
if (!(childDynamic.flags & 2) || childDynamic.flags & 4) context.block.returns.push(childContext.dynamic.id);
|
|
21234
|
-
} else context.childrenTemplate.push(childContext.template);
|
|
21235
|
-
if (childDynamic.hasDynamicChild || childDynamic.id !== void 0 || childDynamic.flags & 2 || childDynamic.flags & 4) context.dynamic.hasDynamicChild = true;
|
|
21236
|
-
childDynamic.type = child.type;
|
|
21237
|
-
if (child.type === 1) childDynamic.tag = child.tag;
|
|
21238
|
-
context.dynamic.children[i] = childDynamic;
|
|
21407
|
+
//#region packages/compiler-vapor/src/transforms/vBind.ts
|
|
21408
|
+
function normalizeBindShorthand(arg, context) {
|
|
21409
|
+
if (arg.type !== 4 || !arg.isStatic) {
|
|
21410
|
+
context.options.onError(createCompilerError(53, arg.loc));
|
|
21411
|
+
return createSimpleExpression("", true, arg.loc);
|
|
21239
21412
|
}
|
|
21240
|
-
|
|
21413
|
+
const exp = createSimpleExpression(camelize(arg.content), false, arg.loc);
|
|
21414
|
+
exp.ast = null;
|
|
21415
|
+
return exp;
|
|
21416
|
+
}
|
|
21417
|
+
const transformVBind = (dir, node, context) => {
|
|
21418
|
+
const { loc, modifiers } = dir;
|
|
21419
|
+
let { exp } = dir;
|
|
21420
|
+
let arg = dir.arg;
|
|
21421
|
+
const modifiersString = modifiers.map((s) => s.content);
|
|
21422
|
+
if (!exp) exp = normalizeBindShorthand(arg, context);
|
|
21423
|
+
if (!exp.content.trim()) {
|
|
21424
|
+
context.options.onError(createCompilerError(34, loc));
|
|
21425
|
+
exp = createSimpleExpression("", true, loc);
|
|
21426
|
+
}
|
|
21427
|
+
const isComponent = node.tagType === 1;
|
|
21428
|
+
const isDom2DataAttr = context.options.platform && arg.isStatic && arg.content.length > 5 && arg.content.startsWith("data-");
|
|
21429
|
+
exp = resolveExpression(exp, isComponent || isDom2DataAttr);
|
|
21430
|
+
arg = resolveExpression(arg);
|
|
21431
|
+
if (arg.isStatic && isReservedProp(arg.content)) return;
|
|
21432
|
+
let camel = false;
|
|
21433
|
+
if (modifiersString.includes("camel")) if (arg.isStatic) arg = extend({}, arg, { content: camelize(arg.content) });
|
|
21434
|
+
else camel = true;
|
|
21435
|
+
return {
|
|
21436
|
+
key: arg,
|
|
21437
|
+
value: exp,
|
|
21438
|
+
loc,
|
|
21439
|
+
runtimeCamelize: camel,
|
|
21440
|
+
modifier: modifiersString.includes("prop") ? "." : modifiersString.includes("attr") ? "^" : void 0
|
|
21441
|
+
};
|
|
21241
21442
|
};
|
|
21242
|
-
|
|
21243
|
-
|
|
21244
|
-
|
|
21245
|
-
|
|
21246
|
-
|
|
21247
|
-
|
|
21248
|
-
|
|
21249
|
-
|
|
21250
|
-
|
|
21251
|
-
|
|
21252
|
-
|
|
21253
|
-
|
|
21254
|
-
|
|
21255
|
-
|
|
21256
|
-
|
|
21257
|
-
|
|
21258
|
-
|
|
21259
|
-
|
|
21260
|
-
|
|
21261
|
-
const anchor = prevDynamics[0].anchor = context.increaseId();
|
|
21262
|
-
registerInsertion(prevDynamics, context, anchor);
|
|
21263
|
-
} else registerInsertion(prevDynamics, context, -1);
|
|
21264
|
-
dynamicCount += prevDynamics.length;
|
|
21265
|
-
prevDynamics = [];
|
|
21266
|
-
}
|
|
21267
|
-
staticCount++;
|
|
21268
|
-
logicalIndex++;
|
|
21269
|
-
}
|
|
21443
|
+
//#endregion
|
|
21444
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/typeof.js
|
|
21445
|
+
function _typeof(o) {
|
|
21446
|
+
"@babel/helpers - typeof";
|
|
21447
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
21448
|
+
return typeof o;
|
|
21449
|
+
} : function(o) {
|
|
21450
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
21451
|
+
}, _typeof(o);
|
|
21452
|
+
}
|
|
21453
|
+
//#endregion
|
|
21454
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPrimitive.js
|
|
21455
|
+
function toPrimitive(t, r) {
|
|
21456
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
21457
|
+
var e = t[Symbol.toPrimitive];
|
|
21458
|
+
if (void 0 !== e) {
|
|
21459
|
+
var i = e.call(t, r || "default");
|
|
21460
|
+
if ("object" != _typeof(i)) return i;
|
|
21461
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
21270
21462
|
}
|
|
21271
|
-
|
|
21272
|
-
if (lastInsertionChild && lastInsertionChild.operation) lastInsertionChild.operation.last = true;
|
|
21463
|
+
return ("string" === r ? String : Number)(t);
|
|
21273
21464
|
}
|
|
21274
|
-
|
|
21275
|
-
|
|
21276
|
-
|
|
21277
|
-
|
|
21278
|
-
|
|
21279
|
-
|
|
21280
|
-
|
|
21281
|
-
|
|
21282
|
-
|
|
21465
|
+
//#endregion
|
|
21466
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/toPropertyKey.js
|
|
21467
|
+
function toPropertyKey(t) {
|
|
21468
|
+
var i = toPrimitive(t, "string");
|
|
21469
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
21470
|
+
}
|
|
21471
|
+
//#endregion
|
|
21472
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/defineProperty.js
|
|
21473
|
+
function _defineProperty(e, r, t) {
|
|
21474
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
21475
|
+
value: t,
|
|
21476
|
+
enumerable: !0,
|
|
21477
|
+
configurable: !0,
|
|
21478
|
+
writable: !0
|
|
21479
|
+
}) : e[r] = t, e;
|
|
21480
|
+
}
|
|
21481
|
+
//#endregion
|
|
21482
|
+
//#region \0@oxc-project+runtime@0.129.0/helpers/objectSpread2.js
|
|
21483
|
+
function ownKeys(e, r) {
|
|
21484
|
+
var t = Object.keys(e);
|
|
21485
|
+
if (Object.getOwnPropertySymbols) {
|
|
21486
|
+
var o = Object.getOwnPropertySymbols(e);
|
|
21487
|
+
r && (o = o.filter(function(r) {
|
|
21488
|
+
return Object.getOwnPropertyDescriptor(e, r).enumerable;
|
|
21489
|
+
})), t.push.apply(t, o);
|
|
21490
|
+
}
|
|
21491
|
+
return t;
|
|
21492
|
+
}
|
|
21493
|
+
function _objectSpread2(e) {
|
|
21494
|
+
for (var r = 1; r < arguments.length; r++) {
|
|
21495
|
+
var t = null != arguments[r] ? arguments[r] : {};
|
|
21496
|
+
r % 2 ? ownKeys(Object(t), !0).forEach(function(r) {
|
|
21497
|
+
_defineProperty(e, r, t[r]);
|
|
21498
|
+
}) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function(r) {
|
|
21499
|
+
Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r));
|
|
21283
21500
|
});
|
|
21284
|
-
else if (child.operation && isBlockOperation(child.operation)) {
|
|
21285
|
-
child.operation.parent = context.reference();
|
|
21286
|
-
child.operation.anchor = anchor;
|
|
21287
|
-
child.operation.logicalIndex = logicalIndex;
|
|
21288
|
-
child.operation.append = append;
|
|
21289
|
-
}
|
|
21290
21501
|
}
|
|
21502
|
+
return e;
|
|
21291
21503
|
}
|
|
21292
|
-
|
|
21293
|
-
//#endregion
|
|
21294
|
-
//#region packages/compiler-vapor/src/transforms/vOnce.ts
|
|
21295
|
-
const transformVOnce = (node, context) => {
|
|
21296
|
-
if (node.type === 1 && findDir$1(node, "once", true)) context.inVOnce = true;
|
|
21297
|
-
};
|
|
21298
|
-
|
|
21299
21504
|
//#endregion
|
|
21300
21505
|
//#region packages/compiler-vapor/src/transforms/transformElement.ts
|
|
21301
21506
|
const isReservedProp = /* @__PURE__ */ makeMap(",key,ref,ref_for,ref_key,");
|
|
@@ -21312,13 +21517,14 @@ const transformElement = (node, context) => {
|
|
|
21312
21517
|
return function postTransformElement() {
|
|
21313
21518
|
({node} = context);
|
|
21314
21519
|
if (!(node.type === 1 && (node.tagType === 0 || node.tagType === 1))) return;
|
|
21315
|
-
const
|
|
21316
|
-
const isComponent = node.tagType === 1 ||
|
|
21520
|
+
const useCreateElement = shouldUseCreateElement(node, context);
|
|
21521
|
+
const isComponent = node.tagType === 1 || useCreateElement;
|
|
21317
21522
|
const isDynamicComponent = isComponentTag(node.tag);
|
|
21523
|
+
const staticKey = resolveStaticKey(node, context, isComponent);
|
|
21318
21524
|
const propsResult = buildProps(node, context, isComponent, isDynamicComponent, getEffectIndex);
|
|
21319
21525
|
const singleRoot = isSingleRoot(context);
|
|
21320
|
-
if (isComponent) transformComponentElement(node, propsResult, singleRoot, context, isDynamicComponent,
|
|
21321
|
-
else transformNativeElement(node, propsResult, singleRoot, context, getEffectIndex, context.root === context.effectiveParent || canOmitEndTag(node, context), getOperationIndex);
|
|
21526
|
+
if (isComponent) transformComponentElement(node, propsResult, staticKey, singleRoot, context, isDynamicComponent, useCreateElement);
|
|
21527
|
+
else transformNativeElement(node, propsResult, staticKey, singleRoot, context, getEffectIndex, context.root === context.effectiveParent || canOmitEndTag(node, context), getOperationIndex);
|
|
21322
21528
|
if (parentSlots) context.slots = parentSlots;
|
|
21323
21529
|
};
|
|
21324
21530
|
};
|
|
@@ -21326,11 +21532,35 @@ function canOmitEndTag(node, context) {
|
|
|
21326
21532
|
const { block, parent } = context;
|
|
21327
21533
|
if (!parent) return false;
|
|
21328
21534
|
if (block !== parent.block) return true;
|
|
21535
|
+
if (context.templateCloseTags && (context.templateCloseTags.has(node.tag) || isAlwaysCloseTag(node.tag) || isFormattingTag(node.tag)) || context.templateCloseBlocks && isBlockTag(node.tag)) return false;
|
|
21329
21536
|
if (isAlwaysCloseTag(node.tag) && !context.isOnRightmostPath) return false;
|
|
21330
21537
|
if (isFormattingTag(node.tag) || parent.node.type === 1 && node.tag === parent.node.tag) return context.isOnRightmostPath;
|
|
21331
|
-
if (isBlockTag(node.tag) && context.hasInlineAncestorNeedingClose) return false;
|
|
21332
21538
|
return context.isLastEffectiveChild;
|
|
21333
21539
|
}
|
|
21540
|
+
function getChildTemplateCloseState(context) {
|
|
21541
|
+
const { node } = context;
|
|
21542
|
+
if (node.type !== 1 || node.tagType !== 0 || shouldUseCreateElement(node, context)) return;
|
|
21543
|
+
const inSameTemplateAsParent = isInSameTemplateAsParent(context);
|
|
21544
|
+
const inheritedTags = inSameTemplateAsParent ? context.templateCloseTags : void 0;
|
|
21545
|
+
const inheritedBlocks = inSameTemplateAsParent && context.templateCloseBlocks;
|
|
21546
|
+
if (context.root === context.effectiveParent || canOmitEndTag(node, context) || isVoidTag(node.tag)) return inheritedTags || inheritedBlocks ? {
|
|
21547
|
+
tags: inheritedTags,
|
|
21548
|
+
blocks: inheritedBlocks
|
|
21549
|
+
} : void 0;
|
|
21550
|
+
const tags = new Set(inheritedTags);
|
|
21551
|
+
tags.add(node.tag);
|
|
21552
|
+
return {
|
|
21553
|
+
tags,
|
|
21554
|
+
blocks: inheritedBlocks || isInlineTag(node.tag)
|
|
21555
|
+
};
|
|
21556
|
+
}
|
|
21557
|
+
function isInSameTemplateAsParent(context) {
|
|
21558
|
+
const { parent, node, block } = context;
|
|
21559
|
+
if (!parent || block !== parent.block) return false;
|
|
21560
|
+
const parentNode = parent.node;
|
|
21561
|
+
if (parentNode.type !== 1 || parentNode.tagType !== 0) return false;
|
|
21562
|
+
return !shouldUseCreateElement(parentNode, parent) && isValidHTMLNesting(parentNode.tag, node.tag);
|
|
21563
|
+
}
|
|
21334
21564
|
function isSingleRoot(context) {
|
|
21335
21565
|
if (context.inVFor) return false;
|
|
21336
21566
|
let { parent } = context;
|
|
@@ -21341,11 +21571,11 @@ function isSingleRoot(context) {
|
|
|
21341
21571
|
}
|
|
21342
21572
|
return context.root === parent;
|
|
21343
21573
|
}
|
|
21344
|
-
function transformComponentElement(node, propsResult, singleRoot, context, isDynamicComponent,
|
|
21574
|
+
function transformComponentElement(node, propsResult, staticKey, singleRoot, context, isDynamicComponent, useCreateElement) {
|
|
21345
21575
|
const dynamicComponent = isDynamicComponent ? resolveDynamicComponent(node) : void 0;
|
|
21346
21576
|
let { tag } = node;
|
|
21347
21577
|
let asset = true;
|
|
21348
|
-
if (!dynamicComponent && !
|
|
21578
|
+
if (!dynamicComponent && !useCreateElement) {
|
|
21349
21579
|
const { isEasyComponent } = context.options;
|
|
21350
21580
|
const isEasyCom = isEasyComponent && isEasyComponent(tag);
|
|
21351
21581
|
if (!isEasyCom) {
|
|
@@ -21374,10 +21604,12 @@ function transformComponentElement(node, propsResult, singleRoot, context, isDyn
|
|
|
21374
21604
|
}
|
|
21375
21605
|
}
|
|
21376
21606
|
context.dynamic.flags |= 6;
|
|
21377
|
-
|
|
21378
|
-
|
|
21607
|
+
const id = context.reference();
|
|
21608
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
21609
|
+
type: 12,
|
|
21379
21610
|
node,
|
|
21380
|
-
id
|
|
21611
|
+
id
|
|
21612
|
+
}, context.effectBoundary()), {}, {
|
|
21381
21613
|
tag,
|
|
21382
21614
|
props: propsResult[0] ? propsResult[1] : [propsResult[1]],
|
|
21383
21615
|
asset,
|
|
@@ -21385,8 +21617,9 @@ function transformComponentElement(node, propsResult, singleRoot, context, isDyn
|
|
|
21385
21617
|
slots: [...context.slots],
|
|
21386
21618
|
once: context.inVOnce,
|
|
21387
21619
|
dynamic: dynamicComponent,
|
|
21388
|
-
|
|
21389
|
-
};
|
|
21620
|
+
useCreateElement
|
|
21621
|
+
});
|
|
21622
|
+
if (staticKey) context.registerOperation(createSetBlockKey(id, staticKey, node));
|
|
21390
21623
|
context.slots = [];
|
|
21391
21624
|
}
|
|
21392
21625
|
function resolveDynamicComponent(node) {
|
|
@@ -21404,7 +21637,7 @@ function resolveSetupReference(name, context) {
|
|
|
21404
21637
|
}
|
|
21405
21638
|
const dynamicKeys = ["indeterminate"];
|
|
21406
21639
|
const NEEDS_QUOTES_RE = /[\s"'`=<>]/;
|
|
21407
|
-
function transformNativeElement(node, propsResult, singleRoot, context, getEffectIndex, omitEndTag, getOperationIndex) {
|
|
21640
|
+
function transformNativeElement(node, propsResult, staticKey, singleRoot, context, getEffectIndex, omitEndTag, getOperationIndex) {
|
|
21408
21641
|
const isDom2 = !!context.options.platform;
|
|
21409
21642
|
if (isDom2) omitEndTag = false;
|
|
21410
21643
|
const { tag } = node;
|
|
@@ -21412,21 +21645,27 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21412
21645
|
let template = "";
|
|
21413
21646
|
template += `<${tag}`;
|
|
21414
21647
|
if (scopeId) template += ` ${scopeId}`;
|
|
21415
|
-
if (isDom2
|
|
21416
|
-
template += ` gen-
|
|
21417
|
-
|
|
21418
|
-
|
|
21419
|
-
|
|
21648
|
+
if (isDom2) {
|
|
21649
|
+
if (context.effectiveParent === context.root) template += ` gen-vue-id=""`;
|
|
21650
|
+
if (singleRoot) {
|
|
21651
|
+
template += ` gen-flag-flatten=""`;
|
|
21652
|
+
const rootElementTagName = context.options.rootElementTagName;
|
|
21653
|
+
if (rootElementTagName) {
|
|
21654
|
+
template += ` custom-tag-name="${rootElementTagName}"`;
|
|
21655
|
+
if (context.options.rootElementFromUniModule) template += ` gen-root-custom-native="${rootElementTagName}"`;
|
|
21656
|
+
}
|
|
21657
|
+
}
|
|
21420
21658
|
}
|
|
21421
21659
|
const dynamicProps = [];
|
|
21422
21660
|
if (propsResult[0]) {
|
|
21423
21661
|
const [, dynamicArgs, expressions] = propsResult;
|
|
21424
21662
|
context.registerEffect(expressions, {
|
|
21425
|
-
type:
|
|
21663
|
+
type: 4,
|
|
21426
21664
|
node,
|
|
21427
21665
|
element: context.reference(),
|
|
21428
21666
|
props: dynamicArgs,
|
|
21429
|
-
tag
|
|
21667
|
+
tag,
|
|
21668
|
+
root: singleRoot && context.effectiveParent === context.root && context.options.componentType === "component"
|
|
21430
21669
|
}, getEffectIndex);
|
|
21431
21670
|
} else {
|
|
21432
21671
|
const changeProps = [];
|
|
@@ -21454,6 +21693,7 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21454
21693
|
}
|
|
21455
21694
|
let hasStaticStyle = false;
|
|
21456
21695
|
let hasClass = false;
|
|
21696
|
+
const datasetProps = [];
|
|
21457
21697
|
let prevWasQuoted = false;
|
|
21458
21698
|
for (const prop of propsResult[1]) {
|
|
21459
21699
|
const { key, values } = prop;
|
|
@@ -21462,7 +21702,7 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21462
21702
|
dynamicProps.push(key.content);
|
|
21463
21703
|
values[0].isStatic = false;
|
|
21464
21704
|
context.registerEffect(values, {
|
|
21465
|
-
type:
|
|
21705
|
+
type: 20,
|
|
21466
21706
|
node,
|
|
21467
21707
|
prop
|
|
21468
21708
|
}, getEffectIndex);
|
|
@@ -21486,7 +21726,7 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21486
21726
|
if (isDom2 && (key.content === "class" || key.content === "hover-class" || key.content === "style" && context.options.disableStaticStyle)) {
|
|
21487
21727
|
dynamicProps.push(key.content);
|
|
21488
21728
|
context.registerEffect(values, {
|
|
21489
|
-
type:
|
|
21729
|
+
type: 3,
|
|
21490
21730
|
node,
|
|
21491
21731
|
element: context.reference(),
|
|
21492
21732
|
prop,
|
|
@@ -21502,7 +21742,7 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21502
21742
|
} else {
|
|
21503
21743
|
dynamicProps.push(key.content);
|
|
21504
21744
|
context.registerEffect(values, {
|
|
21505
|
-
type:
|
|
21745
|
+
type: 3,
|
|
21506
21746
|
node,
|
|
21507
21747
|
isChangeProp: changeProps.includes(key.content),
|
|
21508
21748
|
element: context.reference(),
|
|
@@ -21512,15 +21752,42 @@ function transformNativeElement(node, propsResult, singleRoot, context, getEffec
|
|
|
21512
21752
|
}
|
|
21513
21753
|
}
|
|
21514
21754
|
if (hasStaticStyle && hasClass) template += ` ext:style`;
|
|
21755
|
+
if (datasetProps.length) {
|
|
21756
|
+
const expressions = datasetProps.flatMap((prop) => prop.values);
|
|
21757
|
+
context.registerEffect(expressions, {
|
|
21758
|
+
type: 3,
|
|
21759
|
+
node,
|
|
21760
|
+
element: context.reference(),
|
|
21761
|
+
prop: _objectSpread2(_objectSpread2({}, datasetProps[0]), {}, { datasetProps }),
|
|
21762
|
+
tag,
|
|
21763
|
+
root: singleRoot && context.effectiveParent === context.root && context.options.componentType === "component"
|
|
21764
|
+
}, getEffectIndex);
|
|
21765
|
+
}
|
|
21515
21766
|
}
|
|
21516
21767
|
template += `>` + context.childrenTemplate.join("");
|
|
21517
21768
|
if (!isVoidTag(tag) && !omitEndTag) template += `</${tag}>`;
|
|
21518
|
-
|
|
21769
|
+
context.templateRoot = singleRoot;
|
|
21519
21770
|
if (context.parent && context.parent.node.type === 1 && !isValidHTMLNesting(context.parent.node.tag, tag)) {
|
|
21520
21771
|
context.reference();
|
|
21521
21772
|
context.dynamic.template = context.pushTemplate(template);
|
|
21522
21773
|
context.dynamic.flags |= 6;
|
|
21523
21774
|
} else context.template += template;
|
|
21775
|
+
if (staticKey) context.registerOperation(createSetBlockKey(context.reference(), staticKey, node));
|
|
21776
|
+
}
|
|
21777
|
+
function resolveStaticKey(node, context, isComponent) {
|
|
21778
|
+
const keyProp = findProp(node, "key", false, true);
|
|
21779
|
+
if (!keyProp) return;
|
|
21780
|
+
if (keyProp.type === 6) return keyProp.value ? createSimpleExpression(keyProp.value.content, true, keyProp.value.loc) : EMPTY_EXPRESSION;
|
|
21781
|
+
const value = keyProp.exp || normalizeBindShorthand(keyProp.arg, context);
|
|
21782
|
+
if (isStaticExpression(value, context.options.bindingMetadata)) return resolveExpression(value, isComponent);
|
|
21783
|
+
}
|
|
21784
|
+
function createSetBlockKey(element, value, node) {
|
|
21785
|
+
return {
|
|
21786
|
+
type: 2,
|
|
21787
|
+
node,
|
|
21788
|
+
element,
|
|
21789
|
+
value
|
|
21790
|
+
};
|
|
21524
21791
|
}
|
|
21525
21792
|
function buildProps(node, context, isComponent, isDynamicComponent, getEffectIndex) {
|
|
21526
21793
|
const props = node.props;
|
|
@@ -21556,7 +21823,7 @@ function buildProps(node, context, isComponent, isDynamicComponent, getEffectInd
|
|
|
21556
21823
|
handler: true
|
|
21557
21824
|
});
|
|
21558
21825
|
} else context.registerEffect([prop.exp], {
|
|
21559
|
-
type:
|
|
21826
|
+
type: 7,
|
|
21560
21827
|
node,
|
|
21561
21828
|
element: context.reference(),
|
|
21562
21829
|
event: prop.exp
|
|
@@ -21565,7 +21832,7 @@ function buildProps(node, context, isComponent, isDynamicComponent, getEffectInd
|
|
|
21565
21832
|
continue;
|
|
21566
21833
|
}
|
|
21567
21834
|
}
|
|
21568
|
-
if (isDynamicComponent && prop.type === 6 && prop.name === "is" || prop.type === 7 && prop.name === "bind" && isStaticArgOf(prop.arg, "is")) continue;
|
|
21835
|
+
if (isDynamicComponent && (prop.type === 6 && prop.name === "is" || prop.type === 7 && prop.name === "bind" && isStaticArgOf(prop.arg, "is"))) continue;
|
|
21569
21836
|
const result = transformProp(prop, node, context);
|
|
21570
21837
|
if (result) {
|
|
21571
21838
|
dynamicExpr.push(result.key, result.value);
|
|
@@ -21601,7 +21868,7 @@ function transformProp(prop, node, context) {
|
|
|
21601
21868
|
if (fromSetup) name = fromSetup;
|
|
21602
21869
|
else context.directive.add(name);
|
|
21603
21870
|
context.registerOperation({
|
|
21604
|
-
type:
|
|
21871
|
+
type: 14,
|
|
21605
21872
|
node,
|
|
21606
21873
|
element: context.reference(),
|
|
21607
21874
|
dir: prop,
|
|
@@ -21643,7 +21910,92 @@ function mergePropValues(existing, incoming) {
|
|
|
21643
21910
|
function isComponentTag(tag) {
|
|
21644
21911
|
return tag === "component" || tag === "Component";
|
|
21645
21912
|
}
|
|
21646
|
-
|
|
21913
|
+
function shouldUseCreateElement(node, context) {
|
|
21914
|
+
return context.options.isCustomElement(node.tag) || node.tagType === 0 && node.tag === "template";
|
|
21915
|
+
}
|
|
21916
|
+
//#endregion
|
|
21917
|
+
//#region packages/compiler-vapor/src/transforms/transformChildren.ts
|
|
21918
|
+
const transformChildren = (node, context) => {
|
|
21919
|
+
const isFragment = node.type === 0 || node.type === 1 && (node.tagType === 3 || node.tagType === 1);
|
|
21920
|
+
if (!isFragment && node.type !== 1) return;
|
|
21921
|
+
const useCreateElement = node.type === 1 && shouldUseCreateElement(node, context);
|
|
21922
|
+
const childTemplateCloseState = !isFragment && !useCreateElement ? getChildTemplateCloseState(context) : void 0;
|
|
21923
|
+
for (const [i, child] of node.children.entries()) {
|
|
21924
|
+
const childContext = context.create(child, i);
|
|
21925
|
+
const isInSameTemplate = childTemplateCloseState && child.type === 1 && child.tagType === 0 && isInSameTemplateAsParent(childContext);
|
|
21926
|
+
childContext.templateCloseTags = isInSameTemplate ? childTemplateCloseState.tags : void 0;
|
|
21927
|
+
childContext.templateCloseBlocks = isInSameTemplate ? childTemplateCloseState.blocks : false;
|
|
21928
|
+
transformNode(childContext);
|
|
21929
|
+
const childDynamic = childContext.dynamic;
|
|
21930
|
+
if (isFragment) {
|
|
21931
|
+
childContext.reference();
|
|
21932
|
+
childContext.registerTemplate();
|
|
21933
|
+
if (!(childDynamic.flags & 2) || childDynamic.flags & 4) context.block.returns.push(childContext.dynamic.id);
|
|
21934
|
+
} else if (useCreateElement) {
|
|
21935
|
+
if (childContext.template !== "" || childDynamic.template != null || childDynamic.id !== void 0 || childDynamic.operation !== void 0 || childDynamic.hasDynamicChild === true) {
|
|
21936
|
+
childContext.reference();
|
|
21937
|
+
childContext.registerTemplate();
|
|
21938
|
+
childDynamic.flags |= 6;
|
|
21939
|
+
}
|
|
21940
|
+
} else context.childrenTemplate.push(childContext.template);
|
|
21941
|
+
if (childDynamic.hasDynamicChild || childDynamic.id !== void 0 || childDynamic.flags & 2 || childDynamic.flags & 4) context.dynamic.hasDynamicChild = true;
|
|
21942
|
+
childDynamic.type = child.type;
|
|
21943
|
+
if (child.type === 1) childDynamic.tag = child.tag;
|
|
21944
|
+
context.dynamic.children[i] = childDynamic;
|
|
21945
|
+
}
|
|
21946
|
+
if (!isFragment) processDynamicChildren(context);
|
|
21947
|
+
};
|
|
21948
|
+
function processDynamicChildren(context) {
|
|
21949
|
+
let prevDynamics = [];
|
|
21950
|
+
let staticCount = 0;
|
|
21951
|
+
const children = context.dynamic.children;
|
|
21952
|
+
let logicalIndex = 0;
|
|
21953
|
+
for (const [index, child] of children.entries()) {
|
|
21954
|
+
if (child.flags & 4) {
|
|
21955
|
+
child.logicalIndex = logicalIndex;
|
|
21956
|
+
prevDynamics.push(child);
|
|
21957
|
+
logicalIndex++;
|
|
21958
|
+
}
|
|
21959
|
+
if (!(child.flags & 2)) {
|
|
21960
|
+
child.logicalIndex = logicalIndex;
|
|
21961
|
+
if (prevDynamics.length) {
|
|
21962
|
+
if (staticCount) {
|
|
21963
|
+
context.childrenTemplate[index - prevDynamics.length] = `<!>`;
|
|
21964
|
+
prevDynamics[0].flags -= 2;
|
|
21965
|
+
const anchor = prevDynamics[0].anchor = context.increaseId();
|
|
21966
|
+
registerInsertion(prevDynamics, context, anchor);
|
|
21967
|
+
} else registerInsertion(prevDynamics, context, -1);
|
|
21968
|
+
prevDynamics = [];
|
|
21969
|
+
}
|
|
21970
|
+
staticCount++;
|
|
21971
|
+
logicalIndex++;
|
|
21972
|
+
}
|
|
21973
|
+
}
|
|
21974
|
+
if (prevDynamics.length) registerInsertion(prevDynamics, context, prevDynamics[0].logicalIndex, true);
|
|
21975
|
+
}
|
|
21976
|
+
function registerInsertion(dynamics, context, anchor, append) {
|
|
21977
|
+
for (const child of dynamics) {
|
|
21978
|
+
const logicalIndex = child.logicalIndex;
|
|
21979
|
+
if (child.template != null) context.registerOperation({
|
|
21980
|
+
type: 10,
|
|
21981
|
+
node: context.node,
|
|
21982
|
+
elements: dynamics.map((child) => child.id),
|
|
21983
|
+
parent: context.reference(),
|
|
21984
|
+
anchor: append ? void 0 : anchor
|
|
21985
|
+
});
|
|
21986
|
+
else if (child.operation && isBlockOperation(child.operation)) {
|
|
21987
|
+
child.operation.parent = context.reference();
|
|
21988
|
+
child.operation.anchor = anchor;
|
|
21989
|
+
child.operation.logicalIndex = logicalIndex;
|
|
21990
|
+
child.operation.append = append;
|
|
21991
|
+
}
|
|
21992
|
+
}
|
|
21993
|
+
}
|
|
21994
|
+
//#endregion
|
|
21995
|
+
//#region packages/compiler-vapor/src/transforms/vOnce.ts
|
|
21996
|
+
const transformVOnce = (node, context) => {
|
|
21997
|
+
if (node.type === 1 && findDir$1(node, "once", true)) context.inVOnce = true;
|
|
21998
|
+
};
|
|
21647
21999
|
//#endregion
|
|
21648
22000
|
//#region packages/compiler-vapor/src/transforms/vHtml.ts
|
|
21649
22001
|
const transformVHtml = (dir, node, context) => {
|
|
@@ -21657,194 +22009,23 @@ const transformVHtml = (dir, node, context) => {
|
|
|
21657
22009
|
context.childrenTemplate.length = 0;
|
|
21658
22010
|
}
|
|
21659
22011
|
context.registerEffect([exp], {
|
|
21660
|
-
type:
|
|
22012
|
+
type: 8,
|
|
21661
22013
|
node,
|
|
21662
22014
|
element: context.reference(),
|
|
21663
22015
|
value: exp,
|
|
21664
22016
|
isComponent: node.tagType === 1
|
|
21665
22017
|
});
|
|
21666
22018
|
};
|
|
21667
|
-
|
|
21668
|
-
//#endregion
|
|
21669
|
-
//#region packages/compiler-vapor/src/transforms/vText.ts
|
|
21670
|
-
const transformVText = (dir, node, context) => {
|
|
21671
|
-
let { exp, loc } = dir;
|
|
21672
|
-
if (!exp) {
|
|
21673
|
-
context.options.onError(createDOMCompilerError(56, loc));
|
|
21674
|
-
exp = EMPTY_EXPRESSION;
|
|
21675
|
-
}
|
|
21676
|
-
if (node.children.length) {
|
|
21677
|
-
context.options.onError(createDOMCompilerError(57, loc));
|
|
21678
|
-
context.childrenTemplate.length = 0;
|
|
21679
|
-
}
|
|
21680
|
-
if (isVoidTag(context.node.tag)) return;
|
|
21681
|
-
const literal = getLiteralExpressionValue(exp);
|
|
21682
|
-
if (literal != null) context.childrenTemplate = [String(literal)];
|
|
21683
|
-
else {
|
|
21684
|
-
context.childrenTemplate = [context.options.platform ? TEXT_PLACEHOLDER : " "];
|
|
21685
|
-
const isComponent = node.tagType === 1;
|
|
21686
|
-
if (!isComponent) context.registerOperation({
|
|
21687
|
-
type: 16,
|
|
21688
|
-
node,
|
|
21689
|
-
parent: context.reference()
|
|
21690
|
-
});
|
|
21691
|
-
context.registerEffect([exp], {
|
|
21692
|
-
type: 4,
|
|
21693
|
-
node,
|
|
21694
|
-
element: context.reference(),
|
|
21695
|
-
values: [exp],
|
|
21696
|
-
generated: true,
|
|
21697
|
-
isComponent
|
|
21698
|
-
});
|
|
21699
|
-
}
|
|
21700
|
-
};
|
|
21701
|
-
|
|
21702
22019
|
//#endregion
|
|
21703
|
-
//#region packages/compiler-vapor/src/transforms/
|
|
21704
|
-
|
|
21705
|
-
|
|
21706
|
-
|
|
21707
|
-
|
|
22020
|
+
//#region packages/compiler-vapor/src/transforms/transformText.ts
|
|
22021
|
+
const seen = /* @__PURE__ */ new WeakMap();
|
|
22022
|
+
function markNonTemplate(node, context) {
|
|
22023
|
+
let seenNodes = seen.get(context.root);
|
|
22024
|
+
if (!seenNodes) {
|
|
22025
|
+
seenNodes = /* @__PURE__ */ new WeakSet();
|
|
22026
|
+
seen.set(context.root, seenNodes);
|
|
21708
22027
|
}
|
|
21709
|
-
|
|
21710
|
-
exp.ast = null;
|
|
21711
|
-
return exp;
|
|
21712
|
-
}
|
|
21713
|
-
const transformVBind = (dir, node, context) => {
|
|
21714
|
-
const { loc, modifiers } = dir;
|
|
21715
|
-
let { exp } = dir;
|
|
21716
|
-
let arg = dir.arg;
|
|
21717
|
-
const modifiersString = modifiers.map((s) => s.content);
|
|
21718
|
-
if (!exp) exp = normalizeBindShorthand(arg, context);
|
|
21719
|
-
if (!exp.content.trim()) {
|
|
21720
|
-
context.options.onError(createCompilerError(34, loc));
|
|
21721
|
-
exp = createSimpleExpression("", true, loc);
|
|
21722
|
-
}
|
|
21723
|
-
const isComponent = node.tagType === 1;
|
|
21724
|
-
exp = resolveExpression(exp, isComponent);
|
|
21725
|
-
arg = resolveExpression(arg);
|
|
21726
|
-
if (arg.isStatic && isReservedProp(arg.content)) return;
|
|
21727
|
-
let camel = false;
|
|
21728
|
-
if (modifiersString.includes("camel")) if (arg.isStatic) arg = extend({}, arg, { content: camelize(arg.content) });
|
|
21729
|
-
else camel = true;
|
|
21730
|
-
return {
|
|
21731
|
-
key: arg,
|
|
21732
|
-
value: exp,
|
|
21733
|
-
loc,
|
|
21734
|
-
runtimeCamelize: camel,
|
|
21735
|
-
modifier: modifiersString.includes("prop") ? "." : modifiersString.includes("attr") ? "^" : void 0
|
|
21736
|
-
};
|
|
21737
|
-
};
|
|
21738
|
-
|
|
21739
|
-
//#endregion
|
|
21740
|
-
//#region packages/compiler-vapor/src/transforms/vOn.ts
|
|
21741
|
-
const delegatedEvents = /* @__PURE__ */ makeMap("beforeinput,click,dblclick,contextmenu,focusin,focusout,input,keydown,keyup,mousedown,mousemove,mouseout,mouseover,mouseup,pointerdown,pointermove,pointerout,pointerover,pointerup,touchend,touchmove,touchstart");
|
|
21742
|
-
const transformVOn = (dir, node, context) => {
|
|
21743
|
-
let { arg, exp, loc, modifiers } = dir;
|
|
21744
|
-
const isComponent = node.tagType === 1;
|
|
21745
|
-
const isSlotOutlet = node.tag === "slot";
|
|
21746
|
-
if (!exp && !modifiers.length) context.options.onError(createCompilerError(35, loc));
|
|
21747
|
-
arg = resolveExpression(arg);
|
|
21748
|
-
const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(arg.isStatic ? `on${arg.content}` : arg, modifiers, null, loc);
|
|
21749
|
-
let keyOverride;
|
|
21750
|
-
const isStaticClick = arg.isStatic && arg.content.toLowerCase() === "click";
|
|
21751
|
-
if (nonKeyModifiers.includes("middle")) {
|
|
21752
|
-
if (keyOverride) {}
|
|
21753
|
-
if (isStaticClick) arg = extend({}, arg, { content: "mouseup" });
|
|
21754
|
-
else if (!arg.isStatic) keyOverride = ["click", "mouseup"];
|
|
21755
|
-
}
|
|
21756
|
-
if (nonKeyModifiers.includes("right")) {
|
|
21757
|
-
if (isStaticClick) arg = extend({}, arg, { content: "contextmenu" });
|
|
21758
|
-
else if (!arg.isStatic) keyOverride = ["click", "contextmenu"];
|
|
21759
|
-
}
|
|
21760
|
-
if (keyModifiers.length && isStaticExp(arg) && !isKeyboardEvent(`on${arg.content.toLowerCase()}`)) keyModifiers.length = 0;
|
|
21761
|
-
if (isComponent || isSlotOutlet) return {
|
|
21762
|
-
key: arg,
|
|
21763
|
-
value: exp || EMPTY_EXPRESSION,
|
|
21764
|
-
handler: true,
|
|
21765
|
-
handlerModifiers: {
|
|
21766
|
-
keys: keyModifiers,
|
|
21767
|
-
nonKeys: nonKeyModifiers,
|
|
21768
|
-
options: eventOptionModifiers
|
|
21769
|
-
}
|
|
21770
|
-
};
|
|
21771
|
-
const delegate = arg.isStatic && !eventOptionModifiers.length && delegatedEvents(arg.content);
|
|
21772
|
-
const operation = {
|
|
21773
|
-
type: 5,
|
|
21774
|
-
node,
|
|
21775
|
-
element: context.reference(),
|
|
21776
|
-
key: arg,
|
|
21777
|
-
value: exp,
|
|
21778
|
-
modifiers: {
|
|
21779
|
-
keys: keyModifiers,
|
|
21780
|
-
nonKeys: nonKeyModifiers,
|
|
21781
|
-
options: eventOptionModifiers
|
|
21782
|
-
},
|
|
21783
|
-
keyOverride,
|
|
21784
|
-
delegate,
|
|
21785
|
-
effect: !arg.isStatic
|
|
21786
|
-
};
|
|
21787
|
-
context.registerEffect([arg], operation);
|
|
21788
|
-
};
|
|
21789
|
-
|
|
21790
|
-
//#endregion
|
|
21791
|
-
//#region packages/compiler-vapor/src/transforms/vShow.ts
|
|
21792
|
-
const transformVShow = (dir, node, context) => {
|
|
21793
|
-
const { exp, loc } = dir;
|
|
21794
|
-
if (!exp) {
|
|
21795
|
-
context.options.onError(createDOMCompilerError(62, loc));
|
|
21796
|
-
return;
|
|
21797
|
-
}
|
|
21798
|
-
if (node.tagType === 2) {
|
|
21799
|
-
context.options.onError(createCompilerError(36, loc));
|
|
21800
|
-
return;
|
|
21801
|
-
}
|
|
21802
|
-
let shouldDeferred = false;
|
|
21803
|
-
const parentNode = context.parent && context.parent.node;
|
|
21804
|
-
if (parentNode && parentNode.type === 1) {
|
|
21805
|
-
shouldDeferred = !!(isTransitionTag(parentNode.tag) && findProp(parentNode, "appear", false, true));
|
|
21806
|
-
if (shouldDeferred) context.ir.hasDeferredVShow = true;
|
|
21807
|
-
}
|
|
21808
|
-
context.registerOperation({
|
|
21809
|
-
type: 13,
|
|
21810
|
-
node,
|
|
21811
|
-
element: context.reference(),
|
|
21812
|
-
dir,
|
|
21813
|
-
name: "show",
|
|
21814
|
-
builtin: true,
|
|
21815
|
-
deferred: shouldDeferred
|
|
21816
|
-
});
|
|
21817
|
-
};
|
|
21818
|
-
|
|
21819
|
-
//#endregion
|
|
21820
|
-
//#region packages/compiler-vapor/src/transforms/transformTemplateRef.ts
|
|
21821
|
-
const transformTemplateRef = (node, context) => {
|
|
21822
|
-
if (node.type !== 1) return;
|
|
21823
|
-
const dir = findProp(node, "ref", false, true);
|
|
21824
|
-
if (!dir) return;
|
|
21825
|
-
context.ir.hasTemplateRef = true;
|
|
21826
|
-
let value;
|
|
21827
|
-
if (dir.type === 7) value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
21828
|
-
else value = dir.value ? createSimpleExpression(dir.value.content, true, dir.value.loc) : EMPTY_EXPRESSION;
|
|
21829
|
-
return () => {
|
|
21830
|
-
const id = context.reference();
|
|
21831
|
-
const effect = !isConstantExpression(value);
|
|
21832
|
-
context.registerEffect([value], {
|
|
21833
|
-
type: 8,
|
|
21834
|
-
node,
|
|
21835
|
-
element: id,
|
|
21836
|
-
value,
|
|
21837
|
-
refFor: !!context.inVFor,
|
|
21838
|
-
effect
|
|
21839
|
-
});
|
|
21840
|
-
};
|
|
21841
|
-
};
|
|
21842
|
-
|
|
21843
|
-
//#endregion
|
|
21844
|
-
//#region packages/compiler-vapor/src/transforms/transformText.ts
|
|
21845
|
-
const seen = /* @__PURE__ */ new WeakMap();
|
|
21846
|
-
function markNonTemplate(node, context) {
|
|
21847
|
-
seen.get(context.root).add(node);
|
|
22028
|
+
seenNodes.add(node);
|
|
21848
22029
|
}
|
|
21849
22030
|
const transformText = (node, context) => {
|
|
21850
22031
|
if (!seen.has(context.root)) seen.set(context.root, /* @__PURE__ */ new WeakSet());
|
|
@@ -21858,8 +22039,11 @@ const transformText = (node, context) => {
|
|
|
21858
22039
|
let isAllTextLike = true;
|
|
21859
22040
|
for (const c of node.children) if (c.type === 5) hasInterp = true;
|
|
21860
22041
|
else if (c.type !== 2) isAllTextLike = false;
|
|
21861
|
-
if (!isFragment && isAllTextLike && hasInterp)
|
|
21862
|
-
|
|
22042
|
+
if (!isFragment && isAllTextLike && hasInterp) {
|
|
22043
|
+
const elementContext = context;
|
|
22044
|
+
if (shouldUseCreateElement(node, elementContext)) processCreateElementTextContainer(node.children, elementContext);
|
|
22045
|
+
else processTextContainer(node.children, elementContext);
|
|
22046
|
+
} else if (hasInterp) for (let i = 0; i < node.children.length; i++) {
|
|
21863
22047
|
const c = node.children[i];
|
|
21864
22048
|
const prev = node.children[i - 1];
|
|
21865
22049
|
if (c.type === 5 && prev && prev.type === 2) markNonTemplate(prev, context);
|
|
@@ -21868,6 +22052,10 @@ const transformText = (node, context) => {
|
|
|
21868
22052
|
else if (node.type === 2) {
|
|
21869
22053
|
var _context$parent;
|
|
21870
22054
|
const parent = (_context$parent = context.parent) === null || _context$parent === void 0 ? void 0 : _context$parent.node;
|
|
22055
|
+
if (parent && parent.type === 1 && shouldUseCreateElement(parent, context.parent) && node.content[0] === "<") {
|
|
22056
|
+
materializeLiteralTextNode(createSimpleExpression(node.content, true, node.loc), context);
|
|
22057
|
+
return;
|
|
22058
|
+
}
|
|
21871
22059
|
const isRootText = !parent || parent.type === 0 || parent.type === 1 && (parent.tagType === 3 || parent.tagType === 1);
|
|
21872
22060
|
context.template += isRootText ? node.content : escapeHtml(node.content);
|
|
21873
22061
|
}
|
|
@@ -21885,6 +22073,10 @@ function processInterpolation(context) {
|
|
|
21885
22073
|
const literalValues = values.map((v) => getLiteralExpressionValue(v));
|
|
21886
22074
|
if (literalValues.every((v) => v != null) && parentNode.type !== 0) {
|
|
21887
22075
|
const text = literalValues.join("");
|
|
22076
|
+
if (parentNode.type === 1 && shouldUseCreateElement(parentNode, context.parent) && text[0] === "<") {
|
|
22077
|
+
materializeLiteralTextNode(createSimpleExpression(text, true, context.node.loc), context);
|
|
22078
|
+
return;
|
|
22079
|
+
}
|
|
21888
22080
|
const isElementChild = parentNode.type === 1 && parentNode.tagType === 0;
|
|
21889
22081
|
context.template += isElementChild ? escapeHtml(text) : text;
|
|
21890
22082
|
return;
|
|
@@ -21906,7 +22098,7 @@ function processInterpolation(context) {
|
|
|
21906
22098
|
const id = context.reference();
|
|
21907
22099
|
if (values.length === 0) return;
|
|
21908
22100
|
context.registerEffect(values, {
|
|
21909
|
-
type:
|
|
22101
|
+
type: 5,
|
|
21910
22102
|
node: context.node,
|
|
21911
22103
|
element: id,
|
|
21912
22104
|
values
|
|
@@ -21919,12 +22111,12 @@ function processTextContainer(children, context) {
|
|
|
21919
22111
|
else {
|
|
21920
22112
|
context.childrenTemplate = [context.options.platform ? TEXT_PLACEHOLDER : " "];
|
|
21921
22113
|
context.registerOperation({
|
|
21922
|
-
type:
|
|
22114
|
+
type: 18,
|
|
21923
22115
|
node: context.node,
|
|
21924
22116
|
parent: context.reference()
|
|
21925
22117
|
});
|
|
21926
22118
|
context.registerEffect(values, {
|
|
21927
|
-
type:
|
|
22119
|
+
type: 5,
|
|
21928
22120
|
node: context.node,
|
|
21929
22121
|
element: context.reference(),
|
|
21930
22122
|
values,
|
|
@@ -21932,6 +22124,37 @@ function processTextContainer(children, context) {
|
|
|
21932
22124
|
});
|
|
21933
22125
|
}
|
|
21934
22126
|
}
|
|
22127
|
+
function registerSyntheticTextChild(context, template, values) {
|
|
22128
|
+
const id = context.increaseId();
|
|
22129
|
+
context.dynamic.children[context.node.children.length] = {
|
|
22130
|
+
id,
|
|
22131
|
+
flags: 6,
|
|
22132
|
+
children: [],
|
|
22133
|
+
template: context.pushTemplate(template)
|
|
22134
|
+
};
|
|
22135
|
+
context.dynamic.hasDynamicChild = true;
|
|
22136
|
+
if (values && values.length) context.registerEffect(values, {
|
|
22137
|
+
type: 5,
|
|
22138
|
+
node: context.node,
|
|
22139
|
+
element: id,
|
|
22140
|
+
values
|
|
22141
|
+
});
|
|
22142
|
+
return id;
|
|
22143
|
+
}
|
|
22144
|
+
function processCreateElementTextContainer(children, context) {
|
|
22145
|
+
registerSyntheticTextChild(context, "", processTextLikeChildren(children, context));
|
|
22146
|
+
}
|
|
22147
|
+
function materializeLiteralTextNode(value, context) {
|
|
22148
|
+
const id = context.reference();
|
|
22149
|
+
context.dynamic.flags |= 6;
|
|
22150
|
+
context.dynamic.template = context.pushTemplate("");
|
|
22151
|
+
context.registerEffect([value], {
|
|
22152
|
+
type: 5,
|
|
22153
|
+
node: context.node,
|
|
22154
|
+
element: id,
|
|
22155
|
+
values: [value]
|
|
22156
|
+
});
|
|
22157
|
+
}
|
|
21935
22158
|
function processTextLikeChildren(nodes, context) {
|
|
21936
22159
|
const exps = [];
|
|
21937
22160
|
for (const node of nodes) {
|
|
@@ -21946,7 +22169,171 @@ function processTextLikeChildren(nodes, context) {
|
|
|
21946
22169
|
function isTextLike(node) {
|
|
21947
22170
|
return node.type === 5 || node.type === 2;
|
|
21948
22171
|
}
|
|
21949
|
-
|
|
22172
|
+
//#endregion
|
|
22173
|
+
//#region packages/compiler-vapor/src/transforms/vText.ts
|
|
22174
|
+
const transformVText = (dir, node, context) => {
|
|
22175
|
+
let { exp, loc } = dir;
|
|
22176
|
+
if (!exp) {
|
|
22177
|
+
context.options.onError(createDOMCompilerError(56, loc));
|
|
22178
|
+
exp = EMPTY_EXPRESSION;
|
|
22179
|
+
}
|
|
22180
|
+
if (node.children.length) {
|
|
22181
|
+
context.options.onError(createDOMCompilerError(57, loc));
|
|
22182
|
+
context.childrenTemplate.length = 0;
|
|
22183
|
+
for (const child of node.children) markNonTemplate(child, context);
|
|
22184
|
+
}
|
|
22185
|
+
if (isVoidTag(context.node.tag)) return;
|
|
22186
|
+
const literal = getLiteralExpressionValue(exp);
|
|
22187
|
+
const useCreateElement = shouldUseCreateElement(context.node, context);
|
|
22188
|
+
if (literal != null) if (useCreateElement) {
|
|
22189
|
+
const id = registerSyntheticTextChild(context, "", [exp]);
|
|
22190
|
+
context.registerOperation({
|
|
22191
|
+
type: 10,
|
|
22192
|
+
node,
|
|
22193
|
+
elements: [id],
|
|
22194
|
+
parent: context.reference()
|
|
22195
|
+
});
|
|
22196
|
+
} else context.childrenTemplate = [String(literal)];
|
|
22197
|
+
else {
|
|
22198
|
+
const isComponent = node.tagType === 1;
|
|
22199
|
+
let id;
|
|
22200
|
+
if (useCreateElement) {
|
|
22201
|
+
id = registerSyntheticTextChild(context, "");
|
|
22202
|
+
context.registerOperation({
|
|
22203
|
+
type: 10,
|
|
22204
|
+
node,
|
|
22205
|
+
elements: [id],
|
|
22206
|
+
parent: context.reference()
|
|
22207
|
+
});
|
|
22208
|
+
} else {
|
|
22209
|
+
context.childrenTemplate = [context.options.platform ? TEXT_PLACEHOLDER : " "];
|
|
22210
|
+
if (!isComponent) context.registerOperation({
|
|
22211
|
+
type: 18,
|
|
22212
|
+
node,
|
|
22213
|
+
parent: context.reference()
|
|
22214
|
+
});
|
|
22215
|
+
}
|
|
22216
|
+
context.registerEffect([exp], {
|
|
22217
|
+
type: 5,
|
|
22218
|
+
node,
|
|
22219
|
+
element: useCreateElement ? id : context.reference(),
|
|
22220
|
+
values: [exp],
|
|
22221
|
+
generated: !useCreateElement,
|
|
22222
|
+
isComponent
|
|
22223
|
+
});
|
|
22224
|
+
}
|
|
22225
|
+
};
|
|
22226
|
+
//#endregion
|
|
22227
|
+
//#region packages/compiler-vapor/src/transforms/vOn.ts
|
|
22228
|
+
const delegatedEvents = /* @__PURE__ */ makeMap("beforeinput,click,dblclick,contextmenu,focusin,focusout,input,keydown,keyup,mousedown,mousemove,mouseout,mouseover,mouseup,pointerdown,pointermove,pointerout,pointerover,pointerup,touchend,touchmove,touchstart");
|
|
22229
|
+
const transformVOn = (dir, node, context) => {
|
|
22230
|
+
let { arg, exp, loc, modifiers } = dir;
|
|
22231
|
+
const isComponent = node.tagType === 1;
|
|
22232
|
+
const isSlotOutlet = node.tag === "slot";
|
|
22233
|
+
if (!exp && !modifiers.length) context.options.onError(createCompilerError(35, loc));
|
|
22234
|
+
arg = resolveExpression(arg);
|
|
22235
|
+
if (arg.isStatic && arg.content.startsWith("vue:")) arg = extend({}, arg, { content: `vnode-${arg.content.slice(4)}` });
|
|
22236
|
+
const { keyModifiers, nonKeyModifiers, eventOptionModifiers } = resolveModifiers(arg.isStatic ? `on${arg.content}` : arg, modifiers, null, loc);
|
|
22237
|
+
let keyOverride;
|
|
22238
|
+
const isStaticClick = arg.isStatic && arg.content.toLowerCase() === "click";
|
|
22239
|
+
if (nonKeyModifiers.includes("middle")) {
|
|
22240
|
+
if (keyOverride) {}
|
|
22241
|
+
if (!isStaticClick && !arg.isStatic) keyOverride = ["click", "mouseup"];
|
|
22242
|
+
}
|
|
22243
|
+
if (nonKeyModifiers.includes("right")) {
|
|
22244
|
+
if (!isStaticClick && !arg.isStatic) keyOverride = ["click", "contextmenu"];
|
|
22245
|
+
}
|
|
22246
|
+
arg = normalizeStaticEventArg(arg, nonKeyModifiers);
|
|
22247
|
+
if (keyModifiers.length && isStaticExp(arg) && !isKeyboardEvent(`on${arg.content.toLowerCase()}`)) keyModifiers.length = 0;
|
|
22248
|
+
if (isComponent || isSlotOutlet) return {
|
|
22249
|
+
key: arg,
|
|
22250
|
+
value: exp || EMPTY_EXPRESSION,
|
|
22251
|
+
handler: true,
|
|
22252
|
+
handlerModifiers: {
|
|
22253
|
+
keys: keyModifiers,
|
|
22254
|
+
nonKeys: nonKeyModifiers,
|
|
22255
|
+
options: eventOptionModifiers
|
|
22256
|
+
}
|
|
22257
|
+
};
|
|
22258
|
+
const delegate = arg.isStatic && !eventOptionModifiers.length && !hasStopHandlerForStaticEvent(node, arg.content) && delegatedEvents(arg.content);
|
|
22259
|
+
const operation = {
|
|
22260
|
+
type: 6,
|
|
22261
|
+
node,
|
|
22262
|
+
element: context.reference(),
|
|
22263
|
+
key: arg,
|
|
22264
|
+
value: exp,
|
|
22265
|
+
modifiers: {
|
|
22266
|
+
keys: keyModifiers,
|
|
22267
|
+
nonKeys: nonKeyModifiers,
|
|
22268
|
+
options: eventOptionModifiers
|
|
22269
|
+
},
|
|
22270
|
+
keyOverride,
|
|
22271
|
+
delegate,
|
|
22272
|
+
effect: !arg.isStatic
|
|
22273
|
+
};
|
|
22274
|
+
context.registerEffect([arg], operation);
|
|
22275
|
+
};
|
|
22276
|
+
function normalizeStaticEventArg(arg, nonKeyModifiers) {
|
|
22277
|
+
if (!arg.isStatic) return arg;
|
|
22278
|
+
let normalized = arg;
|
|
22279
|
+
const isStaticClick = arg.content.toLowerCase() === "click";
|
|
22280
|
+
if (nonKeyModifiers.includes("middle") && isStaticClick) normalized = extend({}, normalized, { content: "mouseup" });
|
|
22281
|
+
if (nonKeyModifiers.includes("right") && isStaticClick) normalized = extend({}, normalized, { content: "contextmenu" });
|
|
22282
|
+
return normalized;
|
|
22283
|
+
}
|
|
22284
|
+
function hasStopHandlerForStaticEvent(node, eventName) {
|
|
22285
|
+
return node.props.some((prop) => {
|
|
22286
|
+
if (prop.type !== 7 || prop.name !== "on" || !prop.arg || prop.arg.type !== 4) return false;
|
|
22287
|
+
const arg = resolveExpression(prop.arg);
|
|
22288
|
+
if (!arg.isStatic) return false;
|
|
22289
|
+
const { nonKeyModifiers } = resolveModifiers(`on${arg.content}`, prop.modifiers, null, prop.loc);
|
|
22290
|
+
return nonKeyModifiers.includes("stop") && normalizeStaticEventArg(arg, nonKeyModifiers).content === eventName;
|
|
22291
|
+
});
|
|
22292
|
+
}
|
|
22293
|
+
//#endregion
|
|
22294
|
+
//#region packages/compiler-vapor/src/transforms/vShow.ts
|
|
22295
|
+
const transformVShow = (dir, node, context) => {
|
|
22296
|
+
const { exp, loc } = dir;
|
|
22297
|
+
if (!exp) {
|
|
22298
|
+
context.options.onError(createDOMCompilerError(62, loc));
|
|
22299
|
+
return;
|
|
22300
|
+
}
|
|
22301
|
+
if (node.tagType === 2) {
|
|
22302
|
+
context.options.onError(createCompilerError(36, loc));
|
|
22303
|
+
return;
|
|
22304
|
+
}
|
|
22305
|
+
context.registerOperation({
|
|
22306
|
+
type: 14,
|
|
22307
|
+
node,
|
|
22308
|
+
element: context.reference(),
|
|
22309
|
+
dir,
|
|
22310
|
+
name: "show",
|
|
22311
|
+
builtin: true
|
|
22312
|
+
});
|
|
22313
|
+
};
|
|
22314
|
+
//#endregion
|
|
22315
|
+
//#region packages/compiler-vapor/src/transforms/transformTemplateRef.ts
|
|
22316
|
+
const transformTemplateRef = (node, context) => {
|
|
22317
|
+
if (node.type !== 1) return;
|
|
22318
|
+
const dir = findProp(node, "ref", false, true);
|
|
22319
|
+
if (!dir) return;
|
|
22320
|
+
context.ir.hasTemplateRef = true;
|
|
22321
|
+
let value;
|
|
22322
|
+
if (dir.type === 7) value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
22323
|
+
else value = dir.value ? createSimpleExpression(dir.value.content, true, dir.value.loc) : EMPTY_EXPRESSION;
|
|
22324
|
+
return () => {
|
|
22325
|
+
const id = context.reference();
|
|
22326
|
+
const effect = !isConstantExpression(value);
|
|
22327
|
+
context.registerEffect([value], {
|
|
22328
|
+
type: 9,
|
|
22329
|
+
node,
|
|
22330
|
+
element: id,
|
|
22331
|
+
value,
|
|
22332
|
+
refFor: !!context.inVFor,
|
|
22333
|
+
effect
|
|
22334
|
+
});
|
|
22335
|
+
};
|
|
22336
|
+
};
|
|
21950
22337
|
//#endregion
|
|
21951
22338
|
//#region packages/compiler-vapor/src/transforms/vModel.ts
|
|
21952
22339
|
const transformVModel = (dir, node, context) => {
|
|
@@ -22002,7 +22389,7 @@ const transformVModel = (dir, node, context) => {
|
|
|
22002
22389
|
else checkDuplicatedValue();
|
|
22003
22390
|
else context.options.onError(createDOMCompilerError(58, dir.loc));
|
|
22004
22391
|
if (modelType) context.registerOperation({
|
|
22005
|
-
type:
|
|
22392
|
+
type: 14,
|
|
22006
22393
|
node,
|
|
22007
22394
|
element: context.reference(),
|
|
22008
22395
|
dir,
|
|
@@ -22015,12 +22402,19 @@ const transformVModel = (dir, node, context) => {
|
|
|
22015
22402
|
if (value && isStaticArgOf(value.arg, "value")) context.options.onError(createDOMCompilerError(61, value.loc));
|
|
22016
22403
|
}
|
|
22017
22404
|
};
|
|
22018
|
-
|
|
22019
22405
|
//#endregion
|
|
22020
22406
|
//#region packages/compiler-vapor/src/transforms/transformComment.ts
|
|
22407
|
+
const ignoredComments = /* @__PURE__ */ new WeakMap();
|
|
22408
|
+
function ignoreComment(node, context) {
|
|
22409
|
+
let ignored = ignoredComments.get(context.root);
|
|
22410
|
+
if (!ignored) ignoredComments.set(context.root, ignored = /* @__PURE__ */ new WeakSet());
|
|
22411
|
+
ignored.add(node);
|
|
22412
|
+
}
|
|
22021
22413
|
const transformComment = (node, context) => {
|
|
22414
|
+
var _ignoredComments$get;
|
|
22022
22415
|
if (node.type !== 3) return;
|
|
22023
|
-
if (
|
|
22416
|
+
if ((_ignoredComments$get = ignoredComments.get(context.root)) === null || _ignoredComments$get === void 0 ? void 0 : _ignoredComments$get.has(node)) context.dynamic.flags |= 2;
|
|
22417
|
+
else if (getSiblingIf(context)) {
|
|
22024
22418
|
context.comment.push(node);
|
|
22025
22419
|
context.dynamic.flags |= 2;
|
|
22026
22420
|
} else context.template += `<!--${escapeHtml(node.content)}-->`;
|
|
@@ -22037,7 +22431,6 @@ function getSiblingIf(context, reverse) {
|
|
|
22037
22431
|
}
|
|
22038
22432
|
if (sibling && sibling.type === 1 && sibling.props.some(({ type, name }) => type === 7 && ["else-if", reverse ? "if" : "else"].includes(name))) return sibling;
|
|
22039
22433
|
}
|
|
22040
|
-
|
|
22041
22434
|
//#endregion
|
|
22042
22435
|
//#region packages/compiler-vapor/src/transforms/vIf.ts
|
|
22043
22436
|
const transformVIf = createStructuralDirectiveTransform([
|
|
@@ -22052,21 +22445,24 @@ function processIf(node, dir, context) {
|
|
|
22052
22445
|
dir.exp = createSimpleExpression(`true`, false, loc);
|
|
22053
22446
|
}
|
|
22054
22447
|
context.dynamic.flags |= 2;
|
|
22448
|
+
const forceMultiRoot = shouldForceMultiRoot(context);
|
|
22055
22449
|
if (dir.name === "if") {
|
|
22056
22450
|
const id = context.reference();
|
|
22057
22451
|
context.dynamic.flags |= 4;
|
|
22058
22452
|
const [branch, onExit] = createIfBranch(node, context);
|
|
22059
22453
|
return () => {
|
|
22060
22454
|
onExit();
|
|
22061
|
-
context.dynamic.operation = {
|
|
22062
|
-
type:
|
|
22455
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
22456
|
+
type: 15,
|
|
22063
22457
|
node,
|
|
22064
|
-
id
|
|
22458
|
+
id
|
|
22459
|
+
}, context.effectBoundary()), {}, {
|
|
22460
|
+
blockShape: encodeIfBlockShape(branch, forceMultiRoot),
|
|
22065
22461
|
condition: dir.exp,
|
|
22066
22462
|
positive: branch,
|
|
22067
|
-
index:
|
|
22463
|
+
index: context.root.nextIfIndex(),
|
|
22068
22464
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
22069
|
-
};
|
|
22465
|
+
});
|
|
22070
22466
|
};
|
|
22071
22467
|
} else {
|
|
22072
22468
|
const siblingIf = getSiblingIf(context, true);
|
|
@@ -22074,16 +22470,16 @@ function processIf(node, dir, context) {
|
|
|
22074
22470
|
let lastIfNode;
|
|
22075
22471
|
if (siblings) {
|
|
22076
22472
|
let i = siblings.length;
|
|
22077
|
-
while (i--) if (siblings[i].operation && siblings[i].operation.type ===
|
|
22473
|
+
while (i--) if (siblings[i].operation && siblings[i].operation.type === 15) {
|
|
22078
22474
|
lastIfNode = siblings[i].operation;
|
|
22079
22475
|
break;
|
|
22080
22476
|
}
|
|
22081
22477
|
}
|
|
22082
|
-
if (!siblingIf || !lastIfNode || lastIfNode.type !==
|
|
22478
|
+
if (!siblingIf || !lastIfNode || lastIfNode.type !== 15) {
|
|
22083
22479
|
context.options.onError(createCompilerError(30, node.loc));
|
|
22084
22480
|
return;
|
|
22085
22481
|
}
|
|
22086
|
-
while (lastIfNode.negative && lastIfNode.negative.type ===
|
|
22482
|
+
while (lastIfNode.negative && lastIfNode.negative.type === 15) lastIfNode = lastIfNode.negative;
|
|
22087
22483
|
if (dir.name === "else-if" && lastIfNode.negative) context.options.onError(createCompilerError(30, node.loc));
|
|
22088
22484
|
if (context.root.comment.length) {
|
|
22089
22485
|
node = wrapTemplate(node, ["else-if", "else"]);
|
|
@@ -22093,15 +22489,20 @@ function processIf(node, dir, context) {
|
|
|
22093
22489
|
const [branch, onExit] = createIfBranch(node, context);
|
|
22094
22490
|
if (dir.name === "else") lastIfNode.negative = branch;
|
|
22095
22491
|
else lastIfNode.negative = {
|
|
22096
|
-
type:
|
|
22492
|
+
type: 15,
|
|
22097
22493
|
node,
|
|
22098
22494
|
id: -1,
|
|
22099
22495
|
condition: dir.exp,
|
|
22100
22496
|
positive: branch,
|
|
22101
|
-
index:
|
|
22497
|
+
index: context.root.nextIfIndex(),
|
|
22498
|
+
blockShape: 0,
|
|
22102
22499
|
once: context.inVOnce || isStaticExpression(dir.exp, context.options.bindingMetadata)
|
|
22103
22500
|
};
|
|
22104
|
-
return () =>
|
|
22501
|
+
return () => {
|
|
22502
|
+
onExit();
|
|
22503
|
+
if (lastIfNode.negative.type === 15) lastIfNode.negative.blockShape = encodeIfBlockShape(lastIfNode.negative.positive, forceMultiRoot);
|
|
22504
|
+
lastIfNode.blockShape = encodeIfBlockShape(lastIfNode.positive, forceMultiRoot, lastIfNode.negative);
|
|
22505
|
+
};
|
|
22105
22506
|
}
|
|
22106
22507
|
}
|
|
22107
22508
|
function createIfBranch(node, context) {
|
|
@@ -22115,7 +22516,18 @@ function createIfBranch(node, context) {
|
|
|
22115
22516
|
context.reference();
|
|
22116
22517
|
return [branch, exitBlock];
|
|
22117
22518
|
}
|
|
22118
|
-
|
|
22519
|
+
function encodeIfBlockShape(positive, forceMultiRoot = false, negative) {
|
|
22520
|
+
if (forceMultiRoot) return 10;
|
|
22521
|
+
return getBlockShape(positive) | getNegativeBlockShape(negative) << 2;
|
|
22522
|
+
}
|
|
22523
|
+
function getNegativeBlockShape(negative) {
|
|
22524
|
+
if (!negative) return 0;
|
|
22525
|
+
return negative.type === 15 ? 1 : getBlockShape(negative);
|
|
22526
|
+
}
|
|
22527
|
+
function shouldForceMultiRoot(context) {
|
|
22528
|
+
const parent = context.parent && context.parent.node;
|
|
22529
|
+
return !!parent && parent.type === 1 && parent.tagType === 3 && parent.props.some((prop) => prop.type === 7 && prop.name === "for");
|
|
22530
|
+
}
|
|
22119
22531
|
//#endregion
|
|
22120
22532
|
//#region packages/compiler-vapor/src/transforms/vFor.ts
|
|
22121
22533
|
const transformVFor = createStructuralDirectiveTransform("for", processFor);
|
|
@@ -22135,7 +22547,7 @@ function processFor(node, dir, context) {
|
|
|
22135
22547
|
const typeProp = findProp(node, "type");
|
|
22136
22548
|
const typeProperty = typeProp && propToExpression(typeProp);
|
|
22137
22549
|
const isComponent = node.tagType === 1 || isTemplateWithSingleComponent(node);
|
|
22138
|
-
context.node = node = wrapTemplate(node, ["for"]);
|
|
22550
|
+
context.node = node = wrapTemplate(node, ["for", "key"]);
|
|
22139
22551
|
context.dynamic.flags |= 6;
|
|
22140
22552
|
const id = context.reference();
|
|
22141
22553
|
const render = newBlock(node);
|
|
@@ -22145,10 +22557,11 @@ function processFor(node, dir, context) {
|
|
|
22145
22557
|
exitBlock();
|
|
22146
22558
|
const { parent } = context;
|
|
22147
22559
|
const isOnlyChild = parent && parent.block.node !== parent.node && parent.node.children.length === 1;
|
|
22148
|
-
context.dynamic.operation = {
|
|
22149
|
-
type:
|
|
22560
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
22561
|
+
type: 16,
|
|
22150
22562
|
node,
|
|
22151
|
-
id
|
|
22563
|
+
id
|
|
22564
|
+
}, context.effectBoundary()), {}, {
|
|
22152
22565
|
source,
|
|
22153
22566
|
value,
|
|
22154
22567
|
key,
|
|
@@ -22159,7 +22572,7 @@ function processFor(node, dir, context) {
|
|
|
22159
22572
|
once: context.inVOnce || isStaticExpression(source, context.options.bindingMetadata),
|
|
22160
22573
|
component: isComponent && node.children[0].type === 1 && node.children[0].tagType === 1,
|
|
22161
22574
|
onlyChild: !!isOnlyChild
|
|
22162
|
-
};
|
|
22575
|
+
});
|
|
22163
22576
|
};
|
|
22164
22577
|
}
|
|
22165
22578
|
function isTemplateWithSingleComponent(node) {
|
|
@@ -22167,7 +22580,6 @@ function isTemplateWithSingleComponent(node) {
|
|
|
22167
22580
|
const nonCommentChildren = node.children.filter((c) => c.type !== 3);
|
|
22168
22581
|
return nonCommentChildren.length === 1 && nonCommentChildren[0].type === 1 && nonCommentChildren[0].tagType === 1;
|
|
22169
22582
|
}
|
|
22170
|
-
|
|
22171
22583
|
//#endregion
|
|
22172
22584
|
//#region packages/compiler-vapor/src/transforms/transformSlotOutlet.ts
|
|
22173
22585
|
const transformSlotOutlet = (node, context) => {
|
|
@@ -22195,21 +22607,22 @@ const transformSlotOutlet = (node, context) => {
|
|
|
22195
22607
|
if (slotProps.length) {
|
|
22196
22608
|
const [isDynamic, props] = buildProps(extend({}, node, { props: slotProps }), context, true);
|
|
22197
22609
|
irProps = isDynamic ? props : [props];
|
|
22198
|
-
const runtimeDirective = context.block.operation.find((oper) => oper.type ===
|
|
22610
|
+
const runtimeDirective = context.block.operation.find((oper) => oper.type === 14 && oper.element === id);
|
|
22199
22611
|
if (runtimeDirective) context.options.onError(createCompilerError(36, runtimeDirective.dir.loc));
|
|
22200
22612
|
}
|
|
22201
22613
|
return () => {
|
|
22202
22614
|
exitBlock && exitBlock();
|
|
22203
|
-
context.dynamic.operation = {
|
|
22204
|
-
type:
|
|
22615
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
22616
|
+
type: 13,
|
|
22205
22617
|
node,
|
|
22206
|
-
id
|
|
22618
|
+
id
|
|
22619
|
+
}, context.effectBoundary()), {}, {
|
|
22207
22620
|
name: slotName,
|
|
22208
22621
|
props: irProps,
|
|
22209
22622
|
fallback,
|
|
22210
22623
|
noSlotted: !!(context.options.scopeId && !context.options.slotted),
|
|
22211
22624
|
once: context.inVOnce
|
|
22212
|
-
};
|
|
22625
|
+
});
|
|
22213
22626
|
};
|
|
22214
22627
|
};
|
|
22215
22628
|
function createFallback(node, context) {
|
|
@@ -22226,7 +22639,6 @@ function createFallback(node, context) {
|
|
|
22226
22639
|
context.reference();
|
|
22227
22640
|
return [fallback, exitBlock];
|
|
22228
22641
|
}
|
|
22229
|
-
|
|
22230
22642
|
//#endregion
|
|
22231
22643
|
//#region packages/compiler-vapor/src/transforms/vSlot.ts
|
|
22232
22644
|
const transformVSlot = (node, context) => {
|
|
@@ -22243,22 +22655,24 @@ const transformVSlot = (node, context) => {
|
|
|
22243
22655
|
function transformComponentSlot(node, dir, context) {
|
|
22244
22656
|
const { children } = node;
|
|
22245
22657
|
const arg = dir && dir.arg;
|
|
22658
|
+
const hasTemplateSlots = children.some(isSlotTemplateChild);
|
|
22246
22659
|
const emptyTextNodes = [];
|
|
22247
22660
|
const nonSlotTemplateChildren = children.filter((n) => {
|
|
22248
|
-
if (
|
|
22249
|
-
|
|
22661
|
+
if (isSlotTemplateChild(n)) return false;
|
|
22662
|
+
if (n.type === 3 && hasTemplateSlots) {
|
|
22663
|
+
ignoreComment(n, context);
|
|
22664
|
+
return false;
|
|
22665
|
+
}
|
|
22666
|
+
if (isNonWhitespaceContent(n)) return true;
|
|
22667
|
+
else {
|
|
22668
|
+
emptyTextNodes.push(n);
|
|
22669
|
+
return false;
|
|
22670
|
+
}
|
|
22250
22671
|
});
|
|
22251
22672
|
if (!nonSlotTemplateChildren.length) emptyTextNodes.forEach((n) => {
|
|
22252
22673
|
markNonTemplate(n, context);
|
|
22253
22674
|
});
|
|
22254
22675
|
const [block, onExit] = createSlotBlock(node, dir, context);
|
|
22255
|
-
if (isTransitionNode(node) && nonSlotTemplateChildren.length) {
|
|
22256
|
-
const nonCommentChild = nonSlotTemplateChildren.find((n) => !isCommentOrWhitespace(n));
|
|
22257
|
-
if (nonCommentChild) {
|
|
22258
|
-
const keyProp = findProp(nonCommentChild, "key");
|
|
22259
|
-
if (keyProp) block.key = keyProp.exp;
|
|
22260
|
-
}
|
|
22261
|
-
}
|
|
22262
22676
|
const { slots } = context;
|
|
22263
22677
|
return () => {
|
|
22264
22678
|
onExit();
|
|
@@ -22277,14 +22691,16 @@ function transformComponentSlot(node, dir, context) {
|
|
|
22277
22691
|
}
|
|
22278
22692
|
function transformTemplateSlot(node, dir, context) {
|
|
22279
22693
|
context.dynamic.flags |= 2;
|
|
22280
|
-
const
|
|
22694
|
+
const resolvedArg = dir.arg && resolveExpression(dir.arg);
|
|
22695
|
+
let arg = resolvedArg;
|
|
22696
|
+
if (!arg) arg = createSimpleExpression("default", true);
|
|
22281
22697
|
const vFor = findDir(node, "for");
|
|
22282
22698
|
const vIf = findDir(node, "if");
|
|
22283
22699
|
const vElse = findDir(node, /^else(-if)?$/, true);
|
|
22284
22700
|
const { slots } = context;
|
|
22285
22701
|
const [block, onExit] = createSlotBlock(node, dir, context);
|
|
22286
22702
|
if (!vFor && !vIf && !vElse) {
|
|
22287
|
-
const slotName =
|
|
22703
|
+
const slotName = resolvedArg ? resolvedArg.isStatic && resolvedArg.content : "default";
|
|
22288
22704
|
if (slotName && hasStaticSlot(slots, slotName)) context.options.onError(createCompilerError(38, dir.loc));
|
|
22289
22705
|
else registerSlot(slots, arg, block);
|
|
22290
22706
|
} else if (vIf) registerDynamicSlot(slots, {
|
|
@@ -22360,7 +22776,9 @@ function isNonWhitespaceContent(node) {
|
|
|
22360
22776
|
if (node.type !== 2) return true;
|
|
22361
22777
|
return !!node.content.trim();
|
|
22362
22778
|
}
|
|
22363
|
-
|
|
22779
|
+
function isSlotTemplateChild(node) {
|
|
22780
|
+
return node.type === 1 && isTemplateNode(node) && !!findDir(node, "slot", true);
|
|
22781
|
+
}
|
|
22364
22782
|
//#endregion
|
|
22365
22783
|
//#region packages/compiler-vapor/src/transforms/transformTransition.ts
|
|
22366
22784
|
const transformTransition = (node, context) => {
|
|
@@ -22371,12 +22789,40 @@ const transformTransition = (node, context) => {
|
|
|
22371
22789
|
function hasMultipleChildren(node) {
|
|
22372
22790
|
const children = node.children = node.children.filter((c) => c.type !== 3 && !(c.type === 2 && !c.content.trim()));
|
|
22373
22791
|
const first = children[0];
|
|
22374
|
-
if (children.length === 1 && first.type === 1
|
|
22792
|
+
if (children.length === 1 && first.type === 1) {
|
|
22793
|
+
if (findDir(first, "for")) return true;
|
|
22794
|
+
if (isTemplateNode(first)) return hasMultipleChildren(first);
|
|
22795
|
+
}
|
|
22375
22796
|
const hasElse = (node) => findDir(node, "else-if") || findDir(node, "else", true);
|
|
22376
|
-
if (children.every((c, index) => c.type === 1 && !isTemplateNode(c) && !findDir(c, "for") && (index === 0 ? findDir(c, "if") : hasElse(c)))) return false;
|
|
22377
|
-
return children.length
|
|
22797
|
+
if (children.length > 0 && children.every((c, index) => c.type === 1 && (!isTemplateNode(c) || !hasMultipleChildren(c)) && !findDir(c, "for") && (index === 0 ? findDir(c, "if") : hasElse(c)))) return false;
|
|
22798
|
+
return children.length !== 1;
|
|
22378
22799
|
}
|
|
22379
|
-
|
|
22800
|
+
//#endregion
|
|
22801
|
+
//#region packages/compiler-vapor/src/transforms/transformKey.ts
|
|
22802
|
+
const transformKey = (node, context) => {
|
|
22803
|
+
if (node.type !== 1 || context.inVOnce || findDir(node, "for")) return;
|
|
22804
|
+
const dir = findProp(node, "key", true, true);
|
|
22805
|
+
if (!dir || dir.type === 6) return;
|
|
22806
|
+
let value;
|
|
22807
|
+
value = dir.exp || normalizeBindShorthand(dir.arg, context);
|
|
22808
|
+
if (isStaticExpression(value, context.options.bindingMetadata)) return;
|
|
22809
|
+
let id = context.reference();
|
|
22810
|
+
context.dynamic.flags |= 6;
|
|
22811
|
+
context.node = node = wrapTemplate(node, ["key"]);
|
|
22812
|
+
const block = newBlock(node);
|
|
22813
|
+
const exitBlock = context.enterBlock(block);
|
|
22814
|
+
return () => {
|
|
22815
|
+
exitBlock();
|
|
22816
|
+
context.dynamic.operation = _objectSpread2(_objectSpread2({
|
|
22817
|
+
type: 17,
|
|
22818
|
+
node,
|
|
22819
|
+
id
|
|
22820
|
+
}, context.effectBoundary()), {}, {
|
|
22821
|
+
value,
|
|
22822
|
+
block
|
|
22823
|
+
});
|
|
22824
|
+
};
|
|
22825
|
+
};
|
|
22380
22826
|
//#endregion
|
|
22381
22827
|
//#region packages/compiler-vapor/src/compile.ts
|
|
22382
22828
|
function compile(source, options = {}) {
|
|
@@ -22401,6 +22847,7 @@ function getBaseTransformPreset() {
|
|
|
22401
22847
|
transformVOnce,
|
|
22402
22848
|
transformVIf,
|
|
22403
22849
|
transformVFor,
|
|
22850
|
+
transformKey,
|
|
22404
22851
|
transformSlotOutlet,
|
|
22405
22852
|
transformTemplateRef,
|
|
22406
22853
|
transformElement,
|
|
@@ -22417,7 +22864,6 @@ function getBaseTransformPreset() {
|
|
|
22417
22864
|
model: transformVModel
|
|
22418
22865
|
}];
|
|
22419
22866
|
}
|
|
22420
|
-
|
|
22421
22867
|
//#endregion
|
|
22422
22868
|
//#region packages/compiler-vapor/src/errors.ts
|
|
22423
22869
|
function createVaporCompilerError(code, loc) {
|
|
@@ -22433,6 +22879,5 @@ const VaporErrorMessages = {
|
|
|
22433
22879
|
[100]: `[placeholder]`,
|
|
22434
22880
|
[101]: ``
|
|
22435
22881
|
};
|
|
22436
|
-
|
|
22437
22882
|
//#endregion
|
|
22438
|
-
export { CodegenContext, DELIMITERS_ARRAY, DELIMITERS_ARRAY_NEWLINE, DELIMITERS_OBJECT, DELIMITERS_OBJECT_NEWLINE, DynamicFlag, IMPORT_EXPR_RE, IMPORT_EXP_END, IMPORT_EXP_START, INDENT_END, INDENT_START, IRDynamicPropsKind, IRNodeTypes, IRSlotType, LF, NEWLINE, TEXT_NODE_PLACEHOLDER, TEXT_PLACEHOLDER, VaporErrorCodes, VaporErrorMessages, analyzeExpressions, buildCodeFragment, buildDestructureIdMap, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, getBaseTransformPreset, getLiteralExpressionValue, isBlockOperation, isBuiltInComponent, isConstantExpression, isKeepAliveTag, isStaticExpression, isTeleportTag, isTransitionGroupTag, isTransitionTag, needsVaporCtx, parse, parseValueDestructure, propToExpression, transform, transformChildren, transformComment, transformElement, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|
|
22883
|
+
export { CodegenContext, DELIMITERS_ARRAY, DELIMITERS_ARRAY_NEWLINE, DELIMITERS_OBJECT, DELIMITERS_OBJECT_NEWLINE, DynamicFlag, IMPORT_EXPR_RE, IMPORT_EXP_END, IMPORT_EXP_START, INDENT_END, INDENT_START, IRDynamicPropsKind, IRNodeTypes, IRSlotType, LF, NEWLINE, TEXT_NODE_PLACEHOLDER, TEXT_PLACEHOLDER, TemplateRegistry, VaporErrorCodes, VaporErrorMessages, analyzeExpressions, buildCodeFragment, buildDestructureIdMap, codeFragmentToString, compile, createStructuralDirectiveTransform, createVaporCompilerError, genCall, genMulti, generate, getBaseTransformPreset, getLiteralExpressionValue, getParserOptions, isBlockOperation, isBuiltInComponent, isConstantExpression, isKeepAliveTag, isStaticExpression, isTeleportTag, isTransitionGroupTag, isTransitionTag, matchKeyOnlyBindingPattern, matchSelectorPattern, needsVaporCtx, parse, parseValueDestructure, propToExpression, transform, transformChildren, transformComment, transformElement, transformKey, transformSlotOutlet, transformTemplateRef, transformText, transformVBind, transformVFor, transformVHtml, transformVIf, transformVModel, transformVOn, transformVOnce, transformVShow, transformVSlot, transformVText, wrapTemplate };
|