@vue/runtime-dom 3.6.0-alpha.7 → 3.6.0-beta.2

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.7
2
+ * @vue/runtime-dom v3.6.0-beta.2
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -751,13 +751,13 @@ class Dep {
751
751
  }
752
752
  }
753
753
  const targetMap = /* @__PURE__ */ new WeakMap();
754
- const ITERATE_KEY = Symbol(
754
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
755
755
  "Object iterate"
756
756
  );
757
- const MAP_KEY_ITERATE_KEY = Symbol(
757
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
758
758
  "Map keys iterate"
759
759
  );
760
- const ARRAY_ITERATE_KEY = Symbol(
760
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
761
761
  "Array iterate"
762
762
  );
763
763
  function track(target, type, key) {
@@ -2378,7 +2378,6 @@ function warn$1(msg, ...args) {
2378
2378
  instance,
2379
2379
  11,
2380
2380
  [
2381
- // eslint-disable-next-line no-restricted-syntax
2382
2381
  msg + args.map((a) => {
2383
2382
  var _a, _b;
2384
2383
  return (_b = (_a = a.toString) == null ? void 0 : _a.call(a)) != null ? _b : JSON.stringify(a);
@@ -2758,10 +2757,10 @@ function flushPostFlushCbs(seen) {
2758
2757
  }
2759
2758
  }
2760
2759
  let isFlushing = false;
2761
- function flushOnAppMount() {
2760
+ function flushOnAppMount(instance) {
2762
2761
  if (!isFlushing) {
2763
2762
  isFlushing = true;
2764
- flushPreFlushCbs();
2763
+ flushPreFlushCbs(instance);
2765
2764
  flushPostFlushCbs();
2766
2765
  isFlushing = false;
2767
2766
  }
@@ -3003,7 +3002,6 @@ function setDevtoolsHook$1(hook, target) {
3003
3002
  // (#4815)
3004
3003
  typeof window !== "undefined" && // some envs mock window but not fully
3005
3004
  window.HTMLElement && // also exclude jsdom
3006
- // eslint-disable-next-line no-restricted-syntax
3007
3005
  !((_b = (_a = window.navigator) == null ? void 0 : _a.userAgent) == null ? void 0 : _b.includes("jsdom"))
3008
3006
  ) {
3009
3007
  const replay = target.__VUE_DEVTOOLS_HOOK_REPLAY__ = target.__VUE_DEVTOOLS_HOOK_REPLAY__ || [];
@@ -3176,7 +3174,203 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
3176
3174
  }
3177
3175
  }
3178
3176
 
3179
- const TeleportEndKey = Symbol("_vte");
3177
+ function provide(key, value) {
3178
+ {
3179
+ if (!currentInstance || currentInstance.isMounted && !isHmrUpdating) {
3180
+ warn$1(`provide() can only be used inside setup().`);
3181
+ }
3182
+ }
3183
+ if (currentInstance) {
3184
+ let provides = currentInstance.provides;
3185
+ const parentProvides = currentInstance.parent && currentInstance.parent.provides;
3186
+ if (parentProvides === provides) {
3187
+ provides = currentInstance.provides = Object.create(parentProvides);
3188
+ }
3189
+ provides[key] = value;
3190
+ }
3191
+ }
3192
+ function inject(key, defaultValue, treatDefaultAsFactory = false) {
3193
+ const instance = getCurrentGenericInstance();
3194
+ if (instance || currentApp) {
3195
+ let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
3196
+ if (provides && key in provides) {
3197
+ return provides[key];
3198
+ } else if (arguments.length > 1) {
3199
+ return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
3200
+ } else {
3201
+ warn$1(`injection "${String(key)}" not found.`);
3202
+ }
3203
+ } else {
3204
+ warn$1(`inject() can only be used inside setup() or functional components.`);
3205
+ }
3206
+ }
3207
+ function hasInjectionContext() {
3208
+ return !!(getCurrentGenericInstance() || currentApp);
3209
+ }
3210
+
3211
+ const ssrContextKey = /* @__PURE__ */ Symbol.for("v-scx");
3212
+ const useSSRContext = () => {
3213
+ {
3214
+ const ctx = inject(ssrContextKey);
3215
+ if (!ctx) {
3216
+ warn$1(
3217
+ `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
3218
+ );
3219
+ }
3220
+ return ctx;
3221
+ }
3222
+ };
3223
+
3224
+ function watchEffect(effect, options) {
3225
+ return doWatch(effect, null, options);
3226
+ }
3227
+ function watchPostEffect(effect, options) {
3228
+ return doWatch(
3229
+ effect,
3230
+ null,
3231
+ extend({}, options, { flush: "post" })
3232
+ );
3233
+ }
3234
+ function watchSyncEffect(effect, options) {
3235
+ return doWatch(
3236
+ effect,
3237
+ null,
3238
+ extend({}, options, { flush: "sync" })
3239
+ );
3240
+ }
3241
+ function watch(source, cb, options) {
3242
+ if (!isFunction(cb)) {
3243
+ warn$1(
3244
+ `\`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.`
3245
+ );
3246
+ }
3247
+ return doWatch(source, cb, options);
3248
+ }
3249
+ class RenderWatcherEffect extends WatcherEffect {
3250
+ constructor(instance, source, cb, options, flush) {
3251
+ super(source, cb, options);
3252
+ this.flush = flush;
3253
+ const job = () => {
3254
+ if (this.dirty) {
3255
+ this.run();
3256
+ }
3257
+ };
3258
+ if (cb) {
3259
+ this.flags |= 128;
3260
+ job.flags |= 2;
3261
+ }
3262
+ if (instance) {
3263
+ job.i = instance;
3264
+ }
3265
+ this.job = job;
3266
+ }
3267
+ notify() {
3268
+ const flags = this.flags;
3269
+ if (!(flags & 256)) {
3270
+ const flush = this.flush;
3271
+ const job = this.job;
3272
+ if (flush === "post") {
3273
+ queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
3274
+ } else if (flush === "pre") {
3275
+ queueJob(job, job.i ? job.i.uid : void 0, true);
3276
+ } else {
3277
+ job();
3278
+ }
3279
+ }
3280
+ }
3281
+ }
3282
+ function doWatch(source, cb, options = EMPTY_OBJ) {
3283
+ const { immediate, deep, flush = "pre", once } = options;
3284
+ if (!cb) {
3285
+ if (immediate !== void 0) {
3286
+ warn$1(
3287
+ `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
3288
+ );
3289
+ }
3290
+ if (deep !== void 0) {
3291
+ warn$1(
3292
+ `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
3293
+ );
3294
+ }
3295
+ if (once !== void 0) {
3296
+ warn$1(
3297
+ `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
3298
+ );
3299
+ }
3300
+ }
3301
+ const baseWatchOptions = extend({}, options);
3302
+ baseWatchOptions.onWarn = warn$1;
3303
+ const runsImmediately = cb && immediate || !cb && flush !== "post";
3304
+ let ssrCleanup;
3305
+ if (isInSSRComponentSetup) {
3306
+ if (flush === "sync") {
3307
+ const ctx = useSSRContext();
3308
+ ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
3309
+ } else if (!runsImmediately) {
3310
+ const watchStopHandle = () => {
3311
+ };
3312
+ watchStopHandle.stop = NOOP;
3313
+ watchStopHandle.resume = NOOP;
3314
+ watchStopHandle.pause = NOOP;
3315
+ return watchStopHandle;
3316
+ }
3317
+ }
3318
+ const instance = currentInstance;
3319
+ baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
3320
+ const effect = new RenderWatcherEffect(
3321
+ instance,
3322
+ source,
3323
+ cb,
3324
+ baseWatchOptions,
3325
+ flush
3326
+ );
3327
+ if (cb) {
3328
+ effect.run(true);
3329
+ } else if (flush === "post") {
3330
+ queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
3331
+ } else {
3332
+ effect.run(true);
3333
+ }
3334
+ const stop = effect.stop.bind(effect);
3335
+ stop.pause = effect.pause.bind(effect);
3336
+ stop.resume = effect.resume.bind(effect);
3337
+ stop.stop = stop;
3338
+ if (isInSSRComponentSetup) {
3339
+ if (ssrCleanup) {
3340
+ ssrCleanup.push(stop);
3341
+ } else if (runsImmediately) {
3342
+ stop();
3343
+ }
3344
+ }
3345
+ return stop;
3346
+ }
3347
+ function instanceWatch(source, value, options) {
3348
+ const publicThis = this.proxy;
3349
+ const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
3350
+ let cb;
3351
+ if (isFunction(value)) {
3352
+ cb = value;
3353
+ } else {
3354
+ cb = value.handler;
3355
+ options = value;
3356
+ }
3357
+ const prev = setCurrentInstance(this);
3358
+ const res = doWatch(getter, cb.bind(publicThis), options);
3359
+ setCurrentInstance(...prev);
3360
+ return res;
3361
+ }
3362
+ function createPathGetter(ctx, path) {
3363
+ const segments = path.split(".");
3364
+ return () => {
3365
+ let cur = ctx;
3366
+ for (let i = 0; i < segments.length && cur; i++) {
3367
+ cur = cur[segments[i]];
3368
+ }
3369
+ return cur;
3370
+ };
3371
+ }
3372
+
3373
+ const TeleportEndKey = /* @__PURE__ */ Symbol("_vte");
3180
3374
  const isTeleport = (type) => type.__isTeleport;
3181
3375
  const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
3182
3376
  const isTeleportDeferred = (props) => props && (props.defer || props.defer === "");
@@ -3548,8 +3742,8 @@ function prepareAnchor(target, vnode, createText, insert) {
3548
3742
  return targetAnchor;
3549
3743
  }
3550
3744
 
3551
- const leaveCbKey = Symbol("_leaveCb");
3552
- const enterCbKey$1 = Symbol("_enterCb");
3745
+ const leaveCbKey = /* @__PURE__ */ Symbol("_leaveCb");
3746
+ const enterCbKey$1 = /* @__PURE__ */ Symbol("_enterCb");
3553
3747
  function useTransitionState() {
3554
3748
  const state = {
3555
3749
  isMounted: false,
@@ -4802,9 +4996,17 @@ function isMismatchAllowed(el, allowedType) {
4802
4996
  }
4803
4997
  }
4804
4998
 
4805
- const requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
4806
- const cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
4999
+ let requestIdleCallback;
5000
+ let cancelIdleCallback;
5001
+ function ensureIdleCallbacks() {
5002
+ if (!requestIdleCallback) {
5003
+ const g = getGlobalThis();
5004
+ requestIdleCallback = g.requestIdleCallback || ((cb) => setTimeout(cb, 1));
5005
+ cancelIdleCallback = g.cancelIdleCallback || ((id) => clearTimeout(id));
5006
+ }
5007
+ }
4807
5008
  const hydrateOnIdle = (timeout = 1e4) => (hydrate) => {
5009
+ ensureIdleCallbacks();
4808
5010
  const id = requestIdleCallback(hydrate, { timeout });
4809
5011
  return () => cancelIdleCallback(id);
4810
5012
  };
@@ -5162,7 +5364,9 @@ const KeepAliveImpl = {
5162
5364
  }
5163
5365
  function pruneCache(filter) {
5164
5366
  cache.forEach((vnode, key) => {
5165
- const name = getComponentName(vnode.type);
5367
+ const name = getComponentName(
5368
+ isAsyncWrapper(vnode) ? vnode.type.__asyncResolved || {} : vnode.type
5369
+ );
5166
5370
  if (name && !filter(name)) {
5167
5371
  pruneCacheEntry(key);
5168
5372
  }
@@ -5464,7 +5668,7 @@ const DIRECTIVES = "directives";
5464
5668
  function resolveComponent(name, maybeSelfReference) {
5465
5669
  return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
5466
5670
  }
5467
- const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
5671
+ const NULL_DYNAMIC_COMPONENT = /* @__PURE__ */ Symbol.for("v-ndc");
5468
5672
  function resolveDynamicComponent(component) {
5469
5673
  if (isString(component)) {
5470
5674
  return resolveAsset(COMPONENTS, component, false) || component;
@@ -5655,14 +5859,14 @@ function ensureVaporSlotFallback(vnodes, fallback) {
5655
5859
  }
5656
5860
  }
5657
5861
 
5658
- function toHandlers(obj, preserveCaseIfNecessary) {
5862
+ function toHandlers(obj, preserveCaseIfNecessary, needWrap) {
5659
5863
  const ret = {};
5660
5864
  if (!isObject(obj)) {
5661
5865
  warn$1(`v-on with no argument expects an object value.`);
5662
5866
  return ret;
5663
5867
  }
5664
5868
  for (const key in obj) {
5665
- ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = obj[key];
5869
+ ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey(key)] = needWrap ? () => obj[key] : obj[key];
5666
5870
  }
5667
5871
  return ret;
5668
5872
  }
@@ -6634,202 +6838,6 @@ If you want to remount the same app, move your app creation logic into a factory
6634
6838
  }
6635
6839
  let currentApp = null;
6636
6840
 
6637
- function provide(key, value) {
6638
- {
6639
- if (!currentInstance || currentInstance.isMounted) {
6640
- warn$1(`provide() can only be used inside setup().`);
6641
- }
6642
- }
6643
- if (currentInstance) {
6644
- let provides = currentInstance.provides;
6645
- const parentProvides = currentInstance.parent && currentInstance.parent.provides;
6646
- if (parentProvides === provides) {
6647
- provides = currentInstance.provides = Object.create(parentProvides);
6648
- }
6649
- provides[key] = value;
6650
- }
6651
- }
6652
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
6653
- const instance = getCurrentGenericInstance();
6654
- if (instance || currentApp) {
6655
- let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.appContext && instance.appContext.provides : instance.parent.provides : void 0;
6656
- if (provides && key in provides) {
6657
- return provides[key];
6658
- } else if (arguments.length > 1) {
6659
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
6660
- } else {
6661
- warn$1(`injection "${String(key)}" not found.`);
6662
- }
6663
- } else {
6664
- warn$1(`inject() can only be used inside setup() or functional components.`);
6665
- }
6666
- }
6667
- function hasInjectionContext() {
6668
- return !!(getCurrentGenericInstance() || currentApp);
6669
- }
6670
-
6671
- const ssrContextKey = Symbol.for("v-scx");
6672
- const useSSRContext = () => {
6673
- {
6674
- const ctx = inject(ssrContextKey);
6675
- if (!ctx) {
6676
- warn$1(
6677
- `Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`
6678
- );
6679
- }
6680
- return ctx;
6681
- }
6682
- };
6683
-
6684
- function watchEffect(effect, options) {
6685
- return doWatch(effect, null, options);
6686
- }
6687
- function watchPostEffect(effect, options) {
6688
- return doWatch(
6689
- effect,
6690
- null,
6691
- extend({}, options, { flush: "post" })
6692
- );
6693
- }
6694
- function watchSyncEffect(effect, options) {
6695
- return doWatch(
6696
- effect,
6697
- null,
6698
- extend({}, options, { flush: "sync" })
6699
- );
6700
- }
6701
- function watch(source, cb, options) {
6702
- if (!isFunction(cb)) {
6703
- warn$1(
6704
- `\`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.`
6705
- );
6706
- }
6707
- return doWatch(source, cb, options);
6708
- }
6709
- class RenderWatcherEffect extends WatcherEffect {
6710
- constructor(instance, source, cb, options, flush) {
6711
- super(source, cb, options);
6712
- this.flush = flush;
6713
- const job = () => {
6714
- if (this.dirty) {
6715
- this.run();
6716
- }
6717
- };
6718
- if (cb) {
6719
- this.flags |= 128;
6720
- job.flags |= 2;
6721
- }
6722
- if (instance) {
6723
- job.i = instance;
6724
- }
6725
- this.job = job;
6726
- }
6727
- notify() {
6728
- const flags = this.flags;
6729
- if (!(flags & 256)) {
6730
- const flush = this.flush;
6731
- const job = this.job;
6732
- if (flush === "post") {
6733
- queuePostRenderEffect(job, void 0, job.i ? job.i.suspense : null);
6734
- } else if (flush === "pre") {
6735
- queueJob(job, job.i ? job.i.uid : void 0, true);
6736
- } else {
6737
- job();
6738
- }
6739
- }
6740
- }
6741
- }
6742
- function doWatch(source, cb, options = EMPTY_OBJ) {
6743
- const { immediate, deep, flush = "pre", once } = options;
6744
- if (!cb) {
6745
- if (immediate !== void 0) {
6746
- warn$1(
6747
- `watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`
6748
- );
6749
- }
6750
- if (deep !== void 0) {
6751
- warn$1(
6752
- `watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`
6753
- );
6754
- }
6755
- if (once !== void 0) {
6756
- warn$1(
6757
- `watch() "once" option is only respected when using the watch(source, callback, options?) signature.`
6758
- );
6759
- }
6760
- }
6761
- const baseWatchOptions = extend({}, options);
6762
- baseWatchOptions.onWarn = warn$1;
6763
- const runsImmediately = cb && immediate || !cb && flush !== "post";
6764
- let ssrCleanup;
6765
- if (isInSSRComponentSetup) {
6766
- if (flush === "sync") {
6767
- const ctx = useSSRContext();
6768
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
6769
- } else if (!runsImmediately) {
6770
- const watchStopHandle = () => {
6771
- };
6772
- watchStopHandle.stop = NOOP;
6773
- watchStopHandle.resume = NOOP;
6774
- watchStopHandle.pause = NOOP;
6775
- return watchStopHandle;
6776
- }
6777
- }
6778
- const instance = currentInstance;
6779
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
6780
- const effect = new RenderWatcherEffect(
6781
- instance,
6782
- source,
6783
- cb,
6784
- baseWatchOptions,
6785
- flush
6786
- );
6787
- if (cb) {
6788
- effect.run(true);
6789
- } else if (flush === "post") {
6790
- queuePostRenderEffect(effect.job, void 0, instance && instance.suspense);
6791
- } else {
6792
- effect.run(true);
6793
- }
6794
- const stop = effect.stop.bind(effect);
6795
- stop.pause = effect.pause.bind(effect);
6796
- stop.resume = effect.resume.bind(effect);
6797
- stop.stop = stop;
6798
- if (isInSSRComponentSetup) {
6799
- if (ssrCleanup) {
6800
- ssrCleanup.push(stop);
6801
- } else if (runsImmediately) {
6802
- stop();
6803
- }
6804
- }
6805
- return stop;
6806
- }
6807
- function instanceWatch(source, value, options) {
6808
- const publicThis = this.proxy;
6809
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
6810
- let cb;
6811
- if (isFunction(value)) {
6812
- cb = value;
6813
- } else {
6814
- cb = value.handler;
6815
- options = value;
6816
- }
6817
- const prev = setCurrentInstance(this);
6818
- const res = doWatch(getter, cb.bind(publicThis), options);
6819
- setCurrentInstance(...prev);
6820
- return res;
6821
- }
6822
- function createPathGetter(ctx, path) {
6823
- const segments = path.split(".");
6824
- return () => {
6825
- let cur = ctx;
6826
- for (let i = 0; i < segments.length && cur; i++) {
6827
- cur = cur[segments[i]];
6828
- }
6829
- return cur;
6830
- };
6831
- }
6832
-
6833
6841
  function useModel(props, name, options = EMPTY_OBJ) {
6834
6842
  const i = getCurrentGenericInstance();
6835
6843
  if (!i) {
@@ -7914,6 +7922,14 @@ function isSupported() {
7914
7922
  return supported;
7915
7923
  }
7916
7924
 
7925
+ const MoveType = {
7926
+ "ENTER": 0,
7927
+ "0": "ENTER",
7928
+ "LEAVE": 1,
7929
+ "1": "LEAVE",
7930
+ "REORDER": 2,
7931
+ "2": "REORDER"
7932
+ };
7917
7933
  const queuePostRenderEffect = queueEffectWithSuspense ;
7918
7934
  function createRenderer(options) {
7919
7935
  return baseCreateRenderer(options);
@@ -8062,7 +8078,15 @@ function baseCreateRenderer(options, createHydrationFns) {
8062
8078
  } else {
8063
8079
  const el = n2.el = n1.el;
8064
8080
  if (n2.children !== n1.children) {
8065
- hostSetText(el, n2.children);
8081
+ if (isHmrUpdating && n2.patchFlag === -1 && "__elIndex" in n1) {
8082
+ const childNodes = container.childNodes;
8083
+ const newChild = hostCreateText(n2.children);
8084
+ const oldChild = childNodes[n2.__elIndex = n1.__elIndex];
8085
+ hostInsert(newChild, container, oldChild);
8086
+ hostRemove(oldChild);
8087
+ } else {
8088
+ hostSetText(el, n2.children);
8089
+ }
8066
8090
  }
8067
8091
  }
8068
8092
  };
@@ -8448,7 +8472,7 @@ function baseCreateRenderer(options, createHydrationFns) {
8448
8472
  } else {
8449
8473
  if (patchFlag > 0 && patchFlag & 64 && dynamicChildren && // #2715 the previous fragment could've been a BAILed one as a result
8450
8474
  // of renderSlot() with no valid children
8451
- n1.dynamicChildren) {
8475
+ n1.dynamicChildren && n1.dynamicChildren.length === dynamicChildren.length) {
8452
8476
  patchBlockChildren(
8453
8477
  n1.dynamicChildren,
8454
8478
  dynamicChildren,
@@ -9136,8 +9160,8 @@ function baseCreateRenderer(options, createHydrationFns) {
9136
9160
  const nextChild = c2[nextIndex];
9137
9161
  const anchorVNode = c2[nextIndex + 1];
9138
9162
  const anchor = nextIndex + 1 < l2 ? (
9139
- // #13559, fallback to el placeholder for unresolved async component
9140
- anchorVNode.el || anchorVNode.placeholder
9163
+ // #13559, #14173 fallback to el placeholder for unresolved async component
9164
+ anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode)
9141
9165
  ) : parentAnchor;
9142
9166
  if (newIndexToOldIndexMap[i] === 0) {
9143
9167
  patch(
@@ -9442,9 +9466,11 @@ function baseCreateRenderer(options, createHydrationFns) {
9442
9466
  return teleportEnd ? hostNextSibling(teleportEnd) : el;
9443
9467
  };
9444
9468
  const render = (vnode, container, namespace) => {
9469
+ let instance;
9445
9470
  if (vnode == null) {
9446
9471
  if (container._vnode) {
9447
9472
  unmount(container._vnode, null, null, true);
9473
+ instance = container._vnode.component;
9448
9474
  }
9449
9475
  } else {
9450
9476
  patch(
@@ -9458,7 +9484,7 @@ function baseCreateRenderer(options, createHydrationFns) {
9458
9484
  );
9459
9485
  }
9460
9486
  container._vnode = vnode;
9461
- flushOnAppMount();
9487
+ flushOnAppMount(instance);
9462
9488
  };
9463
9489
  const internals = {
9464
9490
  p: patch,
@@ -9548,9 +9574,13 @@ function traverseStaticChildren(n1, n2, shallow = false) {
9548
9574
  if (!shallow && c2.patchFlag !== -2)
9549
9575
  traverseStaticChildren(c1, c2);
9550
9576
  }
9551
- if (c2.type === Text && // avoid cached text nodes retaining detached dom nodes
9552
- c2.patchFlag !== -1) {
9553
- c2.el = c1.el;
9577
+ if (c2.type === Text) {
9578
+ if (c2.patchFlag !== -1) {
9579
+ c2.el = c1.el;
9580
+ } else {
9581
+ c2.__elIndex = i + // take fragment start anchor into account
9582
+ (n1.type === Fragment ? 1 : 0);
9583
+ }
9554
9584
  }
9555
9585
  if (c2.type === Comment && !c2.el) {
9556
9586
  c2.el = c1.el;
@@ -9586,16 +9616,24 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
9586
9616
  insert();
9587
9617
  }
9588
9618
  }
9589
- function performTransitionLeave(el, transition, remove, isElement = true) {
9619
+ function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
9590
9620
  const performRemove = () => {
9591
9621
  remove();
9592
9622
  if (transition && !transition.persisted && transition.afterLeave) {
9593
9623
  transition.afterLeave();
9594
9624
  }
9595
9625
  };
9596
- if (isElement && transition && !transition.persisted) {
9626
+ if (force || isElement && transition && !transition.persisted) {
9597
9627
  const { leave, delayLeave } = transition;
9598
- const performLeave = () => leave(el, performRemove);
9628
+ const performLeave = () => {
9629
+ if (el._isLeaving && force) {
9630
+ el[leaveCbKey](
9631
+ true
9632
+ /* cancelled */
9633
+ );
9634
+ }
9635
+ leave(el, performRemove);
9636
+ };
9599
9637
  if (delayLeave) {
9600
9638
  delayLeave(el, performRemove, performLeave);
9601
9639
  } else {
@@ -9651,6 +9689,16 @@ function getInheritedScopeIds(vnode, parentComponent) {
9651
9689
  }
9652
9690
  return inheritedScopeIds;
9653
9691
  }
9692
+ function resolveAsyncComponentPlaceholder(anchorVnode) {
9693
+ if (anchorVnode.placeholder) {
9694
+ return anchorVnode.placeholder;
9695
+ }
9696
+ const instance = anchorVnode.component;
9697
+ if (instance) {
9698
+ return resolveAsyncComponentPlaceholder(instance.subTree);
9699
+ }
9700
+ return null;
9701
+ }
9654
9702
 
9655
9703
  const isSuspense = (type) => type.__isSuspense;
9656
9704
  let suspenseId = 0;
@@ -10145,7 +10193,7 @@ function hydrateSuspense(node, vnode, parentComponent, parentSuspense, namespace
10145
10193
  parentSuspense,
10146
10194
  parentComponent,
10147
10195
  node.parentNode,
10148
- // eslint-disable-next-line no-restricted-globals
10196
+ // oxlint-disable-next-line no-restricted-globals
10149
10197
  document.createElement("div"),
10150
10198
  null,
10151
10199
  namespace,
@@ -10233,11 +10281,11 @@ function isVNodeSuspensible(vnode) {
10233
10281
  return suspensible != null && suspensible !== false;
10234
10282
  }
10235
10283
 
10236
- const Fragment = Symbol.for("v-fgt");
10237
- const Text = Symbol.for("v-txt");
10238
- const Comment = Symbol.for("v-cmt");
10239
- const Static = Symbol.for("v-stc");
10240
- const VaporSlot = Symbol.for("v-vps");
10284
+ const Fragment = /* @__PURE__ */ Symbol.for("v-fgt");
10285
+ const Text = /* @__PURE__ */ Symbol.for("v-txt");
10286
+ const Comment = /* @__PURE__ */ Symbol.for("v-cmt");
10287
+ const Static = /* @__PURE__ */ Symbol.for("v-stc");
10288
+ const VaporSlot = /* @__PURE__ */ Symbol.for("v-vps");
10241
10289
  const blockStack = [];
10242
10290
  let currentBlock = null;
10243
10291
  function openBlock(disableTracking = false) {
@@ -10641,7 +10689,7 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
10641
10689
  simpleSetCurrentInstance(instance);
10642
10690
  }
10643
10691
  };
10644
- const internalOptions = ["ce", "type"];
10692
+ const internalOptions = ["ce", "type", "uid"];
10645
10693
  const useInstanceOption = (key, silent = false) => {
10646
10694
  const instance = getCurrentGenericInstance();
10647
10695
  if (!instance) {
@@ -10661,7 +10709,7 @@ const useInstanceOption = (key, silent = false) => {
10661
10709
  return { hasInstance: true, value: instance[key] };
10662
10710
  };
10663
10711
 
10664
- const emptyAppContext = createAppContext();
10712
+ const emptyAppContext = /* @__PURE__ */ createAppContext();
10665
10713
  let uid = 0;
10666
10714
  function createComponentInstance(vnode, parent, suspense) {
10667
10715
  const type = vnode.type;
@@ -11293,7 +11341,7 @@ function isMemoSame(cached, memo) {
11293
11341
  return true;
11294
11342
  }
11295
11343
 
11296
- const version = "3.6.0-alpha.7";
11344
+ const version = "3.6.0-beta.2";
11297
11345
  const warn = warn$1 ;
11298
11346
  const ErrorTypeStrings = ErrorTypeStrings$1 ;
11299
11347
  const devtools = devtools$1 ;
@@ -11398,7 +11446,7 @@ const nodeOps = {
11398
11446
 
11399
11447
  const TRANSITION = "transition";
11400
11448
  const ANIMATION = "animation";
11401
- const vtcKey = Symbol("_vtc");
11449
+ const vtcKey = /* @__PURE__ */ Symbol("_vtc");
11402
11450
  const DOMTransitionPropsValidators = {
11403
11451
  name: String,
11404
11452
  type: String,
@@ -11691,8 +11739,8 @@ function patchClass(el, value, isSVG) {
11691
11739
  }
11692
11740
  }
11693
11741
 
11694
- const vShowOriginalDisplay = Symbol("_vod");
11695
- const vShowHidden = Symbol("_vsh");
11742
+ const vShowOriginalDisplay = /* @__PURE__ */ Symbol("_vod");
11743
+ const vShowHidden = /* @__PURE__ */ Symbol("_vsh");
11696
11744
  const vShow = {
11697
11745
  // used for prop mismatch check during hydration
11698
11746
  name: "show",
@@ -11741,7 +11789,7 @@ function initVShowForSSR() {
11741
11789
  };
11742
11790
  }
11743
11791
 
11744
- const CSS_VAR_TEXT = Symbol("CSS_VAR_TEXT" );
11792
+ const CSS_VAR_TEXT = /* @__PURE__ */ Symbol("CSS_VAR_TEXT" );
11745
11793
  function useCssVars(getter) {
11746
11794
  const instance = getCurrentInstance();
11747
11795
  const getVars = () => getter(instance.proxy);
@@ -12002,7 +12050,7 @@ function addEventListener(el, event, handler, options) {
12002
12050
  function removeEventListener(el, event, handler, options) {
12003
12051
  el.removeEventListener(event, handler, options);
12004
12052
  }
12005
- const veiKey = Symbol("_vei");
12053
+ const veiKey = /* @__PURE__ */ Symbol("_vei");
12006
12054
  function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
12007
12055
  const invokers = el[veiKey] || (el[veiKey] = {});
12008
12056
  const existingInvoker = invokers[rawName];
@@ -12664,8 +12712,8 @@ function useCssModule(name = "$style") {
12664
12712
 
12665
12713
  const positionMap = /* @__PURE__ */ new WeakMap();
12666
12714
  const newPositionMap = /* @__PURE__ */ new WeakMap();
12667
- const moveCbKey = Symbol("_moveCb");
12668
- const enterCbKey = Symbol("_enterCb");
12715
+ const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
12716
+ const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
12669
12717
  const decorate = (t) => {
12670
12718
  delete t.props.mode;
12671
12719
  return t;
@@ -12828,7 +12876,7 @@ function onCompositionEnd(e) {
12828
12876
  target.dispatchEvent(new Event("input"));
12829
12877
  }
12830
12878
  }
12831
- const assignKey = Symbol("_assign");
12879
+ const assignKey = /* @__PURE__ */ Symbol("_assign");
12832
12880
  const vModelText = {
12833
12881
  created(el, { modifiers: { lazy, trim, number } }, vnode) {
12834
12882
  el[assignKey] = getModelAssigner(vnode);
@@ -13305,4 +13353,4 @@ const initDirectivesForSSR = () => {
13305
13353
  }
13306
13354
  } ;
13307
13355
 
13308
- export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, 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, 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 };
13356
+ export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, 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, 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 };