@vue/compat 3.3.0-alpha.4 → 3.3.0-alpha.5
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/vue.cjs.js +137 -121
- package/dist/vue.cjs.prod.js +135 -137
- package/dist/vue.esm-browser.js +123 -117
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.esm-bundler.js +133 -117
- package/dist/vue.global.js +123 -117
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +106 -100
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.esm-bundler.js +116 -100
- package/dist/vue.runtime.global.js +106 -100
- package/dist/vue.runtime.global.prod.js +1 -1
- package/package.json +2 -2
package/dist/vue.esm-browser.js
CHANGED
|
@@ -7,6 +7,96 @@ function makeMap(str, expectsLowerCase) {
|
|
|
7
7
|
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
|
8
8
|
}
|
|
9
9
|
|
|
10
|
+
const EMPTY_OBJ = Object.freeze({}) ;
|
|
11
|
+
const EMPTY_ARR = Object.freeze([]) ;
|
|
12
|
+
const NOOP = () => {
|
|
13
|
+
};
|
|
14
|
+
const NO = () => false;
|
|
15
|
+
const onRE = /^on[^a-z]/;
|
|
16
|
+
const isOn = (key) => onRE.test(key);
|
|
17
|
+
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
18
|
+
const extend = Object.assign;
|
|
19
|
+
const remove = (arr, el) => {
|
|
20
|
+
const i = arr.indexOf(el);
|
|
21
|
+
if (i > -1) {
|
|
22
|
+
arr.splice(i, 1);
|
|
23
|
+
}
|
|
24
|
+
};
|
|
25
|
+
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
26
|
+
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
27
|
+
const isArray = Array.isArray;
|
|
28
|
+
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
29
|
+
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
30
|
+
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
31
|
+
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
32
|
+
const isFunction = (val) => typeof val === "function";
|
|
33
|
+
const isString = (val) => typeof val === "string";
|
|
34
|
+
const isSymbol = (val) => typeof val === "symbol";
|
|
35
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
36
|
+
const isPromise = (val) => {
|
|
37
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
38
|
+
};
|
|
39
|
+
const objectToString = Object.prototype.toString;
|
|
40
|
+
const toTypeString = (value) => objectToString.call(value);
|
|
41
|
+
const toRawType = (value) => {
|
|
42
|
+
return toTypeString(value).slice(8, -1);
|
|
43
|
+
};
|
|
44
|
+
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
45
|
+
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
46
|
+
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
47
|
+
// the leading comma is intentional so empty string "" is also included
|
|
48
|
+
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
49
|
+
);
|
|
50
|
+
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
51
|
+
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
52
|
+
);
|
|
53
|
+
const cacheStringFunction = (fn) => {
|
|
54
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
55
|
+
return (str) => {
|
|
56
|
+
const hit = cache[str];
|
|
57
|
+
return hit || (cache[str] = fn(str));
|
|
58
|
+
};
|
|
59
|
+
};
|
|
60
|
+
const camelizeRE = /-(\w)/g;
|
|
61
|
+
const camelize = cacheStringFunction((str) => {
|
|
62
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
63
|
+
});
|
|
64
|
+
const hyphenateRE = /\B([A-Z])/g;
|
|
65
|
+
const hyphenate = cacheStringFunction(
|
|
66
|
+
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
67
|
+
);
|
|
68
|
+
const capitalize = cacheStringFunction(
|
|
69
|
+
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
|
70
|
+
);
|
|
71
|
+
const toHandlerKey = cacheStringFunction(
|
|
72
|
+
(str) => str ? `on${capitalize(str)}` : ``
|
|
73
|
+
);
|
|
74
|
+
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
75
|
+
const invokeArrayFns = (fns, arg) => {
|
|
76
|
+
for (let i = 0; i < fns.length; i++) {
|
|
77
|
+
fns[i](arg);
|
|
78
|
+
}
|
|
79
|
+
};
|
|
80
|
+
const def = (obj, key, value) => {
|
|
81
|
+
Object.defineProperty(obj, key, {
|
|
82
|
+
configurable: true,
|
|
83
|
+
enumerable: false,
|
|
84
|
+
value
|
|
85
|
+
});
|
|
86
|
+
};
|
|
87
|
+
const looseToNumber = (val) => {
|
|
88
|
+
const n = parseFloat(val);
|
|
89
|
+
return isNaN(n) ? val : n;
|
|
90
|
+
};
|
|
91
|
+
const toNumber = (val) => {
|
|
92
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
93
|
+
return isNaN(n) ? val : n;
|
|
94
|
+
};
|
|
95
|
+
let _globalThis;
|
|
96
|
+
const getGlobalThis = () => {
|
|
97
|
+
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
98
|
+
};
|
|
99
|
+
|
|
10
100
|
const PatchFlagNames = {
|
|
11
101
|
[1]: `TEXT`,
|
|
12
102
|
[2]: `CLASS`,
|
|
@@ -226,96 +316,6 @@ const replacer = (_key, val) => {
|
|
|
226
316
|
return val;
|
|
227
317
|
};
|
|
228
318
|
|
|
229
|
-
const EMPTY_OBJ = Object.freeze({}) ;
|
|
230
|
-
const EMPTY_ARR = Object.freeze([]) ;
|
|
231
|
-
const NOOP = () => {
|
|
232
|
-
};
|
|
233
|
-
const NO = () => false;
|
|
234
|
-
const onRE = /^on[^a-z]/;
|
|
235
|
-
const isOn = (key) => onRE.test(key);
|
|
236
|
-
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
237
|
-
const extend = Object.assign;
|
|
238
|
-
const remove = (arr, el) => {
|
|
239
|
-
const i = arr.indexOf(el);
|
|
240
|
-
if (i > -1) {
|
|
241
|
-
arr.splice(i, 1);
|
|
242
|
-
}
|
|
243
|
-
};
|
|
244
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
245
|
-
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
246
|
-
const isArray = Array.isArray;
|
|
247
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
248
|
-
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
249
|
-
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
250
|
-
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
251
|
-
const isFunction = (val) => typeof val === "function";
|
|
252
|
-
const isString = (val) => typeof val === "string";
|
|
253
|
-
const isSymbol = (val) => typeof val === "symbol";
|
|
254
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
255
|
-
const isPromise = (val) => {
|
|
256
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
257
|
-
};
|
|
258
|
-
const objectToString = Object.prototype.toString;
|
|
259
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
260
|
-
const toRawType = (value) => {
|
|
261
|
-
return toTypeString(value).slice(8, -1);
|
|
262
|
-
};
|
|
263
|
-
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
264
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
265
|
-
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
266
|
-
// the leading comma is intentional so empty string "" is also included
|
|
267
|
-
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
268
|
-
);
|
|
269
|
-
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
270
|
-
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
271
|
-
);
|
|
272
|
-
const cacheStringFunction = (fn) => {
|
|
273
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
274
|
-
return (str) => {
|
|
275
|
-
const hit = cache[str];
|
|
276
|
-
return hit || (cache[str] = fn(str));
|
|
277
|
-
};
|
|
278
|
-
};
|
|
279
|
-
const camelizeRE = /-(\w)/g;
|
|
280
|
-
const camelize = cacheStringFunction((str) => {
|
|
281
|
-
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
282
|
-
});
|
|
283
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
284
|
-
const hyphenate = cacheStringFunction(
|
|
285
|
-
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
286
|
-
);
|
|
287
|
-
const capitalize = cacheStringFunction(
|
|
288
|
-
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
|
289
|
-
);
|
|
290
|
-
const toHandlerKey = cacheStringFunction(
|
|
291
|
-
(str) => str ? `on${capitalize(str)}` : ``
|
|
292
|
-
);
|
|
293
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
294
|
-
const invokeArrayFns = (fns, arg) => {
|
|
295
|
-
for (let i = 0; i < fns.length; i++) {
|
|
296
|
-
fns[i](arg);
|
|
297
|
-
}
|
|
298
|
-
};
|
|
299
|
-
const def = (obj, key, value) => {
|
|
300
|
-
Object.defineProperty(obj, key, {
|
|
301
|
-
configurable: true,
|
|
302
|
-
enumerable: false,
|
|
303
|
-
value
|
|
304
|
-
});
|
|
305
|
-
};
|
|
306
|
-
const looseToNumber = (val) => {
|
|
307
|
-
const n = parseFloat(val);
|
|
308
|
-
return isNaN(n) ? val : n;
|
|
309
|
-
};
|
|
310
|
-
const toNumber = (val) => {
|
|
311
|
-
const n = isString(val) ? Number(val) : NaN;
|
|
312
|
-
return isNaN(n) ? val : n;
|
|
313
|
-
};
|
|
314
|
-
let _globalThis;
|
|
315
|
-
const getGlobalThis = () => {
|
|
316
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
317
|
-
};
|
|
318
|
-
|
|
319
319
|
function warn$1(msg, ...args) {
|
|
320
320
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
321
321
|
}
|
|
@@ -4677,7 +4677,7 @@ const FILTERS = "filters";
|
|
|
4677
4677
|
function resolveComponent(name, maybeSelfReference) {
|
|
4678
4678
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4679
4679
|
}
|
|
4680
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
4680
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4681
4681
|
function resolveDynamicComponent(component) {
|
|
4682
4682
|
if (isString(component)) {
|
|
4683
4683
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -6643,7 +6643,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6643
6643
|
return vm;
|
|
6644
6644
|
}
|
|
6645
6645
|
}
|
|
6646
|
-
Vue.version = `2.6.14-compat:${"3.3.0-alpha.
|
|
6646
|
+
Vue.version = `2.6.14-compat:${"3.3.0-alpha.5"}`;
|
|
6647
6647
|
Vue.config = singletonApp.config;
|
|
6648
6648
|
Vue.use = (p, ...options) => {
|
|
6649
6649
|
if (p && isFunction(p.install)) {
|
|
@@ -9538,10 +9538,10 @@ function convertLegacyComponent(comp, instance) {
|
|
|
9538
9538
|
return comp;
|
|
9539
9539
|
}
|
|
9540
9540
|
|
|
9541
|
-
const Fragment = Symbol("
|
|
9542
|
-
const Text = Symbol("
|
|
9543
|
-
const Comment = Symbol("
|
|
9544
|
-
const Static = Symbol("
|
|
9541
|
+
const Fragment = Symbol.for("v-fgt");
|
|
9542
|
+
const Text = Symbol.for("v-txt");
|
|
9543
|
+
const Comment = Symbol.for("v-cmt");
|
|
9544
|
+
const Static = Symbol.for("v-stc");
|
|
9545
9545
|
const blockStack = [];
|
|
9546
9546
|
let currentBlock = null;
|
|
9547
9547
|
function openBlock(disableTracking = false) {
|
|
@@ -10003,13 +10003,19 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
10003
10003
|
}
|
|
10004
10004
|
let currentInstance = null;
|
|
10005
10005
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
10006
|
+
let internalSetCurrentInstance;
|
|
10007
|
+
{
|
|
10008
|
+
internalSetCurrentInstance = (i) => {
|
|
10009
|
+
currentInstance = i;
|
|
10010
|
+
};
|
|
10011
|
+
}
|
|
10006
10012
|
const setCurrentInstance = (instance) => {
|
|
10007
|
-
|
|
10013
|
+
internalSetCurrentInstance(instance);
|
|
10008
10014
|
instance.scope.on();
|
|
10009
10015
|
};
|
|
10010
10016
|
const unsetCurrentInstance = () => {
|
|
10011
10017
|
currentInstance && currentInstance.scope.off();
|
|
10012
|
-
|
|
10018
|
+
internalSetCurrentInstance(null);
|
|
10013
10019
|
};
|
|
10014
10020
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
10015
10021
|
function validateComponentName(name, config) {
|
|
@@ -10421,7 +10427,7 @@ function h(type, propsOrChildren, children) {
|
|
|
10421
10427
|
}
|
|
10422
10428
|
}
|
|
10423
10429
|
|
|
10424
|
-
const ssrContextKey = Symbol(
|
|
10430
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
10425
10431
|
const useSSRContext = () => {
|
|
10426
10432
|
{
|
|
10427
10433
|
const ctx = inject(ssrContextKey);
|
|
@@ -10635,7 +10641,7 @@ function isMemoSame(cached, memo) {
|
|
|
10635
10641
|
return true;
|
|
10636
10642
|
}
|
|
10637
10643
|
|
|
10638
|
-
const version = "3.3.0-alpha.
|
|
10644
|
+
const version = "3.3.0-alpha.5";
|
|
10639
10645
|
const ssrUtils = null;
|
|
10640
10646
|
const resolveFilter = resolveFilter$1 ;
|
|
10641
10647
|
const _compatUtils = {
|
|
@@ -12720,6 +12726,20 @@ function createBlockStatement(body) {
|
|
|
12720
12726
|
loc: locStub
|
|
12721
12727
|
};
|
|
12722
12728
|
}
|
|
12729
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
12730
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
12731
|
+
}
|
|
12732
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
12733
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
12734
|
+
}
|
|
12735
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
12736
|
+
if (!node.isBlock) {
|
|
12737
|
+
node.isBlock = true;
|
|
12738
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
12739
|
+
helper(OPEN_BLOCK);
|
|
12740
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
12741
|
+
}
|
|
12742
|
+
}
|
|
12723
12743
|
|
|
12724
12744
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
12725
12745
|
const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
|
|
@@ -12889,12 +12909,6 @@ function isTemplateNode(node) {
|
|
|
12889
12909
|
function isSlotOutlet(node) {
|
|
12890
12910
|
return node.type === 1 && node.tagType === 2;
|
|
12891
12911
|
}
|
|
12892
|
-
function getVNodeHelper(ssr, isComponent) {
|
|
12893
|
-
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
12894
|
-
}
|
|
12895
|
-
function getVNodeBlockHelper(ssr, isComponent) {
|
|
12896
|
-
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
12897
|
-
}
|
|
12898
12912
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
12899
12913
|
function getUnnormalizedProps(props, callPath = []) {
|
|
12900
12914
|
if (props && !isString(props) && props.type === 14) {
|
|
@@ -12988,14 +13002,6 @@ function getMemoedVNodeCall(node) {
|
|
|
12988
13002
|
return node;
|
|
12989
13003
|
}
|
|
12990
13004
|
}
|
|
12991
|
-
function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
12992
|
-
if (!node.isBlock) {
|
|
12993
|
-
node.isBlock = true;
|
|
12994
|
-
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
12995
|
-
helper(OPEN_BLOCK);
|
|
12996
|
-
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
12997
|
-
}
|
|
12998
|
-
}
|
|
12999
13005
|
|
|
13000
13006
|
const deprecationData = {
|
|
13001
13007
|
["COMPILER_IS_ON_ELEMENT"]: {
|
|
@@ -14257,7 +14263,7 @@ function createRootCodegen(root, context) {
|
|
|
14257
14263
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
14258
14264
|
const codegenNode = child.codegenNode;
|
|
14259
14265
|
if (codegenNode.type === 13) {
|
|
14260
|
-
|
|
14266
|
+
convertToBlock(codegenNode, context);
|
|
14261
14267
|
}
|
|
14262
14268
|
root.codegenNode = codegenNode;
|
|
14263
14269
|
} else {
|
|
@@ -15177,7 +15183,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
15177
15183
|
const ret = firstChild.codegenNode;
|
|
15178
15184
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
15179
15185
|
if (vnodeCall.type === 13) {
|
|
15180
|
-
|
|
15186
|
+
convertToBlock(vnodeCall, context);
|
|
15181
15187
|
}
|
|
15182
15188
|
injectProp(vnodeCall, keyProperty, context);
|
|
15183
15189
|
return ret;
|
|
@@ -16807,7 +16813,7 @@ const transformMemo = (node, context) => {
|
|
|
16807
16813
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
16808
16814
|
if (codegenNode && codegenNode.type === 13) {
|
|
16809
16815
|
if (node.tagType !== 1) {
|
|
16810
|
-
|
|
16816
|
+
convertToBlock(codegenNode, context);
|
|
16811
16817
|
}
|
|
16812
16818
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
16813
16819
|
dir.exp,
|