@vue/compat 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/compat v3.6.0-rc.12
2
+ * @vue/compat v3.6.0-rc.14
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -516,6 +516,21 @@ function normalizeCssVarValue(value) {
516
516
  return String(value);
517
517
  }
518
518
  //#endregion
519
+ //#region packages/shared/src/vaporFlags.ts
520
+ /**
521
+ * The data of the comment a vapor server render opens the branch of a `v-if`
522
+ * chain with, `<!--[1-->`: the digits are the branch's position in the chain,
523
+ * and `<!--]-->` closes it like a fragment.
524
+ */
525
+ function isVaporBranchStart(data) {
526
+ if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
527
+ for (let i = 1; i < data.length; i++) {
528
+ const c = data.charCodeAt(i);
529
+ if (c < 48 || c > 57) return false;
530
+ }
531
+ return true;
532
+ }
533
+ //#endregion
519
534
  //#region packages/reactivity/src/debug.ts
520
535
  const triggerEventInfos = [];
521
536
  function onTrack(sub, debugInfo) {
@@ -3654,6 +3669,16 @@ function createPathGetter(ctx, path) {
3654
3669
  };
3655
3670
  }
3656
3671
  //#endregion
3672
+ //#region packages/runtime-core/src/vaporInteropState.ts
3673
+ /**
3674
+ * Set by `vaporInteropPlugin`. Stays false in apps that never import the
3675
+ * plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
3676
+ */
3677
+ let isVaporInteropEnabled = false;
3678
+ function setVaporInteropEnabled() {
3679
+ isVaporInteropEnabled = true;
3680
+ }
3681
+ //#endregion
3657
3682
  //#region packages/runtime-core/src/components/Teleport.ts
3658
3683
  const pendingMounts = /* @__PURE__ */ new WeakMap();
3659
3684
  const TeleportEndKey = Symbol("_vte");
@@ -3913,13 +3938,18 @@ const BaseTransitionPropsValidators = {
3913
3938
  onAfterAppear: TransitionHookValidator,
3914
3939
  onAppearCancelled: TransitionHookValidator
3915
3940
  };
3941
+ let isTransitionEnabled = false;
3942
+ function withTransitionEnabled(value) {
3943
+ isTransitionEnabled = true;
3944
+ return value;
3945
+ }
3916
3946
  function isEmptyTransitionChild(vnode, instance) {
3917
3947
  if (vnode.type === Comment) return true;
3918
3948
  if (vnode.type === Fragment) {
3919
3949
  const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
3920
3950
  return !child || isEmptyTransitionChild(child, instance);
3921
3951
  }
3922
- if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
3952
+ if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
3923
3953
  return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
3924
3954
  }
3925
3955
  const BaseTransitionImpl = {
@@ -3936,7 +3966,7 @@ const BaseTransitionImpl = {
3936
3966
  const { mode } = rawProps;
3937
3967
  checkTransitionMode(mode);
3938
3968
  return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
3939
- if (!(instance.job.flags & 4)) instance.update();
3969
+ if (!(instance.effect.flags & 1024)) instance.update();
3940
3970
  }) : NOOP);
3941
3971
  };
3942
3972
  }
@@ -3957,7 +3987,7 @@ function findNonCommentChild(children) {
3957
3987
  }
3958
3988
  return child;
3959
3989
  }
3960
- const BaseTransition = BaseTransitionImpl;
3990
+ const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
3961
3991
  function getLeavingNodesForType(state, vnode) {
3962
3992
  const { leavingNodes } = state;
3963
3993
  let leavingVNodesCache = leavingNodes.get(vnode.type);
@@ -3995,7 +4025,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3995
4025
  return hooks;
3996
4026
  }
3997
4027
  }, props, state, instance);
