@vue/compat 3.6.0-rc.11 → 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 +4 -1
- package/dist/vue.cjs.js +259 -83
- package/dist/vue.cjs.prod.js +291 -80
- package/dist/vue.esm-browser.js +253 -79
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +272 -85
- package/dist/vue.global.js +253 -79
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +253 -79
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +272 -85
- package/dist/vue.runtime.global.js +253 -79
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +4 -4
package/dist/vue.cjs.js
CHANGED
|
@@ -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
|
**/
|
|
@@ -318,9 +318,10 @@ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
|
318
318
|
* - ismap -> isMap
|
|
319
319
|
* - nomodule -> noModule
|
|
320
320
|
* - novalidate -> noValidate
|
|
321
|
+
* - playsinline -> playsInline
|
|
321
322
|
* - readonly -> readOnly
|
|
322
323
|
*/
|
|
323
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
324
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
324
325
|
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
325
326
|
/**
|
|
326
327
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
@@ -1049,17 +1050,33 @@ const arrayInstrumentations = {
|
|
|
1049
1050
|
};
|
|
1050
1051
|
function iterator(self, method, wrapValue) {
|
|
1051
1052
|
const arr = shallowReadArray(self);
|
|
1052
|
-
const
|
|
1053
|
+
const methodFn = arr[method];
|
|
1054
|
+
const iter = methodFn.call(arr);
|
|
1053
1055
|
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
1056
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1057
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1058
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1059
|
+
if (methodFn !== arrayProto[method]) Object.defineProperties(wrapped, {
|
|
1060
|
+
return: { get() {
|
|
1061
|
+
const fn = iter.return;
|
|
1062
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1063
|
+
} },
|
|
1064
|
+
throw: { get() {
|
|
1065
|
+
const fn = iter.throw;
|
|
1066
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1067
|
+
} }
|
|
1068
|
+
});
|
|
1069
|
+
return wrapped;
|
|
1070
|
+
}
|
|
1054
1071
|
iter._next = iter.next;
|
|
1055
|
-
iter.next = () =>
|
|
1056
|
-
const result = iter._next();
|
|
1057
|
-
if (!result.done) result.value = wrapValue(result.value);
|
|
1058
|
-
return result;
|
|
1059
|
-
};
|
|
1072
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1060
1073
|
}
|
|
1061
1074
|
return iter;
|
|
1062
1075
|
}
|
|
1076
|
+
function wrapResult(result, wrapValue) {
|
|
1077
|
+
if (!result.done) result.value = wrapValue(result.value);
|
|
1078
|
+
return result;
|
|
1079
|
+
}
|
|
1063
1080
|
const arrayProto = Array.prototype;
|
|
1064
1081
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1065
1082
|
const arr = shallowReadArray(self);
|
|
@@ -1377,6 +1394,7 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
1377
1394
|
return (target, key, receiver) => {
|
|
1378
1395
|
if (key === "__v_isReactive") return !isReadonly;
|
|
1379
1396
|
else if (key === "__v_isReadonly") return isReadonly;
|
|
1397
|
+
else if (key === "__v_isShallow") return shallow;
|
|
1380
1398
|
else if (key === "__v_raw") return target;
|
|
1381
1399
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1382
1400
|
};
|
|
@@ -2286,8 +2304,9 @@ function getCurrentWatcher() {
|
|
|
2286
2304
|
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
2287
2305
|
if (owner) {
|
|
2288
2306
|
const { call } = owner.options;
|
|
2289
|
-
|
|
2290
|
-
|
|
2307
|
+
const cleanup = call ? () => call(cleanupFn, 4) : cleanupFn;
|
|
2308
|
+
if (owner.cb) (owner.cbCleanups || (owner.cbCleanups = [])).push(cleanup);
|
|
2309
|
+
else owner.cleanups[owner.cleanupsLength++] = cleanup;
|
|
2291
2310
|
} else if (!failSilently) warn$2("onWatcherCleanup() was called when there was no active watcher to associate with.");
|
|
2292
2311
|
}
|
|
2293
2312
|
var WatcherEffect = class extends ReactiveEffect {
|
|
@@ -2348,9 +2367,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2348
2367
|
if (once && cb) {
|
|
2349
2368
|
const _cb = cb;
|
|
2350
2369
|
cb = (...args) => {
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2370
|
+
try {
|
|
2371
|
+
return _cb(...args);
|
|
2372
|
+
} finally {
|
|
2373
|
+
this.stop();
|
|
2374
|
+
}
|
|
2354
2375
|
};
|
|
2355
2376
|
}
|
|
2356
2377
|
this.cb = cb;
|
|
@@ -2358,6 +2379,19 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2358
2379
|
this.onTrack = options.onTrack;
|
|
2359
2380
|
this.onTrigger = options.onTrigger;
|
|
2360
2381
|
}
|
|
2382
|
+
cleanupCallback() {
|
|
2383
|
+
const cleanups = this.cbCleanups;
|
|
2384
|
+
if (cleanups) {
|
|
2385
|
+
this.cbCleanups = void 0;
|
|
2386
|
+
for (let i = 0, l = cleanups.length; i < l; i++) cleanups[i]();
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
stop() {
|
|
2390
|
+
if (this.active) {
|
|
2391
|
+
super.stop();
|
|
2392
|
+
this.cleanupCallback();
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2361
2395
|
run(initialRun = false) {
|
|
2362
2396
|
const oldValue = this.oldValue;
|
|
2363
2397
|
const newValue = this.oldValue = super.run();
|
|
@@ -2365,10 +2399,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2365
2399
|
const { immediate, deep, call } = this.options;
|
|
2366
2400
|
if (initialRun && !immediate) return;
|
|
2367
2401
|
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2368
|
-
cleanup(this);
|
|
2369
2402
|
const currentWatcher = activeWatcher;
|
|
2370
|
-
|
|
2403
|
+
const prevSub = setActiveSub();
|
|
2371
2404
|
try {
|
|
2405
|
+
this.cleanupCallback();
|
|
2406
|
+
activeWatcher = this;
|
|
2372
2407
|
const args = [
|
|
2373
2408
|
newValue,
|
|
2374
2409
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : this.isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2377,6 +2412,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2377
2412
|
call ? call(this.cb, 3, args) : this.cb(...args);
|
|
2378
2413
|
} finally {
|
|
2379
2414
|
activeWatcher = currentWatcher;
|
|
2415
|
+
setActiveSub(prevSub);
|
|
2380
2416
|
}
|
|
2381
2417
|
}
|
|
2382
2418
|
}
|
|
@@ -2707,15 +2743,15 @@ function queuePostFlushCb(jobs, id = Infinity) {
|
|
|
2707
2743
|
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2708
2744
|
queueFlush();
|
|
2709
2745
|
}
|
|
2710
|
-
function flushPreFlushCbs(instance, seen) {
|
|
2746
|
+
function flushPreFlushCbs(instance, minUid, seen) {
|
|
2711
2747
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2712
2748
|
for (let i = flushIndex; i < jobsLength; i++) {
|
|
2713
2749
|
const cb = jobs[i];
|
|
2714
2750
|
if (cb.order & 1 || cb.order === Infinity) continue;
|
|
2715
|
-
if (instance && cb.order !== instance.uid * 2) continue;
|
|
2751
|
+
if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
|
|
2716
2752
|
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2717
2753
|
jobs.splice(i, 1);
|
|
2718
|
-
i
|
|
2754
|
+
i = instance ? i - 1 : flushIndex - 1;
|
|
2719
2755
|
jobsLength--;
|
|
2720
2756
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2721
2757
|
try {
|
|
@@ -2725,15 +2761,24 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
2725
2761
|
}
|
|
2726
2762
|
}
|
|
2727
2763
|
}
|
|
2728
|
-
function flushPostFlushCbs(seen) {
|
|
2764
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2729
2765
|
if (postJobs.length) {
|
|
2766
|
+
let cbs = postJobs;
|
|
2767
|
+
if (skip) {
|
|
2768
|
+
cbs = [];
|
|
2769
|
+
let kept = 0;
|
|
2770
|
+
for (let i = 0; i < postJobs.length; i++) {
|
|
2771
|
+
const cb = postJobs[i];
|
|
2772
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
|
|
2773
|
+
else cbs.push(cb);
|
|
2774
|
+
}
|
|
2775
|
+
postJobs.length = kept;
|
|
2776
|
+
} else postJobs = [];
|
|
2730
2777
|
if (activePostJobs) {
|
|
2731
|
-
for (let i = 0; i <
|
|
2732
|
-
postJobs.length = 0;
|
|
2778
|
+
for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
|
|
2733
2779
|
return;
|
|
2734
2780
|
}
|
|
2735
|
-
activePostJobs =
|
|
2736
|
-
postJobs = [];
|
|
2781
|
+
activePostJobs = cbs;
|
|
2737
2782
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2738
2783
|
try {
|
|
2739
2784
|
while (postFlushIndex < activePostJobs.length) {
|
|
@@ -2755,17 +2800,28 @@ function flushPostFlushCbs(seen) {
|
|
|
2755
2800
|
}
|
|
2756
2801
|
let isFlushing = false;
|
|
2757
2802
|
/**
|
|
2803
|
+
* Run a root render, then flush the jobs it is responsible for. A mount or
|
|
2804
|
+
* unmount (`minUid` given) only flushes the jobs of the components it created
|
|
2805
|
+
* and the post cbs it queued, so pre watchers triggered in setup run before
|
|
2806
|
+
* mounted (#5721) while the jobs of other components stay in the queue and
|
|
2807
|
+
* keep their order (#6728). A root update keeps flushing all pending pre jobs
|
|
2808
|
+
* and post cbs, as the jobs of the components it re-renders may predate it.
|
|
2809
|
+
*
|
|
2758
2810
|
* @internal
|
|
2759
2811
|
*/
|
|
2760
|
-
function flushOnAppMount(
|
|
2761
|
-
if (
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2812
|
+
function flushOnAppMount(fn, minUid) {
|
|
2813
|
+
if (isFlushing) {
|
|
2814
|
+
fn();
|
|
2815
|
+
return;
|
|
2816
|
+
}
|
|
2817
|
+
const queued = minUid === void 0 ? void 0 : new Set(postJobs);
|
|
2818
|
+
fn();
|
|
2819
|
+
isFlushing = true;
|
|
2820
|
+
try {
|
|
2821
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2822
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2823
|
+
} finally {
|
|
2824
|
+
isFlushing = false;
|
|
2769
2825
|
}
|
|
2770
2826
|
}
|
|
2771
2827
|
function flushJobs(seen) {
|
|
@@ -3586,7 +3642,7 @@ var RenderWatcherEffect = class extends WatcherEffect {
|
|
|
3586
3642
|
this.flags |= 128;
|
|
3587
3643
|
job.flags |= 2;
|
|
3588
3644
|
}
|
|
3589
|
-
|
|
3645
|
+
job.i = instance;
|
|
3590
3646
|
this.job = job;
|
|
3591
3647
|
}
|
|
3592
3648
|
notify() {
|
|
@@ -3797,7 +3853,11 @@ const TeleportImpl = {
|
|
|
3797
3853
|
hydrate: hydrateTeleport
|
|
3798
3854
|
};
|
|
3799
3855
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3800
|
-
if (moveType === 0)
|
|
3856
|
+
if (moveType === 0) {
|
|
3857
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3858
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3859
|
+
parentAnchor = vnode.targetAnchor;
|
|
3860
|
+
}
|
|
3801
3861
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3802
3862
|
const isReorder = moveType === 2;
|
|
3803
3863
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3918,6 +3978,10 @@ const BaseTransitionPropsValidators = {
|
|
|
3918
3978
|
};
|
|
3919
3979
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3920
3980
|
if (vnode.type === Comment) return true;
|
|
3981
|
+
if (vnode.type === Fragment) {
|
|
3982
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3983
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3984
|
+
}
|
|
3921
3985
|
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3922
3986
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3923
3987
|
}
|
|
@@ -3979,7 +4043,14 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3979
4043
|
},
|
|
3980
4044
|
earlyRemove: () => {
|
|
3981
4045
|
const leavingVNode = leavingVNodesCache[key];
|
|
3982
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4046
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4047
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4048
|
+
if (!leavingCb) {
|
|
4049
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4050
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4051
|
+
}
|
|
4052
|
+
if (leavingCb) leavingCb();
|
|
4053
|
+
}
|
|
3983
4054
|
},
|
|
3984
4055
|
cloneHooks: (vnode) => {
|
|
3985
4056
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -4173,7 +4244,13 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4173
4244
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4174
4245
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4175
4246
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
4176
|
-
} else
|
|
4247
|
+
} else {
|
|
4248
|
+
vnode.transition = hooks;
|
|
4249
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4250
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4251
|
+
if (child) setTransitionHooks(child, hooks);
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4177
4254
|
return hooks;
|
|
4178
4255
|
}
|
|
4179
4256
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4196,6 +4273,14 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4196
4273
|
function checkTransitionMode(mode) {
|
|
4197
4274
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4198
4275
|
}
|
|
4276
|
+
function getTransitionRoot(vnode) {
|
|
4277
|
+
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4278
|
+
if (vnode.type === Fragment) {
|
|
4279
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4280
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4281
|
+
}
|
|
4282
|
+
if (vnode.type !== Comment) return vnode;
|
|
4283
|
+
}
|
|
4199
4284
|
//#endregion
|
|
4200
4285
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4201
4286
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -4825,14 +4910,20 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4825
4910
|
break;
|
|
4826
4911
|
}
|
|
4827
4912
|
}, opts);
|
|
4828
|
-
|
|
4829
|
-
if (!(el instanceof Element)) return;
|
|
4913
|
+
const observe = (el) => {
|
|
4830
4914
|
if (elementIsVisibleInViewport(el)) {
|
|
4831
4915
|
hydrate();
|
|
4832
4916
|
ob.disconnect();
|
|
4833
4917
|
return false;
|
|
4834
4918
|
}
|
|
4919
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4920
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4921
|
+
}
|
|
4835
4922
|
ob.observe(el);
|
|
4923
|
+
};
|
|
4924
|
+
forEach((el) => {
|
|
4925
|
+
if (!(el instanceof Element)) return;
|
|
4926
|
+
return observe(el);
|
|
4836
4927
|
});
|
|
4837
4928
|
return () => ob.disconnect();
|
|
4838
4929
|
};
|
|
@@ -5094,7 +5185,10 @@ const KeepAliveImpl = {
|
|
|
5094
5185
|
function pruneCacheEntry(key) {
|
|
5095
5186
|
const cached = cache.get(key);
|
|
5096
5187
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
5097
|
-
else if (current)
|
|
5188
|
+
else if (current) {
|
|
5189
|
+
resetShapeFlag(current);
|
|
5190
|
+
if (cached) resetShapeFlag(cached);
|
|
5191
|
+
}
|
|
5098
5192
|
cache.delete(key);
|
|
5099
5193
|
keys.delete(key);
|
|
5100
5194
|
}
|
|
@@ -5657,6 +5751,11 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5657
5751
|
owner: currentRenderingInstance
|
|
5658
5752
|
}] : void 0
|
|
5659
5753
|
};
|
|
5754
|
+
if (branchKey != null && props.key == null) {
|
|
5755
|
+
ret.vs.props = ret.props;
|
|
5756
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5757
|
+
ret.key = branchKey;
|
|
5758
|
+
}
|
|
5660
5759
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5661
5760
|
return ret;
|
|
5662
5761
|
}
|
|
@@ -5860,6 +5959,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5860
5959
|
const privateAPIs = {
|
|
5861
5960
|
$vnode: (i) => i.vnode,
|
|
5862
5961
|
_self: (i) => i.proxy,
|
|
5962
|
+
_setupProxy: (i) => i.setupState,
|
|
5863
5963
|
_uid: (i) => i.uid,
|
|
5864
5964
|
_data: (i) => i.data,
|
|
5865
5965
|
_isMounted: (i) => i.isMounted,
|
|
@@ -6636,7 +6736,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6636
6736
|
if (options.el) return vm.$mount(options.el);
|
|
6637
6737
|
else return vm;
|
|
6638
6738
|
}
|
|
6639
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6739
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.12`;
|
|
6640
6740
|
Vue.config = singletonApp.config;
|
|
6641
6741
|
Vue.use = (plugin, ...options) => {
|
|
6642
6742
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7454,7 +7554,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7454
7554
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
7455
7555
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7456
7556
|
const key = nextKeys[i];
|
|
7457
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7557
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7458
7558
|
}
|
|
7459
7559
|
return false;
|
|
7460
7560
|
}
|
|
@@ -8178,7 +8278,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8178
8278
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8179
8279
|
const oldVNode = oldChildren[i];
|
|
8180
8280
|
const newVNode = newChildren[i];
|
|
8181
|
-
const
|
|
8281
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8282
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
8182
8283
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
8183
8284
|
}
|
|
8184
8285
|
};
|
|
@@ -8273,6 +8374,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8273
8374
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8274
8375
|
pushWarningContext(n2);
|
|
8275
8376
|
n2.el = n1.el;
|
|
8377
|
+
n2.placeholder = n1.placeholder;
|
|
8276
8378
|
updateComponentPreRender(instance, n2, optimized);
|
|
8277
8379
|
popWarningContext();
|
|
8278
8380
|
return;
|
|
@@ -8282,6 +8384,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8282
8384
|
}
|
|
8283
8385
|
} else {
|
|
8284
8386
|
n2.el = n1.el;
|
|
8387
|
+
n2.placeholder = n1.placeholder;
|
|
8285
8388
|
instance.vnode = n2;
|
|
8286
8389
|
}
|
|
8287
8390
|
};
|
|
@@ -8633,12 +8736,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8633
8736
|
};
|
|
8634
8737
|
const remove = (vnode) => {
|
|
8635
8738
|
const { type, el, anchor, transition } = vnode;
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
else remove(child);
|
|
8640
|
-
});
|
|
8641
|
-
else removeFragment(el, anchor);
|
|
8739
|
+
const isFragment = type === Fragment;
|
|
8740
|
+
if (isFragment && !transition) {
|
|
8741
|
+
removeFragment(el, anchor);
|
|
8642
8742
|
return;
|
|
8643
8743
|
}
|
|
8644
8744
|
if (type === Static) {
|
|
@@ -8646,8 +8746,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8646
8746
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8647
8747
|
return;
|
|
8648
8748
|
}
|
|
8649
|
-
|
|
8650
|
-
|
|
8749
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
8750
|
+
const performRemove = () => {
|
|
8751
|
+
if (isFragment) {
|
|
8752
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
8753
|
+
} else hostRemove(el);
|
|
8754
|
+
};
|
|
8755
|
+
if (transition) {
|
|
8756
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
8757
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8758
|
+
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8759
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8760
|
+
isElement = !!leavingEl;
|
|
8761
|
+
}
|
|
8762
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
8763
|
+
} else performRemove();
|
|
8651
8764
|
};
|
|
8652
8765
|
const removeFragment = (cur, end) => {
|
|
8653
8766
|
let next;
|
|
@@ -8692,15 +8805,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8692
8805
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
8693
8806
|
};
|
|
8694
8807
|
const render = (vnode, container, namespace) => {
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8702
|
-
container._vnode = vnode;
|
|
8703
|
-
flushOnAppMount(instance);
|
|
8808
|
+
flushOnAppMount(() => {
|
|
8809
|
+
if (vnode == null) {
|
|
8810
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
8811
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8812
|
+
container._vnode = vnode;
|
|
8813
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
8704
8814
|
};
|
|
8705
8815
|
const internals = {
|
|
8706
8816
|
p: patch,
|
|
@@ -9093,13 +9203,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9093
9203
|
registerDep(instance, onResolve) {
|
|
9094
9204
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9095
9205
|
if (isInPendingSuspense) suspense.deps++;
|
|
9096
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
9097
9206
|
instance.asyncDep.catch((err) => {
|
|
9098
9207
|
handleError(err, instance, 0);
|
|
9099
9208
|
}).then((asyncSetupResult) => {
|
|
9100
9209
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
9101
9210
|
setCurrentInstance(null, void 0);
|
|
9102
|
-
if (
|
|
9211
|
+
if (!instance.scope.active) {
|
|
9103
9212
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9104
9213
|
return;
|
|
9105
9214
|
}
|
|
@@ -9455,7 +9564,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9455
9564
|
ctx: vnode.ctx,
|
|
9456
9565
|
ce: vnode.ce,
|
|
9457
9566
|
vi: vnode.vi,
|
|
9458
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
9567
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
9459
9568
|
vb: vnode.vb,
|
|
9460
9569
|
ibu: vnode.ibu,
|
|
9461
9570
|
iu: vnode.iu,
|
|
@@ -9465,13 +9574,22 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9465
9574
|
defineLegacyVNodeProperties(cloned);
|
|
9466
9575
|
return cloned;
|
|
9467
9576
|
}
|
|
9468
|
-
function cloneVaporSlotMeta(vnode) {
|
|
9577
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
9469
9578
|
const vaporSlot = vnode.vs;
|
|
9470
9579
|
if (!vaporSlot) return vaporSlot;
|
|
9471
9580
|
const cloned = {
|
|
9472
9581
|
slot: vaporSlot.slot,
|
|
9473
|
-
outlets: vaporSlot.outlets
|
|
9582
|
+
outlets: vaporSlot.outlets,
|
|
9583
|
+
props: vaporSlot.props
|
|
9474
9584
|
};
|
|
9585
|
+
if (vaporSlot.props && extraProps) {
|
|
9586
|
+
let extraSlotProps;
|
|
9587
|
+
for (const key in extraProps) if (key !== "key") {
|
|
9588
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
9589
|
+
extraSlotProps[key] = extraProps[key];
|
|
9590
|
+
}
|
|
9591
|
+
if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9592
|
+
}
|
|
9475
9593
|
if (vnode.el) {
|
|
9476
9594
|
cloned.state = vaporSlot.state;
|
|
9477
9595
|
cloned.ref = vaporSlot.ref;
|
|
@@ -9663,6 +9781,9 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
9663
9781
|
//#region packages/runtime-core/src/component.ts
|
|
9664
9782
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9665
9783
|
let uid = 0;
|
|
9784
|
+
function getNextUid() {
|
|
9785
|
+
return uid;
|
|
9786
|
+
}
|
|
9666
9787
|
function createComponentInstance(vnode, parent, suspense) {
|
|
9667
9788
|
const type = vnode.type;
|
|
9668
9789
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -10173,7 +10294,7 @@ function isMemoSame(cached, memo) {
|
|
|
10173
10294
|
}
|
|
10174
10295
|
//#endregion
|
|
10175
10296
|
//#region packages/runtime-core/src/index.ts
|
|
10176
|
-
const version = "3.6.0-rc.
|
|
10297
|
+
const version = "3.6.0-rc.12";
|
|
10177
10298
|
const warn = warn$1;
|
|
10178
10299
|
/**
|
|
10179
10300
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10625,7 +10746,7 @@ function patchStyle(el, prev, next) {
|
|
|
10625
10746
|
else el.removeAttribute("style");
|
|
10626
10747
|
}
|
|
10627
10748
|
if (vShowOriginalDisplay in el) {
|
|
10628
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10749
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10629
10750
|
if (el[vShowHidden]) style.display = "none";
|
|
10630
10751
|
}
|
|
10631
10752
|
}
|
|
@@ -10955,7 +11076,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10955
11076
|
this._resolveProps(def);
|
|
10956
11077
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
10957
11078
|
else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
10958
|
-
this._mountComponent(def);
|
|
11079
|
+
if (this._connected) this._mountComponent(def);
|
|
10959
11080
|
};
|
|
10960
11081
|
const asyncDef = this._def.__asyncLoader;
|
|
10961
11082
|
if (asyncDef) {
|
|
@@ -11273,6 +11394,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
11273
11394
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11274
11395
|
const moveCbKey = Symbol("_moveCb");
|
|
11275
11396
|
const enterCbKey = Symbol("_enterCb");
|
|
11397
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
11276
11398
|
/**
|
|
11277
11399
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
11278
11400
|
* so that it can be annotated as pure
|
|
@@ -11293,15 +11415,24 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11293
11415
|
const state = useTransitionState();
|
|
11294
11416
|
let prevChildren;
|
|
11295
11417
|
let children;
|
|
11418
|
+
let origins;
|
|
11419
|
+
let moves;
|
|
11420
|
+
const willMove = () => {
|
|
11421
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
11422
|
+
return moves;
|
|
11423
|
+
};
|
|
11296
11424
|
onUpdated(() => {
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
11425
|
+
pendingGroups.delete(instance);
|
|
11426
|
+
if (!willMove()) {
|
|
11300
11427
|
prevChildren = [];
|
|
11428
|
+
origins = void 0;
|
|
11301
11429
|
return;
|
|
11302
11430
|
}
|
|
11431
|
+
const moveClass = resolveMoveClass(props);
|
|
11303
11432
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
11304
|
-
|
|
11433
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
11434
|
+
origins = void 0;
|
|
11435
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
11305
11436
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11306
11437
|
forceReflow(instance.vnode.el);
|
|
11307
11438
|
movedChildren.forEach((c) => {
|
|
@@ -11316,6 +11447,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11316
11447
|
let tag = rawProps.tag || Fragment;
|
|
11317
11448
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11318
11449
|
prevChildren = [];
|
|
11450
|
+
moves = void 0;
|
|
11319
11451
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11320
11452
|
const child = children[i];
|
|
11321
11453
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
@@ -11330,6 +11462,14 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11330
11462
|
if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11331
11463
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11332
11464
|
}
|
|
11465
|
+
if (prevChildren.length) {
|
|
11466
|
+
const root = instance.vnode.el;
|
|
11467
|
+
origins = getOrigins(instance, root);
|
|
11468
|
+
pendingGroups.set(instance, {
|
|
11469
|
+
root,
|
|
11470
|
+
willMove
|
|
11471
|
+
});
|
|
11472
|
+
}
|
|
11333
11473
|
return createVNode(tag, null, children);
|
|
11334
11474
|
};
|
|
11335
11475
|
}
|
|
@@ -11338,8 +11478,11 @@ function callPendingCbs(el) {
|
|
|
11338
11478
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11339
11479
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
11340
11480
|
}
|
|
11341
|
-
function
|
|
11342
|
-
|
|
11481
|
+
function resolveMoveClass(props) {
|
|
11482
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
11483
|
+
}
|
|
11484
|
+
function recordPosition(c, shift) {
|
|
11485
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
11343
11486
|
}
|
|
11344
11487
|
function applyTranslation(c) {
|
|
11345
11488
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -11364,13 +11507,36 @@ function baseApplyTranslation(oldPos, newPos, el) {
|
|
|
11364
11507
|
}
|
|
11365
11508
|
return false;
|
|
11366
11509
|
}
|
|
11367
|
-
function getPosition(el) {
|
|
11510
|
+
function getPosition(el, shift) {
|
|
11368
11511
|
const rect = el.getBoundingClientRect();
|
|
11369
11512
|
return {
|
|
11370
|
-
left: rect.left,
|
|
11371
|
-
top: rect.top
|
|
11513
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
11514
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
11372
11515
|
};
|
|
11373
11516
|
}
|
|
11517
|
+
function getOrigins(instance, root) {
|
|
11518
|
+
let origins;
|
|
11519
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
11520
|
+
const pending = pendingGroups.get(group);
|
|
11521
|
+
if (pending) {
|
|
11522
|
+
const item = findItem(pending.root, root);
|
|
11523
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
11524
|
+
item,
|
|
11525
|
+
willMove: pending.willMove
|
|
11526
|
+
}));
|
|
11527
|
+
}
|
|
11528
|
+
}
|
|
11529
|
+
return origins;
|
|
11530
|
+
}
|
|
11531
|
+
function findItem(root, node) {
|
|
11532
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
11533
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
11534
|
+
if (node && node.nodeType === 1) return node;
|
|
11535
|
+
}
|
|
11536
|
+
function getOriginShift(origins, root) {
|
|
11537
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
11538
|
+
return origin && getPosition(origin.item, origin);
|
|
11539
|
+
}
|
|
11374
11540
|
function hasCSSTransform(el, root, moveClass) {
|
|
11375
11541
|
const clone = el.cloneNode();
|
|
11376
11542
|
const _vtc = el[vtcKey];
|
|
@@ -13655,7 +13821,7 @@ const errorMessages = {
|
|
|
13655
13821
|
[41]: `v-model is missing expression.`,
|
|
13656
13822
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
13657
13823
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13658
|
-
[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.`,
|
|
13824
|
+
[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.`,
|
|
13659
13825
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
13660
13826
|
[46]: `Error parsing JavaScript expression: `,
|
|
13661
13827
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -15982,7 +16148,11 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15982
16148
|
]),
|
|
15983
16149
|
createCompoundExpression([
|
|
15984
16150
|
`if (_cached && _cached.el`,
|
|
15985
|
-
...keyExp ? [
|
|
16151
|
+
...keyExp ? [
|
|
16152
|
+
` && _cached.key === (`,
|
|
16153
|
+
keyExp,
|
|
16154
|
+
`)`
|
|
16155
|
+
] : [],
|
|
15986
16156
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
15987
16157
|
]),
|
|
15988
16158
|
createCompoundExpression([`const _item = `, childBlock]),
|
|
@@ -17467,7 +17637,7 @@ function stringifyNode(node, context) {
|
|
|
17467
17637
|
}
|
|
17468
17638
|
function stringifyElement(node, context) {
|
|
17469
17639
|
let res = `<${node.tag}`;
|
|
17470
|
-
let innerHTML =
|
|
17640
|
+
let innerHTML = void 0;
|
|
17471
17641
|
for (let i = 0; i < node.props.length; i++) {
|
|
17472
17642
|
const p = node.props[i];
|
|
17473
17643
|
if (p.type === 6) {
|
|
@@ -17489,13 +17659,15 @@ function stringifyElement(node, context) {
|
|
|
17489
17659
|
else if (arg === "style") evaluated = stringifyStyle(normalizeStyle(evaluated));
|
|
17490
17660
|
res += ` ${p.arg.content}="${escapeHtml(evaluated)}"`;
|
|
17491
17661
|
}
|
|
17492
|
-
} else if (p.name === "html")
|
|
17493
|
-
|
|
17662
|
+
} else if (p.name === "html") {
|
|
17663
|
+
var _evaluateConstant;
|
|
17664
|
+
innerHTML = (_evaluateConstant = evaluateConstant(p.exp)) !== null && _evaluateConstant !== void 0 ? _evaluateConstant : "";
|
|
17665
|
+
} else if (p.name === "text") innerHTML = escapeHtml(toDisplayString(evaluateConstant(p.exp)));
|
|
17494
17666
|
}
|
|
17495
17667
|
}
|
|
17496
17668
|
if (context.scopeId) res += ` ${context.scopeId}`;
|
|
17497
17669
|
res += `>`;
|
|
17498
|
-
if (innerHTML) res += innerHTML;
|
|
17670
|
+
if (innerHTML !== void 0) res += innerHTML;
|
|
17499
17671
|
else for (let i = 0; i < node.children.length; i++) res += stringifyNode(node.children[i], context);
|
|
17500
17672
|
if (!isVoidTag(node.tag)) res += `</${node.tag}>`;
|
|
17501
17673
|
return res;
|
|
@@ -17722,7 +17894,11 @@ const validateHtmlNesting = (node, context) => {
|
|
|
17722
17894
|
};
|
|
17723
17895
|
//#endregion
|
|
17724
17896
|
//#region packages/compiler-dom/src/index.ts
|
|
17725
|
-
const DOMNodeTransforms = [
|
|
17897
|
+
const DOMNodeTransforms = [
|
|
17898
|
+
transformStyle,
|
|
17899
|
+
transformTransition,
|
|
17900
|
+
...[validateHtmlNesting]
|
|
17901
|
+
];
|
|
17726
17902
|
const DOMDirectiveTransforms = {
|
|
17727
17903
|
cloak: noopDirectiveTransform,
|
|
17728
17904
|
html: transformVHtml,
|