@vue/runtime-dom 3.6.0-alpha.6 → 3.6.0-beta.1

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-alpha.6
2
+ * @vue/runtime-dom v3.6.0-beta.1
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -754,13 +754,13 @@ var VueRuntimeDOM = (function (exports) {
754
754
  }
755
755
  }
756
756
  const targetMap = /* @__PURE__ */ new WeakMap();
757
- const ITERATE_KEY = Symbol(
757
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
758
758
  "Object iterate"
759
759
  );
760
- const MAP_KEY_ITERATE_KEY = Symbol(
760
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
761
761
  "Map keys iterate"
762
762
  );
763
- const ARRAY_ITERATE_KEY = Symbol(
763
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
764
764
  "Array iterate"
765
765
  );
766
766
  function track(target, type, key) {
@@ -2000,6 +2000,16 @@ var VueRuntimeDOM = (function (exports) {
2000
2000
  return;
2001
2001
  }
2002
2002
  this.flags = 1024;
2003
+ this.reset();
2004
+ const sub = this.subs;
2005
+ if (sub !== void 0) {
2006
+ unlink(sub);
2007
+ }
2008
+ }
2009
+ /**
2010
+ * @internal
2011
+ */
2012
+ reset() {
2003
2013
  let dep = this.deps;
2004
2014
  while (dep !== void 0) {
2005
2015
  const node = dep.dep;
@@ -2010,10 +2020,6 @@ var VueRuntimeDOM = (function (exports) {
2010
2020
  dep = unlink(dep, this);
2011
2021
  }
2012
2022
  }
2013
- const sub = this.subs;
2014
- if (sub !== void 0) {
2015
- unlink(sub);
2016
- }
2017
2023
  cleanup(this);
2018
2024
  }
2019
2025
  }
@@ -2755,10 +2761,10 @@ var VueRuntimeDOM = (function (exports) {
2755
2761
  }
2756
2762
  }
2757
2763
  let isFlushing = false;
2758
- function flushOnAppMount() {
2764
+ function flushOnAppMount(instance) {
2759
2765
  if (!isFlushing) {
2760
2766
  isFlushing = true;
2761
- flushPreFlushCbs();
2767
+ flushPreFlushCbs(instance);
2762
2768
  flushPostFlushCbs();
2763
2769
  isFlushing = false;
2764
2770
  }
@@ -2825,6 +2831,7 @@ var VueRuntimeDOM = (function (exports) {
2825
2831
 
2826
2832
  let isHmrUpdating = false;
2827
2833
  const hmrDirtyComponents = /* @__PURE__ */ new Map();
2834
+ const hmrDirtyComponentsMode = /* @__PURE__ */ new Map();
2828
2835
  {
2829
2836
  getGlobalThis().__VUE_HMR_RUNTIME__ = {
2830
2837
  createRecord: tryWrap(createRecord),
@@ -2888,9 +2895,10 @@ var VueRuntimeDOM = (function (exports) {
2888
2895
  const record = map.get(id);
2889
2896
  if (!record) return;
2890
2897
  newComp = normalizeClassComponent(newComp);
2898
+ const isVapor = record.initialDef.__vapor;
2891
2899
  updateComponentDef(record.initialDef, newComp);
2892
2900
  const instances = [...record.instances];
2893
- if (newComp.__vapor && !instances.some((i) => i.ceReload)) {
2901
+ if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
2894
2902
  for (const instance of instances) {
2895
2903
  if (instance.root && instance.root.ce && instance !== instance.root) {
2896
2904
  instance.root.ce._removeChildStyle(instance.type);
@@ -2910,6 +2918,7 @@ var VueRuntimeDOM = (function (exports) {
2910
2918
  hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
2911
2919
  }
2912
2920
  dirtyInstances.add(instance);
2921
+ hmrDirtyComponentsMode.set(oldComp, !!isVapor);
2913
2922
  instance.appContext.propsCache.delete(instance.type);
2914
2923
  instance.appContext.emitsCache.delete(instance.type);
2915
2924
  instance.appContext.optionsCache.delete(instance.type);
@@ -2950,6 +2959,7 @@ var VueRuntimeDOM = (function (exports) {
2950
2959
  }
2951
2960
  queuePostFlushCb(() => {
2952
2961
  hmrDirtyComponents.clear();
2962
+ hmrDirtyComponentsMode.clear();
2953
2963
  });
2954
2964
  }
2955
2965
  function updateComponentDef(oldComp, newComp) {
@@ -3169,7 +3179,175 @@ var VueRuntimeDOM = (function (exports) {
3169
3179
  }
3170
3180
  }
3171
3181
 
3172
- const TeleportEndKey = Symbol("_vte");
3182
+ function provide(key, value) {
3183
+ {
3184
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3185
+ warn$1(`provide() can only be used inside setup().`);
3186
+ }
3187
+ }
3188
+ if (currentInstance) {
3189
+ let provides = currentInstance.provides;
3190
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3191
+ if (parentProvides === provides) {
3192
+ provides = currentInstance.provides = Object.create(parentProvides);
3193
+ }
3194
+ provides[key] = value;
3195
+ }
3196
+ }
3197
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3198
+ const instance = getCurrentGenericInstance();
3199
+ if (instance || currentApp) {
3200
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3201
+ if (provides && key in provides) {
3202
+ return provides[key];
3203
+ } else if (arguments.length > 1) {
3204
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3205
+ } else {
3206
+ warn$1(`injection "${String(key)}" not found.`);
3207
+ }
3208
+ } else {
3209
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3210
+ }
3211
+ }
3212
+ function hasInjectionContext() {
3213
+ return !!(getCurrentGenericInstance() || currentApp);
3214
+ }
3215
+
3216
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3217
+ const useSSRContext = () => {
3218
+ {
3219
+ warn$1(`useSSRContext() is not supported in the global build.`);
3220
+ }
3221
+ };
3222
+
3223
+ function watchEffect(effect, options) {
3224
+ return doWatch(effect, null, options);
3225
+ }
3226
+ function watchPostEffect(effect, options) {
3227
+ return doWatch(
3228
+ effect,
3229
+ null,
3230
+ extend({}, options, { flush: "post" })
3231
+ );
3232
+ }
3233
+ function watchSyncEffect(effect, options) {
3234
+ return doWatch(
3235
+ effect,
3236
+ null,
3237
+ extend({}, options, { flush: "sync" })
3238
+ );
3239
+ }
3240
+ function watch(source, cb, options) {
3241
+ if (!isFunction(cb)) {
3242
+ warn$1(
3243
+ `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
3244
+ );
3245
+ }
3246
+ return doWatch(source, cb, options);
3247
+ }
3248
+ class RenderWatcherEffect extends WatcherEffect {
3249
+ constructor(instance, source, cb, options, flush) {
3250
+ super(source, cb, options);
3251
+ this.flush = flush;
3252
+ const job = () => {
3253
+ if (this.dirty) {
3254
+ this.run();
3255
+ }
3256
+ };
3257
+ if (cb) {
3258
+ this.flags |= 128;
3259
+ job.flags |= 2;
3260
+ }
3261
+ if (instance) {
3262
+ job.i = instance;
3263
+ }
3264
+ this.job = job;
3265
+ }
3266
+ notify() {
3267
+ const flags = this.flags;
3268
+ if (!(flags & 256)) {
3269
+ const flush = this.flush;
3270
+ const job = this.job;
3271
+ if (flush === "post") {
3272
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3273
+ } else if (flush === "pre") {
3274
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3275
+ } else {
3276
+ job();
3277
+ }
3278
+ }
3279
+ }
3280
+ }
3281
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3282
+ const { immediate, deep, flush = "pre", once } = options;
3283
+ if (!cb) {
3284
+ if (immediate !== void 0) {
3285
+ warn$1(
3286
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3287
+ );
3288
+ }
3289
+ if (deep !== void 0) {
3290
+ warn$1(
3291
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3292
+ );
3293
+ }
3294
+ if (once !== void 0) {
3295
+ warn$1(
3296
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3297
+ );
3298
+ }
3299
+ }
3300
+ const baseWatchOptions = extend({}, options);
3301
+ baseWatchOptions.onWarn = warn$1;
3302
+ const instance = currentInstance;
3303
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3304
+ const effect = new RenderWatcherEffect(
3305
+ instance,
3306
+ source,
3307
+ cb,
3308
+ baseWatchOptions,
3309
+ flush
3310
+ );
3311
+ if (cb) {
3312
+ effect.run(true);
3313
+ } else if (flush === "post") {
3314
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3315
+ } else {
3316
+ effect.run(true);
3317
+ }
3318
+ const stop = effect.stop.bind(effect);
3319
+ stop.pause = effect.pause.bind(effect);
3320
+ stop.resume = effect.resume.bind(effect);
3321
+ stop.stop = stop;
3322
+ return stop;
3323
+ }
3324
+ function instanceWatch(source, value, options) {
3325
+ const publicThis = this.proxy;
3326
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3327
+ let cb;
3328
+ if (isFunction(value)) {
3329
+ cb = value;
3330
+ } else {
3331
+ cb = value.handler;
3332
+ options = value;
3333
+ }
3334
+ const prev = setCurrentInstance(this);
3335
+ const res = doWatch(getter, cb.bind(publicThis), options);
3336
+ setCurrentInstance(...prev);
3337
+ return res;
3338
+ }
3339
+ function createPathGetter(ctx, path) {
3340
+ const segments = path.split(".");
3341
+ return () => {
3342
+ let cur = ctx;
3343
+ for (let i = 0; i < segments.length && cur; i++) {
3344
+ cur = cur[segments[i]];
3345
+ }
3346
+ return cur;
3347
+ };
3348
+ }
3349
+
3350
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3173
3351
  const isTeleport = (type) => type.__isTeleport;
3174
3352
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3175
3353
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -3541,8 +3719,8 @@ var VueRuntimeDOM = (function (exports) {
3541
3719
  return targetAnchor;
3542
3720
  }
3543
3721
 
3544
- const leaveCbKey = Symbol("_leaveCb");
3545
- const enterCbKey$1 = Symbol("_enterCb");
3722
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
3723
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
3546
3724
  function useTransitionState() {
3547
3725
  const state = {
3548
3726
  isMounted: false,
@@ -3580,7 +3758,7 @@ var VueRuntimeDOM = (function (exports) {
3580
3758
  onAppearCancelled: TransitionHookValidator
3581
3759
  };
3582
3760
  const recursiveGetSubtree = (instance) => {
3583
- const subTree = instance.type.__vapor ? instance.block : instance.subTree;
3761
+ const subTree = isVaporComponent(instance.type) ? instance.block : instance.subTree;
3584
3762
  return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
3585
3763
  };
3586
3764
  const BaseTransitionImpl = {
@@ -3887,7 +4065,7 @@ var VueRuntimeDOM = (function (exports) {
3887
4065
  }
3888
4066
  function setTransitionHooks(vnode, hooks) {
3889
4067
  if (vnode.shapeFlag & 6 && vnode.component) {
3890
- if (vnode.type.__vapor) {
4068
+ if (isVaporComponent(vnode.type)) {
3891
4069
  getVaporInterface(vnode.component, vnode).setTransitionHooks(
3892
4070
  vnode.component,
3893
4071
  hooks
@@ -5149,7 +5327,9 @@ Server rendered element contains fewer child nodes than client vdom.`
5149
5327
  }
5150
5328
  function pruneCache(filter) {
5151
5329
  cache.forEach((vnode, key) => {
5152
- const name = getComponentName(vnode.type);
5330
+ const name = getComponentName(
5331
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5332
+ );
5153
5333
  if (name && !filter(name)) {
5154
5334
  pruneCacheEntry(key);
5155
5335
  }
@@ -5451,7 +5631,7 @@ Server rendered element contains fewer child nodes than client vdom.`
5451
5631
  function resolveComponent(name, maybeSelfReference) {
5452
5632
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
5453
5633
  }
5454
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
5634
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
5455
5635
  function resolveDynamicComponent(component) {
5456
5636
  if (isString(component)) {
5457
5637
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -5642,14 +5822,14 @@ If this is a native custom element, make sure to exclude it from component resol
5642
5822
  }
5643
5823
  }
5644
5824
 
5645
- function toHandlers(obj, preserveCaseIfNecessary) {
5825
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
5646
5826
  const ret = {};
5647
5827
  if (!isObject(obj)) {
5648
5828
  warn$1(`v-on with no argument expects an object value.`);
5649
5829
  return ret;
5650
5830
  }
5651
5831
  for (const key in obj) {
5652
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
5832
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
5653
5833
  }
5654
5834
  return ret;
5655
5835
  }
@@ -6618,174 +6798,6 @@ If you want to remount the same app, move your app creation logic into a factory
6618
6798
  }
6619
6799
  let currentApp = null;
6620
6800
 
6621
- function provide(key, value) {
6622
- {
6623
- if (!currentInstance || currentInstance.isMounted) {
6624
- warn$1(`provide() can only be used inside setup().`);
6625
- }
6626
- }
6627
- if (currentInstance) {
6628
- let provides = currentInstance.provides;
6629
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
6630
- if (parentProvides === provides) {
6631
- provides = currentInstance.provides = Object.create(parentProvides);
6632
- }
6633
- provides[key] = value;
6634
- }
6635
- }
6636
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
6637
- const instance = getCurrentGenericInstance();
6638
- if (instance || currentApp) {
6639
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
6640
- if (provides && key in provides) {
6641
- return provides[key];
6642
- } else if (arguments.length > 1) {
6643
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
6644
- } else {
6645
- warn$1(`injection "${String(key)}" not found.`);
6646
- }
6647
- } else {
6648
- warn$1(`inject() can only be used inside setup() or functional components.`);
6649
- }
6650
- }
6651
- function hasInjectionContext() {
6652
- return !!(getCurrentGenericInstance() || currentApp);
6653
- }
6654
-
6655
- const ssrContextKey = Symbol.for("v-scx");
6656
- const useSSRContext = () => {
6657
- {
6658
- warn$1(`useSSRContext() is not supported in the global build.`);
6659
- }
6660
- };
6661
-
6662
- function watchEffect(effect, options) {
6663
- return doWatch(effect, null, options);
6664
- }
6665
- function watchPostEffect(effect, options) {
6666
- return doWatch(
6667
- effect,
6668
- null,
6669
- extend({}, options, { flush: "post" })
6670
- );
6671
- }
6672
- function watchSyncEffect(effect, options) {
6673
- return doWatch(
6674
- effect,
6675
- null,
6676
- extend({}, options, { flush: "sync" })
6677
- );
6678
- }
6679
- function watch(source, cb, options) {
6680
- if (!isFunction(cb)) {
6681
- warn$1(
6682
- `\`watch(fn, options?)\` signature has been moved to a separate API. Use \`watchEffect(fn, options?)\` instead. \`watch\` now only supports \`watch(source, cb, options?) signature.`
6683
- );
6684
- }
6685
- return doWatch(source, cb, options);
6686
- }
6687
- class RenderWatcherEffect extends WatcherEffect {
6688
- constructor(instance, source, cb, options, flush) {
6689
- super(source, cb, options);
6690
- this.flush = flush;
6691
- const job = () => {
6692
- if (this.dirty) {
6693
- this.run();
6694
- }
6695
- };
6696
- if (cb) {
6697
- this.flags |= 128;
6698
- job.flags |= 2;
6699
- }
6700
- if (instance) {
6701
- job.i = instance;
6702
- }
6703
- this.job = job;
6704
- }
6705
- notify() {
6706
- const flags = this.flags;
6707
- if (!(flags & 256)) {
6708
- const flush = this.flush;
6709
- const job = this.job;
6710
- if (flush === "post") {
6711
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
6712
- } else if (flush === "pre") {
6713
- queueJob(job, job.i ? job.i.uid : void 0, true);
6714
- } else {
6715
- job();
6716
- }
6717
- }
6718
- }
6719
- }
6720
- function doWatch(source, cb, options = EMPTY_OBJ) {
6721
- const { immediate, deep, flush = "pre", once } = options;
6722
- if (!cb) {
6723
- if (immediate !== void 0) {
6724
- warn$1(
6725
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
6726
- );
6727
- }
6728
- if (deep !== void 0) {
6729
- warn$1(
6730
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
6731
- );
6732
- }
6733
- if (once !== void 0) {
6734
- warn$1(
6735
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
6736
- );
6737
- }
6738
- }
6739
- const baseWatchOptions = extend({}, options);
6740
- baseWatchOptions.onWarn = warn$1;
6741
- const instance = currentInstance;
6742
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
6743
- const effect = new RenderWatcherEffect(
6744
- instance,
6745
- source,
6746
- cb,
6747
- baseWatchOptions,
6748
- flush
6749
- );
6750
- if (cb) {
6751
- effect.run(true);
6752
- } else if (flush === "post") {
6753
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
6754
- } else {
6755
- effect.run(true);
6756
- }
6757
- const stop = effect.stop.bind(effect);
6758
- stop.pause = effect.pause.bind(effect);
6759
- stop.resume = effect.resume.bind(effect);
6760
- stop.stop = stop;
6761
- return stop;
6762
- }
6763
- function instanceWatch(source, value, options) {
6764
- const publicThis = this.proxy;
6765
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
6766
- let cb;
6767
- if (isFunction(value)) {
6768
- cb = value;
6769
- } else {
6770
- cb = value.handler;
6771
- options = value;
6772
- }
6773
- const prev = setCurrentInstance(this);
6774
- const res = doWatch(getter, cb.bind(publicThis), options);
6775
- setCurrentInstance(...prev);
6776
- return res;
6777
- }
6778
- function createPathGetter(ctx, path) {
6779
- const segments = path.split(".");
6780
- return () => {
6781
- let cur = ctx;
6782
- for (let i = 0; i < segments.length && cur; i++) {
6783
- cur = cur[segments[i]];
6784
- }
6785
- return cur;
6786
- };
6787
- }
6788
-
6789
6801
  function useModel(props, name, options = EMPTY_OBJ) {
6790
6802
  const i = getCurrentGenericInstance();
6791
6803
  if (!i) {
@@ -7870,6 +7882,14 @@ If you want to remount the same app, move your app creation logic into a factory
7870
7882
  return supported;
7871
7883
  }
7872
7884
 
7885
+ const MoveType = {
7886
+ "ENTER": 0,
7887
+ "0": "ENTER",
7888
+ "LEAVE": 1,
7889
+ "1": "LEAVE",
7890
+ "REORDER": 2,
7891
+ "2": "REORDER"
7892
+ };
7873
7893
  const queuePostRenderEffect = queueEffectWithSuspense ;
7874
7894
  function createRenderer(options) {
7875
7895
  return baseCreateRenderer(options);
@@ -7939,7 +7959,13 @@ If you want to remount the same app, move your app creation logic into a factory
7939
7959
  );
7940
7960
  break;
7941
7961
  case VaporSlot:
7942
- getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor);
7962
+ getVaporInterface(parentComponent, n2).slot(
7963
+ n1,
7964
+ n2,
7965
+ container,
7966
+ anchor,
7967
+ parentComponent
7968
+ );
7943
7969
  break;
7944
7970
  default:
7945
7971
  if (shapeFlag & 1) {
@@ -8012,7 +8038,15 @@ If you want to remount the same app, move your app creation logic into a factory
8012
8038
  } else {
8013
8039
  const el = n2.el = n1.el;
8014
8040
  if (n2.children !== n1.children) {
8015
- hostSetText(el, n2.children);
8041
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
8042
+ const childNodes = container.childNodes;
8043
+ const newChild = hostCreateText(n2.children);
8044
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
8045
+ hostInsert(newChild, container, oldChild);
8046
+ hostRemove(oldChild);
8047
+ } else {
8048
+ hostSetText(el, n2.children);
8049
+ }
8016
8050
  }
8017
8051
  }
8018
8052
  };
@@ -8398,7 +8432,7 @@ If you want to remount the same app, move your app creation logic into a factory
8398
8432
  } else {
8399
8433
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
8400
8434
  // of renderSlot() with no valid children
8401
- n1.dynamicChildren) {
8435
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
8402
8436
  patchBlockChildren(
8403
8437
  n1.dynamicChildren,
8404
8438
  dynamicChildren,
@@ -9086,8 +9120,8 @@ If you want to remount the same app, move your app creation logic into a factory
9086
9120
  const nextChild = c2[nextIndex];
9087
9121
  const anchorVNode = c2[nextIndex + 1];
9088
9122
  const anchor = nextIndex + 1 < l2 ? (
9089
- // #13559, fallback to el placeholder for unresolved async component
9090
- anchorVNode.el || anchorVNode.placeholder
9123
+ // #13559, #14173 fallback to el placeholder for unresolved async component
9124
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
9091
9125
  ) : parentAnchor;
9092
9126
  if (newIndexToOldIndexMap[i] === 0) {
9093
9127
  patch(
@@ -9120,7 +9154,7 @@ If you want to remount the same app, move your app creation logic into a factory
9120
9154
  const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
9121
9155
  const { el, type, transition, children, shapeFlag } = vnode;
9122
9156
  if (shapeFlag & 6) {
9123
- if (type.__vapor) {
9157
+ if (isVaporComponent(type)) {
9124
9158
  getVaporInterface(parentComponent, vnode).move(vnode, container, anchor);
9125
9159
  } else {
9126
9160
  move(
@@ -9230,7 +9264,7 @@ If you want to remount the same app, move your app creation logic into a factory
9230
9264
  parentComponent.renderCache[cacheIndex] = void 0;
9231
9265
  }
9232
9266
  if (shapeFlag & 256) {
9233
- if (vnode.type.__vapor) {
9267
+ if (isVaporComponent(vnode.type)) {
9234
9268
  getVaporInterface(parentComponent, vnode).deactivate(
9235
9269
  vnode,
9236
9270
  parentComponent.ctx.getStorageContainer()
@@ -9247,7 +9281,7 @@ If you want to remount the same app, move your app creation logic into a factory
9247
9281
  invokeVNodeHook(vnodeHook, parentComponent, vnode);
9248
9282
  }
9249
9283
  if (shapeFlag & 6) {
9250
- if (type.__vapor) {
9284
+ if (isVaporComponent(type)) {
9251
9285
  getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
9252
9286
  return;
9253
9287
  } else {
@@ -9379,7 +9413,7 @@ If you want to remount the same app, move your app creation logic into a factory
9379
9413
  };
9380
9414
  const getNextHostNode = (vnode) => {
9381
9415
  if (vnode.shapeFlag & 6) {
9382
- if (vnode.type.__vapor) {
9416
+ if (isVaporComponent(vnode.type)) {
9383
9417
  return hostNextSibling(vnode.anchor);
9384
9418
  }
9385
9419
  return getNextHostNode(vnode.component.subTree);
@@ -9392,9 +9426,11 @@ If you want to remount the same app, move your app creation logic into a factory
9392
9426
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
9393
9427
  };
9394
9428
  const render = (vnode, container, namespace) => {
9429
+ let instance;
9395
9430
  if (vnode == null) {
9396
9431
  if (container._vnode) {
9397
9432
  unmount(container._vnode, null, null, true);
9433
+ instance = container._vnode.component;
9398
9434
  }
9399
9435
  } else {
9400
9436
  patch(
@@ -9408,7 +9444,7 @@ If you want to remount the same app, move your app creation logic into a factory
9408
9444
  );
9409
9445
  }
9410
9446
  container._vnode = vnode;
9411
- flushOnAppMount();
9447
+ flushOnAppMount(instance);
9412
9448
  };
9413
9449
  const internals = {
9414
9450
  p: patch,
@@ -9498,9 +9534,13 @@ If you want to remount the same app, move your app creation logic into a factory
9498
9534
  if (!shallow && c2.patchFlag !== -2)
9499
9535
  traverseStaticChildren(c1, c2);
9500
9536
  }
9501
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
9502
- c2.patchFlag !== -1) {
9503
- c2.el = c1.el;
9537
+ if (c2.type === Text) {
9538
+ if (c2.patchFlag !== -1) {
9539
+ c2.el = c1.el;
9540
+ } else {
9541
+ c2.__elIndex = i + // take fragment start anchor into account
9542
+ (n1.type === Fragment ? 1 : 0);
9543
+ }
9504
9544
  }
9505
9545
  if (c2.type === Comment && !c2.el) {
9506
9546
  c2.el = c1.el;
@@ -9536,16 +9576,24 @@ If you want to remount the same app, move your app creation logic into a factory
9536
9576
  insert();
9537
9577
  }
9538
9578
  }
9539
- function performTransitionLeave(el, transition, remove, isElement = true) {
9579
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
9540
9580
  const performRemove = () => {
9541
9581
  remove();
9542
9582
  if (transition && !transition.persisted && transition.afterLeave) {
9543
9583
  transition.afterLeave();
9544
9584
  }
9545
9585
  };
9546
- if (isElement && transition && !transition.persisted) {
9586
+ if (force || isElement && transition && !transition.persisted) {
9547
9587
  const { leave, delayLeave } = transition;
9548
- const performLeave = () => leave(el, performRemove);
9588
+ const performLeave = () => {
9589
+ if (el._isLeaving && force) {
9590
+ el[leaveCbKey](
9591
+ true
9592
+ /* cancelled */
9593
+ );
9594
+ }
9595
+ leave(el, performRemove);
9596
+ };
9549
9597
  if (delayLeave) {
9550
9598
  delayLeave(el, performRemove, performLeave);
9551
9599
  } else {
@@ -9569,6 +9617,12 @@ app.use(vaporInteropPlugin)
9569
9617
  }
9570
9618
  return res;
9571
9619
  }
9620
+ function isVaporComponent(type) {
9621
+ if (isHmrUpdating && hmrDirtyComponentsMode.has(type)) {
9622
+ return hmrDirtyComponentsMode.get(type);
9623
+ }
9624
+ return type.__vapor;
9625
+ }
9572
9626
  function getInheritedScopeIds(vnode, parentComponent) {
9573
9627
  const inheritedScopeIds = [];
9574
9628
  let currentParent = parentComponent;
@@ -9595,6 +9649,16 @@ app.use(vaporInteropPlugin)
9595
9649
  }
9596
9650
  return inheritedScopeIds;
9597
9651
  }
9652
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
9653
+ if (anchorVnode.placeholder) {
9654
+ return anchorVnode.placeholder;
9655
+ }
9656
+ const instance = anchorVnode.component;
9657
+ if (instance) {
9658
+ return resolveAsyncComponentPlaceholder(instance.subTree);
9659
+ }
9660
+ return null;
9661
+ }
9598
9662
 
9599
9663
  const isSuspense = (type) => type.__isSuspense;
9600
9664
  let suspenseId = 0;
@@ -10177,11 +10241,11 @@ app.use(vaporInteropPlugin)
10177
10241
  return suspensible != null && suspensible !== false;
10178
10242
  }
10179
10243
 
10180
- const Fragment = Symbol.for("v-fgt");
10181
- const Text = Symbol.for("v-txt");
10182
- const Comment = Symbol.for("v-cmt");
10183
- const Static = Symbol.for("v-stc");
10184
- const VaporSlot = Symbol.for("v-vps");
10244
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
10245
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
10246
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
10247
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
10248
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
10185
10249
  const blockStack = [];
10186
10250
  let currentBlock = null;
10187
10251
  function openBlock(disableTracking = false) {
@@ -11223,7 +11287,7 @@ Component that was made reactive: `,
11223
11287
  return true;
11224
11288
  }
11225
11289
 
11226
- const version = "3.6.0-alpha.6";
11290
+ const version = "3.6.0-beta.1";
11227
11291
  const warn = warn$1 ;
11228
11292
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11229
11293
  const devtools = devtools$1 ;
@@ -11316,7 +11380,7 @@ Component that was made reactive: `,
11316
11380
 
11317
11381
  const TRANSITION = "transition";
11318
11382
  const ANIMATION = "animation";
11319
- const vtcKey = Symbol("_vtc");
11383
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
11320
11384
  const DOMTransitionPropsValidators = {
11321
11385
  name: String,
11322
11386
  type: String,
@@ -11609,8 +11673,8 @@ Component that was made reactive: `,
11609
11673
  }
11610
11674
  }
11611
11675
 
11612
- const vShowOriginalDisplay = Symbol("_vod");
11613
- const vShowHidden = Symbol("_vsh");
11676
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
11677
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
11614
11678
  const vShow = {
11615
11679
  // used for prop mismatch check during hydration
11616
11680
  name: "show",
@@ -11652,7 +11716,7 @@ Component that was made reactive: `,
11652
11716
  el[vShowHidden] = !value;
11653
11717
  }
11654
11718
 
11655
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
11719
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
11656
11720
  function useCssVars(getter) {
11657
11721
  const instance = getCurrentInstance();
11658
11722
  const getVars = () => getter(instance.proxy);
@@ -11913,7 +11977,7 @@ Component that was made reactive: `,
11913
11977
  function removeEventListener(el, event, handler, options) {
11914
11978
  el.removeEventListener(event, handler, options);
11915
11979
  }
11916
- const veiKey = Symbol("_vei");
11980
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
11917
11981
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
11918
11982
  const invokers = el[veiKey] || (el[veiKey] = {});
11919
11983
  const existingInvoker = invokers[rawName];
@@ -12563,8 +12627,8 @@ Expected function or array of functions, received type ${typeof value}.`
12563
12627
 
12564
12628
  const positionMap = /* @__PURE__ */ new WeakMap();
12565
12629
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12566
- const moveCbKey = Symbol("_moveCb");
12567
- const enterCbKey = Symbol("_enterCb");
12630
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
12631
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
12568
12632
  const decorate = (t) => {
12569
12633
  delete t.props.mode;
12570
12634
  return t;
@@ -12727,7 +12791,7 @@ Expected function or array of functions, received type ${typeof value}.`
12727
12791
  target.dispatchEvent(new Event("input"));
12728
12792
  }
12729
12793
  }
12730
- const assignKey = Symbol("_assign");
12794
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
12731
12795
  const vModelText = {
12732
12796
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
12733
12797
  el[assignKey] = getModelAssigner(vnode);
@@ -13172,6 +13236,7 @@ Expected function or array of functions, received type ${typeof value}.`
13172
13236
  exports.ErrorTypeStrings = ErrorTypeStrings;
13173
13237
  exports.Fragment = Fragment;
13174
13238
  exports.KeepAlive = KeepAlive;
13239
+ exports.MoveType = MoveType;
13175
13240
  exports.ReactiveEffect = ReactiveEffect;
13176
13241
  exports.Static = Static;
13177
13242
  exports.Suspense = Suspense;