@vue/runtime-core 3.5.22 → 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.22
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1948,14 +1948,16 @@ Server rendered element contains more child nodes than client vdom.`
1948
1948
  if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1949
1949
  clientText = clientText.slice(1);
1950
1950
  }
1951
- 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")) {
1952
1954
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1953
1955
  warn$1(
1954
1956
  `Hydration text content mismatch on`,
1955
1957
  el,
1956
1958
  `
1957
- - rendered on server: ${el.textContent}
1958
- - expected on client: ${vnode.children}`
1959
+ - rendered on server: ${textContent}
1960
+ - expected on client: ${clientText}`
1959
1961
  );
1960
1962
  logMismatchError();
1961
1963
  }
@@ -2550,7 +2552,10 @@ function defineAsyncComponent(source) {
2550
2552
  error: error.value
2551
2553
  });
2552
2554
  } else if (loadingComponent && !delayed.value) {
2553
- return createVNode(loadingComponent);
2555
+ return createInnerComp(
2556
+ loadingComponent,
2557
+ instance
2558
+ );
2554
2559
  }
2555
2560
  };
2556
2561
  }
@@ -4848,15 +4853,25 @@ function baseCreateRenderer(options, createHydrationFns) {
4848
4853
  optimized
4849
4854
  );
4850
4855
  } else {
4851
- patchElement(
4852
- n1,
4853
- n2,
4854
- parentComponent,
4855
- parentSuspense,
4856
- namespace,
4857
- slotScopeIds,
4858
- optimized
4859
- );
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
+ }
4860
4875
  }
4861
4876
  };
4862
4877
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -7098,7 +7113,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7098
7113
  pendingId,
7099
7114
  effects,
7100
7115
  parentComponent: parentComponent2,
7101
- container: container2
7116
+ container: container2,
7117
+ isInFallback
7102
7118
  } = suspense;
7103
7119
  let delayEnter = false;
7104
7120
  if (suspense.isHydrating) {
@@ -7115,6 +7131,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7115
7131
  0
7116
7132
  );
7117
7133
  queuePostFlushCb(effects);
7134
+ if (isInFallback && vnode2.ssFallback) {
7135
+ vnode2.ssFallback.el = null;
7136
+ }
7118
7137
  }
7119
7138
  };
7120
7139
  }
@@ -7123,6 +7142,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7123
7142
  anchor = next(activeBranch);
7124
7143
  }
7125
7144
  unmount(activeBranch, parentComponent2, suspense, true);
7145
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
7146
+ vnode2.ssFallback.el = null;
7147
+ }
7126
7148
  }
7127
7149
  if (!delayEnter) {
7128
7150
  move(pendingBranch, container2, anchor, 0);
@@ -7241,6 +7263,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7241
7263
  optimized2
7242
7264
  );
7243
7265
  if (placeholder) {
7266
+ vnode2.placeholder = null;
7244
7267
  remove(placeholder);
7245
7268
  }
7246
7269
  updateHOCHostEl(instance, vnode2.el);
@@ -8416,7 +8439,7 @@ function isMemoSame(cached, memo) {
8416
8439
  return true;
8417
8440
  }
8418
8441
 
8419
- const version = "3.5.22";
8442
+ const version = "3.5.23";
8420
8443
  const warn = warn$1 ;
8421
8444
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8422
8445
  const devtools = devtools$1 ;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.22
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -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
  }
@@ -3652,15 +3657,25 @@ function baseCreateRenderer(options, createHydrationFns) {
3652
3657
  optimized
3653
3658
  );
3654
3659
  } else {
3655
- patchElement(
3656
- n1,
3657
- n2,
3658
- parentComponent,
3659
- parentSuspense,
3660
- namespace,
3661
- slotScopeIds,
3662
- optimized
3663
- );
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
+ }
3664
3679
  }
3665
3680
  };
3666
3681
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -5609,7 +5624,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5609
5624
  pendingId,
5610
5625
  effects,
5611
5626
  parentComponent: parentComponent2,
5612
- container: container2
5627
+ container: container2,
5628
+ isInFallback
5613
5629
  } = suspense;
5614
5630
  let delayEnter = false;
5615
5631
  if (suspense.isHydrating) {
@@ -5626,6 +5642,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5626
5642
  0
5627
5643
  );
5628
5644
  queuePostFlushCb(effects);
5645
+ if (isInFallback && vnode2.ssFallback) {
5646
+ vnode2.ssFallback.el = null;
5647
+ }
5629
5648
  }
5630
5649
  };
5631
5650
  }
@@ -5634,6 +5653,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5634
5653
  anchor = next(activeBranch);
5635
5654
  }
5636
5655
  unmount(activeBranch, parentComponent2, suspense, true);
5656
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
5657
+ vnode2.ssFallback.el = null;
5658
+ }
5637
5659
  }
5638
5660
  if (!delayEnter) {
5639
5661
  move(pendingBranch, container2, anchor, 0);
@@ -5749,6 +5771,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
5749
5771
  optimized2
5750
5772
  );
5751
5773
  if (placeholder) {
5774
+ vnode2.placeholder = null;
5752
5775
  remove(placeholder);
5753
5776
  }
5754
5777
  updateHOCHostEl(instance, vnode2.el);
@@ -6562,7 +6585,7 @@ function isMemoSame(cached, memo) {
6562
6585
  return true;
6563
6586
  }
6564
6587
 
