@vue/runtime-core 3.5.13 → 3.5.14

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.5.13
2
+ * @vue/runtime-core v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -348,11 +348,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
348
348
  queue.splice(i, 1);
349
349
  i--;
350
350
  if (cb.flags & 4) {
351
- cb.flags &= ~1;
351
+ cb.flags &= -2;
352
352
  }
353
353
  cb();
354
354
  if (!(cb.flags & 4)) {
355
- cb.flags &= ~1;
355
+ cb.flags &= -2;
356
356
  }
357
357
  }
358
358
  }
@@ -377,10 +377,10 @@ function flushPostFlushCbs(seen) {
377
377
  continue;
378
378
  }
379
379
  if (cb.flags & 4) {
380
- cb.flags &= ~1;
380
+ cb.flags &= -2;
381
381
  }
382
382
  if (!(cb.flags & 8)) cb();
383
- cb.flags &= ~1;
383
+ cb.flags &= -2;
384
384
  }
385
385
  activePostFlushCbs = null;
386
386
  postFlushIndex = 0;
@@ -416,7 +416,7 @@ function flushJobs(seen) {
416
416
  for (; flushIndex < queue.length; flushIndex++) {
417
417
  const job = queue[flushIndex];
418
418
  if (job) {
419
- job.flags &= ~1;
419
+ job.flags &= -2;
420
420
  }
421
421
  }
422
422
  flushIndex = -1;
@@ -905,7 +905,7 @@ const TeleportImpl = {
905
905
  namespace,
906
906
  slotScopeIds
907
907
  );
908
- traverseStaticChildren(n1, n2, true);
908
+ traverseStaticChildren(n1, n2, false);
909
909
  } else if (!optimized) {
910
910
  patchChildren(
911
911
  n1,
@@ -2677,7 +2677,7 @@ const KeepAliveImpl = {
2677
2677
  );
2678
2678
  const { include, exclude, max } = props;
2679
2679
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2680
- vnode.shapeFlag &= ~256;
2680
+ vnode.shapeFlag &= -257;
2681
2681
  current = vnode;
2682
2682
  return rawVNode;
2683
2683
  }
@@ -2764,8 +2764,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2764
2764
  }, target);
2765
2765
  }
2766
2766
  function resetShapeFlag(vnode) {
2767
- vnode.shapeFlag &= ~256;
2768
- vnode.shapeFlag &= ~512;
2767
+ vnode.shapeFlag &= -257;
2768
+ vnode.shapeFlag &= -513;
2769
2769
  }
