@vue/runtime-core 3.6.0-rc.12 → 3.6.0-rc.14

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.6.0-rc.12
2
+ * @vue/runtime-core v3.6.0-rc.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -559,6 +559,16 @@ function createPathGetter(ctx, path) {
559
559
  };
560
560
  }
561
561
  //#endregion
562
+ //#region packages/runtime-core/src/vaporInteropState.ts
563
+ /**
564
+ * Set by `vaporInteropPlugin`. Stays false in apps that never import the
565
+ * plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
566
+ */
567
+ let isVaporInteropEnabled = false;
568
+ function setVaporInteropEnabled() {
569
+ isVaporInteropEnabled = true;
570
+ }
571
+ //#endregion
562
572
  //#region packages/runtime-core/src/components/Teleport.ts
563
573
  const pendingMounts = /* @__PURE__ */ new WeakMap();
564
574
  const TeleportEndKey = Symbol("_vte");
@@ -805,13 +815,18 @@ const BaseTransitionPropsValidators = {
805
815
  onAfterAppear: TransitionHookValidator,
806
816
  onAppearCancelled: TransitionHookValidator
807
817
  };
818
+ let isTransitionEnabled = false;
819
+ function withTransitionEnabled(value) {
820
+ isTransitionEnabled = true;
821
+ return value;
822
+ }
808
823
  function isEmptyTransitionChild(vnode, instance) {
809
824
  if (vnode.type === Comment) return true;
810
825
  if (vnode.type === Fragment) {
811
826
  const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
812
827
  return !child || isEmptyTransitionChild(child, instance);
813
828
  }
814
- if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
829
+ if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
815
830
  return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
816
831
  }
817
832
  const BaseTransitionImpl = {
@@ -827,7 +842,7 @@ const BaseTransitionImpl = {
827
842
  const rawProps = (0, _vue_reactivity.toRaw)(props);
828
843
  const { mode } = rawProps;
829
844
  return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
830
- if (!(instance.job.flags & 4)) instance.update();
845
+ if (!(instance.effect.flags & 1024)) instance.update();
831
846
  }) : _vue_shared.NOOP);
832
847
  };
833
848
  }
@@ -842,7 +857,7 @@ function findNonCommentChild(children) {
842
857
  }
843
858
  return child;
844
859
  }
845
- const BaseTransition = BaseTransitionImpl;
860
+ const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
846
861
  function getLeavingNodesForType(state, vnode) {
847
862
  const { leavingNodes } = state;
848
863
  let leavingVNodesCache = leavingNodes.get(vnode.type);
@@ -880,7 +895,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
880
895
  return hooks;
881
896
  }
882
897
  }, props, state, instance);
