@vue/runtime-core 3.4.34 → 3.4.36

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.34
2
+ * @vue/runtime-core v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2980,14 +2980,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2980
2980
  if (validatePropName(normalizedKey)) {
2981
2981
  const opt = raw[key];
2982
2982
  const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
2983
- if (prop) {
2984
- const booleanIndex = getTypeIndex(Boolean, prop.type);
2985
- const stringIndex = getTypeIndex(String, prop.type);
2986
- prop[0 /* shouldCast */] = booleanIndex > -1;
2987
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
2988
- if (booleanIndex > -1 || shared.hasOwn(prop, "default")) {
2989
- needCastKeys.push(normalizedKey);
2983
+ const propType = prop.type;
2984
+ let shouldCast = false;
2985
+ let shouldCastTrue = true;
2986
+ if (shared.isArray(propType)) {
2987
+ for (let index = 0; index < propType.length; ++index) {
2988
+ const type = propType[index];
2989
+ const typeName = shared.isFunction(type) && type.name;
2990
+ if (typeName === "Boolean") {
2991
+ shouldCast = true;
2992
+ break;
2993
+ } else if (typeName === "String") {
2994
+ shouldCastTrue = false;
2995
+ }
2990
2996
  }
2997
+ } else {
2998
+ shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
2999
+ }
3000
+ prop[0 /* shouldCast */] = shouldCast;
3001
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
3002
+ if (shouldCast || shared.hasOwn(prop, "default")) {
3003
+ needCastKeys.push(normalizedKey);
2991
3004
  }
2992
3005
  }
2993
3006
  }
@@ -3018,17 +3031,6 @@ function getType(ctor) {
3018
3031
  }
3019
3032
  return "";
3020
3033
  }
