@vue/runtime-core 3.5.21 → 3.5.23

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.21
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -447,14 +447,11 @@ function checkRecursiveUpdates(seen, fn) {
447
447
  let isHmrUpdating = false;
448
448
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
449
449
  {
450
- const g = shared.getGlobalThis();
451
- if (!g.__VUE_HMR_RUNTIME__) {
452
- g.__VUE_HMR_RUNTIME__ = {
453
- createRecord: tryWrap(createRecord),
454
- rerender: tryWrap(rerender),
455
- reload: tryWrap(reload)
456
- };
457
- }
450
+ shared.getGlobalThis().__VUE_HMR_RUNTIME__ = {
451
+ createRecord: tryWrap(createRecord),
452
+ rerender: tryWrap(rerender),
453
+ reload: tryWrap(reload)
454
+ };
458
455
  }
459
456
  const map = /* @__PURE__ */ new Map();
460
457
  function registerHMR(instance) {
@@ -821,9 +818,6 @@ const TeleportImpl = {
821
818
  insert(mainAnchor, container, anchor);
822
819
  const mount = (container2, anchor2) => {
823
820
  if (shapeFlag & 16) {
824
- if (parentComponent && parentComponent.isCE) {
825
- parentComponent.ce._teleportTarget = container2;
826
- }
827
821
  mountChildren(
828
822
  children,
829
823
  container2,
@@ -845,6 +839,9 @@ const TeleportImpl = {
845
839
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
846
840
  namespace = "mathml";
847
841
  }
842
+ if (parentComponent && parentComponent.isCE) {
843
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
844
+ }
848
845
  if (!disabled) {
849
846
  mount(target, targetAnchor);
850
847
  updateCssVars(n2, false);
@@ -1951,14 +1948,16 @@ Server rendered element contains more child nodes than client vdom.`
1951
1948
  if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1952
1949
  clientText = clientText.slice(1);
1953
1950
  }
1954
- if (el.textContent !== clientText) {
1951
+ const { textContent } = el;
1952
+ if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
1953
+ textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
1955
1954
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1956
1955
  warn$1(
1957
1956
  `Hydration text content mismatch on`,
1958
1957
  el,
1959
1958
  `
1960
- - rendered on server: ${el.textContent}
1961
- - expected on client: ${vnode.children}`
1959
+ - rendered on server: ${textContent}
1960
+ - expected on client: ${clientText}`
1962
1961
  );
1963
1962
  logMismatchError();
1964
1963
  }
@@ -2553,7 +2552,10 @@ function defineAsyncComponent(source) {
2553
2552
  error: error.value
2554
2553
  });
2555
2554
  } else if (loadingComponent && !delayed.value) {
2556
- return createVNode(loadingComponent);
2555
+ return createInnerComp(
2556
+ loadingComponent,
2557
+ instance
2558
+ );
2557
2559
  }
2558
2560
  };
2559
2561
  }
@@ -3007,12 +3009,13 @@ function createSlots(slots, dynamicSlots) {
3007
3009
 
3008
3010
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3009
3011
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3012
+ const hasProps = Object.keys(props).length > 0;
3010
3013
  if (name !== "default") props.name = name;
3011
3014
  return openBlock(), createBlock(
3012
3015
  Fragment,
3013
3016
  null,
3014
3017
  [createVNode("slot", props, fallback && fallback())],
3015
- 64
3018
+ hasProps ? -2 : 64
3016
3019
  );
3017
3020
  }
3018
3021
  let slot = slots[name];
@@ -4850,15 +4853,25 @@ function baseCreateRenderer(options, createHydrationFns) {
4850
4853
  optimized
4851
4854
  );
4852
4855
  } else {
4853
- patchElement(
4854
- n1,
4855
- n2,
4856
- parentComponent,
4857
- parentSuspense,
4858
- namespace,
4859
- slotScopeIds,
4860
- optimized
4861
- );
4856
+ const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
4857
+ try {
4858
+ if (customElement) {
4859
+ customElement._beginPatch();
4860
+ }
4861
+ patchElement(
4862
+ n1,
4863
+ n2,
4864
+ parentComponent,
4865
+ parentSuspense,
4866
+ namespace,
4867
+ slotScopeIds,
4868
+ optimized
4869
+ );
4870
+ } finally {
4871
+ if (customElement) {
4872
+ customElement._endPatch();
4873
+ }
4874
+ }
4862
4875
  }
