@vue/runtime-core 3.4.21 → 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.21
2
+ * @vue/runtime-core v3.4.22
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;
@@ -3996,10 +4009,10 @@ function hasInjectionContext() {
3996
4009
  return !!(currentInstance || currentRenderingInstance || currentApp);
3997
4010
  }
3998
4011
 
4012
+ const attrsProto = {};
3999
4013
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4000
4014
  const props = {};
4001
- const attrs = {};
4002
- shared.def(attrs, InternalObjectKey, 1);
4015
+ const attrs = Object.create(attrsProto);
4003
4016
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4004
4017
  setFullProps(instance, rawProps, props, attrs);
4005
4018
  for (const key in instance.propsOptions[0]) {
@@ -4114,7 +4127,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4114
4127
  }
4115
4128
  }
4116
4129
  if (hasAttrsChanged) {
4117
- reactivity.trigger(instance, "set", "$attrs");
4130
+ reactivity.trigger(instance.attrs, "set", "");
4118
4131
  }
4119
4132
  {
4120
4133
  validateProps(rawProps || {}, props, instance);
@@ -4450,7 +4463,7 @@ const initSlots = (instance, children) => {
4450
4463
  const type = children._;
4451
4464
  if (type) {
4452
4465
  instance.slots = reactivity.toRaw(children);
4453
- shared.def(children, "_", type);
4466
+ shared.def(instance.slots, "_", type);
4454
4467
  } else {
4455
4468
  normalizeObjectSlots(
4456
4469
  children,
@@ -4462,7 +4475,6 @@ const initSlots = (instance, children) => {
4462
4475
  normalizeVNodeSlots(instance, children);
4463
4476
  }
4464
4477
  }
4465
- shared.def(instance.slots, InternalObjectKey, 1);
4466
4478
  };
4467
4479
  const updateSlots = (instance, children, optimized) => {
4468
4480
  const { vnode, slots } = instance;
@@ -4634,6 +4646,7 @@ function createHydrationFunctions(rendererInternals) {
4634
4646
  }
4635
4647
  };
4636
4648
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4649
+ optimized = optimized || !!vnode.dynamicChildren;
4637
4650
  const isFragmentStart = isComment(node) && node.data === "[";
4638
4651
  const onMismatch = () => handleMismatch(
4639
4652
  node,
@@ -7068,7 +7081,6 @@ const createVNodeWithArgsTransform = (...args) => {
7068
7081
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7069
7082
  );
7070
7083
  };
7071
- const InternalObjectKey = `__vInternal`;
7072
7084
  const normalizeKey = ({ key }) => key != null ? key : null;
7073
7085
  const normalizeRef = ({
7074
7086
  ref,
@@ -7201,7 +7213,7 @@ Component that was made reactive: `,
7201
7213
  function guardReactiveProps(props) {
7202
7214
  if (!props)
7203
7215
  return null;
7204
- return reactivity.isProxy(props) || InternalObjectKey in props ? shared.extend({}, props) : props;
7216
+ return reactivity.isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? shared.extend({}, props) : props;
7205
7217
  }
7206
7218
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7207
7219
  const { props, ref, patchFlag, children } = vnode;
@@ -7306,7 +7318,7 @@ function normalizeChildren(vnode, children) {
7306
7318
  } else {
7307
7319
  type = 32;
7308
7320
  const slotFlag = children._;
7309
- if (!slotFlag && !(InternalObjectKey in children)) {
7321
+ if (!slotFlag) {
7310
7322
  children._ctx = currentRenderingInstance;
7311
7323
  } else if (slotFlag === 3 && currentRenderingInstance) {
7312
7324
  if (currentRenderingInstance.slots._ === 1) {
@@ -7542,7 +7554,7 @@ function setupStatefulComponent(instance, isSSR) {
7542
7554
  }
7543
7555
  }
7544
7556
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7545
- instance.proxy = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7557
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7546
7558
  {
7547
7559
  exposePropsOnRenderContext(instance);
7548
7560
  }
@@ -7676,26 +7688,21 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7676
7688
  }
7677
7689
  }
7678
7690
  }
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
- }
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
+ } ;
7699
7706
  function getSlotsProxy(instance) {
7700
7707
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7701
7708
  get(target, key) {
@@ -7729,9 +7736,10 @@ function createSetupContext(instance) {
7729
7736
  instance.exposed = exposed || {};
7730
7737
  };
7731
7738
  {
7739
+ let attrsProxy;
7732
7740
  return Object.freeze({
7733
7741
  get attrs() {
7734
- return getAttrsProxy(instance);
7742
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7735
7743
  },
7736
7744
  get slots() {
7737
7745
  return getSlotsProxy(instance);
@@ -8076,7 +8084,7 @@ function isMemoSame(cached, memo) {
8076
8084
  return true;
8077
8085
  }
8078
8086
 
8079
- const version = "3.4.21";
8087
+ const version = "3.4.22";
8080
8088
  const warn = warn$1 ;
8081
8089
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8082
8090
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.21
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
- 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] !== "$") {
@@ -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", "$attrs");
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(children, "_", type);
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) || InternalObjectKey in props ? shared.extend({}, props) : 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 && !(InternalObjectKey in children)) {
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 = reactivity.markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
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
- 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
- }
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
- get attrs() {
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.21";
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;
@@ -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.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, 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;
@@ -4004,10 +4017,10 @@ function hasInjectionContext() {
4004
4017
  return !!(currentInstance || currentRenderingInstance || currentApp);
4005
4018
  }
4006
4019
 
4020
+ const attrsProto = {};
4007
4021
  function initProps(instance, rawProps, isStateful, isSSR = false) {
4008
4022
  const props = {};
4009
- const attrs = {};
4010
- def(attrs, InternalObjectKey, 1);
4023
+ const attrs = Object.create(attrsProto);
4011
4024
  instance.propsDefaults = /* @__PURE__ */ Object.create(null);
4012
4025
  setFullProps(instance, rawProps, props, attrs);
4013
4026
  for (const key in instance.propsOptions[0]) {
@@ -4122,7 +4135,7 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
4122
4135
  }
4123
4136
  }
4124
4137
  if (hasAttrsChanged) {
4125
- trigger(instance, "set", "$attrs");
4138
+ trigger(instance.attrs, "set", "");
4126
4139
  }
4127
4140
  if (!!(process.env.NODE_ENV !== "production")) {
4128
4141
  validateProps(rawProps || {}, props, instance);
@@ -4458,7 +4471,7 @@ const initSlots = (instance, children) => {
4458
4471
  const type = children._;
4459
4472
  if (type) {
4460
4473
  instance.slots = toRaw(children);
4461
- def(children, "_", type);
4474
+ def(instance.slots, "_", type);
4462
4475
  } else {
4463
4476
  normalizeObjectSlots(
4464
4477
  children,
@@ -4470,7 +4483,6 @@ const initSlots = (instance, children) => {
4470
4483
  normalizeVNodeSlots(instance, children);
4471
4484
  }
4472
4485
  }
4473
- def(instance.slots, InternalObjectKey, 1);
4474
4486
  };
4475
4487
  const updateSlots = (instance, children, optimized) => {
4476
4488
  const { vnode, slots } = instance;
@@ -4642,6 +4654,7 @@ function createHydrationFunctions(rendererInternals) {
4642
4654
  }
4643
4655
  };
4644
4656
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4657
+ optimized = optimized || !!vnode.dynamicChildren;
4645
4658
  const isFragmentStart = isComment(node) && node.data === "[";
4646
4659
  const onMismatch = () => handleMismatch(
4647
4660
  node,
@@ -4887,9 +4900,9 @@ Server rendered element contains more child nodes than client vdom.`
4887
4900
  }
4888
4901
  }
4889
4902
  if (props) {
4890
- 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)) {
4891
4904
  for (const key in props) {
4892
- 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)) {
4893
4906
  hasMismatch = true;
4894
4907
  }
4895
4908
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
@@ -7124,7 +7137,6 @@ const createVNodeWithArgsTransform = (...args) => {
7124
7137
  ...vnodeArgsTransformer ? vnodeArgsTransformer(args, currentRenderingInstance) : args
7125
7138
  );
7126
7139
  };
