@vue/runtime-core 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.
- package/dist/runtime-core.cjs.js +146 -128
- package/dist/runtime-core.cjs.prod.js +5 -36
- package/dist/runtime-core.d.ts +7 -3
- package/dist/runtime-core.esm-bundler.js +146 -131
- package/package.json +3 -3
|
@@ -10,9 +10,7 @@ function pushWarningContext(vnode) {
|
|
|
10
10
|
function popWarningContext() {
|
|
11
11
|
stack.pop();
|
|
12
12
|
}
|
|
13
|
-
function warn(msg, ...args) {
|
|
14
|
-
if (!!!(process.env.NODE_ENV !== "production"))
|
|
15
|
-
return;
|
|
13
|
+
function warn$1(msg, ...args) {
|
|
16
14
|
pauseTracking();
|
|
17
15
|
const instance = stack.length ? stack[stack.length - 1].component : null;
|
|
18
16
|
const appWarnHandler = instance && instance.appContext.config.warnHandler;
|
|
@@ -115,9 +113,9 @@ function assertNumber(val, type) {
|
|
|
115
113
|
if (val === void 0) {
|
|
116
114
|
return;
|
|
117
115
|
} else if (typeof val !== "number") {
|
|
118
|
-
warn(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
116
|
+
warn$1(`${type} is not a valid number - got ${JSON.stringify(val)}.`);
|
|
119
117
|
} else if (isNaN(val)) {
|
|
120
|
-
warn(`${type} is NaN - the duration expression might be incorrect.`);
|
|
118
|
+
warn$1(`${type} is NaN - the duration expression might be incorrect.`);
|
|
121
119
|
}
|
|
122
120
|
}
|
|
123
121
|
|
|
@@ -245,7 +243,7 @@ function logError(err, type, contextVNode, throwInDev = true) {
|
|
|
245
243
|
if (contextVNode) {
|
|
246
244
|
pushWarningContext(contextVNode);
|
|
247
245
|
}
|
|
248
|
-
warn(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
246
|
+
warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
|
|
249
247
|
if (contextVNode) {
|
|
250
248
|
popWarningContext();
|
|
251
249
|
}
|
|
@@ -545,22 +543,22 @@ function tryWrap(fn) {
|
|
|
545
543
|
};
|
|
546
544
|
}
|
|
547
545
|
|
|
548
|
-
let devtools;
|
|
546
|
+
let devtools$1;
|
|
549
547
|
let buffer = [];
|
|
550
548
|
let devtoolsNotInstalled = false;
|
|
551
549
|
function emit$1(event, ...args) {
|
|
552
|
-
if (devtools) {
|
|
553
|
-
devtools.emit(event, ...args);
|
|
550
|
+
if (devtools$1) {
|
|
551
|
+
devtools$1.emit(event, ...args);
|
|
554
552
|
} else if (!devtoolsNotInstalled) {
|
|
555
553
|
buffer.push({ event, args });
|
|
556
554
|
}
|
|
557
555
|
}
|
|
558
|
-
function setDevtoolsHook(hook, target) {
|
|
556
|
+
function setDevtoolsHook$1(hook, target) {
|
|
559
557
|
var _a, _b;
|
|
560
|
-
devtools = hook;
|
|
561
|
-
if (devtools) {
|
|
562
|
-
devtools.enabled = true;
|
|
563
|
-
buffer.forEach(({ event, args }) => devtools.emit(event, ...args));
|
|
558
|
+
devtools$1 = hook;
|
|
559
|
+
if (devtools$1) {
|
|
560
|
+
devtools$1.enabled = true;
|
|
561
|
+
buffer.forEach(({ event, args }) => devtools$1.emit(event, ...args));
|
|
564
562
|
buffer = [];
|
|
565
563
|
} else if (
|
|
566
564
|
// handle late devtools injection - only do this if we are in an actual
|
|
@@ -572,10 +570,10 @@ function setDevtoolsHook(hook, target) {
|
|
|
572
570
|
) {
|
|
573
571
|
const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
|
|
574
572
|
replay.push((newHook) => {
|
|
575
|
-
setDevtoolsHook(newHook, target);
|
|
573
|
+
setDevtoolsHook$1(newHook, target);
|
|
576
574
|
});
|
|
577
575
|
setTimeout(() => {
|
|
578
|
-
if (!devtools) {
|
|
576
|
+
if (!devtools$1) {
|
|
579
577
|
target.__VUE_DEVTOOLS_HOOK_REPLAY__ = null;
|
|
580
578
|
devtoolsNotInstalled = true;
|
|
581
579
|
buffer = [];
|
|
@@ -605,8 +603,8 @@ const _devtoolsComponentRemoved = /* @__PURE__ */ createDevtoolsComponentHook(
|
|
|
605
603
|
"component:removed" /* COMPONENT_REMOVED */
|
|
606
604
|
);
|
|
607
605
|
const devtoolsComponentRemoved = (component) => {
|
|
608
|
-
if (devtools && typeof devtools.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
609
|
-
!devtools.cleanupBuffer(component)) {
|
|
606
|
+
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && // remove the component if it wasn't buffered
|
|
607
|
+
!devtools$1.cleanupBuffer(component)) {
|
|
610
608
|
_devtoolsComponentRemoved(component);
|
|
611
609
|
}
|
|
612
610
|
};
|
|
@@ -654,7 +652,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
654
652
|
if (emitsOptions) {
|
|
655
653
|
if (!(event in emitsOptions) && true) {
|
|
656
654
|
if (!propsOptions || !(toHandlerKey(event) in propsOptions)) {
|
|
657
|
-
warn(
|
|
655
|
+
warn$1(
|
|
658
656
|
`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey(event)}" prop.`
|
|
659
657
|
);
|
|
660
658
|
}
|
|
@@ -663,7 +661,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
663
661
|
if (isFunction(validator)) {
|
|
664
662
|
const isValid = validator(...rawArgs);
|
|
665
663
|
if (!isValid) {
|
|
666
|
-
warn(
|
|
664
|
+
warn$1(
|
|
667
665
|
`Invalid event arguments: event validation failed for event "${event}".`
|
|
668
666
|
);
|
|
669
667
|
}
|
|
@@ -690,7 +688,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
690
688
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
691
689
|
const lowerCaseEvent = event.toLowerCase();
|
|
692
690
|
if (lowerCaseEvent !== event && props[toHandlerKey(lowerCaseEvent)]) {
|
|
693
|
-
warn(
|
|
691
|
+
warn$1(
|
|
694
692
|
`Event "${lowerCaseEvent}" is emitted in component ${formatComponentName(
|
|
695
693
|
instance,
|
|
696
694
|
instance.type
|
|
@@ -858,7 +856,7 @@ function renderComponentRoot(instance) {
|
|
|
858
856
|
const proxyToUse = withProxy || proxy;
|
|
859
857
|
const thisProxy = !!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup ? new Proxy(proxyToUse, {
|
|
860
858
|
get(target, key, receiver) {
|
|
861
|
-
warn(
|
|
859
|
+
warn$1(
|
|
862
860
|
`Property '${String(
|
|
863
861
|
key
|
|
864
862
|
)}' was accessed via 'this'. Avoid using 'this' in templates.`
|
|
@@ -939,12 +937,12 @@ function renderComponentRoot(instance) {
|
|
|
939
937
|
}
|
|
940
938
|
}
|
|
941
939
|
if (extraAttrs.length) {
|
|
942
|
-
warn(
|
|
940
|
+
warn$1(
|
|
943
941
|
`Extraneous non-props attributes (${extraAttrs.join(", ")}) were passed to component but could not be automatically inherited because component renders fragment or text root nodes.`
|
|
944
942
|
);
|
|
945
943
|
}
|
|
946
944
|
if (eventAttrs.length) {
|
|
947
|
-
warn(
|
|
945
|
+
warn$1(
|
|
948
946
|
`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.`
|
|
949
947
|
);
|
|
950
948
|
}
|
|
@@ -953,7 +951,7 @@ function renderComponentRoot(instance) {
|
|
|
953
951
|
}
|
|
954
952
|
if (vnode.dirs) {
|
|
955
953
|
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
956
|
-
warn(
|
|
954
|
+
warn$1(
|
|
957
955
|
`Runtime directive used on component with non-element root node. The directives will not function as intended.`
|
|
958
956
|
);
|
|
959
957
|
}
|
|
@@ -962,7 +960,7 @@ function renderComponentRoot(instance) {
|
|
|
962
960
|
}
|
|
963
961
|
if (vnode.transition) {
|
|
964
962
|
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(root)) {
|
|
965
|
-
warn(
|
|
963
|
+
warn$1(
|
|
966
964
|
`Component inside <Transition> renders non-element root node that cannot be animated.`
|
|
967
965
|
);
|
|
968
966
|
}
|
|
@@ -1155,11 +1153,11 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
1155
1153
|
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
1156
1154
|
const extra = type === COMPONENTS ? `
|
|
1157
1155
|
If this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement.` : ``;
|
|
1158
|
-
warn(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
1156
|
+
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
1159
1157
|
}
|
|
1160
1158
|
return res;
|
|
1161
1159
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
1162
|
-
warn(
|
|
1160
|
+
warn$1(
|
|
1163
1161
|
`resolve${capitalize(type.slice(0, -1))} can only be used in render() or setup().`
|
|
1164
1162
|
);
|
|
1165
1163
|
}
|
|
@@ -1715,7 +1713,7 @@ function normalizeSuspenseSlot(s) {
|
|
|
1715
1713
|
if (isArray(s)) {
|
|
1716
1714
|
const singleChild = filterSingleRoot(s);
|
|
1717
1715
|
if (!!(process.env.NODE_ENV !== "production") && !singleChild && s.filter((child) => child !== NULL_DYNAMIC_COMPONENT).length > 0) {
|
|
1718
|
-
warn(`<Suspense> slots expect a single root node.`);
|
|
1716
|
+
warn$1(`<Suspense> slots expect a single root node.`);
|
|
1719
1717
|
}
|
|
1720
1718
|
s = singleChild;
|
|
1721
1719
|
}
|
|
@@ -1770,7 +1768,7 @@ function watchSyncEffect(effect, options) {
|
|
|
1770
1768
|
const INITIAL_WATCHER_VALUE = {};
|
|
1771
1769
|
function watch(source, cb, options) {
|
|
1772
1770
|
if (!!(process.env.NODE_ENV !== "production") && !isFunction(cb)) {
|
|
1773
|
-
warn(
|
|
1771
|
+
warn$1(
|
|
1774
1772
|
`\`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.`
|
|
1775
1773
|
);
|
|
1776
1774
|
}
|
|
@@ -1787,23 +1785,23 @@ function doWatch(source, cb, { immediate, deep, flush, once, onTrack, onTrigger
|
|
|
1787
1785
|
}
|
|
1788
1786
|
if (!!(process.env.NODE_ENV !== "production") && !cb) {
|
|
1789
1787
|
if (immediate !== void 0) {
|
|
1790
|
-
warn(
|
|
1788
|
+
warn$1(
|
|
1791
1789
|
`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1792
1790
|
);
|
|
1793
1791
|
}
|
|
1794
1792
|
if (deep !== void 0) {
|
|
1795
|
-
warn(
|
|
1793
|
+
warn$1(
|
|
1796
1794
|
`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1797
1795
|
);
|
|
1798
1796
|
}
|
|
1799
1797
|
if (once !== void 0) {
|
|
1800
|
-
warn(
|
|
1798
|
+
warn$1(
|
|
1801
1799
|
`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
|
|
1802
1800
|
);
|
|
1803
1801
|
}
|
|
1804
1802
|
}
|
|
1805
1803
|
const warnInvalidSource = (s) => {
|
|
1806
|
-
warn(
|
|
1804
|
+
warn$1(
|
|
1807
1805
|
`Invalid watch source: `,
|
|
1808
1806
|
s,
|
|
1809
1807
|
`A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`
|
|
@@ -2009,13 +2007,13 @@ function traverse(value, seen) {
|
|
|
2009
2007
|
|
|
2010
2008
|
function validateDirectiveName(name) {
|
|
2011
2009
|
if (isBuiltInDirective(name)) {
|
|
2012
|
-
warn("Do not use built-in directive ids as custom directive id: " + name);
|
|
2010
|
+
warn$1("Do not use built-in directive ids as custom directive id: " + name);
|
|
2013
2011
|
}
|
|
2014
2012
|
}
|
|
2015
2013
|
function withDirectives(vnode, directives) {
|
|
2016
2014
|
const internalInstance = currentRenderingInstance;
|
|
2017
2015
|
if (internalInstance === null) {
|
|
2018
|
-
!!(process.env.NODE_ENV !== "production") && warn(`withDirectives can only be used inside render functions.`);
|
|
2016
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`withDirectives can only be used inside render functions.`);
|
|
2019
2017
|
return vnode;
|
|
2020
2018
|
}
|
|
2021
2019
|
const instance = getExposeProxy(internalInstance) || internalInstance.proxy;
|
|
@@ -2122,7 +2120,7 @@ const BaseTransitionImpl = {
|
|
|
2122
2120
|
for (const c of children) {
|
|
2123
2121
|
if (c.type !== Comment) {
|
|
2124
2122
|
if (!!(process.env.NODE_ENV !== "production") && hasFound) {
|
|
2125
|
-
warn(
|
|
2123
|
+
warn$1(
|
|
2126
2124
|
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
2127
2125
|
);
|
|
2128
2126
|
break;
|
|
@@ -2137,7 +2135,7 @@ const BaseTransitionImpl = {
|
|
|
2137
2135
|
const rawProps = toRaw(props);
|
|
2138
2136
|
const { mode } = rawProps;
|
|
2139
2137
|
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
2140
|
-
warn(`invalid <transition> mode: ${mode}`);
|
|
2138
|
+
warn$1(`invalid <transition> mode: ${mode}`);
|
|
2141
2139
|
}
|
|
2142
2140
|
if (state.isLeaving) {
|
|
2143
2141
|
return emptyPlaceholder(child);
|
|
@@ -2452,7 +2450,7 @@ function defineAsyncComponent(source) {
|
|
|
2452
2450
|
return pendingRequest;
|
|
2453
2451
|
}
|
|
2454
2452
|
if (!!(process.env.NODE_ENV !== "production") && !comp) {
|
|
2455
|
-
warn(
|
|
2453
|
+
warn$1(
|
|
2456
2454
|
`Async component loader resolved to undefined. If you are using retry(), make sure to return its return value.`
|
|
2457
2455
|
);
|
|
2458
2456
|
}
|
|
@@ -2692,7 +2690,7 @@ const KeepAliveImpl = {
|
|
|
2692
2690
|
const rawVNode = children[0];
|
|
2693
2691
|
if (children.length > 1) {
|
|
2694
2692
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2695
|
-
warn(`KeepAlive should contain exactly one component child.`);
|
|
2693
|
+
warn$1(`KeepAlive should contain exactly one component child.`);
|
|
2696
2694
|
}
|
|
2697
2695
|
current = null;
|
|
2698
2696
|
return children;
|
|
@@ -2821,7 +2819,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2821
2819
|
return wrappedHook;
|
|
2822
2820
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
2823
2821
|
const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
|
|
2824
|
-
warn(
|
|
2822
|
+
warn$1(
|
|
2825
2823
|
`${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.` )
|
|
2826
2824
|
);
|
|
2827
2825
|
}
|
|
@@ -2857,7 +2855,7 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2857
2855
|
}
|
|
2858
2856
|
} else if (typeof source === "number") {
|
|
2859
2857
|
if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
|
|
2860
|
-
warn(`The v-for range expect an integer value but got ${source}.`);
|
|
2858
|
+
warn$1(`The v-for range expect an integer value but got ${source}.`);
|
|
2861
2859
|
}
|
|
2862
2860
|
ret = new Array(source);
|
|
2863
2861
|
for (let i = 0; i < source; i++) {
|
|
@@ -2913,7 +2911,7 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
2913
2911
|
}
|
|
2914
2912
|
let slot = slots[name];
|
|
2915
2913
|
if (!!(process.env.NODE_ENV !== "production") && slot && slot.length > 1) {
|
|
2916
|
-
warn(
|
|
2914
|
+
warn$1(
|
|
2917
2915
|
`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.`
|
|
2918
2916
|
);
|
|
2919
2917
|
slot = () => [];
|
|
@@ -2956,7 +2954,7 @@ function ensureValidVNode(vnodes) {
|
|
|
2956
2954
|
function toHandlers(obj, preserveCaseIfNecessary) {
|
|
2957
2955
|
const ret = {};
|
|
2958
2956
|
if (!!(process.env.NODE_ENV !== "production") && !isObject(obj)) {
|
|
2959
|
-
warn(`v-on with no argument expects an object value.`);
|
|
2957
|
+
warn$1(`v-on with no argument expects an object value.`);
|
|
2960
2958
|
return ret;
|
|
2961
2959
|
}
|
|
2962
2960
|
for (const key in obj) {
|
|
@@ -3066,13 +3064,13 @@ const PublicInstanceProxyHandlers = {
|
|
|
3066
3064
|
// to infinite warning loop
|
|
3067
3065
|
key.indexOf("__v") !== 0)) {
|
|
3068
3066
|
if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
|
|
3069
|
-
warn(
|
|
3067
|
+
warn$1(
|
|
3070
3068
|
`Property ${JSON.stringify(
|
|
3071
3069
|
key
|
|
3072
3070
|
)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`
|
|
3073
3071
|
);
|
|
3074
3072
|
} else if (instance === currentRenderingInstance) {
|
|
3075
|
-
warn(
|
|
3073
|
+
warn$1(
|
|
3076
3074
|
`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`
|
|
3077
3075
|
);
|
|
3078
3076
|
}
|
|
@@ -3084,17 +3082,17 @@ const PublicInstanceProxyHandlers = {
|
|
|
3084
3082
|
setupState[key] = value;
|
|
3085
3083
|
return true;
|
|
3086
3084
|
} else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
|
|
3087
|
-
warn(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
3085
|
+
warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
|
|
3088
3086
|
return false;
|
|
3089
3087
|
} else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
|
|
3090
3088
|
data[key] = value;
|
|
3091
3089
|
return true;
|
|
3092
3090
|
} else if (hasOwn(instance.props, key)) {
|
|
3093
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
3091
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
|
|
3094
3092
|
return false;
|
|
3095
3093
|
}
|
|
3096
3094
|
if (key[0] === "$" && key.slice(1) in instance) {
|
|
3097
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
3095
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
3098
3096
|
`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`
|
|
3099
3097
|
);
|
|
3100
3098
|
return false;
|
|
@@ -3128,7 +3126,7 @@ const PublicInstanceProxyHandlers = {
|
|
|
3128
3126
|
};
|
|
3129
3127
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
3130
3128
|
PublicInstanceProxyHandlers.ownKeys = (target) => {
|
|
3131
|
-
warn(
|
|
3129
|
+
warn$1(
|
|
3132
3130
|
`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`
|
|
3133
3131
|
);
|
|
3134
3132
|
return Reflect.ownKeys(target);
|
|
@@ -3147,7 +3145,7 @@ const RuntimeCompiledPublicInstanceProxyHandlers = /* @__PURE__ */ extend(
|
|
|
3147
3145
|
has(_, key) {
|
|
3148
3146
|
const has = key[0] !== "_" && !isGloballyAllowed(key);
|
|
3149
3147
|
if (!!(process.env.NODE_ENV !== "production") && !has && PublicInstanceProxyHandlers.has(_, key)) {
|
|
3150
|
-
warn(
|
|
3148
|
+
warn$1(
|
|
3151
3149
|
`Property ${JSON.stringify(
|
|
3152
3150
|
key
|
|
3153
3151
|
)} should not start with _ which is a reserved prefix for Vue internals.`
|
|
@@ -3197,7 +3195,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3197
3195
|
Object.keys(toRaw(setupState)).forEach((key) => {
|
|
3198
3196
|
if (!setupState.__isScriptSetup) {
|
|
3199
3197
|
if (isReservedPrefix(key[0])) {
|
|
3200
|
-
warn(
|
|
3198
|
+
warn$1(
|
|
3201
3199
|
`setup() return property ${JSON.stringify(
|
|
3202
3200
|
key
|
|
3203
3201
|
)} should not start with "$" or "_" which are reserved prefixes for Vue internals.`
|
|
@@ -3214,7 +3212,7 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
3214
3212
|
});
|
|
3215
3213
|
}
|
|
3216
3214
|
|
|
3217
|
-
const warnRuntimeUsage = (method) => warn(
|
|
3215
|
+
const warnRuntimeUsage = (method) => warn$1(
|
|
3218
3216
|
`${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.`
|
|
3219
3217
|
);
|
|
3220
3218
|
function defineProps() {
|
|
@@ -3265,11 +3263,11 @@ function useAttrs() {
|
|
|
3265
3263
|
function useModel(props, name) {
|
|
3266
3264
|
const i = getCurrentInstance();
|
|
3267
3265
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
3268
|
-
warn(`useModel() called without active instance.`);
|
|
3266
|
+
warn$1(`useModel() called without active instance.`);
|
|
3269
3267
|
return ref();
|
|
3270
3268
|
}
|
|
3271
3269
|
if (!!(process.env.NODE_ENV !== "production") && !i.propsOptions[0][name]) {
|
|
3272
|
-
warn(`useModel() called with prop "${name}" which is not declared.`);
|
|
3270
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
3273
3271
|
return ref();
|
|
3274
3272
|
}
|
|
3275
3273
|
return customRef((track, trigger) => {
|
|
@@ -3300,7 +3298,7 @@ function useModel(props, name) {
|
|
|
3300
3298
|
function getContext() {
|
|
3301
3299
|
const i = getCurrentInstance();
|
|
3302
3300
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
3303
|
-
warn(`useContext() called without active instance.`);
|
|
3301
|
+
warn$1(`useContext() called without active instance.`);
|
|
3304
3302
|
}
|
|
3305
3303
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
3306
3304
|
}
|
|
@@ -3325,7 +3323,7 @@ function mergeDefaults(raw, defaults) {
|
|
|
3325
3323
|
} else if (opt === null) {
|
|
3326
3324
|
opt = props[key] = { default: defaults[key] };
|
|
3327
3325
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3328
|
-
warn(`props default key "${key}" has no corresponding declaration.`);
|
|
3326
|
+
warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
3329
3327
|
}
|
|
3330
3328
|
if (opt && defaults[`__skip_${key}`]) {
|
|
3331
3329
|
opt.skipFactory = true;
|
|
@@ -3355,7 +3353,7 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
3355
3353
|
function withAsyncContext(getAwaitable) {
|
|
3356
3354
|
const ctx = getCurrentInstance();
|
|
3357
3355
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) {
|
|
3358
|
-
warn(
|
|
3356
|
+
warn$1(
|
|
3359
3357
|
`withAsyncContext called without active current instance. This is likely a bug.`
|
|
3360
3358
|
);
|
|
3361
3359
|
}
|
|
@@ -3374,7 +3372,7 @@ function createDuplicateChecker() {
|
|
|
3374
3372
|
const cache = /* @__PURE__ */ Object.create(null);
|
|
3375
3373
|
return (type, key) => {
|
|
3376
3374
|
if (cache[key]) {
|
|
3377
|
-
warn(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
3375
|
+
warn$1(`${type} property "${key}" is already defined in ${cache[key]}.`);
|
|
3378
3376
|
} else {
|
|
3379
3377
|
cache[key] = type;
|
|
3380
3378
|
}
|
|
@@ -3452,7 +3450,7 @@ function applyOptions(instance) {
|
|
|
3452
3450
|
checkDuplicateProperties("Methods" /* METHODS */, key);
|
|
3453
3451
|
}
|
|
3454
3452
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3455
|
-
warn(
|
|
3453
|
+
warn$1(
|
|
3456
3454
|
`Method "${key}" has type "${typeof methodHandler}" in the component definition. Did you reference the function correctly?`
|
|
3457
3455
|
);
|
|
3458
3456
|
}
|
|
@@ -3460,18 +3458,18 @@ function applyOptions(instance) {
|
|
|
3460
3458
|
}
|
|
3461
3459
|
if (dataOptions) {
|
|
3462
3460
|
if (!!(process.env.NODE_ENV !== "production") && !isFunction(dataOptions)) {
|
|
3463
|
-
warn(
|
|
3461
|
+
warn$1(
|
|
3464
3462
|
`The data option must be a function. Plain object usage is no longer supported.`
|
|
3465
3463
|
);
|
|
3466
3464
|
}
|
|
3467
3465
|
const data = dataOptions.call(publicThis, publicThis);
|
|
3468
3466
|
if (!!(process.env.NODE_ENV !== "production") && isPromise(data)) {
|
|
3469
|
-
warn(
|
|
3467
|
+
warn$1(
|
|
3470
3468
|
`data() returned a Promise - note data() cannot be async; If you intend to perform data fetching before component renders, use async setup() + <Suspense>.`
|
|
3471
3469
|
);
|
|
3472
3470
|
}
|
|
3473
3471
|
if (!isObject(data)) {
|
|
3474
|
-
!!(process.env.NODE_ENV !== "production") && warn(`data() should return an object.`);
|
|
3472
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`data() should return an object.`);
|
|
3475
3473
|
} else {
|
|
3476
3474
|
instance.data = reactive(data);
|
|
3477
3475
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -3495,10 +3493,10 @@ function applyOptions(instance) {
|
|
|
3495
3493
|
const opt = computedOptions[key];
|
|
3496
3494
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
3497
3495
|
if (!!(process.env.NODE_ENV !== "production") && get === NOOP) {
|
|
3498
|
-
warn(`Computed property "${key}" has no getter.`);
|
|
3496
|
+
warn$1(`Computed property "${key}" has no getter.`);
|
|
3499
3497
|
}
|
|
3500
3498
|
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
3501
|
-
warn(
|
|
3499
|
+
warn$1(
|
|
3502
3500
|
`Write operation failed: computed property "${key}" is readonly.`
|
|
3503
3501
|
);
|
|
3504
3502
|
} : NOOP;
|
|
@@ -3624,7 +3622,7 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3624
3622
|
if (isFunction(handler)) {
|
|
3625
3623
|
watch(getter, handler);
|
|
3626
3624
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3627
|
-
warn(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3625
|
+
warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3628
3626
|
}
|
|
3629
3627
|
} else if (isFunction(raw)) {
|
|
3630
3628
|
watch(getter, raw.bind(publicThis));
|
|
@@ -3636,11 +3634,11 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3636
3634
|
if (isFunction(handler)) {
|
|
3637
3635
|
watch(getter, handler, raw);
|
|
3638
3636
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3639
|
-
warn(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3637
|
+
warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3640
3638
|
}
|
|
3641
3639
|
}
|
|
3642
3640
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3643
|
-
warn(`Invalid watch option: "${key}"`, raw);
|
|
3641
|
+
warn$1(`Invalid watch option: "${key}"`, raw);
|
|
3644
3642
|
}
|
|
3645
3643
|
}
|
|
3646
3644
|
function resolveMergedOptions(instance) {
|
|
@@ -3685,7 +3683,7 @@ function mergeOptions(to, from, strats, asMixin = false) {
|
|
|
3685
3683
|
}
|
|
3686
3684
|
for (const key in from) {
|
|
3687
3685
|
if (asMixin && key === "expose") {
|
|
3688
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
3686
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
3689
3687
|
`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`
|
|
3690
3688
|
);
|
|
3691
3689
|
} else {
|
|
@@ -3813,7 +3811,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3813
3811
|
rootComponent = extend({}, rootComponent);
|
|
3814
3812
|
}
|
|
3815
3813
|
if (rootProps != null && !isObject(rootProps)) {
|
|
3816
|
-
!!(process.env.NODE_ENV !== "production") && warn(`root props passed to app.mount() must be an object.`);
|
|
3814
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`root props passed to app.mount() must be an object.`);
|
|
3817
3815
|
rootProps = null;
|
|
3818
3816
|
}
|
|
3819
3817
|
const context = createAppContext();
|
|
@@ -3832,14 +3830,14 @@ function createAppAPI(render, hydrate) {
|
|
|
3832
3830
|
},
|
|
3833
3831
|
set config(v) {
|
|
3834
3832
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3835
|
-
warn(
|
|
3833
|
+
warn$1(
|
|
3836
3834
|
`app.config cannot be replaced. Modify individual options instead.`
|
|
3837
3835
|
);
|
|
3838
3836
|
}
|
|
3839
3837
|
},
|
|
3840
3838
|
use(plugin, ...options) {
|
|
3841
3839
|
if (installedPlugins.has(plugin)) {
|
|
3842
|
-
!!(process.env.NODE_ENV !== "production") && warn(`Plugin has already been applied to target app.`);
|
|
3840
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(`Plugin has already been applied to target app.`);
|
|
3843
3841
|
} else if (plugin && isFunction(plugin.install)) {
|
|
3844
3842
|
installedPlugins.add(plugin);
|
|
3845
3843
|
plugin.install(app, ...options);
|
|
@@ -3847,7 +3845,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3847
3845
|
installedPlugins.add(plugin);
|
|
3848
3846
|
plugin(app, ...options);
|
|
3849
3847
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3850
|
-
warn(
|
|
3848
|
+
warn$1(
|
|
3851
3849
|
`A plugin must either be a function or an object with an "install" function.`
|
|
3852
3850
|
);
|
|
3853
3851
|
}
|
|
@@ -3858,12 +3856,12 @@ function createAppAPI(render, hydrate) {
|
|
|
3858
3856
|
if (!context.mixins.includes(mixin)) {
|
|
3859
3857
|
context.mixins.push(mixin);
|
|
3860
3858
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3861
|
-
warn(
|
|
3859
|
+
warn$1(
|
|
3862
3860
|
"Mixin has already been applied to target app" + (mixin.name ? `: ${mixin.name}` : "")
|
|
3863
3861
|
);
|
|
3864
3862
|
}
|
|
3865
3863
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3866
|
-
warn("Mixins are only available in builds supporting Options API");
|
|
3864
|
+
warn$1("Mixins are only available in builds supporting Options API");
|
|
3867
3865
|
}
|
|
3868
3866
|
return app;
|
|
3869
3867
|
},
|
|
@@ -3875,7 +3873,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3875
3873
|
return context.components[name];
|
|
3876
3874
|
}
|
|
3877
3875
|
if (!!(process.env.NODE_ENV !== "production") && context.components[name]) {
|
|
3878
|
-
warn(`Component "${name}" has already been registered in target app.`);
|
|
3876
|
+
warn$1(`Component "${name}" has already been registered in target app.`);
|
|
3879
3877
|
}
|
|
3880
3878
|
context.components[name] = component;
|
|
3881
3879
|
return app;
|
|
@@ -3888,7 +3886,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3888
3886
|
return context.directives[name];
|
|
3889
3887
|
}
|
|
3890
3888
|
if (!!(process.env.NODE_ENV !== "production") && context.directives[name]) {
|
|
3891
|
-
warn(`Directive "${name}" has already been registered in target app.`);
|
|
3889
|
+
warn$1(`Directive "${name}" has already been registered in target app.`);
|
|
3892
3890
|
}
|
|
3893
3891
|
context.directives[name] = directive;
|
|
3894
3892
|
return app;
|
|
@@ -3896,7 +3894,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3896
3894
|
mount(rootContainer, isHydrate, namespace) {
|
|
3897
3895
|
if (!isMounted) {
|
|
3898
3896
|
if (!!(process.env.NODE_ENV !== "production") && rootContainer.__vue_app__) {
|
|
3899
|
-
warn(
|
|
3897
|
+
warn$1(
|
|
3900
3898
|
`There is already an app instance mounted on the host container.
|
|
3901
3899
|
If you want to mount another app on the same host container, you need to unmount the previous app by calling \`app.unmount()\` first.`
|
|
3902
3900
|
);
|
|
@@ -3931,7 +3929,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3931
3929
|
}
|
|
3932
3930
|
return getExposeProxy(vnode.component) || vnode.component.proxy;
|
|
3933
3931
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3934
|
-
warn(
|
|
3932
|
+
warn$1(
|
|
3935
3933
|
`App has already been mounted.
|
|
3936
3934
|
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)\``
|
|
3937
3935
|
);
|
|
@@ -3946,12 +3944,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
3946
3944
|
}
|
|
3947
3945
|
delete app._container.__vue_app__;
|
|
3948
3946
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3949
|
-
warn(`Cannot unmount an app that is not mounted.`);
|
|
3947
|
+
warn$1(`Cannot unmount an app that is not mounted.`);
|
|
3950
3948
|
}
|
|
3951
3949
|
},
|
|
3952
3950
|
provide(key, value) {
|
|
3953
3951
|
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
3954
|
-
warn(
|
|
3952
|
+
warn$1(
|
|
3955
3953
|
`App already provides property with key "${String(key)}". It will be overwritten with the new value.`
|
|
3956
3954
|
);
|
|
3957
3955
|
}
|
|
@@ -3975,7 +3973,7 @@ let currentApp = null;
|
|
|
3975
3973
|
function provide(key, value) {
|
|
3976
3974
|
if (!currentInstance) {
|
|
3977
3975
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3978
|
-
warn(`provide() can only be used inside setup().`);
|
|
3976
|
+
warn$1(`provide() can only be used inside setup().`);
|
|
3979
3977
|
}
|
|
3980
3978
|
} else {
|
|
3981
3979
|
let provides = currentInstance.provides;
|
|
@@ -3995,10 +3993,10 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3995
3993
|
} else if (arguments.length > 1) {
|
|
3996
3994
|
return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
|
|
3997
3995
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
3998
|
-
warn(`injection "${String(key)}" not found.`);
|
|
3996
|
+
warn$1(`injection "${String(key)}" not found.`);
|
|
3999
3997
|
}
|
|
4000
3998
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4001
|
-
warn(`inject() can only be used inside setup() or functional components.`);
|
|
3999
|
+
warn$1(`inject() can only be used inside setup() or functional components.`);
|
|
4002
4000
|
}
|
|
4003
4001
|
}
|
|
4004
4002
|
function hasInjectionContext() {
|
|
@@ -4242,7 +4240,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
4242
4240
|
if (isArray(raw)) {
|
|
4243
4241
|
for (let i = 0; i < raw.length; i++) {
|
|
4244
4242
|
if (!!(process.env.NODE_ENV !== "production") && !isString(raw[i])) {
|
|
4245
|
-
warn(`props must be strings when using array syntax.`, raw[i]);
|
|
4243
|
+
warn$1(`props must be strings when using array syntax.`, raw[i]);
|
|
4246
4244
|
}
|
|
4247
4245
|
const normalizedKey = camelize(raw[i]);
|
|
4248
4246
|
if (validatePropName(normalizedKey)) {
|
|
@@ -4251,7 +4249,7 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
|
|
|
4251
4249
|
}
|
|
4252
4250
|
} else if (raw) {
|
|
4253
4251
|
if (!!(process.env.NODE_ENV !== "production") && !isObject(raw)) {
|
|
4254
|
-
warn(`invalid props options`, raw);
|
|
4252
|
+
warn$1(`invalid props options`, raw);
|
|
4255
4253
|
}
|
|
4256
4254
|
for (const key in raw) {
|
|
4257
4255
|
const normalizedKey = camelize(key);
|
|
@@ -4280,7 +4278,7 @@ function validatePropName(key) {
|
|
|
4280
4278
|
if (key[0] !== "$") {
|
|
4281
4279
|
return true;
|
|
4282
4280
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4283
|
-
warn(`Invalid prop name: "${key}" is a reserved property.`);
|
|
4281
|
+
warn$1(`Invalid prop name: "${key}" is a reserved property.`);
|
|
4284
4282
|
}
|
|
4285
4283
|
return false;
|
|
4286
4284
|
}
|
|
@@ -4318,7 +4316,7 @@ function validateProps(rawProps, props, instance) {
|
|
|
4318
4316
|
function validateProp(name, value, prop, props, isAbsent) {
|
|
4319
4317
|
const { type, required, validator, skipCheck } = prop;
|
|
4320
4318
|
if (required && isAbsent) {
|
|
4321
|
-
warn('Missing required prop: "' + name + '"');
|
|
4319
|
+
warn$1('Missing required prop: "' + name + '"');
|
|
4322
4320
|
return;
|
|
4323
4321
|
}
|
|
4324
4322
|
if (value == null && !required) {
|
|
@@ -4334,12 +4332,12 @@ function validateProp(name, value, prop, props, isAbsent) {
|
|
|
4334
4332
|
isValid = valid;
|
|
4335
4333
|
}
|
|
4336
4334
|
if (!isValid) {
|
|
4337
|
-
warn(getInvalidTypeMessage(name, value, expectedTypes));
|
|
4335
|
+
warn$1(getInvalidTypeMessage(name, value, expectedTypes));
|
|
4338
4336
|
return;
|
|
4339
4337
|
}
|
|
4340
4338
|
}
|
|
4341
4339
|
if (validator && !validator(value, props)) {
|
|
4342
|
-
warn('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
4340
|
+
warn$1('Invalid prop: custom validator check failed for prop "' + name + '".');
|
|
4343
4341
|
}
|
|
4344
4342
|
}
|
|
4345
4343
|
const isSimpleType = /* @__PURE__ */ makeMap(
|
|
@@ -4411,7 +4409,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
|
|
|
4411
4409
|
}
|
|
4412
4410
|
const normalized = withCtx((...args) => {
|
|
4413
4411
|
if (!!(process.env.NODE_ENV !== "production") && currentInstance) {
|
|
4414
|
-
warn(
|
|
4412
|
+
warn$1(
|
|
4415
4413
|
`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.`
|
|
4416
4414
|
);
|
|
4417
4415
|
}
|
|
@@ -4430,7 +4428,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
4430
4428
|
slots[key] = normalizeSlot(key, value, ctx);
|
|
4431
4429
|
} else if (value != null) {
|
|
4432
4430
|
if (!!(process.env.NODE_ENV !== "production") && true) {
|
|
4433
|
-
warn(
|
|
4431
|
+
warn$1(
|
|
4434
4432
|
`Non-function value encountered for slot "${key}". Prefer function slots for better performance.`
|
|
4435
4433
|
);
|
|
4436
4434
|
}
|
|
@@ -4441,7 +4439,7 @@ const normalizeObjectSlots = (rawSlots, slots, instance) => {
|
|
|
4441
4439
|
};
|
|
4442
4440
|
const normalizeVNodeSlots = (instance, children) => {
|
|
4443
4441
|
if (!!(process.env.NODE_ENV !== "production") && !isKeepAlive(instance.vnode) && true) {
|
|
4444
|
-
warn(
|
|
4442
|
+
warn$1(
|
|
4445
4443
|
`Non-function value encountered for default slot. Prefer function slots for better performance.`
|
|
4446
4444
|
);
|
|
4447
4445
|
}
|
|
@@ -4523,7 +4521,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4523
4521
|
const value = isUnmount ? null : refValue;
|
|
4524
4522
|
const { i: owner, r: ref } = rawRef;
|
|
4525
4523
|
if (!!(process.env.NODE_ENV !== "production") && !owner) {
|
|
4526
|
-
warn(
|
|
4524
|
+
warn$1(
|
|
4527
4525
|
`Missing ref owner context. ref cannot be used on hoisted vnodes. A vnode with ref must be created inside the render function.`
|
|
4528
4526
|
);
|
|
4529
4527
|
return;
|
|
@@ -4578,7 +4576,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4578
4576
|
if (rawRef.k)
|
|
4579
4577
|
refs[rawRef.k] = value;
|
|
4580
4578
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4581
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4579
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4582
4580
|
}
|
|
4583
4581
|
};
|
|
4584
4582
|
if (value) {
|
|
@@ -4588,7 +4586,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4588
4586
|
doSet();
|
|
4589
4587
|
}
|
|
4590
4588
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
4591
|
-
warn("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4589
|
+
warn$1("Invalid template ref type:", ref, `(${typeof ref})`);
|
|
4592
4590
|
}
|
|
4593
4591
|
}
|
|
4594
4592
|
}
|
|
@@ -4620,7 +4618,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4620
4618
|
} = rendererInternals;
|
|
4621
4619
|
const hydrate = (vnode, container) => {
|
|
4622
4620
|
if (!container.hasChildNodes()) {
|
|
4623
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4621
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4624
4622
|
`Attempting to hydrate existing markup but container is empty. Performing full mount instead.`
|
|
4625
4623
|
);
|
|
4626
4624
|
patch(null, vnode, container);
|
|
@@ -4680,7 +4678,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4680
4678
|
} else {
|
|
4681
4679
|
if (node.data !== vnode.children) {
|
|
4682
4680
|
hasMismatch = true;
|
|
4683
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4681
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4684
4682
|
`Hydration text mismatch in`,
|
|
4685
4683
|
node.parentNode,
|
|
4686
4684
|
`
|
|
@@ -4815,7 +4813,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4815
4813
|
hydrateNode
|
|
4816
4814
|
);
|
|
4817
4815
|
} else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) {
|
|
4818
|
-
warn("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4816
|
+
warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
4819
4817
|
}
|
|
4820
4818
|
}
|
|
4821
4819
|
if (ref != null) {
|
|
@@ -4856,7 +4854,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4856
4854
|
while (next) {
|
|
4857
4855
|
hasMismatch = true;
|
|
4858
4856
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4859
|
-
warn(
|
|
4857
|
+
warn$1(
|
|
4860
4858
|
`Hydration children mismatch on`,
|
|
4861
4859
|
el,
|
|
4862
4860
|
`
|
|
@@ -4871,7 +4869,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4871
4869
|
} else if (shapeFlag & 8) {
|
|
4872
4870
|
if (el.textContent !== vnode.children) {
|
|
4873
4871
|
hasMismatch = true;
|
|
4874
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4872
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
4875
4873
|
`Hydration text content mismatch on`,
|
|
4876
4874
|
el,
|
|
4877
4875
|
`
|
|
@@ -4950,7 +4948,7 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4950
4948
|
} else {
|
|
4951
4949
|
hasMismatch = true;
|
|
4952
4950
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !hasWarned) {
|
|
4953
|
-
warn(
|
|
4951
|
+
warn$1(
|
|
4954
4952
|
`Hydration children mismatch on`,
|
|
4955
4953
|
container,
|
|
4956
4954
|
`
|
|
@@ -4997,7 +4995,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4997
4995
|
};
|
|
4998
4996
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4999
4997
|
hasMismatch = true;
|
|
5000
|
-
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn(
|
|
4998
|
+
(!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
|
|
5001
4999
|
`Hydration node mismatch:
|
|
5002
5000
|
- rendered on server:`,
|
|
5003
5001
|
node,
|
|
@@ -5075,9 +5073,9 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
5075
5073
|
let actual;
|
|
5076
5074
|
let expected;
|
|
5077
5075
|
if (key === "class") {
|
|
5078
|
-
actual = el.getAttribute("class");
|
|
5079
|
-
expected = normalizeClass(clientValue);
|
|
5080
|
-
if (actual
|
|
5076
|
+
actual = toClassSet(el.getAttribute("class") || "");
|
|
5077
|
+
expected = toClassSet(normalizeClass(clientValue));
|
|
5078
|
+
if (!isSetEqual(actual, expected)) {
|
|
5081
5079
|
mismatchType = mismatchKey = `class`;
|
|
5082
5080
|
}
|
|
5083
5081
|
} else if (key === "style") {
|
|
@@ -5096,7 +5094,7 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
5096
5094
|
}
|
|
5097
5095
|
if (mismatchType) {
|
|
5098
5096
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
5099
|
-
warn(
|
|
5097
|
+
warn$1(
|
|
5100
5098
|
`Hydration ${mismatchType} mismatch on`,
|
|
5101
5099
|
el,
|
|
5102
5100
|
`
|
|
@@ -5109,6 +5107,20 @@ function propHasMismatch(el, key, clientValue) {
|
|
|
5109
5107
|
}
|
|
5110
5108
|
return false;
|
|
5111
5109
|
}
|
|
5110
|
+
function toClassSet(str) {
|
|
5111
|
+
return new Set(str.trim().split(/\s+/));
|
|
5112
|
+
}
|
|
5113
|
+
function isSetEqual(a, b) {
|
|
5114
|
+
if (a.size !== b.size) {
|
|
5115
|
+
return false;
|
|
5116
|
+
}
|
|
5117
|
+
for (const s of a) {
|
|
5118
|
+
if (!b.has(s)) {
|
|
5119
|
+
return false;
|
|
5120
|
+
}
|
|
5121
|
+
}
|
|
5122
|
+
return true;
|
|
5123
|
+
}
|
|
5112
5124
|
|
|
5113
5125
|
let supported;
|
|
5114
5126
|
let perf;
|
|
@@ -5188,7 +5200,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5188
5200
|
const target = getGlobalThis();
|
|
5189
5201
|
target.__VUE__ = true;
|
|
5190
5202
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
5191
|
-
setDevtoolsHook(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5203
|
+
setDevtoolsHook$1(target.__VUE_DEVTOOLS_GLOBAL_HOOK__, target);
|
|
5192
5204
|
}
|
|
5193
5205
|
const {
|
|
5194
5206
|
insert: hostInsert,
|
|
@@ -5297,7 +5309,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5297
5309
|
internals
|
|
5298
5310
|
);
|
|
5299
5311
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
5300
|
-
warn("Invalid VNode type:", type, `(${typeof type})`);
|
|
5312
|
+
warn$1("Invalid VNode type:", type, `(${typeof type})`);
|
|
5301
5313
|
}
|
|
5302
5314
|
}
|
|
5303
5315
|
if (ref != null && parentComponent) {
|
|
@@ -6277,7 +6289,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6277
6289
|
const nextChild = c2[i] = optimized ? cloneIfMounted(c2[i]) : normalizeVNode(c2[i]);
|
|
6278
6290
|
if (nextChild.key != null) {
|
|
6279
6291
|
if (!!(process.env.NODE_ENV !== "production") && keyToNewIndexMap.has(nextChild.key)) {
|
|
6280
|
-
warn(
|
|
6292
|
+
warn$1(
|
|
6281
6293
|
`Duplicate keys found during update:`,
|
|
6282
6294
|
JSON.stringify(nextChild.key),
|
|
6283
6295
|
`Make sure keys are unique.`
|
|
@@ -6706,14 +6718,14 @@ const resolveTarget = (props, select) => {
|
|
|
6706
6718
|
const targetSelector = props && props.to;
|
|
6707
6719
|
if (isString(targetSelector)) {
|
|
6708
6720
|
if (!select) {
|
|
6709
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6721
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
6710
6722
|
`Current renderer does not support string target for Teleports. (missing querySelector renderer option)`
|
|
6711
6723
|
);
|
|
6712
6724
|
return null;
|
|
6713
6725
|
} else {
|
|
6714
6726
|
const target = select(targetSelector);
|
|
6715
6727
|
if (!target) {
|
|
6716
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
6728
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
6717
6729
|
`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.`
|
|
6718
6730
|
);
|
|
6719
6731
|
}
|
|
@@ -6721,7 +6733,7 @@ const resolveTarget = (props, select) => {
|
|
|
6721
6733
|
}
|
|
6722
6734
|
} else {
|
|
6723
6735
|
if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) {
|
|
6724
|
-
warn(`Invalid Teleport target: ${targetSelector}`);
|
|
6736
|
+
warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
6725
6737
|
}
|
|
6726
6738
|
return targetSelector;
|
|
6727
6739
|
}
|
|
@@ -6757,7 +6769,7 @@ const TeleportImpl = {
|
|
|
6757
6769
|
namespace = "mathml";
|
|
6758
6770
|
}
|
|
6759
6771
|
} else if (!!(process.env.NODE_ENV !== "production") && !disabled) {
|
|
6760
|
-
warn("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
6772
|
+
warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
6761
6773
|
}
|
|
6762
6774
|
const mount = (container2, anchor2) => {
|
|
6763
6775
|
if (shapeFlag & 16) {
|
|
@@ -6844,7 +6856,7 @@ const TeleportImpl = {
|
|
|
6844
6856
|
0
|
|
6845
6857
|
);
|
|
6846
6858
|
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
6847
|
-
warn(
|
|
6859
|
+
warn$1(
|
|
6848
6860
|
"Invalid Teleport target on update:",
|
|
6849
6861
|
target,
|
|
6850
6862
|
`(${typeof target})`
|
|
@@ -7094,7 +7106,7 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
7094
7106
|
vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
7095
7107
|
}
|
|
7096
7108
|
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) {
|
|
7097
|
-
warn(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7109
|
+
warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
7098
7110
|
}
|
|
7099
7111
|
if (isBlockTreeEnabled > 0 && // avoid a block node from tracking itself
|
|
7100
7112
|
!isBlockNode && // has current parent block
|
|
@@ -7113,7 +7125,7 @@ const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithA
|
|
|
7113
7125
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
7114
7126
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
7115
7127
|
if (!!(process.env.NODE_ENV !== "production") && !type) {
|
|
7116
|
-
warn(`Invalid vnode type when creating vnode: ${type}.`);
|
|
7128
|
+
warn$1(`Invalid vnode type when creating vnode: ${type}.`);
|
|
7117
7129
|
}
|
|
7118
7130
|
type = Comment;
|
|
7119
7131
|
}
|
|
@@ -7156,7 +7168,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
7156
7168
|
const shapeFlag = isString(type) ? 1 : isSuspense(type) ? 128 : isTeleport(type) ? 64 : isObject(type) ? 4 : isFunction(type) ? 2 : 0;
|
|
7157
7169
|
if (!!(process.env.NODE_ENV !== "production") && shapeFlag & 4 && isProxy(type)) {
|
|
7158
7170
|
type = toRaw(type);
|
|
7159
|
-
warn(
|
|
7171
|
+
warn$1(
|
|
7160
7172
|
`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\`.`,
|
|
7161
7173
|
`
|
|
7162
7174
|
Component that was made reactive: `,
|
|
@@ -7471,7 +7483,7 @@ const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
|
7471
7483
|
function validateComponentName(name, config) {
|
|
7472
7484
|
const appIsNativeTag = config.isNativeTag || NO;
|
|
7473
7485
|
if (isBuiltInTag(name) || appIsNativeTag(name)) {
|
|
7474
|
-
warn(
|
|
7486
|
+
warn$1(
|
|
7475
7487
|
"Do not use built-in or reserved HTML elements as component id: " + name
|
|
7476
7488
|
);
|
|
7477
7489
|
}
|
|
@@ -7510,7 +7522,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7510
7522
|
}
|
|
7511
7523
|
}
|
|
7512
7524
|
if (Component.compilerOptions && isRuntimeOnly()) {
|
|
7513
|
-
warn(
|
|
7525
|
+
warn$1(
|
|
7514
7526
|
`"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.`
|
|
7515
7527
|
);
|
|
7516
7528
|
}
|
|
@@ -7545,7 +7557,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7545
7557
|
instance.asyncDep = setupResult;
|
|
7546
7558
|
if (!!(process.env.NODE_ENV !== "production") && !instance.suspense) {
|
|
7547
7559
|
const name = (_a = Component.name) != null ? _a : "Anonymous";
|
|
7548
|
-
warn(
|
|
7560
|
+
warn$1(
|
|
7549
7561
|
`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.`
|
|
7550
7562
|
);
|
|
7551
7563
|
}
|
|
@@ -7566,7 +7578,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
7566
7578
|
}
|
|
7567
7579
|
} else if (isObject(setupResult)) {
|
|
7568
7580
|
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) {
|
|
7569
|
-
warn(
|
|
7581
|
+
warn$1(
|
|
7570
7582
|
`setup() should not return VNodes directly - return a render function instead.`
|
|
7571
7583
|
);
|
|
7572
7584
|
}
|
|
@@ -7578,7 +7590,7 @@ function handleSetupResult(instance, setupResult, isSSR) {
|
|
|
7578
7590
|
exposeSetupStateOnRenderContext(instance);
|
|
7579
7591
|
}
|
|
7580
7592
|
} else if (!!(process.env.NODE_ENV !== "production") && setupResult !== void 0) {
|
|
7581
|
-
warn(
|
|
7593
|
+
warn$1(
|
|
7582
7594
|
`setup() should return an object. Received: ${setupResult === null ? "null" : typeof setupResult}`
|
|
7583
7595
|
);
|
|
7584
7596
|
}
|
|
@@ -7639,12 +7651,12 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7639
7651
|
}
|
|
7640
7652
|
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
7641
7653
|
if (!compile && Component.template) {
|
|
7642
|
-
warn(
|
|
7654
|
+
warn$1(
|
|
7643
7655
|
`Component provided template option but runtime compilation is not supported in this build of Vue.` + (` Configure your bundler to alias "vue" to "vue/dist/vue.esm-bundler.js".` )
|
|
7644
7656
|
/* should not happen */
|
|
7645
7657
|
);
|
|
7646
7658
|
} else {
|
|
7647
|
-
warn(`Component is missing template or render function.`);
|
|
7659
|
+
warn$1(`Component is missing template or render function.`);
|
|
7648
7660
|
}
|
|
7649
7661
|
}
|
|
7650
7662
|
}
|
|
@@ -7658,11 +7670,11 @@ function getAttrsProxy(instance) {
|
|
|
7658
7670
|
return target[key];
|
|
7659
7671
|
},
|
|
7660
7672
|
set() {
|
|
7661
|
-
warn(`setupContext.attrs is readonly.`);
|
|
7673
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7662
7674
|
return false;
|
|
7663
7675
|
},
|
|
7664
7676
|
deleteProperty() {
|
|
7665
|
-
warn(`setupContext.attrs is readonly.`);
|
|
7677
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7666
7678
|
return false;
|
|
7667
7679
|
}
|
|
7668
7680
|
} : {
|
|
@@ -7685,7 +7697,7 @@ function createSetupContext(instance) {
|
|
|
7685
7697
|
const expose = (exposed) => {
|
|
7686
7698
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7687
7699
|
if (instance.exposed) {
|
|
7688
|
-
warn(`expose() should be called only once per setup().`);
|
|
7700
|
+
warn$1(`expose() should be called only once per setup().`);
|
|
7689
7701
|
}
|
|
7690
7702
|
if (exposed != null) {
|
|
7691
7703
|
let exposedType = typeof exposed;
|
|
@@ -7697,7 +7709,7 @@ function createSetupContext(instance) {
|
|
|
7697
7709
|
}
|
|
7698
7710
|
}
|
|
7699
7711
|
if (exposedType !== "object") {
|
|
7700
|
-
warn(
|
|
7712
|
+
warn$1(
|
|
7701
7713
|
`expose() should be passed a plain object, received ${exposedType}.`
|
|
7702
7714
|
);
|
|
7703
7715
|
}
|
|
@@ -7806,7 +7818,7 @@ const useSSRContext = () => {
|
|
|
7806
7818
|
{
|
|
7807
7819
|
const ctx = inject(ssrContextKey);
|
|
7808
7820
|
if (!ctx) {
|
|
7809
|
-
!!(process.env.NODE_ENV !== "production") && warn(
|
|
7821
|
+
!!(process.env.NODE_ENV !== "production") && warn$1(
|
|
7810
7822
|
`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
|
|
7811
7823
|
);
|
|
7812
7824
|
}
|
|
@@ -8019,8 +8031,11 @@ function isMemoSame(cached, memo) {
|
|
|
8019
8031
|
return true;
|
|
8020
8032
|
}
|
|
8021
8033
|
|
|
8022
|
-
const version = "3.4.0-
|
|
8034
|
+
const version = "3.4.0-rc.2";
|
|
8035
|
+
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8023
8036
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8037
|
+
const devtools = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? devtools$1 : void 0;
|
|
8038
|
+
const setDevtoolsHook = !!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__ ? setDevtoolsHook$1 : NOOP;
|
|
8024
8039
|
const _ssrUtils = {
|
|
8025
8040
|
createComponentInstance,
|
|
8026
8041
|
setupComponent,
|