vue 3.3.0-alpha.4 → 3.3.0-alpha.6
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.d.ts +5 -1
- package/dist/vue.esm-browser.js +142 -125
- package/dist/vue.esm-browser.prod.js +1 -1
- package/dist/vue.global.js +141 -124
- package/dist/vue.global.prod.js +1 -1
- package/dist/vue.runtime.esm-browser.js +124 -108
- package/dist/vue.runtime.esm-browser.prod.js +1 -1
- package/dist/vue.runtime.global.js +124 -107
- package/dist/vue.runtime.global.prod.js +1 -1
- package/jsx-runtime/index.d.ts +29 -0
- package/jsx-runtime/index.js +15 -0
- package/jsx-runtime/index.mjs +17 -0
- package/jsx-runtime/package.json +5 -0
- package/jsx.d.ts +26 -0
- package/package.json +19 -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.d.ts
CHANGED
|
@@ -2,6 +2,10 @@ import { CompilerOptions } from '@vue/compiler-dom';
|
|
|
2
2
|
import { RenderFunction } from '@vue/runtime-dom';
|
|
3
3
|
export * from '@vue/runtime-dom';
|
|
4
4
|
|
|
5
|
-
declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
|
5
|
+
export declare function compileToFunction(template: string | HTMLElement, options?: CompilerOptions): RenderFunction;
|
|
6
6
|
|
|
7
7
|
export { compileToFunction as compile };
|
|
8
|
+
// this is appended to the end of ../dist/vue.d.ts during build.
|
|
9
|
+
// imports the global JSX namespace registration for compat.
|
|
10
|
+
// TODO: remove in 3.4
|
|
11
|
+
import '../jsx'
|
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
|
}
|
|
@@ -3614,8 +3614,8 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3614
3614
|
return ret;
|
|
3615
3615
|
}
|
|
3616
3616
|
|
|
3617
|
-
function defineComponent(options) {
|
|
3618
|
-
return isFunction(options) ? { setup: options, name: options.name } : options;
|
|
3617
|
+
function defineComponent(options, extraOptions) {
|
|
3618
|
+
return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
|
|
3619
3619
|
}
|
|
3620
3620
|
|
|
3621
3621
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
@@ -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;
|
|
@@ -5112,7 +5112,7 @@ function resolvePropValue(options, props, key, value, instance, isAbsent) {
|
|
|
5112
5112
|
const hasDefault = hasOwn(opt, "default");
|
|
5113
5113
|
if (hasDefault && value === void 0) {
|
|
5114
5114
|
const defaultValue = opt.default;
|
|
5115
|
-
if (opt.type !== Function && isFunction(defaultValue)) {
|
|
5115
|
+
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
5116
5116
|
const { propsDefaults } = instance;
|
|
5117
5117
|
if (key in propsDefaults) {
|
|
5118
5118
|
value = propsDefaults[key];
|
|
@@ -5248,7 +5248,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
5248
5248
|
}
|
|
5249
5249
|
}
|
|
5250
5250
|
function validateProp(name, value, prop, isAbsent) {
|
|
5251
|
-
const { type, required, validator } = prop;
|
|
5251
|
+
const { type, required, validator, skipCheck } = prop;
|
|
5252
5252
|
if (required && isAbsent) {
|
|
5253
5253
|
warn('Missing required prop: "' + name + '"');
|
|
5254
5254
|
return;
|
|
@@ -5256,7 +5256,7 @@ function validateProp(name, value, prop, isAbsent) {
|
|
|
5256
5256
|
if (value == null && !prop.required) {
|
|
5257
5257
|
return;
|
|
5258
5258
|
}
|
|
5259
|
-
if (type != null && type !== true) {
|
|
5259
|
+
if (type != null && type !== true && !skipCheck) {
|
|
5260
5260
|
let isValid = false;
|
|
5261
5261
|
const types = isArray(type) ? type : [type];
|
|
5262
5262
|
const expectedTypes = [];
|
|
@@ -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) {
|
|
@@ -8639,6 +8645,11 @@ function defineExpose(exposed) {
|
|
|
8639
8645
|
warnRuntimeUsage(`defineExpose`);
|
|
8640
8646
|
}
|
|
8641
8647
|
}
|
|
8648
|
+
function defineOptions(options) {
|
|
8649
|
+
{
|
|
8650
|
+
warnRuntimeUsage(`defineOptions`);
|
|
8651
|
+
}
|
|
8652
|
+
}
|
|
8642
8653
|
function withDefaults(props, defaults) {
|
|
8643
8654
|
{
|
|
8644
8655
|
warnRuntimeUsage(`withDefaults`);
|
|
@@ -8664,18 +8675,23 @@ function mergeDefaults(raw, defaults) {
|
|
|
8664
8675
|
{}
|
|
8665
8676
|
) : raw;
|
|
8666
8677
|
for (const key in defaults) {
|
|
8667
|
-
|
|
8678
|
+
if (key.startsWith("__skip"))
|
|
8679
|
+
continue;
|
|
8680
|
+
let opt = props[key];
|
|
8668
8681
|
if (opt) {
|
|
8669
8682
|
if (isArray(opt) || isFunction(opt)) {
|
|
8670
|
-
props[key] = { type: opt, default: defaults[key] };
|
|
8683
|
+
opt = props[key] = { type: opt, default: defaults[key] };
|
|
8671
8684
|
} else {
|
|
8672
8685
|
opt.default = defaults[key];
|
|
8673
8686
|
}
|
|
8674
8687
|
} else if (opt === null) {
|
|
8675
|
-
props[key] = { default: defaults[key] };
|
|
8688
|
+
opt = props[key] = { default: defaults[key] };
|
|
8676
8689
|
} else {
|
|
8677
8690
|
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
8678
8691
|
}
|
|
8692
|
+
if (opt && defaults[`__skip_${key}`]) {
|
|
8693
|
+
opt.skipFactory = true;
|
|
8694
|
+
}
|
|
8679
8695
|
}
|
|
8680
8696
|
return props;
|
|
8681
8697
|
}
|
|
@@ -8730,7 +8746,7 @@ function h(type, propsOrChildren, children) {
|
|
|
8730
8746
|
}
|
|
8731
8747
|
}
|
|
8732
8748
|
|
|
8733
|
-
const ssrContextKey = Symbol(
|
|
8749
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
8734
8750
|
const useSSRContext = () => {
|
|
8735
8751
|
{
|
|
8736
8752
|
const ctx = inject(ssrContextKey);
|
|
@@ -8944,7 +8960,7 @@ function isMemoSame(cached, memo) {
|
|
|
8944
8960
|
return true;
|
|
8945
8961
|
}
|
|
8946
8962
|
|
|
8947
|
-
const version = "3.3.0-alpha.
|
|
8963
|
+
const version = "3.3.0-alpha.6";
|
|
8948
8964
|
const ssrUtils = null;
|
|
8949
8965
|
const resolveFilter = null;
|
|
8950
8966
|
const compatUtils = null;
|
|
@@ -10456,6 +10472,7 @@ var runtimeDom = /*#__PURE__*/Object.freeze({
|
|
|
10456
10472
|
defineCustomElement: defineCustomElement,
|
|
10457
10473
|
defineEmits: defineEmits,
|
|
10458
10474
|
defineExpose: defineExpose,
|
|
10475
|
+
defineOptions: defineOptions,
|
|
10459
10476
|
defineProps: defineProps,
|
|
10460
10477
|
defineSSRCustomElement: defineSSRCustomElement,
|
|
10461
10478
|
get devtools () { return devtools; },
|
|
@@ -10865,6 +10882,20 @@ function createBlockStatement(body) {
|
|
|
10865
10882
|
loc: locStub
|
|
10866
10883
|
};
|
|
10867
10884
|
}
|
|
10885
|
+
function getVNodeHelper(ssr, isComponent) {
|
|
10886
|
+
return ssr || isComponent ? CREATE_VNODE : CREATE_ELEMENT_VNODE;
|
|
10887
|
+
}
|
|
10888
|
+
function getVNodeBlockHelper(ssr, isComponent) {
|
|
10889
|
+
return ssr || isComponent ? CREATE_BLOCK : CREATE_ELEMENT_BLOCK;
|
|
10890
|
+
}
|
|
10891
|
+
function convertToBlock(node, { helper, removeHelper, inSSR }) {
|
|
10892
|
+
if (!node.isBlock) {
|
|
10893
|
+
node.isBlock = true;
|
|
10894
|
+
removeHelper(getVNodeHelper(inSSR, node.isComponent));
|
|
10895
|
+
helper(OPEN_BLOCK);
|
|
10896
|
+
helper(getVNodeBlockHelper(inSSR, node.isComponent));
|
|
10897
|
+
}
|
|
10898
|
+
}
|
|
10868
10899
|
|
|
10869
10900
|
const isStaticExp = (p) => p.type === 4 && p.isStatic;
|
|
10870
10901
|
const isBuiltInType = (tag, expected) => tag === expected || tag === hyphenate(expected);
|
|
@@ -11034,12 +11065,6 @@ function isTemplateNode(node) {
|
|
|
11034
11065
|
function isSlotOutlet(node) {
|
|
11035
11066
|
return node.type === 1 && node.tagType === 2;
|
|
11036
11067
|
}
|
|
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
11068
|
const propsHelperSet = /* @__PURE__ */ new Set([NORMALIZE_PROPS, GUARD_REACTIVE_PROPS]);
|
|
11044
11069
|
function getUnnormalizedProps(props, callPath = []) {
|
|
11045
11070
|
if (props && !isString(props) && props.type === 14) {
|
|
@@ -11133,14 +11158,6 @@ function getMemoedVNodeCall(node) {
|
|
|
11133
11158
|
return node;
|
|
11134
11159
|
}
|
|
11135
11160
|
}
|
|
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
11161
|
|
|
11145
11162
|
const decodeRE = /&(gt|lt|amp|apos|quot);/g;
|
|
11146
11163
|
const decodeMap = {
|
|
@@ -12241,7 +12258,7 @@ function createRootCodegen(root, context) {
|
|
|
12241
12258
|
if (isSingleElementRoot(root, child) && child.codegenNode) {
|
|
12242
12259
|
const codegenNode = child.codegenNode;
|
|
12243
12260
|
if (codegenNode.type === 13) {
|
|
12244
|
-
|
|
12261
|
+
convertToBlock(codegenNode, context);
|
|
12245
12262
|
}
|
|
12246
12263
|
root.codegenNode = codegenNode;
|
|
12247
12264
|
} else {
|
|
@@ -13153,7 +13170,7 @@ function createChildrenCodegenNode(branch, keyIndex, context) {
|
|
|
13153
13170
|
const ret = firstChild.codegenNode;
|
|
13154
13171
|
const vnodeCall = getMemoedVNodeCall(ret);
|
|
13155
13172
|
if (vnodeCall.type === 13) {
|
|
13156
|
-
|
|
13173
|
+
convertToBlock(vnodeCall, context);
|
|
13157
13174
|
}
|
|
13158
13175
|
injectProp(vnodeCall, keyProperty, context);
|
|
13159
13176
|
return ret;
|
|
@@ -14594,7 +14611,7 @@ const transformMemo = (node, context) => {
|
|
|
14594
14611
|
const codegenNode = node.codegenNode || context.currentNode.codegenNode;
|
|
14595
14612
|
if (codegenNode && codegenNode.type === 13) {
|
|
14596
14613
|
if (node.tagType !== 1) {
|
|
14597
|
-
|
|
14614
|
+
convertToBlock(codegenNode, context);
|
|
14598
14615
|
}
|
|
14599
14616
|
node.codegenNode = createCallExpression(context.helper(WITH_MEMO), [
|
|
14600
14617
|
dir.exp,
|
|
@@ -15199,4 +15216,4 @@ ${codeFrame}` : message);
|
|
|
15199
15216
|
}
|
|
15200
15217
|
registerRuntimeCompiler(compileToFunction);
|
|
15201
15218
|
|
|
15202
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
15219
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, EffectScope, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, Transition, TransitionGroup, VueElement, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, compileToFunction as compile, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineOptions, defineProps, defineSSRCustomElement, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getTransitionRawChildren, guardReactiveProps, h, handleError, hydrate, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeProps, nextTick, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, openBlock, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useSSRContext, useSlots, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|