@vue/runtime-dom 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.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.6.0-rc.3
2
+ * @vue/runtime-dom v3.6.0-rc.5
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3760,7 +3760,18 @@ var VueRuntimeDOM = (function(exports) {
3760
3760
  hasLoggedMismatchError = true;
3761
3761
  };
3762
3762
  const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
3763
- const isMathMLContainer = (container) => container.namespaceURI.includes("MathML");
3763
+ const isMathMLContainer = (container) => {
3764
+ if (!container.namespaceURI.includes("MathML")) return false;
3765
+ if (container.tagName !== "annotation-xml") return true;
3766
+ const encoding = container.getAttribute("encoding");
3767
+ return !encoding || !encoding.includes("html");
3768
+ };
3769
+ /**
3770
+ * Resolve the element namespace a container's children should be created in.
3771
+ * The live DOM is the source of truth, so this also covers containers that are
3772
+ * only known at runtime (interop boundaries, teleport targets).
3773
+ * @internal
3774
+ */
3764
3775
  const getContainerType = (container) => {
3765
3776
  if (container.nodeType !== 1) return void 0;
3766
3777
  if (isSVGContainer(container)) return "svg";
@@ -3839,7 +3850,7 @@ var VueRuntimeDOM = (function(exports) {
3839
3850
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
3840
3851
  break;
3841
3852
  case VaporSlot:
3842
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
3853
+ nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
3843
3854
  break;
3844
3855
  default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
3845
3856
  else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
@@ -4006,7 +4017,7 @@ var VueRuntimeDOM = (function(exports) {
4006
4017
  const container = parentNode(node);
4007
4018
  remove(node);
4008
4019
  patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
4009
- if (parentComponent) {
4020
+ if (parentComponent && parentComponent.vnode) {
4010
4021
  parentComponent.vnode.el = vnode.el;
4011
4022
  updateHOCHostEl(parentComponent, vnode.el);
4012
4023
  }
@@ -4029,7 +4040,7 @@ var VueRuntimeDOM = (function(exports) {
4029
4040
  if (parentNode) parentNode.replaceChild(newNode, oldNode);
4030
4041
  let parent = parentComponent;
4031
4042
  while (parent) {
4032
- if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4043
+ if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
4033
4044
  parent = parent.parent;
4034
4045
  }
4035
4046
  };
@@ -6455,7 +6466,7 @@ var VueRuntimeDOM = (function(exports) {
6455
6466
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6456
6467
  break;
6457
6468
  case VaporSlot:
6458
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
6469
+ getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
6459
6470
  break;
6460
6471
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
6461
6472
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -7304,7 +7315,7 @@ var VueRuntimeDOM = (function(exports) {
7304
7315
  /**
7305
7316
  * shared between vdom and vapor
7306
7317
  */
7307
- function getInheritedScopeIds(vnode, parentComponent) {
7318
+ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
7308
7319
  const inheritedScopeIds = [];
7309
7320
  let currentParent = parentComponent;
7310
7321
  let currentVNode = vnode;
@@ -7320,6 +7331,8 @@ var VueRuntimeDOM = (function(exports) {
7320
7331
  currentParent = currentParent.parent;
7321
7332
  } else break;
7322
7333
  }
7334
+ const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
7335
+ if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
7323
7336
  return inheritedScopeIds;
7324
7337
  }
7325
7338
  function resolveAsyncComponentPlaceholder(anchorVnode) {
@@ -8554,7 +8567,7 @@ var VueRuntimeDOM = (function(exports) {
8554
8567
  }
8555
8568
  //#endregion
8556
8569
  //#region packages/runtime-core/src/index.ts
8557
- const version = "3.6.0-rc.3";
8570
+ const version = "3.6.0-rc.5";
8558
8571
  const warn = warn$1;
8559
8572
  /**
8560
8573
  * Runtime error messages. Only exposed in dev or esm builds.