vue 3.6.0-rc.3 → 3.6.0-rc.5

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.
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.6.0-rc.3
2
+ * vue v3.6.0-rc.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.6.0-rc.3
2
+ * vue v3.6.0-rc.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -1,5 +1,5 @@
1
1
  /**
2
- * vue v3.6.0-rc.3
2
+ * vue v3.6.0-rc.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3852,7 +3852,18 @@ const logMismatchError = () => {
3852
3852
  hasLoggedMismatchError = true;
3853
3853
  };
3854
3854
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
3855
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
3855
+ const isMathMLContainer = (container) => {
3856
+ if (!container.namespaceURI.includes("MathML")) return false;
3857
+ if (container.tagName !== "annotation-xml") return true;
3858
+ const encoding = container.getAttribute("encoding");
3859
+ return !encoding || !encoding.includes("html");
3860
+ };
3861
+ /**
3862
+ * Resolve the element namespace a container's children should be created in.
3863
+ * The live DOM is the source of truth, so this also covers containers that are
3864
+ * only known at runtime (interop boundaries, teleport targets).
3865
+ * @internal
3866
+ */
3856
3867
  const getContainerType = (container) => {
3857
3868
  if (container.nodeType !== 1) return void 0;
3858
3869
  if (isSVGContainer(container)) return "svg";
@@ -3931,7 +3942,7 @@ function createHydrationFunctions(rendererInternals) {
3931
3942
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3932
3943
  break;
3933
3944
  case VaporSlot:
3934
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
3945
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
3935
3946
  break;
3936
3947
  default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
3937
3948
  else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
@@ -4098,7 +4109,7 @@ function createHydrationFunctions(rendererInternals) {
4098
4109
  const container = parentNode(node);
4099
4110
  remove(node);
4100
4111
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4101
- if (parentComponent) {
4112
+ if (parentComponent && parentComponent.vnode) {
4102
4113
  parentComponent.vnode.el = vnode.el;
4103
4114
  updateHOCHostEl(parentComponent, vnode.el);
4104
4115
  }
@@ -4121,7 +4132,7 @@ function createHydrationFunctions(rendererInternals) {
4121
4132
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
4122
4133
  let parent = parentComponent;
4123
4134
  while (parent) {
4124
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4135
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4125
4136
  parent = parent.parent;
4126
4137
  }
4127
4138
  };
@@ -6547,7 +6558,7 @@ function baseCreateRenderer(options, createHydrationFns) {
6547
6558
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6548
6559
  break;
6549
6560
  case VaporSlot:
6550
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
6561
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
6551
6562
  break;
6552
6563
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6553
6564
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -7396,7 +7407,7 @@ function isVaporComponent(type) {
7396
7407
  /**
7397
7408
  * shared between vdom and vapor
7398
7409
  */
7399
- function getInheritedScopeIds(vnode, parentComponent) {
7410
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
7400
7411
  const inheritedScopeIds = [];
7401
7412
  let currentParent = parentComponent;
7402
7413
  let currentVNode = vnode;
@@ -7412,6 +7423,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
7412
7423
  currentParent = currentParent.parent;
7413
7424
  } else break;
7414
7425
  }
7426
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
7427
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
7415
7428
  return inheritedScopeIds;
7416
7429
  }
7417
7430
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -8646,7 +8659,7 @@ function isMemoSame(cached, memo) {
8646
8659
  }
8647
8660
  //#endregion
8648
8661
  //#region packages/runtime-core/src/index.ts
8649
- const version = "3.6.0-rc.3";
8662
+ const version = "3.6.0-rc.5";
8650
8663
  const warn = warn$1;
8651
8664
  /**
8652
8665
  * Runtime error messages. Only exposed in dev or esm builds.