6565
- const version = "3.5.22";
6588
+ const version = "3.5.23";
6566
6589
  const warn$1 = shared.NOOP;
6567
6590
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
6568
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;
@@ -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;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.5.22
2
+ * @vue/runtime-core v3.5.23
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1952,14 +1952,16 @@ Server rendered element contains more child nodes than client vdom.`
1952
1952
  if (clientText[0] === "\n" && (el.tagName === "PRE" || el.tagName === "TEXTAREA")) {
1953
1953
  clientText = clientText.slice(1);
1954
1954
  }
1955
- 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")) {
1956
1958
  if (!isMismatchAllowed(el, 0 /* TEXT */)) {
1957
1959
  (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(
1958
1960
  `Hydration text content mismatch on`,
1959
1961
  el,
1960
1962
  `
1961
- - rendered on server: ${el.textContent}
1962
- - expected on client: ${vnode.children}`
1963
+ - rendered on server: ${textContent}
1964
+ - expected on client: ${clientText}`
1963
1965
  );
1964
1966
  logMismatchError();
1965
1967
  }
@@ -2565,7 +2567,10 @@ function defineAsyncComponent(source) {
2565
2567
  error: error.value
2566
2568
  });
2567
2569
  } else if (loadingComponent && !delayed.value) {
2568
- return createVNode(loadingComponent);
2570
+ return createInnerComp(
2571
+ loadingComponent,
2572
+ instance
2573
+ );
2569
2574
  }
2570
2575
  };
2571
2576
  }
@@ -3141,7 +3146,7 @@ const PublicInstanceProxyHandlers = {
3141
3146
  } else if (hasSetupBinding(setupState, key)) {
3142
3147
  accessCache[key] = 1 /* SETUP */;
3143
3148
  return setupState[key];
3144
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
3149
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
3145
3150
  accessCache[key] = 2 /* DATA */;
3146
3151
  return data[key];
3147
3152
  } else if (
@@ -3207,7 +3212,7 @@ const PublicInstanceProxyHandlers = {
3207
3212
  } else if (!!(process.env.NODE_ENV !== "production") && setupState.__isScriptSetup && hasOwn(setupState, key)) {
3208
3213
  warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
3209
3214
  return false;
3210
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
3215
+ } else if (__VUE_OPTIONS_API__ && data !== EMPTY_OBJ && hasOwn(data, key)) {
3211
3216
  data[key] = value;
3212
3217
  return true;
3213
3218
  } else if (hasOwn(instance.props, key)) {
@@ -3236,7 +3241,7 @@ const PublicInstanceProxyHandlers = {
3236
3241
  _: { data, setupState, accessCache, ctx, appContext, propsOptions, type }
3237
3242
  }, key) {
3238
3243
  let normalizedProps, cssModules;
3239
- 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]);
3240
3245
  },
3241
3246
  defineProperty(target, key, descriptor) {
3242
3247
  if (descriptor.get != null) {
@@ -4897,15 +4902,25 @@ function baseCreateRenderer(options, createHydrationFns) {
4897
4902
  optimized
4898
4903
  );
4899
4904
  } else {
4900
- patchElement(
4901
- n1,
4902
- n2,
4903
- parentComponent,
4904
- parentSuspense,
4905
- namespace,
4906
- slotScopeIds,
4907
- optimized
4908
- );
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
+ }
4909
4924
  }
4910
4925
  };
4911
4926
  const mountElement = (vnode, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
@@ -7158,7 +7173,8 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7158
7173
  pendingId,
7159
7174
  effects,
7160
7175
  parentComponent: parentComponent2,
7161
- container: container2
7176
+ container: container2,
7177
+ isInFallback
7162
7178
  } = suspense;
7163
7179
  let delayEnter = false;
7164
7180
  if (suspense.isHydrating) {
@@ -7175,6 +7191,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7175
7191
  0
7176
7192
  );
7177
7193
  queuePostFlushCb(effects);
7194
+ if (isInFallback && vnode2.ssFallback) {
7195
+ vnode2.ssFallback.el = null;
7196
+ }
7178
7197
  }
7179
7198
  };
7180
7199
  }
@@ -7183,6 +7202,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7183
7202
  anchor = next(activeBranch);
7184
7203
  }
7185
7204
  unmount(activeBranch, parentComponent2, suspense, true);
7205
+ if (!delayEnter && isInFallback && vnode2.ssFallback) {
7206
+ vnode2.ssFallback.el = null;
7207
+ }
7186
7208
  }
7187
7209
  if (!delayEnter) {
7188
7210
  move(pendingBranch, container2, anchor, 0);
@@ -7301,6 +7323,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7301
7323
  optimized2
7302
7324
  );
7303
7325
  if (placeholder) {
7326
+ vnode2.placeholder = null;
7304
7327
  remove(placeholder);
7305
7328
  }
7306
7329
  updateHOCHostEl(instance, vnode2.el);
@@ -8490,7 +8513,7 @@ function isMemoSame(cached, memo) {
8490
8513
  return true;
8491
8514
  }
8492
8515
 
8493
- const version = "3.5.22";
8516
+ const version = "3.5.23";
8494
8517
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
8495
8518
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
8496
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.22",
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.22",
50
- "@vue/reactivity": "3.5.22"
49
+ "@vue/shared": "3.5.23",
50
+ "@vue/reactivity": "3.5.23"
51
51
  }
52
52
  }