@vue/runtime-core 3.5.39 → 3.5.40

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.39
2
+ * @vue/runtime-core v3.5.40
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -694,10 +694,12 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
694
694
  setBlockTracking(-1);
695
695
  }
696
696
  const prevInstance = setCurrentRenderingInstance(ctx);
697
+ const prevStackSize = blockStack.length;
697
698
  let res;
698
699
  try {
699
700
  res = fn(...args);
700
701
  } finally {
702
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
701
703
  setCurrentRenderingInstance(prevInstance);
702
704
  if (renderFnWithContext._d) {
703
705
  setBlockTracking(1);
@@ -1811,12 +1813,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1811
1813
  }
1812
1814
  }
1813
1815
  if (shared.isFunction(ref)) {
1814
- reactivity.pauseTracking();
1815
- try {
1816
- callWithErrorHandling(ref, owner, 12, [value, refs]);
1817
- } finally {
1818
- reactivity.resetTracking();
1819
- }
1816
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
1820
1817
  } else {
1821
1818
  const _isString = shared.isString(ref);
1822
1819
  const _isRef = reactivity.isRef(ref);
@@ -2187,6 +2184,7 @@ Server rendered element contains more child nodes than client vdom.`
2187
2184
  if (props) {
2188
2185
  {
2189
2186
  const isCustomElement = el.tagName.includes("-");
2187
+ const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
2190
2188
  for (const key in props) {
2191
2189
  if (// #11189 skip if this node has directives that have created hooks
2192
2190
  // as it could have mutated the DOM in any possible way
@@ -2195,7 +2193,7 @@ Server rendered element contains more child nodes than client vdom.`
2195
2193
  }
2196
2194
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
2197
2195
  key[0] === "." || isCustomElement && !shared.isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
2198
- patchProp(el, key, null, props[key], void 0, parentComponent);
2196
+ patchProp(el, key, null, props[key], namespace, parentComponent);
2199
2197
  }
2200
2198
  }
2201
2199
  }
@@ -2698,6 +2696,7 @@ function defineAsyncComponent(source) {
2698
2696
  name: "AsyncComponentWrapper",
2699
2697
  __asyncLoader: load,
2700
2698
  __asyncHydrate(el, instance, hydrate) {
2699
+ const wasConnected = el.isConnected;
2701
2700
  let patched = false;
2702
2701
  (instance.bu || (instance.bu = [])).push(() => patched = true);
2703
2702
  const performHydrate = () => {
@@ -2709,6 +2708,7 @@ function defineAsyncComponent(source) {
2709
2708
  }
2710
2709
  return;
2711
2710
  }
2711
+ if (!el.parentNode || wasConnected && !el.isConnected) return;
2712
2712
  hydrate();
2713
2713
  };
2714
2714
  const doHydrate = hydrateStrategy ? () => {
@@ -3264,14 +3264,15 @@ function createSlots(slots, dynamicSlots) {
3264
3264
  return slots;
3265
3265
  }
3266
3266
 
3267
- function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3267
+ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
3268
3268
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3269
- const hasProps = Object.keys(props).length > 0;
3270
- if (name !== "default") props.name = name;
3269
+ const slotProps = branchKey != null && props.key == null ? shared.extend({}, props, { key: branchKey }) : props;
3270
+ const hasProps = Object.keys(slotProps).length > 0;
3271
+ if (name !== "default") slotProps.name = name;
3271
3272
  return openBlock(), createBlock(
3272
3273
  Fragment,
3273
3274
  null,
3274
- [createVNode("slot", props, fallback && fallback())],
3275
+ [createVNode("slot", slotProps, fallback && fallback())],
3275
3276
  hasProps ? -2 : 64
3276
3277
  );
3277
3278
  }
@@ -3285,26 +3286,34 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3285
3286
  if (slot && slot._c) {
3286
3287
  slot._d = false;
3287
3288
  }
3289
+ const prevStackSize = blockStack.length;
3288
3290
  openBlock();
3289
- const validSlotContent = slot && ensureValidVNode(slot(props));
3290
- const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
3291
- // key attached in the `createSlots` helper, respect that
3292
- validSlotContent && validSlotContent.key;
3293
- const rendered = createBlock(
3294
- Fragment,
3295
- {
3296
- key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
3297
- (!validSlotContent && fallback ? "_fb" : "")
3298
- },
3299
- validSlotContent || (fallback ? fallback() : []),
3300
- validSlotContent && slots._ === 1 ? 64 : -2
3301
- );
3291
+ let rendered;
3292
+ try {
3293
+ const validSlotContent = slot && ensureValidVNode(slot(props));
3294
+ const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
3295
+ // key attached in the `createSlots` helper, respect that
3296
+ validSlotContent && validSlotContent.key;
3297
+ rendered = createBlock(
3298
+ Fragment,
3299
+ {
3300
+ key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
3301
+ (!validSlotContent && fallback ? "_fb" : "")
3302
+ },
3303
+ validSlotContent || (fallback ? fallback() : []),
3304
+ validSlotContent && slots._ === 1 ? 64 : -2
3305
+ );
3306
+ } catch (err) {
3307
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
3308
+ throw err;
3309
+ } finally {
3310
+ if (slot && slot._c) {
3311
+ slot._d = true;
3312
+ }
3313
+ }
3302
3314
  if (!noSlotted && rendered.scopeId) {
3303
3315
  rendered.slotScopeIds = [rendered.scopeId + "-s"];
3304
3316
  }
3305
- if (slot && slot._c) {
3306
- slot._d = true;
3307
- }
3308
3317
  return rendered;
3309
3318
  }
