@vue/compat 3.6.0-rc.10 → 3.6.0-rc.12
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/dist/vue-compat.d.ts +9 -1
- package/dist/vue.cjs.js +273 -89
- package/dist/vue.cjs.prod.js +305 -86
- package/dist/vue.esm-browser.js +267 -85
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +288 -92
- package/dist/vue.global.js +267 -85
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +267 -85
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +288 -92
- package/dist/vue.runtime.global.js +267 -85
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -311,9 +311,10 @@ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
|
311
311
|
* - ismap -> isMap
|
|
312
312
|
* - nomodule -> noModule
|
|
313
313
|
* - novalidate -> noValidate
|
|
314
|
+
* - playsinline -> playsInline
|
|
314
315
|
* - readonly -> readOnly
|
|
315
316
|
*/
|
|
316
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
317
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
317
318
|
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
318
319
|
/**
|
|
319
320
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
@@ -1009,17 +1010,33 @@ const arrayInstrumentations = {
|
|
|
1009
1010
|
};
|
|
1010
1011
|
function iterator(self, method, wrapValue) {
|
|
1011
1012
|
const arr = shallowReadArray(self);
|
|
1012
|
-
const
|
|
1013
|
+
const methodFn = arr[method];
|
|
1014
|
+
const iter = methodFn.call(arr);
|
|
1013
1015
|
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
1016
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1017
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1018
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1019
|
+
if (methodFn !== arrayProto[method]) Object.defineProperties(wrapped, {
|
|
1020
|
+
return: { get() {
|
|
1021
|
+
const fn = iter.return;
|
|
1022
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1023
|
+
} },
|
|
1024
|
+
throw: { get() {
|
|
1025
|
+
const fn = iter.throw;
|
|
1026
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1027
|
+
} }
|
|
1028
|
+
});
|
|
1029
|
+
return wrapped;
|
|
1030
|
+
}
|
|
1014
1031
|
iter._next = iter.next;
|
|
1015
|
-
iter.next = () =>
|
|
1016
|
-
const result = iter._next();
|
|
1017
|
-
if (!result.done) result.value = wrapValue(result.value);
|
|
1018
|
-
return result;
|
|
1019
|
-
};
|
|
1032
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1020
1033
|
}
|
|
1021
1034
|
return iter;
|
|
1022
1035
|
}
|
|
1036
|
+
function wrapResult(result, wrapValue) {
|
|
1037
|
+
if (!result.done) result.value = wrapValue(result.value);
|
|
1038
|
+
return result;
|
|
1039
|
+
}
|
|
1023
1040
|
const arrayProto = Array.prototype;
|
|
1024
1041
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1025
1042
|
const arr = shallowReadArray(self);
|
|
@@ -1337,6 +1354,7 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
1337
1354
|
return (target, key, receiver) => {
|
|
1338
1355
|
if (key === "__v_isReactive") return !isReadonly;
|
|
1339
1356
|
else if (key === "__v_isReadonly") return isReadonly;
|
|
1357
|
+
else if (key === "__v_isShallow") return shallow;
|
|
1340
1358
|
else if (key === "__v_raw") return target;
|
|
1341
1359
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1342
1360
|
};
|
|
@@ -2246,8 +2264,9 @@ function getCurrentWatcher() {
|
|
|
2246
2264
|
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
2247
2265
|
if (owner) {
|
|
2248
2266
|
const { call } = owner.options;
|
|
2249
|
-
|
|
2250
|
-
|
|
2267
|
+
const cleanup = call ? () => call(cleanupFn, 4) : cleanupFn;
|
|
2268
|
+
if (owner.cb) (owner.cbCleanups || (owner.cbCleanups = [])).push(cleanup);
|
|
2269
|
+
else owner.cleanups[owner.cleanupsLength++] = cleanup;
|
|
2251
2270
|
} else if (!!(process.env.NODE_ENV !== "production") && !failSilently) warn$2("onWatcherCleanup() was called when there was no active watcher to associate with.");
|
|
2252
2271
|
}
|
|
2253
2272
|
var WatcherEffect = class extends ReactiveEffect {
|
|
@@ -2308,9 +2327,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2308
2327
|
if (once && cb) {
|
|
2309
2328
|
const _cb = cb;
|
|
2310
2329
|
cb = (...args) => {
|
|
2311
|
-
|
|
2312
|
-
|
|
2313
|
-
|
|
2330
|
+
try {
|
|
2331
|
+
return _cb(...args);
|
|
2332
|
+
} finally {
|
|
2333
|
+
this.stop();
|
|
2334
|
+
}
|
|
2314
2335
|
};
|
|
2315
2336
|
}
|
|
2316
2337
|
this.cb = cb;
|
|
@@ -2320,6 +2341,19 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2320
2341
|
this.onTrigger = options.onTrigger;
|
|
2321
2342
|
}
|
|
2322
2343
|
}
|
|
2344
|
+
cleanupCallback() {
|
|
2345
|
+
const cleanups = this.cbCleanups;
|
|
2346
|
+
if (cleanups) {
|
|
2347
|
+
this.cbCleanups = void 0;
|
|
2348
|
+
for (let i = 0, l = cleanups.length; i < l; i++) cleanups[i]();
|
|
2349
|
+
}
|
|
2350
|
+
}
|
|
2351
|
+
stop() {
|
|
2352
|
+
if (this.active) {
|
|
2353
|
+
super.stop();
|
|
2354
|
+
this.cleanupCallback();
|
|
2355
|
+
}
|
|
2356
|
+
}
|
|
2323
2357
|
run(initialRun = false) {
|
|
2324
2358
|
const oldValue = this.oldValue;
|
|
2325
2359
|
const newValue = this.oldValue = super.run();
|
|
@@ -2327,10 +2361,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2327
2361
|
const { immediate, deep, call } = this.options;
|
|
2328
2362
|
if (initialRun && !immediate) return;
|
|
2329
2363
|
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2330
|
-
cleanup(this);
|
|
2331
2364
|
const currentWatcher = activeWatcher;
|
|
2332
|
-
|
|
2365
|
+
const prevSub = setActiveSub();
|
|
2333
2366
|
try {
|
|
2367
|
+
this.cleanupCallback();
|
|
2368
|
+
activeWatcher = this;
|
|
2334
2369
|
const args = [
|
|
2335
2370
|
newValue,
|
|
2336
2371
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : this.isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2339,6 +2374,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2339
2374
|
call ? call(this.cb, 3, args) : this.cb(...args);
|
|
2340
2375
|
} finally {
|
|
2341
2376
|
activeWatcher = currentWatcher;
|
|
2377
|
+
setActiveSub(prevSub);
|
|
2342
2378
|
}
|
|
2343
2379
|
}
|
|
2344
2380
|
}
|
|
@@ -2681,15 +2717,15 @@ function queuePostFlushCb(jobs, id = Infinity) {
|
|
|
2681
2717
|
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2682
2718
|
queueFlush();
|
|
2683
2719
|
}
|
|
2684
|
-
function flushPreFlushCbs(instance, seen) {
|
|
2720
|
+
function flushPreFlushCbs(instance, minUid, seen) {
|
|
2685
2721
|
if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
|
|
2686
2722
|
for (let i = flushIndex; i < jobsLength; i++) {
|
|
2687
2723
|
const cb = jobs[i];
|
|
2688
2724
|
if (cb.order & 1 || cb.order === Infinity) continue;
|
|
2689
|
-
if (instance && cb.order !== instance.uid * 2) continue;
|
|
2725
|
+
if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
|
|
2690
2726
|
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
|
|
2691
2727
|
jobs.splice(i, 1);
|
|
2692
|
-
i
|
|
2728
|
+
i = instance ? i - 1 : flushIndex - 1;
|
|
2693
2729
|
jobsLength--;
|
|
2694
2730
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2695
2731
|
try {
|
|
@@ -2699,15 +2735,24 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
2699
2735
|
}
|
|
2700
2736
|
}
|
|
2701
2737
|
}
|
|
2702
|
-
function flushPostFlushCbs(seen) {
|
|
2738
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2703
2739
|
if (postJobs.length) {
|
|
2740
|
+
let cbs = postJobs;
|
|
2741
|
+
if (skip) {
|
|
2742
|
+
cbs = [];
|
|
2743
|
+
let kept = 0;
|
|
2744
|
+
for (let i = 0; i < postJobs.length; i++) {
|
|
2745
|
+
const cb = postJobs[i];
|
|
2746
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
|
|
2747
|
+
else cbs.push(cb);
|
|
2748
|
+
}
|
|
2749
|
+
postJobs.length = kept;
|
|
2750
|
+
} else postJobs = [];
|
|
2704
2751
|
if (activePostJobs) {
|
|
2705
|
-
for (let i = 0; i <
|
|
2706
|
-
postJobs.length = 0;
|
|
2752
|
+
for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
|
|
2707
2753
|
return;
|
|
2708
2754
|
}
|
|
2709
|
-
activePostJobs =
|
|
2710
|
-
postJobs = [];
|
|
2755
|
+
activePostJobs = cbs;
|
|
2711
2756
|
if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
|
|
2712
2757
|
try {
|
|
2713
2758
|
while (postFlushIndex < activePostJobs.length) {
|
|
@@ -2729,17 +2774,28 @@ function flushPostFlushCbs(seen) {
|
|
|
2729
2774
|
}
|
|
2730
2775
|
let isFlushing = false;
|
|
2731
2776
|
/**
|
|
2777
|
+
* Run a root render, then flush the jobs it is responsible for. A mount or
|
|
2778
|
+
* unmount (`minUid` given) only flushes the jobs of the components it created
|
|
2779
|
+
* and the post cbs it queued, so pre watchers triggered in setup run before
|
|
2780
|
+
* mounted (#5721) while the jobs of other components stay in the queue and
|
|
2781
|
+
* keep their order (#6728). A root update keeps flushing all pending pre jobs
|
|
2782
|
+
* and post cbs, as the jobs of the components it re-renders may predate it.
|
|
2783
|
+
*
|
|
2732
2784
|
* @internal
|
|
2733
2785
|
*/
|
|
2734
|
-
function flushOnAppMount(
|
|
2735
|
-
if (
|
|
2736
|
-
|
|
2737
|
-
|
|
2738
|
-
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
2742
|
-
|
|
2786
|
+
function flushOnAppMount(fn, minUid) {
|
|
2787
|
+
if (isFlushing) {
|
|
2788
|
+
fn();
|
|
2789
|
+
return;
|
|
2790
|
+
}
|
|
2791
|
+
const queued = minUid === void 0 ? void 0 : new Set(postJobs);
|
|
2792
|
+
fn();
|
|
2793
|
+
isFlushing = true;
|
|
2794
|
+
try {
|
|
2795
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2796
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2797
|
+
} finally {
|
|
2798
|
+
isFlushing = false;
|
|
2743
2799
|
}
|
|
2744
2800
|
}
|
|
2745
2801
|
function flushJobs(seen) {
|
|
@@ -3563,7 +3619,7 @@ var RenderWatcherEffect = class extends WatcherEffect {
|
|
|
3563
3619
|
this.flags |= 128;
|
|
3564
3620
|
job.flags |= 2;
|
|
3565
3621
|
}
|
|
3566
|
-
|
|
3622
|
+
job.i = instance;
|
|
3567
3623
|
this.job = job;
|
|
3568
3624
|
}
|
|
3569
3625
|
notify() {
|
|
@@ -3774,7 +3830,11 @@ const TeleportImpl = {
|
|
|
3774
3830
|
hydrate: hydrateTeleport
|
|
3775
3831
|
};
|
|
3776
3832
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3777
|
-
if (moveType === 0)
|
|
3833
|
+
if (moveType === 0) {
|
|
3834
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3835
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3836
|
+
parentAnchor = vnode.targetAnchor;
|
|
3837
|
+
}
|
|
3778
3838
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3779
3839
|
const isReorder = moveType === 2;
|
|
3780
3840
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3893,10 +3953,15 @@ const BaseTransitionPropsValidators = {
|
|
|
3893
3953
|
onAfterAppear: TransitionHookValidator,
|
|
3894
3954
|
onAppearCancelled: TransitionHookValidator
|
|
3895
3955
|
};
|
|
3896
|
-
|
|
3897
|
-
|
|
3898
|
-
|
|
3899
|
-
|
|
3956
|
+
function isEmptyTransitionChild(vnode, instance) {
|
|
3957
|
+
if (vnode.type === Comment) return true;
|
|
3958
|
+
if (vnode.type === Fragment) {
|
|
3959
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3960
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3961
|
+
}
|
|
3962
|
+
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3963
|
+
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3964
|
+
}
|
|
3900
3965
|
const BaseTransitionImpl = {
|
|
3901
3966
|
name: `BaseTransition`,
|
|
3902
3967
|
props: BaseTransitionPropsValidators,
|
|
@@ -3946,7 +4011,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
3946
4011
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
3947
4012
|
const key = String(vnode.key);
|
|
3948
4013
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3949
|
-
|
|
4014
|
+
const hooks = baseResolveTransitionHooks({
|
|
3950
4015
|
isLeaving: () => leavingVNodesCache[key] === vnode,
|
|
3951
4016
|
setLeavingNodeCache: () => {
|
|
3952
4017
|
leavingVNodesCache[key] = vnode;
|
|
@@ -3956,7 +4021,14 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3956
4021
|
},
|
|
3957
4022
|
earlyRemove: () => {
|
|
3958
4023
|
const leavingVNode = leavingVNodesCache[key];
|
|
3959
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4024
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4025
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4026
|
+
if (!leavingCb) {
|
|
4027
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4028
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4029
|
+
}
|
|
4030
|
+
if (leavingCb) leavingCb();
|
|
4031
|
+
}
|
|
3960
4032
|
},
|
|
3961
4033
|
cloneHooks: (vnode) => {
|
|
3962
4034
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -3964,6 +4036,13 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3964
4036
|
return hooks;
|
|
3965
4037
|
}
|
|
3966
4038
|
}, props, state, instance);
|
|
4039
|
+
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4040
|
+
__vapor: true,
|
|
4041
|
+
props,
|
|
4042
|
+
state,
|
|
4043
|
+
instance
|
|
4044
|
+
});
|
|
4045
|
+
return hooks;
|
|
3967
4046
|
}
|
|
3968
4047
|
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
3969
4048
|
const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
|
|
@@ -4079,7 +4158,7 @@ function prepareTransitionSwitch(previous, next, props, state, instance, resumeA
|
|
|
4079
4158
|
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4080
4159
|
const mode = props.mode;
|
|
4081
4160
|
const previousInner = previous && getInnerChild$1(previous);
|
|
4082
|
-
if (previous && previousInner &&
|
|
4161
|
+
if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
|
|
4083
4162
|
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
4084
4163
|
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
4085
4164
|
}
|
|
@@ -4095,14 +4174,21 @@ function forwardDelayedLeave(hooks, source) {
|
|
|
4095
4174
|
}
|
|
4096
4175
|
/**
|
|
4097
4176
|
* Prepares an outgoing VNode when the incoming branch belongs to another
|
|
4098
|
-
* renderer. Returns true
|
|
4177
|
+
* renderer. Returns true under out-in, where that branch is a comment
|
|
4178
|
+
* child's: no mode holds for it, the leave runs on its own and
|
|
4179
|
+
* `resumeAfterLeave` follows it.
|
|
4099
4180
|
*
|
|
4100
4181
|
* @internal
|
|
4101
4182
|
*/
|
|
4102
4183
|
function prepareTransitionLeave(previous, enterHooks, props, state, instance, resumeAfterLeave) {
|
|
4103
4184
|
const previousInner = getInnerChild$1(previous);
|
|
4104
|
-
if (!previousInner || previousInner
|
|
4105
|
-
|
|
4185
|
+
if (!previousInner || isEmptyTransitionChild(previousInner, instance)) return false;
|
|
4186
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
4187
|
+
if (props.mode === "out-in") {
|
|
4188
|
+
leavingHooks.afterLeave = resumeAfterLeave;
|
|
4189
|
+
return true;
|
|
4190
|
+
}
|
|
4191
|
+
return applyTransitionModeSwitch(previousInner, leavingHooks, enterHooks ? () => enterHooks : void 0, props, state, resumeAfterLeave);
|
|
4106
4192
|
}
|
|
4107
4193
|
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
4108
4194
|
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
@@ -4154,7 +4240,13 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4154
4240
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4155
4241
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4156
4242
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
4157
|
-
} else
|
|
4243
|
+
} else {
|
|
4244
|
+
vnode.transition = hooks;
|
|
4245
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4246
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4247
|
+
if (child) setTransitionHooks(child, hooks);
|
|
4248
|
+
}
|
|
4249
|
+
}
|
|
4158
4250
|
return hooks;
|
|
4159
4251
|
}
|
|
4160
4252
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4177,6 +4269,14 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4177
4269
|
function checkTransitionMode(mode) {
|
|
4178
4270
|
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4179
4271
|
}
|
|
4272
|
+
function getTransitionRoot(vnode) {
|
|
4273
|
+
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4274
|
+
if (vnode.type === Fragment) {
|
|
4275
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4276
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4277
|
+
}
|
|
4278
|
+
if (vnode.type !== Comment) return vnode;
|
|
4279
|
+
}
|
|
4180
4280
|
//#endregion
|
|
4181
4281
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4182
4282
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -4835,14 +4935,20 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4835
4935
|
break;
|
|
4836
4936
|
}
|
|
4837
4937
|
}, opts);
|
|
4838
|
-
|
|
4839
|
-
if (!(el instanceof Element)) return;
|
|
4938
|
+
const observe = (el) => {
|
|
4840
4939
|
if (elementIsVisibleInViewport(el)) {
|
|
4841
4940
|
hydrate();
|
|
4842
4941
|
ob.disconnect();
|
|
4843
4942
|
return false;
|
|
4844
4943
|
}
|
|
4944
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4945
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4946
|
+
}
|
|
4845
4947
|
ob.observe(el);
|
|
4948
|
+
};
|
|
4949
|
+
forEach((el) => {
|
|
4950
|
+
if (!(el instanceof Element)) return;
|
|
4951
|
+
return observe(el);
|
|
4846
4952
|
});
|
|
4847
4953
|
return () => ob.disconnect();
|
|
4848
4954
|
};
|
|
@@ -5104,7 +5210,10 @@ const KeepAliveImpl = {
|
|
|
5104
5210
|
function pruneCacheEntry(key) {
|
|
5105
5211
|
const cached = cache.get(key);
|
|
5106
5212
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
5107
|
-
else if (current)
|
|
5213
|
+
else if (current) {
|
|
5214
|
+
resetShapeFlag(current);
|
|
5215
|
+
if (cached) resetShapeFlag(cached);
|
|
5216
|
+
}
|
|
5108
5217
|
cache.delete(key);
|
|
5109
5218
|
keys.delete(key);
|
|
5110
5219
|
}
|
|
@@ -5585,8 +5694,8 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5585
5694
|
ret = new Array(source.length);
|
|
5586
5695
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
5587
5696
|
} else if (typeof source === "number") {
|
|
5588
|
-
if (
|
|
5589
|
-
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
5697
|
+
if (!Number.isInteger(source) || source < 0) {
|
|
5698
|
+
if (!!(process.env.NODE_ENV !== "production")) warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
5590
5699
|
ret = [];
|
|
5591
5700
|
} else {
|
|
5592
5701
|
ret = new Array(source);
|
|
@@ -5667,6 +5776,11 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5667
5776
|
owner: currentRenderingInstance
|
|
5668
5777
|
}] : void 0
|
|
5669
5778
|
};
|
|
5779
|
+
if (branchKey != null && props.key == null) {
|
|
5780
|
+
ret.vs.props = ret.props;
|
|
5781
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5782
|
+
ret.key = branchKey;
|
|
5783
|
+
}
|
|
5670
5784
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5671
5785
|
return ret;
|
|
5672
5786
|
}
|
|
@@ -5870,6 +5984,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5870
5984
|
const privateAPIs = {
|
|
5871
5985
|
$vnode: (i) => i.vnode,
|
|
5872
5986
|
_self: (i) => i.proxy,
|
|
5987
|
+
_setupProxy: (i) => i.setupState,
|
|
5873
5988
|
_uid: (i) => i.uid,
|
|
5874
5989
|
_data: (i) => i.data,
|
|
5875
5990
|
_isMounted: (i) => i.isMounted,
|
|
@@ -6647,7 +6762,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6647
6762
|
if (options.el) return vm.$mount(options.el);
|
|
6648
6763
|
else return vm;
|
|
6649
6764
|
}
|
|
6650
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6765
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.12`;
|
|
6651
6766
|
Vue.config = singletonApp.config;
|
|
6652
6767
|
Vue.use = (plugin, ...options) => {
|
|
6653
6768
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7475,7 +7590,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7475
7590
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
7476
7591
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7477
7592
|
const key = nextKeys[i];
|
|
7478
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7593
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7479
7594
|
}
|
|
7480
7595
|
return false;
|
|
7481
7596
|
}
|
|
@@ -8231,7 +8346,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8231
8346
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8232
8347
|
const oldVNode = oldChildren[i];
|
|
8233
8348
|
const newVNode = newChildren[i];
|
|
8234
|
-
const
|
|
8349
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8350
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
8235
8351
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
8236
8352
|
}
|
|
8237
8353
|
};
|
|
@@ -8331,6 +8447,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8331
8447
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8332
8448
|
if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
|
|
8333
8449
|
n2.el = n1.el;
|
|
8450
|
+
n2.placeholder = n1.placeholder;
|
|
8334
8451
|
updateComponentPreRender(instance, n2, optimized);
|
|
8335
8452
|
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
8336
8453
|
return;
|
|
@@ -8340,6 +8457,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8340
8457
|
}
|
|
8341
8458
|
} else {
|
|
8342
8459
|
n2.el = n1.el;
|
|
8460
|
+
n2.placeholder = n1.placeholder;
|
|
8343
8461
|
instance.vnode = n2;
|
|
8344
8462
|
}
|
|
8345
8463
|
};
|
|
@@ -8693,12 +8811,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8693
8811
|
};
|
|
8694
8812
|
const remove = (vnode) => {
|
|
8695
8813
|
const { type, el, anchor, transition } = vnode;
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
else remove(child);
|
|
8700
|
-
});
|
|
8701
|
-
else removeFragment(el, anchor);
|
|
8814
|
+
const isFragment = type === Fragment;
|
|
8815
|
+
if (isFragment && !transition) {
|
|
8816
|
+
removeFragment(el, anchor);
|
|
8702
8817
|
return;
|
|
8703
8818
|
}
|
|
8704
8819
|
if (type === Static) {
|
|
@@ -8706,8 +8821,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8706
8821
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8707
8822
|
return;
|
|
8708
8823
|
}
|
|
8709
|
-
|
|
8710
|
-
|
|
8824
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
8825
|
+
const performRemove = () => {
|
|
8826
|
+
if (isFragment) {
|
|
8827
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
8828
|
+
} else hostRemove(el);
|
|
8829
|
+
};
|
|
8830
|
+
if (transition) {
|
|
8831
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
8832
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8833
|
+
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8834
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8835
|
+
isElement = !!leavingEl;
|
|
8836
|
+
}
|
|
8837
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
8838
|
+
} else performRemove();
|
|
8711
8839
|
};
|
|
8712
8840
|
const removeFragment = (cur, end) => {
|
|
8713
8841
|
let next;
|
|
@@ -8752,15 +8880,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8752
8880
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
8753
8881
|
};
|
|
8754
8882
|
const render = (vnode, container, namespace) => {
|
|
8755
|
-
|
|
8756
|
-
|
|
8757
|
-
|
|
8758
|
-
|
|
8759
|
-
|
|
8760
|
-
|
|
8761
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8762
|
-
container._vnode = vnode;
|
|
8763
|
-
flushOnAppMount(instance);
|
|
8883
|
+
flushOnAppMount(() => {
|
|
8884
|
+
if (vnode == null) {
|
|
8885
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
8886
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8887
|
+
container._vnode = vnode;
|
|
8888
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
8764
8889
|
};
|
|
8765
8890
|
const internals = {
|
|
8766
8891
|
p: patch,
|
|
@@ -9155,13 +9280,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9155
9280
|
registerDep(instance, onResolve) {
|
|
9156
9281
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9157
9282
|
if (isInPendingSuspense) suspense.deps++;
|
|
9158
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
9159
9283
|
instance.asyncDep.catch((err) => {
|
|
9160
9284
|
handleError(err, instance, 0);
|
|
9161
9285
|
}).then((asyncSetupResult) => {
|
|
9162
9286
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
9163
9287
|
setCurrentInstance(null, void 0);
|
|
9164
|
-
if (
|
|
9288
|
+
if (!instance.scope.active) {
|
|
9165
9289
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9166
9290
|
return;
|
|
9167
9291
|
}
|
|
@@ -9517,7 +9641,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9517
9641
|
ctx: vnode.ctx,
|
|
9518
9642
|
ce: vnode.ce,
|
|
9519
9643
|
vi: vnode.vi,
|
|
9520
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
9644
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
9521
9645
|
vb: vnode.vb,
|
|
9522
9646
|
ibu: vnode.ibu,
|
|
9523
9647
|
iu: vnode.iu,
|
|
@@ -9527,13 +9651,22 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9527
9651
|
defineLegacyVNodeProperties(cloned);
|
|
9528
9652
|
return cloned;
|
|
9529
9653
|
}
|
|
9530
|
-
function cloneVaporSlotMeta(vnode) {
|
|
9654
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
9531
9655
|
const vaporSlot = vnode.vs;
|
|
9532
9656
|
if (!vaporSlot) return vaporSlot;
|
|
9533
9657
|
const cloned = {
|
|
9534
9658
|
slot: vaporSlot.slot,
|
|
9535
|
-
outlets: vaporSlot.outlets
|
|
9659
|
+
outlets: vaporSlot.outlets,
|
|
9660
|
+
props: vaporSlot.props
|
|
9536
9661
|
};
|
|
9662
|
+
if (vaporSlot.props && extraProps) {
|
|
9663
|
+
let extraSlotProps;
|
|
9664
|
+
for (const key in extraProps) if (key !== "key") {
|
|
9665
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
9666
|
+
extraSlotProps[key] = extraProps[key];
|
|
9667
|
+
}
|
|
9668
|
+
if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9669
|
+
}
|
|
9537
9670
|
if (vnode.el) {
|
|
9538
9671
|
cloned.state = vaporSlot.state;
|
|
9539
9672
|
cloned.ref = vaporSlot.ref;
|
|
@@ -9725,6 +9858,9 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
9725
9858
|
//#region packages/runtime-core/src/component.ts
|
|
9726
9859
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9727
9860
|
let uid = 0;
|
|
9861
|
+
function getNextUid() {
|
|
9862
|
+
return uid;
|
|
9863
|
+
}
|
|
9728
9864
|
/**
|
|
9729
9865
|
* @internal for vapor
|
|
9730
9866
|
*/
|
|
@@ -10254,7 +10390,7 @@ function isMemoSame(cached, memo) {
|
|
|
10254
10390
|
}
|
|
10255
10391
|
//#endregion
|
|
10256
10392
|
//#region packages/runtime-core/src/index.ts
|
|
10257
|
-
const version = "3.6.0-rc.
|
|
10393
|
+
const version = "3.6.0-rc.12";
|
|
10258
10394
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
10259
10395
|
/**
|
|
10260
10396
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10781,7 +10917,7 @@ function patchStyle(el, prev, next) {
|
|
|
10781
10917
|
else el.removeAttribute("style");
|
|
10782
10918
|
}
|
|
10783
10919
|
if (vShowOriginalDisplay in el) {
|
|
10784
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10920
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10785
10921
|
if (el[vShowHidden]) style.display = "none";
|
|
10786
10922
|
}
|
|
10787
10923
|
}
|
|
@@ -11113,7 +11249,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
11113
11249
|
this._resolveProps(def);
|
|
11114
11250
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
11115
11251
|
else if (!!(process.env.NODE_ENV !== "production") && styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
11116
|
-
this._mountComponent(def);
|
|
11252
|
+
if (this._connected) this._mountComponent(def);
|
|
11117
11253
|
};
|
|
11118
11254
|
const asyncDef = this._def.__asyncLoader;
|
|
11119
11255
|
if (asyncDef) {
|
|
@@ -11437,6 +11573,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
11437
11573
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11438
11574
|
const moveCbKey = Symbol("_moveCb");
|
|
11439
11575
|
const enterCbKey = Symbol("_enterCb");
|
|
11576
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
11440
11577
|
/**
|
|
11441
11578
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
11442
11579
|
* so that it can be annotated as pure
|
|
@@ -11457,15 +11594,24 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11457
11594
|
const state = useTransitionState();
|
|
11458
11595
|
let prevChildren;
|
|
11459
11596
|
let children;
|
|
11597
|
+
let origins;
|
|
11598
|
+
let moves;
|
|
11599
|
+
const willMove = () => {
|
|
11600
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
11601
|
+
return moves;
|
|
11602
|
+
};
|
|
11460
11603
|
onUpdated(() => {
|
|
11461
|
-
|
|
11462
|
-
|
|
11463
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
11604
|
+
pendingGroups.delete(instance);
|
|
11605
|
+
if (!willMove()) {
|
|
11464
11606
|
prevChildren = [];
|
|
11607
|
+
origins = void 0;
|
|
11465
11608
|
return;
|
|
11466
11609
|
}
|
|
11610
|
+
const moveClass = resolveMoveClass(props);
|
|
11467
11611
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
11468
|
-
|
|
11612
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
11613
|
+
origins = void 0;
|
|
11614
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
11469
11615
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11470
11616
|
forceReflow(instance.vnode.el);
|
|
11471
11617
|
movedChildren.forEach((c) => {
|
|
@@ -11480,6 +11626,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11480
11626
|
let tag = rawProps.tag || Fragment;
|
|
11481
11627
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11482
11628
|
prevChildren = [];
|
|
11629
|
+
moves = void 0;
|
|
11483
11630
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11484
11631
|
const child = children[i];
|
|
11485
11632
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
@@ -11494,6 +11641,14 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11494
11641
|
if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11495
11642
|
else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11496
11643
|
}
|
|
11644
|
+
if (prevChildren.length) {
|
|
11645
|
+
const root = instance.vnode.el;
|
|
11646
|
+
origins = getOrigins(instance, root);
|
|
11647
|
+
pendingGroups.set(instance, {
|
|
11648
|
+
root,
|
|
11649
|
+
willMove
|
|
11650
|
+
});
|
|
11651
|
+
}
|
|
11497
11652
|
return createVNode(tag, null, children);
|
|
11498
11653
|
};
|
|
11499
11654
|
}
|
|
@@ -11502,8 +11657,11 @@ function callPendingCbs(el) {
|
|
|
11502
11657
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11503
11658
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
11504
11659
|
}
|
|
11505
|
-
function
|
|
11506
|
-
|
|
11660
|
+
function resolveMoveClass(props) {
|
|
11661
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
11662
|
+
}
|
|
11663
|
+
function recordPosition(c, shift) {
|
|
11664
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
11507
11665
|
}
|
|
11508
11666
|
function applyTranslation(c) {
|
|
11509
11667
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -11528,13 +11686,36 @@ function baseApplyTranslation(oldPos, newPos, el) {
|
|
|
11528
11686
|
}
|
|
11529
11687
|
return false;
|
|
11530
11688
|
}
|
|
11531
|
-
function getPosition(el) {
|
|
11689
|
+
function getPosition(el, shift) {
|
|
11532
11690
|
const rect = el.getBoundingClientRect();
|
|
11533
11691
|
return {
|
|
11534
|
-
left: rect.left,
|
|
11535
|
-
top: rect.top
|
|
11692
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
11693
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
11536
11694
|
};
|
|
11537
11695
|
}
|
|
11696
|
+
function getOrigins(instance, root) {
|
|
11697
|
+
let origins;
|
|
11698
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
11699
|
+
const pending = pendingGroups.get(group);
|
|
11700
|
+
if (pending) {
|
|
11701
|
+
const item = findItem(pending.root, root);
|
|
11702
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
11703
|
+
item,
|
|
11704
|
+
willMove: pending.willMove
|
|
11705
|
+
}));
|
|
11706
|
+
}
|
|
11707
|
+
}
|
|
11708
|
+
return origins;
|
|
11709
|
+
}
|
|
11710
|
+
function findItem(root, node) {
|
|
11711
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
11712
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
11713
|
+
if (node && node.nodeType === 1) return node;
|
|
11714
|
+
}
|
|
11715
|
+
function getOriginShift(origins, root) {
|
|
11716
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
11717
|
+
return origin && getPosition(origin.item, origin);
|
|
11718
|
+
}
|
|
11538
11719
|
function hasCSSTransform(el, root, moveClass) {
|
|
11539
11720
|
const clone = el.cloneNode();
|
|
11540
11721
|
const _vtc = el[vtcKey];
|
|
@@ -12004,6 +12185,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12004
12185
|
ensureValidVNode: () => ensureValidVNode,
|
|
12005
12186
|
expose: () => expose,
|
|
12006
12187
|
filterModelListeners: () => filterModelListeners,
|
|
12188
|
+
filterSingleRoot: () => filterSingleRoot,
|
|
12007
12189
|
flushOnAppMount: () => flushOnAppMount,
|
|
12008
12190
|
forceReflow: () => forceReflow,
|
|
12009
12191
|
getAttributeMismatch: () => getAttributeMismatch,
|
|
@@ -12014,6 +12196,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12014
12196
|
getCurrentWatcher: () => getCurrentWatcher,
|
|
12015
12197
|
getFunctionalFallthrough: () => getFunctionalFallthrough,
|
|
12016
12198
|
getInheritedScopeIds: () => getInheritedScopeIds,
|
|
12199
|
+
getNextUid: () => getNextUid,
|
|
12200
|
+
getTransitionGroupOrigins: () => getOrigins,
|
|
12201
|
+
getTransitionGroupPosition: () => getPosition,
|
|
12202
|
+
getTransitionGroupShift: () => getOriginShift,
|
|
12017
12203
|
getTransitionRawChildren: () => getTransitionRawChildren,
|
|
12018
12204
|
guardReactiveProps: () => guardReactiveProps,
|
|
12019
12205
|
h: () => h,
|
|
@@ -12094,6 +12280,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12094
12280
|
patchClass: () => patchClass,
|
|
12095
12281
|
patchProp: () => patchProp,
|
|
12096
12282
|
patchStyle: () => patchStyle,
|
|
12283
|
+
pendingTransitionGroups: () => pendingGroups,
|
|
12097
12284
|
performAsyncHydrate: () => performAsyncHydrate,
|
|
12098
12285
|
performTransitionEnter: () => performTransitionEnter,
|
|
12099
12286
|
performTransitionLeave: () => performTransitionLeave,
|
|
@@ -13427,7 +13614,7 @@ const errorMessages = {
|
|
|
13427
13614
|
[41]: `v-model is missing expression.`,
|
|
13428
13615
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
13429
13616
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13430
|
-
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
13617
|
+
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.\nFor props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
|
|
13431
13618
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
13432
13619
|
[46]: `Error parsing JavaScript expression: `,
|
|
13433
13620
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -15260,7 +15447,11 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15260
15447
|
]),
|
|
15261
15448
|
createCompoundExpression([
|
|
15262
15449
|
`if (_cached && _cached.el`,
|
|
15263
|
-
...keyExp ? [
|
|
15450
|
+
...keyExp ? [
|
|
15451
|
+
` && _cached.key === (`,
|
|
15452
|
+
keyExp,
|
|
15453
|
+
`)`
|
|
15454
|
+
] : [],
|
|
15264
15455
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
15265
15456
|
]),
|
|
15266
15457
|
createCompoundExpression([`const _item = `, childBlock]),
|
|
@@ -16455,7 +16646,8 @@ const transformTransition = (node, context) => {
|
|
|
16455
16646
|
function postTransformTransition(node, onError, hasMultipleChildren = defaultHasMultipleChildren) {
|
|
16456
16647
|
return () => {
|
|
16457
16648
|
if (!node.children.length) return;
|
|
16458
|
-
|
|
16649
|
+
const multipleChildren = hasMultipleChildren(node);
|
|
16650
|
+
if (!!(process.env.NODE_ENV !== "production") && multipleChildren) onError(createDOMCompilerError(63, {
|
|
16459
16651
|
start: node.children[0].loc.start,
|
|
16460
16652
|
end: node.children[node.children.length - 1].loc.end,
|
|
16461
16653
|
source: ""
|
|
@@ -16686,7 +16878,11 @@ const validateHtmlNesting = (node, context) => {
|
|
|
16686
16878
|
};
|
|
16687
16879
|
//#endregion
|
|
16688
16880
|
//#region packages/compiler-dom/src/index.ts
|
|
16689
|
-
const DOMNodeTransforms = [
|
|
16881
|
+
const DOMNodeTransforms = [
|
|
16882
|
+
transformStyle,
|
|
16883
|
+
transformTransition,
|
|
16884
|
+
...!!(process.env.NODE_ENV !== "production") ? [validateHtmlNesting] : []
|
|
16885
|
+
];
|
|
16690
16886
|
const DOMDirectiveTransforms = {
|
|
16691
16887
|
cloak: noopDirectiveTransform,
|
|
16692
16888
|
html: transformVHtml,
|
|
@@ -16749,4 +16945,4 @@ Vue.compile = compileToFunction;
|
|
|
16749
16945
|
var esm_index_default = Vue;
|
|
16750
16946
|
const configureCompat = Vue.configureCompat;
|
|
16751
16947
|
//#endregion
|
|
16752
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defaultPropGetter, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, expose, filterModelListeners, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchClass, patchProp, patchStyle, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|
|
16948
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TransitionPropsValidators, TriggerOpTypes, VaporSlot, VueElement, VueElementBase, activate, assertNumber, baseApplyTranslation, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callPendingCbs, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, configureCompat, createApp, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, esm_index_default as default, defaultPropGetter, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureHydrationRenderer, ensureRenderer, ensureValidVNode, expose, filterModelListeners, filterSingleRoot, flushOnAppMount, forceReflow, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getNextUid, getOrigins as getTransitionGroupOrigins, getPosition as getTransitionGroupPosition, getOriginShift as getTransitionGroupShift, getTransitionRawChildren, guardReactiveProps, h, handleError, handleMovedChildren, hasCSSTransform, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, nodeOps, normalizeClass, normalizeContainer, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, parseEventName, patchClass, patchProp, patchStyle, pendingGroups as pendingTransitionGroups, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, render, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, resolveTransitionProps, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, setVarsOnNode, shallowReactive, shallowReadonly, shallowRef, shouldSetAsProp, shouldSetAsPropForVueCE, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, svgNS, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, unsafeToTrustedHTML, useAsyncComponentState, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelCheckboxInit, vModelCheckboxUpdate, vModelDynamic, getValue as vModelGetValue, vModelRadio, vModelSelect, vModelSelectInit, vModelSetSelected, vModelText, vModelTextInit, vModelTextUpdate, vShow, vShowHidden, vShowOriginalDisplay, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId, xlinkNS };
|