@vue/runtime-dom 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/runtime-dom.cjs.js +2 -2
- package/dist/runtime-dom.cjs.prod.js +2 -2
- package/dist/runtime-dom.d.ts +1081 -1297
- package/dist/runtime-dom.esm-browser.js +124 -108
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.global.js +124 -107
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +4 -4
|
@@ -10,6 +10,96 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
10
10
|
return expectsLowerCase ? (val) => !!map[val.toLowerCase()] : (val) => !!map[val];
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
+
const EMPTY_OBJ = Object.freeze({}) ;
|
|
14
|
+
const EMPTY_ARR = Object.freeze([]) ;
|
|
15
|
+
const NOOP = () => {
|
|
16
|
+
};
|
|
17
|
+
const NO = () => false;
|
|
18
|
+
const onRE = /^on[^a-z]/;
|
|
19
|
+
const isOn = (key) => onRE.test(key);
|
|
20
|
+
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
21
|
+
const extend = Object.assign;
|
|
22
|
+
const remove = (arr, el) => {
|
|
23
|
+
const i = arr.indexOf(el);
|
|
24
|
+
if (i > -1) {
|
|
25
|
+
arr.splice(i, 1);
|
|
26
|
+
}
|
|
27
|
+
};
|
|
28
|
+
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
29
|
+
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
30
|
+
const isArray = Array.isArray;
|
|
31
|
+
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
32
|
+
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
33
|
+
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
34
|
+
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
35
|
+
const isFunction = (val) => typeof val === "function";
|
|
36
|
+
const isString = (val) => typeof val === "string";
|
|
37
|
+
const isSymbol = (val) => typeof val === "symbol";
|
|
38
|
+
const isObject = (val) => val !== null && typeof val === "object";
|
|
39
|
+
const isPromise = (val) => {
|
|
40
|
+
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
41
|
+
};
|
|
42
|
+
const objectToString = Object.prototype.toString;
|
|
43
|
+
const toTypeString = (value) => objectToString.call(value);
|
|
44
|
+
const toRawType = (value) => {
|
|
45
|
+
return toTypeString(value).slice(8, -1);
|
|
46
|
+
};
|
|
47
|
+
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
48
|
+
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
49
|
+
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
50
|
+
// the leading comma is intentional so empty string "" is also included
|
|
51
|
+
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
52
|
+
);
|
|
53
|
+
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
54
|
+
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
55
|
+
);
|
|
56
|
+
const cacheStringFunction = (fn) => {
|
|
57
|
+
const cache = /* @__PURE__ */ Object.create(null);
|
|
58
|
+
return (str) => {
|
|
59
|
+
const hit = cache[str];
|
|
60
|
+
return hit || (cache[str] = fn(str));
|
|
61
|
+
};
|
|
62
|
+
};
|
|
63
|
+
const camelizeRE = /-(\w)/g;
|
|
64
|
+
const camelize = cacheStringFunction((str) => {
|
|
65
|
+
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
66
|
+
});
|
|
67
|
+
const hyphenateRE = /\B([A-Z])/g;
|
|
68
|
+
const hyphenate = cacheStringFunction(
|
|
69
|
+
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
70
|
+
);
|
|
71
|
+
const capitalize = cacheStringFunction(
|
|
72
|
+
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
|
73
|
+
);
|
|
74
|
+
const toHandlerKey = cacheStringFunction(
|
|
75
|
+
(str) => str ? `on${capitalize(str)}` : ``
|
|
76
|
+
);
|
|
77
|
+
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
78
|
+
const invokeArrayFns = (fns, arg) => {
|
|
79
|
+
for (let i = 0; i < fns.length; i++) {
|
|
80
|
+
fns[i](arg);
|
|
81
|
+
}
|
|
82
|
+
};
|
|
83
|
+
const def = (obj, key, value) => {
|
|
84
|
+
Object.defineProperty(obj, key, {
|
|
85
|
+
configurable: true,
|
|
86
|
+
enumerable: false,
|
|
87
|
+
value
|
|
88
|
+
});
|
|
89
|
+
};
|
|
90
|
+
const looseToNumber = (val) => {
|
|
91
|
+
const n = parseFloat(val);
|
|
92
|
+
return isNaN(n) ? val : n;
|
|
93
|
+
};
|
|
94
|
+
const toNumber = (val) => {
|
|
95
|
+
const n = isString(val) ? Number(val) : NaN;
|
|
96
|
+
return isNaN(n) ? val : n;
|
|
97
|
+
};
|
|
98
|
+
let _globalThis;
|
|
99
|
+
const getGlobalThis = () => {
|
|
100
|
+
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
101
|
+
};
|
|
102
|
+
|
|
13
103
|
const GLOBALS_WHITE_LISTED = "Infinity,undefined,NaN,isFinite,isNaN,parseFloat,parseInt,decodeURI,decodeURIComponent,encodeURI,encodeURIComponent,Math,Number,Date,Array,Object,Boolean,String,RegExp,Map,Set,JSON,Intl,BigInt";
|
|
14
104
|
const isGloballyWhitelisted = /* @__PURE__ */ makeMap(GLOBALS_WHITE_LISTED);
|
|
15
105
|
|
|
@@ -164,96 +254,6 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
164
254
|
return val;
|
|
165
255
|
};
|
|
166
256
|
|
|
167
|
-
const EMPTY_OBJ = Object.freeze({}) ;
|
|
168
|
-
const EMPTY_ARR = Object.freeze([]) ;
|
|
169
|
-
const NOOP = () => {
|
|
170
|
-
};
|
|
171
|
-
const NO = () => false;
|
|
172
|
-
const onRE = /^on[^a-z]/;
|
|
173
|
-
const isOn = (key) => onRE.test(key);
|
|
174
|
-
const isModelListener = (key) => key.startsWith("onUpdate:");
|
|
175
|
-
const extend = Object.assign;
|
|
176
|
-
const remove = (arr, el) => {
|
|
177
|
-
const i = arr.indexOf(el);
|
|
178
|
-
if (i > -1) {
|
|
179
|
-
arr.splice(i, 1);
|
|
180
|
-
}
|
|
181
|
-
};
|
|
182
|
-
const hasOwnProperty$1 = Object.prototype.hasOwnProperty;
|
|
183
|
-
const hasOwn = (val, key) => hasOwnProperty$1.call(val, key);
|
|
184
|
-
const isArray = Array.isArray;
|
|
185
|
-
const isMap = (val) => toTypeString(val) === "[object Map]";
|
|
186
|
-
const isSet = (val) => toTypeString(val) === "[object Set]";
|
|
187
|
-
const isDate = (val) => toTypeString(val) === "[object Date]";
|
|
188
|
-
const isRegExp = (val) => toTypeString(val) === "[object RegExp]";
|
|
189
|
-
const isFunction = (val) => typeof val === "function";
|
|
190
|
-
const isString = (val) => typeof val === "string";
|
|
191
|
-
const isSymbol = (val) => typeof val === "symbol";
|
|
192
|
-
const isObject = (val) => val !== null && typeof val === "object";
|
|
193
|
-
const isPromise = (val) => {
|
|
194
|
-
return isObject(val) && isFunction(val.then) && isFunction(val.catch);
|
|
195
|
-
};
|
|
196
|
-
const objectToString = Object.prototype.toString;
|
|
197
|
-
const toTypeString = (value) => objectToString.call(value);
|
|
198
|
-
const toRawType = (value) => {
|
|
199
|
-
return toTypeString(value).slice(8, -1);
|
|
200
|
-
};
|
|
201
|
-
const isPlainObject = (val) => toTypeString(val) === "[object Object]";
|
|
202
|
-
const isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
|
|
203
|
-
const isReservedProp = /* @__PURE__ */ makeMap(
|
|
204
|
-
// the leading comma is intentional so empty string "" is also included
|
|
205
|
-
",key,ref,ref_for,ref_key,onVnodeBeforeMount,onVnodeMounted,onVnodeBeforeUpdate,onVnodeUpdated,onVnodeBeforeUnmount,onVnodeUnmounted"
|
|
206
|
-
);
|
|
207
|
-
const isBuiltInDirective = /* @__PURE__ */ makeMap(
|
|
208
|
-
"bind,cloak,else-if,else,for,html,if,model,on,once,pre,show,slot,text,memo"
|
|
209
|
-
);
|
|
210
|
-
const cacheStringFunction = (fn) => {
|
|
211
|
-
const cache = /* @__PURE__ */ Object.create(null);
|
|
212
|
-
return (str) => {
|
|
213
|
-
const hit = cache[str];
|
|
214
|
-
return hit || (cache[str] = fn(str));
|
|
215
|
-
};
|
|
216
|
-
};
|
|
217
|
-
const camelizeRE = /-(\w)/g;
|
|
218
|
-
const camelize = cacheStringFunction((str) => {
|
|
219
|
-
return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
|
|
220
|
-
});
|
|
221
|
-
const hyphenateRE = /\B([A-Z])/g;
|
|
222
|
-
const hyphenate = cacheStringFunction(
|
|
223
|
-
(str) => str.replace(hyphenateRE, "-$1").toLowerCase()
|
|
224
|
-
);
|
|
225
|
-
const capitalize = cacheStringFunction(
|
|
226
|
-
(str) => str.charAt(0).toUpperCase() + str.slice(1)
|
|
227
|
-
);
|
|
228
|
-
const toHandlerKey = cacheStringFunction(
|
|
229
|
-
(str) => str ? `on${capitalize(str)}` : ``
|
|
230
|
-
);
|
|
231
|
-
const hasChanged = (value, oldValue) => !Object.is(value, oldValue);
|
|
232
|
-
const invokeArrayFns = (fns, arg) => {
|
|
233
|
-
for (let i = 0; i < fns.length; i++) {
|
|
234
|
-
fns[i](arg);
|
|
235
|
-
}
|
|
236
|
-
};
|
|
237
|
-
const def = (obj, key, value) => {
|
|
238
|
-
Object.defineProperty(obj, key, {
|
|
239
|
-
configurable: true,
|
|
240
|
-
enumerable: false,
|
|
241
|
-
value
|
|
242
|
-
});
|
|
243
|
-
};
|
|
244
|
-
const looseToNumber = (val) => {
|
|
245
|
-
const n = parseFloat(val);
|
|
246
|
-
return isNaN(n) ? val : n;
|
|
247
|
-
};
|
|
248
|
-
const toNumber = (val) => {
|
|
249
|
-
const n = isString(val) ? Number(val) : NaN;
|
|
250
|
-
return isNaN(n) ? val : n;
|
|
251
|
-
};
|
|
252
|
-
let _globalThis;
|
|
253
|
-
const getGlobalThis = () => {
|
|
254
|
-
return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
|
|
255
|
-
};
|
|
256
|
-
|
|
257
257
|
function warn$1(msg, ...args) {
|
|
258
258
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
259
259
|
}
|
|
@@ -3552,8 +3552,8 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
3552
3552
|
return ret;
|
|
3553
3553
|
}
|
|
3554
3554
|
|
|
3555
|
-
function defineComponent(options) {
|
|
3556
|
-
return isFunction(options) ? { setup: options, name: options.name } : options;
|
|
3555
|
+
function defineComponent(options, extraOptions) {
|
|
3556
|
+
return isFunction(options) ? extend({}, extraOptions, { setup: options, name: options.name }) : options;
|
|
3557
3557
|
}
|
|
3558
3558
|
|
|
3559
3559
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
@@ -4049,7 +4049,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
4049
4049
|
function resolveComponent(name, maybeSelfReference) {
|
|
4050
4050
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
4051
4051
|
}
|
|
4052
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
4052
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
4053
4053
|
function resolveDynamicComponent(component) {
|
|
4054
4054
|
if (isString(component)) {
|
|
4055
4055
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -5050,7 +5050,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5050
5050
|
const hasDefault = hasOwn(opt, "default");
|
|
5051
5051
|
if (hasDefault && value === void 0) {
|
|
5052
5052
|
const defaultValue = opt.default;
|
|
5053
|
-
if (opt.type !== Function && isFunction(defaultValue)) {
|
|
5053
|
+
if (opt.type !== Function && !opt.skipFactory && isFunction(defaultValue)) {
|
|
5054
5054
|
const { propsDefaults } = instance;
|
|
5055
5055
|
if (key in propsDefaults) {
|
|
5056
5056
|
value = propsDefaults[key];
|
|
@@ -5186,7 +5186,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5186
5186
|
}
|
|
5187
5187
|
}
|
|
5188
5188
|
function validateProp(name, value, prop, isAbsent) {
|
|
5189
|
-
const { type, required, validator } = prop;
|
|
5189
|
+
const { type, required, validator, skipCheck } = prop;
|
|
5190
5190
|
if (required && isAbsent) {
|
|
5191
5191
|
warn('Missing required prop: "' + name + '"');
|
|
5192
5192
|
return;
|
|
@@ -5194,7 +5194,7 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5194
5194
|
if (value == null && !prop.required) {
|
|
5195
5195
|
return;
|
|
5196
5196
|
}
|
|
5197
|
-
if (type != null && type !== true) {
|
|
5197
|
+
if (type != null && type !== true && !skipCheck) {
|
|
5198
5198
|
let isValid = false;
|
|
5199
5199
|
const types = isArray(type) ? type : [type];
|
|
5200
5200
|
const expectedTypes = [];
|
|
@@ -7807,10 +7807,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7807
7807
|
}
|
|
7808
7808
|
}
|
|
7809
7809
|
|
|
7810
|
-
const Fragment = Symbol("
|
|
7811
|
-
const Text = Symbol("
|
|
7812
|
-
const Comment = Symbol("
|
|
7813
|
-
const Static = Symbol("
|
|
7810
|
+
const Fragment = Symbol.for("v-fgt");
|
|
7811
|
+
const Text = Symbol.for("v-txt");
|
|
7812
|
+
const Comment = Symbol.for("v-cmt");
|
|
7813
|
+
const Static = Symbol.for("v-stc");
|
|
7814
7814
|
const blockStack = [];
|
|
7815
7815
|
let currentBlock = null;
|
|
7816
7816
|
function openBlock(disableTracking = false) {
|
|
@@ -8262,13 +8262,19 @@ Component that was made reactive: `,
|
|
|
8262
8262
|
}
|
|
8263
8263
|
let currentInstance = null;
|
|
8264
8264
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
8265
|
+
let internalSetCurrentInstance;
|
|
8266
|
+
{
|
|
8267
|
+
internalSetCurrentInstance = (i) => {
|
|
8268
|
+
currentInstance = i;
|
|
8269
|
+
};
|
|
8270
|
+
}
|
|
8265
8271
|
const setCurrentInstance = (instance) => {
|
|
8266
|
-
|
|
8272
|
+
internalSetCurrentInstance(instance);
|
|
8267
8273
|
instance.scope.on();
|
|
8268
8274
|
};
|
|
8269
8275
|
const unsetCurrentInstance = () => {
|
|
8270
8276
|
currentInstance && currentInstance.scope.off();
|
|
8271
|
-
|
|
8277
|
+
internalSetCurrentInstance(null);
|
|
8272
8278
|
};
|
|
8273
8279
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
8274
8280
|
function validateComponentName(name, config) {
|
|
@@ -8577,6 +8583,11 @@ Component that was made reactive: `,
|
|
|
8577
8583
|
warnRuntimeUsage(`defineExpose`);
|
|
8578
8584
|
}
|
|
8579
8585
|
}
|
|
8586
|
+
function defineOptions(options) {
|
|
8587
|
+
{
|
|
8588
|
+
warnRuntimeUsage(`defineOptions`);
|
|
8589
|
+
}
|
|
8590
|
+
}
|
|
8580
8591
|
function withDefaults(props, defaults) {
|
|
8581
8592
|
{
|
|
8582
8593
|
warnRuntimeUsage(`withDefaults`);
|
|
@@ -8602,18 +8613,23 @@ Component that was made reactive: `,
|
|
|
8602
8613
|
{}
|
|
8603
8614
|
) : raw;
|
|
8604
8615
|
for (const key in defaults) {
|
|
8605
|
-
|
|
8616
|
+
if (key.startsWith("__skip"))
|
|
8617
|
+
continue;
|
|
8618
|
+
let opt = props[key];
|
|
8606
8619
|
if (opt) {
|
|
8607
8620
|
if (isArray(opt) || isFunction(opt)) {
|
|
8608
|
-
props[key] = { type: opt, default: defaults[key] };
|
|
8621
|
+
opt = props[key] = { type: opt, default: defaults[key] };
|
|
8609
8622
|
} else {
|
|
8610
8623
|
opt.default = defaults[key];
|
|
8611
8624
|
}
|
|
8612
8625
|
} else if (opt === null) {
|
|
8613
|
-
props[key] = { default: defaults[key] };
|
|
8626
|
+
opt = props[key] = { default: defaults[key] };
|
|
8614
8627
|
} else {
|
|
8615
8628
|
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
8616
8629
|
}
|
|
8630
|
+
if (opt && defaults[`__skip_${key}`]) {
|
|
8631
|
+
opt.skipFactory = true;
|
|
8632
|
+
}
|
|
8617
8633
|
}
|
|
8618
8634
|
return props;
|
|
8619
8635
|
}
|
|
@@ -8668,7 +8684,7 @@ Component that was made reactive: `,
|
|
|
8668
8684
|
}
|
|
8669
8685
|
}
|
|
8670
8686
|
|
|
8671
|
-
const ssrContextKey = Symbol(
|
|
8687
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
8672
8688
|
const useSSRContext = () => {
|
|
8673
8689
|
{
|
|
8674
8690
|
warn(`useSSRContext() is not supported in the global build.`);
|
|
@@ -8876,7 +8892,7 @@ Component that was made reactive: `,
|
|
|
8876
8892
|
return true;
|
|
8877
8893
|
}
|
|
8878
8894
|
|
|
8879
|
-
const version = "3.3.0-alpha.
|
|
8895
|
+
const version = "3.3.0-alpha.6";
|
|
8880
8896
|
const ssrUtils = null;
|
|
8881
8897
|
const resolveFilter = null;
|
|
8882
8898
|
const compatUtils = null;
|
|
@@ -10374,6 +10390,7 @@ Component that was made reactive: `,
|
|
|
10374
10390
|
exports.defineCustomElement = defineCustomElement;
|
|
10375
10391
|
exports.defineEmits = defineEmits;
|
|
10376
10392
|
exports.defineExpose = defineExpose;
|
|
10393
|
+
exports.defineOptions = defineOptions;
|
|
10377
10394
|
exports.defineProps = defineProps;
|
|
10378
10395
|
exports.defineSSRCustomElement = defineSSRCustomElement;
|
|
10379
10396
|
exports.effect = effect;
|