@vue/runtime-dom 3.4.0-beta.4 → 3.4.0-rc.2
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.
|
@@ -280,7 +280,7 @@ const stringifySymbol = (v, i = "") => {
|
|
|
280
280
|
return isSymbol(v) ? `Symbol(${(_a = v.description) != null ? _a : i})` : v;
|
|
281
281
|
};
|
|
282
282
|
|
|
283
|
-
function warn$
|
|
283
|
+
function warn$2(msg, ...args) {
|
|
284
284
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
285
285
|
}
|
|
286
286
|
|
|
@@ -320,7 +320,7 @@ class EffectScope {
|
|
|
320
320
|
activeEffectScope = currentEffectScope;
|
|
321
321
|
}
|
|
322
322
|
} else {
|
|
323
|
-
warn$
|
|
323
|
+
warn$2(`cannot run an inactive effect scope.`);
|
|
324
324
|
}
|
|
325
325
|
}
|
|
326
326
|
/**
|
|
@@ -378,7 +378,7 @@ function onScopeDispose(fn) {
|
|
|
378
378
|
if (activeEffectScope) {
|
|
379
379
|
activeEffectScope.cleanups.push(fn);
|
|
380
380
|
} else {
|
|
381
|
-
warn$
|
|
381
|
+
warn$2(
|
|
382
382
|
`onScopeDispose() is called when there is no active effect scope to be associated with.`
|
|
383
383
|
);
|
|
384
384
|
}
|
|
@@ -826,7 +826,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
826
826
|
}
|
|
827
827
|
set(target, key) {
|
|
828
828
|
{
|
|
829
|
-
warn$
|
|
829
|
+
warn$2(
|
|
830
830
|
`Set operation on key "${String(key)}" failed: target is readonly.`,
|
|
831
831
|
target
|
|
832
832
|
);
|
|
@@ -835,7 +835,7 @@ class ReadonlyReactiveHandler extends BaseReactiveHandler {
|
|
|
835
835
|
}
|
|
836
836
|
deleteProperty(target, key) {
|
|
837
837
|
{
|
|
838
|
-
warn$
|
|
838
|
+
warn$2(
|
|
839
839
|
`Delete operation on key "${String(key)}" failed: target is readonly.`,
|
|
840
840
|
target
|
|
841
841
|
);
|
|
@@ -1493,7 +1493,7 @@ function pushWarningContext(vnode) {
|
|
|
1493
1493
|
function popWarningContext() {
|
|
1494
1494
|
stack.pop();
|
|
1495
1495
|
}
|
|
1496
|
-
function warn(msg, ...args) {
|
|
1496
|
+
function warn$1(msg, ...args) {
|
|
1497
1497
|
pauseTracking();
|
|
1498
1498
|
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
1499
1499
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
@@ -1594,9 +1594,9 @@ function assertNumber(val, type) {
|
|
|
1594
1594
|
if (val === void 0) {
|
|
1595
1595
|
return;
|
|
1596
1596
|
} else if (typeof val !== "number") {
|
|
1597
|
-
warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
1597
|
+
warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
1598
1598
|
} else if (isNaN(val)) {
|
|
1599
|
-
warn(`${type} is NaN - the duration expression might be incorrect.`);
|
|
1599
|
+
warn$1(`${type} is NaN - the duration expression might be incorrect.`);
|
|
1600
1600
|
}
|
|
1601
1601
|
}
|
|
1602
1602
|
|
|
@@ -1724,7 +1724,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
1724
1724
|
if (contextVNode) {
|
|
1725
1725
|
pushWarningContext(contextVNode);
|
|
1726
1726
|
}
|
|
1727
|
-
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
1727
|
+
warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
1728
1728
|
if (contextVNode) {
|
|
1729
1729
|
popWarningContext();
|
|
1730
1730
|
}
|
|
@@ -2022,22 +2022,22 @@ function tryWrap(fn) {
|
|
|
2022
2022
|
};
|
|
2023
2023
|
}
|
|
2024
2024
|
|
|
2025
|
-
let devtools;
|
|
2025
|
+
let devtools$1;
|
|
2026
2026
|
let buffer = [];
|
|
2027
2027
|
let devtoolsNotInstalled = false;
|
|
2028
2028
|
function emit$1(event, ...args) {
|
|
2029
|
-
if (devtools) {
|
|
2030
|
-
devtools.emit(event, ...args);
|
|
2029
|
+
if (devtools$1) {
|
|
2030
|
+
devtools$1.emit(event, ...args);
|
|
2031
2031
|
} else if (!devtoolsNotInstalled) {
|
|
2032
2032
|
buffer.push({ event, args });
|
|
2033
2033
|
}
|
|
2034
2034
|
}
|
|
2035
|
-
function setDevtoolsHook(hook, target) {
|
|
2035
|
+
function setDevtoolsHook$1(hook, target) {
|
|
2036
2036
|
var _a, _b;
|
|
2037
|
-
devtools = hook;
|
|
2038
|
-
if (devtools) {
|
|
2039
|
-
devtools.enabled = true;
|
|
2040
|
-
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
2037
|
+
devtools$1 = hook;
|
|
2038
|
+
if (devtools$1) {
|
|
2039
|
+
devtools$1.enabled = true;
|
|
2040
|
+
buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
|
|
2041
2041
|
buffer = [];
|
|
2042
2042
|
} else if (
|
|
2043
2043
|
// handle late devtools injection - only do this if we are in an actual
|
|
@@ -2049,10 +2049,10 @@ function setDevtoolsHook(hook, target) {
|
|
|
2049
2049
|
) {
|
|
2050
2050
|
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
|
|
2051
2051
|
replay.push((newHook) => {
|
|
2052
|
-
setDevtoolsHook(newHook, target);
|
|
2052
|
+
setDevtoolsHook$1(newHook, target);
|
|
2053
2053
|
});
|
|
2054
2054
|
setTimeout(() => {
|
|
2055
|
-
if (!devtools) {
|
|
2055
|
+
if (!devtools$1) {
|
|
2056
2056
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
2057
2057
|
devtoolsNotInstalled = true;
|
|
2058
2058
|
buffer = [];
|
|
@@ -2082,8 +2082,8 @@ const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
|
2082
2082
|
"component:removed" /* COMPONENT_REMOVED */
|
|
2083
2083
|
);
|
|
2084
2084
|
const devtoolsComponentRemoved = (component) => {
|
|
2085
|
-
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
2086
|
-
!devtools.cleanupBuffer(component)) {
|
|
2085
|
+
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
2086
|
+
!devtools$1.cleanupBuffer(component)) {
|
|
2087
2087
|
_devtoolsComponentRemoved(component);
|
|
2088
2088
|
}
|
|
2089
2089
|
};
|
|
@@ -2131,7 +2131,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
2131
2131
|
if (emitsOptions) {
|
|
2132
2132
|
if (!(event in emitsOptions) && true) {
|
|
2133
2133
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
2134
|
-
warn(
|
|
2134
|
+
warn$1(
|
|
2135
2135
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
2136
2136
|
);
|
|
2137
2137
|
}
|
|
@@ -2140,7 +2140,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
2140
2140
|
if (isFunction(validator)) {
|
|
2141
2141
|
const isValid = validator(...rawArgs);
|
|
2142
2142
|
if (!isValid) {
|
|
2143
|
-
warn(
|
|
2143
|
+
warn$1(
|
|
2144
2144
|
`Invalid event arguments: event validation failed for event "${event}".`
|
|
2145
2145
|
);
|
|
2146
2146
|
}
|
|
@@ -2167,7 +2167,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
2167
2167
|
{
|
|
2168
2168
|
const lowerCaseEvent = event.toLowerCase();
|
|
2169
2169
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
2170
|
-
warn(
|
|
2170
|
+
warn$1(
|
|
2171
2171
|
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
2172
2172
|
instance,
|
|
2173
2173
|
instance.type
|
|
@@ -2335,7 +2335,7 @@ function renderComponentRoot(instance) {
|
|
|
2335
2335
|
const proxyToUse = withProxy || proxy;
|
|
2336
2336
|
const thisProxy = setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
2337
2337
|
get(target, key, receiver) {
|
|
2338
|
-
warn(
|
|
2338
|
+
warn$1(
|
|
2339
2339
|
`Property '${String(
|
|
2340
2340
|
key
|
|
2341
2341
|
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
@@ -2416,12 +2416,12 @@ function renderComponentRoot(instance) {
|
|
|
2416
2416
|
}
|
|
2417
2417
|
}
|
|
2418
2418
|
if (extraAttrs.length) {
|
|
2419
|
-
warn(
|
|
2419
|
+
warn$1(
|
|
2420
2420
|
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
2421
2421
|
);
|
|
2422
2422
|
}
|
|
2423
2423
|
if (eventAttrs.length) {
|
|
2424
|
-
warn(
|
|
2424
|
+
warn$1(
|
|
2425
2425
|
`Extraneous non-emits event listeners (${eventAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes. If the listener is intended to be a component custom event listener only, declare it using the "emits" option.`
|
|
2426
2426
|
);
|
|
2427
2427
|
}
|
|
@@ -2430,7 +2430,7 @@ function renderComponentRoot(instance) {
|
|
|
2430
2430
|
}
|
|
2431
2431
|
if (vnode.dirs) {
|
|
2432
2432
|
if (!isElementRoot(root)) {
|
|
2433
|
-
warn(
|
|
2433
|
+
warn$1(
|
|
2434
2434
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
2435
2435
|
);
|
|
2436
2436
|
}
|
|
@@ -2439,7 +2439,7 @@ function renderComponentRoot(instance) {
|
|
|
2439
2439
|
}
|
|
2440
2440
|
if (vnode.transition) {
|
|
2441
2441
|
if (!isElementRoot(root)) {
|
|
2442
|
-
warn(
|
|
2442
|
+
warn$1(
|
|
2443
2443
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
2444
2444
|
);
|
|
2445
2445
|
}
|
|
@@ -2632,11 +2632,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
2632
2632
|
if (warnMissing && !res) {
|
|
2633
2633
|
const extra = type === COMPONENTS ? `
|
|
2634
2634
|
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
2635
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2635
|
+
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2636
2636
|
}
|
|
2637
2637
|
return res;
|
|
2638
2638
|
} else {
|
|
2639
|
-
warn(
|
|
2639
|
+
warn$1(
|
|
2640
2640
|
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
2641
2641
|
);
|
|
2642
2642
|
}
|
|
@@ -3192,7 +3192,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
3192
3192
|
if (isArray(s)) {
|
|
3193
3193
|
const singleChild = filterSingleRoot(s);
|
|
3194
3194
|
if (!singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
3195
|
-
warn(`<Suspense> slots expect a single root node.`);
|
|
3195
|
+
warn$1(`<Suspense> slots expect a single root node.`);
|
|
3196
3196
|
}
|
|
3197
3197
|
s = singleChild;
|
|
3198
3198
|
}
|
|
@@ -3247,7 +3247,7 @@ function watchSyncEffect(effect, options) {
|
|
|
3247
3247
|
const INITIAL_WATCHER_VALUE = {};
|
|
3248
3248
|
function watch(source, cb, options) {
|
|
3249
3249
|
if (!isFunction(cb)) {
|
|
3250
|
-
warn(
|
|
3250
|
+
warn$1(
|
|
3251
3251
|
`\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
|
|
3252
3252
|
);
|
|
3253
3253
|
}
|
|
@@ -3264,23 +3264,23 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
|
|
|
3264
3264
|
}
|
|
3265
3265
|
if (!cb) {
|
|
3266
3266
|
if (immediate !== void 0) {
|
|
3267
|
-
warn(
|
|
3267
|
+
warn$1(
|
|
3268
3268
|
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3269
3269
|
);
|
|
3270
3270
|
}
|
|
3271
3271
|
if (deep !== void 0) {
|
|
3272
|
-
warn(
|
|
3272
|
+
warn$1(
|
|
3273
3273
|
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3274
3274
|
);
|
|
3275
3275
|
}
|
|
3276
3276
|
if (once !== void 0) {
|
|
3277
|
-
warn(
|
|
3277
|
+
warn$1(
|
|
3278
3278
|
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
3279
3279
|
);
|
|
3280
3280
|
}
|
|
3281
3281
|
}
|
|
3282
3282
|
const warnInvalidSource = (s) => {
|
|
3283
|
-
warn(
|
|
3283
|
+
warn$1(
|
|
3284
3284
|
`Invalid watch source: `,
|
|
3285
3285
|
s,
|
|
3286
3286
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
@@ -3465,13 +3465,13 @@ function traverse(value, seen) {
|
|
|
3465
3465
|
|
|
3466
3466
|
function validateDirectiveName(name) {
|
|
3467
3467
|
if (isBuiltInDirective(name)) {
|
|
3468
|
-
warn("Do not use built-in directive ids as custom directive id: " + name);
|
|
3468
|
+
warn$1("Do not use built-in directive ids as custom directive id: " + name);
|
|
3469
3469
|
}
|
|
3470
3470
|
}
|
|
3471
3471
|
function withDirectives(vnode, directives) {
|
|
3472
3472
|
const internalInstance = currentRenderingInstance;
|
|
3473
3473
|
if (internalInstance === null) {
|
|
3474
|
-
warn(`withDirectives can only be used inside render functions.`);
|
|
3474
|
+
warn$1(`withDirectives can only be used inside render functions.`);
|
|
3475
3475
|
return vnode;
|
|
3476
3476
|
}
|
|
3477
3477
|
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
|
@@ -3578,7 +3578,7 @@ const BaseTransitionImpl = {
|
|
|
3578
3578
|
for (const c of children) {
|
|
3579
3579
|
if (c.type !== Comment) {
|
|
3580
3580
|
if (hasFound) {
|
|
3581
|
-
warn(
|
|
3581
|
+
warn$1(
|
|
3582
3582
|
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
3583
3583
|
);
|
|
3584
3584
|
break;
|
|
@@ -3591,7 +3591,7 @@ const BaseTransitionImpl = {
|
|
|
3591
3591
|
const rawProps = toRaw(props);
|
|
3592
3592
|
const { mode } = rawProps;
|
|
3593
3593
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
3594
|
-
warn(`invalid <transition> mode: ${mode}`);
|
|
3594
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
3595
3595
|
}
|
|
3596
3596
|
if (state.isLeaving) {
|
|
3597
3597
|
return emptyPlaceholder(child);
|
|
@@ -3906,7 +3906,7 @@ function defineAsyncComponent(source) {
|
|
|
3906
3906
|
return pendingRequest;
|
|
3907
3907
|
}
|
|
3908
3908
|
if (!comp) {
|
|
3909
|
-
warn(
|
|
3909
|
+
warn$1(
|
|
3910
3910
|
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
3911
3911
|
);
|
|
3912
3912
|
}
|
|
@@ -4140,7 +4140,7 @@ const KeepAliveImpl = {
|
|
|
4140
4140
|
const rawVNode = children[0];
|
|
4141
4141
|
if (children.length > 1) {
|
|
4142
4142
|
{
|
|
4143
|
-
warn(`KeepAlive should contain exactly one component child.`);
|
|
4143
|
+
warn$1(`KeepAlive should contain exactly one component child.`);
|
|
4144
4144
|
}
|
|
4145
4145
|
current = null;
|
|
4146
4146
|
return children;
|
|
@@ -4269,7 +4269,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
4269
4269
|
return wrappedHook;
|
|
4270
4270
|
} else {
|
|
4271
4271
|
const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
|
|
4272
|
-
warn(
|
|
4272
|
+
warn$1(
|
|
4273
4273
|
`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + (` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.` )
|
|
4274
4274
|
);
|
|
4275
4275
|
}
|
|
@@ -4305,7 +4305,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
4305
4305
|
}
|
|
4306
4306
|
} else if (typeof source === "number") {
|
|
4307
4307
|
if (!Number.isInteger(source)) {
|
|
4308
|
-
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
4308
|
+
warn$1(`The v-for range expect an integer value but got ${source}.`);
|
|
4309
4309
|
}
|
|
4310
4310
|
ret = new Array(source);
|
|
4311
4311
|
for (let i = 0; i < source; i++) {
|
|
@@ -4361,7 +4361,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
4361
4361
|
}
|
|
4362
4362
|
let slot = slots[name];
|
|
4363
4363
|
if (slot && slot.length > 1) {
|
|
4364
|
-
warn(
|
|
4364
|
+
warn$1(
|
|
4365
4365
|
`SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.`
|
|
4366
4366
|
);
|
|
4367
4367
|
slot = () => [];
|
|
@@ -4404,7 +4404,7 @@ function ensureValidVNode(vnodes) {
|
|
|
4404
4404
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
4405
4405
|
const ret = {};
|
|
4406
4406
|
if (!isObject(obj)) {
|
|
4407
|
-
warn(`v-on with no argument expects an object value.`);
|
|
4407
|
+
warn$1(`v-on with no argument expects an object value.`);
|
|
4408
4408
|
return ret;
|
|
4409
4409
|
}
|
|
4410
4410
|
for (const key in obj) {
|
|
@@ -4514,13 +4514,13 @@ const PublicInstanceProxyHandlers = {
|
|
|
4514
4514
|
// to infinite warning loop
|
|
4515
4515
|
key.indexOf("__v") !== 0)) {
|
|
4516
4516
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
4517
|
-
warn(
|
|
4517
|
+
warn$1(
|
|
4518
4518
|
`Property ${JSON.stringify(
|
|
4519
4519
|
key
|
|
4520
4520
|
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
|
|
4521
4521
|
);
|
|
4522
4522
|
} else if (instance === currentRenderingInstance) {
|
|
4523
|
-
warn(
|
|
4523
|
+
warn$1(
|
|
4524
4524
|
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
|
|
4525
4525
|
);
|
|
4526
4526
|
}
|
|
@@ -4532,17 +4532,17 @@ const PublicInstanceProxyHandlers = {
|
|
|
4532
4532
|
setupState[key] = value;
|
|
4533
4533
|
return true;
|
|
4534
4534
|
} else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
|
|
4535
|
-
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
4535
|
+
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
4536
4536
|
return false;
|
|
4537
4537
|
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
4538
4538
|
data[key] = value;
|
|
4539
4539
|
return true;
|
|
4540
4540
|
} else if (hasOwn(instance.props, key)) {
|
|
4541
|
-
warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
4541
|
+
warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
4542
4542
|
return false;
|
|
4543
4543
|
}
|
|
4544
4544
|
if (key[0] === "$" && key.slice(1) in instance) {
|
|
4545
|
-
warn(
|
|
4545
|
+
warn$1(
|
|
4546
4546
|
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
|
|
4547
4547
|
);
|
|
4548
4548
|
return false;
|
|
@@ -4576,7 +4576,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
4576
4576
|
};
|
|
4577
4577
|
{
|
|
4578
4578
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
4579
|
-
warn(
|
|
4579
|
+
warn$1(
|
|
4580
4580
|
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
|
|
4581
4581
|
);
|
|
4582
4582
|
return Reflect.ownKeys(target);
|
|
@@ -4595,7 +4595,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
4595
4595
|
has(_, key) {
|
|
4596
4596
|
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
4597
4597
|
if (!has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
4598
|
-
warn(
|
|
4598
|
+
warn$1(
|
|
4599
4599
|
`Property ${JSON.stringify(
|
|
4600
4600
|
key
|
|
4601
4601
|
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
@@ -4645,7 +4645,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
4645
4645
|
Object.keys(toRaw(setupState)).forEach((key) => {
|
|
4646
4646
|
if (!setupState.__isScriptSetup) {
|
|
4647
4647
|
if (isReservedPrefix(key[0])) {
|
|
4648
|
-
warn(
|
|
4648
|
+
warn$1(
|
|
4649
4649
|
`setup() return property ${JSON.stringify(
|
|
4650
4650
|
key
|
|
4651
4651
|
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
|
|
@@ -4662,7 +4662,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
4662
4662
|
});
|
|
4663
4663
|
}
|
|
4664
4664
|
|
|
4665
|
-
const warnRuntimeUsage = (method) => warn(
|
|
4665
|
+
const warnRuntimeUsage = (method) => warn$1(
|
|
4666
4666
|
`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`
|
|
4667
4667
|
);
|
|
4668
4668
|
function defineProps() {
|
|
@@ -4713,11 +4713,11 @@ function useAttrs() {
|
|
|
4713
4713
|
function useModel(props, name) {
|
|
4714
4714
|
const i = getCurrentInstance();
|
|
4715
4715
|
if (!i) {
|
|
4716
|
-
warn(`useModel() called without active instance.`);
|
|
4716
|
+
warn$1(`useModel() called without active instance.`);
|
|
4717
4717
|
return ref();
|
|
4718
4718
|
}
|
|
4719
4719
|
if (!i.propsOptions[0][name]) {
|
|
4720
|
-
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
4720
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
4721
4721
|
return ref();
|
|
4722
4722
|
}
|
|
4723
4723
|
return customRef((track, trigger) => {
|
|
@@ -4748,7 +4748,7 @@ function useModel(props, name) {
|
|
|
4748
4748
|
function getContext() {
|
|
4749
4749
|
const i = getCurrentInstance();
|
|
4750
4750
|
if (!i) {
|
|
4751
|
-
warn(`useContext() called without active instance.`);
|
|
4751
|
+
warn$1(`useContext() called without active instance.`);
|
|
4752
4752
|
}
|
|
4753
4753
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
4754
4754
|
}
|
|
@@ -4773,7 +4773,7 @@ function mergeDefaults(raw, defaults) {
|
|
|
4773
4773
|
} else if (opt === null) {
|
|
4774
4774
|
opt = props[key] = { default: defaults[key] };
|
|
4775
4775
|
} else {
|
|
4776
|
-
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
4776
|
+
warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
4777
4777
|
}
|
|
4778
4778
|
if (opt && defaults[`__skip_${key}`]) {
|
|
4779
4779
|
opt.skipFactory = true;
|
|
@@ -4803,7 +4803,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
4803
4803
|
function withAsyncContext(getAwaitable) {
|
|
4804
4804
|
const ctx = getCurrentInstance();
|
|
4805
4805
|
if (!ctx) {
|
|
4806
|
-
warn(
|
|
4806
|
+
warn$1(
|
|
4807
4807
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
4808
4808
|
);
|
|
4809
4809
|
}
|
|
@@ -4822,7 +4822,7 @@ function createDuplicateChecker() {
|
|
|
4822
4822
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
4823
4823
|
return (type, key) => {
|
|
4824
4824
|
if (cache[key]) {
|
|
4825
|
-
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
4825
|
+
warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
4826
4826
|
} else {
|
|
4827
4827
|
cache[key] = type;
|
|
4828
4828
|
}
|
|
@@ -4898,7 +4898,7 @@ function applyOptions(instance) {
|
|
|
4898
4898
|
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
4899
4899
|
}
|
|
4900
4900
|
} else {
|
|
4901
|
-
warn(
|
|
4901
|
+
warn$1(
|
|
4902
4902
|
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
|
|
4903
4903
|
);
|
|
4904
4904
|
}
|
|
@@ -4906,18 +4906,18 @@ function applyOptions(instance) {
|
|
|
4906
4906
|
}
|
|
4907
4907
|
if (dataOptions) {
|
|
4908
4908
|
if (!isFunction(dataOptions)) {
|
|
4909
|
-
warn(
|
|
4909
|
+
warn$1(
|
|
4910
4910
|
`The data option must be a function. Plain object usage is no longer supported.`
|
|
4911
4911
|
);
|
|
4912
4912
|
}
|
|
4913
4913
|
const data = dataOptions.call(publicThis, publicThis);
|
|
4914
4914
|
if (isPromise(data)) {
|
|
4915
|
-
warn(
|
|
4915
|
+
warn$1(
|
|
4916
4916
|
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
|
|
4917
4917
|
);
|
|
4918
4918
|
}
|
|
4919
4919
|
if (!isObject(data)) {
|
|
4920
|
-
warn(`data() should return an object.`);
|
|
4920
|
+
warn$1(`data() should return an object.`);
|
|
4921
4921
|
} else {
|
|
4922
4922
|
instance.data = reactive(data);
|
|
4923
4923
|
{
|
|
@@ -4941,10 +4941,10 @@ function applyOptions(instance) {
|
|
|
4941
4941
|
const opt = computedOptions[key];
|
|
4942
4942
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
4943
4943
|
if (get === NOOP) {
|
|
4944
|
-
warn(`Computed property "${key}" has no getter.`);
|
|
4944
|
+
warn$1(`Computed property "${key}" has no getter.`);
|
|
4945
4945
|
}
|
|
4946
4946
|
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : () => {
|
|
4947
|
-
warn(
|
|
4947
|
+
warn$1(
|
|
4948
4948
|
`Write operation failed: computed property "${key}" is readonly.`
|
|
4949
4949
|
);
|
|
4950
4950
|
} ;
|
|
@@ -5070,7 +5070,7 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
5070
5070
|
if (isFunction(handler)) {
|
|
5071
5071
|
watch(getter, handler);
|
|
5072
5072
|
} else {
|
|
5073
|
-
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5073
|
+
warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
5074
5074
|
}
|
|
5075
5075
|
} else if (isFunction(raw)) {
|
|
5076
5076
|
watch(getter, raw.bind(publicThis));
|
|
@@ -5082,11 +5082,11 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
5082
5082
|
if (isFunction(handler)) {
|
|
5083
5083
|
watch(getter, handler, raw);
|
|
5084
5084
|
} else {
|
|
5085
|
-
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5085
|
+
warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
5086
5086
|
}
|
|
5087
5087
|
}
|
|
5088
5088
|
} else {
|
|
5089
|
-
warn(`Invalid watch option: "${key}"`, raw);
|
|
5089
|
+
warn$1(`Invalid watch option: "${key}"`, raw);
|
|
5090
5090
|
}
|
|
5091
5091
|
}
|
|
5092
5092
|
function resolveMergedOptions(instance) {
|
|
@@ -5131,7 +5131,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
5131
5131
|
}
|
|
5132
5132
|
for (const key in from) {
|
|
5133
5133
|
if (asMixin && key === "expose") {
|
|
5134
|
-
warn(
|
|
5134
|
+
warn$1(
|
|
5135
5135
|
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
|
|
5136
5136
|
);
|
|
5137
5137
|
} else {
|
|
@@ -5259,7 +5259,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5259
5259
|
rootComponent = extend({}, rootComponent);
|
|
5260
5260
|
}
|
|
5261
5261
|
if (rootProps != null && !isObject(rootProps)) {
|
|
5262
|
-
warn(`root props passed to app.mount() must be an object.`);
|
|
5262
|
+
warn$1(`root props passed to app.mount() must be an object.`);
|
|
5263
5263
|
rootProps = null;
|
|
5264
5264
|
}
|
|
5265
5265
|
const context = createAppContext();
|
|
@@ -5278,14 +5278,14 @@ function createAppAPI(render, hydrate) {
|
|
|
5278
5278
|
},
|
|
5279
5279
|
set config(v) {
|
|
5280
5280
|
{
|
|
5281
|
-
warn(
|
|
5281
|
+
warn$1(
|
|
5282
5282
|
`app.config cannot be replaced. Modify individual options instead.`
|
|
5283
5283
|
);
|
|
5284
5284
|
}
|
|
5285
5285
|
},
|
|
5286
5286
|
use(plugin, ...options) {
|
|
5287
5287
|
if (installedPlugins.has(plugin)) {
|
|
5288
|
-
warn(`Plugin has already been applied to target app.`);
|
|
5288
|
+
warn$1(`Plugin has already been applied to target app.`);
|
|
5289
5289
|
} else if (plugin && isFunction(plugin.install)) {
|
|
5290
5290
|
installedPlugins.add(plugin);
|
|
5291
5291
|
plugin.install(app, ...options);
|
|
@@ -5293,7 +5293,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5293
5293
|
installedPlugins.add(plugin);
|
|
5294
5294
|
plugin(app, ...options);
|
|
5295
5295
|
} else {
|
|
5296
|
-
warn(
|
|
5296
|
+
warn$1(
|
|
5297
5297
|
`A plugin must either be a function or an object with an "install" function.`
|
|
5298
5298
|
);
|
|
5299
5299
|
}
|
|
@@ -5304,7 +5304,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5304
5304
|
if (!context.mixins.includes(mixin)) {
|
|
5305
5305
|
context.mixins.push(mixin);
|
|
5306
5306
|
} else {
|
|
5307
|
-
warn(
|
|
5307
|
+
warn$1(
|
|
5308
5308
|
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
|
|
5309
5309
|
);
|
|
5310
5310
|
}
|
|
@@ -5319,7 +5319,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5319
5319
|
return context.components[name];
|
|
5320
5320
|
}
|
|
5321
5321
|
if (context.components[name]) {
|
|
5322
|
-
warn(`Component "${name}" has already been registered in target app.`);
|
|
5322
|
+
warn$1(`Component "${name}" has already been registered in target app.`);
|
|
5323
5323
|
}
|
|
5324
5324
|
context.components[name] = component;
|
|
5325
5325
|
return app;
|
|
@@ -5332,7 +5332,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5332
5332
|
return context.directives[name];
|
|
5333
5333
|
}
|
|
5334
5334
|
if (context.directives[name]) {
|
|
5335
|
-
warn(`Directive "${name}" has already been registered in target app.`);
|
|
5335
|
+
warn$1(`Directive "${name}" has already been registered in target app.`);
|
|
5336
5336
|
}
|
|
5337
5337
|
context.directives[name] = directive;
|
|
5338
5338
|
return app;
|
|
@@ -5340,7 +5340,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5340
5340
|
mount(rootContainer, isHydrate, namespace) {
|
|
5341
5341
|
if (!isMounted) {
|
|
5342
5342
|
if (rootContainer.__vue_app__) {
|
|
5343
|
-
warn(
|
|
5343
|
+
warn$1(
|
|
5344
5344
|
`There is already an app instance mounted on the host container.
|
|
5345
5345
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
5346
5346
|
);
|
|
@@ -5375,7 +5375,7 @@ function createAppAPI(render, hydrate) {
|
|
|
5375
5375
|
}
|
|
5376
5376
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
5377
5377
|
} else {
|
|
5378
|
-
warn(
|
|
5378
|
+
warn$1(
|
|
5379
5379
|
`App has already been mounted.
|
|
5380
5380
|
If you want to remount the same app, move your app creation logic into a factory function and create fresh app instances for each mount - e.g. \`const createMyApp = () => createApp(App)\``
|
|
5381
5381
|
);
|
|
@@ -5390,12 +5390,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
5390
5390
|
}
|
|
5391
5391
|
delete app._container.__vue_app__;
|
|
5392
5392
|
} else {
|
|
5393
|
-
warn(`Cannot unmount an app that is not mounted.`);
|
|
5393
|
+
warn$1(`Cannot unmount an app that is not mounted.`);
|
|
5394
5394
|
}
|
|
5395
5395
|
},
|
|
5396
5396
|
provide(key, value) {
|
|
5397
5397
|
if (key in context.provides) {
|
|
5398
|
-
warn(
|
|
5398
|
+
warn$1(
|
|
5399
5399
|
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
5400
5400
|
);
|
|
5401
5401
|
}
|
|
@@ -5419,7 +5419,7 @@ let currentApp = null;
|
|
|
5419
5419
|
function provide(key, value) {
|
|
5420
5420
|
if (!currentInstance) {
|
|
5421
5421
|
{
|
|
5422
|
-
warn(`provide() can only be used inside setup().`);
|
|
5422
|
+
warn$1(`provide() can only be used inside setup().`);
|
|
5423
5423
|
}
|
|
5424
5424
|
} else {
|
|
5425
5425
|
let provides = currentInstance.provides;
|
|
@@ -5439,10 +5439,10 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
5439
5439
|
} else if (arguments.length > 1) {
|
|
5440
5440
|
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
5441
5441
|
} else {
|
|
5442
|
-
warn(`injection "${String(key)}" not found.`);
|
|
5442
|
+
warn$1(`injection "${String(key)}" not found.`);
|
|
5443
5443
|
}
|
|
5444
5444
|
} else {
|
|
5445
|
-
warn(`inject() can only be used inside setup() or functional components.`);
|
|
5445
|
+
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
5446
5446
|
}
|
|
5447
5447
|
}
|
|
5448
5448
|
function hasInjectionContext() {
|
|
@@ -5686,7 +5686,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
5686
5686
|
if (isArray(raw)) {
|
|
5687
5687
|
for (let i = 0; i < raw.length; i++) {
|
|
5688
5688
|
if (!isString(raw[i])) {
|
|
5689
|
-
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
5689
|
+
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
5690
5690
|
}
|
|
5691
5691
|
const normalizedKey = camelize(raw[i]);
|
|
5692
5692
|
if (validatePropName(normalizedKey)) {
|
|
@@ -5695,7 +5695,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
5695
5695
|
}
|
|
5696
5696
|
} else if (raw) {
|
|
5697
5697
|
if (!isObject(raw)) {
|
|
5698
|
-
warn(`invalid props options`, raw);
|
|
5698
|
+
warn$1(`invalid props options`, raw);
|
|
5699
5699
|
}
|
|
5700
5700
|
for (const key in raw) {
|
|
5701
5701
|
const normalizedKey = camelize(key);
|
|
@@ -5724,7 +5724,7 @@ function validatePropName(key) {
|
|
|
5724
5724
|
if (key[0] !== "$") {
|
|
5725
5725
|
return true;
|
|
5726
5726
|
} else {
|
|
5727
|
-
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5727
|
+
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
5728
5728
|
}
|
|
5729
5729
|
return false;
|
|
5730
5730
|
}
|
|
@@ -5762,7 +5762,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
5762
5762
|
function validateProp(name, value, prop, props, isAbsent) {
|
|
5763
5763
|
const { type, required, validator, skipCheck } = prop;
|
|
5764
5764
|
if (required && isAbsent) {
|
|
5765
|
-
warn('Missing required prop: "' + name + '"');
|
|
5765
|
+
warn$1('Missing required prop: "' + name + '"');
|
|
5766
5766
|
return;
|
|
5767
5767
|
}
|
|
5768
5768
|
if (value == null && !required) {
|
|
@@ -5778,12 +5778,12 @@ function validateProp(name, value, prop, props, isAbsent) {
|
|
|
5778
5778
|
isValid = valid;
|
|
5779
5779
|
}
|
|
5780
5780
|
if (!isValid) {
|
|
5781
|
-
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5781
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
5782
5782
|
return;
|
|
5783
5783
|
}
|
|
5784
5784
|
}
|
|
5785
5785
|
if (validator && !validator(value, props)) {
|
|
5786
|
-
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5786
|
+
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
5787
5787
|
}
|
|
5788
5788
|
}
|
|
5789
5789
|
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
@@ -5855,7 +5855,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
5855
5855
|
}
|
|
5856
5856
|
const normalized = withCtx((...args) => {
|
|
5857
5857
|
if (currentInstance) {
|
|
5858
|
-
warn(
|
|
5858
|
+
warn$1(
|
|
5859
5859
|
`Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
|
|
5860
5860
|
);
|
|
5861
5861
|
}
|
|
@@ -5874,7 +5874,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
5874
5874
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
5875
5875
|
} else if (value != null) {
|
|
5876
5876
|
{
|
|
5877
|
-
warn(
|
|
5877
|
+
warn$1(
|
|
5878
5878
|
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
5879
5879
|
);
|
|
5880
5880
|
}
|
|
@@ -5885,7 +5885,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
5885
5885
|
};
|
|
5886
5886
|
const normalizeVNodeSlots = (instance, children) => {
|
|
5887
5887
|
if (!isKeepAlive(instance.vnode) && true) {
|
|
5888
|
-
warn(
|
|
5888
|
+
warn$1(
|
|
5889
5889
|
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
5890
5890
|
);
|
|
5891
5891
|
}
|
|
@@ -5967,7 +5967,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
5967
5967
|
const value = isUnmount ? null : refValue;
|
|
5968
5968
|
const { i: owner, r: ref } = rawRef;
|
|
5969
5969
|
if (!owner) {
|
|
5970
|
-
warn(
|
|
5970
|
+
warn$1(
|
|
5971
5971
|
`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
|
|
5972
5972
|
);
|
|
5973
5973
|
return;
|
|
@@ -6022,7 +6022,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
6022
6022
|
if (rawRef.k)
|
|
6023
6023
|
refs[rawRef.k] = value;
|
|
6024
6024
|
} else {
|
|
6025
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
6025
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
6026
6026
|
}
|
|
6027
6027
|
};
|
|
6028
6028
|
if (value) {
|
|
@@ -6032,7 +6032,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
6032
6032
|
doSet();
|
|
6033
6033
|
}
|
|
6034
6034
|
} else {
|
|
6035
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
6035
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
6036
6036
|
}
|
|
6037
6037
|
}
|
|
6038
6038
|
}
|
|
@@ -6064,7 +6064,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6064
6064
|
} = rendererInternals;
|
|
6065
6065
|
const hydrate = (vnode, container) => {
|
|
6066
6066
|
if (!container.hasChildNodes()) {
|
|
6067
|
-
warn(
|
|
6067
|
+
warn$1(
|
|
6068
6068
|
`Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
|
|
6069
6069
|
);
|
|
6070
6070
|
patch(null, vnode, container);
|
|
@@ -6124,7 +6124,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6124
6124
|
} else {
|
|
6125
6125
|
if (node.data !== vnode.children) {
|
|
6126
6126
|
hasMismatch = true;
|
|
6127
|
-
warn(
|
|
6127
|
+
warn$1(
|
|
6128
6128
|
`Hydration text mismatch in`,
|
|
6129
6129
|
node.parentNode,
|
|
6130
6130
|
`
|
|
@@ -6259,7 +6259,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6259
6259
|
hydrateNode
|
|
6260
6260
|
);
|
|
6261
6261
|
} else {
|
|
6262
|
-
warn("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
6262
|
+
warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
6263
6263
|
}
|
|
6264
6264
|
}
|
|
6265
6265
|
if (ref != null) {
|
|
@@ -6300,7 +6300,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
6300
6300
|
while (next) {
|
|
6301
6301
|
hasMismatch = true;
|
|
6302
6302
|
if (!hasWarned) {
|
|
6303
|
-
warn(
|
|
6303
|
+
warn$1(
|
|
6304
6304
|
`Hydration children mismatch on`,
|
|
6305
6305
|
el,
|
|
6306
6306
|
`
|
|
@@ -6315,7 +6315,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
6315
6315
|
} else if (shapeFlag & 8) {
|
|
6316
6316
|
if (el.textContent !== vnode.children) {
|
|
6317
6317
|
hasMismatch = true;
|
|
6318
|
-
warn(
|
|
6318
|
+
warn$1(
|
|
6319
6319
|
`Hydration text content mismatch on`,
|
|
6320
6320
|
el,
|
|
6321
6321
|
`
|
|
@@ -6384,7 +6384,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
6384
6384
|
} else {
|
|
6385
6385
|
hasMismatch = true;
|
|
6386
6386
|
if (!hasWarned) {
|
|
6387
|
-
warn(
|
|
6387
|
+
warn$1(
|
|
6388
6388
|
`Hydration children mismatch on`,
|
|
6389
6389
|
container,
|
|
6390
6390
|
`
|
|
@@ -6431,7 +6431,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
6431
6431
|
};
|
|
6432
6432
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
6433
6433
|
hasMismatch = true;
|
|
6434
|
-
warn(
|
|
6434
|
+
warn$1(
|
|
6435
6435
|
`Hydration node mismatch:
|
|
6436
6436
|
- rendered on server:`,
|
|
6437
6437
|
node,
|
|
@@ -6509,9 +6509,9 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
6509
6509
|
let actual;
|
|
6510
6510
|
let expected;
|
|
6511
6511
|
if (key === "class") {
|
|
6512
|
-
actual = el.getAttribute("class");
|
|
6513
|
-
expected = normalizeClass(clientValue);
|
|
6514
|
-
if (actual
|
|
6512
|
+
actual = toClassSet(el.getAttribute("class") || "");
|
|
6513
|
+
expected = toClassSet(normalizeClass(clientValue));
|
|
6514
|
+
if (!isSetEqual(actual, expected)) {
|
|
6515
6515
|
mismatchType = mismatchKey = `class`;
|
|
6516
6516
|
}
|
|
6517
6517
|
} else if (key === "style") {
|
|
@@ -6530,7 +6530,7 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
6530
6530
|
}
|
|
6531
6531
|
if (mismatchType) {
|
|
6532
6532
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
6533
|
-
warn(
|
|
6533
|
+
warn$1(
|
|
6534
6534
|
`Hydration ${mismatchType} mismatch on`,
|
|
6535
6535
|
el,
|
|
6536
6536
|
`
|
|
@@ -6543,6 +6543,20 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
6543
6543
|
}
|
|
6544
6544
|
return false;
|
|
6545
6545
|
}
|
|
6546
|
+
function toClassSet(str) {
|
|
6547
|
+
return new Set(str.trim().split(/\s+/));
|
|
6548
|
+
}
|
|
6549
|
+
function isSetEqual(a, b) {
|
|
6550
|
+
if (a.size !== b.size) {
|
|
6551
|
+
return false;
|
|
6552
|
+
}
|
|
6553
|
+
for (const s of a) {
|
|
6554
|
+
if (!b.has(s)) {
|
|
6555
|
+
return false;
|
|
6556
|
+
}
|
|
6557
|
+
}
|
|
6558
|
+
return true;
|
|
6559
|
+
}
|
|
6546
6560
|
|
|
6547
6561
|
let supported;
|
|
6548
6562
|
let perf;
|
|
@@ -6595,7 +6609,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6595
6609
|
const target = getGlobalThis();
|
|
6596
6610
|
target.__VUE__ = true;
|
|
6597
6611
|
{
|
|
6598
|
-
setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
6612
|
+
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
6599
6613
|
}
|
|
6600
6614
|
const {
|
|
6601
6615
|
insert: hostInsert,
|
|
@@ -6704,7 +6718,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6704
6718
|
internals
|
|
6705
6719
|
);
|
|
6706
6720
|
} else {
|
|
6707
|
-
warn("Invalid VNode type:", type, `(${typeof type})`);
|
|
6721
|
+
warn$1("Invalid VNode type:", type, `(${typeof type})`);
|
|
6708
6722
|
}
|
|
6709
6723
|
}
|
|
6710
6724
|
if (ref != null && parentComponent) {
|
|
@@ -7673,7 +7687,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7673
7687
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
7674
7688
|
if (nextChild.key != null) {
|
|
7675
7689
|
if (keyToNewIndexMap.has(nextChild.key)) {
|
|
7676
|
-
warn(
|
|
7690
|
+
warn$1(
|
|
7677
7691
|
`Duplicate keys found during update:`,
|
|
7678
7692
|
JSON.stringify(nextChild.key),
|
|
7679
7693
|
`Make sure keys are unique.`
|
|
@@ -8102,14 +8116,14 @@ const resolveTarget = (props, select) => {
|
|
|
8102
8116
|
const targetSelector = props && props.to;
|
|
8103
8117
|
if (isString(targetSelector)) {
|
|
8104
8118
|
if (!select) {
|
|
8105
|
-
warn(
|
|
8119
|
+
warn$1(
|
|
8106
8120
|
`Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
|
|
8107
8121
|
);
|
|
8108
8122
|
return null;
|
|
8109
8123
|
} else {
|
|
8110
8124
|
const target = select(targetSelector);
|
|
8111
8125
|
if (!target) {
|
|
8112
|
-
warn(
|
|
8126
|
+
warn$1(
|
|
8113
8127
|
`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`
|
|
8114
8128
|
);
|
|
8115
8129
|
}
|
|
@@ -8117,7 +8131,7 @@ const resolveTarget = (props, select) => {
|
|
|
8117
8131
|
}
|
|
8118
8132
|
} else {
|
|
8119
8133
|
if (!targetSelector && !isTeleportDisabled(props)) {
|
|
8120
|
-
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
8134
|
+
warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
8121
8135
|
}
|
|
8122
8136
|
return targetSelector;
|
|
8123
8137
|
}
|
|
@@ -8153,7 +8167,7 @@ const TeleportImpl = {
|
|
|
8153
8167
|
namespace = "mathml";
|
|
8154
8168
|
}
|
|
8155
8169
|
} else if (!disabled) {
|
|
8156
|
-
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
8170
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
8157
8171
|
}
|
|
8158
8172
|
const mount = (container2, anchor2) => {
|
|
8159
8173
|
if (shapeFlag & 16) {
|
|
@@ -8240,7 +8254,7 @@ const TeleportImpl = {
|
|
|
8240
8254
|
0
|
|
8241
8255
|
);
|
|
8242
8256
|
} else {
|
|
8243
|
-
warn(
|
|
8257
|
+
warn$1(
|
|
8244
8258
|
"Invalid Teleport target on update:",
|
|
8245
8259
|
target,
|
|
8246
8260
|
`(${typeof target})`
|
|
@@ -8490,7 +8504,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
8490
8504
|
vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
8491
8505
|
}
|
|
8492
8506
|
if (vnode.key !== vnode.key) {
|
|
8493
|
-
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
8507
|
+
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
8494
8508
|
}
|
|
8495
8509
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
8496
8510
|
!isBlockNode && // has current parent block
|
|
@@ -8509,7 +8523,7 @@ const createVNode = createVNodeWithArgsTransform ;
|
|
|
8509
8523
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
8510
8524
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
8511
8525
|
if (!type) {
|
|
8512
|
-
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
8526
|
+
warn$1(`Invalid vnode type when creating vnode: ${type}.`);
|
|
8513
8527
|
}
|
|
8514
8528
|
type = Comment;
|
|
8515
8529
|
}
|
|
@@ -8552,7 +8566,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
8552
8566
|
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
8553
8567
|
if (shapeFlag & 4 && isProxy(type)) {
|
|
8554
8568
|
type = toRaw(type);
|
|
8555
|
-
warn(
|
|
8569
|
+
warn$1(
|
|
8556
8570
|
`Vue received a Component that was made a reactive object. This can lead to unnecessary performance overhead and should be avoided by marking the component with \`markRaw\` or using \`shallowRef\` instead of \`ref\`.`,
|
|
8557
8571
|
`
|
|
8558
8572
|
Component that was made reactive: `,
|
|
@@ -8850,7 +8864,7 @@ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
|
8850
8864
|
function validateComponentName(name, config) {
|
|
8851
8865
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
8852
8866
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
8853
|
-
warn(
|
|
8867
|
+
warn$1(
|
|
8854
8868
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
8855
8869
|
);
|
|
8856
8870
|
}
|
|
@@ -8889,7 +8903,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
8889
8903
|
}
|
|
8890
8904
|
}
|
|
8891
8905
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
8892
|
-
warn(
|
|
8906
|
+
warn$1(
|
|
8893
8907
|
`"compilerOptions" is only supported when using a build of Vue that includes the runtime compiler. Since you are using a runtime-only build, the options should be passed via your build tool config instead.`
|
|
8894
8908
|
);
|
|
8895
8909
|
}
|
|
@@ -8924,7 +8938,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
8924
8938
|
instance.asyncDep = setupResult;
|
|
8925
8939
|
if (!instance.suspense) {
|
|
8926
8940
|
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
8927
|
-
warn(
|
|
8941
|
+
warn$1(
|
|
8928
8942
|
`Component <${name}>: setup function returned a promise, but no <Suspense> boundary was found in the parent component tree. A component with async setup() must be nested in a <Suspense> in order to be rendered.`
|
|
8929
8943
|
);
|
|
8930
8944
|
}
|
|
@@ -8943,7 +8957,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
8943
8957
|
}
|
|
8944
8958
|
} else if (isObject(setupResult)) {
|
|
8945
8959
|
if (isVNode(setupResult)) {
|
|
8946
|
-
warn(
|
|
8960
|
+
warn$1(
|
|
8947
8961
|
`setup() should not return VNodes directly - return a render function instead.`
|
|
8948
8962
|
);
|
|
8949
8963
|
}
|
|
@@ -8955,7 +8969,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
8955
8969
|
exposeSetupStateOnRenderContext(instance);
|
|
8956
8970
|
}
|
|
8957
8971
|
} else if (setupResult !== void 0) {
|
|
8958
|
-
warn(
|
|
8972
|
+
warn$1(
|
|
8959
8973
|
`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
|
|
8960
8974
|
);
|
|
8961
8975
|
}
|
|
@@ -9016,12 +9030,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
9016
9030
|
}
|
|
9017
9031
|
if (!Component.render && instance.render === NOOP && !isSSR) {
|
|
9018
9032
|
if (!compile && Component.template) {
|
|
9019
|
-
warn(
|
|
9033
|
+
warn$1(
|
|
9020
9034
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Use "vue.esm-browser.js" instead.` )
|
|
9021
9035
|
/* should not happen */
|
|
9022
9036
|
);
|
|
9023
9037
|
} else {
|
|
9024
|
-
warn(`Component is missing template or render function.`);
|
|
9038
|
+
warn$1(`Component is missing template or render function.`);
|
|
9025
9039
|
}
|
|
9026
9040
|
}
|
|
9027
9041
|
}
|
|
@@ -9035,11 +9049,11 @@ function getAttrsProxy(instance) {
|
|
|
9035
9049
|
return target[key];
|
|
9036
9050
|
},
|
|
9037
9051
|
set() {
|
|
9038
|
-
warn(`setupContext.attrs is readonly.`);
|
|
9052
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9039
9053
|
return false;
|
|
9040
9054
|
},
|
|
9041
9055
|
deleteProperty() {
|
|
9042
|
-
warn(`setupContext.attrs is readonly.`);
|
|
9056
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
9043
9057
|
return false;
|
|
9044
9058
|
}
|
|
9045
9059
|
}
|
|
@@ -9057,7 +9071,7 @@ function createSetupContext(instance) {
|
|
|
9057
9071
|
const expose = (exposed) => {
|
|
9058
9072
|
{
|
|
9059
9073
|
if (instance.exposed) {
|
|
9060
|
-
warn(`expose() should be called only once per setup().`);
|
|
9074
|
+
warn$1(`expose() should be called only once per setup().`);
|
|
9061
9075
|
}
|
|
9062
9076
|
if (exposed != null) {
|
|
9063
9077
|
let exposedType = typeof exposed;
|
|
@@ -9069,7 +9083,7 @@ function createSetupContext(instance) {
|
|
|
9069
9083
|
}
|
|
9070
9084
|
}
|
|
9071
9085
|
if (exposedType !== "object") {
|
|
9072
|
-
warn(
|
|
9086
|
+
warn$1(
|
|
9073
9087
|
`expose() should be passed a plain object, received ${exposedType}.`
|
|
9074
9088
|
);
|
|
9075
9089
|
}
|
|
@@ -9169,7 +9183,7 @@ const useSSRContext = () => {
|
|
|
9169
9183
|
{
|
|
9170
9184
|
const ctx = inject(ssrContextKey);
|
|
9171
9185
|
if (!ctx) {
|
|
9172
|
-
warn(
|
|
9186
|
+
warn$1(
|
|
9173
9187
|
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
9174
9188
|
);
|
|
9175
9189
|
}
|
|
@@ -9378,8 +9392,11 @@ function isMemoSame(cached, memo) {
|
|
|
9378
9392
|
return true;
|
|
9379
9393
|
}
|
|
9380
9394
|
|
|
9381
|
-
const version = "3.4.0-
|
|
9395
|
+
const version = "3.4.0-rc.2";
|
|
9396
|
+
const warn = warn$1 ;
|
|
9382
9397
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9398
|
+
const devtools = devtools$1 ;
|
|
9399
|
+
const setDevtoolsHook = setDevtoolsHook$1 ;
|
|
9383
9400
|
const ssrUtils = null;
|
|
9384
9401
|
const resolveFilter = null;
|
|
9385
9402
|
const compatUtils = null;
|