@dcloudio/uni-cli-shared 3.0.0-5000720260410001 → 3.0.0-5010420260703001
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 +17 -0
- package/dist/dom2/vue.js +50 -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 +66 -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/index.d.ts +1 -1
- package/dist/json/index.js +2 -1
- 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/messages/en.d.ts +10 -2
- package/dist/messages/en.js +10 -2
- package/dist/messages/index.d.ts +20 -4
- package/dist/messages/zh_CN.d.ts +10 -2
- package/dist/messages/zh_CN.js +10 -2
- package/dist/mp/style.js +6 -2
- package/dist/postcss/plugins/stylePluginExternal.d.ts +9 -10
- package/dist/postcss/plugins/stylePluginExternal.js +51 -45
- 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/inject.js +4 -1
- package/dist/vite/plugins/json.js +2 -69
- package/dist/vite/plugins/pre.js +2 -0
- 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/css.d.ts +2 -2
- package/dist/vite/plugins/vitejs/plugins/css.js +10 -5
- package/dist/vue/transforms/index.d.ts +1 -0
- package/dist/vue/transforms/index.js +1 -0
- 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 +10 -0
- package/dist/x.js +39 -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,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compiler-dom v3.6.0-beta.
|
|
2
|
+
* @vue/compiler-dom v3.6.0-beta.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -17,11 +17,10 @@ function makeMap(str) {
|
|
|
17
17
|
for (const key of str.split(",")) map[key] = 1;
|
|
18
18
|
return (val) => val in map;
|
|
19
19
|
}
|
|
20
|
-
|
|
21
20
|
//#endregion
|
|
22
21
|
//#region packages/shared/src/general.ts
|
|
23
22
|
const EMPTY_OBJ = Object.freeze({});
|
|
24
|
-
|
|
23
|
+
Object.freeze([]);
|
|
25
24
|
const NOOP = () => {};
|
|
26
25
|
/**
|
|
27
26
|
* Always return false.
|
|
@@ -47,11 +46,6 @@ const camelizeReplacer = (_, c) => c ? c.toUpperCase() : "";
|
|
|
47
46
|
* @private
|
|
48
47
|
*/
|
|
49
48
|
const camelize = cacheStringFunction((str) => str.replace(camelizeRE, camelizeReplacer));
|
|
50
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
51
|
-
/**
|
|
52
|
-
* @private
|
|
53
|
-
*/
|
|
54
|
-
const hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
|
|
55
49
|
/**
|
|
56
50
|
* @private
|
|
57
51
|
*/
|
|
@@ -73,7 +67,6 @@ const toHandlerKey = cacheStringFunction((str) => {
|
|
|
73
67
|
const getModifierPropName = (name) => {
|
|
74
68
|
return `${name === "modelValue" || name === "model-value" ? "model" : name}Modifiers${name === "model" ? "$" : ""}`;
|
|
75
69
|
};
|
|
76
|
-
|
|
77
70
|
//#endregion
|
|
78
71
|
//#region packages/shared/src/patchFlags.ts
|
|
79
72
|
/**
|
|
@@ -95,7 +88,6 @@ const PatchFlagNames = {
|
|
|
95
88
|
[-1]: `CACHED`,
|
|
96
89
|
[-2]: `BAIL`
|
|
97
90
|
};
|
|
98
|
-
|
|
99
91
|
//#endregion
|
|
100
92
|
//#region packages/shared/src/slotFlags.ts
|
|
101
93
|
/**
|
|
@@ -106,7 +98,6 @@ const slotFlagsText = {
|
|
|
106
98
|
[2]: "DYNAMIC",
|
|
107
99
|
[3]: "FORWARDED"
|
|
108
100
|
};
|
|
109
|
-
|
|
110
101
|
//#endregion
|
|
111
102
|
//#region packages/shared/src/codeframe.ts
|
|
112
103
|
const range = 2;
|
|
@@ -145,7 +136,6 @@ function generateCodeFrame(source, start = 0, end = source.length) {
|
|
|
145
136
|
}
|
|
146
137
|
return res.join("\n");
|
|
147
138
|
}
|
|
148
|
-
|
|
149
139
|
//#endregion
|
|
150
140
|
//#region packages/shared/src/normalizeProp.ts
|
|
151
141
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
@@ -161,7 +151,6 @@ function parseStringStyle(cssText) {
|
|
|
161
151
|
});
|
|
162
152
|
return ret;
|
|
163
153
|
}
|
|
164
|
-
|
|
165
154
|
//#endregion
|
|
166
155
|
//#region packages/shared/src/domTagConfig.ts
|
|
167
156
|
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";
|
|
@@ -188,7 +177,6 @@ const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
|
188
177
|
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
189
178
|
*/
|
|
190
179
|
const isVoidTag = /* @__PURE__ */ makeMap(VOID_TAGS);
|
|
191
|
-
|
|
192
180
|
//#endregion
|
|
193
181
|
//#region packages/compiler-core/src/runtimeHelpers.ts
|
|
194
182
|
const FRAGMENT = Symbol(`Fragment`);
|
|
@@ -283,7 +271,6 @@ function registerRuntimeHelpers(helpers) {
|
|
|
283
271
|
helperNameMap[s] = helpers[s];
|
|
284
272
|
});
|
|
285
273
|
}
|
|
286
|
-
|
|
287
274
|
//#endregion
|
|
288
275
|
//#region packages/compiler-core/src/ast.ts
|
|
289
276
|
const NodeTypes = {
|
|
@@ -561,7 +548,6 @@ function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
|
561
548
|
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
562
549
|
}
|
|
563
550
|
}
|
|
564
|
-
|
|
565
551
|
//#endregion
|
|
566
552
|
//#region packages/compiler-core/src/tokenizer.ts
|
|
567
553
|
const defaultDelimitersOpen = new Uint8Array([123, 123]);
|
|
@@ -1270,7 +1256,6 @@ var Tokenizer = class {
|
|
|
1270
1256
|
}
|
|
1271
1257
|
emitCodePoint(cp, consumed) {}
|
|
1272
1258
|
};
|
|
1273
|
-
|
|
1274
1259
|
//#endregion
|
|
1275
1260
|
//#region packages/compiler-core/src/compat/compatConfig.ts
|
|
1276
1261
|
const CompilerDeprecationTypes = {
|
|
@@ -1338,7 +1323,6 @@ function warnDeprecation(key, context, loc, ...args) {
|
|
|
1338
1323
|
if (loc) err.loc = loc;
|
|
1339
1324
|
context.onWarn(err);
|
|
1340
1325
|
}
|
|
1341
|
-
|
|
1342
1326
|
//#endregion
|
|
1343
1327
|
//#region packages/compiler-core/src/errors.ts
|
|
1344
1328
|
function defaultOnError(error) {
|
|
@@ -1523,7 +1507,6 @@ const errorMessages = {
|
|
|
1523
1507
|
[51]: `"scopeId" option is only supported in module mode.`,
|
|
1524
1508
|
[54]: ``
|
|
1525
1509
|
};
|
|
1526
|
-
|
|
1527
1510
|
//#endregion
|
|
1528
1511
|
//#region packages/compiler-core/src/babelUtils.ts
|
|
1529
1512
|
/**
|
|
@@ -1661,7 +1644,6 @@ function isConstantNode(node, bindings) {
|
|
|
1661
1644
|
}
|
|
1662
1645
|
return false;
|
|
1663
1646
|
}
|
|
1664
|
-
|
|
1665
1647
|
//#endregion
|
|
1666
1648
|
//#region packages/compiler-core/src/utils.ts
|
|
1667
1649
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
@@ -1698,7 +1680,7 @@ const getExpSource = (exp) => exp.type === 4 ? exp.content : exp.loc.source;
|
|
|
1698
1680
|
*/
|
|
1699
1681
|
const isMemberExpressionBrowser = (exp) => {
|
|
1700
1682
|
const path = getExpSource(exp).trim().replace(whitespaceRE, (s) => s.trim());
|
|
1701
|
-
let state =
|
|
1683
|
+
let state = 0;
|
|
1702
1684
|
let stateStack = [];
|
|
1703
1685
|
let currentOpenBracketCount = 0;
|
|
1704
1686
|
let currentOpenParensCount = 0;
|
|
@@ -1706,31 +1688,31 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
1706
1688
|
for (let i = 0; i < path.length; i++) {
|
|
1707
1689
|
const char = path.charAt(i);
|
|
1708
1690
|
switch (state) {
|
|
1709
|
-
case
|
|
1691
|
+
case 0:
|
|
1710
1692
|
if (char === "[") {
|
|
1711
1693
|
stateStack.push(state);
|
|
1712
|
-
state =
|
|
1694
|
+
state = 1;
|
|
1713
1695
|
currentOpenBracketCount++;
|
|
1714
1696
|
} else if (char === "(") {
|
|
1715
1697
|
stateStack.push(state);
|
|
1716
|
-
state =
|
|
1698
|
+
state = 2;
|
|
1717
1699
|
currentOpenParensCount++;
|
|
1718
1700
|
} else if (!(i === 0 ? validFirstIdentCharRE : validIdentCharRE).test(char)) return false;
|
|
1719
1701
|
break;
|
|
1720
|
-
case
|
|
1702
|
+
case 1:
|
|
1721
1703
|
if (char === `'` || char === `"` || char === "`") {
|
|
1722
1704
|
stateStack.push(state);
|
|
1723
|
-
state =
|
|
1705
|
+
state = 3;
|
|
1724
1706
|
currentStringType = char;
|
|
1725
1707
|
} else if (char === `[`) currentOpenBracketCount++;
|
|
1726
1708
|
else if (char === `]`) {
|
|
1727
1709
|
if (!--currentOpenBracketCount) state = stateStack.pop();
|
|
1728
1710
|
}
|
|
1729
1711
|
break;
|
|
1730
|
-
case
|
|
1712
|
+
case 2:
|
|
1731
1713
|
if (char === `'` || char === `"` || char === "`") {
|
|
1732
1714
|
stateStack.push(state);
|
|
1733
|
-
state =
|
|
1715
|
+
state = 3;
|
|
1734
1716
|
currentStringType = char;
|
|
1735
1717
|
} else if (char === `(`) currentOpenParensCount++;
|
|
1736
1718
|
else if (char === `)`) {
|
|
@@ -1738,7 +1720,7 @@ const isMemberExpressionBrowser = (exp) => {
|
|
|
1738
1720
|
if (!--currentOpenParensCount) state = stateStack.pop();
|
|
1739
1721
|
}
|
|
1740
1722
|
break;
|
|
1741
|
-
case
|
|
1723
|
+
case 3:
|
|
1742
1724
|
if (char === currentStringType) {
|
|
1743
1725
|
state = stateStack.pop();
|
|
1744
1726
|
currentStringType = null;
|
|
@@ -1929,7 +1911,6 @@ function isWhitespaceText(node) {
|
|
|
1929
1911
|
function isCommentOrWhitespace(node) {
|
|
1930
1912
|
return node.type === 3 || isWhitespaceText(node);
|
|
1931
1913
|
}
|
|
1932
|
-
|
|
1933
1914
|
//#endregion
|
|
1934
1915
|
//#region packages/compiler-core/src/parser.ts
|
|
1935
1916
|
const defaultParserOptions = {
|
|
@@ -2111,8 +2092,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
2111
2092
|
};
|
|
2112
2093
|
if (tokenizer.inSFCRoot && currentOpenTag.tag === "template" && currentProp.name === "lang" && currentAttrValue && currentAttrValue !== "html") tokenizer.enterRCDATA(toCharCodes(`</template`), 0);
|
|
2113
2094
|
} else {
|
|
2114
|
-
|
|
2115
|
-
currentProp.exp = createExp(currentAttrValue, false, getLoc(currentAttrStartIndex, currentAttrEndIndex), 0, expParseMode);
|
|
2095
|
+
currentProp.exp = createExp(currentAttrValue, false, getLoc(currentAttrStartIndex, currentAttrEndIndex), 0, 0);
|
|
2116
2096
|
if (currentProp.name === "for") currentProp.forParseResult = parseForExpression(currentProp.exp);
|
|
2117
2097
|
let syncIndex = -1;
|
|
2118
2098
|
if (currentProp.name === "bind" && (syncIndex = currentProp.modifiers.findIndex((mod) => mod.content === "sync")) > -1 && checkCompatEnabled("COMPILER_V_BIND_SYNC", currentOptions, currentProp.loc, currentProp.arg.loc.source)) {
|
|
@@ -2189,7 +2169,7 @@ function parseForExpression(input) {
|
|
|
2189
2169
|
const [, LHS, RHS] = inMatch;
|
|
2190
2170
|
const createAliasExpression = (content, offset, asParam = false) => {
|
|
2191
2171
|
const start = loc.start.offset + offset;
|
|
2192
|
-
return createExp(content, false, getLoc(start, start + content.length), 0, asParam ?
|
|
2172
|
+
return createExp(content, false, getLoc(start, start + content.length), 0, asParam ? 1 : 0);
|
|
2193
2173
|
};
|
|
2194
2174
|
const result = {
|
|
2195
2175
|
source: createAliasExpression(RHS.trim(), exp.indexOf(RHS, LHS.length)),
|
|
@@ -2432,7 +2412,7 @@ var ExpParseMode = /* @__PURE__ */ function(ExpParseMode) {
|
|
|
2432
2412
|
ExpParseMode[ExpParseMode["Skip"] = 3] = "Skip";
|
|
2433
2413
|
return ExpParseMode;
|
|
2434
2414
|
}(ExpParseMode || {});
|
|
2435
|
-
function createExp(content, isStatic = false, loc, constType = 0, parseMode =
|
|
2415
|
+
function createExp(content, isStatic = false, loc, constType = 0, parseMode = 0) {
|
|
2436
2416
|
return createSimpleExpression(content, isStatic, loc, constType);
|
|
2437
2417
|
}
|
|
2438
2418
|
function emitError(code, index, message) {
|
|
@@ -2470,7 +2450,6 @@ function baseParse(input, options) {
|
|
|
2470
2450
|
currentRoot = null;
|
|
2471
2451
|
return root;
|
|
2472
2452
|
}
|
|
2473
|
-
|
|
2474
2453
|
//#endregion
|
|
2475
2454
|
//#region packages/compiler-core/src/transforms/cacheStatic.ts
|
|
2476
2455
|
function cacheStatic(root, context) {
|
|
@@ -2666,7 +2645,6 @@ function getNodeProps(node) {
|
|
|
2666
2645
|
const codegenNode = node.codegenNode;
|
|
2667
2646
|
if (codegenNode.type === 13) return codegenNode.props;
|
|
2668
2647
|
}
|
|
2669
|
-
|
|
2670
2648
|
//#endregion
|
|
2671
2649
|
//#region packages/compiler-core/src/transform.ts
|
|
2672
2650
|
function getSelfName(filename) {
|
|
@@ -2711,6 +2689,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
2711
2689
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
2712
2690
|
temps: 0,
|
|
2713
2691
|
identifiers: Object.create(null),
|
|
2692
|
+
identifierScopes: Object.create(null),
|
|
2714
2693
|
scopes: {
|
|
2715
2694
|
vFor: 0,
|
|
2716
2695
|
vSlot: 0,
|
|
@@ -2761,8 +2740,12 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
2761
2740
|
context.parent.children.splice(removalIndex, 1);
|
|
2762
2741
|
},
|
|
2763
2742
|
onNodeRemoved: NOOP,
|
|
2764
|
-
addIdentifiers(exp) {},
|
|
2743
|
+
addIdentifiers(exp, type = "local") {},
|
|
2765
2744
|
removeIdentifiers(exp) {},
|
|
2745
|
+
isSlotScopeIdentifier(name) {
|
|
2746
|
+
const scopes = context.identifierScopes[name];
|
|
2747
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
2748
|
+
},
|
|
2766
2749
|
hoist(exp) {
|
|
2767
2750
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
2768
2751
|
context.hoists.push(exp);
|
|
@@ -2877,7 +2860,6 @@ function createStructuralDirectiveTransform(name, fn) {
|
|
|
2877
2860
|
}
|
|
2878
2861
|
};
|
|
2879
2862
|
}
|
|
2880
|
-
|
|
2881
2863
|
//#endregion
|
|
2882
2864
|
//#region packages/compiler-core/src/codegen.ts
|
|
2883
2865
|
const PURE_ANNOTATION = `/*@__PURE__*/`;
|
|
@@ -3127,6 +3109,7 @@ function genNode(node, context) {
|
|
|
3127
3109
|
case 24: break;
|
|
3128
3110
|
case 25: break;
|
|
3129
3111
|
case 26: break;
|
|
3112
|
+
/* v8 ignore start */
|
|
3130
3113
|
case 10: break;
|
|
3131
3114
|
default:
|
|
3132
3115
|
assert(false, `unhandled codegen node type: ${node.type}`);
|
|
@@ -3312,7 +3295,6 @@ function genCacheExpression(node, context) {
|
|
|
3312
3295
|
push(`)`);
|
|
3313
3296
|
if (needArraySpread) push(`)]`);
|
|
3314
3297
|
}
|
|
3315
|
-
|
|
3316
3298
|
//#endregion
|
|
3317
3299
|
//#region packages/compiler-core/src/validateExpression.ts
|
|
3318
3300
|
const prohibitedKeywordRE = new RegExp("\\b" + "arguments,await,break,case,catch,class,const,continue,debugger,default,delete,do,else,export,extends,finally,for,function,if,import,let,new,return,super,switch,throw,try,var,void,while,with,yield".split(",").join("\\b|\\b") + "\\b");
|
|
@@ -3334,7 +3316,6 @@ function validateBrowserExpression(node, context, asParams = false, asRawStateme
|
|
|
3334
3316
|
context.onError(createCompilerError(46, node.loc, void 0, message));
|
|
3335
3317
|
}
|
|
3336
3318
|
}
|
|
3337
|
-
|
|
3338
3319
|
//#endregion
|
|
3339
3320
|
//#region packages/compiler-core/src/transforms/transformExpression.ts
|
|
3340
3321
|
const isLiteralWhitelisted = /* @__PURE__ */ makeMap("true,false,null,this");
|
|
@@ -3362,7 +3343,6 @@ function stringifyExpression(exp) {
|
|
|
3362
3343
|
else if (exp.type === 4) return exp.content;
|
|
3363
3344
|
else return exp.children.map(stringifyExpression).join("");
|
|
3364
3345
|
}
|
|
3365
|
-
|
|
3366
3346
|
//#endregion
|
|
3367
3347
|
//#region packages/compiler-core/src/transforms/vIf.ts
|
|
3368
3348
|
const transformIf = createStructuralDirectiveTransform(/^(?:if|else|else-if)$/, (node, dir, context) => {
|
|
@@ -3485,7 +3465,6 @@ function getParentCondition(node) {
|
|
|
3485
3465
|
else return node;
|
|
3486
3466
|
else if (node.type === 20) node = node.value;
|
|
3487
3467
|
}
|
|
3488
|
-
|
|
3489
3468
|
//#endregion
|
|
3490
3469
|
//#region packages/compiler-core/src/transforms/vFor.ts
|
|
3491
3470
|
const transformFor = createStructuralDirectiveTransform("for", (node, dir, context) => {
|
|
@@ -3542,7 +3521,7 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
3542
3521
|
`)`
|
|
3543
3522
|
]),
|
|
3544
3523
|
createCompoundExpression([
|
|
3545
|
-
`if (_cached`,
|
|
3524
|
+
`if (_cached && _cached.el`,
|
|
3546
3525
|
...keyExp ? [` && _cached.key === `, keyExp] : [],
|
|
3547
3526
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
3548
3527
|
]),
|
|
@@ -3608,7 +3587,6 @@ function createParamsList(args) {
|
|
|
3608
3587
|
while (i--) if (args[i]) break;
|
|
3609
3588
|
return args.slice(0, i + 1).map((arg, i) => arg || createSimpleExpression(`_`.repeat(i + 1), false));
|
|
3610
3589
|
}
|
|
3611
|
-
|
|
3612
3590
|
//#endregion
|
|
3613
3591
|
//#region packages/compiler-core/src/transforms/vSlot.ts
|
|
3614
3592
|
const defaultFallback = createSimpleExpression(`undefined`, false);
|
|
@@ -3758,7 +3736,6 @@ function hasForwardedSlots(children) {
|
|
|
3758
3736
|
}
|
|
3759
3737
|
return false;
|
|
3760
3738
|
}
|
|
3761
|
-
|
|
3762
3739
|
//#endregion
|
|
3763
3740
|
//#region packages/compiler-core/src/transforms/transformElement.ts
|
|
3764
3741
|
const directiveImportMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -4051,7 +4028,6 @@ function stringifyDynamicPropNames(props) {
|
|
|
4051
4028
|
function isComponentTag(tag) {
|
|
4052
4029
|
return tag === "component" || tag === "Component";
|
|
4053
4030
|
}
|
|
4054
|
-
|
|
4055
4031
|
//#endregion
|
|
4056
4032
|
//#region packages/compiler-core/src/transforms/transformSlotOutlet.ts
|
|
4057
4033
|
const transformSlotOutlet = (node, context) => {
|
|
@@ -4109,7 +4085,6 @@ function processSlotOutlet(node, context) {
|
|
|
4109
4085
|
slotProps
|
|
4110
4086
|
};
|
|
4111
4087
|
}
|
|
4112
|
-
|
|
4113
4088
|
//#endregion
|
|
4114
4089
|
//#region packages/compiler-core/src/transforms/vOn.ts
|
|
4115
4090
|
const transformOn = (dir, node, context, augmentor) => {
|
|
@@ -4151,7 +4126,6 @@ const transformOn = (dir, node, context, augmentor) => {
|
|
|
4151
4126
|
ret.props.forEach((p) => p.key.isHandlerKey = true);
|
|
4152
4127
|
return ret;
|
|
4153
4128
|
};
|
|
4154
|
-
|
|
4155
4129
|
//#endregion
|
|
4156
4130
|
//#region packages/compiler-core/src/transforms/vBind.ts
|
|
4157
4131
|
const transformBind = (dir, _node, context) => {
|
|
@@ -4183,7 +4157,6 @@ const injectPrefix = (arg, prefix) => {
|
|
|
4183
4157
|
arg.children.push(`)`);
|
|
4184
4158
|
}
|
|
4185
4159
|
};
|
|
4186
|
-
|
|
4187
4160
|
//#endregion
|
|
4188
4161
|
//#region packages/compiler-core/src/transforms/transformText.ts
|
|
4189
4162
|
const transformText = (node, context) => {
|
|
@@ -4226,7 +4199,6 @@ const transformText = (node, context) => {
|
|
|
4226
4199
|
}
|
|
4227
4200
|
};
|
|
4228
4201
|
};
|
|
4229
|
-
|
|
4230
4202
|
//#endregion
|
|
4231
4203
|
//#region packages/compiler-core/src/transforms/vOnce.ts
|
|
4232
4204
|
const seen$1 = /* @__PURE__ */ new WeakSet();
|
|
@@ -4243,7 +4215,6 @@ const transformOnce = (node, context) => {
|
|
|
4243
4215
|
};
|
|
4244
4216
|
}
|
|
4245
4217
|
};
|
|
4246
|
-
|
|
4247
4218
|
//#endregion
|
|
4248
4219
|
//#region packages/compiler-core/src/transforms/vModel.ts
|
|
4249
4220
|
const transformModel = (dir, node, context) => {
|
|
@@ -4286,7 +4257,6 @@ const transformModel = (dir, node, context) => {
|
|
|
4286
4257
|
function createTransformProps(props = []) {
|
|
4287
4258
|
return { props };
|
|
4288
4259
|
}
|
|
4289
|
-
|
|
4290
4260
|
//#endregion
|
|
4291
4261
|
//#region packages/compiler-core/src/compat/transformFilter.ts
|
|
4292
4262
|
const validDivisionCharRE = /[\w).+\-_$\]]/;
|
|
@@ -4400,7 +4370,6 @@ function wrapFilter(exp, filter, context) {
|
|
|
4400
4370
|
return `${toValidAssetId(name, "filter")}(${exp}${args !== ")" ? "," + args : args}`;
|
|
4401
4371
|
}
|
|
4402
4372
|
}
|
|
4403
|
-
|
|
4404
4373
|
//#endregion
|
|
4405
4374
|
//#region packages/compiler-core/src/transforms/vMemo.ts
|
|
4406
4375
|
const seen = /* @__PURE__ */ new WeakSet();
|
|
@@ -4424,7 +4393,6 @@ const transformMemo = (node, context) => {
|
|
|
4424
4393
|
};
|
|
4425
4394
|
}
|
|
4426
4395
|
};
|
|
4427
|
-
|
|
4428
4396
|
//#endregion
|
|
4429
4397
|
//#region packages/compiler-core/src/transforms/transformVBindShorthand.ts
|
|
4430
4398
|
const transformVBindShorthand = (node, context) => {
|
|
@@ -4441,7 +4409,6 @@ const transformVBindShorthand = (node, context) => {
|
|
|
4441
4409
|
}
|
|
4442
4410
|
}
|
|
4443
4411
|
};
|
|
4444
|
-
|
|
4445
4412
|
//#endregion
|
|
4446
4413
|
//#region packages/compiler-core/src/compile.ts
|
|
4447
4414
|
function getBaseTransformPreset(prefixIdentifiers) {
|
|
@@ -4481,7 +4448,6 @@ function baseCompile(source, options = {}) {
|
|
|
4481
4448
|
}));
|
|
4482
4449
|
return generate(ast, resolvedOptions);
|
|
4483
4450
|
}
|
|
4484
|
-
|
|
4485
4451
|
//#endregion
|
|
4486
4452
|
//#region packages/compiler-core/src/options.ts
|
|
4487
4453
|
const BindingTypes = {
|
|
@@ -4496,11 +4462,9 @@ const BindingTypes = {
|
|
|
4496
4462
|
"OPTIONS": "options",
|
|
4497
4463
|
"LITERAL_CONST": "literal-const"
|
|
4498
4464
|
};
|
|
4499
|
-
|
|
4500
4465
|
//#endregion
|
|
4501
4466
|
//#region packages/compiler-core/src/transforms/noopDirectiveTransform.ts
|
|
4502
4467
|
const noopDirectiveTransform = () => ({ props: [] });
|
|
4503
|
-
|
|
4504
4468
|
//#endregion
|
|
4505
4469
|
//#region packages/compiler-dom/src/runtimeHelpers.ts
|
|
4506
4470
|
const V_MODEL_RADIO = Symbol(`vModelRadio`);
|
|
@@ -4525,7 +4489,6 @@ registerRuntimeHelpers({
|
|
|
4525
4489
|
[TRANSITION]: `Transition`,
|
|
4526
4490
|
[TRANSITION_GROUP]: `TransitionGroup`
|
|
4527
4491
|
});
|
|
4528
|
-
|
|
4529
4492
|
//#endregion
|
|
4530
4493
|
//#region packages/compiler-dom/src/decodeHtmlBrowser.ts
|
|
4531
4494
|
let decoder;
|
|
@@ -4539,7 +4502,6 @@ function decodeHtmlBrowser(raw, asAttr = false) {
|
|
|
4539
4502
|
return decoder.textContent;
|
|
4540
4503
|
}
|
|
4541
4504
|
}
|
|
4542
|
-
|
|
4543
4505
|
//#endregion
|
|
4544
4506
|
//#region packages/compiler-dom/src/parserOptions.ts
|
|
4545
4507
|
const parserOptions = {
|
|
@@ -4570,7 +4532,6 @@ const parserOptions = {
|
|
|
4570
4532
|
return ns;
|
|
4571
4533
|
}
|
|
4572
4534
|
};
|
|
4573
|
-
|
|
4574
4535
|
//#endregion
|
|
4575
4536
|
//#region packages/compiler-dom/src/transforms/transformStyle.ts
|
|
4576
4537
|
const transformStyle = (node) => {
|
|
@@ -4589,7 +4550,6 @@ const parseInlineCSS = (cssText, loc) => {
|
|
|
4589
4550
|
const normalized = parseStringStyle(cssText);
|
|
4590
4551
|
return createSimpleExpression(JSON.stringify(normalized), false, loc, 3);
|
|
4591
4552
|
};
|
|
4592
|
-
|
|
4593
4553
|
//#endregion
|
|
4594
4554
|
//#region packages/compiler-dom/src/errors.ts
|
|
4595
4555
|
function createDOMCompilerError(code, loc) {
|
|
@@ -4635,7 +4595,6 @@ const DOMErrorMessages = {
|
|
|
4635
4595
|
[64]: `Tags with side effect (<script> and <style>) are ignored in client component templates.`,
|
|
4636
4596
|
[65]: ``
|
|
4637
4597
|
};
|
|
4638
|
-
|
|
4639
4598
|
//#endregion
|
|
4640
4599
|
//#region packages/compiler-dom/src/transforms/vHtml.ts
|
|
4641
4600
|
const transformVHtml = (dir, node, context) => {
|
|
@@ -4647,7 +4606,6 @@ const transformVHtml = (dir, node, context) => {
|
|
|
4647
4606
|
}
|
|
4648
4607
|
return { props: [createObjectProperty(createSimpleExpression(`innerHTML`, true, loc), exp || createSimpleExpression("", true))] };
|
|
4649
4608
|
};
|
|
4650
|
-
|
|
4651
4609
|
//#endregion
|
|
4652
4610
|
//#region packages/compiler-dom/src/transforms/vText.ts
|
|
4653
4611
|
const transformVText = (dir, node, context) => {
|
|
@@ -4659,7 +4617,6 @@ const transformVText = (dir, node, context) => {
|
|
|
4659
4617
|
}
|
|
4660
4618
|
return { props: [createObjectProperty(createSimpleExpression(`textContent`, true), exp ? getConstantType(exp, context) > 0 ? exp : createCallExpression(context.helperString(TO_DISPLAY_STRING), [exp], loc) : createSimpleExpression("", true))] };
|
|
4661
4619
|
};
|
|
4662
|
-
|
|
4663
4620
|
//#endregion
|
|
4664
4621
|
//#region packages/compiler-dom/src/transforms/vModel.ts
|
|
4665
4622
|
const transformModel$1 = (dir, node, context) => {
|
|
@@ -4703,7 +4660,6 @@ const transformModel$1 = (dir, node, context) => {
|
|
|
4703
4660
|
baseResult.props = baseResult.props.filter((p) => !(p.key.type === 4 && p.key.content === "modelValue"));
|
|
4704
4661
|
return baseResult;
|
|
4705
4662
|
};
|
|
4706
|
-
|
|
4707
4663
|
//#endregion
|
|
4708
4664
|
//#region packages/compiler-dom/src/transforms/vOn.ts
|
|
4709
4665
|
const isEventOptionModifier = /* @__PURE__ */ makeMap(`passive,once,capture`);
|
|
@@ -4766,7 +4722,6 @@ const transformOn$1 = (dir, node, context) => {
|
|
|
4766
4722
|
return { props: [createObjectProperty(key, handlerExp)] };
|
|
4767
4723
|
});
|
|
4768
4724
|
};
|
|
4769
|
-
|
|
4770
4725
|
//#endregion
|
|
4771
4726
|
//#region packages/compiler-dom/src/transforms/vShow.ts
|
|
4772
4727
|
const transformShow = (dir, node, context) => {
|
|
@@ -4777,7 +4732,6 @@ const transformShow = (dir, node, context) => {
|
|
|
4777
4732
|
needRuntime: context.helper(V_SHOW)
|
|
4778
4733
|
};
|
|
4779
4734
|
};
|
|
4780
|
-
|
|
4781
4735
|
//#endregion
|
|
4782
4736
|
//#region packages/compiler-dom/src/transforms/Transition.ts
|
|
4783
4737
|
const transformTransition = (node, context) => {
|
|
@@ -4810,7 +4764,6 @@ function defaultHasMultipleChildren(node) {
|
|
|
4810
4764
|
const child = children[0];
|
|
4811
4765
|
return children.length !== 1 || child.type === 11 || child.type === 9 && child.branches.some(defaultHasMultipleChildren);
|
|
4812
4766
|
}
|
|
4813
|
-
|
|
4814
4767
|
//#endregion
|
|
4815
4768
|
//#region packages/compiler-dom/src/transforms/ignoreSideEffectTags.ts
|
|
4816
4769
|
const ignoreSideEffectTags = (node, context) => {
|
|
@@ -4819,7 +4772,6 @@ const ignoreSideEffectTags = (node, context) => {
|
|
|
4819
4772
|
context.removeNode();
|
|
4820
4773
|
}
|
|
4821
4774
|
};
|
|
4822
|
-
|
|
4823
4775
|
//#endregion
|
|
4824
4776
|
//#region packages/compiler-dom/src/htmlNesting.ts
|
|
4825
4777
|
/**
|
|
@@ -5010,7 +4962,6 @@ const knownInvalidParents = {
|
|
|
5010
4962
|
h5: headings,
|
|
5011
4963
|
h6: headings
|
|
5012
4964
|
};
|
|
5013
|
-
|
|
5014
4965
|
//#endregion
|
|
5015
4966
|
//#region packages/compiler-dom/src/transforms/validateHtmlNesting.ts
|
|
5016
4967
|
const validateHtmlNesting = (node, context) => {
|
|
@@ -5020,7 +4971,6 @@ const validateHtmlNesting = (node, context) => {
|
|
|
5020
4971
|
context.onWarn(error);
|
|
5021
4972
|
}
|
|
5022
4973
|
};
|
|
5023
|
-
|
|
5024
4974
|
//#endregion
|
|
5025
4975
|
//#region packages/compiler-dom/src/index.ts
|
|
5026
4976
|
const DOMNodeTransforms = [transformStyle, ...[transformTransition, validateHtmlNesting]];
|
|
@@ -5046,6 +4996,5 @@ function compile(src, options = {}) {
|
|
|
5046
4996
|
function parse(template, options = {}) {
|
|
5047
4997
|
return baseParse(template, extend({}, parserOptions, options));
|
|
5048
4998
|
}
|
|
5049
|
-
|
|
5050
4999
|
//#endregion
|
|
5051
|
-
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, NewlineType, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createExp, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, defaultOnError, defaultOnWarn, errorMessages, extractIdentifiers, filterNonCommentChildren, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getSelfName, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, hasSingleChild, helperNameMap, injectProp, isAllWhitespace, isCommentOrWhitespace, isConstantNode, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isKeyboardEvent, isLiteralWhitelisted, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSingleIfBlock, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticNode, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVPre, isVSlot, isValidHTMLNesting, isWhitespaceText, locStub, noopDirectiveTransform, parse, parserOptions, postTransformTransition, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, resolveModifiers, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, transformStyle, transformVBindShorthand, traverseNode, unwrapTSNode, validFirstIdentCharRE, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|
|
5000
|
+
export { BASE_TRANSITION, BindingTypes, CAMELIZE, CAPITALIZE, CREATE_BLOCK, CREATE_COMMENT, CREATE_ELEMENT_BLOCK, CREATE_ELEMENT_VNODE, CREATE_SLOTS, CREATE_STATIC, CREATE_TEXT, CREATE_VNODE, CompilerDeprecationTypes, ConstantTypes, DOMDirectiveTransforms, DOMErrorCodes, DOMErrorMessages, DOMNodeTransforms, ElementTypes, ErrorCodes, FRAGMENT, GUARD_REACTIVE_PROPS, IS_MEMO_SAME, IS_REF, KEEP_ALIVE, MERGE_PROPS, NORMALIZE_CLASS, NORMALIZE_PROPS, NORMALIZE_STYLE, NewlineType, NodeTypes, OPEN_BLOCK, POP_SCOPE_ID, PUSH_SCOPE_ID, RENDER_LIST, RENDER_SLOT, RESOLVE_COMPONENT, RESOLVE_DIRECTIVE, RESOLVE_DYNAMIC_COMPONENT, RESOLVE_FILTER, SET_BLOCK_TRACKING, SUSPENSE, TELEPORT, TO_DISPLAY_STRING, TO_HANDLERS, TO_HANDLER_KEY, TRANSITION, TRANSITION_GROUP, TS_NODE_TYPES, UNREF, V_MODEL_CHECKBOX, V_MODEL_DYNAMIC, V_MODEL_RADIO, V_MODEL_SELECT, V_MODEL_TEXT, V_ON_WITH_KEYS, V_ON_WITH_MODIFIERS, V_SHOW, WITH_CTX, WITH_DIRECTIVES, WITH_MEMO, advancePositionWithClone, advancePositionWithMutation, assert, baseCompile, baseParse, buildDirectiveArgs, buildProps, buildSlots, checkCompatEnabled, compile, convertToBlock, createArrayExpression, createAssignmentExpression, createBlockStatement, createCacheExpression, createCallExpression, createCompilerError, createCompoundExpression, createConditionalExpression, createDOMCompilerError, createExp, createForLoopParams, createFunctionExpression, createIfStatement, createInterpolation, createObjectExpression, createObjectProperty, createReturnStatement, createRoot, createSequenceExpression, createSimpleExpression, createStructuralDirectiveTransform, createTemplateLiteral, createTransformContext, createVNodeCall, defaultOnError, defaultOnWarn, errorMessages, extractIdentifiers, filterNonCommentChildren, findDir, findProp, forAliasRE, generate, generateCodeFrame, getBaseTransformPreset, getConstantType, getMemoedVNodeCall, getSelfName, getVNodeBlockHelper, getVNodeHelper, hasDynamicKeyVBind, hasScopeRef, hasSingleChild, helperNameMap, injectProp, isAllWhitespace, isCommentOrWhitespace, isConstantNode, isCoreComponent, isFnExpression, isFnExpressionBrowser, isFnExpressionNode, isFunctionType, isInDestructureAssignment, isInNewExpression, isKeyboardEvent, isLiteralWhitelisted, isMemberExpression, isMemberExpressionBrowser, isMemberExpressionNode, isReferencedIdentifier, isSimpleIdentifier, isSingleIfBlock, isSlotOutlet, isStaticArgOf, isStaticExp, isStaticNode, isStaticProperty, isStaticPropertyKey, isTemplateNode, isText, isVPre, isVSlot, isValidHTMLNesting, isWhitespaceText, locStub, noopDirectiveTransform, parse, parserOptions, postTransformTransition, processExpression, processFor, processIf, processSlotOutlet, registerRuntimeHelpers, resolveComponentType, resolveModifiers, stringifyExpression, toValidAssetId, trackSlotScopes, trackVForSlotScopes, transform, transformBind, transformElement, transformExpression, transformModel, transformOn, transformStyle, transformVBindShorthand, traverseNode, unwrapTSNode, validFirstIdentCharRE, walkBlockDeclarations, walkFunctionParams, walkIdentifiers, warnDeprecation };
|