@vue/runtime-dom 3.6.0-rc.10 → 3.6.0-rc.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/runtime-dom v3.6.0-rc.10
2
+ * @vue/runtime-dom v3.6.0-rc.12
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -223,9 +223,10 @@ var VueRuntimeDOM = (function(exports) {
223
223
  * - ismap -> isMap
224
224
  * - nomodule -> noModule
225
225
  * - novalidate -> noValidate
226
+ * - playsinline -> playsInline
226
227
  * - readonly -> readOnly
227
228
  */
228
- const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
229
+ const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
229
230
  const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
230
231
  /**
231
232
  * The full list is needed during SSR to produce the correct initial markup.
@@ -916,17 +917,33 @@ var VueRuntimeDOM = (function(exports) {
916
917
  };
917
918
  function iterator(self, method, wrapValue) {
918
919
  const arr = shallowReadArray(self);
919
- const iter = arr[method]();
920
+ const methodFn = arr[method];
921
+ const iter = methodFn.call(arr);
920
922
  if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
923
+ if (iter[Symbol.toStringTag] === "Array Iterator") {
924
+ const wrapped = Object.create(Object.getPrototypeOf(iter));
925
+ wrapped.next = () => wrapResult(iter.next(), wrapValue);
926
+ if (methodFn !== arrayProto[method]) Object.defineProperties(wrapped, {
927
+ return: { get() {
928
+ const fn = iter.return;
929
+ return typeof fn === "function" ? fn.bind(iter) : fn;
930
+ } },
931
+ throw: { get() {
932
+ const fn = iter.throw;
933
+ return typeof fn === "function" ? fn.bind(iter) : fn;
934
+ } }
935
+ });
936
+ return wrapped;
937
+ }
921
938
  iter._next = iter.next;
922
- iter.next = () => {
923
- const result = iter._next();
924
- if (!result.done) result.value = wrapValue(result.value);
925
- return result;
926
- };
939
+ iter.next = () => wrapResult(iter._next(), wrapValue);
927
940
  }
928
941
  return iter;
929
942
  }
943
+ function wrapResult(result, wrapValue) {
944
+ if (!result.done) result.value = wrapValue(result.value);
945
+ return result;
946
+ }
930
947
  const arrayProto = Array.prototype;
931
948
  function apply(self, method, fn, thisArg, wrappedRetFn, args) {
932
949
  const arr = shallowReadArray(self);
@@ -1244,6 +1261,7 @@ var VueRuntimeDOM = (function(exports) {
1244
1261
  return (target, key, receiver) => {
1245
1262
  if (key === "__v_isReactive") return !isReadonly;
1246
1263
  else if (key === "__v_isReadonly") return isReadonly;
1264
+ else if (key === "__v_isShallow") return shallow;
1247
1265
  else if (key === "__v_raw") return target;
1248
1266
  return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1249
1267
  };
@@ -2153,8 +2171,9 @@ var VueRuntimeDOM = (function(exports) {
2153
2171
  function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
2154
2172
  if (owner) {
2155
2173
  const { call } = owner.options;
2156
- if (call) owner.cleanups[owner.cleanupsLength++] = () => call(cleanupFn, 4);
2157
- else owner.cleanups[owner.cleanupsLength++] = cleanupFn;
2174
+ const cleanup = call ? () => call(cleanupFn, 4) : cleanupFn;
2175
+ if (owner.cb) (owner.cbCleanups || (owner.cbCleanups = [])).push(cleanup);
2176
+ else owner.cleanups[owner.cleanupsLength++] = cleanup;
2158
2177
  } else if (!failSilently) warn$2("onWatcherCleanup() was called when there was no active watcher to associate with.");
2159
2178
  }
2160
2179
  var WatcherEffect = class extends ReactiveEffect {
@@ -2215,9 +2234,11 @@ var VueRuntimeDOM = (function(exports) {
2215
2234
  if (once && cb) {
2216
2235
  const _cb = cb;
2217
2236
  cb = (...args) => {
2218
- const res = _cb(...args);
2219
- this.stop();
2220
- return res;
2237
+ try {
2238
+ return _cb(...args);
2239
+ } finally {
2240
+ this.stop();
2241
+ }
2221
2242
  };
2222
2243
  }
2223
2244
  this.cb = cb;
@@ -2225,6 +2246,19 @@ var VueRuntimeDOM = (function(exports) {
2225
2246
  this.onTrack = options.onTrack;
2226
2247
  this.onTrigger = options.onTrigger;
2227
2248
  }
2249
+ cleanupCallback() {
2250
+ const cleanups = this.cbCleanups;
2251
+ if (cleanups) {
2252
+ this.cbCleanups = void 0;
2253
+ for (let i = 0, l = cleanups.length; i < l; i++) cleanups[i]();
2254
+ }
2255
+ }
2256
+ stop() {
2257
+ if (this.active) {
2258
+ super.stop();
2259
+ this.cleanupCallback();
2260
+ }
2261
+ }
2228
2262
  run(initialRun = false) {
2229
2263
  const oldValue = this.oldValue;
2230
2264
  const newValue = this.oldValue = super.run();
@@ -2232,10 +2266,11 @@ var VueRuntimeDOM = (function(exports) {
2232
2266
  const { immediate, deep, call } = this.options;
2233
2267
  if (initialRun && !immediate) return;
2234
2268
  if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
2235
- cleanup(this);
2236
2269
  const currentWatcher = activeWatcher;
2237
- activeWatcher = this;
2270
+ const prevSub = setActiveSub();
2238
2271
  try {
2272
+ this.cleanupCallback();
2273
+ activeWatcher = this;
2239
2274
  const args = [
2240
2275
  newValue,
2241
2276
  oldValue === INITIAL_WATCHER_VALUE ? void 0 : this.isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
@@ -2244,6 +2279,7 @@ var VueRuntimeDOM = (function(exports) {
2244
2279
  call ? call(this.cb, 3, args) : this.cb(...args);
2245
2280
  } finally {
2246
2281
  activeWatcher = currentWatcher;
2282
+ setActiveSub(prevSub);
2247
2283
  }
2248
2284
  }
2249
2285
  }
@@ -2574,15 +2610,15 @@ var VueRuntimeDOM = (function(exports) {
2574
2610
  } else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
2575
2611
  queueFlush();
2576
2612
  }
2577
- function flushPreFlushCbs(instance, seen) {
2613
+ function flushPreFlushCbs(instance, minUid, seen) {
2578
2614
  seen = seen || /* @__PURE__ */ new Map();
2579
2615
  for (let i = flushIndex; i < jobsLength; i++) {
2580
2616
  const cb = jobs[i];
2581
2617
  if (cb.order & 1 || cb.order === Infinity) continue;
2582
- if (instance && cb.order !== instance.uid * 2) continue;
2618
+ if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
2583
2619
  if (checkRecursiveUpdates(seen, cb)) continue;
2584
2620
  jobs.splice(i, 1);
2585
- i--;
2621
+ i = instance ? i - 1 : flushIndex - 1;
2586
2622
  jobsLength--;
2587
2623
  if (cb.flags & 2) cb.flags &= -2;
2588
2624
  try {
@@ -2592,15 +2628,24 @@ var VueRuntimeDOM = (function(exports) {
2592
2628
  }
2593
2629
  }
2594
2630
  }
2595
- function flushPostFlushCbs(seen) {
2631
+ function flushPostFlushCbs(seen, skip, minUid = 0) {
2596
2632
  if (postJobs.length) {
2633
+ let cbs = postJobs;
2634
+ if (skip) {
2635
+ cbs = [];
2636
+ let kept = 0;
2637
+ for (let i = 0; i < postJobs.length; i++) {
2638
+ const cb = postJobs[i];
2639
+ if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
2640
+ else cbs.push(cb);
2641
+ }
2642
+ postJobs.length = kept;
2643
+ } else postJobs = [];
2597
2644
  if (activePostJobs) {
2598
- for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
2599
- postJobs.length = 0;
2645
+ for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
2600
2646
  return;
2601
2647
  }
2602
- activePostJobs = postJobs;
2603
- postJobs = [];
2648
+ activePostJobs = cbs;
2604
2649
  seen = seen || /* @__PURE__ */ new Map();
2605
2650
  try {
2606
2651
  while (postFlushIndex < activePostJobs.length) {
@@ -2622,17 +2667,28 @@ var VueRuntimeDOM = (function(exports) {
2622
2667
  }
2623
2668
  let isFlushing = false;
2624
2669
  /**
2670
+ * Run a root render, then flush the jobs it is responsible for. A mount or
2671
+ * unmount (`minUid` given) only flushes the jobs of the components it created
2672
+ * and the post cbs it queued, so pre watchers triggered in setup run before
2673
+ * mounted (#5721) while the jobs of other components stay in the queue and
2674
+ * keep their order (#6728). A root update keeps flushing all pending pre jobs
2675
+ * and post cbs, as the jobs of the components it re-renders may predate it.
2676
+ *
2625
2677
  * @internal
2626
2678
  */
2627
- function flushOnAppMount(instance) {
2628
- if (!isFlushing) {
2629
- isFlushing = true;
2630
- try {
2631
- flushPreFlushCbs(instance);
2632
- flushPostFlushCbs();
2633
- } finally {
2634
- isFlushing = false;
2635
- }
2679
+ function flushOnAppMount(fn, minUid) {
2680
+ if (isFlushing) {
2681
+ fn();
2682
+ return;
2683
+ }
2684
+ const queued = minUid === void 0 ? void 0 : new Set(postJobs);
2685
+ fn();
2686
+ isFlushing = true;
2687
+ try {
2688
+ flushPreFlushCbs(void 0, minUid);
2689
+ flushPostFlushCbs(void 0, queued, minUid);
2690
+ } finally {
2691
+ isFlushing = false;
2636
2692
  }
2637
2693
  }
2638
2694
  function flushJobs(seen) {
@@ -3096,7 +3152,7 @@ var VueRuntimeDOM = (function(exports) {
3096
3152
  this.flags |= 128;
3097
3153
  job.flags |= 2;
3098
3154
  }
3099
- if (instance) job.i = instance;
3155
+ job.i = instance;
3100
3156
  this.job = job;
3101
3157
  }
3102
3158
  notify() {
@@ -3289,7 +3345,11 @@ var VueRuntimeDOM = (function(exports) {
3289
3345
  hydrate: hydrateTeleport
3290
3346
  };
3291
3347
  function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
3292
- if (moveType === 0) insert(vnode.targetAnchor, container, parentAnchor);
3348
+ if (moveType === 0) {
3349
+ if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
3350
+ insert(vnode.targetAnchor, container, parentAnchor);
3351
+ parentAnchor = vnode.targetAnchor;
3352
+ }
3293
3353
  const { el, anchor, shapeFlag, children, props } = vnode;
3294
3354
  const isReorder = moveType === 2;
3295
3355
  if (isReorder) insert(el, container, parentAnchor);
@@ -3408,10 +3468,15 @@ var VueRuntimeDOM = (function(exports) {
3408
3468
  onAfterAppear: TransitionHookValidator,
3409
3469
  onAppearCancelled: TransitionHookValidator
3410
3470
  };
3411
- const recursiveGetSubtree = (instance) => {
3412
- const subTree = isVaporComponent(instance.type) ? instance.block : instance.subTree;
3413
- return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
3414
- };
3471
+ function isEmptyTransitionChild(vnode, instance) {
3472
+ if (vnode.type === Comment) return true;
3473
+ if (vnode.type === Fragment) {
3474
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
3475
+ return !child || isEmptyTransitionChild(child, instance);
3476
+ }
3477
+ if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
3478
+ return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
3479
+ }
3415
3480
  const BaseTransitionImpl = {
3416
3481
  name: `BaseTransition`,
3417
3482
  props: BaseTransitionPropsValidators,
@@ -3459,7 +3524,7 @@ var VueRuntimeDOM = (function(exports) {
3459
3524
  function resolveTransitionHooks(vnode, props, state, instance, postClone) {
3460
3525
  const key = String(vnode.key);
3461
3526
  const leavingVNodesCache = getLeavingNodesForType(state, vnode);
3462
- return baseResolveTransitionHooks({
3527
+ const hooks = baseResolveTransitionHooks({
3463
3528
  isLeaving: () => leavingVNodesCache[key] === vnode,
3464
3529
  setLeavingNodeCache: () => {
3465
3530
  leavingVNodesCache[key] = vnode;
@@ -3469,7 +3534,14 @@ var VueRuntimeDOM = (function(exports) {
3469
3534
  },
3470
3535
  earlyRemove: () => {
3471
3536
  const leavingVNode = leavingVNodesCache[key];
3472
- if (leavingVNode && isSameVNodeType(vnode, leavingVNode) && leavingVNode.el[leaveCbKey]) leavingVNode.el[leaveCbKey]();
3537
+ if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
3538
+ let leavingCb = leavingVNode.el[leaveCbKey];
3539
+ if (!leavingCb) {
3540
+ const leavingRoot = getTransitionRoot(leavingVNode);
3541
+ leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
3542
+ }
3543
+ if (leavingCb) leavingCb();
3544
+ }
3473
3545
  },
3474
3546
  cloneHooks: (vnode) => {
3475
3547
  const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
@@ -3477,6 +3549,13 @@ var VueRuntimeDOM = (function(exports) {
3477
3549
  return hooks;
3478
3550
  }
3479
3551
  }, props, state, instance);
3552
+ if (vnode.type === VaporSlot) extend(hooks, {
3553
+ __vapor: true,
3554
+ props,
3555
+ state,
3556
+ instance
3557
+ });
3558
+ return hooks;
3480
3559
  }
3481
3560
  function baseResolveTransitionHooks(context, props, state, instance) {
3482
3561
  const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
@@ -3592,7 +3671,7 @@ var VueRuntimeDOM = (function(exports) {
3592
3671
  if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
3593
3672
  const mode = props.mode;
3594
3673
  const previousInner = previous && getInnerChild$1(previous);
3595
- if (previous && previousInner && previousInner.type !== Comment && !isSameVNodeType(previousInner, nextInner) && (!previous.component || recursiveGetSubtree(previous.component).type !== Comment)) {
3674
+ if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
3596
3675
  const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
3597
3676
  if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
3598
3677
  }
@@ -3656,7 +3735,13 @@ var VueRuntimeDOM = (function(exports) {
3656
3735
  const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
3657
3736
  const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
3658
3737
  return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
3659
- } else vnode.transition = hooks;
3738
+ } else {
3739
+ vnode.transition = hooks;
3740
+ if (vnode.type === Fragment && isArray(vnode.children)) {
3741
+ const child = filterSingleRoot(vnode.children, false);
3742
+ if (child) setTransitionHooks(child, hooks);
3743
+ }
3744
+ }
3660
3745
  return hooks;
3661
3746
  }
3662
3747
  function getTransitionRawChildren(children, keepComment = false, parentKey) {
@@ -3679,6 +3764,14 @@ var VueRuntimeDOM = (function(exports) {
3679
3764
  function checkTransitionMode(mode) {
3680
3765
  if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
3681
3766
  }
3767
+ function getTransitionRoot(vnode) {
3768
+ if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
3769
+ if (vnode.type === Fragment) {
3770
+ const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
3771
+ return child ? getTransitionRoot(child) : void 0;
3772
+ }
3773
+ if (vnode.type !== Comment) return vnode;
3774
+ }
3682
3775
  //#endregion
3683
3776
  //#region packages/runtime-core/src/apiDefineComponent.ts
3684
3777
  /*@__NO_SIDE_EFFECTS__*/
@@ -4308,14 +4401,20 @@ var VueRuntimeDOM = (function(exports) {
4308
4401
  break;
4309
4402
  }
4310
4403
  }, opts);
4311
- forEach((el) => {
4312
- if (!(el instanceof Element)) return;
4404
+ const observe = (el) => {
4313
4405
  if (elementIsVisibleInViewport(el)) {
4314
4406
  hydrate();
4315
4407
  ob.disconnect();
4316
4408
  return false;
4317
4409
  }
4410
+ if (getComputedStyle(el).display === "contents") {
4411
+ for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
4412
+ }
4318
4413
  ob.observe(el);
4414
+ };
4415
+ forEach((el) => {
4416
+ if (!(el instanceof Element)) return;
4417
+ return observe(el);
4319
4418
  });
4320
4419
  return () => ob.disconnect();
4321
4420
  };
@@ -4573,7 +4672,10 @@ var VueRuntimeDOM = (function(exports) {
4573
4672
  function pruneCacheEntry(key) {
4574
4673
  const cached = cache.get(key);
4575
4674
  if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
4576
- else if (current) resetShapeFlag(current);
4675
+ else if (current) {
4676
+ resetShapeFlag(current);
4677
+ if (cached) resetShapeFlag(cached);
4678
+ }
4577
4679
  cache.delete(key);
4578
4680
  keys.delete(key);
4579
4681
  }
@@ -4900,6 +5002,11 @@ var VueRuntimeDOM = (function(exports) {
4900
5002
  owner: currentRenderingInstance
4901
5003
  }] : void 0
4902
5004
  };
5005
+ if (branchKey != null && props.key == null) {
5006
+ ret.vs.props = ret.props;
5007
+ ret.props = extend({}, ret.props, { key: branchKey });
5008
+ ret.key = branchKey;
5009
+ }
4903
5010
  if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
4904
5011
  return ret;
4905
5012
  }
@@ -6091,7 +6198,7 @@ var VueRuntimeDOM = (function(exports) {
6091
6198
  if (nextKeys.length !== Object.keys(prevProps).length) return true;
6092
6199
  for (let i = 0; i < nextKeys.length; i++) {
6093
6200
  const key = nextKeys[i];
6094
- if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
6201
+ if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
6095
6202
  }
6096
6203
  return false;
6097
6204
  }
@@ -6782,7 +6889,8 @@ var VueRuntimeDOM = (function(exports) {
6782
6889
  for (let i = 0; i < newChildren.length; i++) {
6783
6890
  const oldVNode = oldChildren[i];
6784
6891
  const newVNode = newChildren[i];
6785
- const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
6892
+ const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
6893
+ const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
6786
6894
  patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
6787
6895
  }
6788
6896
  };
@@ -6874,6 +6982,7 @@ var VueRuntimeDOM = (function(exports) {
6874
6982
  if (instance.asyncDep && !instance.asyncResolved) {
6875
6983
  pushWarningContext(n2);
6876
6984
  n2.el = n1.el;
6985
+ n2.placeholder = n1.placeholder;
6877
6986
  updateComponentPreRender(instance, n2, optimized);
6878
6987
  popWarningContext();
6879
6988
  return;
@@ -6883,6 +6992,7 @@ var VueRuntimeDOM = (function(exports) {
6883
6992
  }
6884
6993
  } else {
6885
6994
  n2.el = n1.el;
6995
+ n2.placeholder = n1.placeholder;
6886
6996
  instance.vnode = n2;
6887
6997
  }
6888
6998
  };
@@ -7227,12 +7337,9 @@ var VueRuntimeDOM = (function(exports) {
7227
7337
  };
7228
7338
  const remove = (vnode) => {
7229
7339
  const { type, el, anchor, transition } = vnode;
7230
- if (type === Fragment) {
7231
- if (vnode.patchFlag > 0 && vnode.patchFlag & 2048 && transition && !transition.persisted) vnode.children.forEach((child) => {
7232
- if (child.type === Comment) hostRemove(child.el);
7233
- else remove(child);
7234
- });
7235
- else removeFragment(el, anchor);
7340
+ const isFragment = type === Fragment;
7341
+ if (isFragment && !transition) {
7342
+ removeFragment(el, anchor);
7236
7343
  return;
7237
7344
  }
7238
7345
  if (type === Static) {
@@ -7240,8 +7347,21 @@ var VueRuntimeDOM = (function(exports) {
7240
7347
  if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
7241
7348
  return;
7242
7349
  }
7243
- if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
7244
- else hostRemove(el);
7350
+ const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
7351
+ const performRemove = () => {
7352
+ if (isFragment) {
7353
+ if (hostParentNode(el)) removeFragment(el, anchor);
7354
+ } else hostRemove(el);
7355
+ };
7356
+ if (transition) {
7357
+ let leavingEl = leavingNode && leavingNode.el;
7358
+ let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
7359
+ if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
7360
+ leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
7361
+ isElement = !!leavingEl;
7362
+ }
7363
+ performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
7364
+ } else performRemove();
7245
7365
  };
7246
7366
  const removeFragment = (cur, end) => {
7247
7367
  let next;
@@ -7284,15 +7404,12 @@ var VueRuntimeDOM = (function(exports) {
7284
7404
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
7285
7405
  };
7286
7406
  const render = (vnode, container, namespace) => {
7287
- let instance;
7288
- if (vnode == null) {
7289
- if (container._vnode) {
7290
- unmount(container._vnode, null, null, true);
7291
- instance = container._vnode.component;
7292
- }
7293
- } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
7294
- container._vnode = vnode;
7295
- flushOnAppMount(instance);
7407
+ flushOnAppMount(() => {
7408
+ if (vnode == null) {
7409
+ if (container._vnode) unmount(container._vnode, null, null, true);
7410
+ } else patch(container._vnode || null, vnode, container, null, null, null, namespace);
7411
+ container._vnode = vnode;
7412
+ }, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
7296
7413
  };
7297
7414
  const internals = {
7298
7415
  p: patch,
@@ -7685,13 +7802,12 @@ var VueRuntimeDOM = (function(exports) {
7685
7802
  registerDep(instance, onResolve) {
7686
7803
  const isInPendingSuspense = !!suspense.pendingBranch;
7687
7804
  if (isInPendingSuspense) suspense.deps++;
7688
- const hydratedEl = instance.vnode && instance.vnode.el;
7689
7805
  instance.asyncDep.catch((err) => {
7690
7806
  handleError(err, instance, 0);
7691
7807
  }).then((asyncSetupResult) => {
7692
7808
  if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
7693
7809
  setCurrentInstance(null, void 0);
7694
- if (hydratedEl && !instance.scope.active) {
7810
+ if (!instance.scope.active) {
7695
7811
  if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
7696
7812
  return;
7697
7813
  }
@@ -8004,7 +8120,7 @@ var VueRuntimeDOM = (function(exports) {
8004
8120
  ctx: vnode.ctx,
8005
8121
  ce: vnode.ce,
8006
8122
  vi: vnode.vi,
8007
- vs: cloneVaporSlotMeta(vnode),
8123
+ vs: cloneVaporSlotMeta(vnode, extraProps),
8008
8124
  vb: vnode.vb,
8009
8125
  ibu: vnode.ibu,
8010
8126
  iu: vnode.iu,
@@ -8013,13 +8129,22 @@ var VueRuntimeDOM = (function(exports) {
8013
8129
  if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
8014
8130
  return cloned;
8015
8131
  }
8016
- function cloneVaporSlotMeta(vnode) {
8132
+ function cloneVaporSlotMeta(vnode, extraProps) {
8017
8133
  const vaporSlot = vnode.vs;
8018
8134
  if (!vaporSlot) return vaporSlot;
8019
8135
  const cloned = {
8020
8136
  slot: vaporSlot.slot,
8021
- outlets: vaporSlot.outlets
8137
+ outlets: vaporSlot.outlets,
8138
+ props: vaporSlot.props
8022
8139
  };
8140
+ if (vaporSlot.props && extraProps) {
8141
+ let extraSlotProps;
8142
+ for (const key in extraProps) if (key !== "key") {
8143
+ if (!extraSlotProps) extraSlotProps = {};
8144
+ extraSlotProps[key] = extraProps[key];
8145
+ }
8146
+ if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
8147
+ }
8023
8148
  if (vnode.el) {
8024
8149
  cloned.state = vaporSlot.state;
8025
8150
  cloned.ref = vaporSlot.ref;
@@ -8202,6 +8327,9 @@ var VueRuntimeDOM = (function(exports) {
8202
8327
  //#region packages/runtime-core/src/component.ts
8203
8328
  const emptyAppContext = /*@__PURE__*/ createAppContext();
8204
8329
  let uid = 0;
8330
+ function getNextUid() {
8331
+ return uid;
8332
+ }
8205
8333
  function createComponentInstance(vnode, parent, suspense) {
8206
8334
  const type = vnode.type;
8207
8335
  const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
@@ -8706,7 +8834,7 @@ var VueRuntimeDOM = (function(exports) {
8706
8834
  }
8707
8835
  //#endregion
8708
8836
  //#region packages/runtime-core/src/index.ts
8709
- const version = "3.6.0-rc.10";
8837
+ const version = "3.6.0-rc.12";
8710
8838
  const warn = warn$1;
8711
8839
  /**
8712
8840
  * Runtime error messages. Only exposed in dev or esm builds.
@@ -9189,7 +9317,7 @@ var VueRuntimeDOM = (function(exports) {
9189
9317
  else el.removeAttribute("style");
9190
9318
  }
9191
9319
  if (vShowOriginalDisplay in el) {
9192
- el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
9320
+ if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
9193
9321
  if (el[vShowHidden]) style.display = "none";
9194
9322
  }
9195
9323
  }
@@ -9494,7 +9622,7 @@ var VueRuntimeDOM = (function(exports) {
9494
9622
  this._resolveProps(def);
9495
9623
  if (this.shadowRoot) this._applyStyles(styles);
9496
9624
  else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
9497
- this._mountComponent(def);
9625
+ if (this._connected) this._mountComponent(def);
9498
9626
  };
9499
9627
  const asyncDef = this._def.__asyncLoader;
9500
9628
  if (asyncDef) {
@@ -9796,6 +9924,7 @@ var VueRuntimeDOM = (function(exports) {
9796
9924
  const newPositionMap = /* @__PURE__ */ new WeakMap();
9797
9925
  const moveCbKey = Symbol("_moveCb");
9798
9926
  const enterCbKey = Symbol("_enterCb");
9927
+ const pendingGroups = /* @__PURE__ */ new WeakMap();
9799
9928
  /**
9800
9929
  * Wrap logic that modifies TransitionGroup properties in a function
9801
9930
  * so that it can be annotated as pure
@@ -9815,15 +9944,24 @@ var VueRuntimeDOM = (function(exports) {
9815
9944
  const state = useTransitionState();
9816
9945
  let prevChildren;
9817
9946
  let children;
9947
+ let origins;
9948
+ let moves;
9949
+ const willMove = () => {
9950
+ if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
9951
+ return moves;
9952
+ };
9818
9953
  onUpdated(() => {
9819
- if (!prevChildren.length) return;
9820
- const moveClass = props.moveClass || `${props.name || "v"}-move`;
9821
- if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
9954
+ pendingGroups.delete(instance);
9955
+ if (!willMove()) {
9822
9956
  prevChildren = [];
9957
+ origins = void 0;
9823
9958
  return;
9824
9959
  }
9960
+ const moveClass = resolveMoveClass(props);
9825
9961
  prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
9826
- prevChildren.forEach(recordPosition);
9962
+ const shift = origins && getOriginShift(origins, instance.vnode.el);
9963
+ origins = void 0;
9964
+ prevChildren.forEach((c) => recordPosition(c, shift));
9827
9965
  const movedChildren = prevChildren.filter(applyTranslation);
9828
9966
  forceReflow(instance.vnode.el);
9829
9967
  movedChildren.forEach((c) => {
@@ -9837,6 +9975,7 @@ var VueRuntimeDOM = (function(exports) {
9837
9975
  const cssTransitionProps = resolveTransitionProps(rawProps);
9838
9976
  let tag = rawProps.tag || Fragment;
9839
9977
  prevChildren = [];
9978
+ moves = void 0;
9840
9979
  if (children) for (let i = 0; i < children.length; i++) {
9841
9980
  const child = children[i];
9842
9981
  if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
@@ -9851,6 +9990,14 @@ var VueRuntimeDOM = (function(exports) {
9851
9990
  if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
9852
9991
  else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
9853
9992
  }
9993
+ if (prevChildren.length) {
9994
+ const root = instance.vnode.el;
9995
+ origins = getOrigins(instance, root);
9996
+ pendingGroups.set(instance, {
9997
+ root,
9998
+ willMove
9999
+ });
10000
+ }
9854
10001
  return createVNode(tag, null, children);
9855
10002
  };
9856
10003
  }
@@ -9859,8 +10006,11 @@ var VueRuntimeDOM = (function(exports) {
9859
10006
  if (el[moveCbKey]) el[moveCbKey]();
9860
10007
  if (el[enterCbKey]) el[enterCbKey]();
9861
10008
  }
9862
- function recordPosition(c) {
9863
- newPositionMap.set(c, getPosition(c.el));
10009
+ function resolveMoveClass(props) {
10010
+ return props.moveClass || `${props.name || "v"}-move`;
10011
+ }
10012
+ function recordPosition(c, shift) {
10013
+ newPositionMap.set(c, getPosition(c.el, shift));
9864
10014
  }
9865
10015
  function applyTranslation(c) {
9866
10016
  if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
@@ -9885,13 +10035,36 @@ var VueRuntimeDOM = (function(exports) {
9885
10035
  }
9886
10036
  return false;
9887
10037
  }
9888
- function getPosition(el) {
10038
+ function getPosition(el, shift) {
9889
10039
  const rect = el.getBoundingClientRect();
9890
10040
  return {
9891
- left: rect.left,
9892
- top: rect.top
10041
+ left: rect.left - (shift ? shift.left : 0),
10042
+ top: rect.top - (shift ? shift.top : 0)
9893
10043
  };
9894
10044
  }
10045
+ function getOrigins(instance, root) {
10046
+ let origins;
10047
+ for (let group = instance.parent; group; group = group.parent) {
10048
+ const pending = pendingGroups.get(group);
10049
+ if (pending) {
10050
+ const item = findItem(pending.root, root);
10051
+ if (item) (origins || (origins = [])).push(extend(getPosition(item), {
10052
+ item,
10053
+ willMove: pending.willMove
10054
+ }));
10055
+ }
10056
+ }
10057
+ return origins;
10058
+ }
10059
+ function findItem(root, node) {
10060
+ const container = root.nodeType === 1 ? root : root.parentNode;
10061
+ while (node && node.parentNode !== container) node = node.parentNode;
10062
+ if (node && node.nodeType === 1) return node;
10063
+ }
10064
+ function getOriginShift(origins, root) {
10065
+ const origin = origins.find((o) => o.willMove() && o.item.contains(root));
10066
+ return origin && getPosition(origin.item, origin);
10067
+ }
9895
10068
  function hasCSSTransform(el, root, moveClass) {
9896
10069
  const clone = el.cloneNode();
9897
10070
  const _vtc = el[vtcKey];