@vue/runtime-core 3.5.1 → 3.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.1
2
+ * @vue/runtime-core v3.5.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -312,9 +312,7 @@ function queueJob(job) {
312
312
  } else {
313
313
  queue.splice(findInsertionIndex(jobId), 0, job);
314
314
  }
315
- if (!(job.flags & 4)) {
316
- job.flags |= 1;
317
- }
315
+ job.flags |= 1;
318
316
  queueFlush();
319
317
  }
320
318
  }
@@ -330,9 +328,7 @@ function queuePostFlushCb(cb) {
330
328
  activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
331
329
  } else if (!(cb.flags & 1)) {
332
330
  pendingPostFlushCbs.push(cb);
333
- if (!(cb.flags & 4)) {
334
- cb.flags |= 1;
335
- }
331
+ cb.flags |= 1;
336
332
  }
337
333
  } else {
338
334
  pendingPostFlushCbs.push(...cb);
@@ -354,6 +350,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
354
350
  }
355
351
  queue.splice(i, 1);
356
352
  i--;
353
+ if (cb.flags & 4) {
354
+ cb.flags &= ~1;
355
+ }
357
356
  cb();
358
357
  cb.flags &= ~1;
359
358
  }
@@ -378,6 +377,9 @@ function flushPostFlushCbs(seen) {
378
377
  if (checkRecursiveUpdates(seen, cb)) {
379
378
  continue;
380
379
  }
380
+ if (cb.flags & 4) {
381
+ cb.flags &= ~1;
382
+ }
381
383
  if (!(cb.flags & 8)) cb();
382
384
  cb.flags &= ~1;
383
385
  }
