@vue/compat 3.6.0-beta.10 → 3.6.0-beta.11

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.
@@ -1279,6 +1279,8 @@ interface VNode<HostNode = RendererNode, HostElement = RendererElement, ExtraPro
1279
1279
  vs?: {
1280
1280
  slot: (props: any) => any;
1281
1281
  fallback: (() => VNodeArrayChildren) | undefined;
1282
+ outletFallback?: (() => VNodeArrayChildren) | undefined;
1283
+ state?: unknown;
1282
1284
  ref?: ShallowRef<any>;
1283
1285
  scope?: EffectScope;
1284
1286
  };
package/dist/vue.cjs.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.10
2
+ * @vue/compat v3.6.0-beta.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -3569,7 +3569,7 @@ const TeleportImpl = {
3569
3569
  name: "Teleport",
3570
3570
  __isTeleport: true,
3571
3571
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
3572
- const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
3572
+ const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
3573
3573
  const disabled = isTeleportDisabled(n2.props);
3574
3574
  let { dynamicChildren } = n2;
3575
3575
  if (isHmrUpdating) {
@@ -3598,7 +3598,7 @@ const TeleportImpl = {
3598
3598
  if (pendingMounts.get(vnode) !== mountJob) return;
3599
3599
  pendingMounts.delete(vnode);
3600
3600
  if (isTeleportDisabled(vnode.props)) {
3601
- mount(vnode, container, vnode.anchor);
3601
+ mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
3602
3602
  updateCssVars(vnode, true);
3603
3603
  }
3604
3604
  mountToTarget(vnode);
@@ -3678,7 +3678,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
3678
3678
  const { el, anchor, shapeFlag, children, props } = vnode;
3679
3679
  const isReorder = moveType === 2;
3680
3680
  if (isReorder) insert(el, container, parentAnchor);
3681
- if (!isReorder || isTeleportDisabled(props)) {
3681
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
3682
3682
  if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
3683
3683
  }
3684
3684
  if (isReorder) insert(anchor, container, parentAnchor);
@@ -3803,8 +3803,8 @@ const BaseTransitionImpl = {
3803
3803
  const state = useTransitionState();
3804
3804
  return () => {
3805
3805
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
3806
- if (!children || !children.length) return;
3807
- const child = findNonCommentChild(children);
3806
+ const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
3807
+ if (!child) return;
3808
3808
  const rawProps = /* @__PURE__ */ toRaw(props);
3809
3809
  const { mode } = rawProps;
3810
3810
  checkTransitionMode(mode);
@@ -5378,6 +5378,7 @@ function createSlots(slots, dynamicSlots) {
5378
5378
  */
5379
5379
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
5380
5380
  let slot = slots[name];
5381
+ if (fallback) fallback.__vdom = true;
5381
5382
  const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
5382
5383
  if (vaporSlot) {
5383
5384
  const ret = (openBlock(), createBlock(VaporSlot, props));
@@ -5416,9 +5417,7 @@ function ensureValidVNode(vnodes) {
5416
5417
  }
5417
5418
  function ensureVaporSlotFallback(vnodes, fallback) {
5418
5419
  let vaporSlot;
5419
- if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) {
5420
- if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
5421
- }
5420
+ if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
5422
5421
  }
5423
5422
  //#endregion
5424
5423
  //#region packages/runtime-core/src/helpers/toHandlers.ts
@@ -5979,9 +5978,14 @@ function withAsyncContext(getAwaitable) {
5979
5978
  setCurrentInstance(null, void 0);
5980
5979
  if (inSSRSetup) setInSSRSetupState(false);
5981
5980
  const restore = () => {
5981
+ const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
5982
5982
  setCurrentInstance(ctx);
5983
5983
  if (inSSRSetup) setInSSRSetupState(true);
5984
- return restoreAsyncContext && restoreAsyncContext();
5984
+ const reset = restoreAsyncContext && restoreAsyncContext();
5985
+ return () => {
5986
+ if (reset) reset();
5987
+ if (resetStoppedScope) resetStoppedScope.reset();
5988
+ };
5985
5989
  };
5986
5990
  const cleanup = () => {
5987
5991
  setCurrentInstance(null, void 0);
@@ -6319,7 +6323,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
6319
6323
  if (options.el) return vm.$mount(options.el);
6320
6324
  else return vm;
6321
6325
  }
6322
- Vue.version = `2.6.14-compat:3.6.0-beta.10`;
6326
+ Vue.version = `2.6.14-compat:3.6.0-beta.11`;
6323
6327
  Vue.config = singletonApp.config;
6324
6328
  Vue.use = (plugin, ...options) => {
6325
6329
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -7455,7 +7459,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7455
7459
  const receivedType = toRawType(value);
7456
7460
  const expectedValue = styleValue(value, expectedType);
7457
7461
  const receivedValue = styleValue(value, receivedType);
7458
- if (expectedTypes.length === 1 && isExplicable(expectedType) && !isBoolean(expectedType, receivedType)) message += ` with value ${expectedValue}`;
7462
+ if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
7459
7463
  message += `, got ${receivedType} `;
7460
7464
  if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
7461
7465
  return message;
@@ -7464,7 +7468,8 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
7464
7468
  * dev only
7465
7469
  */
7466
7470
  function styleValue(value, type) {
7467
- if (type === "String") return `"${value}"`;
7471
+ if (isSymbol(value)) return value.toString();
7472
+ else if (type === "String") return `"${value}"`;
7468
7473
  else if (type === "Number") return `${Number(value)}`;
7469
7474
  else return `${value}`;
7470
7475
  }
@@ -7481,8 +7486,11 @@ function isExplicable(type) {
7481
7486
  /**
7482
7487
  * dev only
7483
7488
  */
7484
- function isBoolean(...args) {
7485
- return args.some((elem) => elem.toLowerCase() === "boolean");
7489
+ function isCoercible(...args) {
7490
+ return args.every((elem) => {
7491
+ const value = elem.toLowerCase();
7492
+ return value !== "boolean" && value !== "symbol";
7493
+ });
7486
7494
  }
7487
7495
  //#endregion
7488
7496
  //#region packages/runtime-core/src/componentSlots.ts
@@ -8677,15 +8685,19 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
8677
8685
  if (suspense.isHydrating) suspense.isHydrating = false;
8678
8686
  else if (!resume) {
8679
8687
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
8688
+ let hasUpdatedAnchor = false;
8680
8689
  if (delayEnter) activeBranch.transition.afterLeave = () => {
8681
8690
  if (pendingId === suspense.pendingId) {
8682
- move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
8691
+ move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
8683
8692
  queuePostFlushCb(effects);
8684
8693
  if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
8685
8694
  }
8686
8695
  };
8687
8696
  if (activeBranch && !suspense.isFallbackMountPending) {
8688
- if (parentNode(activeBranch.el) === container) anchor = next(activeBranch);
8697
+ if (parentNode(activeBranch.el) === container) {
8698
+ anchor = next(activeBranch);
8699
+ hasUpdatedAnchor = true;
8700
+ }
8689
8701
  unmount(activeBranch, parentComponent, suspense, true);
8690
8702
  if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
8691
8703
  }
@@ -9082,12 +9094,30 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
9082
9094
  el: vnode.el,
9083
9095
  anchor: vnode.anchor,
9084
9096
  ctx: vnode.ctx,
9085
- ce: vnode.ce
9097
+ ce: vnode.ce,
9098
+ vi: vnode.vi,
9099
+ vs: cloneVaporSlotMeta(vnode),
9100
+ vb: vnode.vb
9086
9101
  };
9087
9102
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
9088
9103
  defineLegacyVNodeProperties(cloned);
9089
9104
  return cloned;
9090
9105
  }
9106
+ function cloneVaporSlotMeta(vnode) {
9107
+ const vaporSlot = vnode.vs;
9108
+ if (!vaporSlot) return vaporSlot;
9109
+ const cloned = {
9110
+ slot: vaporSlot.slot,
9111
+ fallback: vaporSlot.fallback,
9112
+ outletFallback: vaporSlot.outletFallback
9113
+ };
9114
+ if (vnode.el) {
9115
+ cloned.state = vaporSlot.state;
9116
+ cloned.ref = vaporSlot.ref;
9117
+ cloned.scope = vaporSlot.scope;
9118
+ }
9119
+ return cloned;
9120
+ }
9091
9121
  /**
9092
9122
  * Dev only, for HMR of hoisted vnodes reused in v-for
9093
9123
  * https://github.com/vitejs/vite/issues/2022
@@ -9757,7 +9787,7 @@ function isMemoSame(cached, memo) {
9757
9787
  }
9758
9788
  //#endregion
9759
9789
  //#region packages/runtime-core/src/index.ts
9760
- const version = "3.6.0-beta.10";
9790
+ const version = "3.6.0-beta.11";
9761
9791
  const warn = warn$1;
9762
9792
  /**
9763
9793
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -10185,7 +10215,10 @@ function patchStyle(el, prev, next) {
10185
10215
  }
10186
10216
  for (const key in next) {
10187
10217
  if (key === "display") hasControlledDisplay = true;
10188
- setStyle(style, key, next[key]);
10218
+ const value = next[key];
10219
+ if (value != null) {
10220
+ if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
10221
+ } else setStyle(style, key, "");
10189
10222
  }
10190
10223
  } else if (isCssString) {
10191
10224
  if (prev !== next) {
@@ -10233,6 +10266,14 @@ function autoPrefix(style, rawName) {
10233
10266
  }
10234
10267
  return rawName;
10235
10268
  }
10269
+ /**
10270
+ * Browsers update textarea width/height directly during native resize.
10271
+ * Only special-case this common textarea path for now; other resize scenarios
10272
+ * still follow normal vnode style patching.
10273
+ */
10274
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
10275
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
10276
+ }
10236
10277
  //#endregion
10237
10278
  //#region packages/runtime-dom/src/modules/attrs.ts
10238
10279
  const xlinkNS = "http://www.w3.org/1999/xlink";
@@ -10692,7 +10733,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
10692
10733
  replacementNodes.push(child);
10693
10734
  }
10694
10735
  parent.removeChild(o);
10695
- slotReplacements.set(o, replacementNodes);
10736
+ slotReplacements.set(o, {
10737
+ nodes: replacementNodes,
10738
+ usedFallback: !content
10739
+ });
10696
10740
  }
10697
10741
  this._updateSlotNodes(slotReplacements);
10698
10742
  }
@@ -14394,6 +14438,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
14394
14438
  constantCache: /* @__PURE__ */ new WeakMap(),
14395
14439
  temps: 0,
14396
14440
  identifiers: Object.create(null),
14441
+ identifierScopes: Object.create(null),
14397
14442
  scopes: {
14398
14443
  vFor: 0,
14399
14444
  vSlot: 0,
@@ -14444,16 +14489,20 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
14444
14489
  context.parent.children.splice(removalIndex, 1);
14445
14490
  },
14446
14491
  onNodeRemoved: NOOP,
14447
- addIdentifiers(exp) {
14448
- if (isString(exp)) addId(exp);
14449
- else if (exp.identifiers) exp.identifiers.forEach(addId);
14450
- else if (exp.type === 4) addId(exp.content);
14492
+ addIdentifiers(exp, type = "local") {
14493
+ if (isString(exp)) addId(exp, type);
14494
+ else if (exp.identifiers) exp.identifiers.forEach((id) => addId(id, type));
14495
+ else if (exp.type === 4) addId(exp.content, type);
14451
14496
  },
14452
14497
  removeIdentifiers(exp) {
14453
14498
  if (isString(exp)) removeId(exp);
14454
14499
  else if (exp.identifiers) exp.identifiers.forEach(removeId);
14455
14500
  else if (exp.type === 4) removeId(exp.content);
14456
14501
  },
14502
+ isSlotScopeIdentifier(name) {
14503
+ const scopes = context.identifierScopes[name];
14504
+ return scopes ? scopes[scopes.length - 1] === "slot" : false;
14505
+ },
14457
14506
  hoist(exp) {
14458
14507
  if (isString(exp)) exp = createSimpleExpression(exp);
14459
14508
  context.hoists.push(exp);
@@ -14468,13 +14517,16 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
14468
14517
  }
14469
14518
  };
14470
14519
  context.filters = /* @__PURE__ */ new Set();
14471
- function addId(id) {
14472
- const { identifiers } = context;
14520
+ function addId(id, type) {
14521
+ const { identifiers, identifierScopes } = context;
14473
14522
  if (identifiers[id] === void 0) identifiers[id] = 0;
14474
14523
  identifiers[id]++;
14524
+ (identifierScopes[id] || (identifierScopes[id] = [])).push(type);
14475
14525
  }
14476
14526
  function removeId(id) {
14477
14527
  context.identifiers[id]--;
14528
+ const scopes = context.identifierScopes[id];
14529
+ if (scopes) scopes.pop();
14478
14530
  }
14479
14531
  return context;
14480
14532
  }
@@ -15547,7 +15599,7 @@ const trackSlotScopes = (node, context) => {
15547
15599
  const vSlot = findDir(node, "slot");
15548
15600
  if (vSlot) {
15549
15601
  const slotProps = vSlot.exp;
15550
- if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps);
15602
+ if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps, "slot");
15551
15603
  context.scopes.vSlot++;
15552
15604
  return () => {
15553
15605
  if (context.prefixIdentifiers) slotProps && context.removeIdentifiers(slotProps);
@@ -15768,6 +15820,15 @@ function resolveComponentType(node, context, ssr = false) {
15768
15820
  if (!ssr) context.helper(builtIn);
15769
15821
  return builtIn;
15770
15822
  }
15823
+ {
15824
+ const fromScope = resolveSlotScopeReference(tag, context);
15825
+ if (fromScope) return fromScope;
15826
+ const dotIndex = tag.indexOf(".");
15827
+ if (dotIndex > 0) {
15828
+ const ns = resolveSlotScopeReference(tag.slice(0, dotIndex), context);
15829
+ if (ns) return ns + tag.slice(dotIndex);
15830
+ }
15831
+ }
15771
15832
  {
15772
15833
  const fromSetup = resolveSetupReference(tag, context);
15773
15834
  if (fromSetup) return fromSetup;
@@ -15786,6 +15847,14 @@ function resolveComponentType(node, context, ssr = false) {
15786
15847
  context.components.add(tag);
15787
15848
  return toValidAssetId(tag, `component`);
15788
15849
  }
15850
+ function resolveSlotScopeReference(name, context) {
15851
+ const camelName = camelize(name);
15852
+ const PascalName = capitalize(camelName);
15853
+ const isInSlotScope = (reference) => context.isSlotScopeIdentifier(reference);
15854
+ if (isInSlotScope(name)) return name;
15855
+ if (isInSlotScope(camelName)) return camelName;
15856
+ if (isInSlotScope(PascalName)) return PascalName;
15857
+ }
15789
15858
  function resolveSetupReference(name, context) {
15790
15859
  const bindings = context.bindingMetadata;
15791
15860
  if (!bindings || bindings.__isScriptSetup === false) return;
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/compat v3.6.0-beta.10
2
+ * @vue/compat v3.6.0-beta.11
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -2835,7 +2835,7 @@ const TeleportImpl = {
2835
2835
  name: "Teleport",
2836
2836
  __isTeleport: true,
2837
2837
  process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
2838
- const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
2838
+ const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
2839
2839
  const disabled = isTeleportDisabled(n2.props);
2840
2840
  let { dynamicChildren } = n2;
2841
2841
  const mount = (vnode, container, anchor) => {
@@ -2860,7 +2860,7 @@ const TeleportImpl = {
2860
2860
  if (pendingMounts.get(vnode) !== mountJob) return;
2861
2861
  pendingMounts.delete(vnode);
2862
2862
  if (isTeleportDisabled(vnode.props)) {
2863
- mount(vnode, container, vnode.anchor);
2863
+ mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
2864
2864
  updateCssVars(vnode, true);
2865
2865
  }
2866
2866
  mountToTarget(vnode);
@@ -2939,7 +2939,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
2939
2939
  const { el, anchor, shapeFlag, children, props } = vnode;
2940
2940
  const isReorder = moveType === 2;
2941
2941
  if (isReorder) insert(el, container, parentAnchor);
2942
- if (!isReorder || isTeleportDisabled(props)) {
2942
+ if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
2943
2943
  if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
2944
2944
  }
2945
2945
  if (isReorder) insert(anchor, container, parentAnchor);
@@ -3064,8 +3064,8 @@ const BaseTransitionImpl = {
3064
3064
  const state = useTransitionState();
3065
3065
  return () => {
3066
3066
  const children = slots.default && getTransitionRawChildren(slots.default(), true);
3067
- if (!children || !children.length) return;
3068
- const child = findNonCommentChild(children);
3067
+ const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
3068
+ if (!child) return;
3069
3069
  const rawProps = /* @__PURE__ */ toRaw(props);
3070
3070
  const { mode } = rawProps;
3071
3071
  if (state.isLeaving) return emptyPlaceholder(child);
@@ -4465,6 +4465,7 @@ function createSlots(slots, dynamicSlots) {
4465
4465
  */
4466
4466
  function renderSlot(slots, name, props = {}, fallback, noSlotted) {
4467
4467
  let slot = slots[name];
4468
+ if (fallback) fallback.__vdom = true;
4468
4469
  const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
4469
4470
  if (vaporSlot) {
4470
4471
  const ret = (openBlock(), createBlock(VaporSlot, props));
@@ -4499,9 +4500,7 @@ function ensureValidVNode(vnodes) {
4499
4500
  }
4500
4501
  function ensureVaporSlotFallback(vnodes, fallback) {
4501
4502
  let vaporSlot;
4502
- if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) {
4503
- if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
4504
- }
4503
+ if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
4505
4504
  }
4506
4505
  //#endregion
4507
4506
  //#region packages/runtime-core/src/helpers/toHandlers.ts
@@ -4968,9 +4967,14 @@ function withAsyncContext(getAwaitable) {
4968
4967
  setCurrentInstance(null, void 0);
4969
4968
  if (inSSRSetup) setInSSRSetupState(false);
4970
4969
  const restore = () => {
4970
+ const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
4971
4971
  setCurrentInstance(ctx);
4972
4972
  if (inSSRSetup) setInSSRSetupState(true);
4973
- return restoreAsyncContext && restoreAsyncContext();
4973
+ const reset = restoreAsyncContext && restoreAsyncContext();
4974
+ return () => {
4975
+ if (reset) reset();
4976
+ if (resetStoppedScope) resetStoppedScope.reset();
4977
+ };
4974
4978
  };
4975
4979
  const cleanup = () => {
4976
4980
  setCurrentInstance(null, void 0);
@@ -5240,7 +5244,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
5240
5244
  if (options.el) return vm.$mount(options.el);
5241
5245
  else return vm;
5242
5246
  }
5243
- Vue.version = `2.6.14-compat:3.6.0-beta.10`;
5247
+ Vue.version = `2.6.14-compat:3.6.0-beta.11`;
5244
5248
  Vue.config = singletonApp.config;
5245
5249
  Vue.use = (plugin, ...options) => {
5246
5250
  if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
@@ -7185,15 +7189,19 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
7185
7189
  if (suspense.isHydrating) suspense.isHydrating = false;
7186
7190
  else if (!resume) {
7187
7191
  delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
7192
+ let hasUpdatedAnchor = false;
7188
7193
  if (delayEnter) activeBranch.transition.afterLeave = () => {
7189
7194
  if (pendingId === suspense.pendingId) {
7190
- move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
7195
+ move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
7191
7196
  queuePostFlushCb(effects);
7192
7197
  if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
7193
7198
  }
7194
7199
  };
7195
7200
  if (activeBranch && !suspense.isFallbackMountPending) {
7196
- if (parentNode(activeBranch.el) === container) anchor = next(activeBranch);
7201
+ if (parentNode(activeBranch.el) === container) {
7202
+ anchor = next(activeBranch);
7203
+ hasUpdatedAnchor = true;
7204
+ }
7197
7205
  unmount(activeBranch, parentComponent, suspense, true);
7198
7206
  if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
7199
7207
  }
@@ -7564,12 +7572,30 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
7564
7572
  el: vnode.el,
7565
7573
  anchor: vnode.anchor,
7566
7574
  ctx: vnode.ctx,
7567
- ce: vnode.ce
7575
+ ce: vnode.ce,
7576
+ vi: vnode.vi,
7577
+ vs: cloneVaporSlotMeta(vnode),
7578
+ vb: vnode.vb
7568
7579
  };
7569
7580
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
7570
7581
  defineLegacyVNodeProperties(cloned);
7571
7582
  return cloned;
7572
7583
  }
7584
+ function cloneVaporSlotMeta(vnode) {
7585
+ const vaporSlot = vnode.vs;
7586
+ if (!vaporSlot) return vaporSlot;
7587
+ const cloned = {
7588
+ slot: vaporSlot.slot,
7589
+ fallback: vaporSlot.fallback,
7590
+ outletFallback: vaporSlot.outletFallback
7591
+ };
7592
+ if (vnode.el) {
7593
+ cloned.state = vaporSlot.state;
7594
+ cloned.ref = vaporSlot.ref;
7595
+ cloned.scope = vaporSlot.scope;
7596
+ }
7597
+ return cloned;
7598
+ }
7573
7599
  /**
7574
7600
  * @private
7575
7601
  */
@@ -7984,7 +8010,7 @@ function isMemoSame(cached, memo) {
7984
8010
  }
7985
8011
  //#endregion
7986
8012
  //#region packages/runtime-core/src/index.ts
7987
- const version = "3.6.0-beta.10";
8013
+ const version = "3.6.0-beta.11";
7988
8014
  const warn = NOOP;
7989
8015
  /**
7990
8016
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -8407,7 +8433,10 @@ function patchStyle(el, prev, next) {
8407
8433
  }
8408
8434
  for (const key in next) {
8409
8435
  if (key === "display") hasControlledDisplay = true;
8410
- setStyle(style, key, next[key]);
8436
+ const value = next[key];
8437
+ if (value != null) {
8438
+ if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
8439
+ } else setStyle(style, key, "");
8411
8440
  }
8412
8441
  } else if (isCssString) {
8413
8442
  if (prev !== next) {
@@ -8453,6 +8482,14 @@ function autoPrefix(style, rawName) {
8453
8482
  }
8454
8483
  return rawName;
8455
8484
  }
8485
+ /**
8486
+ * Browsers update textarea width/height directly during native resize.
8487
+ * Only special-case this common textarea path for now; other resize scenarios
8488
+ * still follow normal vnode style patching.
8489
+ */
8490
+ function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
8491
+ return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
8492
+ }
8456
8493
  //#endregion
8457
8494
  //#region packages/runtime-dom/src/modules/attrs.ts
8458
8495
  const xlinkNS = "http://www.w3.org/1999/xlink";
@@ -8884,7 +8921,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
8884
8921
  replacementNodes.push(child);
8885
8922
  }
8886
8923
  parent.removeChild(o);
8887
- slotReplacements.set(o, replacementNodes);
8924
+ slotReplacements.set(o, {
8925
+ nodes: replacementNodes,
8926
+ usedFallback: !content
8927
+ });
8888
8928
  }
8889
8929
  this._updateSlotNodes(slotReplacements);
8890
8930
  }
@@ -12445,6 +12485,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
12445
12485
  constantCache: /* @__PURE__ */ new WeakMap(),
12446
12486
  temps: 0,
12447
12487
  identifiers: Object.create(null),
12488
+ identifierScopes: Object.create(null),
12448
12489
  scopes: {
12449
12490
  vFor: 0,
12450
12491
  vSlot: 0,
@@ -12489,16 +12530,20 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
12489
12530
  context.parent.children.splice(removalIndex, 1);
12490
12531
  },
12491
12532
  onNodeRemoved: NOOP,
12492
- addIdentifiers(exp) {
12493
- if (isString(exp)) addId(exp);
12494
- else if (exp.identifiers) exp.identifiers.forEach(addId);
12495
- else if (exp.type === 4) addId(exp.content);
12533
+ addIdentifiers(exp, type = "local") {
12534
+ if (isString(exp)) addId(exp, type);
12535
+ else if (exp.identifiers) exp.identifiers.forEach((id) => addId(id, type));
12536
+ else if (exp.type === 4) addId(exp.content, type);
12496
12537
  },
12497
12538
  removeIdentifiers(exp) {
12498
12539
  if (isString(exp)) removeId(exp);
12499
12540
  else if (exp.identifiers) exp.identifiers.forEach(removeId);
12500
12541
  else if (exp.type === 4) removeId(exp.content);
12501
12542
  },
12543
+ isSlotScopeIdentifier(name) {
12544
+ const scopes = context.identifierScopes[name];
12545
+ return scopes ? scopes[scopes.length - 1] === "slot" : false;
12546
+ },
12502
12547
  hoist(exp) {
12503
12548
  if (isString(exp)) exp = createSimpleExpression(exp);
12504
12549
  context.hoists.push(exp);
@@ -12513,13 +12558,16 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
12513
12558
  }
12514
12559
  };
12515
12560
  context.filters = /* @__PURE__ */ new Set();
12516
- function addId(id) {
12517
- const { identifiers } = context;
12561
+ function addId(id, type) {
12562
+ const { identifiers, identifierScopes } = context;
12518
12563
  if (identifiers[id] === void 0) identifiers[id] = 0;
12519
12564
  identifiers[id]++;
12565
+ (identifierScopes[id] || (identifierScopes[id] = [])).push(type);
12520
12566
  }
12521
12567
  function removeId(id) {
12522
12568
  context.identifiers[id]--;
12569
+ const scopes = context.identifierScopes[id];
12570
+ if (scopes) scopes.pop();
12523
12571
  }
12524
12572
  return context;
12525
12573
  }
@@ -13577,7 +13625,7 @@ const trackSlotScopes = (node, context) => {
13577
13625
  const vSlot = findDir(node, "slot");
13578
13626
  if (vSlot) {
13579
13627
  const slotProps = vSlot.exp;
13580
- if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps);
13628
+ if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps, "slot");
13581
13629
  context.scopes.vSlot++;
13582
13630
  return () => {
13583
13631
  if (context.prefixIdentifiers) slotProps && context.removeIdentifiers(slotProps);
@@ -13793,6 +13841,15 @@ function resolveComponentType(node, context, ssr = false) {
13793
13841
  if (!ssr) context.helper(builtIn);
13794
13842
  return builtIn;
13795
13843
  }
13844
+ {
13845
+ const fromScope = resolveSlotScopeReference(tag, context);
13846
+ if (fromScope) return fromScope;
13847
+ const dotIndex = tag.indexOf(".");
13848
+ if (dotIndex > 0) {
13849
+ const ns = resolveSlotScopeReference(tag.slice(0, dotIndex), context);
13850
+ if (ns) return ns + tag.slice(dotIndex);
13851
+ }
13852
+ }
13796
13853
  {
13797
13854
  const fromSetup = resolveSetupReference(tag, context);
13798
13855
  if (fromSetup) return fromSetup;
@@ -13811,6 +13868,14 @@ function resolveComponentType(node, context, ssr = false) {
13811
13868
  context.components.add(tag);
13812
13869
  return toValidAssetId(tag, `component`);
13813
13870
  }
13871
+ function resolveSlotScopeReference(name, context) {
13872
+ const camelName = camelize(name);
13873
+ const PascalName = capitalize(camelName);
13874
+ const isInSlotScope = (reference) => context.isSlotScopeIdentifier(reference);
13875
+ if (isInSlotScope(name)) return name;
13876
+ if (isInSlotScope(camelName)) return camelName;
13877
+ if (isInSlotScope(PascalName)) return PascalName;
13878
+ }
13814
13879
  function resolveSetupReference(name, context) {
13815
13880
  const bindings = context.bindingMetadata;
13816
13881
  if (!bindings || bindings.__isScriptSetup === false) return;