2770
2770
  function getInnerChild(vnode) {
2771
2771
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2880,14 +2880,16 @@ function renderList(source, renderItem, cache, index) {
2880
2880
  if (sourceIsArray || shared.isString(source)) {
2881
2881
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2882
2882
  let needsWrap = false;
2883
+ let isReadonlySource = false;
2883
2884
  if (sourceIsReactiveArray) {
2884
2885
  needsWrap = !reactivity.isShallow(source);
2886
+ isReadonlySource = reactivity.isReadonly(source);
2885
2887
  source = reactivity.shallowReadArray(source);
2886
2888
  }
2887
2889
  ret = new Array(source.length);
2888
2890
  for (let i = 0, l = source.length; i < l; i++) {
2889
2891
  ret[i] = renderItem(
2890
- needsWrap ? reactivity.toReactive(source[i]) : source[i],
2892
+ needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i],
2891
2893
  i,
2892
2894
  void 0,
2893
2895
  cached && cached[i]
@@ -3909,11 +3911,9 @@ function createAppAPI(render, hydrate) {
3909
3911
  }
3910
3912
  {
3911
3913
  context.reload = () => {
3912
- render(
3913
- cloneVNode(vnode),
3914
- rootContainer,
3915
- namespace
3916
- );
3914
+ const cloned = cloneVNode(vnode);
3915
+ cloned.el = null;
3916
+ render(cloned, rootContainer, namespace);
3917
3917
  };
3918
3918
  }
3919
3919
  if (isHydrate && hydrate) {
@@ -4436,7 +4436,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
4436
4436
  return rawSlot;
4437
4437
  }
4438
4438
  const normalized = withCtx((...args) => {
4439
- if (currentInstance && (!ctx || ctx.root === currentInstance.root)) {
4439
+ if (currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
4440
4440
  warn$1(
4441
4441
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
4442
4442
  );
@@ -4475,7 +4475,7 @@ const normalizeVNodeSlots = (instance, children) => {
4475
4475
  };
4476
4476
  const assignSlots = (slots, children, optimized) => {
4477
4477
  for (const key in children) {
4478
- if (optimized || key !== "_") {
4478
+ if (optimized || !isInternalKey(key)) {
4479
4479
  slots[key] = children[key];
4480
4480
  }
4481
4481
  }
@@ -5161,8 +5161,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5161
5161
  endMeasure(instance, `init`);
5162
5162
  }
5163
5163
  }
5164
+ if (isHmrUpdating) initialVNode.el = null;
5164
5165
  if (instance.asyncDep) {
5165
- if (isHmrUpdating) initialVNode.el = null;
5166
5166
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5167
5167
  if (!initialVNode.el) {
5168
5168
  const placeholder = instance.subTree = createVNode(Comment);
@@ -5724,7 +5724,13 @@ function baseCreateRenderer(options, createHydrationFns) {
5724
5724
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5725
5725
  } else {
5726
5726
  const { leave, delayLeave, afterLeave } = transition;
5727
- const remove2 = () => hostInsert(el, container, anchor);
5727
+ const remove2 = () => {
5728
+ if (vnode.ctx.isUnmounted) {
5729
+ hostRemove(el);
5730
+ } else {
5731
+ hostInsert(el, container, anchor);
5732
+ }
5733
+ };
5728
5734
  const performLeave = () => {
5729
5735
  leave(el, () => {
5730
5736
  remove2();
@@ -5757,7 +5763,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5757
5763
  optimized = false;
5758
5764
  }
5759
5765
  if (ref != null) {
5766
+ reactivity.pauseTracking();
5760
5767
  setRef(ref, null, parentSuspense, vnode, true);
5768
+ reactivity.resetTracking();
5761
5769
  }
5762
5770
  if (cacheIndex != null) {
5763
5771
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -5869,12 +5877,27 @@ function baseCreateRenderer(options, createHydrationFns) {
5869
5877
  if (instance.type.__hmrId) {
5870
5878
  unregisterHMR(instance);
5871
5879
  }
5872
- const { bum, scope, job, subTree, um, m, a } = instance;
5880
+ const {
5881
+ bum,
5882
+ scope,
5883
+ job,
5884
+ subTree,
5885
+ um,
5886
+ m,
5887
+ a,
5888
+ parent,
5889
+ slots: { __: slotCacheKeys }
5890
+ } = instance;
5873
5891
  invalidateMount(m);
5874
5892
  invalidateMount(a);
5875
5893
  if (bum) {
5876
5894
  shared.invokeArrayFns(bum);
5877
5895
  }
5896
+ if (parent && shared.isArray(slotCacheKeys)) {
5897
+ slotCacheKeys.forEach((v) => {
5898
+ parent.renderCache[v] = void 0;
5899
+ });
5900
+ }
5878
5901
  scope.stop();
5879
5902
  if (job) {
5880
5903
  job.flags |= 8;
@@ -5970,8 +5993,8 @@ function toggleRecurse({ effect, job }, allowed) {
5970
5993
  effect.flags |= 32;
5971
5994
  job.flags |= 4;
5972
5995
  } else {
5973
- effect.flags &= ~32;
5974
- job.flags &= ~4;
5996
+ effect.flags &= -33;
5997
+ job.flags &= -5;
5975
5998
  }
5976
5999
  }
5977
6000
  function needTransition(parentSuspense, transition) {
@@ -5998,6 +6021,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
5998
6021
  if (c2.type === Comment && !c2.el) {
5999
6022
  c2.el = c1.el;
6000
6023
  }
6024
+ {
6025
+ c2.el && (c2.el.__vnode = c2);
6026
+ }
6001
6027
  }
6002
6028
  }
6003
6029
  }
@@ -7343,8 +7369,8 @@ function isSameVNodeType(n1, n2) {
7343
7369
  if (n2.shapeFlag & 6 && n1.component) {
7344
7370
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
7345
7371
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
7346
- n1.shapeFlag &= ~256;
7347
- n2.shapeFlag &= ~512;
7372
+ n1.shapeFlag &= -257;
7373
+ n2.shapeFlag &= -513;
7348
7374
  return false;
7349
7375
  }
7350
7376
  }
@@ -7805,7 +7831,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
7805
7831
  const { props, children } = instance.vnode;
7806
7832
  const isStateful = isStatefulComponent(instance);
7807
7833
  initProps(instance, props, isStateful, isSSR);
7808
- initSlots(instance, children, optimized);
7834
+ initSlots(instance, children, optimized || isSSR);
7809
7835
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
7810
7836
  isSSR && setInSSRSetupState(false);
7811
7837
  return setupResult;
@@ -8136,13 +8162,15 @@ function initCustomFormatter() {
8136
8162
  if (obj.__isVue) {
8137
8163
  return ["div", vueStyle, `VueInstance`];
8138
8164
  } else if (reactivity.isRef(obj)) {
8165
+ reactivity.pauseTracking();
8166
+ const value = obj.value;
8167
+ reactivity.resetTracking();
8139
8168
  return [
8140
8169
  "div",
8141
8170
  {},
8142
8171
  ["span", vueStyle, genRefFlag(obj)],
8143
8172
  "<",
8144
- // avoid debugger accessing value affecting behavior
8145
- formatValue("_value" in obj ? obj._value : obj),
8173
+ formatValue(value),
8146
8174
  `>`
8147
8175
  ];
8148
8176
  } else if (reactivity.isReactive(obj)) {
@@ -8323,7 +8351,7 @@ function isMemoSame(cached, memo) {
8323
8351
  return true;
8324
8352
  }
8325
8353
 
8326
- const version = "3.5.13";
8354
+ const version = "3.5.14";
8327
8355
  const warn = warn$1 ;
8328
8356
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8329
8357
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.13
2
+ * @vue/runtime-core v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -213,11 +213,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
213
213
  queue.splice(i, 1);
214
214
  i--;
215
215
  if (cb.flags & 4) {
216
- cb.flags &= ~1;
216
+ cb.flags &= -2;
217
217
  }
218
218
  cb();
219
219
  if (!(cb.flags & 4)) {
220
- cb.flags &= ~1;
220
+ cb.flags &= -2;
221
221
  }
222
222
  }
223
223
  }
@@ -236,10 +236,10 @@ function flushPostFlushCbs(seen) {
236
236
  for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
237
237
  const cb = activePostFlushCbs[postFlushIndex];
238
238
  if (cb.flags & 4) {
239
- cb.flags &= ~1;
239
+ cb.flags &= -2;
240
240
  }
241
241
  if (!(cb.flags & 8)) cb();
242
- cb.flags &= ~1;
242
+ cb.flags &= -2;
243
243
  }
244
244
  activePostFlushCbs = null;
245
245
  postFlushIndex = 0;
@@ -269,7 +269,7 @@ function flushJobs(seen) {
269
269
  for (; flushIndex < queue.length; flushIndex++) {
270
270
  const job = queue[flushIndex];
271
271
  if (job) {
272
- job.flags &= ~1;
272
+ job.flags &= -2;
273
273
  }
274
274
  }
275
275
  flushIndex = -1;
@@ -998,6 +998,9 @@ function getInnerChild$1(vnode) {
998
998
  }
999
999
  return vnode;
1000
1000
  }
1001
+ if (vnode.component) {
1002
+ return vnode.component.subTree;
1003
+ }
1001
1004
  const { shapeFlag, children } = vnode;
1002
1005
  if (children) {
1003
1006
  if (shapeFlag & 16) {
@@ -2028,7 +2031,7 @@ const KeepAliveImpl = {
2028
2031
  );
2029
2032
  const { include, exclude, max } = props;
2030
2033
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2031
- vnode.shapeFlag &= ~256;
2034
+ vnode.shapeFlag &= -257;
2032
2035
  current = vnode;
2033
2036
  return rawVNode;
2034
2037
  }
@@ -2115,8 +2118,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2115
2118
  }, target);
2116
2119
  }
2117
2120
  function resetShapeFlag(vnode) {
2118
- vnode.shapeFlag &= ~256;
2119
- vnode.shapeFlag &= ~512;
2121
+ vnode.shapeFlag &= -257;
2122
+ vnode.shapeFlag &= -513;
2120
2123
  }
2121
2124
  function getInnerChild(vnode) {
2122
2125
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2217,14 +2220,16 @@ function renderList(source, renderItem, cache, index) {
2217
2220
  if (sourceIsArray || shared.isString(source)) {
2218
2221
  const sourceIsReactiveArray = sourceIsArray && reactivity.isReactive(source);
2219
2222
  let needsWrap = false;
2223
+ let isReadonlySource = false;
2220
2224
  if (sourceIsReactiveArray) {
2221
2225
  needsWrap = !reactivity.isShallow(source);
2226
+ isReadonlySource = reactivity.isReadonly(source);
2222
2227
  source = reactivity.shallowReadArray(source);
2223
2228
  }
2224
2229
  ret = new Array(source.length);
2225
2230
  for (let i = 0, l = source.length; i < l; i++) {
2226
2231
  ret[i] = renderItem(
2227
- needsWrap ? reactivity.toReactive(source[i]) : source[i],
2232
+ needsWrap ? isReadonlySource ? reactivity.toReadonly(reactivity.toReactive(source[i])) : reactivity.toReactive(source[i]) : source[i],
2228
2233
  i,
2229
2234
  void 0,
2230
2235
  cached && cached[i]
@@ -3357,7 +3362,7 @@ const normalizeVNodeSlots = (instance, children) => {
3357
3362
  };
3358
3363
  const assignSlots = (slots, children, optimized) => {
3359
3364
  for (const key in children) {
3360
- if (optimized || key !== "_") {
3365
+ if (optimized || !isInternalKey(key)) {
3361
3366
  slots[key] = children[key];
3362
3367
  }
3363
3368
  }
@@ -4443,7 +4448,13 @@ function baseCreateRenderer(options, createHydrationFns) {
4443
4448
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
4444
4449
  } else {
4445
4450
  const { leave, delayLeave, afterLeave } = transition;
4446
- const remove2 = () => hostInsert(el, container, anchor);
4451
+ const remove2 = () => {
4452
+ if (vnode.ctx.isUnmounted) {
4453
+ hostRemove(el);
4454
+ } else {
4455
+ hostInsert(el, container, anchor);
4456
+ }
4457
+ };
4447
4458
  const performLeave = () => {
4448
4459
  leave(el, () => {
4449
4460
  remove2();
@@ -4476,7 +4487,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4476
4487
  optimized = false;
4477
4488
  }
4478
4489
  if (ref != null) {
4490
+ reactivity.pauseTracking();
4479
4491
  setRef(ref, null, parentSuspense, vnode, true);
4492
+ reactivity.resetTracking();
4480
4493
  }
4481
4494
  if (cacheIndex != null) {
4482
4495
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -4577,12 +4590,27 @@ function baseCreateRenderer(options, createHydrationFns) {
4577
4590
  hostRemove(end);
4578
4591
  };
4579
4592
  const unmountComponent = (instance, parentSuspense, doRemove) => {
4580
- const { bum, scope, job, subTree, um, m, a } = instance;
4593
+ const {
4594
+ bum,
4595
+ scope,
4596
+ job,
4597
+ subTree,
4598
+ um,
4599
+ m,
4600
+ a,
4601
+ parent,
4602
+ slots: { __: slotCacheKeys }
4603
+ } = instance;
4581
4604
  invalidateMount(m);
4582
4605
  invalidateMount(a);
4583
4606
  if (bum) {
4584
4607
  shared.invokeArrayFns(bum);
4585
4608
  }
4609
+ if (parent && shared.isArray(slotCacheKeys)) {
4610
+ slotCacheKeys.forEach((v) => {
4611
+ parent.renderCache[v] = void 0;
4612
+ });
4613
+ }
4586
4614
  scope.stop();
4587
4615
  if (job) {
4588
4616
  job.flags |= 8;
@@ -4675,8 +4703,8 @@ function toggleRecurse({ effect, job }, allowed) {
4675
4703
  effect.flags |= 32;
4676
4704
  job.flags |= 4;
4677
4705
  } else {
4678
- effect.flags &= ~32;
4679
- job.flags &= ~4;
4706
+ effect.flags &= -33;
4707
+ job.flags &= -5;
4680
4708
  }
4681
4709
  }
4682
4710
  function needTransition(parentSuspense, transition) {
@@ -4700,6 +4728,9 @@ function traverseStaticChildren(n1, n2, shallow = false) {
4700
4728
  if (c2.type === Text) {
4701
4729
  c2.el = c1.el;
4702
4730
  }
4731
+ if (c2.type === Comment && !c2.el) {
4732
+ c2.el = c1.el;
4733
+ }
4703
4734
  }
4704
4735
  }
4705
4736
  }
@@ -6275,7 +6306,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
6275
6306
  const { props, children } = instance.vnode;
6276
6307
  const isStateful = isStatefulComponent(instance);
6277
6308
  initProps(instance, props, isStateful, isSSR);
6278
- initSlots(instance, children, optimized);
6309
+ initSlots(instance, children, optimized || isSSR);
6279
6310
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
6280
6311
  isSSR && setInSSRSetupState(false);
6281
6312
  return setupResult;
@@ -6484,7 +6515,7 @@ function isMemoSame(cached, memo) {
6484
6515
  return true;
6485
6516
  }
6486
6517
 
6487
- const version = "3.5.13";
6518
+ const version = "3.5.14";
6488
6519
  const warn$1 = shared.NOOP;
6489
6520
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6490
6521
  const devtools = void 0;
@@ -1,4 +1,4 @@
1
- import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchEffect, WatchHandle, WatchSource, ReactiveMarker, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
1
+ import { computed as computed$1, Ref, OnCleanup, WatchStopHandle, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, WatchCallback, ReactiveEffect, DebuggerOptions, WatchSource, WatchHandle, ReactiveMarker, WatchEffect, ShallowRef, WatchErrorCodes, reactive } from '@vue/reactivity';
2
2
  export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, MaybeRef, MaybeRefOrGetter, Raw, Reactive, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WatchCallback, WatchEffect, WatchHandle, WatchSource, WatchStopHandle, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
3
3
  import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters, IsKeyValues } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
@@ -417,7 +417,7 @@ export interface ObjectDirective<HostElement = any, Value = any, Modifiers exten
417
417
  }
418
418
  export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg extends string = string> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;
419
419
  export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;
420
- type DirectiveModifiers<K extends string = string> = Record<K, boolean>;
420
+ type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;
421
421
  export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
422
422
  /**
423
423
  * Adds directives to a VNode.
@@ -872,20 +872,20 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
872
872
  filters?: Record<string, Function>;
873
873
  mixins?: Mixin[];
874
874
  extends?: Extends;
875
- beforeCreate?(): void;
876
- created?(): void;
877
- beforeMount?(): void;
878
- mounted?(): void;
879
- beforeUpdate?(): void;
880
- updated?(): void;
881
- activated?(): void;
882
- deactivated?(): void;
875
+ beforeCreate?(): any;
876
+ created?(): any;
877
+ beforeMount?(): any;
878
+ mounted?(): any;
879
+ beforeUpdate?(): any;
880
+ updated?(): any;
881
+ activated?(): any;
882
+ deactivated?(): any;
883
883
  /** @deprecated use `beforeUnmount` instead */
884
- beforeDestroy?(): void;
885
- beforeUnmount?(): void;
884
+ beforeDestroy?(): any;
885
+ beforeUnmount?(): any;
886
886
  /** @deprecated use `unmounted` instead */
887
- destroyed?(): void;
888
- unmounted?(): void;
887
+ destroyed?(): any;
888
+ unmounted?(): any;
889
889
  renderTracked?: DebuggerHook;
890
890
  renderTriggered?: DebuggerHook;
891
891
  errorCaptured?: ErrorCapturedHook;
@@ -1017,8 +1017,8 @@ InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide>
1017
1017
  export interface App<HostElement = any> {
1018
1018
  version: string;
1019
1019
  config: AppConfig;
1020
- use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: Options): this;
1021
- use<Options>(plugin: Plugin<Options>, options: Options): this;
1020
+ use<Options extends unknown[]>(plugin: Plugin<Options>, ...options: NoInfer<Options>): this;
1021
+ use<Options>(plugin: Plugin<Options>, options: NoInfer<Options>): this;
1022
1022
  mixin(mixin: ComponentOptions): this;
1023
1023
  component(name: string): Component | undefined;
1024
1024
  component<T extends Component | DefineComponent>(name: string, component: T): this;
@@ -1105,7 +1105,7 @@ export type ObjectPlugin<Options = any[]> = {
1105
1105
  install: PluginInstallFunction<Options>;
1106
1106
  };
1107
1107
  export type FunctionPlugin<Options = any[]> = PluginInstallFunction<Options> & Partial<ObjectPlugin<Options>>;
1108
- export type Plugin<Options = any[]> = FunctionPlugin<Options> | ObjectPlugin<Options>;
1108
+ export type Plugin<Options = any[], P extends unknown[] = Options extends unknown[] ? Options : [Options]> = FunctionPlugin<P> | ObjectPlugin<P>;
1109
1109
  export type CreateAppFunction<HostElement> = (rootComponent: Component, rootProps?: Data | null) => App<HostElement>;
1110
1110
 
1111
1111
  type TeleportVNode = VNode<RendererNode, RendererElement, TeleportProps>;
@@ -1525,7 +1525,8 @@ export declare function defineAsyncComponent<T extends Component = {
1525
1525
 
1526
1526
  export declare function useModel<M extends PropertyKey, T extends Record<string, any>, K extends keyof T, G = T[K], S = T[K]>(props: T, name: K, options?: DefineModelOptions<T[K], G, S>): ModelRef<T[K], M, G, S>;
1527
1527
 
1528
- export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): Readonly<ShallowRef<T | null>>;
1528
+ export type TemplateRef<T = unknown> = Readonly<ShallowRef<T | null>>;
1529
+ export declare function useTemplateRef<T = unknown, Keys extends string = string>(key: Keys): TemplateRef<T>;
1529
1530
 
1530
1531
  export declare function useId(): string;
1531
1532
 
@@ -1798,7 +1799,8 @@ declare module '@vue/reactivity' {
1798
1799
 
1799
1800
  export declare const DeprecationTypes: typeof DeprecationTypes$1;
1800
1801
 
1801
- export { type WatchEffectOptions as WatchOptionsBase, createBaseVNode as createElementVNode, };
1802
+ export { createBaseVNode as createElementVNode, };
1803
+ export type { WatchEffectOptions as WatchOptionsBase };
1802
1804
  // Note: this file is auto concatenated to the end of the bundled d.ts during
1803
1805
  // build.
1804
1806
 
@@ -1,11 +1,11 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.13
2
+ * @vue/runtime-core v3.5.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isReadonly } from '@vue/reactivity';
6
+ import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
7
7
  export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
8
- import { isString, isFunction, isPromise, isArray, EMPTY_OBJ, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, capitalize, camelize, isSymbol, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
8
+ import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, NO, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
10
10
 
11
11
  const stack = [];
@@ -351,11 +351,11 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
351
351
  queue.splice(i, 1);
352
352
  i--;
353
353
  if (cb.flags & 4) {
354
- cb.flags &= ~1;
354
+ cb.flags &= -2;
355
355
  }
356
356
  cb();
357
357
  if (!(cb.flags & 4)) {
358
- cb.flags &= ~1;
358
+ cb.flags &= -2;
359
359
  }
360
360
  }
361
361
  }
@@ -380,10 +380,10 @@ function flushPostFlushCbs(seen) {
380
380
  continue;
381
381
  }
382
382
  if (cb.flags & 4) {
383
- cb.flags &= ~1;
383
+ cb.flags &= -2;
384
384
  }
385
385
  if (!(cb.flags & 8)) cb();
386
- cb.flags &= ~1;
386
+ cb.flags &= -2;
387
387
  }
388
388
  activePostFlushCbs = null;
389
389
  postFlushIndex = 0;
@@ -419,7 +419,7 @@ function flushJobs(seen) {
419
419
  for (; flushIndex < queue.length; flushIndex++) {
420
420
  const job = queue[flushIndex];
421
421
  if (job) {
422
- job.flags &= ~1;
422
+ job.flags &= -2;
423
423
  }
424
424
  }
425
425
  flushIndex = -1;
@@ -908,7 +908,7 @@ const TeleportImpl = {
908
908
  namespace,
909
909
  slotScopeIds
910
910
  );
911
- traverseStaticChildren(n1, n2, true);
911
+ traverseStaticChildren(n1, n2, !!!(process.env.NODE_ENV !== "production"));
912
912
  } else if (!optimized) {
913
913
  patchChildren(
914
914
  n1,
@@ -1425,7 +1425,7 @@ function getInnerChild$1(vnode) {
1425
1425
  }
1426
1426
  return vnode;
1427
1427
  }
1428
- if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
1428
+ if (vnode.component) {
1429
1429
  return vnode.component.subTree;
1430
1430
  }
1431
1431
  const { shapeFlag, children } = vnode;
@@ -2605,6 +2605,9 @@ const KeepAliveImpl = {
2605
2605
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
2606
2606
  devtoolsComponentAdded(instance2);
2607
2607
  }
2608
+ if (!!(process.env.NODE_ENV !== "production") && true) {
2609
+ instance2.__keepAliveStorageContainer = storageContainer;
2610
+ }
2608
2611
  };
2609
2612
  function unmount(vnode) {
2610
2613
  resetShapeFlag(vnode);
@@ -2692,7 +2695,7 @@ const KeepAliveImpl = {
2692
2695
  );
2693
2696
  const { include, exclude, max } = props;
2694
2697
  if (include && (!name || !matches(include, name)) || exclude && name && matches(exclude, name)) {
2695
- vnode.shapeFlag &= ~256;
2698
+ vnode.shapeFlag &= -257;
2696
2699
  current = vnode;
2697
2700
  return rawVNode;
2698
2701
  }
@@ -2779,8 +2782,8 @@ function injectToKeepAliveRoot(hook, type, target, keepAliveRoot) {
2779
2782
  }, target);
2780
2783
  }
2781
2784
  function resetShapeFlag(vnode) {
2782
- vnode.shapeFlag &= ~256;
2783
- vnode.shapeFlag &= ~512;
2785
+ vnode.shapeFlag &= -257;
2786
+ vnode.shapeFlag &= -513;
2784
2787
  }
2785
2788
  function getInnerChild(vnode) {
2786
2789
  return vnode.shapeFlag & 128 ? vnode.ssContent : vnode;
@@ -2895,14 +2898,16 @@ function renderList(source, renderItem, cache, index) {
2895
2898
  if (sourceIsArray || isString(source)) {
2896
2899
  const sourceIsReactiveArray = sourceIsArray && isReactive(source);
2897
2900
  let needsWrap = false;
2901
+ let isReadonlySource = false;
2898
2902
  if (sourceIsReactiveArray) {
2899
2903
  needsWrap = !isShallow(source);
2904
+ isReadonlySource = isReadonly(source);
2900
2905
  source = shallowReadArray(source);
2901
2906
  }
2902
2907
  ret = new Array(source.length);
2903
2908
  for (let i = 0, l = source.length; i < l; i++) {
2904
2909
  ret[i] = renderItem(
2905
- needsWrap ? toReactive(source[i]) : source[i],
2910
+ needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i],
2906
2911
  i,
2907
2912
  void 0,
2908
2913
  cached && cached[i]
@@ -3928,11 +3933,9 @@ function createAppAPI(render, hydrate) {
3928
3933
  }
3929
3934
  if (!!(process.env.NODE_ENV !== "production")) {
3930
3935
  context.reload = () => {
3931
- render(
3932
- cloneVNode(vnode),
3933
- rootContainer,
3934
- namespace
3935
- );
3936
+ const cloned = cloneVNode(vnode);
3937
+ cloned.el = null;
3938
+ render(cloned, rootContainer, namespace);
3936
3939
  };
3937
3940
  }
3938
3941
  if (isHydrate && hydrate) {
@@ -4455,7 +4458,7 @@ const normalizeSlot = (key, rawSlot, ctx) => {
4455
4458
  return rawSlot;
4456
4459
  }
4457
4460
  const normalized = withCtx((...args) => {
4458
- if (!!(process.env.NODE_ENV !== "production") && currentInstance && (!ctx || ctx.root === currentInstance.root)) {
4461
+ if (!!(process.env.NODE_ENV !== "production") && currentInstance && !(ctx === null && currentRenderingInstance) && !(ctx && ctx.root !== currentInstance.root)) {
4459
4462
  warn$1(
4460
4463
  `Slot "${key}" invoked outside of the render function: this will not track dependencies used in the slot. Invoke the slot function inside the render function instead.`
4461
4464
  );
@@ -4494,7 +4497,7 @@ const normalizeVNodeSlots = (instance, children) => {
4494
4497
  };
4495
4498
  const assignSlots = (slots, children, optimized) => {
4496
4499
  for (const key in children) {
4497
- if (optimized || key !== "_") {
4500
+ if (optimized || !isInternalKey(key)) {
4498
4501
  slots[key] = children[key];
4499
4502
  }
4500
4503
  }
@@ -5218,8 +5221,8 @@ function baseCreateRenderer(options, createHydrationFns) {
5218
5221
  endMeasure(instance, `init`);
5219
5222
  }
5220
5223
  }
5224
+ if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
5221
5225
  if (instance.asyncDep) {
5222
- if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) initialVNode.el = null;
5223
5226
  parentSuspense && parentSuspense.registerDep(instance, setupRenderEffect, optimized);
5224
5227
  if (!initialVNode.el) {
5225
5228
  const placeholder = instance.subTree = createVNode(Comment);
@@ -5781,7 +5784,13 @@ function baseCreateRenderer(options, createHydrationFns) {
5781
5784
  queuePostRenderEffect(() => transition.enter(el), parentSuspense);
5782
5785
  } else {
5783
5786
  const { leave, delayLeave, afterLeave } = transition;
5784
- const remove2 = () => hostInsert(el, container, anchor);
5787
+ const remove2 = () => {
5788
+ if (vnode.ctx.isUnmounted) {
5789
+ hostRemove(el);
5790
+ } else {
5791
+ hostInsert(el, container, anchor);
5792
+ }
5793
+ };
5785
5794
  const performLeave = () => {
5786
5795
  leave(el, () => {
5787
5796
  remove2();
@@ -5814,7 +5823,9 @@ function baseCreateRenderer(options, createHydrationFns) {
5814
5823
  optimized = false;
5815
5824
  }
5816
5825
  if (ref != null) {
5826
+ pauseTracking();
5817
5827
  setRef(ref, null, parentSuspense, vnode, true);
5828
+ resetTracking();
5818
5829
  }
5819
5830
  if (cacheIndex != null) {
5820
5831
  parentComponent.renderCache[cacheIndex] = void 0;
@@ -5926,12 +5937,27 @@ function baseCreateRenderer(options, createHydrationFns) {
5926
5937
  if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
5927
5938
  unregisterHMR(instance);
5928
5939
  }
5929
- const { bum, scope, job, subTree, um, m, a } = instance;
5940
+ const {
5941
+ bum,
5942
+ scope,
5943
+ job,
5944
+ subTree,
5945
+ um,
5946
+ m,
5947
+ a,
5948
+ parent,
5949
+ slots: { __: slotCacheKeys }
5950
+ } = instance;
5930
5951
  invalidateMount(m);
5931
5952
  invalidateMount(a);
5932
5953
  if (bum) {
5933
5954
  invokeArrayFns(bum);
5934
5955
  }
5956
+ if (parent && isArray(slotCacheKeys)) {
5957
+ slotCacheKeys.forEach((v) => {
5958
+ parent.renderCache[v] = void 0;
5959
+ });
5960
+ }
5935
5961
  scope.stop();
5936
5962
  if (job) {
5937
5963
  job.flags |= 8;
@@ -6027,8 +6053,8 @@ function toggleRecurse({ effect, job }, allowed) {
6027
6053
  effect.flags |= 32;
6028
6054
  job.flags |= 4;
6029
6055
  } else {
6030
- effect.flags &= ~32;
6031
- job.flags &= ~4;
6056
+ effect.flags &= -33;
6057
+ job.flags &= -5;
6032
6058
  }
6033
6059
  }
6034
6060
  function needTransition(parentSuspense, transition) {
@@ -6052,9 +6078,12 @@ function traverseStaticChildren(n1, n2, shallow = false) {
6052
6078
  if (c2.type === Text) {
6053
6079
  c2.el = c1.el;
6054
6080
  }
6055
- if (!!(process.env.NODE_ENV !== "production") && c2.type === Comment && !c2.el) {
6081
+ if (c2.type === Comment && !c2.el) {
6056
6082
  c2.el = c1.el;
6057
6083
  }
6084
+ if (!!(process.env.NODE_ENV !== "production")) {
6085
+ c2.el && (c2.el.__vnode = c2);
6086
+ }
6058
6087
  }
6059
6088
  }
6060
6089
  }
@@ -7400,8 +7429,8 @@ function isSameVNodeType(n1, n2) {
7400
7429
  if (!!(process.env.NODE_ENV !== "production") && n2.shapeFlag & 6 && n1.component) {
7401
7430
  const dirtyInstances = hmrDirtyComponents.get(n2.type);
7402
7431
  if (dirtyInstances && dirtyInstances.has(n1.component)) {
7403
- n1.shapeFlag &= ~256;
7404
- n2.shapeFlag &= ~512;
7432
+ n1.shapeFlag &= -257;
7433
+ n2.shapeFlag &= -513;
7405
7434
  return false;
7406
7435
  }
7407
7436
  }
@@ -7864,7 +7893,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
7864
7893
  const { props, children } = instance.vnode;
7865
7894
  const isStateful = isStatefulComponent(instance);
7866
7895
  initProps(instance, props, isStateful, isSSR);
7867
- initSlots(instance, children, optimized);
7896
+ initSlots(instance, children, optimized || isSSR);
7868
7897
  const setupResult = isStateful ? setupStatefulComponent(instance, isSSR) : void 0;
7869
7898
  isSSR && setInSSRSetupState(false);
7870
7899
  return setupResult;
@@ -8207,13 +8236,15 @@ function initCustomFormatter() {
8207
8236
  if (obj.__isVue) {
8208
8237
  return ["div", vueStyle, `VueInstance`];
8209
8238
  } else if (isRef(obj)) {
8239
+ pauseTracking();
8240
+ const value = obj.value;
8241
+ resetTracking();
8210
8242
  return [
8211
8243
  "div",
8212
8244
  {},
8213
8245
  ["span", vueStyle, genRefFlag(obj)],
8214
8246
  "<",
8215
- // avoid debugger accessing value affecting behavior
8216
- formatValue("_value" in obj ? obj._value : obj),
8247
+ formatValue(value),
8217
8248
  `>`
8218
8249
  ];
8219
8250
  } else if (isReactive(obj)) {
@@ -8394,7 +8425,7 @@ function isMemoSame(cached, memo) {
8394
8425
  return true;
8395
8426
  }
8396
8427
 
8397
- const version = "3.5.13";
8428
+ const version = "3.5.14";
8398
8429
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8399
8430
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8400
8431
  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.5.13",
3
+ "version": "3.5.14",
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.5.13",
50
- "@vue/reactivity": "3.5.13"
49
+ "@vue/shared": "3.5.14",
50
+ "@vue/reactivity": "3.5.14"
51
51
  }
52
52
  }