@vue/compat 3.6.0-beta.9 → 3.6.0-rc.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.
- package/README.md +2 -2
- package/dist/vue-compat.d.ts +29 -20
- package/dist/vue.cjs.js +489 -226
- package/dist/vue.cjs.prod.js +415 -178
- package/dist/vue.esm-browser.js +460 -218
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +473 -222
- package/dist/vue.global.js +460 -218
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +460 -218
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +473 -222
- package/dist/vue.runtime.global.js +460 -218
- package/dist/vue.runtime.global.prod.js +6 -6
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-
|
|
2
|
+
* @vue/compat v3.6.0-rc.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -522,6 +522,13 @@ var Vue = (function() {
|
|
|
522
522
|
const notifyBuffer = [];
|
|
523
523
|
let batchDepth = 0;
|
|
524
524
|
let activeSub = void 0;
|
|
525
|
+
let runDepth = 0;
|
|
526
|
+
function incRunDepth() {
|
|
527
|
+
++runDepth;
|
|
528
|
+
}
|
|
529
|
+
function decRunDepth() {
|
|
530
|
+
--runDepth;
|
|
531
|
+
}
|
|
525
532
|
let globalVersion = 0;
|
|
526
533
|
let notifyIndex = 0;
|
|
527
534
|
let notifyBufferLength = 0;
|
|
@@ -595,8 +602,10 @@ var Vue = (function() {
|
|
|
595
602
|
const sub = link.sub;
|
|
596
603
|
let flags = sub.flags;
|
|
597
604
|
if (flags & 3) {
|
|
598
|
-
if (!(flags & 60))
|
|
599
|
-
|
|
605
|
+
if (!(flags & 60)) {
|
|
606
|
+
sub.flags = flags | 32;
|
|
607
|
+
if (runDepth) sub.flags |= 8;
|
|
608
|
+
} else if (!(flags & 12)) flags = 0;
|
|
600
609
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
601
610
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
602
611
|
sub.flags = flags | 40;
|
|
@@ -665,13 +674,13 @@ var Vue = (function() {
|
|
|
665
674
|
let dirty = false;
|
|
666
675
|
if (sub.flags & 16) dirty = true;
|
|
667
676
|
else if ((depFlags & 17) === 17) {
|
|
677
|
+
const subs = dep.subs;
|
|
668
678
|
if (dep.update()) {
|
|
669
|
-
const subs = dep.subs;
|
|
670
679
|
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
671
680
|
dirty = true;
|
|
672
681
|
}
|
|
673
682
|
} else if ((depFlags & 33) === 33) {
|
|
674
|
-
|
|
683
|
+
stack = {
|
|
675
684
|
value: link,
|
|
676
685
|
prev: stack
|
|
677
686
|
};
|
|
@@ -686,15 +695,12 @@ var Vue = (function() {
|
|
|
686
695
|
}
|
|
687
696
|
while (checkDepth) {
|
|
688
697
|
--checkDepth;
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
if (hasMultipleSubs) {
|
|
692
|
-
link = stack.value;
|
|
693
|
-
stack = stack.prev;
|
|
694
|
-
} else link = firstSub;
|
|
698
|
+
link = stack.value;
|
|
699
|
+
stack = stack.prev;
|
|
695
700
|
if (dirty) {
|
|
701
|
+
const subs = sub.subs;
|
|
696
702
|
if (sub.update()) {
|
|
697
|
-
if (
|
|
703
|
+
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
698
704
|
sub = link.sub;
|
|
699
705
|
continue;
|
|
700
706
|
}
|
|
@@ -706,7 +712,7 @@ var Vue = (function() {
|
|
|
706
712
|
}
|
|
707
713
|
dirty = false;
|
|
708
714
|
}
|
|
709
|
-
return dirty;
|
|
715
|
+
return dirty && !!sub.flags;
|
|
710
716
|
} while (true);
|
|
711
717
|
}
|
|
712
718
|
function shallowPropagate(link) {
|
|
@@ -1089,7 +1095,7 @@ var Vue = (function() {
|
|
|
1089
1095
|
}
|
|
1090
1096
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
1091
1097
|
const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
1092
|
-
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
1098
|
+
if (target === /* @__PURE__ */ toRaw(receiver) && result) {
|
|
1093
1099
|
if (!hadKey) trigger(target, "add", key, value);
|
|
1094
1100
|
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
1095
1101
|
}
|
|
@@ -1307,9 +1313,6 @@ var Vue = (function() {
|
|
|
1307
1313
|
default: return 0;
|
|
1308
1314
|
}
|
|
1309
1315
|
}
|
|
1310
|
-
function getTargetType(value) {
|
|
1311
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1312
|
-
}
|
|
1313
1316
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1314
1317
|
function reactive(target) {
|
|
1315
1318
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1422,10 +1425,11 @@ var Vue = (function() {
|
|
|
1422
1425
|
return target;
|
|
1423
1426
|
}
|
|
1424
1427
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1425
|
-
|
|
1426
|
-
if (targetType === 0) return target;
|
|
1428
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1427
1429
|
const existingProxy = proxyMap.get(target);
|
|
1428
1430
|
if (existingProxy) return existingProxy;
|
|
1431
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1432
|
+
if (targetType === 0) return target;
|
|
1429
1433
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1430
1434
|
proxyMap.set(target, proxy);
|
|
1431
1435
|
return proxy;
|
|
@@ -1858,9 +1862,11 @@ var Vue = (function() {
|
|
|
1858
1862
|
if (!this.active) return this.fn();
|
|
1859
1863
|
cleanup(this);
|
|
1860
1864
|
const prevSub = startTracking(this);
|
|
1865
|
+
incRunDepth();
|
|
1861
1866
|
try {
|
|
1862
1867
|
return this.fn();
|
|
1863
1868
|
} finally {
|
|
1869
|
+
decRunDepth();
|
|
1864
1870
|
endTracking(this, prevSub);
|
|
1865
1871
|
const flags = this.flags;
|
|
1866
1872
|
if ((flags & 136) === 136) {
|
|
@@ -2241,8 +2247,9 @@ var Vue = (function() {
|
|
|
2241
2247
|
if (once && cb) {
|
|
2242
2248
|
const _cb = cb;
|
|
2243
2249
|
cb = (...args) => {
|
|
2244
|
-
_cb(...args);
|
|
2250
|
+
const res = _cb(...args);
|
|
2245
2251
|
this.stop();
|
|
2252
|
+
return res;
|
|
2246
2253
|
};
|
|
2247
2254
|
}
|
|
2248
2255
|
this.cb = cb;
|
|
@@ -2256,7 +2263,7 @@ var Vue = (function() {
|
|
|
2256
2263
|
if (!this.cb) return;
|
|
2257
2264
|
const { immediate, deep, call } = this.options;
|
|
2258
2265
|
if (initialRun && !immediate) return;
|
|
2259
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2266
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2260
2267
|
cleanup(this);
|
|
2261
2268
|
const currentWatcher = activeWatcher;
|
|
2262
2269
|
activeWatcher = this;
|
|
@@ -2563,8 +2570,8 @@ var Vue = (function() {
|
|
|
2563
2570
|
/**
|
|
2564
2571
|
* @internal for runtime-vapor only
|
|
2565
2572
|
*/
|
|
2566
|
-
function queueJob(job, id, isPre = false) {
|
|
2567
|
-
if (queueJobWorker(job, id === void 0 ? isPre ? -2 : Infinity : isPre ? id * 2 : id * 2 + 1, jobs, jobsLength, flushIndex)) {
|
|
2573
|
+
function queueJob(job, id, isPre = false, order = 0) {
|
|
2574
|
+
if (queueJobWorker(job, id === void 0 ? isPre ? -2 : Infinity : isPre ? id * 2 : order ? id * 2 + 1 + order / (order + 1) : id * 2 + 1, jobs, jobsLength, flushIndex)) {
|
|
2568
2575
|
jobsLength++;
|
|
2569
2576
|
queueFlush();
|
|
2570
2577
|
}
|
|
@@ -2673,6 +2680,7 @@ var Vue = (function() {
|
|
|
2673
2680
|
}
|
|
2674
2681
|
flushIndex = 0;
|
|
2675
2682
|
jobsLength = 0;
|
|
2683
|
+
jobs.length = 0;
|
|
2676
2684
|
flushPostFlushCbs(seen);
|
|
2677
2685
|
currentFlushPromise = null;
|
|
2678
2686
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2730,6 +2738,14 @@ var Vue = (function() {
|
|
|
2730
2738
|
function normalizeClassComponent(component) {
|
|
2731
2739
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2732
2740
|
}
|
|
2741
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2742
|
+
let parent = instance.parent;
|
|
2743
|
+
while (parent) {
|
|
2744
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2745
|
+
parent = parent.parent;
|
|
2746
|
+
}
|
|
2747
|
+
return false;
|
|
2748
|
+
}
|
|
2733
2749
|
function rerender(id, newRender) {
|
|
2734
2750
|
const record = map.get(id);
|
|
2735
2751
|
if (!record) return;
|
|
@@ -2761,42 +2777,69 @@ var Vue = (function() {
|
|
|
2761
2777
|
const isVapor = record.initialDef.__vapor;
|
|
2762
2778
|
updateComponentDef(record.initialDef, newComp);
|
|
2763
2779
|
const instances = [...record.instances];
|
|
2764
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2780
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2765
2781
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
const
|
|
2769
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2770
|
-
if (!dirtyInstances) {
|
|
2771
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2772
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2773
|
-
}
|
|
2774
|
-
dirtyInstances.add(instance);
|
|
2775
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2776
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2777
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2778
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2779
|
-
if (instance.ceReload) {
|
|
2780
|
-
dirtyInstances.add(instance);
|
|
2781
|
-
instance.ceReload(newComp.styles);
|
|
2782
|
-
dirtyInstances.delete(instance);
|
|
2783
|
-
} else if (instance.parent) queueJob(() => {
|
|
2784
|
-
isHmrUpdating = true;
|
|
2782
|
+
const dirtyInstances = new Set(instances);
|
|
2783
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2784
|
+
for (const instance of instances) {
|
|
2785
2785
|
const parent = instance.parent;
|
|
2786
|
-
if (parent
|
|
2787
|
-
|
|
2788
|
-
|
|
2789
|
-
|
|
2786
|
+
if (parent) {
|
|
2787
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2788
|
+
rerenderedParents.add(parent);
|
|
2789
|
+
parent.hmrRerender();
|
|
2790
|
+
}
|
|
2791
|
+
} else instance.hmrReload(newComp);
|
|
2792
|
+
}
|
|
2793
|
+
} else {
|
|
2794
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2795
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2796
|
+
for (const instance of instances) {
|
|
2797
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2798
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2799
|
+
if (!dirtyInstances) {
|
|
2800
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2801
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2790
2802
|
}
|
|
2791
|
-
|
|
2792
|
-
|
|
2803
|
+
dirtyInstances.add(instance);
|
|
2804
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2805
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2806
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2807
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2808
|
+
if (instance.ceReload) {
|
|
2809
|
+
dirtyInstances.add(instance);
|
|
2810
|
+
instance.ceReload(newComp.styles);
|
|
2811
|
+
dirtyInstances.delete(instance);
|
|
2812
|
+
} else if (instance.parent) {
|
|
2813
|
+
const parent = instance.parent;
|
|
2814
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2815
|
+
let updates = parentUpdates.get(parent);
|
|
2816
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2817
|
+
updates.push([instance, dirtyInstances]);
|
|
2818
|
+
}
|
|
2819
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2820
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2821
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2822
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2823
|
+
}
|
|
2824
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2825
|
+
queueJob(() => {
|
|
2826
|
+
isHmrUpdating = true;
|
|
2827
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2828
|
+
else {
|
|
2829
|
+
const i = parent;
|
|
2830
|
+
if (!(i.effect.flags & 1024)) {
|
|
2831
|
+
i.renderCache = [];
|
|
2832
|
+
i.effect.run();
|
|
2833
|
+
}
|
|
2834
|
+
}
|
|
2835
|
+
nextTick(() => {
|
|
2836
|
+
isHmrUpdating = false;
|
|
2837
|
+
});
|
|
2838
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2839
|
+
dirtyInstances.delete(instance);
|
|
2840
|
+
});
|
|
2793
2841
|
});
|
|
2794
|
-
dirtyInstances.delete(instance);
|
|
2795
2842
|
});
|
|
2796
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2797
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2798
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2799
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2800
2843
|
}
|
|
2801
2844
|
queuePostFlushCb(() => {
|
|
2802
2845
|
hmrDirtyComponents.clear();
|
|
@@ -3263,10 +3306,12 @@ var Vue = (function() {
|
|
|
3263
3306
|
const renderFnWithContext = (...args) => {
|
|
3264
3307
|
if (renderFnWithContext._d) setBlockTracking(-1);
|
|
3265
3308
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
3309
|
+
const prevStackSize = blockStack.length;
|
|
3266
3310
|
let res;
|
|
3267
3311
|
try {
|
|
3268
3312
|
res = fn(...args);
|
|
3269
3313
|
} finally {
|
|
3314
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
3270
3315
|
setCurrentRenderingInstance(prevInstance);
|
|
3271
3316
|
if (renderFnWithContext._d) setBlockTracking(1);
|
|
3272
3317
|
}
|
|
@@ -3464,7 +3509,7 @@ var Vue = (function() {
|
|
|
3464
3509
|
}
|
|
3465
3510
|
const prev = setCurrentInstance(this);
|
|
3466
3511
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
3467
|
-
|
|
3512
|
+
restoreCurrentInstance(prev);
|
|
3468
3513
|
return res;
|
|
3469
3514
|
}
|
|
3470
3515
|
function createPathGetter(ctx, path) {
|
|
@@ -3477,6 +3522,7 @@ var Vue = (function() {
|
|
|
3477
3522
|
}
|
|
3478
3523
|
//#endregion
|
|
3479
3524
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3525
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3480
3526
|
const TeleportEndKey = Symbol("_vte");
|
|
3481
3527
|
const isTeleport = (type) => type.__isTeleport;
|
|
3482
3528
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3502,58 +3548,70 @@ var Vue = (function() {
|
|
|
3502
3548
|
name: "Teleport",
|
|
3503
3549
|
__isTeleport: true,
|
|
3504
3550
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
3505
|
-
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
|
|
3551
|
+
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
|
|
3506
3552
|
const disabled = isTeleportDisabled(n2.props);
|
|
3507
|
-
let {
|
|
3553
|
+
let { dynamicChildren } = n2;
|
|
3508
3554
|
if (isHmrUpdating) {
|
|
3509
3555
|
optimized = false;
|
|
3510
3556
|
dynamicChildren = null;
|
|
3511
3557
|
}
|
|
3558
|
+
const mount = (vnode, container, anchor) => {
|
|
3559
|
+
if (vnode.shapeFlag & 16) mountChildren(vnode.children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3560
|
+
};
|
|
3561
|
+
const mountToTarget = (vnode = n2) => {
|
|
3562
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3563
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3564
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3565
|
+
if (target) {
|
|
3566
|
+
if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
|
|
3567
|
+
else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
|
|
3568
|
+
if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3569
|
+
if (!disabled) {
|
|
3570
|
+
mount(vnode, target, targetAnchor);
|
|
3571
|
+
updateCssVars(vnode, false);
|
|
3572
|
+
}
|
|
3573
|
+
} else if (!disabled) warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3574
|
+
};
|
|
3575
|
+
const queuePendingMount = (vnode) => {
|
|
3576
|
+
const mountJob = () => {
|
|
3577
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3578
|
+
pendingMounts.delete(vnode);
|
|
3579
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3580
|
+
mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
|
|
3581
|
+
updateCssVars(vnode, true);
|
|
3582
|
+
}
|
|
3583
|
+
mountToTarget(vnode);
|
|
3584
|
+
};
|
|
3585
|
+
pendingMounts.set(vnode, mountJob);
|
|
3586
|
+
queuePostRenderEffect(mountJob, void 0, parentSuspense);
|
|
3587
|
+
};
|
|
3512
3588
|
if (n1 == null) {
|
|
3513
3589
|
const placeholder = n2.el = createComment("teleport start");
|
|
3514
3590
|
const mainAnchor = n2.anchor = createComment("teleport end");
|
|
3515
3591
|
insert(placeholder, container, anchor);
|
|
3516
3592
|
insert(mainAnchor, container, anchor);
|
|
3517
|
-
|
|
3518
|
-
|
|
3519
|
-
|
|
3520
|
-
|
|
3521
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3522
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3523
|
-
if (target) {
|
|
3524
|
-
if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
|
|
3525
|
-
else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
|
|
3526
|
-
if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3527
|
-
if (!disabled) {
|
|
3528
|
-
mount(target, targetAnchor);
|
|
3529
|
-
updateCssVars(n2, false);
|
|
3530
|
-
}
|
|
3531
|
-
} else if (!disabled) warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3532
|
-
};
|
|
3593
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3594
|
+
queuePendingMount(n2);
|
|
3595
|
+
return;
|
|
3596
|
+
}
|
|
3533
3597
|
if (disabled) {
|
|
3534
|
-
mount(container, mainAnchor);
|
|
3598
|
+
mount(n2, container, mainAnchor);
|
|
3535
3599
|
updateCssVars(n2, true);
|
|
3536
3600
|
}
|
|
3537
|
-
|
|
3538
|
-
n2.el.__isMounted = false;
|
|
3539
|
-
queuePostRenderEffect(() => {
|
|
3540
|
-
if (n2.el.__isMounted !== false) return;
|
|
3541
|
-
mountToTarget();
|
|
3542
|
-
delete n2.el.__isMounted;
|
|
3543
|
-
}, void 0, parentSuspense);
|
|
3544
|
-
} else mountToTarget();
|
|
3601
|
+
mountToTarget();
|
|
3545
3602
|
} else {
|
|
3546
3603
|
n2.el = n1.el;
|
|
3547
|
-
n2.targetStart = n1.targetStart;
|
|
3548
3604
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
3549
|
-
const
|
|
3550
|
-
|
|
3551
|
-
|
|
3552
|
-
|
|
3553
|
-
|
|
3554
|
-
}, void 0, parentSuspense);
|
|
3605
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3606
|
+
if (pendingMount) {
|
|
3607
|
+
pendingMount.flags |= 4;
|
|
3608
|
+
pendingMounts.delete(n1);
|
|
3609
|
+
queuePendingMount(n2);
|
|
3555
3610
|
return;
|
|
3556
3611
|
}
|
|
3612
|
+
n2.targetStart = n1.targetStart;
|
|
3613
|
+
const target = n2.target = n1.target;
|
|
3614
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3557
3615
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3558
3616
|
const currentContainer = wasDisabled ? container : target;
|
|
3559
3617
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3567,24 +3625,30 @@ var Vue = (function() {
|
|
|
3567
3625
|
if (!wasDisabled) moveTeleport(n2, container, mainAnchor, internals, parentComponent, 1);
|
|
3568
3626
|
else if (n2.props && n1.props && n2.props.to !== n1.props.to) n2.props.to = n1.props.to;
|
|
3569
3627
|
} else if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
3570
|
-
const nextTarget =
|
|
3571
|
-
if (nextTarget)
|
|
3572
|
-
|
|
3628
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
3629
|
+
if (nextTarget) {
|
|
3630
|
+
n2.target = nextTarget;
|
|
3631
|
+
moveTeleport(n2, nextTarget, null, internals, parentComponent, 0);
|
|
3632
|
+
} else warn$1("Invalid Teleport target on update:", target, `(${typeof target})`);
|
|
3573
3633
|
} else if (wasDisabled) moveTeleport(n2, target, targetAnchor, internals, parentComponent, 1);
|
|
3574
3634
|
updateCssVars(n2, disabled);
|
|
3575
3635
|
}
|
|
3576
3636
|
},
|
|
3577
3637
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3578
|
-
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3638
|
+
const { shapeFlag, children, anchor, targetStart, targetAnchor, target, props } = vnode;
|
|
3639
|
+
const disabled = isTeleportDisabled(props);
|
|
3640
|
+
const shouldRemove = doRemove || !disabled;
|
|
3641
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3642
|
+
if (pendingMount) {
|
|
3643
|
+
pendingMount.flags |= 4;
|
|
3644
|
+
pendingMounts.delete(vnode);
|
|
3645
|
+
}
|
|
3579
3646
|
if (targetStart) hostRemove(targetStart);
|
|
3580
3647
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3581
3648
|
doRemove && hostRemove(anchor);
|
|
3582
|
-
if (shapeFlag & 16) {
|
|
3583
|
-
const
|
|
3584
|
-
|
|
3585
|
-
const child = children[i];
|
|
3586
|
-
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3587
|
-
}
|
|
3649
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3650
|
+
const child = children[i];
|
|
3651
|
+
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3588
3652
|
}
|
|
3589
3653
|
},
|
|
3590
3654
|
move: moveTeleport,
|
|
@@ -3595,7 +3659,7 @@ var Vue = (function() {
|
|
|
3595
3659
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3596
3660
|
const isReorder = moveType === 2;
|
|
3597
3661
|
if (isReorder) insert(el, container, parentAnchor);
|
|
3598
|
-
if (!isReorder || isTeleportDisabled(props)) {
|
|
3662
|
+
if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
|
|
3599
3663
|
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
|
|
3600
3664
|
}
|
|
3601
3665
|
if (isReorder) insert(anchor, container, parentAnchor);
|
|
@@ -3720,8 +3784,8 @@ var Vue = (function() {
|
|
|
3720
3784
|
const state = useTransitionState();
|
|
3721
3785
|
return () => {
|
|
3722
3786
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3723
|
-
|
|
3724
|
-
|
|
3787
|
+
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3788
|
+
if (!child) return;
|
|
3725
3789
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3726
3790
|
const { mode } = rawProps;
|
|
3727
3791
|
checkTransitionMode(mode);
|
|
@@ -3904,12 +3968,11 @@ var Vue = (function() {
|
|
|
3904
3968
|
}
|
|
3905
3969
|
}
|
|
3906
3970
|
function setTransitionHooks(vnode, hooks) {
|
|
3907
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
3908
|
-
else {
|
|
3971
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3909
3972
|
vnode.transition = hooks;
|
|
3910
|
-
setTransitionHooks(vnode.component
|
|
3911
|
-
|
|
3912
|
-
else if (vnode.shapeFlag & 128) {
|
|
3973
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3974
|
+
else setTransitionHooks(vnode.component.subTree, hooks);
|
|
3975
|
+
} else if (vnode.shapeFlag & 128) {
|
|
3913
3976
|
vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3914
3977
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3915
3978
|
} else vnode.transition = hooks;
|
|
@@ -4174,7 +4237,7 @@ var Vue = (function() {
|
|
|
4174
4237
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4175
4238
|
break;
|
|
4176
4239
|
case VaporSlot:
|
|
4177
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node);
|
|
4240
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
4178
4241
|
break;
|
|
4179
4242
|
default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
4180
4243
|
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
@@ -4184,16 +4247,31 @@ var Vue = (function() {
|
|
|
4184
4247
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
4185
4248
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
4186
4249
|
else nextNode = nextSibling(node);
|
|
4187
|
-
if (vnode.type.__vapor)
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
}
|
|
4195
|
-
|
|
4196
|
-
|
|
4250
|
+
if (vnode.type.__vapor) {
|
|
4251
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeBeforeMount;
|
|
4252
|
+
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
4253
|
+
if (vnode.dirs) {
|
|
4254
|
+
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4255
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4256
|
+
}
|
|
4257
|
+
}, () => {
|
|
4258
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
4259
|
+
});
|
|
4260
|
+
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4261
|
+
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
4262
|
+
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
4263
|
+
} else {
|
|
4264
|
+
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4265
|
+
const component = vnode.component;
|
|
4266
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
|
|
4267
|
+
let subTree;
|
|
4268
|
+
if (isFragmentStart) {
|
|
4269
|
+
subTree = createVNode(Fragment);
|
|
4270
|
+
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4271
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4272
|
+
subTree.el = node;
|
|
4273
|
+
component.subTree = subTree;
|
|
4274
|
+
}
|
|
4197
4275
|
}
|
|
4198
4276
|
} else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
|
|
4199
4277
|
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
@@ -4205,7 +4283,7 @@ var Vue = (function() {
|
|
|
4205
4283
|
};
|
|
4206
4284
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
4207
4285
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4208
|
-
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4286
|
+
const { type, dynamicProps, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4209
4287
|
const forcePatch = type === "input" || type === "option";
|
|
4210
4288
|
{
|
|
4211
4289
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
@@ -4223,15 +4301,11 @@ var Vue = (function() {
|
|
|
4223
4301
|
}
|
|
4224
4302
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
4225
4303
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4226
|
-
|
|
4304
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
4305
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4306
|
+
logMismatchError();
|
|
4307
|
+
}
|
|
4227
4308
|
while (next) {
|
|
4228
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
4229
|
-
if (!hasWarned) {
|
|
4230
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4231
|
-
hasWarned = true;
|
|
4232
|
-
}
|
|
4233
|
-
logMismatchError();
|
|
4234
|
-
}
|
|
4235
4309
|
const cur = next;
|
|
4236
4310
|
next = next.nextSibling;
|
|
4237
4311
|
remove(cur);
|
|
@@ -4250,9 +4324,10 @@ var Vue = (function() {
|
|
|
4250
4324
|
}
|
|
4251
4325
|
if (props) {
|
|
4252
4326
|
const isCustomElement = el.tagName.includes("-");
|
|
4327
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4253
4328
|
for (const key in props) {
|
|
4254
4329
|
if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
4255
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key)) patchProp(el, key, null, props[key],
|
|
4330
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
4256
4331
|
}
|
|
4257
4332
|
}
|
|
4258
4333
|
let vnodeHooks;
|
|
@@ -4270,7 +4345,7 @@ var Vue = (function() {
|
|
|
4270
4345
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
4271
4346
|
const children = parentVNode.children;
|
|
4272
4347
|
const l = children.length;
|
|
4273
|
-
let
|
|
4348
|
+
let hasCheckedMismatch = false;
|
|
4274
4349
|
for (let i = 0; i < l; i++) {
|
|
4275
4350
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
4276
4351
|
const isText = vnode.type === Text;
|
|
@@ -4284,12 +4359,12 @@ var Vue = (function() {
|
|
|
4284
4359
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4285
4360
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
4286
4361
|
else {
|
|
4287
|
-
if (!
|
|
4288
|
-
|
|
4362
|
+
if (!hasCheckedMismatch) {
|
|
4363
|
+
hasCheckedMismatch = true;
|
|
4364
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4289
4365
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
4290
|
-
|
|
4366
|
+
logMismatchError();
|
|
4291
4367
|
}
|
|
4292
|
-
logMismatchError();
|
|
4293
4368
|
}
|
|
4294
4369
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4295
4370
|
}
|
|
@@ -4309,7 +4384,7 @@ var Vue = (function() {
|
|
|
4309
4384
|
}
|
|
4310
4385
|
};
|
|
4311
4386
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4312
|
-
if (!
|
|
4387
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4313
4388
|
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4314
4389
|
logMismatchError();
|
|
4315
4390
|
}
|
|
@@ -4473,7 +4548,9 @@ var Vue = (function() {
|
|
|
4473
4548
|
};
|
|
4474
4549
|
function isMismatchAllowed(el, allowedType) {
|
|
4475
4550
|
if (allowedType === 0 || allowedType === 1) while (el && !el.hasAttribute(allowMismatchAttr)) el = el.parentElement;
|
|
4476
|
-
|
|
4551
|
+
return isMismatchAllowedByAttr(el && el.getAttribute(allowMismatchAttr), allowedType);
|
|
4552
|
+
}
|
|
4553
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
4477
4554
|
if (allowedAttr == null) return false;
|
|
4478
4555
|
else if (allowedAttr === "") return true;
|
|
4479
4556
|
else {
|
|
@@ -4482,6 +4559,16 @@ var Vue = (function() {
|
|
|
4482
4559
|
return list.includes(MismatchTypeString[allowedType]);
|
|
4483
4560
|
}
|
|
4484
4561
|
}
|
|
4562
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
4563
|
+
return isMismatchAllowed(node.parentElement, 1) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
4564
|
+
}
|
|
4565
|
+
function isMismatchAllowedByNode(node) {
|
|
4566
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(node.getAttribute(allowMismatchAttr), 1);
|
|
4567
|
+
}
|
|
4568
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
4569
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
4570
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1);
|
|
4571
|
+
}
|
|
4485
4572
|
//#endregion
|
|
4486
4573
|
//#region packages/runtime-core/src/hydrationStrategies.ts
|
|
4487
4574
|
let requestIdleCallback;
|
|
@@ -4600,11 +4687,16 @@ var Vue = (function() {
|
|
|
4600
4687
|
onError(err);
|
|
4601
4688
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4602
4689
|
});
|
|
4603
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4690
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4604
4691
|
load().then(() => {
|
|
4692
|
+
if (instance.isUnmounted) return;
|
|
4605
4693
|
loaded.value = true;
|
|
4606
4694
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4607
4695
|
}).catch((err) => {
|
|
4696
|
+
if (instance.isUnmounted) {
|
|
4697
|
+
setPendingRequest(null);
|
|
4698
|
+
return;
|
|
4699
|
+
}
|
|
4608
4700
|
onError(err);
|
|
4609
4701
|
error.value = err;
|
|
4610
4702
|
});
|
|
@@ -4662,14 +4754,22 @@ var Vue = (function() {
|
|
|
4662
4754
|
setPendingRequest: (request) => pendingRequest = request
|
|
4663
4755
|
};
|
|
4664
4756
|
}
|
|
4665
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4757
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4666
4758
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4667
4759
|
const error = /* @__PURE__ */ ref();
|
|
4668
4760
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4669
|
-
|
|
4761
|
+
let timeoutTimer;
|
|
4762
|
+
let delayTimer;
|
|
4763
|
+
if (instance) onUnmounted(() => {
|
|
4764
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4765
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4766
|
+
}, instance);
|
|
4767
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4768
|
+
if (instance && instance.isUnmounted) return;
|
|
4670
4769
|
delayed.value = false;
|
|
4671
4770
|
}, delay);
|
|
4672
|
-
if (timeout != null) setTimeout(() => {
|
|
4771
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4772
|
+
if (instance && instance.isUnmounted) return;
|
|
4673
4773
|
if (!loaded.value && !error.value) {
|
|
4674
4774
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4675
4775
|
onError(err);
|
|
@@ -4687,6 +4787,7 @@ var Vue = (function() {
|
|
|
4687
4787
|
* @internal
|
|
4688
4788
|
*/
|
|
4689
4789
|
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4790
|
+
const wasConnected = el.isConnected;
|
|
4690
4791
|
let patched = false;
|
|
4691
4792
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4692
4793
|
const performHydrate = () => {
|
|
@@ -4697,6 +4798,7 @@ var Vue = (function() {
|
|
|
4697
4798
|
}
|
|
4698
4799
|
return;
|
|
4699
4800
|
}
|
|
4801
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
4700
4802
|
hydrate();
|
|
4701
4803
|
};
|
|
4702
4804
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -4938,7 +5040,7 @@ var Vue = (function() {
|
|
|
4938
5040
|
try {
|
|
4939
5041
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
4940
5042
|
} finally {
|
|
4941
|
-
|
|
5043
|
+
restoreCurrentInstance(prev);
|
|
4942
5044
|
setActiveSub(prevSub);
|
|
4943
5045
|
}
|
|
4944
5046
|
});
|
|
@@ -5277,8 +5379,9 @@ var Vue = (function() {
|
|
|
5277
5379
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5278
5380
|
* @private
|
|
5279
5381
|
*/
|
|
5280
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5382
|
+
function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
|
|
5281
5383
|
let slot = slots[name];
|
|
5384
|
+
if (fallback) fallback.__vdom = true;
|
|
5282
5385
|
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5283
5386
|
if (vaporSlot) {
|
|
5284
5387
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
@@ -5286,25 +5389,35 @@ var Vue = (function() {
|
|
|
5286
5389
|
slot: vaporSlot,
|
|
5287
5390
|
fallback
|
|
5288
5391
|
};
|
|
5392
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5289
5393
|
return ret;
|
|
5290
5394
|
}
|
|
5291
5395
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
5292
|
-
const
|
|
5293
|
-
|
|
5294
|
-
|
|
5396
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
5397
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
5398
|
+
if (name !== "default") slotProps.name = name;
|
|
5399
|
+
return openBlock(), createBlock(Fragment, null, [createVNode("slot", slotProps, fallback && fallback())], hasProps ? -2 : 64);
|
|
5295
5400
|
}
|
|
5296
5401
|
if (slot && slot.length > 1) {
|
|
5297
5402
|
warn$1("SSR-optimized slot function detected in a non-SSR-optimized render function. You need to mark this component with $dynamic-slots in the parent template.");
|
|
5298
5403
|
slot = () => [];
|
|
5299
5404
|
}
|
|
5300
5405
|
if (slot && slot._c) slot._d = false;
|
|
5406
|
+
const prevStackSize = blockStack.length;
|
|
5301
5407
|
openBlock();
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5408
|
+
let rendered;
|
|
5409
|
+
try {
|
|
5410
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5411
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
5412
|
+
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
5413
|
+
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
5414
|
+
} catch (err) {
|
|
5415
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5416
|
+
throw err;
|
|
5417
|
+
} finally {
|
|
5418
|
+
if (slot && slot._c) slot._d = true;
|
|
5419
|
+
}
|
|
5306
5420
|
if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
5307
|
-
if (slot && slot._c) slot._d = true;
|
|
5308
5421
|
return rendered;
|
|
5309
5422
|
}
|
|
5310
5423
|
function ensureValidVNode(vnodes) {
|
|
@@ -5317,9 +5430,7 @@ var Vue = (function() {
|
|
|
5317
5430
|
}
|
|
5318
5431
|
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5319
5432
|
let vaporSlot;
|
|
5320
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs))
|
|
5321
|
-
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
5322
|
-
}
|
|
5433
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5323
5434
|
}
|
|
5324
5435
|
//#endregion
|
|
5325
5436
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
@@ -5874,26 +5985,39 @@ var Vue = (function() {
|
|
|
5874
5985
|
function withAsyncContext(getAwaitable) {
|
|
5875
5986
|
const ctx = getCurrentGenericInstance();
|
|
5876
5987
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5988
|
+
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5877
5989
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5878
5990
|
let awaitable = getAwaitable();
|
|
5879
5991
|
setCurrentInstance(null, void 0);
|
|
5880
5992
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5881
5993
|
const restore = () => {
|
|
5994
|
+
const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5882
5995
|
setCurrentInstance(ctx);
|
|
5883
5996
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5997
|
+
const reset = restoreAsyncContext && restoreAsyncContext();
|
|
5998
|
+
return () => {
|
|
5999
|
+
if (reset) reset();
|
|
6000
|
+
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6001
|
+
};
|
|
5884
6002
|
};
|
|
5885
6003
|
const cleanup = () => {
|
|
5886
6004
|
setCurrentInstance(null, void 0);
|
|
5887
6005
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5888
6006
|
};
|
|
5889
6007
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5890
|
-
restore();
|
|
5891
|
-
Promise.resolve().then(() => Promise.resolve().then(
|
|
6008
|
+
const reset = restore();
|
|
6009
|
+
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6010
|
+
if (reset) reset();
|
|
6011
|
+
cleanup();
|
|
6012
|
+
}));
|
|
5892
6013
|
throw e;
|
|
5893
6014
|
});
|
|
5894
6015
|
return [awaitable, () => {
|
|
5895
|
-
restore();
|
|
5896
|
-
Promise.resolve().then(
|
|
6016
|
+
const reset = restore();
|
|
6017
|
+
Promise.resolve().then(() => {
|
|
6018
|
+
if (reset) reset();
|
|
6019
|
+
cleanup();
|
|
6020
|
+
});
|
|
5897
6021
|
}];
|
|
5898
6022
|
}
|
|
5899
6023
|
//#endregion
|
|
@@ -6211,7 +6335,7 @@ var Vue = (function() {
|
|
|
6211
6335
|
if (options.el) return vm.$mount(options.el);
|
|
6212
6336
|
else return vm;
|
|
6213
6337
|
}
|
|
6214
|
-
Vue.version = `2.6.14-compat:3.6.0-
|
|
6338
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.2`;
|
|
6215
6339
|
Vue.config = singletonApp.config;
|
|
6216
6340
|
Vue.use = (plugin, ...options) => {
|
|
6217
6341
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6466,7 +6590,9 @@ var Vue = (function() {
|
|
|
6466
6590
|
else Object.keys(val).forEach((key) => {
|
|
6467
6591
|
try {
|
|
6468
6592
|
defineReactiveSimple(val, key, val[key]);
|
|
6469
|
-
} catch (e) {
|
|
6593
|
+
} catch (e) {
|
|
6594
|
+
warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6595
|
+
}
|
|
6470
6596
|
});
|
|
6471
6597
|
}
|
|
6472
6598
|
const i = obj.$;
|
|
@@ -6711,12 +6837,13 @@ var Vue = (function() {
|
|
|
6711
6837
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6712
6838
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6713
6839
|
}
|
|
6714
|
-
|
|
6840
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6841
|
+
if (!hasVModel) {
|
|
6715
6842
|
localValue = value;
|
|
6716
6843
|
trigger();
|
|
6717
6844
|
}
|
|
6718
6845
|
i.emit(`update:${name}`, emittedValue);
|
|
6719
|
-
if (hasChanged(value,
|
|
6846
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6720
6847
|
prevSetValue = value;
|
|
6721
6848
|
prevEmittedValue = emittedValue;
|
|
6722
6849
|
}
|
|
@@ -6829,7 +6956,8 @@ var Vue = (function() {
|
|
|
6829
6956
|
function isEmitListener(options, key) {
|
|
6830
6957
|
if (!options || !isOn(key)) return false;
|
|
6831
6958
|
if (key.startsWith(compatModelEventPrefix)) return true;
|
|
6832
|
-
key = key.slice(2)
|
|
6959
|
+
key = key.slice(2);
|
|
6960
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
6833
6961
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
6834
6962
|
}
|
|
6835
6963
|
//#endregion
|
|
@@ -7200,7 +7328,7 @@ var Vue = (function() {
|
|
|
7200
7328
|
const prev = setCurrentInstance(instance);
|
|
7201
7329
|
const props = /* @__PURE__ */ toRaw(instance.props);
|
|
7202
7330
|
value = factory.call(isCompatEnabled$1("PROPS_DEFAULT_THIS", instance) ? createPropsDefaultThis(instance, props, key) : null, props);
|
|
7203
|
-
|
|
7331
|
+
restoreCurrentInstance(prev);
|
|
7204
7332
|
return value;
|
|
7205
7333
|
}
|
|
7206
7334
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -7347,7 +7475,7 @@ var Vue = (function() {
|
|
|
7347
7475
|
const receivedType = toRawType(value);
|
|
7348
7476
|
const expectedValue = styleValue(value, expectedType);
|
|
7349
7477
|
const receivedValue = styleValue(value, receivedType);
|
|
7350
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) &&
|
|
7478
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
7351
7479
|
message += `, got ${receivedType} `;
|
|
7352
7480
|
if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
|
|
7353
7481
|
return message;
|
|
@@ -7356,7 +7484,8 @@ var Vue = (function() {
|
|
|
7356
7484
|
* dev only
|
|
7357
7485
|
*/
|
|
7358
7486
|
function styleValue(value, type) {
|
|
7359
|
-
if (
|
|
7487
|
+
if (isSymbol(value)) return value.toString();
|
|
7488
|
+
else if (type === "String") return `"${value}"`;
|
|
7360
7489
|
else if (type === "Number") return `${Number(value)}`;
|
|
7361
7490
|
else return `${value}`;
|
|
7362
7491
|
}
|
|
@@ -7373,8 +7502,11 @@ var Vue = (function() {
|
|
|
7373
7502
|
/**
|
|
7374
7503
|
* dev only
|
|
7375
7504
|
*/
|
|
7376
|
-
function
|
|
7377
|
-
return args.
|
|
7505
|
+
function isCoercible(...args) {
|
|
7506
|
+
return args.every((elem) => {
|
|
7507
|
+
const value = elem.toLowerCase();
|
|
7508
|
+
return value !== "boolean" && value !== "symbol";
|
|
7509
|
+
});
|
|
7378
7510
|
}
|
|
7379
7511
|
//#endregion
|
|
7380
7512
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
@@ -7679,7 +7811,7 @@ var Vue = (function() {
|
|
|
7679
7811
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
7680
7812
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7681
7813
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7682
|
-
if (isHmrUpdating) {
|
|
7814
|
+
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
7683
7815
|
patchFlag = 0;
|
|
7684
7816
|
optimized = false;
|
|
7685
7817
|
dynamicChildren = null;
|
|
@@ -7757,21 +7889,37 @@ var Vue = (function() {
|
|
|
7757
7889
|
};
|
|
7758
7890
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
7759
7891
|
n2.slotScopeIds = slotScopeIds;
|
|
7760
|
-
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7892
|
+
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
7761
7893
|
else {
|
|
7894
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7762
7895
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
7763
7896
|
if (n2.dirs) {
|
|
7764
7897
|
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
7765
7898
|
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
7766
7899
|
}
|
|
7900
|
+
}, () => {
|
|
7901
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
7767
7902
|
});
|
|
7768
7903
|
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
7904
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
7905
|
+
if (vnodeMountedHook) {
|
|
7906
|
+
const scopedVNode = n2;
|
|
7907
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
7908
|
+
}
|
|
7769
7909
|
}
|
|
7770
7910
|
else {
|
|
7771
|
-
|
|
7911
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
7912
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
7772
7913
|
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7914
|
+
}, () => {
|
|
7915
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
7916
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
7773
7917
|
});
|
|
7774
|
-
|
|
7918
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
7919
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
7920
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7921
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
7922
|
+
}, void 0, parentSuspense);
|
|
7775
7923
|
}
|
|
7776
7924
|
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
7777
7925
|
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
@@ -8094,7 +8242,7 @@ var Vue = (function() {
|
|
|
8094
8242
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8095
8243
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8096
8244
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8097
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
8245
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8098
8246
|
return;
|
|
8099
8247
|
}
|
|
8100
8248
|
if (shapeFlag & 6) {
|
|
@@ -8127,8 +8275,10 @@ var Vue = (function() {
|
|
|
8127
8275
|
else hostInsert(el, container, anchor);
|
|
8128
8276
|
};
|
|
8129
8277
|
const performLeave = () => {
|
|
8278
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8130
8279
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
8131
|
-
|
|
8280
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
8281
|
+
else leave(el, () => {
|
|
8132
8282
|
remove();
|
|
8133
8283
|
afterLeave && afterLeave();
|
|
8134
8284
|
});
|
|
@@ -8148,7 +8298,7 @@ var Vue = (function() {
|
|
|
8148
8298
|
}
|
|
8149
8299
|
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8150
8300
|
if (shapeFlag & 256) {
|
|
8151
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
8301
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8152
8302
|
else parentComponent.ctx.deactivate(vnode);
|
|
8153
8303
|
return;
|
|
8154
8304
|
}
|
|
@@ -8158,8 +8308,11 @@ var Vue = (function() {
|
|
|
8158
8308
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8159
8309
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8160
8310
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8161
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8162
|
-
if (
|
|
8311
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8312
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8313
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8314
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8315
|
+
}, void 0, parentSuspense);
|
|
8163
8316
|
return;
|
|
8164
8317
|
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8165
8318
|
else {
|
|
@@ -8172,7 +8325,7 @@ var Vue = (function() {
|
|
|
8172
8325
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8173
8326
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8174
8327
|
if (type === VaporSlot) {
|
|
8175
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8328
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8176
8329
|
return;
|
|
8177
8330
|
}
|
|
8178
8331
|
if (doRemove) remove(vnode);
|
|
@@ -8221,7 +8374,7 @@ var Vue = (function() {
|
|
|
8221
8374
|
if (effect) {
|
|
8222
8375
|
effect.stop();
|
|
8223
8376
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8224
|
-
}
|
|
8377
|
+
} else if (doRemove && subTree && instance.vnode.el) remove(subTree);
|
|
8225
8378
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8226
8379
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8227
8380
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8348,6 +8501,10 @@ var Vue = (function() {
|
|
|
8348
8501
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
8349
8502
|
}
|
|
8350
8503
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8504
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
8505
|
+
insert();
|
|
8506
|
+
return;
|
|
8507
|
+
}
|
|
8351
8508
|
if (force || needTransition(parentSuspense, transition)) {
|
|
8352
8509
|
transition.beforeEnter(el);
|
|
8353
8510
|
insert();
|
|
@@ -8550,15 +8707,19 @@ var Vue = (function() {
|
|
|
8550
8707
|
if (suspense.isHydrating) suspense.isHydrating = false;
|
|
8551
8708
|
else if (!resume) {
|
|
8552
8709
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
8710
|
+
let hasUpdatedAnchor = false;
|
|
8553
8711
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
8554
8712
|
if (pendingId === suspense.pendingId) {
|
|
8555
|
-
move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8713
|
+
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8556
8714
|
queuePostFlushCb(effects);
|
|
8557
8715
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8558
8716
|
}
|
|
8559
8717
|
};
|
|
8560
8718
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8561
|
-
if (parentNode(activeBranch.el) === container)
|
|
8719
|
+
if (parentNode(activeBranch.el) === container) {
|
|
8720
|
+
anchor = next(activeBranch);
|
|
8721
|
+
hasUpdatedAnchor = true;
|
|
8722
|
+
}
|
|
8562
8723
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8563
8724
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8564
8725
|
}
|
|
@@ -8622,6 +8783,7 @@ var Vue = (function() {
|
|
|
8622
8783
|
handleError(err, instance, 0);
|
|
8623
8784
|
}).then((asyncSetupResult) => {
|
|
8624
8785
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
8786
|
+
setCurrentInstance(null, void 0);
|
|
8625
8787
|
instance.asyncResolved = true;
|
|
8626
8788
|
onResolve(asyncSetupResult);
|
|
8627
8789
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -8954,12 +9116,30 @@ var Vue = (function() {
|
|
|
8954
9116
|
el: vnode.el,
|
|
8955
9117
|
anchor: vnode.anchor,
|
|
8956
9118
|
ctx: vnode.ctx,
|
|
8957
|
-
ce: vnode.ce
|
|
9119
|
+
ce: vnode.ce,
|
|
9120
|
+
vi: vnode.vi,
|
|
9121
|
+
vs: cloneVaporSlotMeta(vnode),
|
|
9122
|
+
vb: vnode.vb
|
|
8958
9123
|
};
|
|
8959
9124
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
8960
9125
|
defineLegacyVNodeProperties(cloned);
|
|
8961
9126
|
return cloned;
|
|
8962
9127
|
}
|
|
9128
|
+
function cloneVaporSlotMeta(vnode) {
|
|
9129
|
+
const vaporSlot = vnode.vs;
|
|
9130
|
+
if (!vaporSlot) return vaporSlot;
|
|
9131
|
+
const cloned = {
|
|
9132
|
+
slot: vaporSlot.slot,
|
|
9133
|
+
fallback: vaporSlot.fallback,
|
|
9134
|
+
outletFallback: vaporSlot.outletFallback
|
|
9135
|
+
};
|
|
9136
|
+
if (vnode.el) {
|
|
9137
|
+
cloned.state = vaporSlot.state;
|
|
9138
|
+
cloned.ref = vaporSlot.ref;
|
|
9139
|
+
cloned.scope = vaporSlot.scope;
|
|
9140
|
+
}
|
|
9141
|
+
return cloned;
|
|
9142
|
+
}
|
|
8963
9143
|
/**
|
|
8964
9144
|
* Dev only, for HMR of hoisted vnodes reused in v-for
|
|
8965
9145
|
* https://github.com/vitejs/vite/issues/2022
|
|
@@ -9022,6 +9202,10 @@ var Vue = (function() {
|
|
|
9022
9202
|
}
|
|
9023
9203
|
}
|
|
9024
9204
|
else if (isFunction(children)) {
|
|
9205
|
+
if (shapeFlag & 65) {
|
|
9206
|
+
normalizeChildren(vnode, { default: children });
|
|
9207
|
+
return;
|
|
9208
|
+
}
|
|
9025
9209
|
children = {
|
|
9026
9210
|
default: children,
|
|
9027
9211
|
_ctx: currentRenderingInstance
|
|
@@ -9085,6 +9269,16 @@ var Vue = (function() {
|
|
|
9085
9269
|
simpleSetCurrentInstance(instance);
|
|
9086
9270
|
}
|
|
9087
9271
|
};
|
|
9272
|
+
/**
|
|
9273
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
9274
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
9275
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
9276
|
+
* @internal
|
|
9277
|
+
*/
|
|
9278
|
+
const restoreCurrentInstance = (prev) => {
|
|
9279
|
+
setCurrentScope(prev[1]);
|
|
9280
|
+
simpleSetCurrentInstance(prev[0]);
|
|
9281
|
+
};
|
|
9088
9282
|
const internalOptions = [
|
|
9089
9283
|
"ce",
|
|
9090
9284
|
"type",
|
|
@@ -9236,7 +9430,7 @@ var Vue = (function() {
|
|
|
9236
9430
|
const setupResult = callWithErrorHandling(setup, instance, 0, [/* @__PURE__ */ shallowReadonly(instance.props), setupContext]);
|
|
9237
9431
|
const isAsyncSetup = isPromise(setupResult);
|
|
9238
9432
|
setActiveSub(prevSub);
|
|
9239
|
-
|
|
9433
|
+
restoreCurrentInstance(prev);
|
|
9240
9434
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
9241
9435
|
if (isAsyncSetup) {
|
|
9242
9436
|
const unsetCurrentInstance = () => {
|
|
@@ -9309,7 +9503,7 @@ var Vue = (function() {
|
|
|
9309
9503
|
applyOptions(instance);
|
|
9310
9504
|
} finally {
|
|
9311
9505
|
setActiveSub(prevSub);
|
|
9312
|
-
|
|
9506
|
+
restoreCurrentInstance(prevInstance);
|
|
9313
9507
|
}
|
|
9314
9508
|
}
|
|
9315
9509
|
if (!Component.render && instance.render === NOOP && !isSSR) if (!compile$1 && Component.template)
|
|
@@ -9619,7 +9813,7 @@ var Vue = (function() {
|
|
|
9619
9813
|
}
|
|
9620
9814
|
//#endregion
|
|
9621
9815
|
//#region packages/runtime-core/src/index.ts
|
|
9622
|
-
const version = "3.6.0-
|
|
9816
|
+
const version = "3.6.0-rc.2";
|
|
9623
9817
|
const warn = warn$1;
|
|
9624
9818
|
/**
|
|
9625
9819
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10102,7 +10296,10 @@ var Vue = (function() {
|
|
|
10102
10296
|
}
|
|
10103
10297
|
for (const key in next) {
|
|
10104
10298
|
if (key === "display") hasControlledDisplay = true;
|
|
10105
|
-
|
|
10299
|
+
const value = next[key];
|
|
10300
|
+
if (value != null) {
|
|
10301
|
+
if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
|
|
10302
|
+
} else setStyle(style, key, "");
|
|
10106
10303
|
}
|
|
10107
10304
|
} else if (isCssString) {
|
|
10108
10305
|
if (prev !== next) {
|
|
@@ -10150,6 +10347,14 @@ var Vue = (function() {
|
|
|
10150
10347
|
}
|
|
10151
10348
|
return rawName;
|
|
10152
10349
|
}
|
|
10350
|
+
/**
|
|
10351
|
+
* Browsers update textarea width/height directly during native resize.
|
|
10352
|
+
* Only special-case this common textarea path for now; other resize scenarios
|
|
10353
|
+
* still follow normal vnode style patching.
|
|
10354
|
+
*/
|
|
10355
|
+
function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
10356
|
+
return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
|
|
10357
|
+
}
|
|
10153
10358
|
//#endregion
|
|
10154
10359
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10155
10360
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -10233,7 +10438,7 @@ var Vue = (function() {
|
|
|
10233
10438
|
const existingInvoker = invokers[rawName];
|
|
10234
10439
|
if (nextValue && existingInvoker) existingInvoker.value = sanitizeEventValue(nextValue, rawName);
|
|
10235
10440
|
else {
|
|
10236
|
-
const [name, options] =
|
|
10441
|
+
const [name, options] = parseEventName(rawName);
|
|
10237
10442
|
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(sanitizeEventValue(nextValue, rawName), instance), options);
|
|
10238
10443
|
else if (existingInvoker) {
|
|
10239
10444
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10241,16 +10446,15 @@ var Vue = (function() {
|
|
|
10241
10446
|
}
|
|
10242
10447
|
}
|
|
10243
10448
|
}
|
|
10244
|
-
const optionsModifierRE = /(
|
|
10245
|
-
|
|
10449
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
10450
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
10451
|
+
function parseEventName(name) {
|
|
10246
10452
|
let options;
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
options[m[0].toLowerCase()] = true;
|
|
10253
|
-
}
|
|
10453
|
+
let m;
|
|
10454
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
10455
|
+
if (!options) options = {};
|
|
10456
|
+
name = name.slice(0, name.length - m[1].length);
|
|
10457
|
+
options[m[1].toLowerCase()] = true;
|
|
10254
10458
|
}
|
|
10255
10459
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10256
10460
|
}
|
|
@@ -10261,7 +10465,21 @@ var Vue = (function() {
|
|
|
10261
10465
|
const invoker = (e) => {
|
|
10262
10466
|
if (!e._vts) e._vts = Date.now();
|
|
10263
10467
|
else if (e._vts <= invoker.attached) return;
|
|
10264
|
-
|
|
10468
|
+
const value = invoker.value;
|
|
10469
|
+
if (isArray(value)) {
|
|
10470
|
+
const originalStop = e.stopImmediatePropagation;
|
|
10471
|
+
e.stopImmediatePropagation = () => {
|
|
10472
|
+
originalStop.call(e);
|
|
10473
|
+
e._stopped = true;
|
|
10474
|
+
};
|
|
10475
|
+
const handlers = value.slice();
|
|
10476
|
+
const args = [e];
|
|
10477
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
10478
|
+
if (e._stopped) break;
|
|
10479
|
+
const handler = handlers[i];
|
|
10480
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
10481
|
+
}
|
|
10482
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
10265
10483
|
};
|
|
10266
10484
|
invoker.value = initialValue;
|
|
10267
10485
|
invoker.attached = getNow();
|
|
@@ -10272,16 +10490,6 @@ var Vue = (function() {
|
|
|
10272
10490
|
warn(`Wrong type passed as event handler to ${propName} - did you forget @ or : in front of your prop?\nExpected function or array of functions, received type ${typeof value}.`);
|
|
10273
10491
|
return NOOP;
|
|
10274
10492
|
}
|
|
10275
|
-
function patchStopImmediatePropagation(e, value) {
|
|
10276
|
-
if (isArray(value)) {
|
|
10277
|
-
const originalStop = e.stopImmediatePropagation;
|
|
10278
|
-
e.stopImmediatePropagation = () => {
|
|
10279
|
-
originalStop.call(e);
|
|
10280
|
-
e._stopped = true;
|
|
10281
|
-
};
|
|
10282
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
10283
|
-
} else return value;
|
|
10284
|
-
}
|
|
10285
10493
|
//#endregion
|
|
10286
10494
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
10287
10495
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -10609,7 +10817,10 @@ var Vue = (function() {
|
|
|
10609
10817
|
replacementNodes.push(child);
|
|
10610
10818
|
}
|
|
10611
10819
|
parent.removeChild(o);
|
|
10612
|
-
slotReplacements.set(o,
|
|
10820
|
+
slotReplacements.set(o, {
|
|
10821
|
+
nodes: replacementNodes,
|
|
10822
|
+
usedFallback: !content
|
|
10823
|
+
});
|
|
10613
10824
|
}
|
|
10614
10825
|
this._updateSlotNodes(slotReplacements);
|
|
10615
10826
|
}
|
|
@@ -10783,7 +10994,7 @@ var Vue = (function() {
|
|
|
10783
10994
|
prevChildren = [];
|
|
10784
10995
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
10785
10996
|
const child = children[i];
|
|
10786
|
-
if (child.el && child.el instanceof Element) {
|
|
10997
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
10787
10998
|
prevChildren.push(child);
|
|
10788
10999
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10789
11000
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -11007,7 +11218,8 @@ var Vue = (function() {
|
|
|
11007
11218
|
mounted(el, { value }) {
|
|
11008
11219
|
vModelSetSelected(el, value);
|
|
11009
11220
|
},
|
|
11010
|
-
beforeUpdate(el,
|
|
11221
|
+
beforeUpdate(el, { value }, vnode) {
|
|
11222
|
+
el._modelValue = value;
|
|
11011
11223
|
el[assignKey] = getModelAssigner(vnode);
|
|
11012
11224
|
},
|
|
11013
11225
|
updated(el, { value }) {
|
|
@@ -11018,10 +11230,10 @@ var Vue = (function() {
|
|
|
11018
11230
|
* @internal
|
|
11019
11231
|
*/
|
|
11020
11232
|
const vModelSelectInit = (el, value, number, set) => {
|
|
11021
|
-
|
|
11233
|
+
el._modelValue = value;
|
|
11022
11234
|
addEventListener(el, "change", () => {
|
|
11023
11235
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
11024
|
-
(set || el[assignKey])(el.multiple ?
|
|
11236
|
+
(set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
|
11025
11237
|
el._assigning = true;
|
|
11026
11238
|
nextTick(() => {
|
|
11027
11239
|
el._assigning = false;
|
|
@@ -11032,6 +11244,7 @@ var Vue = (function() {
|
|
|
11032
11244
|
* @internal
|
|
11033
11245
|
*/
|
|
11034
11246
|
const vModelSetSelected = (el, value) => {
|
|
11247
|
+
el._modelValue = value;
|
|
11035
11248
|
if (el._assigning) return;
|
|
11036
11249
|
const isMultiple = el.multiple;
|
|
11037
11250
|
const isArrayValue = isArray(value);
|
|
@@ -12697,6 +12910,7 @@ var Vue = (function() {
|
|
|
12697
12910
|
return [props, callPath];
|
|
12698
12911
|
}
|
|
12699
12912
|
function injectProp(node, prop, context) {
|
|
12913
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) return;
|
|
12700
12914
|
let propsWithInjection;
|
|
12701
12915
|
/**
|
|
12702
12916
|
* 1. mergeProps(...)
|
|
@@ -12735,6 +12949,20 @@ var Vue = (function() {
|
|
|
12735
12949
|
else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
12736
12950
|
else node.arguments[2] = propsWithInjection;
|
|
12737
12951
|
}
|
|
12952
|
+
function injectSlotKey(node, prop) {
|
|
12953
|
+
var _node$arguments, _node$arguments2, _node$arguments3;
|
|
12954
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") return false;
|
|
12955
|
+
const props = node.arguments[2];
|
|
12956
|
+
if (props && !isString(props)) {
|
|
12957
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
12958
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) return true;
|
|
12959
|
+
}
|
|
12960
|
+
(_node$arguments = node.arguments)[2] || (_node$arguments[2] = "{}");
|
|
12961
|
+
(_node$arguments2 = node.arguments)[3] || (_node$arguments2[3] = "undefined");
|
|
12962
|
+
(_node$arguments3 = node.arguments)[4] || (_node$arguments3[4] = "undefined");
|
|
12963
|
+
node.arguments[5] = prop.value;
|
|
12964
|
+
return true;
|
|
12965
|
+
}
|
|
12738
12966
|
function hasProp(prop, props) {
|
|
12739
12967
|
let result = false;
|
|
12740
12968
|
if (prop.key.type === 4) {
|
|
@@ -13004,7 +13232,7 @@ var Vue = (function() {
|
|
|
13004
13232
|
}
|
|
13005
13233
|
},
|
|
13006
13234
|
oncdata(start, end) {
|
|
13007
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13235
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13008
13236
|
else emitError(1, start - 9);
|
|
13009
13237
|
},
|
|
13010
13238
|
onprocessinginstruction(start) {
|
|
@@ -13529,8 +13757,10 @@ var Vue = (function() {
|
|
|
13529
13757
|
imports: [],
|
|
13530
13758
|
cached: [],
|
|
13531
13759
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13760
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
13532
13761
|
temps: 0,
|
|
13533
13762
|
identifiers: Object.create(null),
|
|
13763
|
+
identifierScopes: Object.create(null),
|
|
13534
13764
|
scopes: {
|
|
13535
13765
|
vFor: 0,
|
|
13536
13766
|
vSlot: 0,
|
|
@@ -13581,8 +13811,12 @@ var Vue = (function() {
|
|
|
13581
13811
|
context.parent.children.splice(removalIndex, 1);
|
|
13582
13812
|
},
|
|
13583
13813
|
onNodeRemoved: NOOP,
|
|
13584
|
-
addIdentifiers(exp) {},
|
|
13814
|
+
addIdentifiers(exp, type = "local") {},
|
|
13585
13815
|
removeIdentifiers(exp) {},
|
|
13816
|
+
isSlotScopeIdentifier(name) {
|
|
13817
|
+
const scopes = context.identifierScopes[name];
|
|
13818
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
13819
|
+
},
|
|
13586
13820
|
hoist(exp) {
|
|
13587
13821
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
13588
13822
|
context.hoists.push(exp);
|
|
@@ -13936,6 +14170,7 @@ var Vue = (function() {
|
|
|
13936
14170
|
case 24: break;
|
|
13937
14171
|
case 25: break;
|
|
13938
14172
|
case 26: break;
|
|
14173
|
+
/* v8 ignore start */
|
|
13939
14174
|
case 10: break;
|
|
13940
14175
|
default:
|
|
13941
14176
|
assert(false, `unhandled codegen node type: ${node.type}`);
|
|
@@ -14153,7 +14388,7 @@ var Vue = (function() {
|
|
|
14153
14388
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14154
14389
|
const exp = dir.exp;
|
|
14155
14390
|
const arg = dir.arg;
|
|
14156
|
-
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14391
|
+
if (exp && exp.type === 4 && !(dir.name === "on" && arg) && !(memo && context.vForMemoKeyedNodes.has(node) && arg && arg.type === 4 && arg.content === "key")) dir.exp = processExpression(exp, context, dir.name === "slot");
|
|
14157
14392
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14158
14393
|
}
|
|
14159
14394
|
}
|
|
@@ -14294,10 +14529,9 @@ var Vue = (function() {
|
|
|
14294
14529
|
const isTemplate = isTemplateNode(node);
|
|
14295
14530
|
const memo = findDir(node, "memo");
|
|
14296
14531
|
const keyProp = findProp(node, `key`, false, true);
|
|
14297
|
-
|
|
14532
|
+
keyProp && keyProp.type;
|
|
14298
14533
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
14299
|
-
|
|
14300
|
-
const keyProperty = keyProp && keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
14534
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
14301
14535
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
14302
14536
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
14303
14537
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
|
@@ -15074,7 +15308,7 @@ var Vue = (function() {
|
|
|
15074
15308
|
const child = node.children[i];
|
|
15075
15309
|
if (typeof child !== "object") continue;
|
|
15076
15310
|
if (child.type === 4) parseFilter(child, context);
|
|
15077
|
-
else if (child.type === 8) rewriteFilter(
|
|
15311
|
+
else if (child.type === 8) rewriteFilter(child, context);
|
|
15078
15312
|
else if (child.type === 5) rewriteFilter(child.content, context);
|
|
15079
15313
|
}
|
|
15080
15314
|
}
|
|
@@ -15433,6 +15667,14 @@ var Vue = (function() {
|
|
|
15433
15667
|
const eventOptionModifiers = [];
|
|
15434
15668
|
for (let i = 0; i < modifiers.length; i++) {
|
|
15435
15669
|
const modifier = modifiers[i].content;
|
|
15670
|
+
if (modifier === "delegate") {
|
|
15671
|
+
if (context) {
|
|
15672
|
+
const error = /* @__PURE__ */ new SyntaxError(`.delegate modifier is only supported in Vapor components.`);
|
|
15673
|
+
error.loc = modifiers[i].loc;
|
|
15674
|
+
context.onWarn(error);
|
|
15675
|
+
}
|
|
15676
|
+
continue;
|
|
15677
|
+
}
|
|
15436
15678
|
if (modifier === "native" && context && checkCompatEnabled("COMPILER_V_ON_NATIVE", context, loc)) eventOptionModifiers.push(modifier);
|
|
15437
15679
|
else if (isEventOptionModifier(modifier)) eventOptionModifiers.push(modifier);
|
|
15438
15680
|
else {
|
|
@@ -15509,7 +15751,7 @@ var Vue = (function() {
|
|
|
15509
15751
|
source: ""
|
|
15510
15752
|
}));
|
|
15511
15753
|
const child = node.children[0];
|
|
15512
|
-
if (child.type === 1) {
|
|
15754
|
+
if (child.type === 1 && !findDir(child, "if")) {
|
|
15513
15755
|
for (const p of child.props) if (p.type === 7 && p.name === "show") node.props.push({
|
|
15514
15756
|
type: 6,
|
|
15515
15757
|
name: "persisted",
|