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

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.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -930,6 +930,16 @@ function createPathGetter(ctx, path) {
930
930
  };
931
931
  }
932
932
  //#endregion
933
+ //#region packages/runtime-core/src/vaporInteropState.ts
934
+ /**
935
+ * Set by `vaporInteropPlugin`. Stays false in apps that never import the
936
+ * plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
937
+ */
938
+ let isVaporInteropEnabled = false;
939
+ function setVaporInteropEnabled() {
940
+ isVaporInteropEnabled = true;
941
+ }
942
+ //#endregion
933
943
  //#region packages/runtime-core/src/components/Teleport.ts
934
944
  const pendingMounts = /* @__PURE__ */ new WeakMap();
935
945
  const TeleportEndKey = Symbol("_vte");
@@ -1189,13 +1199,18 @@ const BaseTransitionPropsValidators = {
1189
1199
  onAfterAppear: TransitionHookValidator,
1190
1200
  onAppearCancelled: TransitionHookValidator
1191
1201
  };
1202
+ let isTransitionEnabled = false;
1203
+ function withTransitionEnabled(value) {
1204
+ isTransitionEnabled = true;
1205
+ return value;
1206
+ }
1192
1207
  function isEmptyTransitionChild(vnode, instance) {
1193
1208
  if (vnode.type === Comment) return true;
1194
1209
  if (vnode.type === Fragment) {
1195
1210
  const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
1196
1211
  return !child || isEmptyTransitionChild(child, instance);
1197
1212
  }
1198
- if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
1213
+ if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
1199
1214
  return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
1200
1215
  }
1201
1216
  const BaseTransitionImpl = {
@@ -1212,7 +1227,7 @@ const BaseTransitionImpl = {
1212
1227
  const { mode } = rawProps;
1213
1228
  checkTransitionMode(mode);
1214
1229
  return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
1215
- if (!(instance.job.flags & 4)) instance.update();
1230
+ if (!(instance.effect.flags & 1024)) instance.update();
1216
1231
  }) : _vue_shared.NOOP);
1217
1232
  };
1218
1233
  }
@@ -1232,7 +1247,7 @@ function findNonCommentChild(children) {
1232
1247
  }
1233
1248
  return child;
1234
1249
  }
1235
- const BaseTransition = BaseTransitionImpl;
1250
+ const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
1236
1251
  function getLeavingNodesForType(state, vnode) {
1237
1252
  const { leavingNodes } = state;
1238
1253
  let leavingVNodesCache = leavingNodes.get(vnode.type);
@@ -1270,7 +1285,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
1270
1285
  return hooks;
1271
1286
  }
1272
1287
  }, props, state, instance);
