@vue/runtime-core 3.4.20 → 3.4.22
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 +50 -39
- package/dist/runtime-core.cjs.prod.js +30 -31
- package/dist/runtime-core.d.ts +7 -4
- package/dist/runtime-core.esm-bundler.js +59 -50
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -28,7 +28,10 @@ function warn$1(msg, ...args) {
|
|
|
28
28
|
instance,
|
|
29
29
|
11,
|
|
30
30
|
[
|
|
31
|
-
msg + args.
|
|
31
|
+
msg + args.map((a) => {
|
|
32
|
+
var _a, _b;
|
|
33
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
34
|
+
}).join(""),
|
|
32
35
|
instance && instance.proxy,
|
|
33
36
|
trace.map(
|
|
34
37
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -204,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
204
207
|
}
|
|
205
208
|
return res;
|
|
206
209
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
if (shared.isArray(fn)) {
|
|
211
|
+
const values = [];
|
|
212
|
+
for (let i = 0; i < fn.length; i++) {
|
|
213
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
214
|
+
}
|
|
215
|
+
return values;
|
|
216
|
+
} else {
|
|
217
|
+
warn$1(
|
|
218
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
219
|
+
);
|
|
210
220
|
}
|
|
211
|
-
return values;
|
|
212
221
|
}
|
|
213
222
|
function handleError(err, instance, type, throwInDev = true) {
|
|
214
223
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -229,12 +238,14 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
229
238
|
}
|
|
230
239
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
231
240
|
if (appErrorHandler) {
|
|
241
|
+
reactivity.pauseTracking();
|
|
232
242
|
callWithErrorHandling(
|
|
233
243
|
appErrorHandler,
|
|
234
244
|
null,
|
|
235
245
|
10,
|
|
236
246
|
[err, exposedInstance, errorInfo]
|
|
237
247
|
);
|
|
248
|
+
reactivity.resetTracking();
|
|
238
249
|
return;
|
|
239
250
|
}
|
|
240
251
|
}
|
|
@@ -610,6 +621,8 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
610
621
|
_devtoolsComponentRemoved(component);
|
|
611
622
|
}
|
|
612
623
|
};
|
|
624
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
625
|
+
// @__NO_SIDE_EFFECTS__
|
|
613
626
|
function createDevtoolsComponentHook(hook) {
|
|
614
627
|
return (component) => {
|
|
615
628
|
emit$1(
|
|
@@ -1195,7 +1208,7 @@ const SuspenseImpl = {
|
|
|
1195
1208
|
rendererInternals
|
|
1196
1209
|
);
|
|
1197
1210
|
} else {
|
|
1198
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
1211
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
1199
1212
|
n2.suspense = n1.suspense;
|
|
1200
1213
|
n2.suspense.vnode = n2;
|
|
1201
1214
|
n2.el = n1.el;
|
|
@@ -2713,7 +2726,7 @@ const KeepAliveImpl = {
|
|
|
2713
2726
|
return () => {
|
|
2714
2727
|
pendingCacheKey = null;
|
|
2715
2728
|
if (!slots.default) {
|
|
2716
|
-
return null;
|
|
2729
|
+
return current = null;
|
|
2717
2730
|
}
|
|
2718
2731
|
const children = slots.default();
|
|
2719
2732
|
const rawVNode = children[0];
|
|
@@ -3026,6 +3039,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
|
3026
3039
|
const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
|
|
3027
3040
|
const PublicInstanceProxyHandlers = {
|
|
3028
3041
|
get({ _: instance }, key) {
|
|
3042
|
+
if (key === "__v_skip") {
|
|
3043
|
+
return true;
|
|
3044
|
+
}
|
|
3029
3045
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
3030
3046
|
if (key === "__isVue") {
|
|
3031
3047
|
return true;
|
|
@@ -3993,10 +4009,10 @@ function hasInjectionContext() {
|
|
|
3993
4009
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
3994
4010
|
}
|
|
3995
4011
|
|
|
4012
|
+
const attrsProto = {};
|
|
3996
4013
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
3997
4014
|
const props = {};
|
|
3998
|
-
const attrs =
|
|
3999
|
-
shared.def(attrs, InternalObjectKey, 1);
|
|
4015
|
+
const attrs = Object.create(attrsProto);
|
|
4000
4016
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
4001
4017
|
setFullProps(instance, rawProps, props, attrs);
|
|
4002
4018
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -4111,7 +4127,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4111
4127
|
}
|
|
4112
4128
|
}
|
|
4113
4129
|
if (hasAttrsChanged) {
|
|
4114
|
-
reactivity.trigger(instance, "set", "
|
|
4130
|
+
reactivity.trigger(instance.attrs, "set", "");
|
|
4115
4131
|
}
|
|
4116
4132
|
{
|
|
4117
4133
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -4447,7 +4463,7 @@ const initSlots = (instance, children) => {
|
|
|
4447
4463
|
const type = children._;
|
|
4448
4464
|
if (type) {
|
|
4449
4465
|
instance.slots = reactivity.toRaw(children);
|
|
4450
|
-
shared.def(
|
|
4466
|
+
shared.def(instance.slots, "_", type);
|
|
4451
4467
|
} else {
|
|
4452
4468
|
normalizeObjectSlots(
|
|
4453
4469
|
children,
|
|
@@ -4459,7 +4475,6 @@ const initSlots = (instance, children) => {
|
|
|
4459
4475
|
normalizeVNodeSlots(instance, children);
|
|
4460
4476
|
}
|
|
4461
4477
|
}
|
|
4462
|
-
shared.def(instance.slots, InternalObjectKey, 1);
|
|
4463
4478
|
};
|
|
4464
4479
|
const updateSlots = (instance, children, optimized) => {
|
|
4465
4480
|
const { vnode, slots } = instance;
|
|
@@ -4631,6 +4646,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4631
4646
|
}
|
|
4632
4647
|
};
|
|
4633
4648
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4649
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
4634
4650
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
4635
4651
|
const onMismatch = () => handleMismatch(
|
|
4636
4652
|
node,
|
|
@@ -7065,7 +7081,6 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
7065
7081
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
7066
7082
|
);
|
|
7067
7083
|
};
|
|
7068
|
-
const InternalObjectKey = `__vInternal`;
|
|
7069
7084
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
7070
7085
|
const normalizeRef = ({
|
|
7071
7086
|
ref,
|
|
@@ -7198,7 +7213,7 @@ Component that was made reactive: `,
|
|
|
7198
7213
|
function guardReactiveProps(props) {
|
|
7199
7214
|
if (!props)
|
|
7200
7215
|
return null;
|
|
7201
|
-
return reactivity.isProxy(props) ||
|
|
7216
|
+
return reactivity.isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? shared.extend({}, props) : props;
|
|
7202
7217
|
}
|
|
7203
7218
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
7204
7219
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -7303,7 +7318,7 @@ function normalizeChildren(vnode, children) {
|
|
|
7303
7318
|
} else {
|
|
7304
7319
|
type = 32;
|
|
7305
7320
|
const slotFlag = children._;
|
|
7306
|
-
if (!slotFlag
|
|
7321
|
+
if (!slotFlag) {
|
|
7307
7322
|
children._ctx = currentRenderingInstance;
|
|
7308
7323
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
7309
7324
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -7539,7 +7554,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7539
7554
|
}
|
|
7540
7555
|
}
|
|
7541
7556
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
7542
|
-
instance.proxy =
|
|
7557
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
7543
7558
|
{
|
|
7544
7559
|
exposePropsOnRenderContext(instance);
|
|
7545
7560
|
}
|
|
@@ -7673,26 +7688,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7673
7688
|
}
|
|
7674
7689
|
}
|
|
7675
7690
|
}
|
|
7676
|
-
|
|
7677
|
-
|
|
7678
|
-
|
|
7679
|
-
|
|
7680
|
-
|
|
7681
|
-
|
|
7682
|
-
|
|
7683
|
-
|
|
7684
|
-
|
|
7685
|
-
|
|
7686
|
-
|
|
7687
|
-
|
|
7688
|
-
|
|
7689
|
-
|
|
7690
|
-
|
|
7691
|
-
return false;
|
|
7692
|
-
}
|
|
7693
|
-
}
|
|
7694
|
-
));
|
|
7695
|
-
}
|
|
7691
|
+
const attrsProxyHandlers = {
|
|
7692
|
+
get(target, key) {
|
|
7693
|
+
markAttrsAccessed();
|
|
7694
|
+
reactivity.track(target, "get", "");
|
|
7695
|
+
return target[key];
|
|
7696
|
+
},
|
|
7697
|
+
set() {
|
|
7698
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7699
|
+
return false;
|
|
7700
|
+
},
|
|
7701
|
+
deleteProperty() {
|
|
7702
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7703
|
+
return false;
|
|
7704
|
+
}
|
|
7705
|
+
} ;
|
|
7696
7706
|
function getSlotsProxy(instance) {
|
|
7697
7707
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
7698
7708
|
get(target, key) {
|
|
@@ -7726,9 +7736,10 @@ function createSetupContext(instance) {
|
|
|
7726
7736
|
instance.exposed = exposed || {};
|
|
7727
7737
|
};
|
|
7728
7738
|
{
|
|
7739
|
+
let attrsProxy;
|
|
7729
7740
|
return Object.freeze({
|
|
7730
7741
|
get attrs() {
|
|
7731
|
-
return
|
|
7742
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
7732
7743
|
},
|
|
7733
7744
|
get slots() {
|
|
7734
7745
|
return getSlotsProxy(instance);
|
|
@@ -8073,7 +8084,7 @@ function isMemoSame(cached, memo) {
|
|
|
8073
8084
|
return true;
|
|
8074
8085
|
}
|
|
8075
8086
|
|
|
8076
|
-
const version = "3.4.
|
|
8087
|
+
const version = "3.4.22";
|
|
8077
8088
|
const warn = warn$1 ;
|
|
8078
8089
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8079
8090
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -94,11 +94,13 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
94
94
|
}
|
|
95
95
|
return res;
|
|
96
96
|
}
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
if (shared.isArray(fn)) {
|
|
98
|
+
const values = [];
|
|
99
|
+
for (let i = 0; i < fn.length; i++) {
|
|
100
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
101
|
+
}
|
|
102
|
+
return values;
|
|
100
103
|
}
|
|
101
|
-
return values;
|
|
102
104
|
}
|
|
103
105
|
function handleError(err, instance, type, throwInDev = true) {
|
|
104
106
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -119,12 +121,14 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
119
121
|
}
|
|
120
122
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
121
123
|
if (appErrorHandler) {
|
|
124
|
+
reactivity.pauseTracking();
|
|
122
125
|
callWithErrorHandling(
|
|
123
126
|
appErrorHandler,
|
|
124
127
|
null,
|
|
125
128
|
10,
|
|
126
129
|
[err, exposedInstance, errorInfo]
|
|
127
130
|
);
|
|
131
|
+
reactivity.resetTracking();
|
|
128
132
|
return;
|
|
129
133
|
}
|
|
130
134
|
}
|
|
@@ -689,7 +693,7 @@ const SuspenseImpl = {
|
|
|
689
693
|
rendererInternals
|
|
690
694
|
);
|
|
691
695
|
} else {
|
|
692
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
696
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
693
697
|
n2.suspense = n1.suspense;
|
|
694
698
|
n2.suspense.vnode = n2;
|
|
695
699
|
n2.el = n1.el;
|
|
@@ -2097,7 +2101,7 @@ const KeepAliveImpl = {
|
|
|
2097
2101
|
return () => {
|
|
2098
2102
|
pendingCacheKey = null;
|
|
2099
2103
|
if (!slots.default) {
|
|
2100
|
-
return null;
|
|
2104
|
+
return current = null;
|
|
2101
2105
|
}
|
|
2102
2106
|
const children = slots.default();
|
|
2103
2107
|
const rawVNode = children[0];
|
|
@@ -2388,6 +2392,9 @@ const publicPropertiesMap = (
|
|
|
2388
2392
|
const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
|
|
2389
2393
|
const PublicInstanceProxyHandlers = {
|
|
2390
2394
|
get({ _: instance }, key) {
|
|
2395
|
+
if (key === "__v_skip") {
|
|
2396
|
+
return true;
|
|
2397
|
+
}
|
|
2391
2398
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
2392
2399
|
let normalizedProps;
|
|
2393
2400
|
if (key[0] !== "$") {
|
|
@@ -3068,10 +3075,10 @@ function hasInjectionContext() {
|
|
|
3068
3075
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
3069
3076
|
}
|
|
3070
3077
|
|
|
3078
|
+
const attrsProto = {};
|
|
3071
3079
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
3072
3080
|
const props = {};
|
|
3073
|
-
const attrs =
|
|
3074
|
-
shared.def(attrs, InternalObjectKey, 1);
|
|
3081
|
+
const attrs = Object.create(attrsProto);
|
|
3075
3082
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
3076
3083
|
setFullProps(instance, rawProps, props, attrs);
|
|
3077
3084
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -3176,7 +3183,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3176
3183
|
}
|
|
3177
3184
|
}
|
|
3178
3185
|
if (hasAttrsChanged) {
|
|
3179
|
-
reactivity.trigger(instance, "set", "
|
|
3186
|
+
reactivity.trigger(instance.attrs, "set", "");
|
|
3180
3187
|
}
|
|
3181
3188
|
}
|
|
3182
3189
|
function setFullProps(instance, rawProps, props, attrs) {
|
|
@@ -3384,7 +3391,7 @@ const initSlots = (instance, children) => {
|
|
|
3384
3391
|
const type = children._;
|
|
3385
3392
|
if (type) {
|
|
3386
3393
|
instance.slots = reactivity.toRaw(children);
|
|
3387
|
-
shared.def(
|
|
3394
|
+
shared.def(instance.slots, "_", type);
|
|
3388
3395
|
} else {
|
|
3389
3396
|
normalizeObjectSlots(
|
|
3390
3397
|
children,
|
|
@@ -3396,7 +3403,6 @@ const initSlots = (instance, children) => {
|
|
|
3396
3403
|
normalizeVNodeSlots(instance, children);
|
|
3397
3404
|
}
|
|
3398
3405
|
}
|
|
3399
|
-
shared.def(instance.slots, InternalObjectKey, 1);
|
|
3400
3406
|
};
|
|
3401
3407
|
const updateSlots = (instance, children, optimized) => {
|
|
3402
3408
|
const { vnode, slots } = instance;
|
|
@@ -3552,6 +3558,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3552
3558
|
}
|
|
3553
3559
|
};
|
|
3554
3560
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
3561
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
3555
3562
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
3556
3563
|
const onMismatch = () => handleMismatch(
|
|
3557
3564
|
node,
|
|
@@ -5609,7 +5616,6 @@ function isSameVNodeType(n1, n2) {
|
|
|
5609
5616
|
}
|
|
5610
5617
|
function transformVNodeArgs(transformer) {
|
|
5611
5618
|
}
|
|
5612
|
-
const InternalObjectKey = `__vInternal`;
|
|
5613
5619
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
5614
5620
|
const normalizeRef = ({
|
|
5615
5621
|
ref,
|
|
@@ -5727,7 +5733,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
5727
5733
|
function guardReactiveProps(props) {
|
|
5728
5734
|
if (!props)
|
|
5729
5735
|
return null;
|
|
5730
|
-
return reactivity.isProxy(props) ||
|
|
5736
|
+
return reactivity.isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? shared.extend({}, props) : props;
|
|
5731
5737
|
}
|
|
5732
5738
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
5733
5739
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -5825,7 +5831,7 @@ function normalizeChildren(vnode, children) {
|
|
|
5825
5831
|
} else {
|
|
5826
5832
|
type = 32;
|
|
5827
5833
|
const slotFlag = children._;
|
|
5828
|
-
if (!slotFlag
|
|
5834
|
+
if (!slotFlag) {
|
|
5829
5835
|
children._ctx = currentRenderingInstance;
|
|
5830
5836
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
5831
5837
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -6030,7 +6036,7 @@ function setupComponent(instance, isSSR = false) {
|
|
|
6030
6036
|
function setupStatefulComponent(instance, isSSR) {
|
|
6031
6037
|
const Component = instance.type;
|
|
6032
6038
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
6033
|
-
instance.proxy =
|
|
6039
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
6034
6040
|
const { setup } = Component;
|
|
6035
6041
|
if (setup) {
|
|
6036
6042
|
const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
|
|
@@ -6125,26 +6131,19 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
6125
6131
|
}
|
|
6126
6132
|
}
|
|
6127
6133
|
}
|
|
6128
|
-
|
|
6129
|
-
|
|
6130
|
-
|
|
6131
|
-
|
|
6132
|
-
|
|
6133
|
-
|
|
6134
|
-
return target[key];
|
|
6135
|
-
}
|
|
6136
|
-
}
|
|
6137
|
-
));
|
|
6138
|
-
}
|
|
6134
|
+
const attrsProxyHandlers = {
|
|
6135
|
+
get(target, key) {
|
|
6136
|
+
reactivity.track(target, "get", "");
|
|
6137
|
+
return target[key];
|
|
6138
|
+
}
|
|
6139
|
+
};
|
|
6139
6140
|
function createSetupContext(instance) {
|
|
6140
6141
|
const expose = (exposed) => {
|
|
6141
6142
|
instance.exposed = exposed || {};
|
|
6142
6143
|
};
|
|
6143
6144
|
{
|
|
6144
6145
|
return {
|
|
6145
|
-
|
|
6146
|
-
return getAttrsProxy(instance);
|
|
6147
|
-
},
|
|
6146
|
+
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
6148
6147
|
slots: instance.slots,
|
|
6149
6148
|
emit: instance.emit,
|
|
6150
6149
|
expose
|
|
@@ -6276,7 +6275,7 @@ function isMemoSame(cached, memo) {
|
|
|
6276
6275
|
return true;
|
|
6277
6276
|
}
|
|
6278
6277
|
|
|
6279
|
-
const version = "3.4.
|
|
6278
|
+
const version = "3.4.22";
|
|
6280
6279
|
const warn$1 = shared.NOOP;
|
|
6281
6280
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6282
6281
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -846,7 +846,7 @@ declare const TeleportImpl: {
|
|
|
846
846
|
};
|
|
847
847
|
declare enum TeleportMoveTypes {
|
|
848
848
|
TARGET_CHANGE = 0,
|
|
849
|
-
TOGGLE = 1
|
|
849
|
+
TOGGLE = 1,// enable / disable
|
|
850
850
|
REORDER = 2
|
|
851
851
|
}
|
|
852
852
|
declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;
|
|
@@ -1301,7 +1301,7 @@ type DefineModelOptions<T = any> = {
|
|
|
1301
1301
|
* Otherwise the prop name will default to "modelValue". In both cases, you
|
|
1302
1302
|
* can also pass an additional object which will be used as the prop's options.
|
|
1303
1303
|
*
|
|
1304
|
-
* The
|
|
1304
|
+
* The returned ref behaves differently depending on whether the parent
|
|
1305
1305
|
* provided the corresponding v-model props or not:
|
|
1306
1306
|
* - If yes, the returned ref's value will always be in sync with the parent
|
|
1307
1307
|
* prop.
|
|
@@ -1339,12 +1339,15 @@ export declare function defineModel<T, M extends string | number | symbol = stri
|
|
|
1339
1339
|
} & PropOptions<T> & DefineModelOptions<T>): ModelRef<T, M>;
|
|
1340
1340
|
export declare function defineModel<T, M extends string | number | symbol = string>(name: string, options?: PropOptions<T> & DefineModelOptions<T>): ModelRef<T | undefined, M>;
|
|
1341
1341
|
type NotUndefined<T> = T extends undefined ? never : T;
|
|
1342
|
+
type MappedOmit<T, K extends keyof any> = {
|
|
1343
|
+
[P in keyof T as P extends K ? never : P]: T[P];
|
|
1344
|
+
};
|
|
1342
1345
|
type InferDefaults<T> = {
|
|
1343
1346
|
[K in keyof T]?: InferDefault<T, T[K]>;
|
|
1344
1347
|
};
|
|
1345
1348
|
type NativeType = null | number | string | boolean | symbol | Function;
|
|
1346
1349
|
type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
|
|
1347
|
-
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<
|
|
1350
|
+
type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<MappedOmit<T, keyof Defaults>> & {
|
|
1348
1351
|
readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
|
|
1349
1352
|
} & {
|
|
1350
1353
|
readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
|
|
@@ -1439,7 +1442,7 @@ export declare enum ErrorCodes {
|
|
|
1439
1442
|
}
|
|
1440
1443
|
type ErrorTypes = LifecycleHooks | ErrorCodes;
|
|
1441
1444
|
export declare function callWithErrorHandling(fn: Function, instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
1442
|
-
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any
|
|
1445
|
+
export declare function callWithAsyncErrorHandling(fn: Function | Function[], instance: ComponentInternalInstance | null, type: ErrorTypes, args?: unknown[]): any;
|
|
1443
1446
|
export declare function handleError(err: unknown, instance: ComponentInternalInstance | null, type: ErrorTypes, throwInDev?: boolean): void;
|
|
1444
1447
|
|
|
1445
1448
|
export declare function initCustomFormatter(): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.4.
|
|
2
|
+
* @vue/runtime-core v3.4.22
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { pauseTracking, resetTracking, isRef, toRaw, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadonly, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
|
-
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO,
|
|
8
|
+
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, isReservedProp, EMPTY_ARR, toRawType, makeMap, def, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
10
10
|
|
|
11
11
|
const stack = [];
|
|
@@ -26,7 +26,10 @@ function warn$1(msg, ...args) {
|
|
|
26
26
|
instance,
|
|
27
27
|
11,
|
|
28
28
|
[
|
|
29
|
-
msg + args.
|
|
29
|
+
msg + args.map((a) => {
|
|
30
|
+
var _a, _b;
|
|
31
|
+
return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
|
|
32
|
+
}).join(""),
|
|
30
33
|
instance && instance.proxy,
|
|
31
34
|
trace.map(
|
|
32
35
|
({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`
|
|
@@ -204,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
|
|
|
204
207
|
}
|
|
205
208
|
return res;
|
|
206
209
|
}
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
+
if (isArray(fn)) {
|
|
211
|
+
const values = [];
|
|
212
|
+
for (let i = 0; i < fn.length; i++) {
|
|
213
|
+
values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
|
|
214
|
+
}
|
|
215
|
+
return values;
|
|
216
|
+
} else if (!!(process.env.NODE_ENV !== "production")) {
|
|
217
|
+
warn$1(
|
|
218
|
+
`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`
|
|
219
|
+
);
|
|
210
220
|
}
|
|
211
|
-
return values;
|
|
212
221
|
}
|
|
213
222
|
function handleError(err, instance, type, throwInDev = true) {
|
|
214
223
|
const contextVNode = instance ? instance.vnode : null;
|
|
@@ -229,12 +238,14 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
229
238
|
}
|
|
230
239
|
const appErrorHandler = instance.appContext.config.errorHandler;
|
|
231
240
|
if (appErrorHandler) {
|
|
241
|
+
pauseTracking();
|
|
232
242
|
callWithErrorHandling(
|
|
233
243
|
appErrorHandler,
|
|
234
244
|
null,
|
|
235
245
|
10,
|
|
236
246
|
[err, exposedInstance, errorInfo]
|
|
237
247
|
);
|
|
248
|
+
resetTracking();
|
|
238
249
|
return;
|
|
239
250
|
}
|
|
240
251
|
}
|
|
@@ -612,6 +623,8 @@ const devtoolsComponentRemoved = (component) => {
|
|
|
612
623
|
_devtoolsComponentRemoved(component);
|
|
613
624
|
}
|
|
614
625
|
};
|
|
626
|
+
/*! #__NO_SIDE_EFFECTS__ */
|
|
627
|
+
// @__NO_SIDE_EFFECTS__
|
|
615
628
|
function createDevtoolsComponentHook(hook) {
|
|
616
629
|
return (component) => {
|
|
617
630
|
emit$1(
|
|
@@ -1197,7 +1210,7 @@ const SuspenseImpl = {
|
|
|
1197
1210
|
rendererInternals
|
|
1198
1211
|
);
|
|
1199
1212
|
} else {
|
|
1200
|
-
if (parentSuspense && parentSuspense.deps > 0) {
|
|
1213
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
1201
1214
|
n2.suspense = n1.suspense;
|
|
1202
1215
|
n2.suspense.vnode = n2;
|
|
1203
1216
|
n2.el = n1.el;
|
|
@@ -2717,7 +2730,7 @@ const KeepAliveImpl = {
|
|
|
2717
2730
|
return () => {
|
|
2718
2731
|
pendingCacheKey = null;
|
|
2719
2732
|
if (!slots.default) {
|
|
2720
|
-
return null;
|
|
2733
|
+
return current = null;
|
|
2721
2734
|
}
|
|
2722
2735
|
const children = slots.default();
|
|
2723
2736
|
const rawVNode = children[0];
|
|
@@ -3030,6 +3043,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
|
|
|
3030
3043
|
const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
|
|
3031
3044
|
const PublicInstanceProxyHandlers = {
|
|
3032
3045
|
get({ _: instance }, key) {
|
|
3046
|
+
if (key === "__v_skip") {
|
|
3047
|
+
return true;
|
|
3048
|
+
}
|
|
3033
3049
|
const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
|
|
3034
3050
|
if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
|
|
3035
3051
|
return true;
|
|
@@ -4001,10 +4017,10 @@ function hasInjectionContext() {
|
|
|
4001
4017
|
return !!(currentInstance || currentRenderingInstance || currentApp);
|
|
4002
4018
|
}
|
|
4003
4019
|
|
|
4020
|
+
const attrsProto = {};
|
|
4004
4021
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
4005
4022
|
const props = {};
|
|
4006
|
-
const attrs =
|
|
4007
|
-
def(attrs, InternalObjectKey, 1);
|
|
4023
|
+
const attrs = Object.create(attrsProto);
|
|
4008
4024
|
instance.propsDefaults = /* @__PURE__ */ Object.create(null);
|
|
4009
4025
|
setFullProps(instance, rawProps, props, attrs);
|
|
4010
4026
|
for (const key in instance.propsOptions[0]) {
|
|
@@ -4119,7 +4135,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
4119
4135
|
}
|
|
4120
4136
|
}
|
|
4121
4137
|
if (hasAttrsChanged) {
|
|
4122
|
-
trigger(instance, "set", "
|
|
4138
|
+
trigger(instance.attrs, "set", "");
|
|
4123
4139
|
}
|
|
4124
4140
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
4125
4141
|
validateProps(rawProps || {}, props, instance);
|
|
@@ -4455,7 +4471,7 @@ const initSlots = (instance, children) => {
|
|
|
4455
4471
|
const type = children._;
|
|
4456
4472
|
if (type) {
|
|
4457
4473
|
instance.slots = toRaw(children);
|
|
4458
|
-
def(
|
|
4474
|
+
def(instance.slots, "_", type);
|
|
4459
4475
|
} else {
|
|
4460
4476
|
normalizeObjectSlots(
|
|
4461
4477
|
children,
|
|
@@ -4467,7 +4483,6 @@ const initSlots = (instance, children) => {
|
|
|
4467
4483
|
normalizeVNodeSlots(instance, children);
|
|
4468
4484
|
}
|
|
4469
4485
|
}
|
|
4470
|
-
def(instance.slots, InternalObjectKey, 1);
|
|
4471
4486
|
};
|
|
4472
4487
|
const updateSlots = (instance, children, optimized) => {
|
|
4473
4488
|
const { vnode, slots } = instance;
|
|
@@ -4639,6 +4654,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4639
4654
|
}
|
|
4640
4655
|
};
|
|
4641
4656
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4657
|
+
optimized = optimized || !!vnode.dynamicChildren;
|
|
4642
4658
|
const isFragmentStart = isComment(node) && node.data === "[";
|
|
4643
4659
|
const onMismatch = () => handleMismatch(
|
|
4644
4660
|
node,
|
|
@@ -4884,9 +4900,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
4884
4900
|
}
|
|
4885
4901
|
}
|
|
4886
4902
|
if (props) {
|
|
4887
|
-
if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
4903
|
+
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
|
|
4888
4904
|
for (const key in props) {
|
|
4889
|
-
if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
4905
|
+
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
4890
4906
|
hasMismatch = true;
|
|
4891
4907
|
}
|
|
4892
4908
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -7121,7 +7137,6 @@ const createVNodeWithArgsTransform = (...args) => {
|
|
|
7121
7137
|
...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
|
|
7122
7138
|
);
|
|
7123
7139
|
};
|
|
7124
|
-
const InternalObjectKey = `__vInternal`;
|
|
7125
7140
|
const normalizeKey = ({ key }) => key != null ? key : null;
|
|
7126
7141
|
const normalizeRef = ({
|
|
7127
7142
|
ref,
|
|
@@ -7254,7 +7269,7 @@ Component that was made reactive: `,
|
|
|
7254
7269
|
function guardReactiveProps(props) {
|
|
7255
7270
|
if (!props)
|
|
7256
7271
|
return null;
|
|
7257
|
-
return isProxy(props) ||
|
|
7272
|
+
return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
|
|
7258
7273
|
}
|
|
7259
7274
|
function cloneVNode(vnode, extraProps, mergeRef = false) {
|
|
7260
7275
|
const { props, ref, patchFlag, children } = vnode;
|
|
@@ -7359,7 +7374,7 @@ function normalizeChildren(vnode, children) {
|
|
|
7359
7374
|
} else {
|
|
7360
7375
|
type = 32;
|
|
7361
7376
|
const slotFlag = children._;
|
|
7362
|
-
if (!slotFlag
|
|
7377
|
+
if (!slotFlag) {
|
|
7363
7378
|
children._ctx = currentRenderingInstance;
|
|
7364
7379
|
} else if (slotFlag === 3 && currentRenderingInstance) {
|
|
7365
7380
|
if (currentRenderingInstance.slots._ === 1) {
|
|
@@ -7597,7 +7612,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7597
7612
|
}
|
|
7598
7613
|
}
|
|
7599
7614
|
instance.accessCache = /* @__PURE__ */ Object.create(null);
|
|
7600
|
-
instance.proxy =
|
|
7615
|
+
instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
|
|
7601
7616
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7602
7617
|
exposePropsOnRenderContext(instance);
|
|
7603
7618
|
}
|
|
@@ -7731,31 +7746,26 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
7731
7746
|
}
|
|
7732
7747
|
}
|
|
7733
7748
|
}
|
|
7734
|
-
|
|
7735
|
-
|
|
7736
|
-
|
|
7737
|
-
|
|
7738
|
-
|
|
7739
|
-
|
|
7740
|
-
|
|
7741
|
-
|
|
7742
|
-
|
|
7743
|
-
|
|
7744
|
-
|
|
7745
|
-
|
|
7746
|
-
|
|
7747
|
-
|
|
7748
|
-
|
|
7749
|
-
|
|
7750
|
-
|
|
7751
|
-
|
|
7752
|
-
|
|
7753
|
-
|
|
7754
|
-
return target[key];
|
|
7755
|
-
}
|
|
7756
|
-
}
|
|
7757
|
-
));
|
|
7758
|
-
}
|
|
7749
|
+
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
7750
|
+
get(target, key) {
|
|
7751
|
+
markAttrsAccessed();
|
|
7752
|
+
track(target, "get", "");
|
|
7753
|
+
return target[key];
|
|
7754
|
+
},
|
|
7755
|
+
set() {
|
|
7756
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7757
|
+
return false;
|
|
7758
|
+
},
|
|
7759
|
+
deleteProperty() {
|
|
7760
|
+
warn$1(`setupContext.attrs is readonly.`);
|
|
7761
|
+
return false;
|
|
7762
|
+
}
|
|
7763
|
+
} : {
|
|
7764
|
+
get(target, key) {
|
|
7765
|
+
track(target, "get", "");
|
|
7766
|
+
return target[key];
|
|
7767
|
+
}
|
|
7768
|
+
};
|
|
7759
7769
|
function getSlotsProxy(instance) {
|
|
7760
7770
|
return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
|
|
7761
7771
|
get(target, key) {
|
|
@@ -7789,9 +7799,10 @@ function createSetupContext(instance) {
|
|
|
7789
7799
|
instance.exposed = exposed || {};
|
|
7790
7800
|
};
|
|
7791
7801
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
7802
|
+
let attrsProxy;
|
|
7792
7803
|
return Object.freeze({
|
|
7793
7804
|
get attrs() {
|
|
7794
|
-
return
|
|
7805
|
+
return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
|
|
7795
7806
|
},
|
|
7796
7807
|
get slots() {
|
|
7797
7808
|
return getSlotsProxy(instance);
|
|
@@ -7803,9 +7814,7 @@ function createSetupContext(instance) {
|
|
|
7803
7814
|
});
|
|
7804
7815
|
} else {
|
|
7805
7816
|
return {
|
|
7806
|
-
|
|
7807
|
-
return getAttrsProxy(instance);
|
|
7808
|
-
},
|
|
7817
|
+
attrs: new Proxy(instance.attrs, attrsProxyHandlers),
|
|
7809
7818
|
slots: instance.slots,
|
|
7810
7819
|
emit: instance.emit,
|
|
7811
7820
|
expose
|
|
@@ -8145,7 +8154,7 @@ function isMemoSame(cached, memo) {
|
|
|
8145
8154
|
return true;
|
|
8146
8155
|
}
|
|
8147
8156
|
|
|
8148
|
-
const version = "3.4.
|
|
8157
|
+
const version = "3.4.22";
|
|
8149
8158
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8150
8159
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8151
8160
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.4.
|
|
3
|
+
"version": "3.4.22",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.4.
|
|
50
|
-
"@vue/reactivity": "3.4.
|
|
49
|
+
"@vue/shared": "3.4.22",
|
|
50
|
+
"@vue/reactivity": "3.4.22"
|
|
51
51
|
}
|
|
52
52
|
}
|