3998
- if (vnode.type === VaporSlot) extend(hooks, {
4028
+ if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
3999
4029
  __vapor: true,
4000
4030
  props,
4001
4031
  state,
@@ -4172,7 +4202,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
4172
4202
  function setTransitionHooks(vnode, hooks) {
4173
4203
  if (vnode.shapeFlag & 6 && vnode.component) {
4174
4204
  vnode.transition = hooks;
4175
- if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
4205
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
4176
4206
  else {
4177
4207
  const subTree = vnode.component.subTree;
4178
4208
  return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
@@ -4211,7 +4241,7 @@ function checkTransitionMode(mode) {
4211
4241
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
4212
4242
  }
4213
4243
  function getTransitionRoot(vnode) {
4214
- if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
4244
+ if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
4215
4245
  if (vnode.type === Fragment) {
4216
4246
  const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
4217
4247
  return child ? getTransitionRoot(child) : void 0;
@@ -4398,6 +4428,8 @@ const getContainerType = (container) => {
4398
4428
  if (isMathMLContainer(container)) return "mathml";
4399
4429
  };
4400
4430
  const isComment = (node) => node.nodeType === 8;
4431
+ /** The data of a comment opening a range a hydration steps over as one. */
4432
+ const isRangeStart = (data) => data === "[" || data === "(" || isVaporBranchStart(data);
4401
4433
  function createHydrationFunctions(rendererInternals) {
4402
4434
  const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
4403
4435
  const hydrate = (vnode, container) => {
@@ -4415,7 +4447,7 @@ function createHydrationFunctions(rendererInternals) {
4415
4447
  };
4416
4448
  const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
4417
4449
  optimized = optimized || !!vnode.dynamicChildren;
4418
- const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
4450
+ const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporBranchStart(node.data));
4419
4451
  const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
4420
4452
  const { type, ref, shapeFlag, patchFlag } = vnode;
4421
4453
  let domType = node.nodeType;
@@ -4471,7 +4503,7 @@ function createHydrationFunctions(rendererInternals) {
4471
4503
  else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
4472
4504
  break;
4473
4505
  case VaporSlot:
4474
- nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
4506
+ if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
4475
4507
  break;
4476
4508
  default: if (shapeFlag & 1) {
4477
4509
  if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
@@ -4603,7 +4635,7 @@ function createHydrationFunctions(rendererInternals) {
4603
4635
  if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
4604
4636
  const container = parentNode(node);
4605
4637
  const first = nextSibling(node);
4606
- const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4638
+ const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
4607
4639
  if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
4608
4640
  else {
4609
4641
  logMismatchError();
@@ -4613,7 +4645,7 @@ function createHydrationFunctions(rendererInternals) {
4613
4645
  };
4614
4646
  const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
4615
4647
  if (!isNodeMismatchAllowed(node, vnode)) {
4616
- warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
4648
+ warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
4617
4649
  logMismatchError();
4618
4650
  }
4619
4651
  vnode.el = null;
@@ -4640,7 +4672,7 @@ function createHydrationFunctions(rendererInternals) {
4640
4672
  while (node) {
4641
4673
  node = nextSibling(node);
4642
4674
  if (node && isComment(node)) {
4643
- if (node.data === open) match++;
4675
+ if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
4644
4676
  if (node.data === close) {
4645
4677
  if (match === 0) return nextSibling(node);
4646
4678
  else match--;
@@ -4896,9 +4928,9 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
4896
4928
  return teardown;
4897
4929
  };
4898
4930
  function forEachElement(node, cb) {
4899
- if (isComment(node) && (node.data === "[" || node.data === "(")) {
4931
+ if (isComment(node) && isRangeStart(node.data)) {
4900
4932
  const open = node.data;
4901
- const close = open === "[" ? "]" : ")";
4933
+ const close = open === "(" ? ")" : "]";
4902
4934
  let depth = 1;
4903
4935
  let next = node.nextSibling;
4904
4936
  while (next) {
@@ -4907,7 +4939,7 @@ function forEachElement(node, cb) {
4907
4939
  } else if (isComment(next)) {
4908
4940
  if (next.data === close) {
4909
4941
  if (--depth === 0) break;
4910
- } else if (next.data === open) depth++;
4942
+ } else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
4911
4943
  }
4912
4944
  next = next.nextSibling;
4913
4945
  }
@@ -5010,7 +5042,7 @@ function createAsyncComponentContext(source) {
5010
5042
  setPendingRequest: (request) => pendingRequest = request
5011
5043
  };
5012
5044
  }
5013
- const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
5045
+ const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
5014
5046
  const loaded = /* @__PURE__ */ ref(false);
5015
5047
  const error = /* @__PURE__ */ ref();
5016
5048
  const delayed = /* @__PURE__ */ ref(!!delay);
@@ -5067,6 +5099,11 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
5067
5099
  //#endregion
5068
5100
  //#region packages/runtime-core/src/components/KeepAlive.ts
5069
5101
  const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
5102
+ let isKeepAliveEnabled = false;
5103
+ function withKeepAliveEnabled(value) {
5104
+ isKeepAliveEnabled = true;
5105
+ return value;
5106
+ }
5070
5107
  const KeepAliveImpl = {
5071
5108
  name: `KeepAlive`,
5072
5109
  __isKeepAlive: true,
@@ -5211,7 +5248,7 @@ const decorate$2 = (t) => {
5211
5248
  t.__isBuiltIn = true;
5212
5249
  return t;
5213
5250
  };
5214
- const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
5251
+ const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
5215
5252
  function matches(pattern, name) {
5216
5253
  if (isArray(pattern)) return pattern.some((p) => matches(p, name));
5217
5254
  else if (isString(pattern)) return pattern.split(",").includes(name);
@@ -5657,11 +5694,12 @@ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
5657
5694
  function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
5658
5695
  if (props == null) props = {};
5659
5696
  let slot = slots[name];
5660
- const vaporSlot = slot && slot[rawVaporSlotKey];
5697
+ const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
5661
5698
  if (vaporSlot) {
5662
5699
  const ret = (openBlock(), createBlock(VaporSlot, props));
5663
5700
  ret.vs = {
5664
5701
  slot: vaporSlot,
5702
+ name,
5665
5703
  outlets: fallback ? [{
5666
5704
  fallback,
5667
5705
  owner: currentRenderingInstance
@@ -5692,7 +5730,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
5692
5730
  try {
5693
5731
  const validSlotContent = slot && ensureValidVNode(slot(props));
5694
5732
  let attached = false;
5695
- if (fallback && validSlotContent && currentRenderingInstance) {
5733
+ if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
5696
5734
  const interop = currentRenderingInstance.appContext.vapor;
5697
5735
  if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
5698
5736
  }
@@ -6651,7 +6689,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6651
6689
  if (options.el) return vm.$mount(options.el);
6652
6690
  else return vm;
6653
6691
  }
6654
- Vue.version = `2.6.14-compat:3.6.0-rc.12`;
6692
+ Vue.version = `2.6.14-compat:3.6.0-rc.14`;
6655
6693
  Vue.config = singletonApp.config;
6656
6694
  Vue.use = (plugin, ...options) => {
6657
6695
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -8015,7 +8053,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8015
8053
  processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8016
8054
  break;
8017
8055
  case VaporSlot:
8018
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
8056
+ if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
8019
8057
  break;
8020
8058
  default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
8021
8059
  else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
@@ -8149,7 +8187,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8149
8187
  let vnodeHook;
8150
8188
  parentComponent && toggleRecurse(parentComponent, false);
8151
8189
  if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
8152
- if (n2.ibu) n2.ibu();
8190
+ if (isVaporInteropEnabled && n2.ibu) n2.ibu();
8153
8191
  if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
8154
8192
  parentComponent && toggleRecurse(parentComponent, true);
8155
8193
  if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
@@ -8183,9 +8221,9 @@ function baseCreateRenderer(options, createHydrationFns) {
8183
8221
  if (n1.children !== n2.children) hostSetElementText(el, n2.children);
8184
8222
  }
8185
8223
  } else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
8186
- if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
8224
+ if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
8187
8225
  vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
8188
- n2.iu && n2.iu();
8226
+ isVaporInteropEnabled && n2.iu && n2.iu();
8189
8227
  dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
8190
8228
  }, void 0, parentSuspense);
8191
8229
  };
@@ -8401,7 +8439,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8401
8439
  } else next = vnode;
8402
8440
  if (bu) invokeArrayFns(bu);
8403
8441
  if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
8404
- if (next.ibu) next.ibu();
8442
+ if (isVaporInteropEnabled && next.ibu) next.ibu();
8405
8443
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
8406
8444
  toggleRecurse(instance, true);
8407
8445
  startMeasure(instance, `render`);
@@ -8415,9 +8453,9 @@ function baseCreateRenderer(options, createHydrationFns) {
8415
8453
  next.el = nextTree.el;
8416
8454
  if (originNext === null) updateHOCHostEl(instance, nextTree.el);
8417
8455
  if (u) queuePostRenderEffect(u, void 0, parentSuspense);
8418
- if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
8456
+ if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
8419
8457
  vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
8420
- next.iu && next.iu();
8458
+ isVaporInteropEnabled && next.iu && next.iu();
8421
8459
  }, void 0, parentSuspense);
8422
8460
  if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
8423
8461
  devtoolsComponentUpdated(instance);
@@ -8570,7 +8608,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8570
8608
  };
8571
8609
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
8572
8610
  const { el, type, transition, children, shapeFlag } = vnode;
8573
- if (isVaporComponent(type) || type === VaporSlot) {
8611
+ if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
8574
8612
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
8575
8613
  return;
8576
8614
  }
@@ -8614,11 +8652,11 @@ function baseCreateRenderer(options, createHydrationFns) {
8614
8652
  }
8615
8653
  if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
8616
8654
  if (shapeFlag & 256) {
8617
- if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
8655
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
8618
8656
  else parentComponent.ctx.deactivate(vnode);
8619
8657
  return;
8620
8658
  }
8621
- if (shapeFlag & 6 && isVaporComponent(type)) {
8659
+ if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
8622
8660
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
8623
8661
  return;
8624
8662
  }
@@ -8636,7 +8674,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8636
8674
  if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
8637
8675
  else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
8638
8676
  else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
8639
- if (type === VaporSlot) {
8677
+ if (isVaporInteropEnabled && type === VaporSlot) {
8640
8678
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
8641
8679
  return;
8642
8680
  }
@@ -8670,7 +8708,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8670
8708
  if (transition) {
8671
8709
  let leavingEl = leavingNode && leavingNode.el;
8672
8710
  let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
8673
- if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
8711
+ if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
8674
8712
  leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
8675
8713
  isElement = !!leavingEl;
8676
8714
  }
@@ -8711,7 +8749,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8711
8749
  };
8712
8750
  const getNextHostNode = (vnode) => {
8713
8751
  if (vnode.shapeFlag & 6) {
8714
- if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
8752
+ if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
8715
8753
  return getNextHostNode(vnode.component.subTree);
8716
8754
  }
8717
8755
  if (vnode.shapeFlag & 128) return vnode.suspense.next();
@@ -8772,7 +8810,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
8772
8810
  return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
8773
8811
  }
8774
8812
  function toggleRecurse({ effect, job, vapor }, allowed) {
8775
- if (!vapor) {
8813
+ if (!isVaporInteropEnabled || !vapor) {
8776
8814
  if (allowed) {
8777
8815
  effect.flags |= 128;
8778
8816
  job.flags |= 2;
@@ -8884,7 +8922,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
8884
8922
  currentParent = currentParent.parent;
8885
8923
  } else break;
8886
8924
  }
8887
- const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
8925
+ const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
8888
8926
  if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
8889
8927
  return inheritedScopeIds;
8890
8928
  }
@@ -8897,8 +8935,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
8897
8935
  //#endregion
8898
8936
  //#region packages/runtime-core/src/components/Suspense.ts
8899
8937
  const isSuspense = (type) => type.__isSuspense;
8938
+ let isSuspenseEnabled = false;
8939
+ function withSuspenseEnabled(value) {
8940
+ isSuspenseEnabled = true;
8941
+ return value;
8942
+ }
8900
8943
  let suspenseId = 0;
8901
- const Suspense = {
8944
+ const Suspense = /*@__PURE__*/ withSuspenseEnabled({
8902
8945
  name: "Suspense",
8903
8946
  __isSuspense: true,
8904
8947
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
@@ -8915,7 +8958,7 @@ const Suspense = {
8915
8958
  },
8916
8959
  hydrate: hydrateSuspense,
8917
8960
  normalize: normalizeSuspenseChildren
8918
- };
8961
+ });
8919
8962
  function triggerEvent(vnode, name) {
8920
8963
  const eventListener = vnode.props && vnode.props[name];
8921
8964
  if (isFunction(eventListener)) eventListener();
@@ -9494,16 +9537,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
9494
9537
  if (!vaporSlot) return vaporSlot;
9495
9538
  const cloned = {
9496
9539
  slot: vaporSlot.slot,
9540
+ name: vaporSlot.name,
9497
9541
  outlets: vaporSlot.outlets,
9498
- props: vaporSlot.props
9542
+ props: vaporSlot.props,
9543
+ attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
9544
+ group: vaporSlot.group
9499
9545
  };
9500
- if (vaporSlot.props && extraProps) {
9546
+ const attrs = cloned.attrs;
9547
+ if (extraProps && vaporSlot.props) {
9501
9548
  let extraSlotProps;
9502
- for (const key in extraProps) if (key !== "key") {
9549
+ for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
9503
9550
  if (!extraSlotProps) extraSlotProps = {};
9504
9551
  extraSlotProps[key] = extraProps[key];
9505
9552
  }
9506
- if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
9553
+ if (extraSlotProps) {
9554
+ if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
9555
+ else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
9556
+ }
9507
9557
  }
9508
9558
  if (vnode.el) {
9509
9559
  cloned.state = vaporSlot.state;
@@ -9776,7 +9826,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
9776
9826
  isSSR && setInSSRSetupState(isSSR);
9777
9827
  const { props, children, vi } = instance.vnode;
9778
9828
  const isStateful = isStatefulComponent(instance);
9779
- if (vi) vi(instance);
9829
+ if (isVaporInteropEnabled && vi) vi(instance);
9780
9830
  else {
9781
9831
  initProps(instance, props, isStateful, isSSR);
9782
9832
  initSlots(instance, children, optimized || isSSR);
@@ -10198,7 +10248,7 @@ function isMemoSame(cached, memo) {
10198
10248
  }
10199
10249
  //#endregion
10200
10250
  //#region packages/runtime-core/src/index.ts
10201
- const version = "3.6.0-rc.12";
10251
+ const version = "3.6.0-rc.14";
10202
10252
  const warn = warn$1;
10203
10253
  /**
10204
10254
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10636,14 +10686,14 @@ function setVarsOnVNode(vnode, vars) {
10636
10686
  }
10637
10687
  while (vnode.component) {
10638
10688
  const component = vnode.component;
10639
- if (component.vapor) {
10689
+ if (isVaporInteropEnabled && component.vapor) {
10640
10690
  component.appContext.vapor.applyCssVars(vnode, vars);
10641
10691
  return;
10642
10692
  }
10643
10693
  vnode = vnode.component.subTree;
10644
10694
  }
10645
10695
  if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
10646
- else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
10696
+ else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
10647
10697
  else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
10648
10698
  else if (vnode.type === Static) {
10649
10699
  let { el, anchor } = vnode;
@@ -11364,7 +11414,7 @@ const decorate = (t) => {
11364
11414
  t.__isBuiltIn = true;
11365
11415
  return t;
11366
11416
  };
11367
- const TransitionGroup = /* @__PURE__ */ decorate({
11417
+ const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
11368
11418
  name: "TransitionGroup",
11369
11419
  props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
11370
11420
  tag: String,
@@ -11373,6 +11423,11 @@ const TransitionGroup = /* @__PURE__ */ decorate({
11373
11423
  setup(props, { slots }) {
11374
11424
  const instance = getCurrentInstance();
11375
11425
  const state = useTransitionState();
11426
+ const group = {
11427
+ props: {},
11428
+ state,
11429
+ instance
11430
+ };
11376
11431
  let prevChildren;
11377
11432
  let children;
11378
11433
  let origins;
@@ -11403,7 +11458,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
11403
11458
  });
11404
11459
  return () => {
11405
11460
  const rawProps = /* @__PURE__ */ toRaw(props);
11406
- const cssTransitionProps = resolveTransitionProps(rawProps);
11461
+ const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
11407
11462
  let tag = rawProps.tag || Fragment;
11408
11463
  if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
11409
11464
  prevChildren = [];
@@ -11414,12 +11469,17 @@ const TransitionGroup = /* @__PURE__ */ decorate({
11414
11469
  prevChildren.push(child);
11415
11470
  setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
11416
11471
  positionMap.set(child, getPosition(child.el));
11417
- }
11472
+ } else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
11473
+ const row = { el };
11474
+ prevChildren.push(row);
11475
+ positionMap.set(row, getPosition(el));
11476
+ });
11418
11477
  }
11419
11478
  children = slots.default ? getTransitionRawChildren(slots.default()) : [];
11420
11479
  for (let i = 0; i < children.length; i++) {
11421
11480
  const child = children[i];
11422
- if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
11481
+ if (isVaporInteropEnabled && child.vs) child.vs.group = group;
11482
+ else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
11423
11483
  else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
11424
11484
  }
11425
11485
  if (prevChildren.length) {
@@ -11433,7 +11493,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
11433
11493
  return createVNode(tag, null, children);
11434
11494
  };
11435
11495
  }
11436
- });
11496
+ }));
11437
11497
  function callPendingCbs(el) {
11438
11498
  if (el[moveCbKey]) el[moveCbKey]();
11439
11499
  if (el[enterCbKey]) el[enterCbKey]();
@@ -11577,7 +11637,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
11577
11637
  if (e.target.composing) return;
11578
11638
  (set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
11579
11639
  });
11580
- if (trim || number) addEventListener(el, "change", () => {
11640
+ if (trim || number || el.type === "number") addEventListener(el, "change", () => {
11581
11641
  el.value = castValue(el.value, trim, number || el.type === "number");
11582
11642
  });
11583
11643
  if (!lazy) {
@@ -11939,6 +11999,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
11939
11999
  initCustomFormatter: () => initCustomFormatter,
11940
12000
  initDirectivesForSSR: () => initDirectivesForSSR,
11941
12001
  inject: () => inject,
12002
+ isKeepAliveEnabled: () => isKeepAliveEnabled,
11942
12003
  isMemoSame: () => isMemoSame,
11943
12004
  isProxy: () => isProxy,
11944
12005
  isReactive: () => isReactive,
@@ -11946,7 +12007,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
11946
12007
  isRef: () => isRef,
11947
12008
  isRuntimeOnly: () => isRuntimeOnly,
11948
12009
  isShallow: () => isShallow,
12010
+ isSuspenseEnabled: () => isSuspenseEnabled,
12011
+ isTransitionEnabled: () => isTransitionEnabled,
11949
12012
  isVNode: () => isVNode,
12013
+ isVaporInteropEnabled: () => isVaporInteropEnabled,
11950
12014
  markRaw: () => markRaw,
11951
12015
  mergeDefaults: () => mergeDefaults,
11952
12016
  mergeModels: () => mergeModels,
@@ -11993,6 +12057,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
11993
12057
  setDevtoolsHook: () => setDevtoolsHook,
11994
12058
  setIsHydratingEnabled: () => setIsHydratingEnabled,
11995
12059
  setTransitionHooks: () => setTransitionHooks,
12060
+ setVaporInteropEnabled: () => setVaporInteropEnabled,
11996
12061
  shallowReactive: () => shallowReactive,
11997
12062
  shallowReadonly: () => shallowReadonly,
11998
12063
  shallowRef: () => shallowRef,
@@ -12037,10 +12102,13 @@ var src_exports = /* @__PURE__ */ __exportAll({
12037
12102
  withCtx: () => withCtx,
12038
12103
  withDefaults: () => withDefaults,
12039
12104
  withDirectives: () => withDirectives,
12105
+ withKeepAliveEnabled: () => withKeepAliveEnabled,
12040
12106
  withKeys: () => withKeys,
12041
12107
  withMemo: () => withMemo,
12042
12108
  withModifiers: () => withModifiers,
12043
- withScopeId: () => withScopeId
12109
+ withScopeId: () => withScopeId,
12110
+ withSuspenseEnabled: () => withSuspenseEnabled,
12111
+ withTransitionEnabled: () => withTransitionEnabled
12044
12112
  });
12045
12113
  const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
12046
12114
  let renderer;
@@ -16564,4 +16632,4 @@ Vue.compile = compileToFunction;
16564
16632
  var esm_index_default = Vue;
16565
16633
  const configureCompat = Vue.configureCompat;
16566
16634
  //#endregion
16567
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
16635
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isKeepAliveEnabled, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isSuspenseEnabled, isTransitionEnabled, isVNode, isVaporInteropEnabled, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, setVaporInteropEnabled, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeepAliveEnabled, withKeys, withMemo, withModifiers, withScopeId, withSuspenseEnabled, withTransitionEnabled };