@vue/runtime-core 3.4.21 → 3.4.23

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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.21
2
+ * @vue/runtime-core v3.4.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -207,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
207
207
  }
208
208
  return res;
209
209
  }
210
- const values = [];
211
- for (let i = 0; i < fn.length; i++) {
212
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
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
+ );
213
220
  }
214
- return values;
215
221
  }
216
222
  function handleError(err, instance, type, throwInDev = true) {
217
223
  const contextVNode = instance ? instance.vnode : null;
@@ -232,12 +238,14 @@ function handleError(err, instance, type, throwInDev = true) {
232
238
  }
233
239
  const appErrorHandler = instance.appContext.config.errorHandler;
234
240
  if (appErrorHandler) {
241
+ reactivity.pauseTracking();
235
242
  callWithErrorHandling(
236
243
  appErrorHandler,
237
244
  null,
238
245
  10,
239
246
  [err, exposedInstance, errorInfo]
240
247
  );
248
+ reactivity.resetTracking();
241
249
  return;
242
250
  }
243
251
  }
@@ -613,6 +621,8 @@ const devtoolsComponentRemoved = (component) => {
613
621
  _devtoolsComponentRemoved(component);
614
622
  }
615
623
  };
624
+ /*! #__NO_SIDE_EFFECTS__ */
625
+ // @__NO_SIDE_EFFECTS__
616
626
  function createDevtoolsComponentHook(hook) {
617
627
  return (component) => {
618
628
  emit$1(
@@ -2716,7 +2726,7 @@ const KeepAliveImpl = {
2716
2726
  return () => {
2717
2727
  pendingCacheKey = null;
2718
2728
  if (!slots.default) {
2719
- return null;
2729
+ return current = null;
2720
2730
  }
2721
2731
  const children = slots.default();
2722
2732
  const rawVNode = children[0];
@@ -3029,6 +3039,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
3029
3039
  const hasSetupBinding = (state, key) => state !== shared.EMPTY_OBJ && !state.__isScriptSetup && shared.hasOwn(state, key);
3030
3040
  const PublicInstanceProxyHandlers = {
3031
3041
  get({ _: instance }, key) {
3042
+ if (key === "__v_skip") {
3043
+ return true;
3044
+ }
3032
3045
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
3033
3046
  if (key === "__isVue") {
3034
3047
  return true;
@@ -3071,7 +3084,7 @@ const PublicInstanceProxyHandlers = {
3071
3084
  let cssModule, globalProperties;
3072
3085
  if (publicGetter) {
3073
3086
  if (key === "$attrs") {
3074
- reactivity.track(instance, "get", key);
3087
+ reactivity.track(instance.attrs, "get", "");
3075
3088
  markAttrsAccessed();
3076
3089
  } else if (key === "$slots") {
3077
3090
  reactivity.track(instance, "get", key);
@@ -3996,10 +4009,13 @@ function hasInjectionContext() {
3996
4009
  return !!(currentInstance || currentRenderingInstance || currentApp);
3997
4010
  }
3998
4011
 
4012
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
4013
+ const createInternalObject = () => Object.create(internalObjectProto);
4014
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4015
+
3999
4016
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4000
4017
  const props = {};
4001
- const attrs = {};
4002
- shared.def(attrs, InternalObjectKey, 1);
4018
+ const attrs = createInternalObject();
4003
4019
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4004
4020
  setFullProps(instance, rawProps, props, attrs);
4005
4021
  for (const key in instance.propsOptions[0]) {
@@ -4114,7 +4130,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4114
4130
  }
4115
4131
  }
4116
4132
  if (hasAttrsChanged) {
4117
- reactivity.trigger(instance, "set", "$attrs");
4133
+ reactivity.trigger(instance.attrs, "set", "");
4118
4134
  }
4119
4135
  {
4120
4136
  validateProps(rawProps || {}, props, instance);
@@ -4450,19 +4466,18 @@ const initSlots = (instance, children) => {
4450
4466
  const type = children._;
4451
4467
  if (type) {
4452
4468
  instance.slots = reactivity.toRaw(children);
4453
- shared.def(children, "_", type);
4469
+ shared.def(instance.slots, "_", type);
4454
4470
  } else {
4455
4471
  normalizeObjectSlots(
4456
4472
  children,
4457
- instance.slots = {});
4473
+ instance.slots = createInternalObject());
4458
4474
  }
4459
4475
  } else {
4460
- instance.slots = {};
4476
+ instance.slots = createInternalObject();
4461
4477
  if (children) {
4462
4478
  normalizeVNodeSlots(instance, children);
4463
4479
  }
4464
4480
  }
4465
- shared.def(instance.slots, InternalObjectKey, 1);
4466
4481
  };
4467
4482
  const updateSlots = (instance, children, optimized) => {
4468
4483
  const { vnode, slots } = instance;
@@ -4634,6 +4649,7 @@ function createHydrationFunctions(rendererInternals) {
4634
4649
  }
4635
4650
  };
4636
4651
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4652
+ optimized = optimized || !!vnode.dynamicChildren;
4637
4653
  const isFragmentStart = isComment(node) && node.data === "[";
4638
4654
  const onMismatch = () => handleMismatch(
4639
4655
  node,
@@ -7068,7 +7084,6 @@ const createVNodeWithArgsTransform = (...args) => {
7068
7084
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7069
7085
  );
7070
7086
  };
7071
- const InternalObjectKey = `__vInternal`;
7072
7087
  const normalizeKey = ({ key }) => key != null ? key : null;
7073
7088
  const normalizeRef = ({
7074
7089
  ref,
@@ -7201,7 +7216,7 @@ Component that was made reactive: `,
7201
7216
  function guardReactiveProps(props) {
7202
7217
  if (!props)
7203
7218
  return null;
7204
- return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props;
7219
+ return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
7205
7220
  }
7206
7221
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7207
7222
  const { props, ref, patchFlag, children } = vnode;
@@ -7306,7 +7321,7 @@ function normalizeChildren(vnode, children) {
7306
7321
  } else {
7307
7322
  type = 32;
7308
7323
  const slotFlag = children._;
7309
- if (!slotFlag && !(InternalObjectKey in children)) {
7324
+ if (!slotFlag && !isInternalObject(children)) {
7310
7325
  children._ctx = currentRenderingInstance;
7311
7326
  } else if (slotFlag === 3 && currentRenderingInstance) {
7312
7327
  if (currentRenderingInstance.slots._ === 1) {
@@ -7542,7 +7557,7 @@ function setupStatefulComponent(instance, isSSR) {
7542
7557
  }
7543
7558
  }
7544
7559
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7545
- instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7560
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7546
7561
  {
7547
7562
  exposePropsOnRenderContext(instance);
7548
7563
  }
@@ -7676,26 +7691,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7676
7691
  }
7677
7692
  }
7678
7693
  }
7679
- function getAttrsProxy(instance) {
7680
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
7681
- instance.attrs,
7682
- {
7683
- get(target, key) {
7684
- markAttrsAccessed();
7685
- reactivity.track(instance, "get", "$attrs");
7686
- return target[key];
7687
- },
7688
- set() {
7689
- warn$1(`setupContext.attrs is readonly.`);
7690
- return false;
7691
- },
7692
- deleteProperty() {
7693
- warn$1(`setupContext.attrs is readonly.`);
7694
- return false;
7695
- }
7696
- }
7697
- ));
7698
- }
7694
+ const attrsProxyHandlers = {
7695
+ get(target, key) {
7696
+ markAttrsAccessed();
7697
+ reactivity.track(target, "get", "");
7698
+ return target[key];
7699
+ },
7700
+ set() {
7701
+ warn$1(`setupContext.attrs is readonly.`);
7702
+ return false;
7703
+ },
7704
+ deleteProperty() {
7705
+ warn$1(`setupContext.attrs is readonly.`);
7706
+ return false;
7707
+ }
7708
+ } ;
7699
7709
  function getSlotsProxy(instance) {
7700
7710
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7701
7711
  get(target, key) {
@@ -7729,9 +7739,10 @@ function createSetupContext(instance) {
7729
7739
  instance.exposed = exposed || {};
7730
7740
  };
7731
7741
  {
7742
+ let attrsProxy;
7732
7743
  return Object.freeze({
7733
7744
  get attrs() {
7734
- return getAttrsProxy(instance);
7745
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7735
7746
  },
7736
7747
  get slots() {
7737
7748
  return getSlotsProxy(instance);
@@ -8076,7 +8087,7 @@ function isMemoSame(cached, memo) {
8076
8087
  return true;
8077
8088
  }
8078
8089
 
8079
- const version = "3.4.21";
8090
+ const version = "3.4.23";
8080
8091
  const warn = warn$1 ;
8081
8092
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8082
8093
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.21
2
+ * @vue/runtime-core v3.4.23
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
- const values = [];
98
- for (let i = 0; i < fn.length; i++) {
99
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
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
  }
@@ -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] !== "$") {
@@ -2427,7 +2434,7 @@ const PublicInstanceProxyHandlers = {
2427
2434
  let cssModule, globalProperties;
2428
2435
  if (publicGetter) {
2429
2436
  if (key === "$attrs") {
2430
- reactivity.track(instance, "get", key);
2437
+ reactivity.track(instance.attrs, "get", "");
2431
2438
  }
2432
2439
  return publicGetter(instance);
2433
2440
  } else if (
@@ -3068,10 +3075,13 @@ function hasInjectionContext() {
3068
3075
  return !!(currentInstance || currentRenderingInstance || currentApp);
3069
3076
  }
3070
3077
 
3078
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
3079
+ const createInternalObject = () => Object.create(internalObjectProto);
3080
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
3081
+
3071
3082
  function initProps(instance, rawProps, isStateful, isSSR = false) {
3072
3083
  const props = {};
3073
- const attrs = {};
3074
- shared.def(attrs, InternalObjectKey, 1);
3084
+ const attrs = createInternalObject();
3075
3085
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
3076
3086
  setFullProps(instance, rawProps, props, attrs);
3077
3087
  for (const key in instance.propsOptions[0]) {
@@ -3176,7 +3186,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
3176
3186
  }
3177
3187
  }
3178
3188
  if (hasAttrsChanged) {
3179
- reactivity.trigger(instance, "set", "$attrs");
3189
+ reactivity.trigger(instance.attrs, "set", "");
3180
3190
  }
3181
3191
  }
3182
3192
  function setFullProps(instance, rawProps, props, attrs) {
@@ -3384,19 +3394,18 @@ const initSlots = (instance, children) => {
3384
3394
  const type = children._;
3385
3395
  if (type) {
3386
3396
  instance.slots = reactivity.toRaw(children);
3387
- shared.def(children, "_", type);
3397
+ shared.def(instance.slots, "_", type);
3388
3398
  } else {
3389
3399
  normalizeObjectSlots(
3390
3400
  children,
3391
- instance.slots = {});
3401
+ instance.slots = createInternalObject());
3392
3402
  }
3393
3403
  } else {
3394
- instance.slots = {};
3404
+ instance.slots = createInternalObject();
3395
3405
  if (children) {
3396
3406
  normalizeVNodeSlots(instance, children);
3397
3407
  }
3398
3408
  }
3399
- shared.def(instance.slots, InternalObjectKey, 1);
3400
3409
  };
3401
3410
  const updateSlots = (instance, children, optimized) => {
3402
3411
  const { vnode, slots } = instance;
@@ -3552,6 +3561,7 @@ function createHydrationFunctions(rendererInternals) {
3552
3561
  }
3553
3562
  };
3554
3563
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
3564
+ optimized = optimized || !!vnode.dynamicChildren;
3555
3565
  const isFragmentStart = isComment(node) && node.data === "[";
3556
3566
  const onMismatch = () => handleMismatch(
3557
3567
  node,
@@ -5609,7 +5619,6 @@ function isSameVNodeType(n1, n2) {
5609
5619
  }
5610
5620
  function transformVNodeArgs(transformer) {
5611
5621
  }
5612
- const InternalObjectKey = `__vInternal`;
5613
5622
  const normalizeKey = ({ key }) => key != null ? key : null;
5614
5623
  const normalizeRef = ({
5615
5624
  ref,
@@ -5727,7 +5736,7 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
5727
5736
  function guardReactiveProps(props) {
5728
5737
  if (!props)
5729
5738
  return null;
5730
- return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props;
5739
+ return reactivity.isProxy(props) || isInternalObject(props) ? shared.extend({}, props) : props;
5731
5740
  }
5732
5741
  function cloneVNode(vnode, extraProps, mergeRef = false) {
5733
5742
  const { props, ref, patchFlag, children } = vnode;
@@ -5825,7 +5834,7 @@ function normalizeChildren(vnode, children) {
5825
5834
  } else {
5826
5835
  type = 32;
5827
5836
  const slotFlag = children._;
5828
- if (!slotFlag && !(InternalObjectKey in children)) {
5837
+ if (!slotFlag && !isInternalObject(children)) {
5829
5838
  children._ctx = currentRenderingInstance;
5830
5839
  } else if (slotFlag === 3 && currentRenderingInstance) {
5831
5840
  if (currentRenderingInstance.slots._ === 1) {
@@ -6030,7 +6039,7 @@ function setupComponent(instance, isSSR = false) {
6030
6039
  function setupStatefulComponent(instance, isSSR) {
6031
6040
  const Component = instance.type;
6032
6041
  instance.accessCache = /* @__PURE__ */ Object.create(null);
6033
- instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
6042
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
6034
6043
  const { setup } = Component;
6035
6044
  if (setup) {
6036
6045
  const setupContext = instance.setupContext = setup.length > 1 ? createSetupContext(instance) : null;
@@ -6125,26 +6134,19 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
6125
6134
  }
6126
6135
  }
6127
6136
  }
6128
- function getAttrsProxy(instance) {
6129
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
6130
- instance.attrs,
6131
- {
6132
- get(target, key) {
6133
- reactivity.track(instance, "get", "$attrs");
6134
- return target[key];
6135
- }
6136
- }
6137
- ));
6138
- }
6137
+ const attrsProxyHandlers = {
6138
+ get(target, key) {
6139
+ reactivity.track(target, "get", "");
6140
+ return target[key];
6141
+ }
6142
+ };
6139
6143
  function createSetupContext(instance) {
6140
6144
  const expose = (exposed) => {
6141
6145
  instance.exposed = exposed || {};
6142
6146
  };
6143
6147
  {
6144
6148
  return {
6145
- get attrs() {
6146
- return getAttrsProxy(instance);
6147
- },
6149
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
6148
6150
  slots: instance.slots,
6149
6151
  emit: instance.emit,
6150
6152
  expose
@@ -6276,7 +6278,7 @@ function isMemoSame(cached, memo) {
6276
6278
  return true;
6277
6279
  }
6278
6280
 
6279
- const version = "3.4.21";
6281
+ const version = "3.4.23";
6280
6282
  const warn$1 = shared.NOOP;
6281
6283
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6282
6284
  const devtools = void 0;
@@ -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 the returned ref behaves differently depending on whether the parent
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<Omit<T, keyof Defaults>> & {
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.21
2
+ * @vue/runtime-core v3.4.23
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, def, isReservedProp, EMPTY_ARR, toRawType, makeMap, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
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 = [];
@@ -207,11 +207,17 @@ function callWithAsyncErrorHandling(fn, instance, type, args) {
207
207
  }
208
208
  return res;
209
209
  }
210
- const values = [];
211
- for (let i = 0; i < fn.length; i++) {
212
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
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
+ );
213
220
  }
214
- return values;
215
221
  }
216
222
  function handleError(err, instance, type, throwInDev = true) {
217
223
  const contextVNode = instance ? instance.vnode : null;
@@ -232,12 +238,14 @@ function handleError(err, instance, type, throwInDev = true) {
232
238
  }
233
239
  const appErrorHandler = instance.appContext.config.errorHandler;
234
240
  if (appErrorHandler) {
241
+ pauseTracking();
235
242
  callWithErrorHandling(
236
243
  appErrorHandler,
237
244
  null,
238
245
  10,
239
246
  [err, exposedInstance, errorInfo]
240
247
  );
248
+ resetTracking();
241
249
  return;
242
250
  }
243
251
  }
@@ -615,6 +623,8 @@ const devtoolsComponentRemoved = (component) => {
615
623
  _devtoolsComponentRemoved(component);
616
624
  }
617
625
  };
626
+ /*! #__NO_SIDE_EFFECTS__ */
627
+ // @__NO_SIDE_EFFECTS__
618
628
  function createDevtoolsComponentHook(hook) {
619
629
  return (component) => {
620
630
  emit$1(
@@ -2720,7 +2730,7 @@ const KeepAliveImpl = {
2720
2730
  return () => {
2721
2731
  pendingCacheKey = null;
2722
2732
  if (!slots.default) {
2723
- return null;
2733
+ return current = null;
2724
2734
  }
2725
2735
  const children = slots.default();
2726
2736
  const rawVNode = children[0];
@@ -3033,6 +3043,9 @@ const isReservedPrefix = (key) => key === "_" || key === "$";
3033
3043
  const hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
3034
3044
  const PublicInstanceProxyHandlers = {
3035
3045
  get({ _: instance }, key) {
3046
+ if (key === "__v_skip") {
3047
+ return true;
3048
+ }
3036
3049
  const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
3037
3050
  if (!!(process.env.NODE_ENV !== "production") && key === "__isVue") {
3038
3051
  return true;
@@ -3075,7 +3088,7 @@ const PublicInstanceProxyHandlers = {
3075
3088
  let cssModule, globalProperties;
3076
3089
  if (publicGetter) {
3077
3090
  if (key === "$attrs") {
3078
- track(instance, "get", key);
3091
+ track(instance.attrs, "get", "");
3079
3092
  !!(process.env.NODE_ENV !== "production") && markAttrsAccessed();
3080
3093
  } else if (!!(process.env.NODE_ENV !== "production") && key === "$slots") {
3081
3094
  track(instance, "get", key);
@@ -4004,10 +4017,13 @@ function hasInjectionContext() {
4004
4017
  return !!(currentInstance || currentRenderingInstance || currentApp);
4005
4018
  }
4006
4019
 
4020
+ const internalObjectProto = /* @__PURE__ */ Object.create(null);
4021
+ const createInternalObject = () => Object.create(internalObjectProto);
4022
+ const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
4023
+
4007
4024
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4008
4025
  const props = {};
4009
- const attrs = {};
4010
- def(attrs, InternalObjectKey, 1);
4026
+ const attrs = createInternalObject();
4011
4027
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4012
4028
  setFullProps(instance, rawProps, props, attrs);
4013
4029
  for (const key in instance.propsOptions[0]) {
@@ -4122,7 +4138,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4122
4138
  }
4123
4139
  }
4124
4140
  if (hasAttrsChanged) {
4125
- trigger(instance, "set", "$attrs");
4141
+ trigger(instance.attrs, "set", "");
4126
4142
  }
4127
4143
  if (!!(process.env.NODE_ENV !== "production")) {
4128
4144
  validateProps(rawProps || {}, props, instance);
@@ -4458,19 +4474,18 @@ const initSlots = (instance, children) => {
4458
4474
  const type = children._;
4459
4475
  if (type) {
4460
4476
  instance.slots = toRaw(children);
4461
- def(children, "_", type);
4477
+ def(instance.slots, "_", type);
4462
4478
  } else {
4463
4479
  normalizeObjectSlots(
4464
4480
  children,
4465
- instance.slots = {});
4481
+ instance.slots = createInternalObject());
4466
4482
  }
4467
4483
  } else {
4468
- instance.slots = {};
4484
+ instance.slots = createInternalObject();
4469
4485
  if (children) {
4470
4486
  normalizeVNodeSlots(instance, children);
4471
4487
  }
4472
4488
  }
4473
- def(instance.slots, InternalObjectKey, 1);
4474
4489
  };
4475
4490
  const updateSlots = (instance, children, optimized) => {
4476
4491
  const { vnode, slots } = instance;
@@ -4642,6 +4657,7 @@ function createHydrationFunctions(rendererInternals) {
4642
4657
  }
4643
4658
  };
4644
4659
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4660
+ optimized = optimized || !!vnode.dynamicChildren;
4645
4661
  const isFragmentStart = isComment(node) && node.data === "[";
4646
4662
  const onMismatch = () => handleMismatch(
4647
4663
  node,
@@ -4887,9 +4903,9 @@ Server rendered element contains more child nodes than client vdom.`
4887
4903
  }
4888
4904
  }
4889
4905
  if (props) {
4890
- if (!!(process.env.NODE_ENV !== "production") || forcePatch || !optimized || patchFlag & (16 | 32)) {
4906
+ if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
4891
4907
  for (const key in props) {
4892
- if (!!(process.env.NODE_ENV !== "production") && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
4908
+ if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
4893
4909
  hasMismatch = true;
4894
4910
  }
4895
4911
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
@@ -7124,7 +7140,6 @@ const createVNodeWithArgsTransform = (...args) => {
7124
7140
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7125
7141
  );
7126
7142
  };
7127
- const InternalObjectKey = `__vInternal`;
7128
7143
  const normalizeKey = ({ key }) => key != null ? key : null;
7129
7144
  const normalizeRef = ({
7130
7145
  ref,
@@ -7257,7 +7272,7 @@ Component that was made reactive: `,
7257
7272
  function guardReactiveProps(props) {
7258
7273
  if (!props)
7259
7274
  return null;
7260
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
7275
+ return isProxy(props) || isInternalObject(props) ? extend({}, props) : props;
7261
7276
  }
7262
7277
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7263
7278
  const { props, ref, patchFlag, children } = vnode;
@@ -7362,7 +7377,7 @@ function normalizeChildren(vnode, children) {
7362
7377
  } else {
7363
7378
  type = 32;
7364
7379
  const slotFlag = children._;
7365
- if (!slotFlag && !(InternalObjectKey in children)) {
7380
+ if (!slotFlag && !isInternalObject(children)) {
7366
7381
  children._ctx = currentRenderingInstance;
7367
7382
  } else if (slotFlag === 3 && currentRenderingInstance) {
7368
7383
  if (currentRenderingInstance.slots._ === 1) {
@@ -7600,7 +7615,7 @@ function setupStatefulComponent(instance, isSSR) {
7600
7615
  }
7601
7616
  }
7602
7617
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7603
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7618
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7604
7619
  if (!!(process.env.NODE_ENV !== "production")) {
7605
7620
  exposePropsOnRenderContext(instance);
7606
7621
  }
@@ -7734,31 +7749,26 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7734
7749
  }
7735
7750
  }
7736
7751
  }
7737
- function getAttrsProxy(instance) {
7738
- return instance.attrsProxy || (instance.attrsProxy = new Proxy(
7739
- instance.attrs,
7740
- !!(process.env.NODE_ENV !== "production") ? {
7741
- get(target, key) {
7742
- markAttrsAccessed();
7743
- track(instance, "get", "$attrs");
7744
- return target[key];
7745
- },
7746
- set() {
7747
- warn$1(`setupContext.attrs is readonly.`);
7748
- return false;
7749
- },
7750
- deleteProperty() {
7751
- warn$1(`setupContext.attrs is readonly.`);
7752
- return false;
7753
- }
7754
- } : {
7755
- get(target, key) {
7756
- track(instance, "get", "$attrs");
7757
- return target[key];
7758
- }
7759
- }
7760
- ));
7761
- }
7752
+ const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
7753
+ get(target, key) {
7754
+ markAttrsAccessed();
7755
+ track(target, "get", "");
7756
+ return target[key];
7757
+ },
7758
+ set() {
7759
+ warn$1(`setupContext.attrs is readonly.`);
7760
+ return false;
7761
+ },
7762
+ deleteProperty() {
7763
+ warn$1(`setupContext.attrs is readonly.`);
7764
+ return false;
7765
+ }
7766
+ } : {
7767
+ get(target, key) {
7768
+ track(target, "get", "");
7769
+ return target[key];
7770
+ }
7771
+ };
7762
7772
  function getSlotsProxy(instance) {
7763
7773
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7764
7774
  get(target, key) {
@@ -7792,9 +7802,10 @@ function createSetupContext(instance) {
7792
7802
  instance.exposed = exposed || {};
7793
7803
  };
7794
7804
  if (!!(process.env.NODE_ENV !== "production")) {
7805
+ let attrsProxy;
7795
7806
  return Object.freeze({
7796
7807
  get attrs() {
7797
- return getAttrsProxy(instance);
7808
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7798
7809
  },
7799
7810
  get slots() {
7800
7811
  return getSlotsProxy(instance);
@@ -7806,9 +7817,7 @@ function createSetupContext(instance) {
7806
7817
  });
7807
7818
  } else {
7808
7819
  return {
7809
- get attrs() {
7810
- return getAttrsProxy(instance);
7811
- },
7820
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
7812
7821
  slots: instance.slots,
7813
7822
  emit: instance.emit,
7814
7823
  expose
@@ -8148,7 +8157,7 @@ function isMemoSame(cached, memo) {
8148
8157
  return true;
8149
8158
  }
8150
8159
 
8151
- const version = "3.4.21";
8160
+ const version = "3.4.23";
8152
8161
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8153
8162
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8154
8163
  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.21",
3
+ "version": "3.4.23",
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.21",
50
- "@vue/reactivity": "3.4.21"
49
+ "@vue/shared": "3.4.23",
50
+ "@vue/reactivity": "3.4.23"
51
51
  }
52
52
  }