3021
- function isSameType(a, b) {
3022
- return getType(a) === getType(b);
3023
- }
3024
- function getTypeIndex(type, expectedTypes) {
3025
- if (shared.isArray(expectedTypes)) {
3026
- return expectedTypes.findIndex((t) => isSameType(t, type));
3027
- } else if (shared.isFunction(expectedTypes)) {
3028
- return isSameType(expectedTypes, type) ? 0 : -1;
3029
- }
3030
- return -1;
3031
- }
3032
3034
  function validateProps(rawProps, props, instance) {
3033
3035
  const resolvedValues = reactivity.toRaw(props);
3034
3036
  const options = instance.propsOptions[0];
@@ -3368,15 +3370,11 @@ const TeleportImpl = {
3368
3370
  if (n1 == null) {
3369
3371
  const placeholder = n2.el = createComment("teleport start") ;
3370
3372
  const mainAnchor = n2.anchor = createComment("teleport end") ;
3371
- const target = n2.target = resolveTarget(n2.props, querySelector);
3372
- const targetStart = n2.targetStart = createText("");
3373
- const targetAnchor = n2.targetAnchor = createText("");
3374
3373
  insert(placeholder, container, anchor);
3375
3374
  insert(mainAnchor, container, anchor);
3376
- targetStart[TeleportEndKey] = targetAnchor;
3375
+ const target = n2.target = resolveTarget(n2.props, querySelector);
3376
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
3377
3377
  if (target) {
3378
- insert(targetStart, target);
3379
- insert(targetAnchor, target);
3380
3378
  if (namespace === "svg" || isTargetSVG(target)) {
3381
3379
  namespace = "svg";
3382
3380
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -3548,7 +3546,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3548
3546
  }
3549
3547
  }
3550
3548
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3551
- o: { nextSibling, parentNode, querySelector }
3549
+ o: { nextSibling, parentNode, querySelector, insert, createText }
3552
3550
  }, hydrateChildren) {
3553
3551
  const target = vnode.target = resolveTarget(
3554
3552
  vnode.props,
@@ -3567,20 +3565,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3567
3565
  slotScopeIds,
3568
3566
  optimized
3569
3567
  );
3570
- vnode.targetAnchor = targetNode;
3568
+ vnode.targetStart = targetNode;
3569
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
3571
3570
  } else {
3572
3571
  vnode.anchor = nextSibling(node);
3573
3572
  let targetAnchor = targetNode;
3574
3573
  while (targetAnchor) {
3575
- targetAnchor = nextSibling(targetAnchor);
3576
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
3577
- vnode.targetAnchor = targetAnchor;
3578
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3579
- break;
3574
+ if (targetAnchor && targetAnchor.nodeType === 8) {
3575
+ if (targetAnchor.data === "teleport start anchor") {
3576
+ vnode.targetStart = targetAnchor;
3577
+ } else if (targetAnchor.data === "teleport anchor") {
3578
+ vnode.targetAnchor = targetAnchor;
3579
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3580
+ break;
3581
+ }
3580
3582
  }
3583
+ targetAnchor = nextSibling(targetAnchor);
3584
+ }
3585
+ if (!vnode.targetAnchor) {
3586
+ prepareAnchor(target, vnode, createText, insert);
3581
3587
  }
3582
3588
  hydrateChildren(
3583
- targetNode,
3589
+ targetNode && nextSibling(targetNode),
3584
3590
  vnode,
3585
3591
  target,
3586
3592
  parentComponent,
@@ -3606,6 +3612,16 @@ function updateCssVars(vnode) {
3606
3612
  ctx.ut();
3607
3613
  }
3608
3614
  }
3615
+ function prepareAnchor(target, vnode, createText, insert) {
3616
+ const targetStart = vnode.targetStart = createText("");
3617
+ const targetAnchor = vnode.targetAnchor = createText("");
3618
+ targetStart[TeleportEndKey] = targetAnchor;
3619
+ if (target) {
3620
+ insert(targetStart, target);
3621
+ insert(targetAnchor, target);
3622
+ }
3623
+ return targetAnchor;
3624
+ }
3609
3625
 
3610
3626
  let hasLoggedMismatchError = false;
3611
3627
  const logMismatchError = () => {
@@ -3889,6 +3905,7 @@ Server rendered element contains more child nodes than client vdom.`
3889
3905
  }
3890
3906
  if (props) {
3891
3907
  {
3908
+ const isCustomElement = el.tagName.includes("-");
3892
3909
  for (const key in props) {
3893
3910
  if (// #11189 skip if this node has directives that have created hooks
3894
3911
  // as it could have mutated the DOM in any possible way
@@ -3896,7 +3913,7 @@ Server rendered element contains more child nodes than client vdom.`
3896
3913
  logMismatchError();
3897
3914
  }
3898
3915
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
3899
- key[0] === ".") {
3916
+ key[0] === "." || isCustomElement) {
3900
3917
  patchProp(el, key, null, props[key], void 0, parentComponent);
3901
3918
  }
3902
3919
  }
@@ -8117,7 +8134,7 @@ function isMemoSame(cached, memo) {
8117
8134
  return true;
8118
8135
  }
8119
8136
 
8120
- const version = "3.4.34";
8137
+ const version = "3.4.36";
8121
8138
  const warn = warn$1 ;
8122
8139
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8123
8140
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.34
2
+ * @vue/runtime-core v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2215,14 +2215,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2215
2215
  if (validatePropName(normalizedKey)) {
2216
2216
  const opt = raw[key];
2217
2217
  const prop = normalized[normalizedKey] = shared.isArray(opt) || shared.isFunction(opt) ? { type: opt } : shared.extend({}, opt);
2218
- if (prop) {
2219
- const booleanIndex = getTypeIndex(Boolean, prop.type);
2220
- const stringIndex = getTypeIndex(String, prop.type);
2221
- prop[0 /* shouldCast */] = booleanIndex > -1;
2222
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
2223
- if (booleanIndex > -1 || shared.hasOwn(prop, "default")) {
2224
- needCastKeys.push(normalizedKey);
2218
+ const propType = prop.type;
2219
+ let shouldCast = false;
2220
+ let shouldCastTrue = true;
2221
+ if (shared.isArray(propType)) {
2222
+ for (let index = 0; index < propType.length; ++index) {
2223
+ const type = propType[index];
2224
+ const typeName = shared.isFunction(type) && type.name;
2225
+ if (typeName === "Boolean") {
2226
+ shouldCast = true;
2227
+ break;
2228
+ } else if (typeName === "String") {
2229
+ shouldCastTrue = false;
2230
+ }
2225
2231
  }
2232
+ } else {
2233
+ shouldCast = shared.isFunction(propType) && propType.name === "Boolean";
2234
+ }
2235
+ prop[0 /* shouldCast */] = shouldCast;
2236
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
2237
+ if (shouldCast || shared.hasOwn(prop, "default")) {
2238
+ needCastKeys.push(normalizedKey);
2226
2239
  }
2227
2240
  }
2228
2241
  }
@@ -2239,29 +2252,6 @@ function validatePropName(key) {
2239
2252
  }
2240
2253
  return false;
2241
2254
  }