7127
- const InternalObjectKey = `__vInternal`;
7128
7140
  const normalizeKey = ({ key }) => key != null ? key : null;
7129
7141
  const normalizeRef = ({
7130
7142
  ref,
@@ -7257,7 +7269,7 @@ Component that was made reactive: `,
7257
7269
  function guardReactiveProps(props) {
7258
7270
  if (!props)
7259
7271
  return null;
7260
- return isProxy(props) || InternalObjectKey in props ? extend({}, props) : props;
7272
+ return isProxy(props) || Object.getPrototypeOf(props) === attrsProto ? extend({}, props) : props;
7261
7273
  }
7262
7274
  function cloneVNode(vnode, extraProps, mergeRef = false) {
7263
7275
  const { props, ref, patchFlag, children } = vnode;
@@ -7362,7 +7374,7 @@ function normalizeChildren(vnode, children) {
7362
7374
  } else {
7363
7375
  type = 32;
7364
7376
  const slotFlag = children._;
7365
- if (!slotFlag && !(InternalObjectKey in children)) {
7377
+ if (!slotFlag) {
7366
7378
  children._ctx = currentRenderingInstance;
7367
7379
  } else if (slotFlag === 3 && currentRenderingInstance) {
7368
7380
  if (currentRenderingInstance.slots._ === 1) {
@@ -7600,7 +7612,7 @@ function setupStatefulComponent(instance, isSSR) {
7600
7612
  }
7601
7613
  }
7602
7614
  instance.accessCache = /* @__PURE__ */ Object.create(null);
7603
- instance.proxy = markRaw(new Proxy(instance.ctx, PublicInstanceProxyHandlers));
7615
+ instance.proxy = new Proxy(instance.ctx, PublicInstanceProxyHandlers);
7604
7616
  if (!!(process.env.NODE_ENV !== "production")) {
7605
7617
  exposePropsOnRenderContext(instance);
7606
7618
  }
@@ -7734,31 +7746,26 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
7734
7746
  }
7735
7747
  }
7736
7748
  }
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
- }
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
+ };
7762
7769
  function getSlotsProxy(instance) {
7763
7770
  return instance.slotsProxy || (instance.slotsProxy = new Proxy(instance.slots, {
7764
7771
  get(target, key) {
@@ -7792,9 +7799,10 @@ function createSetupContext(instance) {
7792
7799
  instance.exposed = exposed || {};
7793
7800
  };
7794
7801
  if (!!(process.env.NODE_ENV !== "production")) {
7802
+ let attrsProxy;
7795
7803
  return Object.freeze({
7796
7804
  get attrs() {
7797
- return getAttrsProxy(instance);
7805
+ return attrsProxy || (attrsProxy = new Proxy(instance.attrs, attrsProxyHandlers));
7798
7806
  },
7799
7807
  get slots() {
7800
7808
  return getSlotsProxy(instance);
@@ -7806,9 +7814,7 @@ function createSetupContext(instance) {
7806
7814
  });
7807
7815
  } else {
7808
7816
  return {
7809
- get attrs() {
7810
- return getAttrsProxy(instance);
7811
- },
7817
+ attrs: new Proxy(instance.attrs, attrsProxyHandlers),
7812
7818
  slots: instance.slots,
7813
7819
  emit: instance.emit,
7814
7820
  expose
@@ -8148,7 +8154,7 @@ function isMemoSame(cached, memo) {
8148
8154
  return true;
8149
8155
  }
8150
8156
 
8151
- const version = "3.4.21";
8157
+ const version = "3.4.22";
8152
8158
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8153
8159
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8154
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.21",
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.21",
50
- "@vue/reactivity": "3.4.21"
49
+ "@vue/shared": "3.4.22",
50
+ "@vue/reactivity": "3.4.22"
51
51
  }
52
52
  }