3310
3319
  function ensureValidVNode(vnodes) {
@@ -8624,7 +8633,7 @@ function isMemoSame(cached, memo) {
8624
8633
  return true;
8625
8634
  }
8626
8635
 
8627
- const version = "3.5.39";
8636
+ const version = "3.5.40";
8628
8637
  const warn = warn$1 ;
8629
8638
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8630
8639
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.39
2
+ * @vue/runtime-core v3.5.40
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -307,10 +307,12 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
307
307
  setBlockTracking(-1);
308
308
  }
309
309
  const prevInstance = setCurrentRenderingInstance(ctx);
310
+ const prevStackSize = blockStack.length;
310
311
  let res;
311
312
  try {
312
313
  res = fn(...args);
313
314
  } finally {
315
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
314
316
  setCurrentRenderingInstance(prevInstance);
315
317
  if (renderFnWithContext._d) {
316
318
  setBlockTracking(1);
@@ -1312,12 +1314,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1312
1314
  }
1313
1315
  }
1314
1316
  if (shared.isFunction(ref)) {
1315
- reactivity.pauseTracking();
1316
- try {
1317
- callWithErrorHandling(ref, owner, 12, [value, refs]);
1318
- } finally {
1319
- reactivity.resetTracking();
1320
- }
1317
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
1321
1318
  } else {
1322
1319
  const _isString = shared.isString(ref);
1323
1320
  const _isRef = reactivity.isRef(ref);
@@ -1654,10 +1651,11 @@ function createHydrationFunctions(rendererInternals) {
1654
1651
  if (props) {
1655
1652
  if (forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
1656
1653
  const isCustomElement = el.tagName.includes("-");
1654
+ const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
1657
1655
  for (const key in props) {
1658
1656
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
1659
1657
  key[0] === "." || isCustomElement && !shared.isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
1660
- patchProp(el, key, null, props[key], void 0, parentComponent);
1658
+ patchProp(el, key, null, props[key], namespace, parentComponent);
1661
1659
  }
1662
1660
  }
1663
1661
  } else if (props.onClick) {
@@ -2025,12 +2023,14 @@ function defineAsyncComponent(source) {
2025
2023
  name: "AsyncComponentWrapper",
2026
2024
  __asyncLoader: load,
2027
2025
  __asyncHydrate(el, instance, hydrate) {
2026
+ const wasConnected = el.isConnected;
2028
2027
  let patched = false;
2029
2028
  (instance.bu || (instance.bu = [])).push(() => patched = true);
2030
2029
  const performHydrate = () => {
2031
2030
  if (patched) {
2032
2031
  return;
2033
2032
  }
2033
+ if (!el.parentNode || wasConnected && !el.isConnected) return;
2034
2034
  hydrate();
2035
2035
  };
2036
2036
  const doHydrate = hydrateStrategy ? () => {
@@ -2555,14 +2555,15 @@ function createSlots(slots, dynamicSlots) {
2555
2555
  return slots;
2556
2556
  }
2557
2557
 
2558
- function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2558
+ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
2559
2559
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
2560
- const hasProps = Object.keys(props).length > 0;
2561
- if (name !== "default") props.name = name;
2560
+ const slotProps = branchKey != null && props.key == null ? shared.extend({}, props, { key: branchKey }) : props;
2561
+ const hasProps = Object.keys(slotProps).length > 0;
2562
+ if (name !== "default") slotProps.name = name;
2562
2563
  return openBlock(), createBlock(
2563
2564
  Fragment,
2564
2565
  null,
2565
- [createVNode("slot", props, fallback && fallback())],
2566
+ [createVNode("slot", slotProps, fallback && fallback())],
2566
2567
  hasProps ? -2 : 64
2567
2568
  );
2568
2569
  }
@@ -2570,26 +2571,34 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2570
2571
  if (slot && slot._c) {
2571
2572
  slot._d = false;
2572
2573
  }
2574
+ const prevStackSize = blockStack.length;
2573
2575
  openBlock();
2574
- const validSlotContent = slot && ensureValidVNode(slot(props));
2575
- const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
2576
- // key attached in the `createSlots` helper, respect that
2577
- validSlotContent && validSlotContent.key;
2578
- const rendered = createBlock(
2579
- Fragment,
2580
- {
2581
- key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
2582
- (!validSlotContent && fallback ? "_fb" : "")
2583
- },
2584
- validSlotContent || (fallback ? fallback() : []),
2585
- validSlotContent && slots._ === 1 ? 64 : -2
2586
- );
2576
+ let rendered;
2577
+ try {
2578
+ const validSlotContent = slot && ensureValidVNode(slot(props));
2579
+ const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
2580
+ // key attached in the `createSlots` helper, respect that
2581
+ validSlotContent && validSlotContent.key;
2582
+ rendered = createBlock(
2583
+ Fragment,
2584
+ {
2585
+ key: (slotKey && !shared.isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
2586
+ (!validSlotContent && fallback ? "_fb" : "")
2587
+ },
2588
+ validSlotContent || (fallback ? fallback() : []),
2589
+ validSlotContent && slots._ === 1 ? 64 : -2
2590
+ );
2591
+ } catch (err) {
2592
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
2593
+ throw err;
2594
+ } finally {
2595
+ if (slot && slot._c) {
2596
+ slot._d = true;
2597
+ }
2598
+ }
2587
2599
  if (!noSlotted && rendered.scopeId) {
2588
2600
  rendered.slotScopeIds = [rendered.scopeId + "-s"];
2589
2601
  }
2590
- if (slot && slot._c) {
2591
- slot._d = true;
2592
- }
2593
2602
  return rendered;
2594
2603
  }
2595
2604
  function ensureValidVNode(vnodes) {
@@ -6770,7 +6779,7 @@ function isMemoSame(cached, memo) {
6770
6779
  return true;
6771
6780
  }
6772
6781
 
6773
- const version = "3.5.39";
6782
+ const version = "3.5.40";
6774
6783
  const warn$1 = shared.NOOP;
6775
6784
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6776
6785
  const devtools = void 0;
@@ -498,12 +498,12 @@ export type CreateComponentPublicInstance<P = {}, B = {}, D = {}, C extends Comp
498
498
  * inference everywhere internally, but it has to be a new type to avoid
499
499
  * breaking types that relies on previous arguments order (#10842)
500
500
  */
501
- 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>;
501
+ 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 = 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>;
502
502
  type ExposedKeys<T, Exposed extends string & keyof T> = '' extends Exposed ? T : Pick<T, Exposed>;
503
503
  export type ComponentPublicInstance<P = {}, // props type extracted from props option
504
504
  B = {}, // raw bindings returned from setup()
505
505
  D = {}, // return from data()
506
- 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> = {
506
+ 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 = any> = {
507
507
  $: ComponentInternalInstance;
508
508
  $data: D;
509
509
  $props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<Prettify<P> & PublicProps, keyof Defaults> : Prettify<P> & PublicProps;
@@ -1004,7 +1004,7 @@ export declare function hasInjectionContext(): boolean;
1004
1004
 
1005
1005
  export type PublicProps = VNodeProps & AllowedComponentProps & ComponentCustomProps;
1006
1006
  type ResolveProps<PropsOrPropOptions, E extends EmitsOptions> = Readonly<PropsOrPropOptions extends ComponentPropsOptions ? ExtractPropTypes<PropsOrPropOptions> : PropsOrPropOptions> & ({} extends E ? {} : EmitsToProps<E>);
1007
- 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, 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;
1007
+ 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 = any> = ComponentPublicInstanceConstructor<CreateComponentPublicInstanceWithMixins<Props, RawBindings, D, C, M, Mixin, Extends, E, PP, 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;
1008
1008
  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>;
1009
1009
  type ToResolvedProps<Props, Emits extends EmitsOptions> = Readonly<Props> & Readonly<EmitsToProps<Emits>>;
1010
1010
  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'> & {
@@ -1019,7 +1019,7 @@ export declare function defineComponent<Props extends Record<string, any>, E ext
1019
1019
  }): DefineSetupFnComponent<Props, E, S>;
1020
1020
  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 = IsKeyValues<TypeProps> extends true ? TypeProps : string extends RuntimePropsKeys ? ComponentObjectPropsOptions extends RuntimePropsOptions ? {} : ExtractPropTypes<RuntimePropsOptions> : {
1021
1021
  [key in RuntimePropsKeys]?: any;
1022
- }, TypeRefs extends Record<string, unknown> = {}, TypeEl extends Element = any>(options: {
1022
+ }, TypeRefs extends Record<string, unknown> = {}, TypeEl = any>(options: {
1023
1023
  props?: (RuntimePropsOptions & ThisType<void>) | RuntimePropsKeys[];
1024
1024
  /**
1025
1025
  * @private for language-tools use only
@@ -1717,7 +1717,7 @@ export declare function toHandlers(obj: Record<string, any>, preserveCaseIfNeces
1717
1717
  * Compiler runtime helper for rendering `<slot/>`
1718
1718
  * @private
1719
1719
  */
1720
- export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean): VNode;
1720
+ export declare function renderSlot(slots: Slots, name: string, props?: Data, fallback?: () => VNodeArrayChildren, noSlotted?: boolean, branchKey?: PropertyKey): VNode;
1721
1721
 
1722
1722
  type SSRSlot = (...args: any[]) => VNode[] | undefined;
1723
1723
  interface CompiledSlotDescriptor {
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.39
2
+ * @vue/runtime-core v3.5.40
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -697,10 +697,12 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
697
697
  setBlockTracking(-1);
698
698
  }
699
699
  const prevInstance = setCurrentRenderingInstance(ctx);
700
+ const prevStackSize = blockStack.length;
700
701
  let res;
701
702
  try {
702
703
  res = fn(...args);
703
704
  } finally {
705
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
704
706
  setCurrentRenderingInstance(prevInstance);
705
707
  if (renderFnWithContext._d) {
706
708
  setBlockTracking(1);
@@ -1815,12 +1817,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
1815
1817
  }
1816
1818
  }
1817
1819
  if (isFunction(ref)) {
1818
- pauseTracking();
1819
- try {
1820
- callWithErrorHandling(ref, owner, 12, [value, refs]);
1821
- } finally {
1822
- resetTracking();
1823
- }
1820
+ callWithErrorHandling(ref, owner, 12, [value, refs]);
1824
1821
  } else {
1825
1822
  const _isString = isString(ref);
1826
1823
  const _isRef = isRef(ref);
@@ -2192,6 +2189,7 @@ Server rendered element contains more child nodes than client vdom.`
2192
2189
  if (props) {
2193
2190
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || hasDynamicProps || !optimized || patchFlag & (16 | 32)) {
2194
2191
  const isCustomElement = el.tagName.includes("-");
2192
+ const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
2195
2193
  for (const key in props) {
2196
2194
  if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
2197
2195
  // as it could have mutated the DOM in any possible way
@@ -2200,7 +2198,7 @@ Server rendered element contains more child nodes than client vdom.`
2200
2198
  }
2201
2199
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
2202
2200
  key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
2203
- patchProp(el, key, null, props[key], void 0, parentComponent);
2201
+ patchProp(el, key, null, props[key], namespace, parentComponent);
2204
2202
  }
2205
2203
  }
2206
2204
  } else if (props.onClick) {
@@ -2714,6 +2712,7 @@ function defineAsyncComponent(source) {
2714
2712
  name: "AsyncComponentWrapper",
2715
2713
  __asyncLoader: load,
2716
2714
  __asyncHydrate(el, instance, hydrate) {
2715
+ const wasConnected = el.isConnected;
2717
2716
  let patched = false;
2718
2717
  (instance.bu || (instance.bu = [])).push(() => patched = true);
2719
2718
  const performHydrate = () => {
@@ -2725,6 +2724,7 @@ function defineAsyncComponent(source) {
2725
2724
  }
2726
2725
  return;
2727
2726
  }
2727
+ if (!el.parentNode || wasConnected && !el.isConnected) return;
2728
2728
  hydrate();
2729
2729
  };
2730
2730
  const doHydrate = hydrateStrategy ? () => {
@@ -3283,14 +3283,15 @@ function createSlots(slots, dynamicSlots) {
3283
3283
  return slots;
3284
3284
  }
3285
3285
 
3286
- function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3286
+ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
3287
3287
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3288
- const hasProps = Object.keys(props).length > 0;
3289
- if (name !== "default") props.name = name;
3288
+ const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
3289
+ const hasProps = Object.keys(slotProps).length > 0;
3290
+ if (name !== "default") slotProps.name = name;
3290
3291
  return openBlock(), createBlock(
3291
3292
  Fragment,
3292
3293
  null,
3293
- [createVNode("slot", props, fallback && fallback())],
3294
+ [createVNode("slot", slotProps, fallback && fallback())],
3294
3295
  hasProps ? -2 : 64
3295
3296
  );
3296
3297
  }
@@ -3304,26 +3305,34 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3304
3305
  if (slot && slot._c) {
3305
3306
  slot._d = false;
3306
3307
  }
3308
+ const prevStackSize = blockStack.length;
3307
3309
  openBlock();
3308
- const validSlotContent = slot && ensureValidVNode(slot(props));
3309
- const slotKey = props.key || // slot content array of a dynamic conditional slot may have a branch
3310
- // key attached in the `createSlots` helper, respect that
3311
- validSlotContent && validSlotContent.key;
3312
- const rendered = createBlock(
3313
- Fragment,
3314
- {
3315
- key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
3316
- (!validSlotContent && fallback ? "_fb" : "")
3317
- },
3318
- validSlotContent || (fallback ? fallback() : []),
3319
- validSlotContent && slots._ === 1 ? 64 : -2
3320
- );
3310
+ let rendered;
3311
+ try {
3312
+ const validSlotContent = slot && ensureValidVNode(slot(props));
3313
+ const slotKey = props.key || branchKey || // slot content array of a dynamic conditional slot may have a branch
3314
+ // key attached in the `createSlots` helper, respect that
3315
+ validSlotContent && validSlotContent.key;
3316
+ rendered = createBlock(
3317
+ Fragment,
3318
+ {
3319
+ key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + // #7256 force differentiate fallback content from actual content
3320
+ (!validSlotContent && fallback ? "_fb" : "")
3321
+ },
3322
+ validSlotContent || (fallback ? fallback() : []),
3323
+ validSlotContent && slots._ === 1 ? 64 : -2
3324
+ );
3325
+ } catch (err) {
3326
+ for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
3327
+ throw err;
3328
+ } finally {
3329
+ if (slot && slot._c) {
3330
+ slot._d = true;
3331
+ }
3332
+ }
3321
3333
  if (!noSlotted && rendered.scopeId) {
3322
3334
  rendered.slotScopeIds = [rendered.scopeId + "-s"];
3323
3335
  }
3324
- if (slot && slot._c) {
3325
- slot._d = true;
3326
- }
3327
3336
  return rendered;
3328
3337
  }
3329
3338
  function ensureValidVNode(vnodes) {
@@ -8699,7 +8708,7 @@ function isMemoSame(cached, memo) {
8699
8708
  return true;
8700
8709
  }
8701
8710
 
8702
- const version = "3.5.39";
8711
+ const version = "3.5.40";
8703
8712
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8704
8713
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8705
8714
  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.39",
3
+ "version": "3.5.40",
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.39",
50
- "@vue/reactivity": "3.5.39"
49
+ "@vue/shared": "3.5.40",
50
+ "@vue/reactivity": "3.5.40"
51
51
  }
52
52
  }