4863
4876
  };
4864
4877
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -7100,7 +7113,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7100
7113
  pendingId,
7101
7114
  effects,
7102
7115
  parentComponent: parentComponent2,
7103
- container: container2
7116
+ container: container2,
7117
+ isInFallback
7104
7118
  } = suspense;
7105
7119
  let delayEnter = false;
7106
7120
  if (suspense.isHydrating) {
@@ -7117,6 +7131,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7117
7131
  0
7118
7132
  );
7119
7133
  queuePostFlushCb(effects);
7134
+ if (isInFallback && vnode2.ssFallback) {
7135
+ vnode2.ssFallback.el = null;
7136
+ }
7120
7137
  }
7121
7138
  };
7122
7139
  }
@@ -7125,6 +7142,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7125
7142
  anchor = next(activeBranch);
7126
7143
  }
7127
7144
  unmount(activeBranch, parentComponent2, suspense, true);
7145
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
7146
+ vnode2.ssFallback.el = null;
7147
+ }
7128
7148
  }
7129
7149
  if (!delayEnter) {
7130
7150
  move(pendingBranch, container2, anchor, 0);
@@ -7243,6 +7263,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7243
7263
  optimized2
7244
7264
  );
7245
7265
  if (placeholder) {
7266
+ vnode2.placeholder = null;
7246
7267
  remove(placeholder);
7247
7268
  }
7248
7269
  updateHOCHostEl(instance, vnode2.el);
@@ -8187,31 +8208,28 @@ const computed = (getterOrOptions, debugOptions) => {
8187
8208
  };
8188
8209
 
