vue 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 +2 -2
- package/dist/vue.cjs.prod.js +2 -2
- package/dist/vue.esm-browser.js +122 -116
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +122 -116
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +105 -99
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +105 -99
- package/dist/vue.runtime.global.prod.js +1 -1
- package/jsx-runtime/dom.d.ts +1321 -0
- package/jsx-runtime/index.d.ts +40 -0
- package/jsx-runtime/index.js +4 -0
- package/jsx-runtime/index.mjs +1 -0
- package/jsx-runtime/package.json +5 -0
- package/jsx.d.ts +17 -0
- package/package.json +16 -6
package/dist/vue.cjs.js
CHANGED
|
@@ -70,6 +70,6 @@ ${codeFrame}` : message);
|
|
|
70
70
|
runtimeDom.registerRuntimeCompiler(compileToFunction);
|
|
71
71
|
|
|
72
72
|
exports.compile = compileToFunction;
|
|
73
|
-
Object.keys(runtimeDom).forEach(function(k) {
|
|
74
|
-
if (k !== 'default') exports[k] = runtimeDom[k];
|
|
73
|
+
Object.keys(runtimeDom).forEach(function (k) {
|
|
74
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = runtimeDom[k];
|
|
75
75
|
});
|
package/dist/vue.cjs.prod.js
CHANGED
|
@@ -56,6 +56,6 @@ function compileToFunction(template, options) {
|
|
|
56
56
|
runtimeDom.registerRuntimeCompiler(compileToFunction);
|
|
57
57
|
|
|
58
58
|
exports.compile = compileToFunction;
|
|
59
|
-
Object.keys(runtimeDom).forEach(function(k) {
|
|
60
|
-
if (k !== 'default') exports[k] = runtimeDom[k];
|
|
59
|
+
Object.keys(runtimeDom).forEach(function (k) {
|
|
60
|
+
if (k !== 'default' && !exports.hasOwnProperty(k)) exports[k] = runtimeDom[k];
|
|
61
61
|
});
|
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
|
}
|
|
@@ -4111,7 +4111,7 @@ const DIRECTIVES = "directives";
|
|
|
4111
4111
|
function resolveComponent(name, maybeSelfReference) {
|
|
4112
4112
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4113
4113
|
}
|
|
4114
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
4114
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4115
4115
|
function resolveDynamicComponent(component) {
|
|
4116
4116
|
if (isString(component)) {
|
|
4117
4117
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -7869,10 +7869,10 @@ function updateCssVars(vnode) {
|
|
|
7869
7869
|
}
|
|
7870
7870
|
}
|
|
7871
7871
|
|
|
7872
|
-
const Fragment = Symbol("
|
|
7873
|
-
const Text = Symbol("
|
|
7874
|
-
const Comment = Symbol("
|
|
7875
|
-
const Static = Symbol("
|
|
7872
|
+
const Fragment = Symbol.for("v-fgt");
|
|
7873
|
+
const Text = Symbol.for("v-txt");
|
|
7874
|
+
const Comment = Symbol.for("v-cmt");
|
|
7875
|
+
const Static = Symbol.for("v-stc");
|
|
7876
7876
|
const blockStack = [];
|
|
7877
7877
|
let currentBlock = null;
|
|
7878
7878
|
function openBlock(disableTracking = false) {
|
|
@@ -8324,13 +8324,19 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
8324
8324
|
}
|
|
8325
8325
|
let currentInstance = null;
|
|
8326
8326
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
8327
|
+
let internalSetCurrentInstance;
|
|
8328
|
+
{
|
|
8329
|
+
internalSetCurrentInstance = (i) => {
|
|
8330
|
+
currentInstance = i;
|
|
8331
|
+
};
|
|
8332
|
+
}
|
|
8327
8333
|
const setCurrentInstance = (instance) => {
|
|
8328
|
-
|
|
8334
|
+
internalSetCurrentInstance(instance);
|
|
8329
8335
|
instance.scope.on();
|
|
8330
8336
|
};
|
|
8331
8337
|
const unsetCurrentInstance = () => {
|
|
8332
8338
|
currentInstance && currentInstance.scope.off();
|
|
8333
|
-
|
|
8339
|
+
internalSetCurrentInstance(null);
|
|
8334
8340
|
};
|
|
8335
8341
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
8336
8342
|
function validateComponentName(name, config) {
|
|
@@ -8730,7 +8736,7 @@ function h(type, propsOrChildren, children) {
|
|
|
8730
8736
|
}
|
|
8731
8737
|
}
|
|
8732
8738
|
|
|
8733
|
-
const ssrContextKey = Symbol(
|
|
8739
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
8734
8740
|
const useSSRContext = () => {
|
|
8735
8741
|
{
|
|
8736
8742
|
const ctx = inject(ssrContextKey);
|
|
@@ -8944,7 +8950,7 @@ function isMemoSame(cached, memo) {
|
|
|
8944
8950
|
return true;
|
|
8945
8951
|
}
|
|
8946
8952
|
|
|
8947
|
-
const version = "3.3.0-alpha.
|
|
8953
|
+
const version = "3.3.0-alpha.5";
|
|
8948
8954
|
const ssrUtils = null;
|
|
8949
8955
|
const resolveFilter = null;
|
|
8950
8956
|
const compatUtils = null;
|
|
@@ -10865,6 +10871,20 @@ function createBlockStatement(body) {
|
|
|
10865
10871
|
loc: locStub
|
|
10866
10872
|
};
|
|
10867
10873
|
}
|
|
10874
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
10875
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
10876
|
+
}
|
|
10877
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
10878
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
10879
|
+
}
|
|
10880
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
10881
|
+
if (!node.isBlock) {
|
|
10882
|
+
node.isBlock = true;
|
|
10883
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
10884
|
+
helper(OPEN_BLOCK);
|
|
10885
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
10886
|
+
}
|
|
10887
|
+
}
|
|
10868
10888
|
|
|
10869
10889
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
10870
10890
|
const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
|
|
@@ -11034,12 +11054,6 @@ function isTemplateNode(node) {
|
|
|
11034
11054
|
function isSlotOutlet(node) {
|
|
11035
11055
|
return node.type === 1 && node.tagType === 2;
|
|
11036
11056
|
}
|
|
11037
|
-
function getVNodeHelper(ssr, isComponent) {
|
|
11038
|
-
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
11039
|
-
}
|
|
11040
|
-
function getVNodeBlockHelper(ssr, isComponent) {
|
|
11041
|
-
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
11042
|
-
}
|
|
11043
11057
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
11044
11058
|
function getUnnormalizedProps(props, callPath = []) {
|
|
11045
11059
|
if (props && !isString(props) && props.type === 14) {
|
|
@@ -11133,14 +11147,6 @@ function getMemoedVNodeCall(node) {
|
|
|
11133
11147
|
return node;
|
|
11134
11148
|
}
|
|
11135
11149
|
}
|
|
11136
|
-
function makeBlock(node, { helper, removeHelper, inSSR }) {
|
|
11137
|
-
if (!node.isBlock) {
|
|
11138
|
-
node.isBlock = true;
|
|
11139
|
-
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
11140
|
-
helper(OPEN_BLOCK);
|
|
11141
|
-
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
11142
|
-
}
|
|
11143
|
-
}
|
|
11144
11150
|
|
|
11145
11151
|
const decodeRE = /&(gt|lt|amp|apos|quot);/g;
|
|
11146
11152
|
const decodeMap = {
|
|
@@ -12241,7 +12247,7 @@ function createRootCodegen(root, context) {
|
|
|
12241
12247
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
12242
12248
|
const codegenNode = child.codegenNode;
|
|
12243
12249
|
if (codegenNode.type === 13) {
|
|
12244
|
-
|
|
12250
|
+
convertToBlock(codegenNode, context);
|
|
12245
12251
|
}
|
|
12246
12252
|
root.codegenNode = codegenNode;
|
|
12247
12253
|
} else {
|
|
@@ -13153,7 +13159,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
13153
13159
|
const ret = firstChild.codegenNode;
|
|
13154
13160
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
13155
13161
|
if (vnodeCall.type === 13) {
|
|
13156
|
-
|
|
13162
|
+
convertToBlock(vnodeCall, context);
|
|
13157
13163
|
}
|
|
13158
13164
|
injectProp(vnodeCall, keyProperty, context);
|
|
13159
13165
|
return ret;
|
|
@@ -14594,7 +14600,7 @@ const transformMemo = (node, context) => {
|
|
|
14594
14600
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
14595
14601
|
if (codegenNode && codegenNode.type === 13) {
|
|
14596
14602
|
if (node.tagType !== 1) {
|
|
14597
|
-
|
|
14603
|
+
convertToBlock(codegenNode, context);
|
|
14598
14604
|
}
|
|
14599
14605
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
14600
14606
|
dir.exp,
|