@vue/compat 3.6.0-beta.9 → 3.6.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/vue-compat.d.ts +25 -16
- package/dist/vue.cjs.js +459 -212
- package/dist/vue.cjs.prod.js +385 -164
- package/dist/vue.esm-browser.js +430 -204
- package/dist/vue.esm-browser.prod.js +6 -6
- package/dist/vue.esm-bundler.js +440 -208
- package/dist/vue.global.js +430 -204
- package/dist/vue.global.prod.js +6 -6
- package/dist/vue.runtime.esm-browser.js +430 -204
- package/dist/vue.runtime.esm-browser.prod.js +6 -6
- package/dist/vue.runtime.esm-bundler.js +440 -208
- package/dist/vue.runtime.global.js +430 -204
- 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.1
|
|
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
|
}
|
|
@@ -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);
|
|
@@ -4174,7 +4238,7 @@ var Vue = (function() {
|
|
|
4174
4238
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4175
4239
|
break;
|
|
4176
4240
|
case VaporSlot:
|
|
4177
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node);
|
|
4241
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
4178
4242
|
break;
|
|
4179
4243
|
default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
4180
4244
|
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
@@ -4184,16 +4248,31 @@ var Vue = (function() {
|
|
|
4184
4248
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
4185
4249
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
4186
4250
|
else nextNode = nextSibling(node);
|
|
4187
|
-
if (vnode.type.__vapor)
|
|
4188
|
-
|
|
4189
|
-
|
|
4190
|
-
|
|
4191
|
-
|
|
4192
|
-
|
|
4193
|
-
|
|
4194
|
-
}
|
|
4195
|
-
|
|
4196
|
-
|
|
4251
|
+
if (vnode.type.__vapor) {
|
|
4252
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeBeforeMount;
|
|
4253
|
+
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
4254
|
+
if (vnode.dirs) {
|
|
4255
|
+
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4256
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4257
|
+
}
|
|
4258
|
+
}, () => {
|
|
4259
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
4260
|
+
});
|
|
4261
|
+
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4262
|
+
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
4263
|
+
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
4264
|
+
} else {
|
|
4265
|
+
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4266
|
+
const component = vnode.component;
|
|
4267
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
|
|
4268
|
+
let subTree;
|
|
4269
|
+
if (isFragmentStart) {
|
|
4270
|
+
subTree = createVNode(Fragment);
|
|
4271
|
+
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4272
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4273
|
+
subTree.el = node;
|
|
4274
|
+
component.subTree = subTree;
|
|
4275
|
+
}
|
|
4197
4276
|
}
|
|
4198
4277
|
} else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
|
|
4199
4278
|
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
@@ -4205,7 +4284,7 @@ var Vue = (function() {
|
|
|
4205
4284
|
};
|
|
4206
4285
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
4207
4286
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4208
|
-
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4287
|
+
const { type, dynamicProps, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4209
4288
|
const forcePatch = type === "input" || type === "option";
|
|
4210
4289
|
{
|
|
4211
4290
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
@@ -4223,15 +4302,11 @@ var Vue = (function() {
|
|
|
4223
4302
|
}
|
|
4224
4303
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
4225
4304
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4226
|
-
|
|
4305
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
4306
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4307
|
+
logMismatchError();
|
|
4308
|
+
}
|
|
4227
4309
|
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
4310
|
const cur = next;
|
|
4236
4311
|
next = next.nextSibling;
|
|
4237
4312
|
remove(cur);
|
|
@@ -4250,9 +4325,10 @@ var Vue = (function() {
|
|
|
4250
4325
|
}
|
|
4251
4326
|
if (props) {
|
|
4252
4327
|
const isCustomElement = el.tagName.includes("-");
|
|
4328
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4253
4329
|
for (const key in props) {
|
|
4254
4330
|
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],
|
|
4331
|
+
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
4332
|
}
|
|
4257
4333
|
}
|
|
4258
4334
|
let vnodeHooks;
|
|
@@ -4270,7 +4346,7 @@ var Vue = (function() {
|
|
|
4270
4346
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
4271
4347
|
const children = parentVNode.children;
|
|
4272
4348
|
const l = children.length;
|
|
4273
|
-
let
|
|
4349
|
+
let hasCheckedMismatch = false;
|
|
4274
4350
|
for (let i = 0; i < l; i++) {
|
|
4275
4351
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
4276
4352
|
const isText = vnode.type === Text;
|
|
@@ -4284,12 +4360,12 @@ var Vue = (function() {
|
|
|
4284
4360
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4285
4361
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
4286
4362
|
else {
|
|
4287
|
-
if (!
|
|
4288
|
-
|
|
4363
|
+
if (!hasCheckedMismatch) {
|
|
4364
|
+
hasCheckedMismatch = true;
|
|
4365
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4289
4366
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
4290
|
-
|
|
4367
|
+
logMismatchError();
|
|
4291
4368
|
}
|
|
4292
|
-
logMismatchError();
|
|
4293
4369
|
}
|
|
4294
4370
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4295
4371
|
}
|
|
@@ -4309,7 +4385,7 @@ var Vue = (function() {
|
|
|
4309
4385
|
}
|
|
4310
4386
|
};
|
|
4311
4387
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4312
|
-
if (!
|
|
4388
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4313
4389
|
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
4390
|
logMismatchError();
|
|
4315
4391
|
}
|
|
@@ -4473,7 +4549,9 @@ var Vue = (function() {
|
|
|
4473
4549
|
};
|
|
4474
4550
|
function isMismatchAllowed(el, allowedType) {
|
|
4475
4551
|
if (allowedType === 0 || allowedType === 1) while (el && !el.hasAttribute(allowMismatchAttr)) el = el.parentElement;
|
|
4476
|
-
|
|
4552
|
+
return isMismatchAllowedByAttr(el && el.getAttribute(allowMismatchAttr), allowedType);
|
|
4553
|
+
}
|
|
4554
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
4477
4555
|
if (allowedAttr == null) return false;
|
|
4478
4556
|
else if (allowedAttr === "") return true;
|
|
4479
4557
|
else {
|
|
@@ -4482,6 +4560,16 @@ var Vue = (function() {
|
|
|
4482
4560
|
return list.includes(MismatchTypeString[allowedType]);
|
|
4483
4561
|
}
|
|
4484
4562
|
}
|
|
4563
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
4564
|
+
return isMismatchAllowed(node.parentElement, 1) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
4565
|
+
}
|
|
4566
|
+
function isMismatchAllowedByNode(node) {
|
|
4567
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(node.getAttribute(allowMismatchAttr), 1);
|
|
4568
|
+
}
|
|
4569
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
4570
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
4571
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1);
|
|
4572
|
+
}
|
|
4485
4573
|
//#endregion
|
|
4486
4574
|
//#region packages/runtime-core/src/hydrationStrategies.ts
|
|
4487
4575
|
let requestIdleCallback;
|
|
@@ -4600,11 +4688,16 @@ var Vue = (function() {
|
|
|
4600
4688
|
onError(err);
|
|
4601
4689
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4602
4690
|
});
|
|
4603
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4691
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4604
4692
|
load().then(() => {
|
|
4693
|
+
if (instance.isUnmounted) return;
|
|
4605
4694
|
loaded.value = true;
|
|
4606
4695
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4607
4696
|
}).catch((err) => {
|
|
4697
|
+
if (instance.isUnmounted) {
|
|
4698
|
+
setPendingRequest(null);
|
|
4699
|
+
return;
|
|
4700
|
+
}
|
|
4608
4701
|
onError(err);
|
|
4609
4702
|
error.value = err;
|
|
4610
4703
|
});
|
|
@@ -4662,14 +4755,22 @@ var Vue = (function() {
|
|
|
4662
4755
|
setPendingRequest: (request) => pendingRequest = request
|
|
4663
4756
|
};
|
|
4664
4757
|
}
|
|
4665
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4758
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4666
4759
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4667
4760
|
const error = /* @__PURE__ */ ref();
|
|
4668
4761
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4669
|
-
|
|
4762
|
+
let timeoutTimer;
|
|
4763
|
+
let delayTimer;
|
|
4764
|
+
if (instance) onUnmounted(() => {
|
|
4765
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4766
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4767
|
+
}, instance);
|
|
4768
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4769
|
+
if (instance && instance.isUnmounted) return;
|
|
4670
4770
|
delayed.value = false;
|
|
4671
4771
|
}, delay);
|
|
4672
|
-
if (timeout != null) setTimeout(() => {
|
|
4772
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4773
|
+
if (instance && instance.isUnmounted) return;
|
|
4673
4774
|
if (!loaded.value && !error.value) {
|
|
4674
4775
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4675
4776
|
onError(err);
|
|
@@ -4687,6 +4788,7 @@ var Vue = (function() {
|
|
|
4687
4788
|
* @internal
|
|
4688
4789
|
*/
|
|
4689
4790
|
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4791
|
+
const wasConnected = el.isConnected;
|
|
4690
4792
|
let patched = false;
|
|
4691
4793
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4692
4794
|
const performHydrate = () => {
|
|
@@ -4697,6 +4799,7 @@ var Vue = (function() {
|
|
|
4697
4799
|
}
|
|
4698
4800
|
return;
|
|
4699
4801
|
}
|
|
4802
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
4700
4803
|
hydrate();
|
|
4701
4804
|
};
|
|
4702
4805
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5277,8 +5380,9 @@ var Vue = (function() {
|
|
|
5277
5380
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5278
5381
|
* @private
|
|
5279
5382
|
*/
|
|
5280
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5383
|
+
function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
|
|
5281
5384
|
let slot = slots[name];
|
|
5385
|
+
if (fallback) fallback.__vdom = true;
|
|
5282
5386
|
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5283
5387
|
if (vaporSlot) {
|
|
5284
5388
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
@@ -5286,25 +5390,35 @@ var Vue = (function() {
|
|
|
5286
5390
|
slot: vaporSlot,
|
|
5287
5391
|
fallback
|
|
5288
5392
|
};
|
|
5393
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5289
5394
|
return ret;
|
|
5290
5395
|
}
|
|
5291
5396
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
5292
|
-
const
|
|
5293
|
-
|
|
5294
|
-
|
|
5397
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
5398
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
5399
|
+
if (name !== "default") slotProps.name = name;
|
|
5400
|
+
return openBlock(), createBlock(Fragment, null, [createVNode("slot", slotProps, fallback && fallback())], hasProps ? -2 : 64);
|
|
5295
5401
|
}
|
|
5296
5402
|
if (slot && slot.length > 1) {
|
|
5297
5403
|
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
5404
|
slot = () => [];
|
|
5299
5405
|
}
|
|
5300
5406
|
if (slot && slot._c) slot._d = false;
|
|
5407
|
+
const prevStackSize = blockStack.length;
|
|
5301
5408
|
openBlock();
|
|
5302
|
-
|
|
5303
|
-
|
|
5304
|
-
|
|
5305
|
-
|
|
5409
|
+
let rendered;
|
|
5410
|
+
try {
|
|
5411
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5412
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
5413
|
+
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
5414
|
+
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
5415
|
+
} catch (err) {
|
|
5416
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5417
|
+
throw err;
|
|
5418
|
+
} finally {
|
|
5419
|
+
if (slot && slot._c) slot._d = true;
|
|
5420
|
+
}
|
|
5306
5421
|
if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
5307
|
-
if (slot && slot._c) slot._d = true;
|
|
5308
5422
|
return rendered;
|
|
5309
5423
|
}
|
|
5310
5424
|
function ensureValidVNode(vnodes) {
|
|
@@ -5317,9 +5431,7 @@ var Vue = (function() {
|
|
|
5317
5431
|
}
|
|
5318
5432
|
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5319
5433
|
let vaporSlot;
|
|
5320
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs))
|
|
5321
|
-
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
5322
|
-
}
|
|
5434
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5323
5435
|
}
|
|
5324
5436
|
//#endregion
|
|
5325
5437
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
@@ -5874,26 +5986,39 @@ var Vue = (function() {
|
|
|
5874
5986
|
function withAsyncContext(getAwaitable) {
|
|
5875
5987
|
const ctx = getCurrentGenericInstance();
|
|
5876
5988
|
const inSSRSetup = isInSSRComponentSetup;
|
|
5989
|
+
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5877
5990
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5878
5991
|
let awaitable = getAwaitable();
|
|
5879
5992
|
setCurrentInstance(null, void 0);
|
|
5880
5993
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5881
5994
|
const restore = () => {
|
|
5995
|
+
const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5882
5996
|
setCurrentInstance(ctx);
|
|
5883
5997
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
5998
|
+
const reset = restoreAsyncContext && restoreAsyncContext();
|
|
5999
|
+
return () => {
|
|
6000
|
+
if (reset) reset();
|
|
6001
|
+
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6002
|
+
};
|
|
5884
6003
|
};
|
|
5885
6004
|
const cleanup = () => {
|
|
5886
6005
|
setCurrentInstance(null, void 0);
|
|
5887
6006
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5888
6007
|
};
|
|
5889
6008
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5890
|
-
restore();
|
|
5891
|
-
Promise.resolve().then(() => Promise.resolve().then(
|
|
6009
|
+
const reset = restore();
|
|
6010
|
+
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6011
|
+
if (reset) reset();
|
|
6012
|
+
cleanup();
|
|
6013
|
+
}));
|
|
5892
6014
|
throw e;
|
|
5893
6015
|
});
|
|
5894
6016
|
return [awaitable, () => {
|
|
5895
|
-
restore();
|
|
5896
|
-
Promise.resolve().then(
|
|
6017
|
+
const reset = restore();
|
|
6018
|
+
Promise.resolve().then(() => {
|
|
6019
|
+
if (reset) reset();
|
|
6020
|
+
cleanup();
|
|
6021
|
+
});
|
|
5897
6022
|
}];
|
|
5898
6023
|
}
|
|
5899
6024
|
//#endregion
|
|
@@ -6211,7 +6336,7 @@ var Vue = (function() {
|
|
|
6211
6336
|
if (options.el) return vm.$mount(options.el);
|
|
6212
6337
|
else return vm;
|
|
6213
6338
|
}
|
|
6214
|
-
Vue.version = `2.6.14-compat:3.6.0-
|
|
6339
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.1`;
|
|
6215
6340
|
Vue.config = singletonApp.config;
|
|
6216
6341
|
Vue.use = (plugin, ...options) => {
|
|
6217
6342
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6466,7 +6591,9 @@ var Vue = (function() {
|
|
|
6466
6591
|
else Object.keys(val).forEach((key) => {
|
|
6467
6592
|
try {
|
|
6468
6593
|
defineReactiveSimple(val, key, val[key]);
|
|
6469
|
-
} catch (e) {
|
|
6594
|
+
} catch (e) {
|
|
6595
|
+
warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6596
|
+
}
|
|
6470
6597
|
});
|
|
6471
6598
|
}
|
|
6472
6599
|
const i = obj.$;
|
|
@@ -6711,12 +6838,13 @@ var Vue = (function() {
|
|
|
6711
6838
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6712
6839
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6713
6840
|
}
|
|
6714
|
-
|
|
6841
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6842
|
+
if (!hasVModel) {
|
|
6715
6843
|
localValue = value;
|
|
6716
6844
|
trigger();
|
|
6717
6845
|
}
|
|
6718
6846
|
i.emit(`update:${name}`, emittedValue);
|
|
6719
|
-
if (hasChanged(value,
|
|
6847
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6720
6848
|
prevSetValue = value;
|
|
6721
6849
|
prevEmittedValue = emittedValue;
|
|
6722
6850
|
}
|
|
@@ -6829,7 +6957,8 @@ var Vue = (function() {
|
|
|
6829
6957
|
function isEmitListener(options, key) {
|
|
6830
6958
|
if (!options || !isOn(key)) return false;
|
|
6831
6959
|
if (key.startsWith(compatModelEventPrefix)) return true;
|
|
6832
|
-
key = key.slice(2)
|
|
6960
|
+
key = key.slice(2);
|
|
6961
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
6833
6962
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
6834
6963
|
}
|
|
6835
6964
|
//#endregion
|
|
@@ -7347,7 +7476,7 @@ var Vue = (function() {
|
|
|
7347
7476
|
const receivedType = toRawType(value);
|
|
7348
7477
|
const expectedValue = styleValue(value, expectedType);
|
|
7349
7478
|
const receivedValue = styleValue(value, receivedType);
|
|
7350
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) &&
|
|
7479
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
7351
7480
|
message += `, got ${receivedType} `;
|
|
7352
7481
|
if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
|
|
7353
7482
|
return message;
|
|
@@ -7356,7 +7485,8 @@ var Vue = (function() {
|
|
|
7356
7485
|
* dev only
|
|
7357
7486
|
*/
|
|
7358
7487
|
function styleValue(value, type) {
|
|
7359
|
-
if (
|
|
7488
|
+
if (isSymbol(value)) return value.toString();
|
|
7489
|
+
else if (type === "String") return `"${value}"`;
|
|
7360
7490
|
else if (type === "Number") return `${Number(value)}`;
|
|
7361
7491
|
else return `${value}`;
|
|
7362
7492
|
}
|
|
@@ -7373,8 +7503,11 @@ var Vue = (function() {
|
|
|
7373
7503
|
/**
|
|
7374
7504
|
* dev only
|
|
7375
7505
|
*/
|
|
7376
|
-
function
|
|
7377
|
-
return args.
|
|
7506
|
+
function isCoercible(...args) {
|
|
7507
|
+
return args.every((elem) => {
|
|
7508
|
+
const value = elem.toLowerCase();
|
|
7509
|
+
return value !== "boolean" && value !== "symbol";
|
|
7510
|
+
});
|
|
7378
7511
|
}
|
|
7379
7512
|
//#endregion
|
|
7380
7513
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
@@ -7679,7 +7812,7 @@ var Vue = (function() {
|
|
|
7679
7812
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
7680
7813
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7681
7814
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7682
|
-
if (isHmrUpdating) {
|
|
7815
|
+
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
7683
7816
|
patchFlag = 0;
|
|
7684
7817
|
optimized = false;
|
|
7685
7818
|
dynamicChildren = null;
|
|
@@ -7759,19 +7892,35 @@ var Vue = (function() {
|
|
|
7759
7892
|
n2.slotScopeIds = slotScopeIds;
|
|
7760
7893
|
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7761
7894
|
else {
|
|
7895
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7762
7896
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
7763
7897
|
if (n2.dirs) {
|
|
7764
7898
|
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
7765
7899
|
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
7766
7900
|
}
|
|
7901
|
+
}, () => {
|
|
7902
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
7767
7903
|
});
|
|
7768
7904
|
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
7905
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
7906
|
+
if (vnodeMountedHook) {
|
|
7907
|
+
const scopedVNode = n2;
|
|
7908
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
7909
|
+
}
|
|
7769
7910
|
}
|
|
7770
7911
|
else {
|
|
7771
|
-
|
|
7912
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
7913
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
7772
7914
|
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7915
|
+
}, () => {
|
|
7916
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
7917
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
7773
7918
|
});
|
|
7774
|
-
|
|
7919
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
7920
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
7921
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7922
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
7923
|
+
}, void 0, parentSuspense);
|
|
7775
7924
|
}
|
|
7776
7925
|
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
7777
7926
|
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
@@ -8127,8 +8276,10 @@ var Vue = (function() {
|
|
|
8127
8276
|
else hostInsert(el, container, anchor);
|
|
8128
8277
|
};
|
|
8129
8278
|
const performLeave = () => {
|
|
8279
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8130
8280
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
8131
|
-
|
|
8281
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
8282
|
+
else leave(el, () => {
|
|
8132
8283
|
remove();
|
|
8133
8284
|
afterLeave && afterLeave();
|
|
8134
8285
|
});
|
|
@@ -8159,7 +8310,10 @@ var Vue = (function() {
|
|
|
8159
8310
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8160
8311
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8161
8312
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8162
|
-
if (
|
|
8313
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8314
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8315
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8316
|
+
}, void 0, parentSuspense);
|
|
8163
8317
|
return;
|
|
8164
8318
|
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8165
8319
|
else {
|
|
@@ -8221,7 +8375,7 @@ var Vue = (function() {
|
|
|
8221
8375
|
if (effect) {
|
|
8222
8376
|
effect.stop();
|
|
8223
8377
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8224
|
-
}
|
|
8378
|
+
} else if (doRemove && subTree && instance.vnode.el) remove(subTree);
|
|
8225
8379
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8226
8380
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8227
8381
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8348,6 +8502,10 @@ var Vue = (function() {
|
|
|
8348
8502
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
8349
8503
|
}
|
|
8350
8504
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8505
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
8506
|
+
insert();
|
|
8507
|
+
return;
|
|
8508
|
+
}
|
|
8351
8509
|
if (force || needTransition(parentSuspense, transition)) {
|
|
8352
8510
|
transition.beforeEnter(el);
|
|
8353
8511
|
insert();
|
|
@@ -8550,15 +8708,19 @@ var Vue = (function() {
|
|
|
8550
8708
|
if (suspense.isHydrating) suspense.isHydrating = false;
|
|
8551
8709
|
else if (!resume) {
|
|
8552
8710
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
8711
|
+
let hasUpdatedAnchor = false;
|
|
8553
8712
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
8554
8713
|
if (pendingId === suspense.pendingId) {
|
|
8555
|
-
move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8714
|
+
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8556
8715
|
queuePostFlushCb(effects);
|
|
8557
8716
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8558
8717
|
}
|
|
8559
8718
|
};
|
|
8560
8719
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8561
|
-
if (parentNode(activeBranch.el) === container)
|
|
8720
|
+
if (parentNode(activeBranch.el) === container) {
|
|
8721
|
+
anchor = next(activeBranch);
|
|
8722
|
+
hasUpdatedAnchor = true;
|
|
8723
|
+
}
|
|
8562
8724
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8563
8725
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8564
8726
|
}
|
|
@@ -8622,6 +8784,7 @@ var Vue = (function() {
|
|
|
8622
8784
|
handleError(err, instance, 0);
|
|
8623
8785
|
}).then((asyncSetupResult) => {
|
|
8624
8786
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
8787
|
+
setCurrentInstance(null, void 0);
|
|
8625
8788
|
instance.asyncResolved = true;
|
|
8626
8789
|
onResolve(asyncSetupResult);
|
|
8627
8790
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -8954,12 +9117,30 @@ var Vue = (function() {
|
|
|
8954
9117
|
el: vnode.el,
|
|
8955
9118
|
anchor: vnode.anchor,
|
|
8956
9119
|
ctx: vnode.ctx,
|
|
8957
|
-
ce: vnode.ce
|
|
9120
|
+
ce: vnode.ce,
|
|
9121
|
+
vi: vnode.vi,
|
|
9122
|
+
vs: cloneVaporSlotMeta(vnode),
|
|
9123
|
+
vb: vnode.vb
|
|
8958
9124
|
};
|
|
8959
9125
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
8960
9126
|
defineLegacyVNodeProperties(cloned);
|
|
8961
9127
|
return cloned;
|
|
8962
9128
|
}
|
|
9129
|
+
function cloneVaporSlotMeta(vnode) {
|
|
9130
|
+
const vaporSlot = vnode.vs;
|
|
9131
|
+
if (!vaporSlot) return vaporSlot;
|
|
9132
|
+
const cloned = {
|
|
9133
|
+
slot: vaporSlot.slot,
|
|
9134
|
+
fallback: vaporSlot.fallback,
|
|
9135
|
+
outletFallback: vaporSlot.outletFallback
|
|
9136
|
+
};
|
|
9137
|
+
if (vnode.el) {
|
|
9138
|
+
cloned.state = vaporSlot.state;
|
|
9139
|
+
cloned.ref = vaporSlot.ref;
|
|
9140
|
+
cloned.scope = vaporSlot.scope;
|
|
9141
|
+
}
|
|
9142
|
+
return cloned;
|
|
9143
|
+
}
|
|
8963
9144
|
/**
|
|
8964
9145
|
* Dev only, for HMR of hoisted vnodes reused in v-for
|
|
8965
9146
|
* https://github.com/vitejs/vite/issues/2022
|
|
@@ -9022,6 +9203,10 @@ var Vue = (function() {
|
|
|
9022
9203
|
}
|
|
9023
9204
|
}
|
|
9024
9205
|
else if (isFunction(children)) {
|
|
9206
|
+
if (shapeFlag & 65) {
|
|
9207
|
+
normalizeChildren(vnode, { default: children });
|
|
9208
|
+
return;
|
|
9209
|
+
}
|
|
9025
9210
|
children = {
|
|
9026
9211
|
default: children,
|
|
9027
9212
|
_ctx: currentRenderingInstance
|
|
@@ -9619,7 +9804,7 @@ var Vue = (function() {
|
|
|
9619
9804
|
}
|
|
9620
9805
|
//#endregion
|
|
9621
9806
|
//#region packages/runtime-core/src/index.ts
|
|
9622
|
-
const version = "3.6.0-
|
|
9807
|
+
const version = "3.6.0-rc.1";
|
|
9623
9808
|
const warn = warn$1;
|
|
9624
9809
|
/**
|
|
9625
9810
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10102,7 +10287,10 @@ var Vue = (function() {
|
|
|
10102
10287
|
}
|
|
10103
10288
|
for (const key in next) {
|
|
10104
10289
|
if (key === "display") hasControlledDisplay = true;
|
|
10105
|
-
|
|
10290
|
+
const value = next[key];
|
|
10291
|
+
if (value != null) {
|
|
10292
|
+
if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
|
|
10293
|
+
} else setStyle(style, key, "");
|
|
10106
10294
|
}
|
|
10107
10295
|
} else if (isCssString) {
|
|
10108
10296
|
if (prev !== next) {
|
|
@@ -10150,6 +10338,14 @@ var Vue = (function() {
|
|
|
10150
10338
|
}
|
|
10151
10339
|
return rawName;
|
|
10152
10340
|
}
|
|
10341
|
+
/**
|
|
10342
|
+
* Browsers update textarea width/height directly during native resize.
|
|
10343
|
+
* Only special-case this common textarea path for now; other resize scenarios
|
|
10344
|
+
* still follow normal vnode style patching.
|
|
10345
|
+
*/
|
|
10346
|
+
function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
10347
|
+
return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
|
|
10348
|
+
}
|
|
10153
10349
|
//#endregion
|
|
10154
10350
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10155
10351
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -10233,7 +10429,7 @@ var Vue = (function() {
|
|
|
10233
10429
|
const existingInvoker = invokers[rawName];
|
|
10234
10430
|
if (nextValue && existingInvoker) existingInvoker.value = sanitizeEventValue(nextValue, rawName);
|
|
10235
10431
|
else {
|
|
10236
|
-
const [name, options] =
|
|
10432
|
+
const [name, options] = parseEventName(rawName);
|
|
10237
10433
|
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(sanitizeEventValue(nextValue, rawName), instance), options);
|
|
10238
10434
|
else if (existingInvoker) {
|
|
10239
10435
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10241,16 +10437,15 @@ var Vue = (function() {
|
|
|
10241
10437
|
}
|
|
10242
10438
|
}
|
|
10243
10439
|
}
|
|
10244
|
-
const optionsModifierRE = /(
|
|
10245
|
-
|
|
10440
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
10441
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
10442
|
+
function parseEventName(name) {
|
|
10246
10443
|
let options;
|
|
10247
|
-
|
|
10248
|
-
|
|
10249
|
-
|
|
10250
|
-
|
|
10251
|
-
|
|
10252
|
-
options[m[0].toLowerCase()] = true;
|
|
10253
|
-
}
|
|
10444
|
+
let m;
|
|
10445
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
10446
|
+
if (!options) options = {};
|
|
10447
|
+
name = name.slice(0, name.length - m[1].length);
|
|
10448
|
+
options[m[1].toLowerCase()] = true;
|
|
10254
10449
|
}
|
|
10255
10450
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10256
10451
|
}
|
|
@@ -10261,7 +10456,21 @@ var Vue = (function() {
|
|
|
10261
10456
|
const invoker = (e) => {
|
|
10262
10457
|
if (!e._vts) e._vts = Date.now();
|
|
10263
10458
|
else if (e._vts <= invoker.attached) return;
|
|
10264
|
-
|
|
10459
|
+
const value = invoker.value;
|
|
10460
|
+
if (isArray(value)) {
|
|
10461
|
+
const originalStop = e.stopImmediatePropagation;
|
|
10462
|
+
e.stopImmediatePropagation = () => {
|
|
10463
|
+
originalStop.call(e);
|
|
10464
|
+
e._stopped = true;
|
|
10465
|
+
};
|
|
10466
|
+
const handlers = value.slice();
|
|
10467
|
+
const args = [e];
|
|
10468
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
10469
|
+
if (e._stopped) break;
|
|
10470
|
+
const handler = handlers[i];
|
|
10471
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
10472
|
+
}
|
|
10473
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
10265
10474
|
};
|
|
10266
10475
|
invoker.value = initialValue;
|
|
10267
10476
|
invoker.attached = getNow();
|
|
@@ -10272,16 +10481,6 @@ var Vue = (function() {
|
|
|
10272
10481
|
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
10482
|
return NOOP;
|
|
10274
10483
|
}
|
|
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
10484
|
//#endregion
|
|
10286
10485
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
10287
10486
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -10609,7 +10808,10 @@ var Vue = (function() {
|
|
|
10609
10808
|
replacementNodes.push(child);
|
|
10610
10809
|
}
|
|
10611
10810
|
parent.removeChild(o);
|
|
10612
|
-
slotReplacements.set(o,
|
|
10811
|
+
slotReplacements.set(o, {
|
|
10812
|
+
nodes: replacementNodes,
|
|
10813
|
+
usedFallback: !content
|
|
10814
|
+
});
|
|
10613
10815
|
}
|
|
10614
10816
|
this._updateSlotNodes(slotReplacements);
|
|
10615
10817
|
}
|
|
@@ -10783,7 +10985,7 @@ var Vue = (function() {
|
|
|
10783
10985
|
prevChildren = [];
|
|
10784
10986
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
10785
10987
|
const child = children[i];
|
|
10786
|
-
if (child.el && child.el instanceof Element) {
|
|
10988
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
10787
10989
|
prevChildren.push(child);
|
|
10788
10990
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10789
10991
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -11007,7 +11209,8 @@ var Vue = (function() {
|
|
|
11007
11209
|
mounted(el, { value }) {
|
|
11008
11210
|
vModelSetSelected(el, value);
|
|
11009
11211
|
},
|
|
11010
|
-
beforeUpdate(el,
|
|
11212
|
+
beforeUpdate(el, { value }, vnode) {
|
|
11213
|
+
el._modelValue = value;
|
|
11011
11214
|
el[assignKey] = getModelAssigner(vnode);
|
|
11012
11215
|
},
|
|
11013
11216
|
updated(el, { value }) {
|
|
@@ -11018,10 +11221,10 @@ var Vue = (function() {
|
|
|
11018
11221
|
* @internal
|
|
11019
11222
|
*/
|
|
11020
11223
|
const vModelSelectInit = (el, value, number, set) => {
|
|
11021
|
-
|
|
11224
|
+
el._modelValue = value;
|
|
11022
11225
|
addEventListener(el, "change", () => {
|
|
11023
11226
|
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 ?
|
|
11227
|
+
(set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
|
11025
11228
|
el._assigning = true;
|
|
11026
11229
|
nextTick(() => {
|
|
11027
11230
|
el._assigning = false;
|
|
@@ -11032,6 +11235,7 @@ var Vue = (function() {
|
|
|
11032
11235
|
* @internal
|
|
11033
11236
|
*/
|
|
11034
11237
|
const vModelSetSelected = (el, value) => {
|
|
11238
|
+
el._modelValue = value;
|
|
11035
11239
|
if (el._assigning) return;
|
|
11036
11240
|
const isMultiple = el.multiple;
|
|
11037
11241
|
const isArrayValue = isArray(value);
|
|
@@ -12697,6 +12901,7 @@ var Vue = (function() {
|
|
|
12697
12901
|
return [props, callPath];
|
|
12698
12902
|
}
|
|
12699
12903
|
function injectProp(node, prop, context) {
|
|
12904
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) return;
|
|
12700
12905
|
let propsWithInjection;
|
|
12701
12906
|
/**
|
|
12702
12907
|
* 1. mergeProps(...)
|
|
@@ -12735,6 +12940,20 @@ var Vue = (function() {
|
|
|
12735
12940
|
else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
12736
12941
|
else node.arguments[2] = propsWithInjection;
|
|
12737
12942
|
}
|
|
12943
|
+
function injectSlotKey(node, prop) {
|
|
12944
|
+
var _node$arguments, _node$arguments2, _node$arguments3;
|
|
12945
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") return false;
|
|
12946
|
+
const props = node.arguments[2];
|
|
12947
|
+
if (props && !isString(props)) {
|
|
12948
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
12949
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) return true;
|
|
12950
|
+
}
|
|
12951
|
+
(_node$arguments = node.arguments)[2] || (_node$arguments[2] = "{}");
|
|
12952
|
+
(_node$arguments2 = node.arguments)[3] || (_node$arguments2[3] = "undefined");
|
|
12953
|
+
(_node$arguments3 = node.arguments)[4] || (_node$arguments3[4] = "undefined");
|
|
12954
|
+
node.arguments[5] = prop.value;
|
|
12955
|
+
return true;
|
|
12956
|
+
}
|
|
12738
12957
|
function hasProp(prop, props) {
|
|
12739
12958
|
let result = false;
|
|
12740
12959
|
if (prop.key.type === 4) {
|
|
@@ -13004,7 +13223,7 @@ var Vue = (function() {
|
|
|
13004
13223
|
}
|
|
13005
13224
|
},
|
|
13006
13225
|
oncdata(start, end) {
|
|
13007
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
13226
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13008
13227
|
else emitError(1, start - 9);
|
|
13009
13228
|
},
|
|
13010
13229
|
onprocessinginstruction(start) {
|
|
@@ -13496,7 +13715,7 @@ var Vue = (function() {
|
|
|
13496
13715
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
13497
13716
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
13498
13717
|
}
|
|
13499
|
-
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13718
|
+
function createTransformContext(root, { filename = "", prefixIdentifiers = false, hoistStatic = false, hmr = false, cacheHandlers = false, nodeTransforms = [], directiveTransforms = {}, transformHoist = null, isBuiltInComponent = NOOP, isCustomElement = NOOP, expressionPlugins = [], scopeId = null, slotted = true, ssr = false, inSSR = false, ssrCssVars = ``, bindingMetadata = EMPTY_OBJ, inline = false, isTS = false, eventDelegation = true, onError = defaultOnError, onWarn = defaultOnWarn, compatConfig }) {
|
|
13500
13719
|
const context = {
|
|
13501
13720
|
filename,
|
|
13502
13721
|
selfName: getSelfName(filename),
|
|
@@ -13518,6 +13737,7 @@ var Vue = (function() {
|
|
|
13518
13737
|
bindingMetadata,
|
|
13519
13738
|
inline,
|
|
13520
13739
|
isTS,
|
|
13740
|
+
eventDelegation,
|
|
13521
13741
|
onError,
|
|
13522
13742
|
onWarn,
|
|
13523
13743
|
compatConfig,
|
|
@@ -13529,8 +13749,10 @@ var Vue = (function() {
|
|
|
13529
13749
|
imports: [],
|
|
13530
13750
|
cached: [],
|
|
13531
13751
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
13752
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
13532
13753
|
temps: 0,
|
|
13533
13754
|
identifiers: Object.create(null),
|
|
13755
|
+
identifierScopes: Object.create(null),
|
|
13534
13756
|
scopes: {
|
|
13535
13757
|
vFor: 0,
|
|
13536
13758
|
vSlot: 0,
|
|
@@ -13581,8 +13803,12 @@ var Vue = (function() {
|
|
|
13581
13803
|
context.parent.children.splice(removalIndex, 1);
|
|
13582
13804
|
},
|
|
13583
13805
|
onNodeRemoved: NOOP,
|
|
13584
|
-
addIdentifiers(exp) {},
|
|
13806
|
+
addIdentifiers(exp, type = "local") {},
|
|
13585
13807
|
removeIdentifiers(exp) {},
|
|
13808
|
+
isSlotScopeIdentifier(name) {
|
|
13809
|
+
const scopes = context.identifierScopes[name];
|
|
13810
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
13811
|
+
},
|
|
13586
13812
|
hoist(exp) {
|
|
13587
13813
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
13588
13814
|
context.hoists.push(exp);
|
|
@@ -13936,6 +14162,7 @@ var Vue = (function() {
|
|
|
13936
14162
|
case 24: break;
|
|
13937
14163
|
case 25: break;
|
|
13938
14164
|
case 26: break;
|
|
14165
|
+
/* v8 ignore start */
|
|
13939
14166
|
case 10: break;
|
|
13940
14167
|
default:
|
|
13941
14168
|
assert(false, `unhandled codegen node type: ${node.type}`);
|
|
@@ -14153,7 +14380,7 @@ var Vue = (function() {
|
|
|
14153
14380
|
if (dir.type === 7 && dir.name !== "for") {
|
|
14154
14381
|
const exp = dir.exp;
|
|
14155
14382
|
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");
|
|
14383
|
+
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
14384
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
14158
14385
|
}
|
|
14159
14386
|
}
|
|
@@ -14294,10 +14521,9 @@ var Vue = (function() {
|
|
|
14294
14521
|
const isTemplate = isTemplateNode(node);
|
|
14295
14522
|
const memo = findDir(node, "memo");
|
|
14296
14523
|
const keyProp = findProp(node, `key`, false, true);
|
|
14297
|
-
|
|
14524
|
+
keyProp && keyProp.type;
|
|
14298
14525
|
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;
|
|
14526
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
14301
14527
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
14302
14528
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
14303
14529
|
forNode.codegenNode = createVNodeCall(context, helper(FRAGMENT), void 0, renderExp, fragmentFlag, void 0, void 0, true, !isStableFragment, false, node.loc);
|
|
@@ -15074,7 +15300,7 @@ var Vue = (function() {
|
|
|
15074
15300
|
const child = node.children[i];
|
|
15075
15301
|
if (typeof child !== "object") continue;
|
|
15076
15302
|
if (child.type === 4) parseFilter(child, context);
|
|
15077
|
-
else if (child.type === 8) rewriteFilter(
|
|
15303
|
+
else if (child.type === 8) rewriteFilter(child, context);
|
|
15078
15304
|
else if (child.type === 5) rewriteFilter(child.content, context);
|
|
15079
15305
|
}
|
|
15080
15306
|
}
|
|
@@ -15509,7 +15735,7 @@ var Vue = (function() {
|
|
|
15509
15735
|
source: ""
|
|
15510
15736
|
}));
|
|
15511
15737
|
const child = node.children[0];
|
|
15512
|
-
if (child.type === 1) {
|
|
15738
|
+
if (child.type === 1 && !findDir(child, "if")) {
|
|
15513
15739
|
for (const p of child.props) if (p.type === 7 && p.name === "show") node.props.push({
|
|
15514
15740
|
type: 6,
|
|
15515
15741
|
name: "persisted",
|