883
- if (vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
898
+ if (isVaporInteropEnabled && vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
884
899
  __vapor: true,
885
900
  props,
886
901
  state,
@@ -1057,7 +1072,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
1057
1072
  function setTransitionHooks(vnode, hooks) {
1058
1073
  if (vnode.shapeFlag & 6 && vnode.component) {
1059
1074
  vnode.transition = hooks;
1060
- if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1075
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1061
1076
  else {
1062
1077
  const subTree = vnode.component.subTree;
1063
1078
  return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
@@ -1090,7 +1105,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
1090
1105
  return ret;
1091
1106
  }
1092
1107
  function getTransitionRoot(vnode) {
1093
- if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
1108
+ if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
1094
1109
  if (vnode.type === Fragment) {
1095
1110
  const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
1096
1111
  return child ? getTransitionRoot(child) : void 0;
@@ -1265,6 +1280,8 @@ const getContainerType = (container) => {
1265
1280
  if (isMathMLContainer(container)) return "mathml";
1266
1281
  };
1267
1282
  const isComment = (node) => node.nodeType === 8;
1283
+ /** The data of a comment opening a range a hydration steps over as one. */
1284
+ const isRangeStart = (data) => data === "[" || data === "(" || (0, _vue_shared.isVaporBranchStart)(data);
1268
1285
  function createHydrationFunctions(rendererInternals) {
1269
1286
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
1270
1287
  const hydrate = (vnode, container) => {
@@ -1281,7 +1298,7 @@ function createHydrationFunctions(rendererInternals) {
1281
1298
  };
1282
1299
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
1283
1300
  optimized = optimized || !!vnode.dynamicChildren;
1284
- const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
1301
+ const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && (0, _vue_shared.isVaporBranchStart)(node.data));
1285
1302
  const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
1286
1303
  const { type, ref, shapeFlag, patchFlag } = vnode;
1287
1304
  let domType = node.nodeType;
@@ -1334,7 +1351,7 @@ function createHydrationFunctions(rendererInternals) {
1334
1351
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1335
1352
  break;
1336
1353
  case VaporSlot:
1337
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1354
+ if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1338
1355
  break;
1339
1356
  default: if (shapeFlag & 1) {
1340
1357
  if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
@@ -1345,7 +1362,7 @@ function createHydrationFunctions(rendererInternals) {
1345
1362
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
1346
1363
  else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
1347
1364
  else nextNode = nextSibling(node);
1348
- if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1365
+ if ((isVaporInteropEnabled || false) && vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1349
1366
  else {
1350
1367
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1351
1368
  const component = vnode.component;
@@ -1457,7 +1474,7 @@ function createHydrationFunctions(rendererInternals) {
1457
1474
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
1458
1475
  const container = parentNode(node);
1459
1476
  const first = nextSibling(node);
1460
- const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1477
+ const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1461
1478
  if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
1462
1479
  else {
1463
1480
  logMismatchError();
@@ -1491,7 +1508,7 @@ function createHydrationFunctions(rendererInternals) {
1491
1508
  while (node) {
1492
1509
  node = nextSibling(node);
1493
1510
  if (node && isComment(node)) {
1494
- if (node.data === open) match++;
1511
+ if (node.data === open || isVaporInteropEnabled && open === "[" && (0, _vue_shared.isVaporBranchStart)(node.data)) match++;
1495
1512
  if (node.data === close) {
1496
1513
  if (match === 0) return nextSibling(node);
1497
1514
  else match--;
@@ -1634,9 +1651,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
1634
1651
  return teardown;
1635
1652
  };
1636
1653
  function forEachElement(node, cb) {
1637
- if (isComment(node) && (node.data === "[" || node.data === "(")) {
1654
+ if (isComment(node) && isRangeStart(node.data)) {
1638
1655
  const open = node.data;
1639
- const close = open === "[" ? "]" : ")";
1656
+ const close = open === "(" ? ")" : "]";
1640
1657
  let depth = 1;
1641
1658
  let next = node.nextSibling;
1642
1659
  while (next) {
@@ -1645,7 +1662,7 @@ function forEachElement(node, cb) {
1645
1662
  } else if (isComment(next)) {
1646
1663
  if (next.data === close) {
1647
1664
  if (--depth === 0) break;
1648
- } else if (next.data === open) depth++;
1665
+ } else if (close === "]" ? next.data === "[" || (0, _vue_shared.isVaporBranchStart)(next.data) : next.data === open) depth++;
1649
1666
  }
1650
1667
  next = next.nextSibling;
1651
1668
  }
@@ -1746,7 +1763,7 @@ function createAsyncComponentContext(source) {
1746
1763
  setPendingRequest: (request) => pendingRequest = request
1747
1764
  };
1748
1765
  }
1749
- const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
1766
+ const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
1750
1767
  const loaded = (0, _vue_reactivity.ref)(false);
1751
1768
  const error = (0, _vue_reactivity.ref)();
1752
1769
  const delayed = (0, _vue_reactivity.ref)(!!delay);
@@ -1797,7 +1814,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
1797
1814
  //#endregion
1798
1815
  //#region packages/runtime-core/src/components/KeepAlive.ts
1799
1816
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
1800
- const KeepAlive = {
1817
+ let isKeepAliveEnabled = false;
1818
+ function withKeepAliveEnabled(value) {
1819
+ isKeepAliveEnabled = true;
1820
+ return value;
1821
+ }
1822
+ const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
1801
1823
  name: `KeepAlive`,
1802
1824
  __isKeepAlive: true,
1803
1825
  props: {
@@ -1938,7 +1960,7 @@ const KeepAlive = {
1938
1960
  return isSuspense(rawVNode.type) ? rawVNode : vnode;
1939
1961
  };
1940
1962
  }
1941
- };
1963
+ });
1942
1964
  function matches(pattern, name) {
1943
1965
  if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
1944
1966
  else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
@@ -2179,11 +2201,12 @@ function invokeSlotFallback(fallback, owner) {
2179
2201
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2180
2202
  if (props == null) props = {};
2181
2203
  let slot = slots[name];
2182
- const vaporSlot = slot && slot[rawVaporSlotKey];
2204
+ const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
2183
2205
  if (vaporSlot) {
2184
2206
  const ret = (openBlock(), createBlock(VaporSlot, props));
2185
2207
  ret.vs = {
2186
2208
  slot: vaporSlot,
2209
+ name,
2187
2210
  outlets: fallback ? [{
2188
2211
  fallback,
2189
2212
  owner: currentRenderingInstance
@@ -2210,7 +2233,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2210
2233
  try {
2211
2234
  const validSlotContent = slot && ensureValidVNode(slot(props));
2212
2235
  let attached = false;
2213
- if (fallback && validSlotContent && currentRenderingInstance) {
2236
+ if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
2214
2237
  const interop = currentRenderingInstance.appContext.vapor;
2215
2238
  if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
2216
2239
  }
@@ -3452,7 +3475,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3452
3475
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3453
3476
  break;
3454
3477
  case VaporSlot:
3455
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
3478
+ if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
3456
3479
  break;
3457
3480
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3458
3481
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -3562,7 +3585,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3562
3585
  let vnodeHook;
3563
3586
  parentComponent && toggleRecurse(parentComponent, false);
3564
3587
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3565
- if (n2.ibu) n2.ibu();
3588
+ if (isVaporInteropEnabled && n2.ibu) n2.ibu();
3566
3589
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
3567
3590
  parentComponent && toggleRecurse(parentComponent, true);
3568
3591
  if (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -3594,9 +3617,9 @@ function baseCreateRenderer(options, createHydrationFns) {
3594
3617
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
3595
3618
  }
3596
3619
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
3597
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
3620
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
3598
3621
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3599
- n2.iu && n2.iu();
3622
+ isVaporInteropEnabled && n2.iu && n2.iu();
3600
3623
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
3601
3624
  }, void 0, parentSuspense);
3602
3625
  };
@@ -3639,7 +3662,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3639
3662
  };
3640
3663
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3641
3664
  n2.slotScopeIds = slotScopeIds;
3642
- if (n2.type.__vapor) {
3665
+ if ((isVaporInteropEnabled || false) && n2.type.__vapor) {
3643
3666
  if (n1 == null) {
3644
3667
  if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
3645
3668
  else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
@@ -3775,7 +3798,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3775
3798
  } else next = vnode;
3776
3799
  if (bu) (0, _vue_shared.invokeArrayFns)(bu);
3777
3800
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
3778
- if (next.ibu) next.ibu();
3801
+ if (isVaporInteropEnabled && next.ibu) next.ibu();
3779
3802
  toggleRecurse(instance, true);
3780
3803
  const nextTree = renderComponentRoot(instance);
3781
3804
  const prevTree = instance.subTree;
@@ -3784,9 +3807,9 @@ function baseCreateRenderer(options, createHydrationFns) {
3784
3807
  next.el = nextTree.el;
3785
3808
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
3786
3809
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
3787
- if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
3810
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
3788
3811
  vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
3789
- next.iu && next.iu();
3812
+ isVaporInteropEnabled && next.iu && next.iu();
3790
3813
  }, void 0, parentSuspense);
3791
3814
  }
3792
3815
  }
@@ -3933,7 +3956,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3933
3956
  };
3934
3957
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
3935
3958
  const { el, type, transition, children, shapeFlag } = vnode;
3936
- if (isVaporComponent(type) || type === VaporSlot) {
3959
+ if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
3937
3960
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
3938
3961
  return;
3939
3962
  }
@@ -3977,11 +4000,11 @@ function baseCreateRenderer(options, createHydrationFns) {
3977
4000
  }
3978
4001
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
3979
4002
  if (shapeFlag & 256) {
3980
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
4003
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
3981
4004
  else parentComponent.ctx.deactivate(vnode);
3982
4005
  return;
3983
4006
  }
3984
- if (shapeFlag & 6 && isVaporComponent(type)) {
4007
+ if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
3985
4008
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
3986
4009
  return;
3987
4010
  }
@@ -3999,7 +4022,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3999
4022
  if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
4000
4023
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
4001
4024
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
4002
- if (type === VaporSlot) {
4025
+ if (isVaporInteropEnabled && type === VaporSlot) {
4003
4026
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
4004
4027
  return;
4005
4028
  }
@@ -4033,7 +4056,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4033
4056
  if (transition) {
4034
4057
  let leavingEl = leavingNode && leavingNode.el;
4035
4058
  let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
4036
- if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
4059
+ if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
4037
4060
  leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
4038
4061
  isElement = !!leavingEl;
4039
4062
  }
@@ -4070,7 +4093,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4070
4093
  };
4071
4094
  const getNextHostNode = (vnode) => {
4072
4095
  if (vnode.shapeFlag & 6) {
4073
- if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
4096
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
4074
4097
  return getNextHostNode(vnode.component.subTree);
4075
4098
  }
4076
4099
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
@@ -4126,7 +4149,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
4126
4149
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
4127
4150
  }
4128
4151
  function toggleRecurse({ effect, job, vapor }, allowed) {
4129
- if (!vapor) {
4152
+ if (!isVaporInteropEnabled || !vapor) {
4130
4153
  if (allowed) {
4131
4154
  effect.flags |= 128;
4132
4155
  job.flags |= 2;
@@ -4233,7 +4256,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
4233
4256
  currentParent = currentParent.parent;
4234
4257
  } else break;
4235
4258
  }
4236
- const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
4259
+ const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
4237
4260
  if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
4238
4261
  return inheritedScopeIds;
4239
4262
  }
@@ -4246,8 +4269,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
4246
4269
  //#endregion
4247
4270
  //#region packages/runtime-core/src/components/Suspense.ts
4248
4271
  const isSuspense = (type) => type.__isSuspense;
4272
+ let isSuspenseEnabled = false;
4273
+ function withSuspenseEnabled(value) {
4274
+ isSuspenseEnabled = true;
4275
+ return value;
4276
+ }
4249
4277
  let suspenseId = 0;
4250
- const Suspense = {
4278
+ const Suspense = /*@__PURE__*/ withSuspenseEnabled({
4251
4279
  name: "Suspense",
4252
4280
  __isSuspense: true,
4253
4281
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -4264,7 +4292,7 @@ const Suspense = {
4264
4292
  },
4265
4293
  hydrate: hydrateSuspense,
4266
4294
  normalize: normalizeSuspenseChildren
4267
- };
4295
+ });
4268
4296
  function triggerEvent(vnode, name) {
4269
4297
  const eventListener = vnode.props && vnode.props[name];
4270
4298
  if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
@@ -4749,16 +4777,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
4749
4777
  if (!vaporSlot) return vaporSlot;
4750
4778
  const cloned = {
4751
4779
  slot: vaporSlot.slot,
4780
+ name: vaporSlot.name,
4752
4781
  outlets: vaporSlot.outlets,
4753
- props: vaporSlot.props
4782
+ props: vaporSlot.props,
4783
+ attrs: vaporSlot.attrs && vaporSlot.attrs === _vue_shared.EMPTY_OBJ ? {} : vaporSlot.attrs,
4784
+ group: vaporSlot.group
4754
4785
  };
4755
- if (vaporSlot.props && extraProps) {
4786
+ const attrs = cloned.attrs;
4787
+ if (extraProps && vaporSlot.props) {
4756
4788
  let extraSlotProps;
4757
- for (const key in extraProps) if (key !== "key") {
4789
+ for (const key in extraProps) if (attrs ? !(0, _vue_shared.isReservedProp)(key) : key !== "key") {
4758
4790
  if (!extraSlotProps) extraSlotProps = {};
4759
4791
  extraSlotProps[key] = extraProps[key];
4760
4792
  }
4761
- if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
4793
+ if (extraSlotProps) {
4794
+ if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
4795
+ else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
4796
+ }
4762
4797
  }
4763
4798
  if (vnode.el) {
4764
4799
  cloned.state = vaporSlot.state;
@@ -5019,7 +5054,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
5019
5054
  isSSR && setInSSRSetupState(isSSR);
5020
5055
  const { props, children, vi } = instance.vnode;
5021
5056
  const isStateful = isStatefulComponent(instance);
5022
- if (vi) vi(instance);
5057
+ if (isVaporInteropEnabled && vi) vi(instance);
5023
5058
  else {
5024
5059
  initProps(instance, props, isStateful, isSSR);
5025
5060
  initSlots(instance, children, optimized || isSSR);
@@ -5196,7 +5231,7 @@ function isMemoSame(cached, memo) {
5196
5231
  }
5197
5232
  //#endregion
5198
5233
  //#region packages/runtime-core/src/index.ts
5199
- const version = "3.6.0-rc.12";
5234
+ const version = "3.6.0-rc.14";
5200
5235
  const warn = _vue_shared.NOOP;
5201
5236
  /**
5202
5237
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -5297,6 +5332,12 @@ exports.hydrateOnMediaQuery = hydrateOnMediaQuery;
5297
5332
  exports.hydrateOnVisible = hydrateOnVisible;
5298
5333
  exports.initCustomFormatter = initCustomFormatter;
5299
5334
  exports.inject = inject;
5335
+ Object.defineProperty(exports, "isKeepAliveEnabled", {
5336
+ enumerable: true,
5337
+ get: function() {
5338
+ return isKeepAliveEnabled;
5339
+ }
5340
+ });
5300
5341
  exports.isMemoSame = isMemoSame;
5301
5342
  exports.isProxy = _vue_reactivity.isProxy;
5302
5343
  exports.isReactive = _vue_reactivity.isReactive;
@@ -5304,7 +5345,25 @@ exports.isReadonly = _vue_reactivity.isReadonly;
5304
5345
  exports.isRef = _vue_reactivity.isRef;
5305
5346
  exports.isRuntimeOnly = isRuntimeOnly;
5306
5347
  exports.isShallow = _vue_reactivity.isShallow;
5348
+ Object.defineProperty(exports, "isSuspenseEnabled", {
5349
+ enumerable: true,
5350
+ get: function() {
5351
+ return isSuspenseEnabled;
5352
+ }
5353
+ });
5354
+ Object.defineProperty(exports, "isTransitionEnabled", {
5355
+ enumerable: true,
5356
+ get: function() {
5357
+ return isTransitionEnabled;
5358
+ }
5359
+ });
5307
5360
  exports.isVNode = isVNode;
5361
+ Object.defineProperty(exports, "isVaporInteropEnabled", {
5362
+ enumerable: true,
5363
+ get: function() {
5364
+ return isVaporInteropEnabled;
5365
+ }
5366
+ });
5308
5367
  exports.markRaw = _vue_reactivity.markRaw;
5309
5368
  exports.mergeDefaults = mergeDefaults;
5310
5369
  exports.mergeModels = mergeModels;
@@ -5348,6 +5407,7 @@ exports.setBlockTracking = setBlockTracking;
5348
5407
  exports.setDevtoolsHook = setDevtoolsHook;
5349
5408
  exports.setIsHydratingEnabled = setIsHydratingEnabled;
5350
5409
  exports.setTransitionHooks = setTransitionHooks;
5410
+ exports.setVaporInteropEnabled = setVaporInteropEnabled;
5351
5411
  exports.shallowReactive = _vue_reactivity.shallowReactive;
5352
5412
  exports.shallowReadonly = _vue_reactivity.shallowReadonly;
5353
5413
  exports.shallowRef = _vue_reactivity.shallowRef;
@@ -5382,5 +5442,8 @@ exports.withAsyncContext = withAsyncContext;
5382
5442
  exports.withCtx = withCtx;
5383
5443
  exports.withDefaults = withDefaults;
5384
5444
  exports.withDirectives = withDirectives;
5445
+ exports.withKeepAliveEnabled = withKeepAliveEnabled;
5385
5446
  exports.withMemo = withMemo;
5386
5447
  exports.withScopeId = withScopeId;
5448
+ exports.withSuspenseEnabled = withSuspenseEnabled;
5449
+ exports.withTransitionEnabled = withTransitionEnabled;
@@ -516,6 +516,8 @@ export interface SuspenseProps {
516
516
  */
517
517
  suspensible?: boolean;
518
518
  }
519
+ export declare let isSuspenseEnabled: boolean;
520
+ export declare function withSuspenseEnabled<T>(value: T): T;
519
521
  declare const SuspenseImpl: {
520
522
  name: string;
521
523
  __isSuspense: boolean;
@@ -612,6 +614,8 @@ export interface TransitionElement {
612
614
  }
613
615
  export declare function useTransitionState(): TransitionState;
614
616
  export declare const BaseTransitionPropsValidators: Record<string, any>;
617
+ export declare let isTransitionEnabled: boolean;
618
+ export declare function withTransitionEnabled<T>(value: T): T;
615
619
  export declare const BaseTransition: {
616
620
  new (): {
617
621
  $props: BaseTransitionProps<any>;
@@ -725,6 +729,8 @@ export interface KeepAliveContext extends ComponentRenderContext {
725
729
  getCachedComponent: (vnode: VNode) => VNode;
726
730
  getStorageContainer: () => RendererElement;
727
731
  }
732
+ export declare let isKeepAliveEnabled: boolean;
733
+ export declare function withKeepAliveEnabled<T>(value: T): T;
728
734
  export declare const KeepAlive: {
729
735
  __isKeepAlive: true;
730
736
  new (): {
@@ -1794,6 +1800,14 @@ export declare function createSlots(slots: Record<string, SSRSlot>, dynamicSlots
1794
1800
  export declare function withMemo(memo: any[], render: () => VNode<any, any>, cache: any[], index: number): VNode<any, any>;
1795
1801
  export declare function isMemoSame(cached: VNode, memo: any[]): boolean;
1796
1802
  //#endregion
1803
+ //#region temp/packages/runtime-core/src/vaporInteropState.d.ts
1804
+ /**
1805
+ * Set by `vaporInteropPlugin`. Stays false in apps that never import the
1806
+ * plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
1807
+ */
1808
+ export declare let isVaporInteropEnabled: boolean;
1809
+ export declare function setVaporInteropEnabled(): void;
1810
+ //#endregion
1797
1811
  //#region temp/packages/runtime-core/src/compat/globalConfig.d.ts
1798
1812
  export type LegacyConfig = {
1799
1813
  /**