@@ -400,6 +402,9 @@ function flushJobs(seen) {
400
402
  if (check(job)) {
401
403
  continue;
402
404
  }
405
+ if (job.flags & 4) {
406
+ job.flags &= ~1;
407
+ }
403
408
  callWithErrorHandling(
404
409
  job,
405
410
  job.i,
@@ -409,6 +414,12 @@ function flushJobs(seen) {
409
414
  }
410
415
  }
411
416
  } finally {
417
+ for (; flushIndex < queue.length; flushIndex++) {
418
+ const job = queue[flushIndex];
419
+ if (job) {
420
+ job.flags &= ~1;
421
+ }
422
+ }
412
423
  flushIndex = 0;
413
424
  queue.length = 0;
414
425
  flushPostFlushCbs(seen);
@@ -1165,6 +1176,7 @@ const BaseTransitionImpl = {
1165
1176
  if (!(instance.job.flags & 8)) {
1166
1177
  instance.update();
1167
1178
  }
1179
+ delete leavingHooks.afterLeave;
1168
1180
  };
1169
1181
  return emptyPlaceholder(child);
1170
1182
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -1442,6 +1454,34 @@ function markAsyncBoundary(instance) {
1442
1454
  instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
1443
1455
  }
1444
1456
 
1457
+ const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
1458
+ function useTemplateRef(key) {
1459
+ const i = getCurrentInstance();
1460
+ const r = reactivity.shallowRef(null);
1461
+ if (i) {
1462
+ const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;
1463
+ let desc;
1464
+ if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
1465
+ warn$1(`useTemplateRef('${key}') already exists.`);
1466
+ } else {
1467
+ Object.defineProperty(refs, key, {
1468
+ enumerable: true,
1469
+ get: () => r.value,
1470
+ set: (val) => r.value = val
1471
+ });
1472
+ }
1473
+ } else {
1474
+ warn$1(
1475
+ `useTemplateRef() is called when there is no active component instance to be associated with.`
1476
+ );
1477
+ }
1478
+ const ret = reactivity.readonly(r) ;
1479
+ {
1480
+ knownTemplateRefs.add(ret);
1481
+ }
1482
+ return ret;
1483
+ }
1484
+
1445
1485
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1446
1486
  if (shared.isArray(rawRef)) {
1447
1487
  rawRef.forEach(
@@ -1470,7 +1510,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1470
1510
  const oldRef = oldRawRef && oldRawRef.r;
1471
1511
  const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;
1472
1512
  const setupState = owner.setupState;
1473
- const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => shared.hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || shared.EMPTY_OBJ).get;
1513
+ const rawSetupState = reactivity.toRaw(setupState);
1514
+ const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => {
1515
+ if (knownTemplateRefs.has(rawSetupState[key])) {
1516
+ return false;
1517
+ }
1518
+ return shared.hasOwn(rawSetupState, key);
1519
+ };
1474
1520
  if (oldRef != null && oldRef !== ref) {
1475
1521
  if (shared.isString(oldRef)) {
1476
1522
  refs[oldRef] = null;
@@ -2527,7 +2573,7 @@ const KeepAliveImpl = {
2527
2573
  return () => {
2528
2574
  pendingCacheKey = null;
2529
2575
  if (!slots.default) {
2530
- return null;
2576
+ return current = null;
2531
2577
  }
2532
2578
  const children = slots.default();
2533
2579
  const rawVNode = children[0];
@@ -6284,7 +6330,8 @@ function renderComponentRoot(instance) {
6284
6330
  data,
6285
6331
  setupState,
6286
6332
  ctx,
6287
- inheritAttrs
6333
+ inheritAttrs,
6334
+ isMounted
6288
6335
  } = instance;
6289
6336
  const prev = setCurrentRenderingInstance(instance);
6290
6337
  let result;
@@ -6404,7 +6451,7 @@ function renderComponentRoot(instance) {
6404
6451
  `Component inside <Transition> renders non-element root node that cannot be animated.`
6405
6452
  );
6406
6453
  }
6407
- root.transition = vnode.transition;
6454
+ root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
6408
6455
  }
6409
6456
  if (setRoot) {
6410
6457
  setRoot(root);
@@ -6898,7 +6945,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
6898
6945
  };
6899
6946
  }
6900
6947
  if (activeBranch) {
6901
- if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
6948
+ if (parentNode(activeBranch.el) === container2) {
6902
6949
  anchor = next(activeBranch);
6903
6950
  }
6904
6951
  unmount(activeBranch, parentComponent2, suspense, true);
@@ -7959,29 +8006,6 @@ const computed = (getterOrOptions, debugOptions) => {
7959
8006
  return c;
7960
8007
  };
7961
8008
 
7962
- function useTemplateRef(key) {
7963
- const i = getCurrentInstance();
7964
- const r = reactivity.shallowRef(null);
7965
- if (i) {
7966
- const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;
7967
- let desc;
7968
- if ((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
7969
- warn$1(`useTemplateRef('${key}') already exists.`);
7970
- } else {
7971
- Object.defineProperty(refs, key, {
7972
- enumerable: true,
7973
- get: () => r.value,
7974
- set: (val) => r.value = val
7975
- });
7976
- }
7977
- } else {
7978
- warn$1(
7979
- `useTemplateRef() is called when there is no active component instance to be associated with.`
7980
- );
7981
- }
7982
- return reactivity.readonly(r) ;
7983
- }
7984
-
7985
8009
  function h(type, propsOrChildren, children) {
7986
8010
  const l = arguments.length;
7987
8011
  if (l === 2) {
@@ -8207,7 +8231,7 @@ function isMemoSame(cached, memo) {
8207
8231
  return true;
8208
8232
  }
8209
8233
 
8210
- const version = "3.5.1";
8234
+ const version = "3.5.2";
8211
8235
  const warn = warn$1 ;
8212
8236
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8213
8237
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.1
2
+ * @vue/runtime-core v3.5.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -179,9 +179,7 @@ function queueJob(job) {
179
179
  } else {
180
180
  queue.splice(findInsertionIndex(jobId), 0, job);
181
181
  }
182
- if (!(job.flags & 4)) {
183
- job.flags |= 1;
184
- }
182
+ job.flags |= 1;
185
183
  queueFlush();
186
184
  }
187
185
  }
@@ -197,9 +195,7 @@ function queuePostFlushCb(cb) {
197
195
  activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
198
196
  } else if (!(cb.flags & 1)) {
199
197
  pendingPostFlushCbs.push(cb);
200
- if (!(cb.flags & 4)) {
201
- cb.flags |= 1;
202
- }
198
+ cb.flags |= 1;
203
199
  }
204
200
  } else {
205
201
  pendingPostFlushCbs.push(...cb);
@@ -215,6 +211,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
215
211
  }
216
212
  queue.splice(i, 1);
217
213
  i--;
214
+ if (cb.flags & 4) {
215
+ cb.flags &= ~1;
216
+ }
218
217
  cb();
219
218
  cb.flags &= ~1;
220
219
  }
@@ -233,6 +232,9 @@ function flushPostFlushCbs(seen) {
233
232
  activePostFlushCbs = deduped;
234
233
  for (postFlushIndex = 0; postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
235
234
  const cb = activePostFlushCbs[postFlushIndex];
235
+ if (cb.flags & 4) {
236
+ cb.flags &= ~1;
237
+ }
236
238
  if (!(cb.flags & 8)) cb();
237
239
  cb.flags &= ~1;
238
240
  }
@@ -249,6 +251,9 @@ function flushJobs(seen) {
249
251
  const job = queue[flushIndex];
250
252
  if (job && !(job.flags & 8)) {
251
253
  if (false) ;
254
+ if (job.flags & 4) {
255
+ job.flags &= ~1;
256
+ }
252
257
  callWithErrorHandling(
253
258
  job,
254
259
  job.i,
@@ -258,6 +263,12 @@ function flushJobs(seen) {
258
263
  }
259
264
  }
260
265
  } finally {
266
+ for (; flushIndex < queue.length; flushIndex++) {
267
+ const job = queue[flushIndex];
268
+ if (job) {
269
+ job.flags &= ~1;
270
+ }
271
+ }
261
272
  flushIndex = 0;
262
273
  queue.length = 0;
263
274
  flushPostFlushCbs();
@@ -743,6 +754,7 @@ const BaseTransitionImpl = {
743
754
  if (!(instance.job.flags & 8)) {
744
755
  instance.update();
745
756
  }
757
+ delete leavingHooks.afterLeave;
746
758
  };
747
759
  return emptyPlaceholder(child);
748
760
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -1006,6 +1018,23 @@ function markAsyncBoundary(instance) {
1006
1018
  instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
1007
1019
  }
1008
1020
 
1021
+ function useTemplateRef(key) {
1022
+ const i = getCurrentInstance();
1023
+ const r = reactivity.shallowRef(null);
1024
+ if (i) {
1025
+ const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;
1026
+ {
1027
+ Object.defineProperty(refs, key, {
1028
+ enumerable: true,
1029
+ get: () => r.value,
1030
+ set: (val) => r.value = val
1031
+ });
1032
+ }
1033
+ }
1034
+ const ret = r;
1035
+ return ret;
1036
+ }
1037
+
1009
1038
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1010
1039
  if (shared.isArray(rawRef)) {
1011
1040
  rawRef.forEach(
@@ -1028,7 +1057,10 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1028
1057
  const oldRef = oldRawRef && oldRawRef.r;
1029
1058
  const refs = owner.refs === shared.EMPTY_OBJ ? owner.refs = {} : owner.refs;
1030
1059
  const setupState = owner.setupState;
1031
- const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => shared.hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || shared.EMPTY_OBJ).get;
1060
+ const rawSetupState = reactivity.toRaw(setupState);
1061
+ const canSetSetupRef = setupState === shared.EMPTY_OBJ ? () => false : (key) => {
1062
+ return shared.hasOwn(rawSetupState, key);
1063
+ };
1032
1064
  if (oldRef != null && oldRef !== ref) {
1033
1065
  if (shared.isString(oldRef)) {
1034
1066
  refs[oldRef] = null;
@@ -1896,7 +1928,7 @@ const KeepAliveImpl = {
1896
1928
  return () => {
1897
1929
  pendingCacheKey = null;
1898
1930
  if (!slots.default) {
1899
- return null;
1931
+ return current = null;
1900
1932
  }
1901
1933
  const children = slots.default();
1902
1934
  const rawVNode = children[0];
@@ -4924,7 +4956,8 @@ function renderComponentRoot(instance) {
4924
4956
  data,
4925
4957
  setupState,
4926
4958
  ctx,
4927
- inheritAttrs
4959
+ inheritAttrs,
4960
+ isMounted
4928
4961
  } = instance;
4929
4962
  const prev = setCurrentRenderingInstance(instance);
4930
4963
  let result;
@@ -5001,7 +5034,7 @@ function renderComponentRoot(instance) {
5001
5034
  root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
5002
5035
  }
5003
5036
  if (vnode.transition) {
5004
- root.transition = vnode.transition;
5037
+ root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
5005
5038
  }
5006
5039
  {
5007
5040
  result = root;
@@ -5439,7 +5472,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5439
5472
  };
5440
5473
  }
5441
5474
  if (activeBranch) {
5442
- if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
5475
+ if (parentNode(activeBranch.el) === container2) {
5443
5476
  anchor = next(activeBranch);
5444
5477
  }
5445
5478
  unmount(activeBranch, parentComponent2, suspense, true);
@@ -6309,22 +6342,6 @@ const computed = (getterOrOptions, debugOptions) => {
6309
6342
  return c;
6310
6343
  };
6311
6344
 
6312
- function useTemplateRef(key) {
6313
- const i = getCurrentInstance();
6314
- const r = reactivity.shallowRef(null);
6315
- if (i) {
6316
- const refs = i.refs === shared.EMPTY_OBJ ? i.refs = {} : i.refs;
6317
- {
6318
- Object.defineProperty(refs, key, {
6319
- enumerable: true,
6320
- get: () => r.value,
6321
- set: (val) => r.value = val
6322
- });
6323
- }
6324
- }
6325
- return r;
6326
- }
6327
-
6328
6345
  function h(type, propsOrChildren, children) {
6329
6346
  const l = arguments.length;
6330
6347
  if (l === 2) {
@@ -6378,7 +6395,7 @@ function isMemoSame(cached, memo) {
6378
6395
  return true;
6379
6396
  }
6380
6397
 
6381
- const version = "3.5.1";
6398
+ const version = "3.5.2";
6382
6399
  const warn$1 = shared.NOOP;
6383
6400
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6384
6401
  const devtools = void 0;
@@ -1,6 +1,6 @@
1
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';
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
- import { IfAny, Prettify, Awaited, LooseRequired, UnionToIntersection, OverloadParameters } from '@vue/shared';
3
+ import { IfAny, Prettify, LooseRequired, UnionToIntersection, OverloadParameters } from '@vue/shared';
4
4
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
5
5
 
6
6
  export declare const computed: typeof computed$1;
@@ -476,12 +476,12 @@ export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends Comp
476
476
  * inference everywhere internally, but it has to be a new type to avoid
477
477
  * breaking types that relies on previous arguments order (#10842)
478
478
  */
479
- export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs>;
479
+ export type CreateComponentPublicInstanceWithMixins<P = {}, B = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, TypeRefs extends Data = {}, TypeEl extends Element = any, Provide extends ComponentProvideOptions = ComponentProvideOptions, PublicMixin = IntersectionMixin<Mixin> & IntersectionMixin<Extends>, PublicP = UnwrapMixinsType<PublicMixin, 'P'> & EnsureNonVoid<P>, PublicB = UnwrapMixinsType<PublicMixin, 'B'> & EnsureNonVoid<B>, PublicD = UnwrapMixinsType<PublicMixin, 'D'> & EnsureNonVoid<D>, PublicC extends ComputedOptions = UnwrapMixinsType<PublicMixin, 'C'> & EnsureNonVoid<C>, PublicM extends MethodOptions = UnwrapMixinsType<PublicMixin, 'M'> & EnsureNonVoid<M>, PublicDefaults = UnwrapMixinsType<PublicMixin, 'Defaults'> & EnsureNonVoid<Defaults>> = ComponentPublicInstance<PublicP, PublicB, PublicD, PublicC, PublicM, E, PublicProps, PublicDefaults, MakeDefaultsOptional, ComponentOptionsBase<P, B, D, C, M, Mixin, Extends, E, string, Defaults, {}, string, S, LC, Directives, Exposed, Provide>, I, S, Exposed, TypeRefs, TypeEl>;
480
480
  type ExposedKeys<T, Exposed extends string & keyof T> = '' extends Exposed ? T : Pick<T, Exposed>;
481
481
  export type ComponentPublicInstance<P = {}, // props type extracted from props option
482
482
  B = {}, // raw bindings returned from setup()
483
483
  D = {}, // return from data()
484
- C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = '', TypeRefs extends Data = {}> = {
484
+ C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = {}, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}, S extends SlotsType = {}, Exposed extends string = '', TypeRefs extends Data = {}, TypeEl extends Element = any> = {
485
485
  $: ComponentInternalInstance;
486
486
  $data: D;
487
487
  $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps;
@@ -492,7 +492,7 @@ C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOpt
492
492
  $parent: ComponentPublicInstance | null;
493
493
  $host: Element | null;
494
494
  $emit: EmitFn<E>;
495
- $el: any;
495
+ $el: TypeEl;
496
496
  $options: Options & MergedComponentOptionsOverride;
497
497
  $forceUpdate: () => void;
498
498
  $nextTick: typeof nextTick;
@@ -977,8 +977,9 @@ export declare function hasInjectionContext(): boolean;
977
977
 
978
978
  export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
979
979
  type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);
980
- export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;
980
+ export type DefineComponent<PropsOrPropOptions = {}, RawBindings = {}, D = {}, C extends ComputedOptions = ComputedOptions, M extends MethodOptions = MethodOptions, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = {}, EE extends string = string, PP = PublicProps, Props = ResolveProps<PropsOrPropOptions, E>, Defaults = ExtractDefaultPropTypes<PropsOrPropOptions>, S extends SlotsType = {}, LC extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, MakeDefaultsOptional extends boolean = true, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP & Props, Defaults, MakeDefaultsOptional, {}, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, TypeRefs, TypeEl>> & ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, {}, string, S, LC & GlobalComponents, Directives & GlobalDirectives, Exposed, Provide> & PP;
981
981
  export type DefineSetupFnComponent<P extends Record<string, any>, E extends EmitsOptions = {}, S extends SlotsType = SlotsType, Props = P & EmitsToProps<E>, PP = PublicProps> = new (props: Props & PP) => CreateComponentPublicInstanceWithMixins<Props, {}, {}, {}, {}, ComponentOptionsMixin, ComponentOptionsMixin, E, PP, {}, false, {}, S>;
982
+ type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>;
982
983
  export declare function defineComponent<Props extends Record<string, any>, E extends EmitsOptions = {}, EE extends string = string, S extends SlotsType = {}>(setup: (props: Props, ctx: SetupContext<E, S>) => RenderFunction | Promise<RenderFunction>, options?: Pick<ComponentOptions, 'name' | 'inheritAttrs'> & {
983
984
  props?: (keyof Props)[];
984
985
  emits?: E | EE[];
@@ -991,7 +992,7 @@ export declare function defineComponent<Props extends Record<string, any>, E ext
991
992
  }): DefineSetupFnComponent<Props, E, S>;
992
993
  export declare function defineComponent<TypeProps, RuntimePropsOptions extends ComponentObjectPropsOptions = ComponentObjectPropsOptions, RuntimePropsKeys extends string = string, TypeEmits extends ComponentTypeEmits = {}, RuntimeEmitsOptions extends EmitsOptions = {}, RuntimeEmitsKeys extends string = string, Data = {}, SetupBindings = {}, Computed extends ComputedOptions = {}, Methods extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, InjectOptions extends ComponentInjectOptions = {}, InjectKeys extends string = string, Slots extends SlotsType = {}, LocalComponents extends Record<string, Component> = {}, Directives extends Record<string, Directive> = {}, Exposed extends string = string, Provide extends ComponentProvideOptions = ComponentProvideOptions, ResolvedEmits extends EmitsOptions = {} extends RuntimeEmitsOptions ? TypeEmitsToOptions<TypeEmits> : RuntimeEmitsOptions, InferredProps = unknown extends TypeProps ? string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
993
994
  [key in RuntimePropsKeys]?: any;
994
- } : TypeProps, ResolvedProps = Readonly<InferredProps> & Readonly<EmitsToProps<ResolvedEmits>>, TypeRefs extends Record<string, unknown> = {}>(options: {
995
+ } : TypeProps, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: {
995
996
  props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
996
997
  /**
997
998
  * @private for language-tools use only
@@ -1005,8 +1006,12 @@ export declare function defineComponent<TypeProps, RuntimePropsOptions extends C
1005
1006
  * @private for language-tools use only
1006
1007
  */
1007
1008
  __typeRefs?: TypeRefs;
1008
- } & ComponentOptionsBase<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, // Defaults
1009
- InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ResolvedProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ResolvedProps, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs>;
1009
+ /**
1010
+ * @private for language-tools use only
1011
+ */
1012
+ __typeEl?: TypeEl;
1013
+ } & ComponentOptionsBase<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, RuntimeEmitsOptions, RuntimeEmitsKeys, {}, // Defaults
1014
+ InjectOptions, InjectKeys, Slots, LocalComponents, Directives, Exposed, Provide> & ThisType<CreateComponentPublicInstanceWithMixins<ToResolvedProps<InferredProps, ResolvedEmits>, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, {}, false, InjectOptions, Slots, LocalComponents, Directives, Exposed>>): DefineComponent<InferredProps, SetupBindings, Data, Computed, Methods, Mixin, Extends, ResolvedEmits, RuntimeEmitsKeys, PublicProps, ToResolvedProps<InferredProps, ResolvedEmits>, ExtractDefaultPropTypes<RuntimePropsOptions>, Slots, LocalComponents, Directives, Exposed, Provide, unknown extends TypeProps ? true : false, TypeRefs, TypeEl>;
1010
1015
 
1011
1016
  export interface App<HostElement = any> {
1012
1017
  version: string;
@@ -1,9 +1,9 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.1
2
+ * @vue/runtime-core v3.5.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
6
- import { pauseTracking, resetTracking, isRef, toRaw, traverse, isReactive, ref, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, shallowRef, readonly, isShallow, isReadonly } from '@vue/reactivity';
6
+ import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, shallowReadArray, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, isShallow, isReadonly } 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
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, isGloballyAllowed, NO, hyphenate, EMPTY_ARR, toRawType, makeMap, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
9
9
  export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
@@ -315,9 +315,7 @@ function queueJob(job) {
315
315
  } else {
316
316
  queue.splice(findInsertionIndex(jobId), 0, job);
317
317
  }
318
- if (!(job.flags & 4)) {
319
- job.flags |= 1;
320
- }
318
+ job.flags |= 1;
321
319
  queueFlush();
322
320
  }
323
321
  }
@@ -333,9 +331,7 @@ function queuePostFlushCb(cb) {
333
331
  activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
334
332
  } else if (!(cb.flags & 1)) {
335
333
  pendingPostFlushCbs.push(cb);
336
- if (!(cb.flags & 4)) {
337
- cb.flags |= 1;
338
- }
334
+ cb.flags |= 1;
339
335
  }
340
336
  } else {
341
337
  pendingPostFlushCbs.push(...cb);
@@ -357,6 +353,9 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
357
353
  }
358
354
  queue.splice(i, 1);
359
355
  i--;
356
+ if (cb.flags & 4) {
357
+ cb.flags &= ~1;
358
+ }
360
359
  cb();
361
360
  cb.flags &= ~1;
362
361
  }
@@ -381,6 +380,9 @@ function flushPostFlushCbs(seen) {
381
380
  if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) {
382
381
  continue;
383
382
  }
383
+ if (cb.flags & 4) {
384
+ cb.flags &= ~1;
385
+ }
384
386
  if (!(cb.flags & 8)) cb();
385
387
  cb.flags &= ~1;
386
388
  }
@@ -403,6 +405,9 @@ function flushJobs(seen) {
403
405
  if (!!(process.env.NODE_ENV !== "production") && check(job)) {
404
406
  continue;
405
407
  }
408
+ if (job.flags & 4) {
409
+ job.flags &= ~1;
410
+ }
406
411
  callWithErrorHandling(
407
412
  job,
408
413
  job.i,
@@ -412,6 +417,12 @@ function flushJobs(seen) {
412
417
  }
413
418
  }
414
419
  } finally {
420
+ for (; flushIndex < queue.length; flushIndex++) {
421
+ const job = queue[flushIndex];
422
+ if (job) {
423
+ job.flags &= ~1;
424
+ }
425
+ }
415
426
  flushIndex = 0;
416
427
  queue.length = 0;
417
428
  flushPostFlushCbs(seen);
@@ -1168,6 +1179,7 @@ const BaseTransitionImpl = {
1168
1179
  if (!(instance.job.flags & 8)) {
1169
1180
  instance.update();
1170
1181
  }
1182
+ delete leavingHooks.afterLeave;
1171
1183
  };
1172
1184
  return emptyPlaceholder(child);
1173
1185
  } else if (mode === "in-out" && innerChild.type !== Comment) {
@@ -1446,6 +1458,34 @@ function markAsyncBoundary(instance) {
1446
1458
  instance.ids = [instance.ids[0] + instance.ids[2]++ + "-", 0, 0];
1447
1459
  }
1448
1460
 
1461
+ const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
1462
+ function useTemplateRef(key) {
1463
+ const i = getCurrentInstance();
1464
+ const r = shallowRef(null);
1465
+ if (i) {
1466
+ const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
1467
+ let desc;
1468
+ if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
1469
+ warn$1(`useTemplateRef('${key}') already exists.`);
1470
+ } else {
1471
+ Object.defineProperty(refs, key, {
1472
+ enumerable: true,
1473
+ get: () => r.value,
1474
+ set: (val) => r.value = val
1475
+ });
1476
+ }
1477
+ } else if (!!(process.env.NODE_ENV !== "production")) {
1478
+ warn$1(
1479
+ `useTemplateRef() is called when there is no active component instance to be associated with.`
1480
+ );
1481
+ }
1482
+ const ret = !!(process.env.NODE_ENV !== "production") ? readonly(r) : r;
1483
+ if (!!(process.env.NODE_ENV !== "production")) {
1484
+ knownTemplateRefs.add(ret);
1485
+ }
1486
+ return ret;
1487
+ }
1488
+
1449
1489
  function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1450
1490
  if (isArray(rawRef)) {
1451
1491
  rawRef.forEach(
@@ -1474,7 +1514,13 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1474
1514
  const oldRef = oldRawRef && oldRawRef.r;
1475
1515
  const refs = owner.refs === EMPTY_OBJ ? owner.refs = {} : owner.refs;
1476
1516
  const setupState = owner.setupState;
1477
- const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => hasOwn(setupState, key) && !(Object.getOwnPropertyDescriptor(refs, key) || EMPTY_OBJ).get;
1517
+ const rawSetupState = toRaw(setupState);
1518
+ const canSetSetupRef = setupState === EMPTY_OBJ ? () => false : (key) => {
1519
+ if (!!(process.env.NODE_ENV !== "production") && knownTemplateRefs.has(rawSetupState[key])) {
1520
+ return false;
1521
+ }
1522
+ return hasOwn(rawSetupState, key);
1523
+ };
1478
1524
  if (oldRef != null && oldRef !== ref) {
1479
1525
  if (isString(oldRef)) {
1480
1526
  refs[oldRef] = null;
@@ -2542,7 +2588,7 @@ const KeepAliveImpl = {
2542
2588
  return () => {
2543
2589
  pendingCacheKey = null;
2544
2590
  if (!slots.default) {
2545
- return null;
2591
+ return current = null;
2546
2592
  }
2547
2593
  const children = slots.default();
2548
2594
  const rawVNode = children[0];
@@ -6341,7 +6387,8 @@ function renderComponentRoot(instance) {
6341
6387
  data,
6342
6388
  setupState,
6343
6389
  ctx,
6344
- inheritAttrs
6390
+ inheritAttrs,
6391
+ isMounted
6345
6392
  } = instance;
6346
6393
  const prev = setCurrentRenderingInstance(instance);
6347
6394
  let result;
@@ -6461,7 +6508,7 @@ function renderComponentRoot(instance) {
6461
6508
  `Component inside <Transition> renders non-element root node that cannot be animated.`
6462
6509
  );
6463
6510
  }
6464
- root.transition = vnode.transition;
6511
+ root.transition = isMounted ? vnode.component.subTree.transition : vnode.transition;
6465
6512
  }
6466
6513
  if (!!(process.env.NODE_ENV !== "production") && setRoot) {
6467
6514
  setRoot(root);
@@ -6955,7 +7002,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
6955
7002
  };
6956
7003
  }
6957
7004
  if (activeBranch) {
6958
- if (parentNode(activeBranch.el) !== suspense.hiddenContainer) {
7005
+ if (parentNode(activeBranch.el) === container2) {
6959
7006
  anchor = next(activeBranch);
6960
7007
  }
6961
7008
  unmount(activeBranch, parentComponent2, suspense, true);
@@ -8030,29 +8077,6 @@ const computed = (getterOrOptions, debugOptions) => {
8030
8077
  return c;
8031
8078
  };
8032
8079
 
8033
- function useTemplateRef(key) {
8034
- const i = getCurrentInstance();
8035
- const r = shallowRef(null);
8036
- if (i) {
8037
- const refs = i.refs === EMPTY_OBJ ? i.refs = {} : i.refs;
8038
- let desc;
8039
- if (!!(process.env.NODE_ENV !== "production") && (desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable) {
8040
- warn$1(`useTemplateRef('${key}') already exists.`);
8041
- } else {
8042
- Object.defineProperty(refs, key, {
8043
- enumerable: true,
8044
- get: () => r.value,
8045
- set: (val) => r.value = val
8046
- });
8047
- }
8048
- } else if (!!(process.env.NODE_ENV !== "production")) {
8049
- warn$1(
8050
- `useTemplateRef() is called when there is no active component instance to be associated with.`
8051
- );
8052
- }
8053
- return !!(process.env.NODE_ENV !== "production") ? readonly(r) : r;
8054
- }
8055
-
8056
8080
  function h(type, propsOrChildren, children) {
8057
8081
  const l = arguments.length;
8058
8082
  if (l === 2) {
@@ -8278,7 +8302,7 @@ function isMemoSame(cached, memo) {
8278
8302
  return true;
8279
8303
  }
8280
8304
 
8281
- const version = "3.5.1";
8305
+ const version = "3.5.2";
8282
8306
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8283
8307
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8284
8308
  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.1",
3
+ "version": "3.5.2",
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.1",
50
- "@vue/reactivity": "3.5.1"
49
+ "@vue/shared": "3.5.2",
50
+ "@vue/reactivity": "3.5.2"
51
51
  }
52
52
  }