@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
package/dist/vue.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -566,6 +566,13 @@ function warn$2(msg, ...args) {
|
|
|
566
566
|
const notifyBuffer = [];
|
|
567
567
|
let batchDepth = 0;
|
|
568
568
|
let activeSub = void 0;
|
|
569
|
+
let runDepth = 0;
|
|
570
|
+
function incRunDepth() {
|
|
571
|
+
++runDepth;
|
|
572
|
+
}
|
|
573
|
+
function decRunDepth() {
|
|
574
|
+
--runDepth;
|
|
575
|
+
}
|
|
569
576
|
let globalVersion = 0;
|
|
570
577
|
let notifyIndex = 0;
|
|
571
578
|
let notifyBufferLength = 0;
|
|
@@ -639,8 +646,10 @@ function propagate(link) {
|
|
|
639
646
|
const sub = link.sub;
|
|
640
647
|
let flags = sub.flags;
|
|
641
648
|
if (flags & 3) {
|
|
642
|
-
if (!(flags & 60))
|
|
643
|
-
|
|
649
|
+
if (!(flags & 60)) {
|
|
650
|
+
sub.flags = flags | 32;
|
|
651
|
+
if (runDepth) sub.flags |= 8;
|
|
652
|
+
} else if (!(flags & 12)) flags = 0;
|
|
644
653
|
else if (!(flags & 4)) sub.flags = flags & -9 | 32;
|
|
645
654
|
else if (!(flags & 48) && isValidLink(link, sub)) {
|
|
646
655
|
sub.flags = flags | 40;
|
|
@@ -709,13 +718,13 @@ function checkDirty(link, sub) {
|
|
|
709
718
|
let dirty = false;
|
|
710
719
|
if (sub.flags & 16) dirty = true;
|
|
711
720
|
else if ((depFlags & 17) === 17) {
|
|
721
|
+
const subs = dep.subs;
|
|
712
722
|
if (dep.update()) {
|
|
713
|
-
const subs = dep.subs;
|
|
714
723
|
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
715
724
|
dirty = true;
|
|
716
725
|
}
|
|
717
726
|
} else if ((depFlags & 33) === 33) {
|
|
718
|
-
|
|
727
|
+
stack = {
|
|
719
728
|
value: link,
|
|
720
729
|
prev: stack
|
|
721
730
|
};
|
|
@@ -730,15 +739,12 @@ function checkDirty(link, sub) {
|
|
|
730
739
|
}
|
|
731
740
|
while (checkDepth) {
|
|
732
741
|
--checkDepth;
|
|
733
|
-
|
|
734
|
-
|
|
735
|
-
if (hasMultipleSubs) {
|
|
736
|
-
link = stack.value;
|
|
737
|
-
stack = stack.prev;
|
|
738
|
-
} else link = firstSub;
|
|
742
|
+
link = stack.value;
|
|
743
|
+
stack = stack.prev;
|
|
739
744
|
if (dirty) {
|
|
745
|
+
const subs = sub.subs;
|
|
740
746
|
if (sub.update()) {
|
|
741
|
-
if (
|
|
747
|
+
if (subs.nextSub !== void 0) shallowPropagate(subs);
|
|
742
748
|
sub = link.sub;
|
|
743
749
|
continue;
|
|
744
750
|
}
|
|
@@ -750,7 +756,7 @@ function checkDirty(link, sub) {
|
|
|
750
756
|
}
|
|
751
757
|
dirty = false;
|
|
752
758
|
}
|
|
753
|
-
return dirty;
|
|
759
|
+
return dirty && !!sub.flags;
|
|
754
760
|
} while (true);
|
|
755
761
|
}
|
|
756
762
|
function shallowPropagate(link) {
|
|
@@ -1133,7 +1139,7 @@ var MutableReactiveHandler = class extends BaseReactiveHandler {
|
|
|
1133
1139
|
}
|
|
1134
1140
|
const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
|
|
1135
1141
|
const result = Reflect.set(target, key, value, /* @__PURE__ */ isRef(target) ? target : receiver);
|
|
1136
|
-
if (target === /* @__PURE__ */ toRaw(receiver)) {
|
|
1142
|
+
if (target === /* @__PURE__ */ toRaw(receiver) && result) {
|
|
1137
1143
|
if (!hadKey) trigger(target, "add", key, value);
|
|
1138
1144
|
else if (hasChanged(value, oldValue)) trigger(target, "set", key, value, oldValue);
|
|
1139
1145
|
}
|
|
@@ -1351,9 +1357,6 @@ function targetTypeMap(rawType) {
|
|
|
1351
1357
|
default: return 0;
|
|
1352
1358
|
}
|
|
1353
1359
|
}
|
|
1354
|
-
function getTargetType(value) {
|
|
1355
|
-
return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
|
|
1356
|
-
}
|
|
1357
1360
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1358
1361
|
function reactive(target) {
|
|
1359
1362
|
if (/* @__PURE__ */ isReadonly(target)) return target;
|
|
@@ -1466,10 +1469,11 @@ function createReactiveObject(target, isReadonly, baseHandlers, collectionHandle
|
|
|
1466
1469
|
return target;
|
|
1467
1470
|
}
|
|
1468
1471
|
if (target["__v_raw"] && !(isReadonly && target["__v_isReactive"])) return target;
|
|
1469
|
-
|
|
1470
|
-
if (targetType === 0) return target;
|
|
1472
|
+
if (target["__v_skip"] || !Object.isExtensible(target)) return target;
|
|
1471
1473
|
const existingProxy = proxyMap.get(target);
|
|
1472
1474
|
if (existingProxy) return existingProxy;
|
|
1475
|
+
const targetType = targetTypeMap(toRawType(target));
|
|
1476
|
+
if (targetType === 0) return target;
|
|
1473
1477
|
const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
|
|
1474
1478
|
proxyMap.set(target, proxy);
|
|
1475
1479
|
return proxy;
|
|
@@ -1902,9 +1906,11 @@ var ReactiveEffect = class {
|
|
|
1902
1906
|
if (!this.active) return this.fn();
|
|
1903
1907
|
cleanup(this);
|
|
1904
1908
|
const prevSub = startTracking(this);
|
|
1909
|
+
incRunDepth();
|
|
1905
1910
|
try {
|
|
1906
1911
|
return this.fn();
|
|
1907
1912
|
} finally {
|
|
1913
|
+
decRunDepth();
|
|
1908
1914
|
endTracking(this, prevSub);
|
|
1909
1915
|
const flags = this.flags;
|
|
1910
1916
|
if ((flags & 136) === 136) {
|
|
@@ -2285,8 +2291,9 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2285
2291
|
if (once && cb) {
|
|
2286
2292
|
const _cb = cb;
|
|
2287
2293
|
cb = (...args) => {
|
|
2288
|
-
_cb(...args);
|
|
2294
|
+
const res = _cb(...args);
|
|
2289
2295
|
this.stop();
|
|
2296
|
+
return res;
|
|
2290
2297
|
};
|
|
2291
2298
|
}
|
|
2292
2299
|
this.cb = cb;
|
|
@@ -2300,7 +2307,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2300
2307
|
if (!this.cb) return;
|
|
2301
2308
|
const { immediate, deep, call } = this.options;
|
|
2302
2309
|
if (initialRun && !immediate) return;
|
|
2303
|
-
if (deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2310
|
+
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2304
2311
|
cleanup(this);
|
|
2305
2312
|
const currentWatcher = activeWatcher;
|
|
2306
2313
|
activeWatcher = this;
|
|
@@ -2607,8 +2614,8 @@ function findInsertionIndex(order, queue, start, end) {
|
|
|
2607
2614
|
/**
|
|
2608
2615
|
* @internal for runtime-vapor only
|
|
2609
2616
|
*/
|
|
2610
|
-
function queueJob(job, id, isPre = false) {
|
|
2611
|
-
if (queueJobWorker(job, id === void 0 ? isPre ? -2 : Infinity : isPre ? id * 2 : id * 2 + 1, jobs, jobsLength, flushIndex)) {
|
|
2617
|
+
function queueJob(job, id, isPre = false, order = 0) {
|
|
2618
|
+
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)) {
|
|
2612
2619
|
jobsLength++;
|
|
2613
2620
|
queueFlush();
|
|
2614
2621
|
}
|
|
@@ -2717,6 +2724,7 @@ function flushJobs(seen) {
|
|
|
2717
2724
|
}
|
|
2718
2725
|
flushIndex = 0;
|
|
2719
2726
|
jobsLength = 0;
|
|
2727
|
+
jobs.length = 0;
|
|
2720
2728
|
flushPostFlushCbs(seen);
|
|
2721
2729
|
currentFlushPromise = null;
|
|
2722
2730
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
@@ -2774,6 +2782,14 @@ function createRecord(id, initialDef) {
|
|
|
2774
2782
|
function normalizeClassComponent(component) {
|
|
2775
2783
|
return isClassComponent(component) ? component.__vccOpts : component;
|
|
2776
2784
|
}
|
|
2785
|
+
function hasDirtyAncestor(instance, dirtyInstances) {
|
|
2786
|
+
let parent = instance.parent;
|
|
2787
|
+
while (parent) {
|
|
2788
|
+
if (dirtyInstances.has(parent)) return true;
|
|
2789
|
+
parent = parent.parent;
|
|
2790
|
+
}
|
|
2791
|
+
return false;
|
|
2792
|
+
}
|
|
2777
2793
|
function rerender(id, newRender) {
|
|
2778
2794
|
const record = map.get(id);
|
|
2779
2795
|
if (!record) return;
|
|
@@ -2805,42 +2821,69 @@ function reload(id, newComp) {
|
|
|
2805
2821
|
const isVapor = record.initialDef.__vapor;
|
|
2806
2822
|
updateComponentDef(record.initialDef, newComp);
|
|
2807
2823
|
const instances = [...record.instances];
|
|
2808
|
-
if (isVapor && newComp.__vapor && !instances.some((i) => i.ceReload)) {
|
|
2824
|
+
if (isVapor && newComp.__vapor && !instances.some((instance) => instance.parent && !instance.parent.vapor) && !instances.some((i) => i.ceReload)) {
|
|
2809
2825
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
2810
|
-
|
|
2811
|
-
|
|
2812
|
-
const
|
|
2813
|
-
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2814
|
-
if (!dirtyInstances) {
|
|
2815
|
-
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2816
|
-
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2817
|
-
}
|
|
2818
|
-
dirtyInstances.add(instance);
|
|
2819
|
-
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2820
|
-
instance.appContext.propsCache.delete(instance.type);
|
|
2821
|
-
instance.appContext.emitsCache.delete(instance.type);
|
|
2822
|
-
instance.appContext.optionsCache.delete(instance.type);
|
|
2823
|
-
if (instance.ceReload) {
|
|
2824
|
-
dirtyInstances.add(instance);
|
|
2825
|
-
instance.ceReload(newComp.styles);
|
|
2826
|
-
dirtyInstances.delete(instance);
|
|
2827
|
-
} else if (instance.parent) queueJob(() => {
|
|
2828
|
-
isHmrUpdating = true;
|
|
2826
|
+
const dirtyInstances = new Set(instances);
|
|
2827
|
+
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
2828
|
+
for (const instance of instances) {
|
|
2829
2829
|
const parent = instance.parent;
|
|
2830
|
-
if (parent
|
|
2831
|
-
|
|
2832
|
-
|
|
2833
|
-
|
|
2830
|
+
if (parent) {
|
|
2831
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
2832
|
+
rerenderedParents.add(parent);
|
|
2833
|
+
parent.hmrRerender();
|
|
2834
|
+
}
|
|
2835
|
+
} else instance.hmrReload(newComp);
|
|
2836
|
+
}
|
|
2837
|
+
} else {
|
|
2838
|
+
const parentUpdates = /* @__PURE__ */ new Map();
|
|
2839
|
+
const dirtyInstanceSet = new Set(instances);
|
|
2840
|
+
for (const instance of instances) {
|
|
2841
|
+
const oldComp = normalizeClassComponent(instance.type);
|
|
2842
|
+
let dirtyInstances = hmrDirtyComponents.get(oldComp);
|
|
2843
|
+
if (!dirtyInstances) {
|
|
2844
|
+
if (oldComp !== record.initialDef) updateComponentDef(oldComp, newComp);
|
|
2845
|
+
hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set());
|
|
2834
2846
|
}
|
|
2835
|
-
|
|
2836
|
-
|
|
2847
|
+
dirtyInstances.add(instance);
|
|
2848
|
+
hmrDirtyComponentsMode.set(oldComp, !!isVapor);
|
|
2849
|
+
instance.appContext.propsCache.delete(instance.type);
|
|
2850
|
+
instance.appContext.emitsCache.delete(instance.type);
|
|
2851
|
+
instance.appContext.optionsCache.delete(instance.type);
|
|
2852
|
+
if (instance.ceReload) {
|
|
2853
|
+
dirtyInstances.add(instance);
|
|
2854
|
+
instance.ceReload(newComp.styles);
|
|
2855
|
+
dirtyInstances.delete(instance);
|
|
2856
|
+
} else if (instance.parent) {
|
|
2857
|
+
const parent = instance.parent;
|
|
2858
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
2859
|
+
let updates = parentUpdates.get(parent);
|
|
2860
|
+
if (!updates) parentUpdates.set(parent, updates = []);
|
|
2861
|
+
updates.push([instance, dirtyInstances]);
|
|
2862
|
+
}
|
|
2863
|
+
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
2864
|
+
else if (typeof window !== "undefined") window.location.reload();
|
|
2865
|
+
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2866
|
+
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2867
|
+
}
|
|
2868
|
+
parentUpdates.forEach((updates, parent) => {
|
|
2869
|
+
queueJob(() => {
|
|
2870
|
+
isHmrUpdating = true;
|
|
2871
|
+
if (parent.vapor) parent.hmrRerender();
|
|
2872
|
+
else {
|
|
2873
|
+
const i = parent;
|
|
2874
|
+
if (!(i.effect.flags & 1024)) {
|
|
2875
|
+
i.renderCache = [];
|
|
2876
|
+
i.effect.run();
|
|
2877
|
+
}
|
|
2878
|
+
}
|
|
2879
|
+
nextTick(() => {
|
|
2880
|
+
isHmrUpdating = false;
|
|
2881
|
+
});
|
|
2882
|
+
updates.forEach(([instance, dirtyInstances]) => {
|
|
2883
|
+
dirtyInstances.delete(instance);
|
|
2884
|
+
});
|
|
2837
2885
|
});
|
|
2838
|
-
dirtyInstances.delete(instance);
|
|
2839
2886
|
});
|
|
2840
|
-
else if (instance.appContext.reload) instance.appContext.reload();
|
|
2841
|
-
else if (typeof window !== "undefined") window.location.reload();
|
|
2842
|
-
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
2843
|
-
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
2844
2887
|
}
|
|
2845
2888
|
queuePostFlushCb(() => {
|
|
2846
2889
|
hmrDirtyComponents.clear();
|
|
@@ -3307,10 +3350,12 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
3307
3350
|
const renderFnWithContext = (...args) => {
|
|
3308
3351
|
if (renderFnWithContext._d) setBlockTracking(-1);
|
|
3309
3352
|
const prevInstance = setCurrentRenderingInstance(ctx);
|
|
3353
|
+
const prevStackSize = blockStack.length;
|
|
3310
3354
|
let res;
|
|
3311
3355
|
try {
|
|
3312
3356
|
res = fn(...args);
|
|
3313
3357
|
} finally {
|
|
3358
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
3314
3359
|
setCurrentRenderingInstance(prevInstance);
|
|
3315
3360
|
if (renderFnWithContext._d) setBlockTracking(1);
|
|
3316
3361
|
}
|
|
@@ -3543,6 +3588,7 @@ function createPathGetter(ctx, path) {
|
|
|
3543
3588
|
}
|
|
3544
3589
|
//#endregion
|
|
3545
3590
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3591
|
+
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3546
3592
|
const TeleportEndKey = Symbol("_vte");
|
|
3547
3593
|
const isTeleport = (type) => type.__isTeleport;
|
|
3548
3594
|
const isTeleportDisabled = (props) => props && (props.disabled || props.disabled === "");
|
|
@@ -3568,58 +3614,70 @@ const TeleportImpl = {
|
|
|
3568
3614
|
name: "Teleport",
|
|
3569
3615
|
__isTeleport: true,
|
|
3570
3616
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, internals) {
|
|
3571
|
-
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment } } = internals;
|
|
3617
|
+
const { mc: mountChildren, pc: patchChildren, pbc: patchBlockChildren, o: { insert, querySelector, createText, createComment, parentNode } } = internals;
|
|
3572
3618
|
const disabled = isTeleportDisabled(n2.props);
|
|
3573
|
-
let {
|
|
3619
|
+
let { dynamicChildren } = n2;
|
|
3574
3620
|
if (isHmrUpdating) {
|
|
3575
3621
|
optimized = false;
|
|
3576
3622
|
dynamicChildren = null;
|
|
3577
3623
|
}
|
|
3624
|
+
const mount = (vnode, container, anchor) => {
|
|
3625
|
+
if (vnode.shapeFlag & 16) mountChildren(vnode.children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3626
|
+
};
|
|
3627
|
+
const mountToTarget = (vnode = n2) => {
|
|
3628
|
+
const disabled = isTeleportDisabled(vnode.props);
|
|
3629
|
+
const target = vnode.target = resolveTarget(vnode.props, querySelector);
|
|
3630
|
+
const targetAnchor = prepareAnchor(target, vnode, createText, insert);
|
|
3631
|
+
if (target) {
|
|
3632
|
+
if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
|
|
3633
|
+
else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
|
|
3634
|
+
if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3635
|
+
if (!disabled) {
|
|
3636
|
+
mount(vnode, target, targetAnchor);
|
|
3637
|
+
updateCssVars(vnode, false);
|
|
3638
|
+
}
|
|
3639
|
+
} else if (!disabled) warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3640
|
+
};
|
|
3641
|
+
const queuePendingMount = (vnode) => {
|
|
3642
|
+
const mountJob = () => {
|
|
3643
|
+
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
3644
|
+
pendingMounts.delete(vnode);
|
|
3645
|
+
if (isTeleportDisabled(vnode.props)) {
|
|
3646
|
+
mount(vnode, parentNode(vnode.el) || container, vnode.anchor);
|
|
3647
|
+
updateCssVars(vnode, true);
|
|
3648
|
+
}
|
|
3649
|
+
mountToTarget(vnode);
|
|
3650
|
+
};
|
|
3651
|
+
pendingMounts.set(vnode, mountJob);
|
|
3652
|
+
queuePostRenderEffect(mountJob, void 0, parentSuspense);
|
|
3653
|
+
};
|
|
3578
3654
|
if (n1 == null) {
|
|
3579
3655
|
const placeholder = n2.el = createComment("teleport start");
|
|
3580
3656
|
const mainAnchor = n2.anchor = createComment("teleport end");
|
|
3581
3657
|
insert(placeholder, container, anchor);
|
|
3582
3658
|
insert(mainAnchor, container, anchor);
|
|
3583
|
-
|
|
3584
|
-
|
|
3585
|
-
|
|
3586
|
-
|
|
3587
|
-
const target = n2.target = resolveTarget(n2.props, querySelector);
|
|
3588
|
-
const targetAnchor = prepareAnchor(target, n2, createText, insert);
|
|
3589
|
-
if (target) {
|
|
3590
|
-
if (namespace !== "svg" && isTargetSVG(target)) namespace = "svg";
|
|
3591
|
-
else if (namespace !== "mathml" && isTargetMathML(target)) namespace = "mathml";
|
|
3592
|
-
if (parentComponent && parentComponent.isCE) (parentComponent.ce._teleportTargets || (parentComponent.ce._teleportTargets = /* @__PURE__ */ new Set())).add(target);
|
|
3593
|
-
if (!disabled) {
|
|
3594
|
-
mount(target, targetAnchor);
|
|
3595
|
-
updateCssVars(n2, false);
|
|
3596
|
-
}
|
|
3597
|
-
} else if (!disabled) warn$1("Invalid Teleport target on mount:", target, `(${typeof target})`);
|
|
3598
|
-
};
|
|
3659
|
+
if (isTeleportDeferred(n2.props) || parentSuspense && parentSuspense.pendingBranch) {
|
|
3660
|
+
queuePendingMount(n2);
|
|
3661
|
+
return;
|
|
3662
|
+
}
|
|
3599
3663
|
if (disabled) {
|
|
3600
|
-
mount(container, mainAnchor);
|
|
3664
|
+
mount(n2, container, mainAnchor);
|
|
3601
3665
|
updateCssVars(n2, true);
|
|
3602
3666
|
}
|
|
3603
|
-
|
|
3604
|
-
n2.el.__isMounted = false;
|
|
3605
|
-
queuePostRenderEffect(() => {
|
|
3606
|
-
if (n2.el.__isMounted !== false) return;
|
|
3607
|
-
mountToTarget();
|
|
3608
|
-
delete n2.el.__isMounted;
|
|
3609
|
-
}, void 0, parentSuspense);
|
|
3610
|
-
} else mountToTarget();
|
|
3667
|
+
mountToTarget();
|
|
3611
3668
|
} else {
|
|
3612
3669
|
n2.el = n1.el;
|
|
3613
|
-
n2.targetStart = n1.targetStart;
|
|
3614
3670
|
const mainAnchor = n2.anchor = n1.anchor;
|
|
3615
|
-
const
|
|
3616
|
-
|
|
3617
|
-
|
|
3618
|
-
|
|
3619
|
-
|
|
3620
|
-
}, void 0, parentSuspense);
|
|
3671
|
+
const pendingMount = pendingMounts.get(n1);
|
|
3672
|
+
if (pendingMount) {
|
|
3673
|
+
pendingMount.flags |= 4;
|
|
3674
|
+
pendingMounts.delete(n1);
|
|
3675
|
+
queuePendingMount(n2);
|
|
3621
3676
|
return;
|
|
3622
3677
|
}
|
|
3678
|
+
n2.targetStart = n1.targetStart;
|
|
3679
|
+
const target = n2.target = n1.target;
|
|
3680
|
+
const targetAnchor = n2.targetAnchor = n1.targetAnchor;
|
|
3623
3681
|
const wasDisabled = isTeleportDisabled(n1.props);
|
|
3624
3682
|
const currentContainer = wasDisabled ? container : target;
|
|
3625
3683
|
const currentAnchor = wasDisabled ? mainAnchor : targetAnchor;
|
|
@@ -3633,24 +3691,30 @@ const TeleportImpl = {
|
|
|
3633
3691
|
if (!wasDisabled) moveTeleport(n2, container, mainAnchor, internals, parentComponent, 1);
|
|
3634
3692
|
else if (n2.props && n1.props && n2.props.to !== n1.props.to) n2.props.to = n1.props.to;
|
|
3635
3693
|
} else if ((n2.props && n2.props.to) !== (n1.props && n1.props.to)) {
|
|
3636
|
-
const nextTarget =
|
|
3637
|
-
if (nextTarget)
|
|
3638
|
-
|
|
3694
|
+
const nextTarget = resolveTarget(n2.props, querySelector);
|
|
3695
|
+
if (nextTarget) {
|
|
3696
|
+
n2.target = nextTarget;
|
|
3697
|
+
moveTeleport(n2, nextTarget, null, internals, parentComponent, 0);
|
|
3698
|
+
} else warn$1("Invalid Teleport target on update:", target, `(${typeof target})`);
|
|
3639
3699
|
} else if (wasDisabled) moveTeleport(n2, target, targetAnchor, internals, parentComponent, 1);
|
|
3640
3700
|
updateCssVars(n2, disabled);
|
|
3641
3701
|
}
|
|
3642
3702
|
},
|
|
3643
3703
|
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
3644
|
-
const { shapeFlag, children, anchor, targetStart, targetAnchor, props } = vnode;
|
|
3704
|
+
const { shapeFlag, children, anchor, targetStart, targetAnchor, target, props } = vnode;
|
|
3705
|
+
const disabled = isTeleportDisabled(props);
|
|
3706
|
+
const shouldRemove = doRemove || !disabled;
|
|
3707
|
+
const pendingMount = pendingMounts.get(vnode);
|
|
3708
|
+
if (pendingMount) {
|
|
3709
|
+
pendingMount.flags |= 4;
|
|
3710
|
+
pendingMounts.delete(vnode);
|
|
3711
|
+
}
|
|
3645
3712
|
if (targetStart) hostRemove(targetStart);
|
|
3646
3713
|
if (targetAnchor) hostRemove(targetAnchor);
|
|
3647
3714
|
doRemove && hostRemove(anchor);
|
|
3648
|
-
if (shapeFlag & 16) {
|
|
3649
|
-
const
|
|
3650
|
-
|
|
3651
|
-
const child = children[i];
|
|
3652
|
-
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3653
|
-
}
|
|
3715
|
+
if (!pendingMount && (disabled || target) && shapeFlag & 16) for (let i = 0; i < children.length; i++) {
|
|
3716
|
+
const child = children[i];
|
|
3717
|
+
unmount(child, parentComponent, parentSuspense, shouldRemove, !!child.dynamicChildren);
|
|
3654
3718
|
}
|
|
3655
3719
|
},
|
|
3656
3720
|
move: moveTeleport,
|
|
@@ -3661,7 +3725,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
3661
3725
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3662
3726
|
const isReorder = moveType === 2;
|
|
3663
3727
|
if (isReorder) insert(el, container, parentAnchor);
|
|
3664
|
-
if (!isReorder || isTeleportDisabled(props)) {
|
|
3728
|
+
if (!pendingMounts.has(vnode) && (!isReorder || isTeleportDisabled(props))) {
|
|
3665
3729
|
if (shapeFlag & 16) for (let i = 0; i < children.length; i++) move(children[i], container, parentAnchor, 2, parentComponent);
|
|
3666
3730
|
}
|
|
3667
3731
|
if (isReorder) insert(anchor, container, parentAnchor);
|
|
@@ -3786,8 +3850,8 @@ const BaseTransitionImpl = {
|
|
|
3786
3850
|
const state = useTransitionState();
|
|
3787
3851
|
return () => {
|
|
3788
3852
|
const children = slots.default && getTransitionRawChildren(slots.default(), true);
|
|
3789
|
-
|
|
3790
|
-
|
|
3853
|
+
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
3854
|
+
if (!child) return;
|
|
3791
3855
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3792
3856
|
const { mode } = rawProps;
|
|
3793
3857
|
checkTransitionMode(mode);
|
|
@@ -4240,7 +4304,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4240
4304
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4241
4305
|
break;
|
|
4242
4306
|
case VaporSlot:
|
|
4243
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node);
|
|
4307
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
4244
4308
|
break;
|
|
4245
4309
|
default: if (shapeFlag & 1) if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
4246
4310
|
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
@@ -4250,16 +4314,31 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4250
4314
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
4251
4315
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
4252
4316
|
else nextNode = nextSibling(node);
|
|
4253
|
-
if (vnode.type.__vapor)
|
|
4254
|
-
|
|
4255
|
-
|
|
4256
|
-
|
|
4257
|
-
|
|
4258
|
-
|
|
4259
|
-
|
|
4260
|
-
}
|
|
4261
|
-
|
|
4262
|
-
|
|
4317
|
+
if (vnode.type.__vapor) {
|
|
4318
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeBeforeMount;
|
|
4319
|
+
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
4320
|
+
if (vnode.dirs) {
|
|
4321
|
+
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
4322
|
+
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
4323
|
+
}
|
|
4324
|
+
}, () => {
|
|
4325
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
4326
|
+
});
|
|
4327
|
+
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4328
|
+
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
4329
|
+
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
4330
|
+
} else {
|
|
4331
|
+
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
4332
|
+
const component = vnode.component;
|
|
4333
|
+
if (isAsyncWrapper(vnode) && !vnode.type.__asyncResolved || component.asyncDep && !component.asyncResolved) {
|
|
4334
|
+
let subTree;
|
|
4335
|
+
if (isFragmentStart) {
|
|
4336
|
+
subTree = createVNode(Fragment);
|
|
4337
|
+
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4338
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
4339
|
+
subTree.el = node;
|
|
4340
|
+
component.subTree = subTree;
|
|
4341
|
+
}
|
|
4263
4342
|
}
|
|
4264
4343
|
} else if (shapeFlag & 64) if (domType !== 8) nextNode = onMismatch();
|
|
4265
4344
|
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
@@ -4271,7 +4350,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4271
4350
|
};
|
|
4272
4351
|
const hydrateElement = (el, vnode, parentComponent, parentSuspense, slotScopeIds, optimized) => {
|
|
4273
4352
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4274
|
-
const { type, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4353
|
+
const { type, dynamicProps, props, patchFlag, shapeFlag, dirs, transition } = vnode;
|
|
4275
4354
|
const forcePatch = type === "input" || type === "option";
|
|
4276
4355
|
{
|
|
4277
4356
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
@@ -4289,15 +4368,11 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4289
4368
|
}
|
|
4290
4369
|
if (shapeFlag & 16 && !(props && (props.innerHTML || props.textContent))) {
|
|
4291
4370
|
let next = hydrateChildren(el.firstChild, vnode, el, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4292
|
-
|
|
4371
|
+
if (next && !isMismatchAllowed(el, 1)) {
|
|
4372
|
+
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4373
|
+
logMismatchError();
|
|
4374
|
+
}
|
|
4293
4375
|
while (next) {
|
|
4294
|
-
if (!isMismatchAllowed(el, 1)) {
|
|
4295
|
-
if (!hasWarned) {
|
|
4296
|
-
warn$1(`Hydration children mismatch on`, el, `\nServer rendered element contains more child nodes than client vdom.`);
|
|
4297
|
-
hasWarned = true;
|
|
4298
|
-
}
|
|
4299
|
-
logMismatchError();
|
|
4300
|
-
}
|
|
4301
4376
|
const cur = next;
|
|
4302
4377
|
next = next.nextSibling;
|
|
4303
4378
|
remove(cur);
|
|
@@ -4316,9 +4391,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4316
4391
|
}
|
|
4317
4392
|
if (props) {
|
|
4318
4393
|
const isCustomElement = el.tagName.includes("-");
|
|
4394
|
+
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
4319
4395
|
for (const key in props) {
|
|
4320
4396
|
if (!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
4321
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key)) patchProp(el, key, null, props[key],
|
|
4397
|
+
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);
|
|
4322
4398
|
}
|
|
4323
4399
|
}
|
|
4324
4400
|
let vnodeHooks;
|
|
@@ -4336,7 +4412,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4336
4412
|
optimized = optimized || !!parentVNode.dynamicChildren;
|
|
4337
4413
|
const children = parentVNode.children;
|
|
4338
4414
|
const l = children.length;
|
|
4339
|
-
let
|
|
4415
|
+
let hasCheckedMismatch = false;
|
|
4340
4416
|
for (let i = 0; i < l; i++) {
|
|
4341
4417
|
const vnode = optimized ? children[i] : children[i] = normalizeVNode(children[i]);
|
|
4342
4418
|
const isText = vnode.type === Text;
|
|
@@ -4350,12 +4426,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4350
4426
|
node = hydrateNode(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4351
4427
|
} else if (isText && !vnode.children) insert(vnode.el = createText(""), container);
|
|
4352
4428
|
else {
|
|
4353
|
-
if (!
|
|
4354
|
-
|
|
4429
|
+
if (!hasCheckedMismatch) {
|
|
4430
|
+
hasCheckedMismatch = true;
|
|
4431
|
+
if (!isMismatchAllowed(container, 1)) {
|
|
4355
4432
|
warn$1(`Hydration children mismatch on`, container, `\nServer rendered element contains fewer child nodes than client vdom.`);
|
|
4356
|
-
|
|
4433
|
+
logMismatchError();
|
|
4357
4434
|
}
|
|
4358
|
-
logMismatchError();
|
|
4359
4435
|
}
|
|
4360
4436
|
patch(null, vnode, container, null, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
4361
4437
|
}
|
|
@@ -4375,7 +4451,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4375
4451
|
}
|
|
4376
4452
|
};
|
|
4377
4453
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4378
|
-
if (!
|
|
4454
|
+
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4379
4455
|
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);
|
|
4380
4456
|
logMismatchError();
|
|
4381
4457
|
}
|
|
@@ -4539,7 +4615,9 @@ const MismatchTypeString = {
|
|
|
4539
4615
|
};
|
|
4540
4616
|
function isMismatchAllowed(el, allowedType) {
|
|
4541
4617
|
if (allowedType === 0 || allowedType === 1) while (el && !el.hasAttribute(allowMismatchAttr)) el = el.parentElement;
|
|
4542
|
-
|
|
4618
|
+
return isMismatchAllowedByAttr(el && el.getAttribute(allowMismatchAttr), allowedType);
|
|
4619
|
+
}
|
|
4620
|
+
function isMismatchAllowedByAttr(allowedAttr, allowedType) {
|
|
4543
4621
|
if (allowedAttr == null) return false;
|
|
4544
4622
|
else if (allowedAttr === "") return true;
|
|
4545
4623
|
else {
|
|
@@ -4548,6 +4626,16 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4548
4626
|
return list.includes(MismatchTypeString[allowedType]);
|
|
4549
4627
|
}
|
|
4550
4628
|
}
|
|
4629
|
+
function isNodeMismatchAllowed(node, vnode) {
|
|
4630
|
+
return isMismatchAllowed(node.parentElement, 1) || isMismatchAllowedByNode(node) || isMismatchAllowedByVNode(vnode);
|
|
4631
|
+
}
|
|
4632
|
+
function isMismatchAllowedByNode(node) {
|
|
4633
|
+
return node.nodeType === 1 && isMismatchAllowedByAttr(node.getAttribute(allowMismatchAttr), 1);
|
|
4634
|
+
}
|
|
4635
|
+
function isMismatchAllowedByVNode({ props }) {
|
|
4636
|
+
const allowedAttr = props && props[allowMismatchAttr];
|
|
4637
|
+
return typeof allowedAttr === "string" && isMismatchAllowedByAttr(allowedAttr, 1);
|
|
4638
|
+
}
|
|
4551
4639
|
//#endregion
|
|
4552
4640
|
//#region packages/runtime-core/src/hydrationStrategies.ts
|
|
4553
4641
|
let requestIdleCallback;
|
|
@@ -4666,11 +4754,16 @@ function defineAsyncComponent(source) {
|
|
|
4666
4754
|
onError(err);
|
|
4667
4755
|
return () => errorComponent ? createVNode(errorComponent, { error: err }) : null;
|
|
4668
4756
|
});
|
|
4669
|
-
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError);
|
|
4757
|
+
const { loaded, error, delayed } = useAsyncComponentState(delay, timeout, onError, instance);
|
|
4670
4758
|
load().then(() => {
|
|
4759
|
+
if (instance.isUnmounted) return;
|
|
4671
4760
|
loaded.value = true;
|
|
4672
4761
|
if (instance.parent && instance.parent.vnode && isKeepAlive(instance.parent.vnode)) instance.parent.update();
|
|
4673
4762
|
}).catch((err) => {
|
|
4763
|
+
if (instance.isUnmounted) {
|
|
4764
|
+
setPendingRequest(null);
|
|
4765
|
+
return;
|
|
4766
|
+
}
|
|
4674
4767
|
onError(err);
|
|
4675
4768
|
error.value = err;
|
|
4676
4769
|
});
|
|
@@ -4728,14 +4821,22 @@ function createAsyncComponentContext(source) {
|
|
|
4728
4821
|
setPendingRequest: (request) => pendingRequest = request
|
|
4729
4822
|
};
|
|
4730
4823
|
}
|
|
4731
|
-
const useAsyncComponentState = (delay, timeout, onError) => {
|
|
4824
|
+
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4732
4825
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4733
4826
|
const error = /* @__PURE__ */ ref();
|
|
4734
4827
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
4735
|
-
|
|
4828
|
+
let timeoutTimer;
|
|
4829
|
+
let delayTimer;
|
|
4830
|
+
if (instance) onUnmounted(() => {
|
|
4831
|
+
if (timeoutTimer != null) clearTimeout(timeoutTimer);
|
|
4832
|
+
if (delayTimer != null) clearTimeout(delayTimer);
|
|
4833
|
+
}, instance);
|
|
4834
|
+
if (delay) delayTimer = setTimeout(() => {
|
|
4835
|
+
if (instance && instance.isUnmounted) return;
|
|
4736
4836
|
delayed.value = false;
|
|
4737
4837
|
}, delay);
|
|
4738
|
-
if (timeout != null) setTimeout(() => {
|
|
4838
|
+
if (timeout != null) timeoutTimer = setTimeout(() => {
|
|
4839
|
+
if (instance && instance.isUnmounted) return;
|
|
4739
4840
|
if (!loaded.value && !error.value) {
|
|
4740
4841
|
const err = /* @__PURE__ */ new Error(`Async component timed out after ${timeout}ms.`);
|
|
4741
4842
|
onError(err);
|
|
@@ -4753,6 +4854,7 @@ const useAsyncComponentState = (delay, timeout, onError) => {
|
|
|
4753
4854
|
* @internal
|
|
4754
4855
|
*/
|
|
4755
4856
|
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
4857
|
+
const wasConnected = el.isConnected;
|
|
4756
4858
|
let patched = false;
|
|
4757
4859
|
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4758
4860
|
const performHydrate = () => {
|
|
@@ -4763,6 +4865,7 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
4763
4865
|
}
|
|
4764
4866
|
return;
|
|
4765
4867
|
}
|
|
4868
|
+
if (!el.parentNode || wasConnected && !el.isConnected) return;
|
|
4766
4869
|
hydrate();
|
|
4767
4870
|
};
|
|
4768
4871
|
const doHydrate = hydrateStrategy ? () => {
|
|
@@ -5347,8 +5450,9 @@ function createSlots(slots, dynamicSlots) {
|
|
|
5347
5450
|
* Compiler runtime helper for rendering `<slot/>`
|
|
5348
5451
|
* @private
|
|
5349
5452
|
*/
|
|
5350
|
-
function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
5453
|
+
function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
|
|
5351
5454
|
let slot = slots[name];
|
|
5455
|
+
if (fallback) fallback.__vdom = true;
|
|
5352
5456
|
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
5353
5457
|
if (vaporSlot) {
|
|
5354
5458
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
@@ -5356,25 +5460,35 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted) {
|
|
|
5356
5460
|
slot: vaporSlot,
|
|
5357
5461
|
fallback
|
|
5358
5462
|
};
|
|
5463
|
+
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5359
5464
|
return ret;
|
|
5360
5465
|
}
|
|
5361
5466
|
if (currentRenderingInstance && (currentRenderingInstance.ce || currentRenderingInstance.parent && isAsyncWrapper(currentRenderingInstance.parent) && currentRenderingInstance.parent.ce)) {
|
|
5362
|
-
const
|
|
5363
|
-
|
|
5364
|
-
|
|
5467
|
+
const slotProps = branchKey != null && props.key == null ? extend({}, props, { key: branchKey }) : props;
|
|
5468
|
+
const hasProps = Object.keys(slotProps).length > 0;
|
|
5469
|
+
if (name !== "default") slotProps.name = name;
|
|
5470
|
+
return openBlock(), createBlock(Fragment, null, [createVNode("slot", slotProps, fallback && fallback())], hasProps ? -2 : 64);
|
|
5365
5471
|
}
|
|
5366
5472
|
if (slot && slot.length > 1) {
|
|
5367
5473
|
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.");
|
|
5368
5474
|
slot = () => [];
|
|
5369
5475
|
}
|
|
5370
5476
|
if (slot && slot._c) slot._d = false;
|
|
5477
|
+
const prevStackSize = blockStack.length;
|
|
5371
5478
|
openBlock();
|
|
5372
|
-
|
|
5373
|
-
|
|
5374
|
-
|
|
5375
|
-
|
|
5479
|
+
let rendered;
|
|
5480
|
+
try {
|
|
5481
|
+
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5482
|
+
ensureVaporSlotFallback(validSlotContent, fallback);
|
|
5483
|
+
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
5484
|
+
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
5485
|
+
} catch (err) {
|
|
5486
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
5487
|
+
throw err;
|
|
5488
|
+
} finally {
|
|
5489
|
+
if (slot && slot._c) slot._d = true;
|
|
5490
|
+
}
|
|
5376
5491
|
if (!noSlotted && rendered.scopeId) rendered.slotScopeIds = [rendered.scopeId + "-s"];
|
|
5377
|
-
if (slot && slot._c) slot._d = true;
|
|
5378
5492
|
return rendered;
|
|
5379
5493
|
}
|
|
5380
5494
|
function ensureValidVNode(vnodes) {
|
|
@@ -5387,9 +5501,7 @@ function ensureValidVNode(vnodes) {
|
|
|
5387
5501
|
}
|
|
5388
5502
|
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
5389
5503
|
let vaporSlot;
|
|
5390
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs))
|
|
5391
|
-
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
5392
|
-
}
|
|
5504
|
+
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
5393
5505
|
}
|
|
5394
5506
|
//#endregion
|
|
5395
5507
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
@@ -5944,26 +6056,39 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
5944
6056
|
function withAsyncContext(getAwaitable) {
|
|
5945
6057
|
const ctx = getCurrentGenericInstance();
|
|
5946
6058
|
const inSSRSetup = isInSSRComponentSetup;
|
|
6059
|
+
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
5947
6060
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
5948
6061
|
let awaitable = getAwaitable();
|
|
5949
6062
|
setCurrentInstance(null, void 0);
|
|
5950
6063
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5951
6064
|
const restore = () => {
|
|
6065
|
+
const resetStoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
5952
6066
|
setCurrentInstance(ctx);
|
|
5953
6067
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
6068
|
+
const reset = restoreAsyncContext && restoreAsyncContext();
|
|
6069
|
+
return () => {
|
|
6070
|
+
if (reset) reset();
|
|
6071
|
+
if (resetStoppedScope) resetStoppedScope.reset();
|
|
6072
|
+
};
|
|
5954
6073
|
};
|
|
5955
6074
|
const cleanup = () => {
|
|
5956
6075
|
setCurrentInstance(null, void 0);
|
|
5957
6076
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
5958
6077
|
};
|
|
5959
6078
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
5960
|
-
restore();
|
|
5961
|
-
Promise.resolve().then(() => Promise.resolve().then(
|
|
6079
|
+
const reset = restore();
|
|
6080
|
+
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
6081
|
+
if (reset) reset();
|
|
6082
|
+
cleanup();
|
|
6083
|
+
}));
|
|
5962
6084
|
throw e;
|
|
5963
6085
|
});
|
|
5964
6086
|
return [awaitable, () => {
|
|
5965
|
-
restore();
|
|
5966
|
-
Promise.resolve().then(
|
|
6087
|
+
const reset = restore();
|
|
6088
|
+
Promise.resolve().then(() => {
|
|
6089
|
+
if (reset) reset();
|
|
6090
|
+
cleanup();
|
|
6091
|
+
});
|
|
5967
6092
|
}];
|
|
5968
6093
|
}
|
|
5969
6094
|
//#endregion
|
|
@@ -6282,7 +6407,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6282
6407
|
if (options.el) return vm.$mount(options.el);
|
|
6283
6408
|
else return vm;
|
|
6284
6409
|
}
|
|
6285
|
-
Vue.version = `2.6.14-compat:3.6.0-
|
|
6410
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.1`;
|
|
6286
6411
|
Vue.config = singletonApp.config;
|
|
6287
6412
|
Vue.use = (plugin, ...options) => {
|
|
6288
6413
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6537,7 +6662,9 @@ function defineReactive(obj, key, val) {
|
|
|
6537
6662
|
else Object.keys(val).forEach((key) => {
|
|
6538
6663
|
try {
|
|
6539
6664
|
defineReactiveSimple(val, key, val[key]);
|
|
6540
|
-
} catch (e) {
|
|
6665
|
+
} catch (e) {
|
|
6666
|
+
warn$1(`Failed making property "${key}" reactive:`, e);
|
|
6667
|
+
}
|
|
6541
6668
|
});
|
|
6542
6669
|
}
|
|
6543
6670
|
const i = obj.$;
|
|
@@ -6782,12 +6909,13 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
6782
6909
|
for (const key of rawPropKeys) if (key === name || key === camelizedName || key === hyphenatedName) parentPassedModelValue = true;
|
|
6783
6910
|
else if (key === `onUpdate:${name}` || key === `onUpdate:${camelizedName}` || key === `onUpdate:${hyphenatedName}`) parentPassedModelUpdater = true;
|
|
6784
6911
|
}
|
|
6785
|
-
|
|
6912
|
+
const hasVModel = parentPassedModelValue && parentPassedModelUpdater;
|
|
6913
|
+
if (!hasVModel) {
|
|
6786
6914
|
localValue = value;
|
|
6787
6915
|
trigger();
|
|
6788
6916
|
}
|
|
6789
6917
|
i.emit(`update:${name}`, emittedValue);
|
|
6790
|
-
if (hasChanged(value,
|
|
6918
|
+
if (hasChanged(value, prevSetValue) && (hasChanged(value, emittedValue) && !hasChanged(emittedValue, prevEmittedValue) || hasVModel && prevSetValue !== EMPTY_OBJ && !hasChanged(emittedValue, localValue))) trigger();
|
|
6791
6919
|
prevSetValue = value;
|
|
6792
6920
|
prevEmittedValue = emittedValue;
|
|
6793
6921
|
}
|
|
@@ -6900,7 +7028,8 @@ function normalizeEmitsOptions(comp, appContext, asMixin = false) {
|
|
|
6900
7028
|
function isEmitListener(options, key) {
|
|
6901
7029
|
if (!options || !isOn(key)) return false;
|
|
6902
7030
|
if (key.startsWith(compatModelEventPrefix)) return true;
|
|
6903
|
-
key = key.slice(2)
|
|
7031
|
+
key = key.slice(2);
|
|
7032
|
+
key = key === "Once" ? key : key.replace(/Once$/, "");
|
|
6904
7033
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
6905
7034
|
}
|
|
6906
7035
|
//#endregion
|
|
@@ -7418,7 +7547,7 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
|
7418
7547
|
const receivedType = toRawType(value);
|
|
7419
7548
|
const expectedValue = styleValue(value, expectedType);
|
|
7420
7549
|
const receivedValue = styleValue(value, receivedType);
|
|
7421
|
-
if (expectedTypes.length === 1 && isExplicable(expectedType) &&
|
|
7550
|
+
if (expectedTypes.length === 1 && isExplicable(expectedType) && isCoercible(expectedType, receivedType)) message += ` with value ${expectedValue}`;
|
|
7422
7551
|
message += `, got ${receivedType} `;
|
|
7423
7552
|
if (isExplicable(receivedType)) message += `with value ${receivedValue}.`;
|
|
7424
7553
|
return message;
|
|
@@ -7427,7 +7556,8 @@ function getInvalidTypeMessage(name, value, expectedTypes) {
|
|
|
7427
7556
|
* dev only
|
|
7428
7557
|
*/
|
|
7429
7558
|
function styleValue(value, type) {
|
|
7430
|
-
if (
|
|
7559
|
+
if (isSymbol(value)) return value.toString();
|
|
7560
|
+
else if (type === "String") return `"${value}"`;
|
|
7431
7561
|
else if (type === "Number") return `${Number(value)}`;
|
|
7432
7562
|
else return `${value}`;
|
|
7433
7563
|
}
|
|
@@ -7444,8 +7574,11 @@ function isExplicable(type) {
|
|
|
7444
7574
|
/**
|
|
7445
7575
|
* dev only
|
|
7446
7576
|
*/
|
|
7447
|
-
function
|
|
7448
|
-
return args.
|
|
7577
|
+
function isCoercible(...args) {
|
|
7578
|
+
return args.every((elem) => {
|
|
7579
|
+
const value = elem.toLowerCase();
|
|
7580
|
+
return value !== "boolean" && value !== "symbol";
|
|
7581
|
+
});
|
|
7449
7582
|
}
|
|
7450
7583
|
//#endregion
|
|
7451
7584
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
@@ -7750,7 +7883,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7750
7883
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
7751
7884
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7752
7885
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
7753
|
-
if (isHmrUpdating) {
|
|
7886
|
+
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
7754
7887
|
patchFlag = 0;
|
|
7755
7888
|
optimized = false;
|
|
7756
7889
|
dynamicChildren = null;
|
|
@@ -7830,19 +7963,35 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7830
7963
|
n2.slotScopeIds = slotScopeIds;
|
|
7831
7964
|
if (n2.type.__vapor) if (n1 == null) if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent);
|
|
7832
7965
|
else {
|
|
7966
|
+
const vnodeBeforeMountHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeBeforeMount;
|
|
7833
7967
|
getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense, () => {
|
|
7834
7968
|
if (n2.dirs) {
|
|
7835
7969
|
invokeDirectiveHook(n2, null, parentComponent, "created");
|
|
7836
7970
|
invokeDirectiveHook(n2, null, parentComponent, "beforeMount");
|
|
7837
7971
|
}
|
|
7972
|
+
}, () => {
|
|
7973
|
+
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
7838
7974
|
});
|
|
7839
7975
|
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
7976
|
+
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
7977
|
+
if (vnodeMountedHook) {
|
|
7978
|
+
const scopedVNode = n2;
|
|
7979
|
+
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
7980
|
+
}
|
|
7840
7981
|
}
|
|
7841
7982
|
else {
|
|
7842
|
-
|
|
7983
|
+
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
7984
|
+
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
7843
7985
|
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
7986
|
+
}, () => {
|
|
7987
|
+
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
7988
|
+
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
7844
7989
|
});
|
|
7845
|
-
|
|
7990
|
+
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
7991
|
+
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
7992
|
+
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
7993
|
+
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
7994
|
+
}, void 0, parentSuspense);
|
|
7846
7995
|
}
|
|
7847
7996
|
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
7848
7997
|
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
@@ -8198,8 +8347,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8198
8347
|
else hostInsert(el, container, anchor);
|
|
8199
8348
|
};
|
|
8200
8349
|
const performLeave = () => {
|
|
8350
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
8201
8351
|
if (el._isLeaving) el[leaveCbKey](true);
|
|
8202
|
-
|
|
8352
|
+
if (transition.persisted && !wasLeaving) remove();
|
|
8353
|
+
else leave(el, () => {
|
|
8203
8354
|
remove();
|
|
8204
8355
|
afterLeave && afterLeave();
|
|
8205
8356
|
});
|
|
@@ -8230,7 +8381,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8230
8381
|
if (shapeFlag & 6) if (isVaporComponent(type)) {
|
|
8231
8382
|
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
8232
8383
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
8233
|
-
if (
|
|
8384
|
+
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
8385
|
+
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
8386
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
8387
|
+
}, void 0, parentSuspense);
|
|
8234
8388
|
return;
|
|
8235
8389
|
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
8236
8390
|
else {
|
|
@@ -8292,7 +8446,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8292
8446
|
if (effect) {
|
|
8293
8447
|
effect.stop();
|
|
8294
8448
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
8295
|
-
}
|
|
8449
|
+
} else if (doRemove && subTree && instance.vnode.el) remove(subTree);
|
|
8296
8450
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
8297
8451
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:destroyed"), void 0, parentSuspense);
|
|
8298
8452
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
@@ -8419,6 +8573,10 @@ function invalidateMount(hooks) {
|
|
|
8419
8573
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
8420
8574
|
}
|
|
8421
8575
|
function performTransitionEnter(el, transition, insert, parentSuspense, force = false) {
|
|
8576
|
+
if (force && transition.persisted && !el[leaveCbKey]) {
|
|
8577
|
+
insert();
|
|
8578
|
+
return;
|
|
8579
|
+
}
|
|
8422
8580
|
if (force || needTransition(parentSuspense, transition)) {
|
|
8423
8581
|
transition.beforeEnter(el);
|
|
8424
8582
|
insert();
|
|
@@ -8621,15 +8779,19 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8621
8779
|
if (suspense.isHydrating) suspense.isHydrating = false;
|
|
8622
8780
|
else if (!resume) {
|
|
8623
8781
|
delayEnter = activeBranch && pendingBranch.transition && pendingBranch.transition.mode === "out-in";
|
|
8782
|
+
let hasUpdatedAnchor = false;
|
|
8624
8783
|
if (delayEnter) activeBranch.transition.afterLeave = () => {
|
|
8625
8784
|
if (pendingId === suspense.pendingId) {
|
|
8626
|
-
move(pendingBranch, container, anchor === initialAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8785
|
+
move(pendingBranch, container, anchor === initialAnchor && !hasUpdatedAnchor ? next(activeBranch) : anchor, 0, parentComponent);
|
|
8627
8786
|
queuePostFlushCb(effects);
|
|
8628
8787
|
if (isInFallback && vnode.ssFallback) vnode.ssFallback.el = null;
|
|
8629
8788
|
}
|
|
8630
8789
|
};
|
|
8631
8790
|
if (activeBranch && !suspense.isFallbackMountPending) {
|
|
8632
|
-
if (parentNode(activeBranch.el) === container)
|
|
8791
|
+
if (parentNode(activeBranch.el) === container) {
|
|
8792
|
+
anchor = next(activeBranch);
|
|
8793
|
+
hasUpdatedAnchor = true;
|
|
8794
|
+
}
|
|
8633
8795
|
unmount(activeBranch, parentComponent, suspense, true);
|
|
8634
8796
|
if (!delayEnter && isInFallback && vnode.ssFallback) queuePostRenderEffect(() => vnode.ssFallback.el = null, void 0, suspense);
|
|
8635
8797
|
}
|
|
@@ -8693,6 +8855,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
8693
8855
|
handleError(err, instance, 0);
|
|
8694
8856
|
}).then((asyncSetupResult) => {
|
|
8695
8857
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
8858
|
+
setCurrentInstance(null, void 0);
|
|
8696
8859
|
instance.asyncResolved = true;
|
|
8697
8860
|
onResolve(asyncSetupResult);
|
|
8698
8861
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -9025,12 +9188,30 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9025
9188
|
el: vnode.el,
|
|
9026
9189
|
anchor: vnode.anchor,
|
|
9027
9190
|
ctx: vnode.ctx,
|
|
9028
|
-
ce: vnode.ce
|
|
9191
|
+
ce: vnode.ce,
|
|
9192
|
+
vi: vnode.vi,
|
|
9193
|
+
vs: cloneVaporSlotMeta(vnode),
|
|
9194
|
+
vb: vnode.vb
|
|
9029
9195
|
};
|
|
9030
9196
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
9031
9197
|
defineLegacyVNodeProperties(cloned);
|
|
9032
9198
|
return cloned;
|
|
9033
9199
|
}
|
|
9200
|
+
function cloneVaporSlotMeta(vnode) {
|
|
9201
|
+
const vaporSlot = vnode.vs;
|
|
9202
|
+
if (!vaporSlot) return vaporSlot;
|
|
9203
|
+
const cloned = {
|
|
9204
|
+
slot: vaporSlot.slot,
|
|
9205
|
+
fallback: vaporSlot.fallback,
|
|
9206
|
+
outletFallback: vaporSlot.outletFallback
|
|
9207
|
+
};
|
|
9208
|
+
if (vnode.el) {
|
|
9209
|
+
cloned.state = vaporSlot.state;
|
|
9210
|
+
cloned.ref = vaporSlot.ref;
|
|
9211
|
+
cloned.scope = vaporSlot.scope;
|
|
9212
|
+
}
|
|
9213
|
+
return cloned;
|
|
9214
|
+
}
|
|
9034
9215
|
/**
|
|
9035
9216
|
* Dev only, for HMR of hoisted vnodes reused in v-for
|
|
9036
9217
|
* https://github.com/vitejs/vite/issues/2022
|
|
@@ -9093,6 +9274,10 @@ function normalizeChildren(vnode, children) {
|
|
|
9093
9274
|
}
|
|
9094
9275
|
}
|
|
9095
9276
|
else if (isFunction(children)) {
|
|
9277
|
+
if (shapeFlag & 65) {
|
|
9278
|
+
normalizeChildren(vnode, { default: children });
|
|
9279
|
+
return;
|
|
9280
|
+
}
|
|
9096
9281
|
children = {
|
|
9097
9282
|
default: children,
|
|
9098
9283
|
_ctx: currentRenderingInstance
|
|
@@ -9700,7 +9885,7 @@ function isMemoSame(cached, memo) {
|
|
|
9700
9885
|
}
|
|
9701
9886
|
//#endregion
|
|
9702
9887
|
//#region packages/runtime-core/src/index.ts
|
|
9703
|
-
const version = "3.6.0-
|
|
9888
|
+
const version = "3.6.0-rc.1";
|
|
9704
9889
|
const warn = warn$1;
|
|
9705
9890
|
/**
|
|
9706
9891
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10128,7 +10313,10 @@ function patchStyle(el, prev, next) {
|
|
|
10128
10313
|
}
|
|
10129
10314
|
for (const key in next) {
|
|
10130
10315
|
if (key === "display") hasControlledDisplay = true;
|
|
10131
|
-
|
|
10316
|
+
const value = next[key];
|
|
10317
|
+
if (value != null) {
|
|
10318
|
+
if (!shouldPreserveTextareaResizeStyle(el, key, !isString(prev) && prev ? prev[key] : void 0, value)) setStyle(style, key, value);
|
|
10319
|
+
} else setStyle(style, key, "");
|
|
10132
10320
|
}
|
|
10133
10321
|
} else if (isCssString) {
|
|
10134
10322
|
if (prev !== next) {
|
|
@@ -10176,6 +10364,14 @@ function autoPrefix(style, rawName) {
|
|
|
10176
10364
|
}
|
|
10177
10365
|
return rawName;
|
|
10178
10366
|
}
|
|
10367
|
+
/**
|
|
10368
|
+
* Browsers update textarea width/height directly during native resize.
|
|
10369
|
+
* Only special-case this common textarea path for now; other resize scenarios
|
|
10370
|
+
* still follow normal vnode style patching.
|
|
10371
|
+
*/
|
|
10372
|
+
function shouldPreserveTextareaResizeStyle(el, key, prev, next) {
|
|
10373
|
+
return el.tagName === "TEXTAREA" && (key === "width" || key === "height") && isString(next) && prev === next;
|
|
10374
|
+
}
|
|
10179
10375
|
//#endregion
|
|
10180
10376
|
//#region packages/runtime-dom/src/modules/attrs.ts
|
|
10181
10377
|
const xlinkNS = "http://www.w3.org/1999/xlink";
|
|
@@ -10259,7 +10455,7 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
10259
10455
|
const existingInvoker = invokers[rawName];
|
|
10260
10456
|
if (nextValue && existingInvoker) existingInvoker.value = sanitizeEventValue(nextValue, rawName);
|
|
10261
10457
|
else {
|
|
10262
|
-
const [name, options] =
|
|
10458
|
+
const [name, options] = parseEventName(rawName);
|
|
10263
10459
|
if (nextValue) addEventListener(el, name, invokers[rawName] = createInvoker(sanitizeEventValue(nextValue, rawName), instance), options);
|
|
10264
10460
|
else if (existingInvoker) {
|
|
10265
10461
|
removeEventListener(el, name, existingInvoker, options);
|
|
@@ -10267,16 +10463,15 @@ function patchEvent(el, rawName, prevValue, nextValue, instance = null) {
|
|
|
10267
10463
|
}
|
|
10268
10464
|
}
|
|
10269
10465
|
}
|
|
10270
|
-
const optionsModifierRE = /(
|
|
10271
|
-
|
|
10466
|
+
const optionsModifierRE = /(Once|Passive|Capture)$/;
|
|
10467
|
+
const optionsModifierEventRE = /^on:?(?:Once|Passive|Capture)$/;
|
|
10468
|
+
function parseEventName(name) {
|
|
10272
10469
|
let options;
|
|
10273
|
-
|
|
10274
|
-
|
|
10275
|
-
|
|
10276
|
-
|
|
10277
|
-
|
|
10278
|
-
options[m[0].toLowerCase()] = true;
|
|
10279
|
-
}
|
|
10470
|
+
let m;
|
|
10471
|
+
while ((m = name.match(optionsModifierRE)) && !optionsModifierEventRE.test(name)) {
|
|
10472
|
+
if (!options) options = {};
|
|
10473
|
+
name = name.slice(0, name.length - m[1].length);
|
|
10474
|
+
options[m[1].toLowerCase()] = true;
|
|
10280
10475
|
}
|
|
10281
10476
|
return [name[2] === ":" ? name.slice(3) : hyphenate(name.slice(2)), options];
|
|
10282
10477
|
}
|
|
@@ -10287,7 +10482,21 @@ function createInvoker(initialValue, instance) {
|
|
|
10287
10482
|
const invoker = (e) => {
|
|
10288
10483
|
if (!e._vts) e._vts = Date.now();
|
|
10289
10484
|
else if (e._vts <= invoker.attached) return;
|
|
10290
|
-
|
|
10485
|
+
const value = invoker.value;
|
|
10486
|
+
if (isArray(value)) {
|
|
10487
|
+
const originalStop = e.stopImmediatePropagation;
|
|
10488
|
+
e.stopImmediatePropagation = () => {
|
|
10489
|
+
originalStop.call(e);
|
|
10490
|
+
e._stopped = true;
|
|
10491
|
+
};
|
|
10492
|
+
const handlers = value.slice();
|
|
10493
|
+
const args = [e];
|
|
10494
|
+
for (let i = 0; i < handlers.length; i++) {
|
|
10495
|
+
if (e._stopped) break;
|
|
10496
|
+
const handler = handlers[i];
|
|
10497
|
+
if (handler) callWithAsyncErrorHandling(handler, instance, 5, args);
|
|
10498
|
+
}
|
|
10499
|
+
} else callWithAsyncErrorHandling(value, instance, 5, [e]);
|
|
10291
10500
|
};
|
|
10292
10501
|
invoker.value = initialValue;
|
|
10293
10502
|
invoker.attached = getNow();
|
|
@@ -10298,16 +10507,6 @@ function sanitizeEventValue(value, propName) {
|
|
|
10298
10507
|
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}.`);
|
|
10299
10508
|
return NOOP;
|
|
10300
10509
|
}
|
|
10301
|
-
function patchStopImmediatePropagation(e, value) {
|
|
10302
|
-
if (isArray(value)) {
|
|
10303
|
-
const originalStop = e.stopImmediatePropagation;
|
|
10304
|
-
e.stopImmediatePropagation = () => {
|
|
10305
|
-
originalStop.call(e);
|
|
10306
|
-
e._stopped = true;
|
|
10307
|
-
};
|
|
10308
|
-
return value.map((fn) => (e) => !e._stopped && fn && fn(e));
|
|
10309
|
-
} else return value;
|
|
10310
|
-
}
|
|
10311
10510
|
//#endregion
|
|
10312
10511
|
//#region packages/runtime-dom/src/patchProp.ts
|
|
10313
10512
|
const patchProp = (el, key, prevValue, nextValue, namespace, parentComponent) => {
|
|
@@ -10635,7 +10834,10 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10635
10834
|
replacementNodes.push(child);
|
|
10636
10835
|
}
|
|
10637
10836
|
parent.removeChild(o);
|
|
10638
|
-
slotReplacements.set(o,
|
|
10837
|
+
slotReplacements.set(o, {
|
|
10838
|
+
nodes: replacementNodes,
|
|
10839
|
+
usedFallback: !content
|
|
10840
|
+
});
|
|
10639
10841
|
}
|
|
10640
10842
|
this._updateSlotNodes(slotReplacements);
|
|
10641
10843
|
}
|
|
@@ -10825,7 +11027,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
10825
11027
|
prevChildren = [];
|
|
10826
11028
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
10827
11029
|
const child = children[i];
|
|
10828
|
-
if (child.el && child.el instanceof Element) {
|
|
11030
|
+
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
10829
11031
|
prevChildren.push(child);
|
|
10830
11032
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
10831
11033
|
positionMap.set(child, getPosition(child.el));
|
|
@@ -11049,7 +11251,8 @@ const vModelSelect = {
|
|
|
11049
11251
|
mounted(el, { value }) {
|
|
11050
11252
|
vModelSetSelected(el, value);
|
|
11051
11253
|
},
|
|
11052
|
-
beforeUpdate(el,
|
|
11254
|
+
beforeUpdate(el, { value }, vnode) {
|
|
11255
|
+
el._modelValue = value;
|
|
11053
11256
|
el[assignKey] = getModelAssigner(vnode);
|
|
11054
11257
|
},
|
|
11055
11258
|
updated(el, { value }) {
|
|
@@ -11060,10 +11263,10 @@ const vModelSelect = {
|
|
|
11060
11263
|
* @internal
|
|
11061
11264
|
*/
|
|
11062
11265
|
const vModelSelectInit = (el, value, number, set) => {
|
|
11063
|
-
|
|
11266
|
+
el._modelValue = value;
|
|
11064
11267
|
addEventListener(el, "change", () => {
|
|
11065
11268
|
const selectedVal = Array.prototype.filter.call(el.options, (o) => o.selected).map((o) => number ? looseToNumber(getValue(o)) : getValue(o));
|
|
11066
|
-
(set || el[assignKey])(el.multiple ?
|
|
11269
|
+
(set || el[assignKey])(el.multiple ? isSet(el._modelValue) ? new Set(selectedVal) : selectedVal : selectedVal[0]);
|
|
11067
11270
|
el._assigning = true;
|
|
11068
11271
|
nextTick(() => {
|
|
11069
11272
|
el._assigning = false;
|
|
@@ -11074,6 +11277,7 @@ const vModelSelectInit = (el, value, number, set) => {
|
|
|
11074
11277
|
* @internal
|
|
11075
11278
|
*/
|
|
11076
11279
|
const vModelSetSelected = (el, value) => {
|
|
11280
|
+
el._modelValue = value;
|
|
11077
11281
|
if (el._assigning) return;
|
|
11078
11282
|
const isMultiple = el.multiple;
|
|
11079
11283
|
const isArrayValue = isArray(value);
|
|
@@ -13463,6 +13667,7 @@ function getUnnormalizedProps(props, callPath = []) {
|
|
|
13463
13667
|
return [props, callPath];
|
|
13464
13668
|
}
|
|
13465
13669
|
function injectProp(node, prop, context) {
|
|
13670
|
+
if (node.type !== 13 && injectSlotKey(node, prop)) return;
|
|
13466
13671
|
let propsWithInjection;
|
|
13467
13672
|
/**
|
|
13468
13673
|
* 1. mergeProps(...)
|
|
@@ -13501,6 +13706,20 @@ function injectProp(node, prop, context) {
|
|
|
13501
13706
|
else if (parentCall) parentCall.arguments[0] = propsWithInjection;
|
|
13502
13707
|
else node.arguments[2] = propsWithInjection;
|
|
13503
13708
|
}
|
|
13709
|
+
function injectSlotKey(node, prop) {
|
|
13710
|
+
var _node$arguments, _node$arguments2, _node$arguments3;
|
|
13711
|
+
if (prop.key.type !== 4 || prop.key.content !== "key") return false;
|
|
13712
|
+
const props = node.arguments[2];
|
|
13713
|
+
if (props && !isString(props)) {
|
|
13714
|
+
const [unnormalizedProps] = getUnnormalizedProps(props);
|
|
13715
|
+
if (unnormalizedProps && !isString(unnormalizedProps) && unnormalizedProps.type === 15 && hasProp(prop, unnormalizedProps)) return true;
|
|
13716
|
+
}
|
|
13717
|
+
(_node$arguments = node.arguments)[2] || (_node$arguments[2] = "{}");
|
|
13718
|
+
(_node$arguments2 = node.arguments)[3] || (_node$arguments2[3] = "undefined");
|
|
13719
|
+
(_node$arguments3 = node.arguments)[4] || (_node$arguments3[4] = "undefined");
|
|
13720
|
+
node.arguments[5] = prop.value;
|
|
13721
|
+
return true;
|
|
13722
|
+
}
|
|
13504
13723
|
function hasProp(prop, props) {
|
|
13505
13724
|
let result = false;
|
|
13506
13725
|
if (prop.key.type === 4) {
|
|
@@ -13797,7 +14016,7 @@ const tokenizer = new Tokenizer(stack, {
|
|
|
13797
14016
|
}
|
|
13798
14017
|
},
|
|
13799
14018
|
oncdata(start, end) {
|
|
13800
|
-
if (stack[0].ns !== 0) onText(getSlice(start, end), start, end);
|
|
14019
|
+
if ((stack[0] ? stack[0].ns : currentOptions.ns) !== 0) onText(getSlice(start, end), start, end);
|
|
13801
14020
|
else emitError(1, start - 9);
|
|
13802
14021
|
},
|
|
13803
14022
|
onprocessinginstruction(start) {
|
|
@@ -14302,7 +14521,7 @@ function getSelfName(filename) {
|
|
|
14302
14521
|
const nameMatch = filename.replace(/\?.*$/, "").match(/([^/\\]+)\.\w+$/);
|
|
14303
14522
|
return nameMatch ? capitalize(camelize(nameMatch[1])) : null;
|
|
14304
14523
|
}
|
|
14305
|
-
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 }) {
|
|
14524
|
+
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 }) {
|
|
14306
14525
|
const context = {
|
|
14307
14526
|
filename,
|
|
14308
14527
|
selfName: getSelfName(filename),
|
|
@@ -14324,6 +14543,7 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14324
14543
|
bindingMetadata,
|
|
14325
14544
|
inline,
|
|
14326
14545
|
isTS,
|
|
14546
|
+
eventDelegation,
|
|
14327
14547
|
onError,
|
|
14328
14548
|
onWarn,
|
|
14329
14549
|
compatConfig,
|
|
@@ -14335,8 +14555,10 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14335
14555
|
imports: [],
|
|
14336
14556
|
cached: [],
|
|
14337
14557
|
constantCache: /* @__PURE__ */ new WeakMap(),
|
|
14558
|
+
vForMemoKeyedNodes: /* @__PURE__ */ new WeakSet(),
|
|
14338
14559
|
temps: 0,
|
|
14339
14560
|
identifiers: Object.create(null),
|
|
14561
|
+
identifierScopes: Object.create(null),
|
|
14340
14562
|
scopes: {
|
|
14341
14563
|
vFor: 0,
|
|
14342
14564
|
vSlot: 0,
|
|
@@ -14387,16 +14609,20 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14387
14609
|
context.parent.children.splice(removalIndex, 1);
|
|
14388
14610
|
},
|
|
14389
14611
|
onNodeRemoved: NOOP,
|
|
14390
|
-
addIdentifiers(exp) {
|
|
14391
|
-
if (isString(exp)) addId(exp);
|
|
14392
|
-
else if (exp.identifiers) exp.identifiers.forEach(addId);
|
|
14393
|
-
else if (exp.type === 4) addId(exp.content);
|
|
14612
|
+
addIdentifiers(exp, type = "local") {
|
|
14613
|
+
if (isString(exp)) addId(exp, type);
|
|
14614
|
+
else if (exp.identifiers) exp.identifiers.forEach((id) => addId(id, type));
|
|
14615
|
+
else if (exp.type === 4) addId(exp.content, type);
|
|
14394
14616
|
},
|
|
14395
14617
|
removeIdentifiers(exp) {
|
|
14396
14618
|
if (isString(exp)) removeId(exp);
|
|
14397
14619
|
else if (exp.identifiers) exp.identifiers.forEach(removeId);
|
|
14398
14620
|
else if (exp.type === 4) removeId(exp.content);
|
|
14399
14621
|
},
|
|
14622
|
+
isSlotScopeIdentifier(name) {
|
|
14623
|
+
const scopes = context.identifierScopes[name];
|
|
14624
|
+
return scopes ? scopes[scopes.length - 1] === "slot" : false;
|
|
14625
|
+
},
|
|
14400
14626
|
hoist(exp) {
|
|
14401
14627
|
if (isString(exp)) exp = createSimpleExpression(exp);
|
|
14402
14628
|
context.hoists.push(exp);
|
|
@@ -14411,13 +14637,16 @@ function createTransformContext(root, { filename = "", prefixIdentifiers = false
|
|
|
14411
14637
|
}
|
|
14412
14638
|
};
|
|
14413
14639
|
context.filters = /* @__PURE__ */ new Set();
|
|
14414
|
-
function addId(id) {
|
|
14415
|
-
const { identifiers } = context;
|
|
14640
|
+
function addId(id, type) {
|
|
14641
|
+
const { identifiers, identifierScopes } = context;
|
|
14416
14642
|
if (identifiers[id] === void 0) identifiers[id] = 0;
|
|
14417
14643
|
identifiers[id]++;
|
|
14644
|
+
(identifierScopes[id] || (identifierScopes[id] = [])).push(type);
|
|
14418
14645
|
}
|
|
14419
14646
|
function removeId(id) {
|
|
14420
14647
|
context.identifiers[id]--;
|
|
14648
|
+
const scopes = context.identifierScopes[id];
|
|
14649
|
+
if (scopes) scopes.pop();
|
|
14421
14650
|
}
|
|
14422
14651
|
return context;
|
|
14423
14652
|
}
|
|
@@ -14844,6 +15073,7 @@ function genNode(node, context) {
|
|
|
14844
15073
|
case 26:
|
|
14845
15074
|
genReturnStatement(node, context);
|
|
14846
15075
|
break;
|
|
15076
|
+
/* v8 ignore start */
|
|
14847
15077
|
case 10: break;
|
|
14848
15078
|
default:
|
|
14849
15079
|
assert(false, `unhandled codegen node type: ${node.type}`);
|
|
@@ -15096,7 +15326,7 @@ const transformExpression = (node, context) => {
|
|
|
15096
15326
|
if (dir.type === 7 && dir.name !== "for") {
|
|
15097
15327
|
const exp = dir.exp;
|
|
15098
15328
|
const arg = dir.arg;
|
|
15099
|
-
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");
|
|
15329
|
+
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");
|
|
15100
15330
|
if (arg && arg.type === 4 && !arg.isStatic) dir.arg = processExpression(arg, context);
|
|
15101
15331
|
}
|
|
15102
15332
|
}
|
|
@@ -15354,11 +15584,11 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15354
15584
|
const keyProp = findProp(node, `key`, false, true);
|
|
15355
15585
|
const isDirKey = keyProp && keyProp.type === 7;
|
|
15356
15586
|
let keyExp = keyProp && (keyProp.type === 6 ? keyProp.value ? createSimpleExpression(keyProp.value.content, true) : void 0 : keyProp.exp);
|
|
15357
|
-
|
|
15358
|
-
|
|
15359
|
-
if (isTemplate) {
|
|
15360
|
-
|
|
15361
|
-
if (
|
|
15587
|
+
const keyProperty = keyExp ? createObjectProperty(`key`, keyExp) : null;
|
|
15588
|
+
if (isTemplate && memo) memo.exp = processExpression(memo.exp, context);
|
|
15589
|
+
if ((isTemplate || memo) && keyProperty && isDirKey) {
|
|
15590
|
+
keyExp = keyProp.exp = keyProperty.value = processExpression(keyProperty.value, context);
|
|
15591
|
+
if (memo) context.vForMemoKeyedNodes.add(node);
|
|
15362
15592
|
}
|
|
15363
15593
|
const isStableFragment = forNode.source.type === 4 && forNode.source.constType > 0;
|
|
15364
15594
|
const fragmentFlag = isStableFragment ? 64 : keyProp ? 128 : 256;
|
|
@@ -15489,7 +15719,7 @@ const trackSlotScopes = (node, context) => {
|
|
|
15489
15719
|
const vSlot = findDir(node, "slot");
|
|
15490
15720
|
if (vSlot) {
|
|
15491
15721
|
const slotProps = vSlot.exp;
|
|
15492
|
-
if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps);
|
|
15722
|
+
if (context.prefixIdentifiers) slotProps && context.addIdentifiers(slotProps, "slot");
|
|
15493
15723
|
context.scopes.vSlot++;
|
|
15494
15724
|
return () => {
|
|
15495
15725
|
if (context.prefixIdentifiers) slotProps && context.removeIdentifiers(slotProps);
|
|
@@ -15710,6 +15940,15 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
15710
15940
|
if (!ssr) context.helper(builtIn);
|
|
15711
15941
|
return builtIn;
|
|
15712
15942
|
}
|
|
15943
|
+
{
|
|
15944
|
+
const fromScope = resolveSlotScopeReference(tag, context);
|
|
15945
|
+
if (fromScope) return fromScope;
|
|
15946
|
+
const dotIndex = tag.indexOf(".");
|
|
15947
|
+
if (dotIndex > 0) {
|
|
15948
|
+
const ns = resolveSlotScopeReference(tag.slice(0, dotIndex), context);
|
|
15949
|
+
if (ns) return ns + tag.slice(dotIndex);
|
|
15950
|
+
}
|
|
15951
|
+
}
|
|
15713
15952
|
{
|
|
15714
15953
|
const fromSetup = resolveSetupReference(tag, context);
|
|
15715
15954
|
if (fromSetup) return fromSetup;
|
|
@@ -15728,6 +15967,14 @@ function resolveComponentType(node, context, ssr = false) {
|
|
|
15728
15967
|
context.components.add(tag);
|
|
15729
15968
|
return toValidAssetId(tag, `component`);
|
|
15730
15969
|
}
|
|
15970
|
+
function resolveSlotScopeReference(name, context) {
|
|
15971
|
+
const camelName = camelize(name);
|
|
15972
|
+
const PascalName = capitalize(camelName);
|
|
15973
|
+
const isInSlotScope = (reference) => context.isSlotScopeIdentifier(reference);
|
|
15974
|
+
if (isInSlotScope(name)) return name;
|
|
15975
|
+
if (isInSlotScope(camelName)) return camelName;
|
|
15976
|
+
if (isInSlotScope(PascalName)) return PascalName;
|
|
15977
|
+
}
|
|
15731
15978
|
function resolveSetupReference(name, context) {
|
|
15732
15979
|
const bindings = context.bindingMetadata;
|
|
15733
15980
|
if (!bindings || bindings.__isScriptSetup === false) return;
|
|
@@ -16253,7 +16500,7 @@ function rewriteFilter(node, context) {
|
|
|
16253
16500
|
const child = node.children[i];
|
|
16254
16501
|
if (typeof child !== "object") continue;
|
|
16255
16502
|
if (child.type === 4) parseFilter(child, context);
|
|
16256
|
-
else if (child.type === 8) rewriteFilter(
|
|
16503
|
+
else if (child.type === 8) rewriteFilter(child, context);
|
|
16257
16504
|
else if (child.type === 5) rewriteFilter(child.content, context);
|
|
16258
16505
|
}
|
|
16259
16506
|
}
|
|
@@ -16677,7 +16924,7 @@ function postTransformTransition(node, onError, hasMultipleChildren = defaultHas
|
|
|
16677
16924
|
source: ""
|
|
16678
16925
|
}));
|
|
16679
16926
|
const child = node.children[0];
|
|
16680
|
-
if (child.type === 1) {
|
|
16927
|
+
if (child.type === 1 && !findDir(child, "if")) {
|
|
16681
16928
|
for (const p of child.props) if (p.type === 7 && p.name === "show") node.props.push({
|
|
16682
16929
|
type: 6,
|
|
16683
16930
|
name: "persisted",
|