8189
8210
  function h(type, propsOrChildren, children) {
8190
- const doCreateVNode = (type2, props, children2) => {
8211
+ try {
8191
8212
  setBlockTracking(-1);
8192
- try {
8193
- return createVNode(type2, props, children2);
8194
- } finally {
8195
- setBlockTracking(1);
8196
- }
8197
- };
8198
- const l = arguments.length;
8199
- if (l === 2) {
8200
- if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
8201
- if (isVNode(propsOrChildren)) {
8202
- return doCreateVNode(type, null, [propsOrChildren]);
8213
+ const l = arguments.length;
8214
+ if (l === 2) {
8215
+ if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
8216
+ if (isVNode(propsOrChildren)) {
8217
+ return createVNode(type, null, [propsOrChildren]);
8218
+ }
8219
+ return createVNode(type, propsOrChildren);
8220
+ } else {
8221
+ return createVNode(type, null, propsOrChildren);
8203
8222
  }
8204
- return doCreateVNode(type, propsOrChildren);
8205
8223
  } else {
8206
- return doCreateVNode(type, null, propsOrChildren);
8207
- }
8208
- } else {
8209
- if (l > 3) {
8210
- children = Array.prototype.slice.call(arguments, 2);
8211
- } else if (l === 3 && isVNode(children)) {
8212
- children = [children];
8224
+ if (l > 3) {
8225
+ children = Array.prototype.slice.call(arguments, 2);
8226
+ } else if (l === 3 && isVNode(children)) {
8227
+ children = [children];
8228
+ }
8229
+ return createVNode(type, propsOrChildren, children);
8213
8230
  }
8214
- return doCreateVNode(type, propsOrChildren, children);
8231
+ } finally {
8232
+ setBlockTracking(1);
8215
8233
  }
8216
8234
  }
8217
8235
 
@@ -8421,7 +8439,7 @@ function isMemoSame(cached, memo) {
8421
8439
  return true;
8422
8440
  }
8423
8441
 
8424
- const version = "3.5.21";
8442
+ const version = "3.5.23";
8425
8443
  const warn = warn$1 ;
8426
8444
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8427
8445
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.21
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -414,9 +414,6 @@ const TeleportImpl = {
414
414
  insert(mainAnchor, container, anchor);
415
415
  const mount = (container2, anchor2) => {
416
416
  if (shapeFlag & 16) {
417
- if (parentComponent && parentComponent.isCE) {
418
- parentComponent.ce._teleportTarget = container2;
419
- }
420
417
  mountChildren(
421
418
  children,
422
419
  container2,
@@ -438,6 +435,9 @@ const TeleportImpl = {
438
435
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
439
436
  namespace = "mathml";
440
437
  }
438
+ if (parentComponent && parentComponent.isCE) {
439
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
440
+ }
441
441
  if (!disabled) {
442
442
  mount(target, targetAnchor);
443
443
  updateCssVars(n2, false);
@@ -1456,7 +1456,9 @@ function createHydrationFunctions(rendererInternals) {
1456
1456
  if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1457
1457
  clientText = clientText.slice(1);
1458
1458
  }
1459
- if (el.textContent !== clientText) {
1459
+ const { textContent } = el;
1460
+ if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
1461
+ textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
1460
1462
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1461
1463
  logMismatchError();
1462
1464
  }
@@ -1902,7 +1904,10 @@ function defineAsyncComponent(source) {
1902
1904
  error: error.value
1903
1905
  });
1904
1906
  } else if (loadingComponent && !delayed.value) {
1905
- return createVNode(loadingComponent);
1907
+ return createInnerComp(
1908
+ loadingComponent,
1909
+ instance
1910
+ );
1906
1911
  }
1907
1912
  };
1908
1913
  }
@@ -2327,12 +2332,13 @@ function createSlots(slots, dynamicSlots) {
2327
2332
 
2328
2333
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
2329
2334
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
2335
+ const hasProps = Object.keys(props).length > 0;
2330
2336
  if (name !== "default") props.name = name;
2331
2337
  return openBlock(), createBlock(
2332
2338
  Fragment,
2333
2339
  null,
2334
2340
  [createVNode("slot", props, fallback && fallback())],
2335
- 64
2341
+ hasProps ? -2 : 64
2336
2342
  );
2337
2343
  }
2338
2344
  let slot = slots[name];
@@ -3651,15 +3657,25 @@ function baseCreateRenderer(options, createHydrationFns) {
3651
3657
  optimized
3652
3658
  );
3653
3659
  } else {
3654
- patchElement(
3655
- n1,
3656
- n2,
3657
- parentComponent,
3658
- parentSuspense,
3659
- namespace,
3660
- slotScopeIds,
3661
- optimized
3662
- );
3660
+ const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
3661
+ try {
3662
+ if (customElement) {
3663
+ customElement._beginPatch();
3664
+ }
3665
+ patchElement(
3666
+ n1,
3667
+ n2,
3668
+ parentComponent,
3669
+ parentSuspense,
3670
+ namespace,
3671
+ slotScopeIds,
3672
+ optimized
3673
+ );
3674
+ } finally {
3675
+ if (customElement) {
3676
+ customElement._endPatch();
3677
+ }
3678
+ }
3663
3679
  }
3664
3680
  };
3665
3681
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -5608,7 +5624,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5608
5624
  pendingId,
5609
5625
  effects,
5610
5626
  parentComponent: parentComponent2,
5611
- container: container2
5627
+ container: container2,
5628
+ isInFallback
5612
5629
  } = suspense;
5613
5630
  let delayEnter = false;
5614
5631
  if (suspense.isHydrating) {
@@ -5625,6 +5642,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5625
5642
  0
5626
5643
  );
5627
5644
  queuePostFlushCb(effects);
5645
+ if (isInFallback && vnode2.ssFallback) {
5646
+ vnode2.ssFallback.el = null;
5647
+ }
5628
5648
  }
5629
5649
  };
5630
5650
  }
@@ -5633,6 +5653,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5633
5653
  anchor = next(activeBranch);
5634
5654
  }
5635
5655
  unmount(activeBranch, parentComponent2, suspense, true);
5656
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
5657
+ vnode2.ssFallback.el = null;
5658
+ }
5636
5659
  }
5637
5660
  if (!delayEnter) {
5638
5661
  move(pendingBranch, container2, anchor, 0);
@@ -5748,6 +5771,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5748
5771
  optimized2
5749
5772
  );
5750
5773
  if (placeholder) {
5774
+ vnode2.placeholder = null;
5751
5775
  remove(placeholder);
5752
5776
  }
5753
5777
  updateHOCHostEl(instance, vnode2.el);
@@ -6504,31 +6528,28 @@ const computed = (getterOrOptions, debugOptions) => {
6504
6528
  };
6505
6529
 