2242
- function getType(ctor) {
2243
- if (ctor === null) {
2244
- return "null";
2245
- }
2246
- if (typeof ctor === "function") {
2247
- return ctor.name || "";
2248
- } else if (typeof ctor === "object") {
2249
- const name = ctor.constructor && ctor.constructor.name;
2250
- return name || "";
2251
- }
2252
- return "";
2253
- }
2254
- function isSameType(a, b) {
2255
- return getType(a) === getType(b);
2256
- }
2257
- function getTypeIndex(type, expectedTypes) {
2258
- if (shared.isArray(expectedTypes)) {
2259
- return expectedTypes.findIndex((t) => isSameType(t, type));
2260
- } else if (shared.isFunction(expectedTypes)) {
2261
- return isSameType(expectedTypes, type) ? 0 : -1;
2262
- }
2263
- return -1;
2264
- }
2265
2255
 
2266
2256
  const isInternalKey = (key) => key[0] === "_" || key === "$stable";
2267
2257
  const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
@@ -2457,15 +2447,11 @@ const TeleportImpl = {
2457
2447
  if (n1 == null) {
2458
2448
  const placeholder = n2.el = createText("");
2459
2449
  const mainAnchor = n2.anchor = createText("");
2460
- const target = n2.target = resolveTarget(n2.props, querySelector);
2461
- const targetStart = n2.targetStart = createText("");
2462
- const targetAnchor = n2.targetAnchor = createText("");
2463
2450
  insert(placeholder, container, anchor);
2464
2451
  insert(mainAnchor, container, anchor);
2465
- targetStart[TeleportEndKey] = targetAnchor;
2452
+ const target = n2.target = resolveTarget(n2.props, querySelector);
2453
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
2466
2454
  if (target) {
2467
- insert(targetStart, target);
2468
- insert(targetAnchor, target);
2469
2455
  if (namespace === "svg" || isTargetSVG(target)) {
2470
2456
  namespace = "svg";
2471
2457
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -2629,7 +2615,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
2629
2615
  }
2630
2616
  }
2631
2617
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
2632
- o: { nextSibling, parentNode, querySelector }
2618
+ o: { nextSibling, parentNode, querySelector, insert, createText }
2633
2619
  }, hydrateChildren) {
2634
2620
  const target = vnode.target = resolveTarget(
2635
2621
  vnode.props,
@@ -2648,20 +2634,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
2648
2634
  slotScopeIds,
2649
2635
  optimized
2650
2636
  );
2651
- vnode.targetAnchor = targetNode;
2637
+ vnode.targetStart = targetNode;
2638
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
2652
2639
  } else {
2653
2640
  vnode.anchor = nextSibling(node);
2654
2641
  let targetAnchor = targetNode;
2655
2642
  while (targetAnchor) {
2656
- targetAnchor = nextSibling(targetAnchor);
2657
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
2658
- vnode.targetAnchor = targetAnchor;
2659
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
2660
- break;
2643
+ if (targetAnchor && targetAnchor.nodeType === 8) {
2644
+ if (targetAnchor.data === "teleport start anchor") {
2645
+ vnode.targetStart = targetAnchor;
2646
+ } else if (targetAnchor.data === "teleport anchor") {
2647
+ vnode.targetAnchor = targetAnchor;
2648
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
2649
+ break;
2650
+ }
2661
2651
  }
2652
+ targetAnchor = nextSibling(targetAnchor);
2653
+ }
2654
+ if (!vnode.targetAnchor) {
2655
+ prepareAnchor(target, vnode, createText, insert);
2662
2656
  }
2663
2657
  hydrateChildren(
2664
- targetNode,
2658
+ targetNode && nextSibling(targetNode),
2665
2659
  vnode,
2666
2660
  target,
2667
2661
  parentComponent,
@@ -2687,6 +2681,16 @@ function updateCssVars(vnode) {
2687
2681
  ctx.ut();
2688
2682
  }
2689
2683
  }
2684
+ function prepareAnchor(target, vnode, createText, insert) {
2685
+ const targetStart = vnode.targetStart = createText("");
2686
+ const targetAnchor = vnode.targetAnchor = createText("");
2687
+ targetStart[TeleportEndKey] = targetAnchor;
2688
+ if (target) {
2689
+ insert(targetStart, target);
2690
+ insert(targetAnchor, target);
2691
+ }
2692
+ return targetAnchor;
2693
+ }
2690
2694
 
2691
2695
  let hasLoggedMismatchError = false;
2692
2696
  const logMismatchError = () => {
@@ -2935,9 +2939,10 @@ function createHydrationFunctions(rendererInternals) {
2935
2939
  }
2936
2940
  if (props) {
2937
2941
  if (forcePatch || !optimized || patchFlag & (16 | 32)) {
2942
+ const isCustomElement = el.tagName.includes("-");
2938
2943
  for (const key in props) {
2939
2944
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || shared.isOn(key) && !shared.isReservedProp(key) || // force hydrate v-bind with .prop modifiers
2940
- key[0] === ".") {
2945
+ key[0] === "." || isCustomElement) {
2941
2946
  patchProp(el, key, null, props[key], void 0, parentComponent);
2942
2947
  }
2943
2948
  }
@@ -6301,7 +6306,7 @@ function isMemoSame(cached, memo) {
6301
6306
  return true;
6302
6307
  }
6303
6308
 
6304
- const version = "3.4.34";
6309
+ const version = "3.4.36";
6305
6310
  const warn$1 = shared.NOOP;
6306
6311
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6307
6312
  const devtools = void 0;
@@ -846,7 +846,7 @@ declare enum TeleportMoveTypes {
846
846
  REORDER = 2
847
847
  }
848
848
  declare function moveTeleport(vnode: VNode, container: RendererElement, parentAnchor: RendererNode | null, { o: { insert }, m: move }: RendererInternals, moveType?: TeleportMoveTypes): void;
849
- declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
849
+ declare function hydrateTeleport(node: Node, vnode: TeleportVNode, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean, { o: { nextSibling, parentNode, querySelector, insert, createText }, }: RendererInternals<Node, Element>, hydrateChildren: (node: Node | null, vnode: VNode, container: Element, parentComponent: ComponentInternalInstance | null, parentSuspense: SuspenseBoundary | null, slotScopeIds: string[] | null, optimized: boolean) => Node | null): Node | null;
850
850
  export declare const Teleport: {
851
851
  new (): {
852
852
  $props: VNodeProps & TeleportProps;
@@ -1146,7 +1146,7 @@ export declare function registerRuntimeCompiler(_compile: any): void;
1146
1146
  export declare const isRuntimeOnly: () => boolean;
1147
1147
 
1148
1148
  export type WatchEffect = (onCleanup: OnCleanup) => void;
1149
- export type WatchSource<T = any> = Ref<T> | ComputedRef<T> | (() => T);
1149
+ export type WatchSource<T = any> = Ref<T, any> | ComputedRef<T> | (() => T);
1150
1150
  export type WatchCallback<V = any, OV = any> = (value: V, oldValue: OV, onCleanup: OnCleanup) => any;
1151
1151
  type MaybeUndefined<T, I> = I extends true ? T | undefined : T;
1152
1152
  type MapSources<T, Immediate> = {
@@ -1356,7 +1356,7 @@ type InferDefaults<T> = {
1356
1356
  type NativeType = null | number | string | boolean | symbol | Function;
1357
1357
  type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
1358
1358
  type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = Readonly<MappedOmit<T, keyof Defaults>> & {
1359
- readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? T[K] : NotUndefined<T[K]> : never;
1359
+ readonly [K in keyof Defaults]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never;
1360
1360
  } & {
1361
1361
  readonly [K in BKeys]-?: K extends keyof Defaults ? Defaults[K] extends undefined ? boolean | undefined : boolean : boolean;
1362
1362
  };
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.4.34
2
+ * @vue/runtime-core v3.4.36
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2986,14 +2986,27 @@ function normalizePropsOptions(comp, appContext, asMixin = false) {
2986
2986
  if (validatePropName(normalizedKey)) {
2987
2987
  const opt = raw[key];
2988
2988
  const prop = normalized[normalizedKey] = isArray(opt) || isFunction(opt) ? { type: opt } : extend({}, opt);
2989
- if (prop) {
2990
- const booleanIndex = getTypeIndex(Boolean, prop.type);
2991
- const stringIndex = getTypeIndex(String, prop.type);
2992
- prop[0 /* shouldCast */] = booleanIndex > -1;
2993
- prop[1 /* shouldCastTrue */] = stringIndex < 0 || booleanIndex < stringIndex;
2994
- if (booleanIndex > -1 || hasOwn(prop, "default")) {
2995
- needCastKeys.push(normalizedKey);
2989
+ const propType = prop.type;
2990
+ let shouldCast = false;
2991
+ let shouldCastTrue = true;
2992
+ if (isArray(propType)) {
2993
+ for (let index = 0; index < propType.length; ++index) {
2994
+ const type = propType[index];
2995
+ const typeName = isFunction(type) && type.name;
2996
+ if (typeName === "Boolean") {
2997
+ shouldCast = true;
2998
+ break;
2999
+ } else if (typeName === "String") {
3000
+ shouldCastTrue = false;
3001
+ }
2996
3002
  }
3003
+ } else {
3004
+ shouldCast = isFunction(propType) && propType.name === "Boolean";
3005
+ }
3006
+ prop[0 /* shouldCast */] = shouldCast;
3007
+ prop[1 /* shouldCastTrue */] = shouldCastTrue;
3008
+ if (shouldCast || hasOwn(prop, "default")) {
3009
+ needCastKeys.push(normalizedKey);
2997
3010
  }
2998
3011
  }
2999
3012
  }
@@ -3024,17 +3037,6 @@ function getType(ctor) {
3024
3037
  }
3025
3038
  return "";
3026
3039
  }
3027
- function isSameType(a, b) {
3028
- return getType(a) === getType(b);
3029
- }
3030
- function getTypeIndex(type, expectedTypes) {
3031
- if (isArray(expectedTypes)) {
3032
- return expectedTypes.findIndex((t) => isSameType(t, type));
3033
- } else if (isFunction(expectedTypes)) {
3034
- return isSameType(expectedTypes, type) ? 0 : -1;
3035
- }
3036
- return -1;
3037
- }
3038
3040
  function validateProps(rawProps, props, instance) {
3039
3041
  const resolvedValues = toRaw(props);
3040
3042
  const options = instance.propsOptions[0];
@@ -3374,15 +3376,11 @@ const TeleportImpl = {
3374
3376
  if (n1 == null) {
3375
3377
  const placeholder = n2.el = !!(process.env.NODE_ENV !== "production") ? createComment("teleport start") : createText("");
3376
3378
  const mainAnchor = n2.anchor = !!(process.env.NODE_ENV !== "production") ? createComment("teleport end") : createText("");
3377
- const target = n2.target = resolveTarget(n2.props, querySelector);
3378
- const targetStart = n2.targetStart = createText("");
3379
- const targetAnchor = n2.targetAnchor = createText("");
3380
3379
  insert(placeholder, container, anchor);
3381
3380
  insert(mainAnchor, container, anchor);
3382
- targetStart[TeleportEndKey] = targetAnchor;
3381
+ const target = n2.target = resolveTarget(n2.props, querySelector);
3382
+ const targetAnchor = prepareAnchor(target, n2, createText, insert);
3383
3383
  if (target) {
3384
- insert(targetStart, target);
3385
- insert(targetAnchor, target);
3386
3384
  if (namespace === "svg" || isTargetSVG(target)) {
3387
3385
  namespace = "svg";
3388
3386
  } else if (namespace === "mathml" || isTargetMathML(target)) {
@@ -3554,7 +3552,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3554
3552
  }
3555
3553
  }
3556
3554
  function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, {
3557
- o: { nextSibling, parentNode, querySelector }
3555
+ o: { nextSibling, parentNode, querySelector, insert, createText }
3558
3556
  }, hydrateChildren) {
3559
3557
  const target = vnode.target = resolveTarget(
3560
3558
  vnode.props,
@@ -3573,20 +3571,28 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
3573
3571
  slotScopeIds,
3574
3572
  optimized
3575
3573
  );
3576
- vnode.targetAnchor = targetNode;
3574
+ vnode.targetStart = targetNode;
3575
+ vnode.targetAnchor = targetNode && nextSibling(targetNode);
3577
3576
  } else {
3578
3577
  vnode.anchor = nextSibling(node);
3579
3578
  let targetAnchor = targetNode;
3580
3579
  while (targetAnchor) {
3581
- targetAnchor = nextSibling(targetAnchor);
3582
- if (targetAnchor && targetAnchor.nodeType === 8 && targetAnchor.data === "teleport anchor") {
3583
- vnode.targetAnchor = targetAnchor;
3584
- target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3585
- break;
3580
+ if (targetAnchor && targetAnchor.nodeType === 8) {
3581
+ if (targetAnchor.data === "teleport start anchor") {
3582
+ vnode.targetStart = targetAnchor;
3583
+ } else if (targetAnchor.data === "teleport anchor") {
3584
+ vnode.targetAnchor = targetAnchor;
3585
+ target._lpa = vnode.targetAnchor && nextSibling(vnode.targetAnchor);
3586
+ break;
3587
+ }
3586
3588
  }
3589
+ targetAnchor = nextSibling(targetAnchor);
3590
+ }
3591
+ if (!vnode.targetAnchor) {
3592
+ prepareAnchor(target, vnode, createText, insert);
3587
3593
  }
3588
3594
  hydrateChildren(
3589
- targetNode,
3595
+ targetNode && nextSibling(targetNode),
3590
3596
  vnode,
3591
3597
  target,
3592
3598
  parentComponent,
@@ -3612,6 +3618,16 @@ function updateCssVars(vnode) {
3612
3618
  ctx.ut();
3613
3619
  }
3614
3620
  }
3621
+ function prepareAnchor(target, vnode, createText, insert) {
3622
+ const targetStart = vnode.targetStart = createText("");
3623
+ const targetAnchor = vnode.targetAnchor = createText("");
3624
+ targetStart[TeleportEndKey] = targetAnchor;
3625
+ if (target) {
3626
+ insert(targetStart, target);
3627
+ insert(targetAnchor, target);
3628
+ }
3629
+ return targetAnchor;
3630
+ }
3615
3631
 
3616
3632
  let hasLoggedMismatchError = false;
3617
3633
  const logMismatchError = () => {
@@ -3895,6 +3911,7 @@ Server rendered element contains more child nodes than client vdom.`
3895
3911
  }
3896
3912
  if (props) {
3897
3913
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__ || forcePatch || !optimized || patchFlag & (16 | 32)) {
3914
+ const isCustomElement = el.tagName.includes("-");
3898
3915
  for (const key in props) {
3899
3916
  if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && // #11189 skip if this node has directives that have created hooks
3900
3917
  // as it could have mutated the DOM in any possible way
@@ -3902,7 +3919,7 @@ Server rendered element contains more child nodes than client vdom.`
3902
3919
  logMismatchError();
3903
3920
  }
3904
3921
  if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
3905
- key[0] === ".") {
3922
+ key[0] === "." || isCustomElement) {
3906
3923
  patchProp(el, key, null, props[key], void 0, parentComponent);
3907
3924
  }
3908
3925
  }
@@ -8186,7 +8203,7 @@ function isMemoSame(cached, memo) {
8186
8203
  return true;
8187
8204
  }
8188
8205
 
8189
- const version = "3.4.34";
8206
+ const version = "3.4.36";
8190
8207
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8191
8208
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8192
8209
  const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.4.34",
3
+ "version": "3.4.36",
4
4
  "description": "@vue/runtime-core",
5
5
  "main": "index.js",
6
6
  "module": "dist/runtime-core.esm-bundler.js",
@@ -46,7 +46,7 @@
46
46
  },
47
47
  "homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
48
48
  "dependencies": {
49
- "@vue/shared": "3.4.34",
50
- "@vue/reactivity": "3.4.34"
49
+ "@vue/reactivity": "3.4.36",
50
+ "@vue/shared": "3.4.36"
51
51
  }
52
52
  }