1273
- if (vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
1288
+ if (isVaporInteropEnabled && vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
1274
1289
  __vapor: true,
1275
1290
  props,
1276
1291
  state,
@@ -1447,7 +1462,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
1447
1462
  function setTransitionHooks(vnode, hooks) {
1448
1463
  if (vnode.shapeFlag & 6 && vnode.component) {
1449
1464
  vnode.transition = hooks;
1450
- if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1465
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1451
1466
  else {
1452
1467
  const subTree = vnode.component.subTree;
1453
1468
  return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
@@ -1486,7 +1501,7 @@ function checkTransitionMode(mode) {
1486
1501
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
1487
1502
  }
1488
1503
  function getTransitionRoot(vnode) {
1489
- if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
1504
+ if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
1490
1505
  if (vnode.type === Fragment) {
1491
1506
  const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
1492
1507
  return child ? getTransitionRoot(child) : void 0;
@@ -1746,7 +1761,7 @@ function createHydrationFunctions(rendererInternals) {
1746
1761
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1747
1762
  break;
1748
1763
  case VaporSlot:
1749
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1764
+ if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1750
1765
  break;
1751
1766
  default: if (shapeFlag & 1) {
1752
1767
  if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
@@ -1878,7 +1893,7 @@ function createHydrationFunctions(rendererInternals) {
1878
1893
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
1879
1894
  const container = parentNode(node);
1880
1895
  const first = nextSibling(node);
1881
- const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1896
+ const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1882
1897
  if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
1883
1898
  else {
1884
1899
  logMismatchError();
@@ -2285,7 +2300,7 @@ function createAsyncComponentContext(source) {
2285
2300
  setPendingRequest: (request) => pendingRequest = request
2286
2301
  };
2287
2302
  }
2288
- const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
2303
+ const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
2289
2304
  const loaded = (0, _vue_reactivity.ref)(false);
2290
2305
  const error = (0, _vue_reactivity.ref)();
2291
2306
  const delayed = (0, _vue_reactivity.ref)(!!delay);
@@ -2342,7 +2357,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
2342
2357
  //#endregion
2343
2358
  //#region packages/runtime-core/src/components/KeepAlive.ts
2344
2359
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2345
- const KeepAlive = {
2360
+ let isKeepAliveEnabled = false;
2361
+ function withKeepAliveEnabled(value) {
2362
+ isKeepAliveEnabled = true;
2363
+ return value;
2364
+ }
2365
+ const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
2346
2366
  name: `KeepAlive`,
2347
2367
  __isKeepAlive: true,
2348
2368
  props: {
@@ -2485,7 +2505,7 @@ const KeepAlive = {
2485
2505
  return isSuspense(rawVNode.type) ? rawVNode : vnode;
2486
2506
  };
2487
2507
  }
2488
- };
2508
+ });
2489
2509
  function matches(pattern, name) {
2490
2510
  if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
2491
2511
  else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
@@ -2734,11 +2754,12 @@ function invokeSlotFallback(fallback, owner) {
2734
2754
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2735
2755
  if (props == null) props = {};
2736
2756
  let slot = slots[name];
2737
- const vaporSlot = slot && slot[rawVaporSlotKey];
2757
+ const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
2738
2758
  if (vaporSlot) {
2739
2759
  const ret = (openBlock(), createBlock(VaporSlot, props));
2740
2760
  ret.vs = {
2741
2761
  slot: vaporSlot,
2762
+ name,
2742
2763
  outlets: fallback ? [{
2743
2764
  fallback,
2744
2765
  owner: currentRenderingInstance
@@ -2769,7 +2790,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2769
2790
  try {
2770
2791
  const validSlotContent = slot && ensureValidVNode(slot(props));
2771
2792
  let attached = false;
2772
- if (fallback && validSlotContent && currentRenderingInstance) {
2793
+ if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
2773
2794
  const interop = currentRenderingInstance.appContext.vapor;
2774
2795
  if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
2775
2796
  }
@@ -4454,7 +4475,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4454
4475
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4455
4476
  break;
4456
4477
  case VaporSlot:
4457
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4478
+ if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4458
4479
  break;
4459
4480
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4460
4481
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -4588,7 +4609,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4588
4609
  let vnodeHook;
4589
4610
  parentComponent && toggleRecurse(parentComponent, false);
4590
4611
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4591
- if (n2.ibu) n2.ibu();
4612
+ if (isVaporInteropEnabled && n2.ibu) n2.ibu();
4592
4613
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4593
4614
  parentComponent && toggleRecurse(parentComponent, true);
4594
4615
  if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -4622,9 +4643,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4622
4643
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
4623
4644
  }
4624
4645
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
4625
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
4646
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
4626
4647
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4627
- n2.iu && n2.iu();
4648
+ isVaporInteropEnabled && n2.iu && n2.iu();
4628
4649
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4629
4650
  }, void 0, parentSuspense);
4630
4651
  };
@@ -4832,7 +4853,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4832
4853
  } else next = vnode;
4833
4854
  if (bu) (0, _vue_shared.invokeArrayFns)(bu);
4834
4855
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
4835
- if (next.ibu) next.ibu();
4856
+ if (isVaporInteropEnabled && next.ibu) next.ibu();
4836
4857
  toggleRecurse(instance, true);
4837
4858
  startMeasure(instance, `render`);
4838
4859
  const nextTree = renderComponentRoot(instance);
@@ -4845,9 +4866,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4845
4866
  next.el = nextTree.el;
4846
4867
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
4847
4868
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
4848
- if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
4869
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
4849
4870
  vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
4850
- next.iu && next.iu();
4871
+ isVaporInteropEnabled && next.iu && next.iu();
4851
4872
  }, void 0, parentSuspense);
4852
4873
  devtoolsComponentUpdated(instance);
4853
4874
  popWarningContext();
@@ -4999,7 +5020,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4999
5020
  };
5000
5021
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
5001
5022
  const { el, type, transition, children, shapeFlag } = vnode;
5002
- if (isVaporComponent(type) || type === VaporSlot) {
5023
+ if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
5003
5024
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
5004
5025
  return;
5005
5026
  }
@@ -5043,11 +5064,11 @@ function baseCreateRenderer(options, createHydrationFns) {
5043
5064
  }
5044
5065
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
5045
5066
  if (shapeFlag & 256) {
5046
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
5067
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
5047
5068
  else parentComponent.ctx.deactivate(vnode);
5048
5069
  return;
5049
5070
  }
5050
- if (shapeFlag & 6 && isVaporComponent(type)) {
5071
+ if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
5051
5072
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5052
5073
  return;
5053
5074
  }
@@ -5065,7 +5086,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5065
5086
  if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
5066
5087
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
5067
5088
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
5068
- if (type === VaporSlot) {
5089
+ if (isVaporInteropEnabled && type === VaporSlot) {
5069
5090
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5070
5091
  return;
5071
5092
  }
@@ -5099,7 +5120,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5099
5120
  if (transition) {
5100
5121
  let leavingEl = leavingNode && leavingNode.el;
5101
5122
  let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
5102
- if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
5123
+ if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
5103
5124
  leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
5104
5125
  isElement = !!leavingEl;
5105
5126
  }
@@ -5138,7 +5159,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5138
5159
  };
5139
5160
  const getNextHostNode = (vnode) => {
5140
5161
  if (vnode.shapeFlag & 6) {
5141
- if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
5162
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
5142
5163
  return getNextHostNode(vnode.component.subTree);
5143
5164
  }
5144
5165
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
@@ -5199,7 +5220,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
5199
5220
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
5200
5221
  }
5201
5222
  function toggleRecurse({ effect, job, vapor }, allowed) {
5202
- if (!vapor) {
5223
+ if (!isVaporInteropEnabled || !vapor) {
5203
5224
  if (allowed) {
5204
5225
  effect.flags |= 128;
5205
5226
  job.flags |= 2;
@@ -5311,7 +5332,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
5311
5332
  currentParent = currentParent.parent;
5312
5333
  } else break;
5313
5334
  }
5314
- const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
5335
+ const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
5315
5336
  if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
5316
5337
  return inheritedScopeIds;
5317
5338
  }
@@ -5324,8 +5345,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
5324
5345
  //#endregion
5325
5346
  //#region packages/runtime-core/src/components/Suspense.ts
5326
5347
  const isSuspense = (type) => type.__isSuspense;
5348
+ let isSuspenseEnabled = false;
5349
+ function withSuspenseEnabled(value) {
5350
+ isSuspenseEnabled = true;
5351
+ return value;
5352
+ }
5327
5353
  let suspenseId = 0;
5328
- const Suspense = {
5354
+ const Suspense = /*@__PURE__*/ withSuspenseEnabled({
5329
5355
  name: "Suspense",
5330
5356
  __isSuspense: true,
5331
5357
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -5342,7 +5368,7 @@ const Suspense = {
5342
5368
  },
5343
5369
  hydrate: hydrateSuspense,
5344
5370
  normalize: normalizeSuspenseChildren
5345
- };
5371
+ });
5346
5372
  function triggerEvent(vnode, name) {
5347
5373
  const eventListener = vnode.props && vnode.props[name];
5348
5374
  if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
@@ -5877,16 +5903,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
5877
5903
  if (!vaporSlot) return vaporSlot;
5878
5904
  const cloned = {
5879
5905
  slot: vaporSlot.slot,
5906
+ name: vaporSlot.name,
5880
5907
  outlets: vaporSlot.outlets,
5881
- props: vaporSlot.props
5908
+ props: vaporSlot.props,
5909
+ attrs: vaporSlot.attrs && vaporSlot.attrs === _vue_shared.EMPTY_OBJ ? {} : vaporSlot.attrs,
5910
+ group: vaporSlot.group
5882
5911
  };
5883
- if (vaporSlot.props && extraProps) {
5912
+ const attrs = cloned.attrs;
5913
+ if (extraProps && vaporSlot.props) {
5884
5914
  let extraSlotProps;
5885
- for (const key in extraProps) if (key !== "key") {
5915
+ for (const key in extraProps) if (attrs ? !(0, _vue_shared.isReservedProp)(key) : key !== "key") {
5886
5916
  if (!extraSlotProps) extraSlotProps = {};
5887
5917
  extraSlotProps[key] = extraProps[key];
5888
5918
  }
5889
- if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
5919
+ if (extraSlotProps) {
5920
+ if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
5921
+ else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
5922
+ }
5890
5923
  }
5891
5924
  if (vnode.el) {
5892
5925
  cloned.state = vaporSlot.state;
@@ -6168,7 +6201,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
6168
6201
  isSSR && setInSSRSetupState(isSSR);
6169
6202
  const { props, children, vi } = instance.vnode;
6170
6203
  const isStateful = isStatefulComponent(instance);
6171
- if (vi) vi(instance);
6204
+ if (isVaporInteropEnabled && vi) vi(instance);
6172
6205
  else {
6173
6206
  initProps(instance, props, isStateful, isSSR);
6174
6207
  initSlots(instance, children, optimized || isSSR);
@@ -6588,7 +6621,7 @@ function isMemoSame(cached, memo) {
6588
6621
  }
6589
6622
  //#endregion
6590
6623
  //#region packages/runtime-core/src/index.ts
6591
- const version = "3.6.0-rc.12";
6624
+ const version = "3.6.0-rc.13";
6592
6625
  const warn = warn$1;
6593
6626
  /**
6594
6627
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -6689,6 +6722,12 @@ exports.hydrateOnMediaQuery = hydrateOnMediaQuery;
6689
6722
  exports.hydrateOnVisible = hydrateOnVisible;
6690
6723
  exports.initCustomFormatter = initCustomFormatter;
6691
6724
  exports.inject = inject;
6725
+ Object.defineProperty(exports, "isKeepAliveEnabled", {
6726
+ enumerable: true,
6727
+ get: function() {
6728
+ return isKeepAliveEnabled;
6729
+ }
6730
+ });
6692
6731
  exports.isMemoSame = isMemoSame;
6693
6732
  exports.isProxy = _vue_reactivity.isProxy;
6694
6733
  exports.isReactive = _vue_reactivity.isReactive;
@@ -6696,7 +6735,25 @@ exports.isReadonly = _vue_reactivity.isReadonly;
6696
6735
  exports.isRef = _vue_reactivity.isRef;
6697
6736
  exports.isRuntimeOnly = isRuntimeOnly;
6698
6737
  exports.isShallow = _vue_reactivity.isShallow;
6738
+ Object.defineProperty(exports, "isSuspenseEnabled", {
6739
+ enumerable: true,
6740
+ get: function() {
6741
+ return isSuspenseEnabled;
6742
+ }
6743
+ });
6744
+ Object.defineProperty(exports, "isTransitionEnabled", {
6745
+ enumerable: true,
6746
+ get: function() {
6747
+ return isTransitionEnabled;
6748
+ }
6749
+ });
6699
6750
  exports.isVNode = isVNode;
6751
+ Object.defineProperty(exports, "isVaporInteropEnabled", {
6752
+ enumerable: true,
6753
+ get: function() {
6754
+ return isVaporInteropEnabled;
6755
+ }
6756
+ });
6700
6757
  exports.markRaw = _vue_reactivity.markRaw;
6701
6758
  exports.mergeDefaults = mergeDefaults;
6702
6759
  exports.mergeModels = mergeModels;
@@ -6740,6 +6797,7 @@ exports.setBlockTracking = setBlockTracking;
6740
6797
  exports.setDevtoolsHook = setDevtoolsHook;
6741
6798
  exports.setIsHydratingEnabled = setIsHydratingEnabled;
6742
6799
  exports.setTransitionHooks = setTransitionHooks;
6800
+ exports.setVaporInteropEnabled = setVaporInteropEnabled;
6743
6801
  exports.shallowReactive = _vue_reactivity.shallowReactive;
6744
6802
  exports.shallowReadonly = _vue_reactivity.shallowReadonly;
6745
6803
  exports.shallowRef = _vue_reactivity.shallowRef;
@@ -6774,5 +6832,8 @@ exports.withAsyncContext = withAsyncContext;
6774
6832
  exports.withCtx = withCtx;
6775
6833
  exports.withDefaults = withDefaults;
6776
6834
  exports.withDirectives = withDirectives;
6835
+ exports.withKeepAliveEnabled = withKeepAliveEnabled;
6777
6836
  exports.withMemo = withMemo;
6778
6837
  exports.withScopeId = withScopeId;
6838
+ exports.withSuspenseEnabled = withSuspenseEnabled;
6839
+ exports.withTransitionEnabled = withTransitionEnabled;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.6.0-rc.12
2
+ * @vue/runtime-core v3.6.0-rc.13
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;
@@ -1334,7 +1349,7 @@ function createHydrationFunctions(rendererInternals) {
1334
1349
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1335
1350
  break;
1336
1351
  case VaporSlot:
1337
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1352
+ if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1338
1353
  break;
1339
1354
  default: if (shapeFlag & 1) {
1340
1355
  if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
@@ -1345,7 +1360,7 @@ function createHydrationFunctions(rendererInternals) {
1345
1360
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
1346
1361
  else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
1347
1362
  else nextNode = nextSibling(node);
1348
- if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1363
+ if ((isVaporInteropEnabled || false) && vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1349
1364
  else {
1350
1365
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1351
1366
  const component = vnode.component;
@@ -1457,7 +1472,7 @@ function createHydrationFunctions(rendererInternals) {
1457
1472
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
1458
1473
  const container = parentNode(node);
1459
1474
  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);
1475
+ 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
1476
  if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
1462
1477
  else {
1463
1478
  logMismatchError();
@@ -1746,7 +1761,7 @@ function createAsyncComponentContext(source) {
1746
1761
  setPendingRequest: (request) => pendingRequest = request
1747
1762
  };
1748
1763
  }
1749
- const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
1764
+ const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
1750
1765
  const loaded = (0, _vue_reactivity.ref)(false);
1751
1766
  const error = (0, _vue_reactivity.ref)();
1752
1767
  const delayed = (0, _vue_reactivity.ref)(!!delay);
@@ -1797,7 +1812,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
1797
1812
  //#endregion
1798
1813
  //#region packages/runtime-core/src/components/KeepAlive.ts
1799
1814
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
1800
- const KeepAlive = {
1815
+ let isKeepAliveEnabled = false;
1816
+ function withKeepAliveEnabled(value) {
1817
+ isKeepAliveEnabled = true;
1818
+ return value;
1819
+ }
1820
+ const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
1801
1821
  name: `KeepAlive`,
1802
1822
  __isKeepAlive: true,
1803
1823
  props: {
@@ -1938,7 +1958,7 @@ const KeepAlive = {
1938
1958
  return isSuspense(rawVNode.type) ? rawVNode : vnode;
1939
1959
  };
1940
1960
  }
1941
- };
1961
+ });
1942
1962
  function matches(pattern, name) {
1943
1963
  if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
1944
1964
  else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
@@ -2179,11 +2199,12 @@ function invokeSlotFallback(fallback, owner) {
2179
2199
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2180
2200
  if (props == null) props = {};
2181
2201
  let slot = slots[name];
2182
- const vaporSlot = slot && slot[rawVaporSlotKey];
2202
+ const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
2183
2203
  if (vaporSlot) {
2184
2204
  const ret = (openBlock(), createBlock(VaporSlot, props));
2185
2205
  ret.vs = {
2186
2206
  slot: vaporSlot,
2207
+ name,
2187
2208
  outlets: fallback ? [{
2188
2209
  fallback,
2189
2210
  owner: currentRenderingInstance
@@ -2210,7 +2231,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2210
2231
  try {
2211
2232
  const validSlotContent = slot && ensureValidVNode(slot(props));
2212
2233
  let attached = false;
2213
- if (fallback && validSlotContent && currentRenderingInstance) {
2234
+ if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
2214
2235
  const interop = currentRenderingInstance.appContext.vapor;
2215
2236
  if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
2216
2237
  }
@@ -3452,7 +3473,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3452
3473
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3453
3474
  break;
3454
3475
  case VaporSlot:
3455
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
3476
+ if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
3456
3477
  break;
3457
3478
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
3458
3479
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -3562,7 +3583,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3562
3583
  let vnodeHook;
3563
3584
  parentComponent && toggleRecurse(parentComponent, false);
3564
3585
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3565
- if (n2.ibu) n2.ibu();
3586
+ if (isVaporInteropEnabled && n2.ibu) n2.ibu();
3566
3587
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
3567
3588
  parentComponent && toggleRecurse(parentComponent, true);
3568
3589
  if (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -3594,9 +3615,9 @@ function baseCreateRenderer(options, createHydrationFns) {
3594
3615
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
3595
3616
  }
3596
3617
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
3597
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
3618
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
3598
3619
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
3599
- n2.iu && n2.iu();
3620
+ isVaporInteropEnabled && n2.iu && n2.iu();
3600
3621
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
3601
3622
  }, void 0, parentSuspense);
3602
3623
  };
@@ -3639,7 +3660,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3639
3660
  };
3640
3661
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
3641
3662
  n2.slotScopeIds = slotScopeIds;
3642
- if (n2.type.__vapor) {
3663
+ if ((isVaporInteropEnabled || false) && n2.type.__vapor) {
3643
3664
  if (n1 == null) {
3644
3665
  if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
3645
3666
  else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
@@ -3775,7 +3796,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3775
3796
  } else next = vnode;
3776
3797
  if (bu) (0, _vue_shared.invokeArrayFns)(bu);
3777
3798
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
3778
- if (next.ibu) next.ibu();
3799
+ if (isVaporInteropEnabled && next.ibu) next.ibu();
3779
3800
  toggleRecurse(instance, true);
3780
3801
  const nextTree = renderComponentRoot(instance);
3781
3802
  const prevTree = instance.subTree;
@@ -3784,9 +3805,9 @@ function baseCreateRenderer(options, createHydrationFns) {
3784
3805
  next.el = nextTree.el;
3785
3806
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
3786
3807
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
3787
- if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
3808
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
3788
3809
  vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
3789
- next.iu && next.iu();
3810
+ isVaporInteropEnabled && next.iu && next.iu();
3790
3811
  }, void 0, parentSuspense);
3791
3812
  }
3792
3813
  }
@@ -3933,7 +3954,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3933
3954
  };
3934
3955
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
3935
3956
  const { el, type, transition, children, shapeFlag } = vnode;
3936
- if (isVaporComponent(type) || type === VaporSlot) {
3957
+ if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
3937
3958
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
3938
3959
  return;
3939
3960
  }
@@ -3977,11 +3998,11 @@ function baseCreateRenderer(options, createHydrationFns) {
3977
3998
  }
3978
3999
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
3979
4000
  if (shapeFlag & 256) {
3980
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
4001
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
3981
4002
  else parentComponent.ctx.deactivate(vnode);
3982
4003
  return;
3983
4004
  }
3984
- if (shapeFlag & 6 && isVaporComponent(type)) {
4005
+ if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
3985
4006
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
3986
4007
  return;
3987
4008
  }
@@ -3999,7 +4020,7 @@ function baseCreateRenderer(options, createHydrationFns) {
3999
4020
  if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
4000
4021
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
4001
4022
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
4002
- if (type === VaporSlot) {
4023
+ if (isVaporInteropEnabled && type === VaporSlot) {
4003
4024
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
4004
4025
  return;
4005
4026
  }
@@ -4033,7 +4054,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4033
4054
  if (transition) {
4034
4055
  let leavingEl = leavingNode && leavingNode.el;
4035
4056
  let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
4036
- if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
4057
+ if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
4037
4058
  leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
4038
4059
  isElement = !!leavingEl;
4039
4060
  }
@@ -4070,7 +4091,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4070
4091
  };
4071
4092
  const getNextHostNode = (vnode) => {
4072
4093
  if (vnode.shapeFlag & 6) {
4073
- if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
4094
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
4074
4095
  return getNextHostNode(vnode.component.subTree);
4075
4096
  }
4076
4097
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
@@ -4126,7 +4147,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
4126
4147
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
4127
4148
  }
4128
4149
  function toggleRecurse({ effect, job, vapor }, allowed) {
4129
- if (!vapor) {
4150
+ if (!isVaporInteropEnabled || !vapor) {
4130
4151
  if (allowed) {
4131
4152
  effect.flags |= 128;
4132
4153
  job.flags |= 2;
@@ -4233,7 +4254,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
4233
4254
  currentParent = currentParent.parent;
4234
4255
  } else break;
4235
4256
  }
4236
- const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
4257
+ const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
4237
4258
  if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
4238
4259
  return inheritedScopeIds;
4239
4260
  }
@@ -4246,8 +4267,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
4246
4267
  //#endregion
4247
4268
  //#region packages/runtime-core/src/components/Suspense.ts
4248
4269
  const isSuspense = (type) => type.__isSuspense;
4270
+ let isSuspenseEnabled = false;
4271
+ function withSuspenseEnabled(value) {
4272
+ isSuspenseEnabled = true;
4273
+ return value;
4274
+ }
4249
4275
  let suspenseId = 0;
4250
- const Suspense = {
4276
+ const Suspense = /*@__PURE__*/ withSuspenseEnabled({
4251
4277
  name: "Suspense",
4252
4278
  __isSuspense: true,
4253
4279
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -4264,7 +4290,7 @@ const Suspense = {
4264
4290
  },
4265
4291
  hydrate: hydrateSuspense,
4266
4292
  normalize: normalizeSuspenseChildren
4267
- };
4293
+ });
4268
4294
  function triggerEvent(vnode, name) {
4269
4295
  const eventListener = vnode.props && vnode.props[name];
4270
4296
  if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
@@ -4749,16 +4775,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
4749
4775
  if (!vaporSlot) return vaporSlot;
4750
4776
  const cloned = {
4751
4777
  slot: vaporSlot.slot,
4778
+ name: vaporSlot.name,
4752
4779
  outlets: vaporSlot.outlets,
4753
- props: vaporSlot.props
4780
+ props: vaporSlot.props,
4781
+ attrs: vaporSlot.attrs && vaporSlot.attrs === _vue_shared.EMPTY_OBJ ? {} : vaporSlot.attrs,
4782
+ group: vaporSlot.group
4754
4783
  };
4755
- if (vaporSlot.props && extraProps) {
4784
+ const attrs = cloned.attrs;
4785
+ if (extraProps && vaporSlot.props) {
4756
4786
  let extraSlotProps;
4757
- for (const key in extraProps) if (key !== "key") {
4787
+ for (const key in extraProps) if (attrs ? !(0, _vue_shared.isReservedProp)(key) : key !== "key") {
4758
4788
  if (!extraSlotProps) extraSlotProps = {};
4759
4789
  extraSlotProps[key] = extraProps[key];
4760
4790
  }
4761
- if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
4791
+ if (extraSlotProps) {
4792
+ if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
4793
+ else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
4794
+ }
4762
4795
  }
4763
4796
  if (vnode.el) {
4764
4797
  cloned.state = vaporSlot.state;
@@ -5019,7 +5052,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
5019
5052
  isSSR && setInSSRSetupState(isSSR);
5020
5053
  const { props, children, vi } = instance.vnode;
5021
5054
  const isStateful = isStatefulComponent(instance);
5022
- if (vi) vi(instance);
5055
+ if (isVaporInteropEnabled && vi) vi(instance);
5023
5056
  else {
5024
5057
  initProps(instance, props, isStateful, isSSR);
5025
5058
  initSlots(instance, children, optimized || isSSR);
@@ -5196,7 +5229,7 @@ function isMemoSame(cached, memo) {
5196
5229
  }
5197
5230
  //#endregion
5198
5231
  //#region packages/runtime-core/src/index.ts
5199
- const version = "3.6.0-rc.12";
5232
+ const version = "3.6.0-rc.13";
5200
5233
  const warn = _vue_shared.NOOP;
5201
5234
  /**
5202
5235
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -5297,6 +5330,12 @@ exports.hydrateOnMediaQuery = hydrateOnMediaQuery;
5297
5330
  exports.hydrateOnVisible = hydrateOnVisible;
5298
5331
  exports.initCustomFormatter = initCustomFormatter;
5299
5332
  exports.inject = inject;
5333
+ Object.defineProperty(exports, "isKeepAliveEnabled", {
5334
+ enumerable: true,
5335
+ get: function() {
5336
+ return isKeepAliveEnabled;
5337
+ }
5338
+ });
5300
5339
  exports.isMemoSame = isMemoSame;
5301
5340
  exports.isProxy = _vue_reactivity.isProxy;
5302
5341
  exports.isReactive = _vue_reactivity.isReactive;
@@ -5304,7 +5343,25 @@ exports.isReadonly = _vue_reactivity.isReadonly;
5304
5343
  exports.isRef = _vue_reactivity.isRef;
5305
5344
  exports.isRuntimeOnly = isRuntimeOnly;
5306
5345
  exports.isShallow = _vue_reactivity.isShallow;
5346
+ Object.defineProperty(exports, "isSuspenseEnabled", {
5347
+ enumerable: true,
5348
+ get: function() {
5349
+ return isSuspenseEnabled;
5350
+ }
5351
+ });
5352
+ Object.defineProperty(exports, "isTransitionEnabled", {
5353
+ enumerable: true,
5354
+ get: function() {
5355
+ return isTransitionEnabled;
5356
+ }
5357
+ });
5307
5358
  exports.isVNode = isVNode;
5359
+ Object.defineProperty(exports, "isVaporInteropEnabled", {
5360
+ enumerable: true,
5361
+ get: function() {
5362
+ return isVaporInteropEnabled;
5363
+ }
5364
+ });
5308
5365
  exports.markRaw = _vue_reactivity.markRaw;
5309
5366
  exports.mergeDefaults = mergeDefaults;
5310
5367
  exports.mergeModels = mergeModels;
@@ -5348,6 +5405,7 @@ exports.setBlockTracking = setBlockTracking;
5348
5405
  exports.setDevtoolsHook = setDevtoolsHook;
5349
5406
  exports.setIsHydratingEnabled = setIsHydratingEnabled;
5350
5407
  exports.setTransitionHooks = setTransitionHooks;
5408
+ exports.setVaporInteropEnabled = setVaporInteropEnabled;
5351
5409
  exports.shallowReactive = _vue_reactivity.shallowReactive;
5352
5410
  exports.shallowReadonly = _vue_reactivity.shallowReadonly;
5353
5411
  exports.shallowRef = _vue_reactivity.shallowRef;
@@ -5382,5 +5440,8 @@ exports.withAsyncContext = withAsyncContext;
5382
5440
  exports.withCtx = withCtx;
5383
5441
  exports.withDefaults = withDefaults;
5384
5442
  exports.withDirectives = withDirectives;
5443
+ exports.withKeepAliveEnabled = withKeepAliveEnabled;
5385
5444
  exports.withMemo = withMemo;
5386
5445
  exports.withScopeId = withScopeId;
5446
+ exports.withSuspenseEnabled = withSuspenseEnabled;
5447
+ 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
  /**
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-core v3.6.0-rc.12
2
+ * @vue/runtime-core v3.6.0-rc.13
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -940,6 +940,16 @@ function createPathGetter(ctx, path) {
940
940
  };
941
941
  }
942
942
  //#endregion
943
+ //#region packages/runtime-core/src/vaporInteropState.ts
944
+ /**
945
+ * Set by `vaporInteropPlugin`. Stays false in apps that never import the
946
+ * plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
947
+ */
948
+ let isVaporInteropEnabled = false;
949
+ function setVaporInteropEnabled() {
950
+ isVaporInteropEnabled = true;
951
+ }
952
+ //#endregion
943
953
  //#region packages/runtime-core/src/components/Teleport.ts
944
954
  const pendingMounts = /* @__PURE__ */ new WeakMap();
945
955
  const TeleportEndKey = Symbol("_vte");
@@ -1199,13 +1209,18 @@ const BaseTransitionPropsValidators = {
1199
1209
  onAfterAppear: TransitionHookValidator,
1200
1210
  onAppearCancelled: TransitionHookValidator
1201
1211
  };
1212
+ let isTransitionEnabled = false;
1213
+ function withTransitionEnabled(value) {
1214
+ isTransitionEnabled = true;
1215
+ return value;
1216
+ }
1202
1217
  function isEmptyTransitionChild(vnode, instance) {
1203
1218
  if (vnode.type === Comment) return true;
1204
1219
  if (vnode.type === Fragment) {
1205
1220
  const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
1206
1221
  return !child || isEmptyTransitionChild(child, instance);
1207
1222
  }
1208
- if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
1223
+ if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
1209
1224
  return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
1210
1225
  }
1211
1226
  const BaseTransitionImpl = {
@@ -1222,7 +1237,7 @@ const BaseTransitionImpl = {
1222
1237
  const { mode } = rawProps;
1223
1238
  checkTransitionMode(mode);
1224
1239
  return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
1225
- if (!(instance.job.flags & 4)) instance.update();
1240
+ if (!(instance.effect.flags & 1024)) instance.update();
1226
1241
  }) : NOOP);
1227
1242
  };
1228
1243
  }
@@ -1243,7 +1258,7 @@ function findNonCommentChild(children) {
1243
1258
  }
1244
1259
  return child;
1245
1260
  }
1246
- const BaseTransition = BaseTransitionImpl;
1261
+ const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
1247
1262
  function getLeavingNodesForType(state, vnode) {
1248
1263
  const { leavingNodes } = state;
1249
1264
  let leavingVNodesCache = leavingNodes.get(vnode.type);
@@ -1281,7 +1296,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
1281
1296
  return hooks;
1282
1297
  }
1283
1298
  }, props, state, instance);
1284
- if (vnode.type === VaporSlot) extend(hooks, {
1299
+ if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
1285
1300
  __vapor: true,
1286
1301
  props,
1287
1302
  state,
@@ -1476,7 +1491,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
1476
1491
  function setTransitionHooks(vnode, hooks) {
1477
1492
  if (vnode.shapeFlag & 6 && vnode.component) {
1478
1493
  vnode.transition = hooks;
1479
- if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1494
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
1480
1495
  else {
1481
1496
  const subTree = vnode.component.subTree;
1482
1497
  return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
@@ -1515,7 +1530,7 @@ function checkTransitionMode(mode) {
1515
1530
  if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
1516
1531
  }
1517
1532
  function getTransitionRoot(vnode) {
1518
- if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
1533
+ if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
1519
1534
  if (vnode.type === Fragment) {
1520
1535
  const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
1521
1536
  return child ? getTransitionRoot(child) : void 0;
@@ -1788,7 +1803,7 @@ function createHydrationFunctions(rendererInternals) {
1788
1803
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
1789
1804
  break;
1790
1805
  case VaporSlot:
1791
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1806
+ if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
1792
1807
  break;
1793
1808
  default: if (shapeFlag & 1) {
1794
1809
  if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
@@ -1799,7 +1814,7 @@ function createHydrationFunctions(rendererInternals) {
1799
1814
  if (isFragmentStart) nextNode = locateClosingAnchor(node);
1800
1815
  else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
1801
1816
  else nextNode = nextSibling(node);
1802
- if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1817
+ if ((isVaporInteropEnabled || !!(process.env.NODE_ENV !== "production")) && vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
1803
1818
  else {
1804
1819
  mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
1805
1820
  const component = vnode.component;
@@ -1924,7 +1939,7 @@ function createHydrationFunctions(rendererInternals) {
1924
1939
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
1925
1940
  const container = parentNode(node);
1926
1941
  const first = nextSibling(node);
1927
- const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1942
+ const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
1928
1943
  if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
1929
1944
  else {
1930
1945
  logMismatchError();
@@ -2343,7 +2358,7 @@ function createAsyncComponentContext(source) {
2343
2358
  setPendingRequest: (request) => pendingRequest = request
2344
2359
  };
2345
2360
  }
2346
- const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
2361
+ const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
2347
2362
  const loaded = ref$1(false);
2348
2363
  const error = ref$1();
2349
2364
  const delayed = ref$1(!!delay);
@@ -2400,7 +2415,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
2400
2415
  //#endregion
2401
2416
  //#region packages/runtime-core/src/components/KeepAlive.ts
2402
2417
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
2403
- const KeepAlive = {
2418
+ let isKeepAliveEnabled = false;
2419
+ function withKeepAliveEnabled(value) {
2420
+ isKeepAliveEnabled = true;
2421
+ return value;
2422
+ }
2423
+ const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
2404
2424
  name: `KeepAlive`,
2405
2425
  __isKeepAlive: true,
2406
2426
  props: {
@@ -2543,7 +2563,7 @@ const KeepAlive = {
2543
2563
  return isSuspense(rawVNode.type) ? rawVNode : vnode;
2544
2564
  };
2545
2565
  }
2546
- };
2566
+ });
2547
2567
  function matches(pattern, name) {
2548
2568
  if (isArray(pattern)) return pattern.some((p) => matches(p, name));
2549
2569
  else if (isString(pattern)) return pattern.split(",").includes(name);
@@ -2792,11 +2812,12 @@ function invokeSlotFallback(fallback, owner) {
2792
2812
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2793
2813
  if (props == null) props = {};
2794
2814
  let slot = slots[name];
2795
- const vaporSlot = slot && slot[rawVaporSlotKey];
2815
+ const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
2796
2816
  if (vaporSlot) {
2797
2817
  const ret = (openBlock(), createBlock(VaporSlot, props));
2798
2818
  ret.vs = {
2799
2819
  slot: vaporSlot,
2820
+ name,
2800
2821
  outlets: fallback ? [{
2801
2822
  fallback,
2802
2823
  owner: currentRenderingInstance
@@ -2827,7 +2848,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
2827
2848
  try {
2828
2849
  const validSlotContent = slot && ensureValidVNode(slot(props));
2829
2850
  let attached = false;
2830
- if (fallback && validSlotContent && currentRenderingInstance) {
2851
+ if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
2831
2852
  const interop = currentRenderingInstance.appContext.vapor;
2832
2853
  if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
2833
2854
  }
@@ -4553,7 +4574,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4553
4574
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4554
4575
  break;
4555
4576
  case VaporSlot:
4556
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4577
+ if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
4557
4578
  break;
4558
4579
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
4559
4580
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -4689,7 +4710,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4689
4710
  let vnodeHook;
4690
4711
  parentComponent && toggleRecurse(parentComponent, false);
4691
4712
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4692
- if (n2.ibu) n2.ibu();
4713
+ if (isVaporInteropEnabled && n2.ibu) n2.ibu();
4693
4714
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
4694
4715
  parentComponent && toggleRecurse(parentComponent, true);
4695
4716
  if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -4723,9 +4744,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4723
4744
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
4724
4745
  }
4725
4746
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
4726
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
4747
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
4727
4748
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
4728
- n2.iu && n2.iu();
4749
+ isVaporInteropEnabled && n2.iu && n2.iu();
4729
4750
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
4730
4751
  }, void 0, parentSuspense);
4731
4752
  };
@@ -4774,7 +4795,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4774
4795
  };
4775
4796
  const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
4776
4797
  n2.slotScopeIds = slotScopeIds;
4777
- if (n2.type.__vapor) {
4798
+ if ((isVaporInteropEnabled || !!(process.env.NODE_ENV !== "production")) && n2.type.__vapor) {
4778
4799
  if (n1 == null) {
4779
4800
  if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
4780
4801
  else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
@@ -4940,7 +4961,7 @@ function baseCreateRenderer(options, createHydrationFns) {
4940
4961
  } else next = vnode;
4941
4962
  if (bu) invokeArrayFns(bu);
4942
4963
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
4943
- if (next.ibu) next.ibu();
4964
+ if (isVaporInteropEnabled && next.ibu) next.ibu();
4944
4965
  toggleRecurse(instance, true);
4945
4966
  if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
4946
4967
  const nextTree = renderComponentRoot(instance);
@@ -4953,9 +4974,9 @@ function baseCreateRenderer(options, createHydrationFns) {
4953
4974
  next.el = nextTree.el;
4954
4975
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
4955
4976
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
4956
- if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
4977
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
4957
4978
  vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
4958
- next.iu && next.iu();
4979
+ isVaporInteropEnabled && next.iu && next.iu();
4959
4980
  }, void 0, parentSuspense);
4960
4981
  if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
4961
4982
  if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
@@ -5107,7 +5128,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5107
5128
  };
5108
5129
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
5109
5130
  const { el, type, transition, children, shapeFlag } = vnode;
5110
- if (isVaporComponent(type) || type === VaporSlot) {
5131
+ if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
5111
5132
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
5112
5133
  return;
5113
5134
  }
@@ -5151,11 +5172,11 @@ function baseCreateRenderer(options, createHydrationFns) {
5151
5172
  }
5152
5173
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
5153
5174
  if (shapeFlag & 256) {
5154
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
5175
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
5155
5176
  else parentComponent.ctx.deactivate(vnode);
5156
5177
  return;
5157
5178
  }
5158
- if (shapeFlag & 6 && isVaporComponent(type)) {
5179
+ if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
5159
5180
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5160
5181
  return;
5161
5182
  }
@@ -5173,7 +5194,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5173
5194
  if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
5174
5195
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
5175
5196
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
5176
- if (type === VaporSlot) {
5197
+ if (isVaporInteropEnabled && type === VaporSlot) {
5177
5198
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
5178
5199
  return;
5179
5200
  }
@@ -5207,7 +5228,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5207
5228
  if (transition) {
5208
5229
  let leavingEl = leavingNode && leavingNode.el;
5209
5230
  let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
5210
- if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
5231
+ if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
5211
5232
  leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
5212
5233
  isElement = !!leavingEl;
5213
5234
  }
@@ -5246,7 +5267,7 @@ function baseCreateRenderer(options, createHydrationFns) {
5246
5267
  };
5247
5268
  const getNextHostNode = (vnode) => {
5248
5269
  if (vnode.shapeFlag & 6) {
5249
- if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
5270
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
5250
5271
  return getNextHostNode(vnode.component.subTree);
5251
5272
  }
5252
5273
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
@@ -5307,7 +5328,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
5307
5328
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
5308
5329
  }
5309
5330
  function toggleRecurse({ effect, job, vapor }, allowed) {
5310
- if (!vapor) {
5331
+ if (!isVaporInteropEnabled || !vapor) {
5311
5332
  if (allowed) {
5312
5333
  effect.flags |= 128;
5313
5334
  job.flags |= 2;
@@ -5419,7 +5440,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
5419
5440
  currentParent = currentParent.parent;
5420
5441
  } else break;
5421
5442
  }
5422
- const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
5443
+ const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
5423
5444
  if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
5424
5445
  return inheritedScopeIds;
5425
5446
  }
@@ -5432,8 +5453,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
5432
5453
  //#endregion
5433
5454
  //#region packages/runtime-core/src/components/Suspense.ts
5434
5455
  const isSuspense = (type) => type.__isSuspense;
5456
+ let isSuspenseEnabled = false;
5457
+ function withSuspenseEnabled(value) {
5458
+ isSuspenseEnabled = true;
5459
+ return value;
5460
+ }
5435
5461
  let suspenseId = 0;
5436
- const Suspense = {
5462
+ const Suspense = /*@__PURE__*/ withSuspenseEnabled({
5437
5463
  name: "Suspense",
5438
5464
  __isSuspense: true,
5439
5465
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -5450,7 +5476,7 @@ const Suspense = {
5450
5476
  },
5451
5477
  hydrate: hydrateSuspense,
5452
5478
  normalize: normalizeSuspenseChildren
5453
- };
5479
+ });
5454
5480
  function triggerEvent(vnode, name) {
5455
5481
  const eventListener = vnode.props && vnode.props[name];
5456
5482
  if (isFunction(eventListener)) eventListener();
@@ -5987,16 +6013,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
5987
6013
  if (!vaporSlot) return vaporSlot;
5988
6014
  const cloned = {
5989
6015
  slot: vaporSlot.slot,
6016
+ name: vaporSlot.name,
5990
6017
  outlets: vaporSlot.outlets,
5991
- props: vaporSlot.props
6018
+ props: vaporSlot.props,
6019
+ attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
6020
+ group: vaporSlot.group
5992
6021
  };
5993
- if (vaporSlot.props && extraProps) {
6022
+ const attrs = cloned.attrs;
6023
+ if (extraProps && vaporSlot.props) {
5994
6024
  let extraSlotProps;
5995
- for (const key in extraProps) if (key !== "key") {
6025
+ for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
5996
6026
  if (!extraSlotProps) extraSlotProps = {};
5997
6027
  extraSlotProps[key] = extraProps[key];
5998
6028
  }
5999
- if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
6029
+ if (extraSlotProps) {
6030
+ if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
6031
+ else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
6032
+ }
6000
6033
  }
6001
6034
  if (vnode.el) {
6002
6035
  cloned.state = vaporSlot.state;
@@ -6285,7 +6318,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
6285
6318
  isSSR && setInSSRSetupState(isSSR);
6286
6319
  const { props, children, vi } = instance.vnode;
6287
6320
  const isStateful = isStatefulComponent(instance);
6288
- if (vi) vi(instance);
6321
+ if (isVaporInteropEnabled && vi) vi(instance);
6289
6322
  else {
6290
6323
  initProps(instance, props, isStateful, isSSR);
6291
6324
  initSlots(instance, children, optimized || isSSR);
@@ -6717,7 +6750,7 @@ function isMemoSame(cached, memo) {
6717
6750
  }
6718
6751
  //#endregion
6719
6752
  //#region packages/runtime-core/src/index.ts
6720
- const version = "3.6.0-rc.12";
6753
+ const version = "3.6.0-rc.13";
6721
6754
  const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
6722
6755
  /**
6723
6756
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -6755,4 +6788,4 @@ const resolveFilter = null;
6755
6788
  const compatUtils = null;
6756
6789
  const DeprecationTypes = null;
6757
6790
  //#endregion
6758
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defaultPropGetter, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getNextUid, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
6791
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defaultPropGetter, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, enterCbKey, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getNextUid, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isKeepAliveEnabled, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isSuspenseEnabled, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isTransitionEnabled, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, isVaporInteropEnabled, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVaporInteropEnabled, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeepAliveEnabled, withMemo, withScopeId, withSuspenseEnabled, withTransitionEnabled };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/runtime-core",
3
- "version": "3.6.0-rc.12",
3
+ "version": "3.6.0-rc.13",
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.6.0-rc.12",
50
- "@vue/reactivity": "3.6.0-rc.12"
49
+ "@vue/shared": "3.6.0-rc.13",
50
+ "@vue/reactivity": "3.6.0-rc.13"
51
51
  }
52
52
  }