6506
6530
  function h(type, propsOrChildren, children) {
6507
- const doCreateVNode = (type2, props, children2) => {
6531
+ try {
6508
6532
  setBlockTracking(-1);
6509
- try {
6510
- return createVNode(type2, props, children2);
6511
- } finally {
6512
- setBlockTracking(1);
6513
- }
6514
- };
6515
- const l = arguments.length;
6516
- if (l === 2) {
6517
- if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
6518
- if (isVNode(propsOrChildren)) {
6519
- return doCreateVNode(type, null, [propsOrChildren]);
6533
+ const l = arguments.length;
6534
+ if (l === 2) {
6535
+ if (shared.isObject(propsOrChildren) && !shared.isArray(propsOrChildren)) {
6536
+ if (isVNode(propsOrChildren)) {
6537
+ return createVNode(type, null, [propsOrChildren]);
6538
+ }
6539
+ return createVNode(type, propsOrChildren);
6540
+ } else {
6541
+ return createVNode(type, null, propsOrChildren);
6520
6542
  }
6521
- return doCreateVNode(type, propsOrChildren);
6522
6543
  } else {
6523
- return doCreateVNode(type, null, propsOrChildren);
6524
- }
6525
- } else {
6526
- if (l > 3) {
6527
- children = Array.prototype.slice.call(arguments, 2);
6528
- } else if (l === 3 && isVNode(children)) {
6529
- children = [children];
6544
+ if (l > 3) {
6545
+ children = Array.prototype.slice.call(arguments, 2);
6546
+ } else if (l === 3 && isVNode(children)) {
6547
+ children = [children];
6548
+ }
6549
+ return createVNode(type, propsOrChildren, children);
6530
6550
  }
6531
- return doCreateVNode(type, propsOrChildren, children);
6551
+ } finally {
6552
+ setBlockTracking(1);
6532
6553
  }
6533
6554
  }
6534
6555
 
@@ -6564,7 +6585,7 @@ function isMemoSame(cached, memo) {
6564
6585
  return true;
6565
6586
  }
6566
6587
 
6567
- const version = "3.5.21";
6588
+ const version = "3.5.23";
6568
6589
  const warn$1 = shared.NOOP;
6569
6590
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6570
6591
  const devtools = void 0;
@@ -332,7 +332,7 @@ type MappedOmit<T, K extends keyof any> = {
332
332
  type InferDefaults<T> = {
333
333
  [K in keyof T]?: InferDefault<T, T[K]>;
334
334
  };
335
- type NativeType = null | number | string | boolean | symbol | Function;
335
+ type NativeType = null | undefined | number | string | boolean | symbol | Function;
336
336
  type InferDefault<P, T> = ((props: P) => T & {}) | (T extends NativeType ? T : never);
337
337
  type PropsWithDefaults<T, Defaults extends InferDefaults<T>, BKeys extends keyof T> = T extends unknown ? Readonly<MappedOmit<T, keyof Defaults>> & {
338
338
  readonly [K in keyof Defaults as K extends keyof T ? K : never]-?: K extends keyof T ? Defaults[K] extends undefined ? IfAny<Defaults[K], NotUndefined<T[K]>, T[K]> : NotUndefined<T[K]> : never;
@@ -397,17 +397,17 @@ return withDirectives(h(comp), [
397
397
  ])
398
398
  */
399
399
 
400
- export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg extends string = string> {
400
+ export interface DirectiveBinding<Value = any, Modifiers extends string = string, Arg = any> {
401
401
  instance: ComponentPublicInstance | Record<string, any> | null;
402
402
  value: Value;
403
403
  oldValue: Value | null;
404
404
  arg?: Arg;
405
405
  modifiers: DirectiveModifiers<Modifiers>;
406
- dir: ObjectDirective<any, Value>;
406
+ dir: ObjectDirective<any, Value, Modifiers, Arg>;
407
407
  }
408
- export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg extends string = string> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void;
409
- type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg extends string = string> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined;
410
- export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> {
408
+ export type DirectiveHook<HostElement = any, Prev = VNode<any, HostElement> | null, Value = any, Modifiers extends string = string, Arg = any> = (el: HostElement, binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode<any, HostElement>, prevVNode: Prev) => void;
409
+ type SSRDirectiveHook<Value = any, Modifiers extends string = string, Arg = any> = (binding: DirectiveBinding<Value, Modifiers, Arg>, vnode: VNode) => Data | undefined;
410
+ export interface ObjectDirective<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> {
411
411
  created?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
412
412
  beforeMount?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
413
413
  mounted?: DirectiveHook<HostElement, null, Value, Modifiers, Arg>;
@@ -418,10 +418,10 @@ export interface ObjectDirective<HostElement = any, Value = any, Modifiers exten
418
418
  getSSRProps?: SSRDirectiveHook<Value, Modifiers, Arg>;
419
419
  deep?: boolean;
420
420
  }
421
- export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg extends string = string> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;
422
- export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;
421
+ export type FunctionDirective<HostElement = any, V = any, Modifiers extends string = string, Arg = any> = DirectiveHook<HostElement, any, V, Modifiers, Arg>;
422
+ export type Directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any> = ObjectDirective<HostElement, Value, Modifiers, Arg> | FunctionDirective<HostElement, Value, Modifiers, Arg>;
423
423
  type DirectiveModifiers<K extends string = string> = Partial<Record<K, boolean>>;
424
- export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, string] | [Directive | undefined, any, string | undefined, DirectiveModifiers]>;
424
+ export type DirectiveArguments = Array<[Directive | undefined] | [Directive | undefined, any] | [Directive | undefined, any, any] | [Directive | undefined, any, any, DirectiveModifiers]>;
425
425
  /**
426
426
  * Adds directives to a VNode.
427
427
  */
@@ -901,8 +901,8 @@ interface LegacyOptions<Props, D, C extends ComputedOptions, M extends MethodOpt
901
901
  * #3468
902
902
  *
903
903
  * type-only, used to assist Mixin's type inference,
904
- * typescript will try to simplify the inferred `Mixin` type,
905
- * with the `__differentiator`, typescript won't be able to combine different mixins,
904
+ * TypeScript will try to simplify the inferred `Mixin` type,
905
+ * with the `__differentiator`, TypeScript won't be able to combine different mixins,
906
906
  * because the `__differentiator` will be different
907
907
  */
908
908
  __differentiator?: keyof D | keyof C | keyof M;
@@ -1025,8 +1025,8 @@ export interface App<HostElement = any> {
1025
1025
  mixin(mixin: ComponentOptions): this;
1026
1026
  component(name: string): Component | undefined;
1027
1027
  component<T extends Component | DefineComponent>(name: string, component: T): this;
1028
- directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined;
1029
- directive<HostElement = any, Value = any, Modifiers extends string = string, Arg extends string = string>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this;
1028
+ directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string): Directive<HostElement, Value, Modifiers, Arg> | undefined;
1029
+ directive<HostElement = any, Value = any, Modifiers extends string = string, Arg = any>(name: string, directive: Directive<HostElement, Value, Modifiers, Arg>): this;
1030
1030
  mount(rootContainer: HostElement | string,
1031
1031
  /**
1032
1032
  * @internal
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.21
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -450,14 +450,11 @@ function checkRecursiveUpdates(seen, fn) {
450
450
  let isHmrUpdating = false;
451
451
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
452
452
  if (!!(process.env.NODE_ENV !== "production")) {
453
- const g = getGlobalThis();
454
- if (!g.__VUE_HMR_RUNTIME__) {
455
- g.__VUE_HMR_RUNTIME__ = {
456
- createRecord: tryWrap(createRecord),
457
- rerender: tryWrap(rerender),
458
- reload: tryWrap(reload)
459
- };
460
- }
453
+ getGlobalThis().__VUE_HMR_RUNTIME__ = {
454
+ createRecord: tryWrap(createRecord),
455
+ rerender: tryWrap(rerender),
456
+ reload: tryWrap(reload)
457
+ };
461
458
  }
462
459
  const map = /* @__PURE__ */ new Map();
463
460
  function registerHMR(instance) {
@@ -824,9 +821,6 @@ const TeleportImpl = {
824
821
  insert(mainAnchor, container, anchor);
825
822
  const mount = (container2, anchor2) => {
826
823
  if (shapeFlag & 16) {
827
- if (parentComponent && parentComponent.isCE) {
828
- parentComponent.ce._teleportTarget = container2;
829
- }
830
824
  mountChildren(
831
825
  children,
832
826
  container2,
@@ -848,6 +842,9 @@ const TeleportImpl = {
848
842
  } else if (namespace !== "mathml" && isTargetMathML(target)) {
849
843
  namespace = "mathml";
850
844
  }
845
+ if (parentComponent && parentComponent.isCE) {
846
+ (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
847
+ }
851
848
  if (!disabled) {
852
849
  mount(target, targetAnchor);
853
850
  updateCssVars(n2, false);
@@ -1955,14 +1952,16 @@ Server rendered element contains more child nodes than client vdom.`
1955
1952
  if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1956
1953
  clientText = clientText.slice(1);
1957
1954
  }
1958
- if (el.textContent !== clientText) {
1955
+ const { textContent } = el;
1956
+ if (textContent !== clientText && // innerHTML normalize \r\n or \r into a single \n in the DOM
1957
+ textContent !== clientText.replace(/\r\n|\r/g, "\n")) {
1959
1958
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1960
1959
  (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
1961
1960
  `Hydration text content mismatch on`,
1962
1961
  el,
1963
1962
  `
1964
- - rendered on server: ${el.textContent}
1965
- - expected on client: ${vnode.children}`
1963
+ - rendered on server: ${textContent}
1964
+ - expected on client: ${clientText}`
1966
1965
  );
1967
1966
  logMismatchError();
1968
1967
  }
@@ -2568,7 +2567,10 @@ function defineAsyncComponent(source) {
2568
2567
  error: error.value
2569
2568
  });
2570
2569
  } else if (loadingComponent && !delayed.value) {
2571
- return createVNode(loadingComponent);
2570
+ return createInnerComp(
2571
+ loadingComponent,
2572
+ instance
2573
+ );
2572
2574
  }
2573
2575
  };
2574
2576
  }
@@ -3025,12 +3027,13 @@ function createSlots(slots, dynamicSlots) {
3025
3027
 
3026
3028
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
3027
3029
  if (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce) {
3030
+ const hasProps = Object.keys(props).length > 0;
3028
3031
  if (name !== "default") props.name = name;
3029
3032
  return openBlock(), createBlock(
3030
3033
  Fragment,
3031
3034
  null,
3032
3035
  [createVNode("slot", props, fallback && fallback())],
3033
- 64
3036
+ hasProps ? -2 : 64
3034
3037
  );
3035
3038
  }
3036
3039
  let slot = slots[name];
@@ -3143,7 +3146,7 @@ const PublicInstanceProxyHandlers = {
3143
3146
  } else if (hasSetupBinding(setupState, key)) {
3144
3147
  accessCache[key] = 1 /* SETUP */;
3145
3148
  return setupState[key];
3146
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
3149
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
3147
3150
  accessCache[key] = 2 /* DATA */;
3148
3151
  return data[key];
3149
3152
  } else if (
@@ -3209,7 +3212,7 @@ const PublicInstanceProxyHandlers = {
3209
3212
  } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
3210
3213
  warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
3211
3214
  return false;
3212
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
3215
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
3213
3216
  data[key] = value;
3214
3217
  return true;
3215
3218
  } else if (hasOwn(instance.props, key)) {
@@ -3238,7 +3241,7 @@ const PublicInstanceProxyHandlers = {
3238
3241
  _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
3239
3242
  }, key) {
3240
3243
  let normalizedProps, cssModules;
3241
- return !!(accessCache[key] || data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
3244
+ return !!(accessCache[key] || __VUE_OPTIONS_API__ && data !== EMPTY_OBJ && key[0] !== "$" && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key) || (cssModules = type.__cssModules) && cssModules[key]);
3242
3245
  },
3243
3246
  defineProperty(target, key, descriptor) {
3244
3247
  if (descriptor.get != null) {
@@ -4899,15 +4902,25 @@ function baseCreateRenderer(options, createHydrationFns) {
4899
4902
  optimized
4900
4903
  );
4901
4904
  } else {
4902
- patchElement(
4903
- n1,
4904
- n2,
4905
- parentComponent,
4906
- parentSuspense,
4907
- namespace,
4908
- slotScopeIds,
4909
- optimized
4910
- );
4905
+ const customElement = !!(n1.el && n1.el._isVueCE) ? n1.el : null;
4906
+ try {
4907
+ if (customElement) {
4908
+ customElement._beginPatch();
4909
+ }
4910
+ patchElement(
4911
+ n1,
4912
+ n2,
4913
+ parentComponent,
4914
+ parentSuspense,
4915
+ namespace,
4916
+ slotScopeIds,
4917
+ optimized
4918
+ );
4919
+ } finally {
4920
+ if (customElement) {
4921
+ customElement._endPatch();
4922
+ }
4923
+ }
4911
4924
  }
4912
4925
  };
4913
4926
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -7160,7 +7173,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7160
7173
  pendingId,
7161
7174
  effects,
7162
7175
  parentComponent: parentComponent2,
7163
- container: container2
7176
+ container: container2,
7177
+ isInFallback
7164
7178
  } = suspense;
7165
7179
  let delayEnter = false;
7166
7180
  if (suspense.isHydrating) {
@@ -7177,6 +7191,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7177
7191
  0
7178
7192
  );
7179
7193
  queuePostFlushCb(effects);
7194
+ if (isInFallback && vnode2.ssFallback) {
7195
+ vnode2.ssFallback.el = null;
7196
+ }
7180
7197
  }
7181
7198
  };
7182
7199
  }
@@ -7185,6 +7202,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7185
7202
  anchor = next(activeBranch);
7186
7203
  }
7187
7204
  unmount(activeBranch, parentComponent2, suspense, true);
7205
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
7206
+ vnode2.ssFallback.el = null;
7207
+ }
7188
7208
  }
7189
7209
  if (!delayEnter) {
7190
7210
  move(pendingBranch, container2, anchor, 0);
@@ -7303,6 +7323,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7303
7323
  optimized2
7304
7324
  );
7305
7325
  if (placeholder) {
7326
+ vnode2.placeholder = null;
7306
7327
  remove(placeholder);
7307
7328
  }
7308
7329
  updateHOCHostEl(instance, vnode2.el);
@@ -8261,31 +8282,28 @@ const computed = (getterOrOptions, debugOptions) => {
8261
8282
  };
8262
8283
 
8263
8284
  function h(type, propsOrChildren, children) {
8264
- const doCreateVNode = (type2, props, children2) => {
8285
+ try {
8265
8286
  setBlockTracking(-1);
8266
- try {
8267
- return createVNode(type2, props, children2);
8268
- } finally {
8269
- setBlockTracking(1);
8270
- }
8271
- };
8272
- const l = arguments.length;
8273
- if (l === 2) {
8274
- if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
8275
- if (isVNode(propsOrChildren)) {
8276
- return doCreateVNode(type, null, [propsOrChildren]);
8287
+ const l = arguments.length;
8288
+ if (l === 2) {
8289
+ if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
8290
+ if (isVNode(propsOrChildren)) {
8291
+ return createVNode(type, null, [propsOrChildren]);
8292
+ }
8293
+ return createVNode(type, propsOrChildren);
8294
+ } else {
8295
+ return createVNode(type, null, propsOrChildren);
8277
8296
  }
8278
- return doCreateVNode(type, propsOrChildren);
8279
8297
  } else {
8280
- return doCreateVNode(type, null, propsOrChildren);
8281
- }
8282
- } else {
8283
- if (l > 3) {
8284
- children = Array.prototype.slice.call(arguments, 2);
8285
- } else if (l === 3 && isVNode(children)) {
8286
- children = [children];
8298
+ if (l > 3) {
8299
+ children = Array.prototype.slice.call(arguments, 2);
8300
+ } else if (l === 3 && isVNode(children)) {
8301
+ children = [children];
8302
+ }
8303
+ return createVNode(type, propsOrChildren, children);
8287
8304
  }
8288
- return doCreateVNode(type, propsOrChildren, children);
8305
+ } finally {
8306
+ setBlockTracking(1);
8289
8307
  }
8290
8308
  }
8291
8309
 
@@ -8495,7 +8513,7 @@ function isMemoSame(cached, memo) {
8495
8513
  return true;
8496
8514
  }
8497
8515
 
8498
- const version = "3.5.21";
8516
+ const version = "3.5.23";
8499
8517
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8500
8518
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8501
8519
  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.21",
3
+ "version": "3.5.23",
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.21",
50
- "@vue/reactivity": "3.5.21"
49
+ "@vue/shared": "3.5.23",
50
+ "@vue/reactivity": "3.5.23"
51
51
  }
52
52
  }