vue 3.5.42 → 3.5.44
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.cjs.js +1 -1
- package/dist/vue.cjs.prod.js +1 -1
- package/dist/vue.esm-browser.js +342 -143
- package/dist/vue.esm-browser.prod.js +9 -9
- package/dist/vue.esm-bundler.js +1 -1
- package/dist/vue.global.js +342 -143
- package/dist/vue.global.prod.js +9 -9
- package/dist/vue.runtime.esm-browser.js +335 -139
- package/dist/vue.runtime.esm-browser.prod.js +4 -4
- package/dist/vue.runtime.esm-bundler.js +1 -1
- package/dist/vue.runtime.global.js +335 -139
- package/dist/vue.runtime.global.prod.js +4 -4
- package/jsx.d.ts +1 -1
- package/package.json +6 -6
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* vue v3.5.
|
|
2
|
+
* vue v3.5.44
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -131,10 +131,10 @@ var Vue = (function (exports) {
|
|
|
131
131
|
}
|
|
132
132
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
133
133
|
const propertyDelimiterRE = /:([^]+)/;
|
|
134
|
-
const styleCommentRE =
|
|
134
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
135
135
|
function parseStringStyle(cssText) {
|
|
136
136
|
const ret = {};
|
|
137
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
137
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
138
138
|
if (item) {
|
|
139
139
|
const tmp = item.split(propertyDelimiterRE);
|
|
140
140
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -194,7 +194,7 @@ var Vue = (function (exports) {
|
|
|
194
194
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
195
195
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
196
196
|
|
|
197
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
197
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
198
198
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
199
199
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
200
200
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -224,22 +224,22 @@ var Vue = (function (exports) {
|
|
|
224
224
|
);
|
|
225
225
|
}
|
|
226
226
|
|
|
227
|
-
function looseCompareArrays(a, b) {
|
|
227
|
+
function looseCompareArrays(a, b, seen) {
|
|
228
228
|
if (a.length !== b.length) return false;
|
|
229
229
|
let equal = true;
|
|
230
230
|
for (let i = 0; equal && i < a.length; i++) {
|
|
231
|
-
equal = looseEqual(a[i], b[i]);
|
|
231
|
+
equal = looseEqual(a[i], b[i], seen);
|
|
232
232
|
}
|
|
233
233
|
return equal;
|
|
234
234
|
}
|
|
235
|
-
function looseCompareCollections(a, b) {
|
|
235
|
+
function looseCompareCollections(a, b, seen) {
|
|
236
236
|
if (a.size !== b.size) return false;
|
|
237
237
|
const candidates = Array.from(b);
|
|
238
238
|
const matched = new Uint8Array(candidates.length);
|
|
239
239
|
for (const item of a) {
|
|
240
240
|
let index = -1;
|
|
241
241
|
for (let i = 0; i < candidates.length; i++) {
|
|
242
|
-
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
242
|
+
if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
243
243
|
index = i;
|
|
244
244
|
break;
|
|
245
245
|
}
|
|
@@ -249,7 +249,47 @@ var Vue = (function (exports) {
|
|
|
249
249
|
}
|
|
250
250
|
return true;
|
|
251
251
|
}
|
|
252
|
-
function
|
|
252
|
+
function looseCompareObjects(a, b, seen) {
|
|
253
|
+
let aValidType = isMap(a);
|
|
254
|
+
let bValidType = isMap(b);
|
|
255
|
+
if (aValidType || bValidType) {
|
|
256
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
257
|
+
}
|
|
258
|
+
aValidType = isSet(a);
|
|
259
|
+
bValidType = isSet(b);
|
|
260
|
+
if (aValidType || bValidType) {
|
|
261
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
262
|
+
}
|
|
263
|
+
const aKeysCount = Object.keys(a).length;
|
|
264
|
+
const bKeysCount = Object.keys(b).length;
|
|
265
|
+
if (aKeysCount !== bKeysCount) {
|
|
266
|
+
return false;
|
|
267
|
+
}
|
|
268
|
+
for (const key in a) {
|
|
269
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
270
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
271
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
|
|
272
|
+
return false;
|
|
273
|
+
}
|
|
274
|
+
}
|
|
275
|
+
return String(a) === String(b);
|
|
276
|
+
}
|
|
277
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
278
|
+
if (!seen) {
|
|
279
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
280
|
+
}
|
|
281
|
+
const [seenA, seenB] = seen;
|
|
282
|
+
if (seenA.has(a) || seenB.has(b)) {
|
|
283
|
+
return seenA.get(a) === b && seenB.get(b) === a;
|
|
284
|
+
}
|
|
285
|
+
seenA.set(a, b);
|
|
286
|
+
seenB.set(b, a);
|
|
287
|
+
const equal = compare(a, b, seen);
|
|
288
|
+
seenA.delete(a);
|
|
289
|
+
seenB.delete(b);
|
|
290
|
+
return equal;
|
|
291
|
+
}
|
|
292
|
+
function looseEqual(a, b, seen) {
|
|
253
293
|
if (a === b) return true;
|
|
254
294
|
let aValidType = isDate(a);
|
|
255
295
|
let bValidType = isDate(b);
|
|
@@ -264,7 +304,7 @@ var Vue = (function (exports) {
|
|
|
264
304
|
aValidType = isArray(a);
|
|
265
305
|
bValidType = isArray(b);
|
|
266
306
|
if (aValidType || bValidType) {
|
|
267
|
-
return aValidType && bValidType ?
|
|
307
|
+
return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
268
308
|
}
|
|
269
309
|
aValidType = isObject(a);
|
|
270
310
|
bValidType = isObject(b);
|
|
@@ -272,28 +312,7 @@ var Vue = (function (exports) {
|
|
|
272
312
|
if (!aValidType || !bValidType) {
|
|
273
313
|
return false;
|
|
274
314
|
}
|
|
275
|
-
|
|
276
|
-
bValidType = isMap(b);
|
|
277
|
-
if (aValidType || bValidType) {
|
|
278
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
279
|
-
}
|
|
280
|
-
aValidType = isSet(a);
|
|
281
|
-
bValidType = isSet(b);
|
|
282
|
-
if (aValidType || bValidType) {
|
|
283
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
284
|
-
}
|
|
285
|
-
const aKeysCount = Object.keys(a).length;
|
|
286
|
-
const bKeysCount = Object.keys(b).length;
|
|
287
|
-
if (aKeysCount !== bKeysCount) {
|
|
288
|
-
return false;
|
|
289
|
-
}
|
|
290
|
-
for (const key in a) {
|
|
291
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
292
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
293
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
294
|
-
return false;
|
|
295
|
-
}
|
|
296
|
-
}
|
|
315
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
297
316
|
}
|
|
298
317
|
return String(a) === String(b);
|
|
299
318
|
}
|
|
@@ -1094,7 +1113,9 @@ var Vue = (function (exports) {
|
|
|
1094
1113
|
const raw = toRaw(array);
|
|
1095
1114
|
if (raw === array) return raw;
|
|
1096
1115
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1097
|
-
|
|
1116
|
+
if (isShallow(array)) return raw;
|
|
1117
|
+
if (!isReadonly(array)) return raw.map(toReactive);
|
|
1118
|
+
return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
1098
1119
|
}
|
|
1099
1120
|
function shallowReadArray(arr) {
|
|
1100
1121
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -1221,19 +1242,41 @@ var Vue = (function (exports) {
|
|
|
1221
1242
|
};
|
|
1222
1243
|
function iterator(self, method, wrapValue) {
|
|
1223
1244
|
const arr = shallowReadArray(self);
|
|
1224
|
-
const
|
|
1245
|
+
const methodFn = arr[method];
|
|
1246
|
+
const iter = methodFn.call(arr);
|
|
1225
1247
|
if (arr !== self && !isShallow(self)) {
|
|
1226
|
-
iter.
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
if (
|
|
1230
|
-
|
|
1248
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1249
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1250
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1251
|
+
if (methodFn !== arrayProto[method]) {
|
|
1252
|
+
Object.defineProperties(wrapped, {
|
|
1253
|
+
return: {
|
|
1254
|
+
get() {
|
|
1255
|
+
const fn = iter.return;
|
|
1256
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1257
|
+
}
|
|
1258
|
+
},
|
|
1259
|
+
throw: {
|
|
1260
|
+
get() {
|
|
1261
|
+
const fn = iter.throw;
|
|
1262
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1263
|
+
}
|
|
1264
|
+
}
|
|
1265
|
+
});
|
|
1231
1266
|
}
|
|
1232
|
-
return
|
|
1233
|
-
}
|
|
1267
|
+
return wrapped;
|
|
1268
|
+
}
|
|
1269
|
+
iter._next = iter.next;
|
|
1270
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1234
1271
|
}
|
|
1235
1272
|
return iter;
|
|
1236
1273
|
}
|
|
1274
|
+
function wrapResult(result, wrapValue) {
|
|
1275
|
+
if (!result.done) {
|
|
1276
|
+
result.value = wrapValue(result.value);
|
|
1277
|
+
}
|
|
1278
|
+
return result;
|
|
1279
|
+
}
|
|
1237
1280
|
const arrayProto = Array.prototype;
|
|
1238
1281
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1239
1282
|
const arr = shallowReadArray(self);
|
|
@@ -1656,6 +1699,8 @@ var Vue = (function (exports) {
|
|
|
1656
1699
|
return !isReadonly2;
|
|
1657
1700
|
} else if (key === "__v_isReadonly") {
|
|
1658
1701
|
return isReadonly2;
|
|
1702
|
+
} else if (key === "__v_isShallow") {
|
|
1703
|
+
return shallow;
|
|
1659
1704
|
} else if (key === "__v_raw") {
|
|
1660
1705
|
return target;
|
|
1661
1706
|
}
|
|
@@ -2201,9 +2246,11 @@ var Vue = (function (exports) {
|
|
|
2201
2246
|
if (once && cb) {
|
|
2202
2247
|
const _cb = cb;
|
|
2203
2248
|
cb = (...args) => {
|
|
2204
|
-
|
|
2205
|
-
|
|
2206
|
-
|
|
2249
|
+
try {
|
|
2250
|
+
return _cb(...args);
|
|
2251
|
+
} finally {
|
|
2252
|
+
watchHandle();
|
|
2253
|
+
}
|
|
2207
2254
|
};
|
|
2208
2255
|
}
|
|
2209
2256
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2214,12 +2261,13 @@ var Vue = (function (exports) {
|
|
|
2214
2261
|
if (cb) {
|
|
2215
2262
|
const newValue = effect.run();
|
|
2216
2263
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2217
|
-
if (cleanup) {
|
|
2218
|
-
cleanup();
|
|
2219
|
-
}
|
|
2220
2264
|
const currentWatcher = activeWatcher;
|
|
2221
|
-
|
|
2265
|
+
pauseTracking();
|
|
2222
2266
|
try {
|
|
2267
|
+
if (cleanup) {
|
|
2268
|
+
cleanup();
|
|
2269
|
+
}
|
|
2270
|
+
activeWatcher = effect;
|
|
2223
2271
|
const args = [
|
|
2224
2272
|
newValue,
|
|
2225
2273
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2233,6 +2281,7 @@ var Vue = (function (exports) {
|
|
|
2233
2281
|
);
|
|
2234
2282
|
} finally {
|
|
2235
2283
|
activeWatcher = currentWatcher;
|
|
2284
|
+
resetTracking();
|
|
2236
2285
|
}
|
|
2237
2286
|
}
|
|
2238
2287
|
} else {
|
|
@@ -2633,21 +2682,21 @@ var Vue = (function (exports) {
|
|
|
2633
2682
|
}
|
|
2634
2683
|
queueFlush();
|
|
2635
2684
|
}
|
|
2636
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2685
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2637
2686
|
{
|
|
2638
2687
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2639
2688
|
}
|
|
2640
2689
|
for (; i < queue.length; i++) {
|
|
2641
2690
|
const cb = queue[i];
|
|
2642
2691
|
if (cb && cb.flags & 2) {
|
|
2643
|
-
if (instance && cb.id !== instance.uid) {
|
|
2692
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2644
2693
|
continue;
|
|
2645
2694
|
}
|
|
2646
2695
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2647
2696
|
continue;
|
|
2648
2697
|
}
|
|
2649
2698
|
queue.splice(i, 1);
|
|
2650
|
-
i
|
|
2699
|
+
i = instance ? i - 1 : flushIndex;
|
|
2651
2700
|
if (cb.flags & 4) {
|
|
2652
2701
|
cb.flags &= -2;
|
|
2653
2702
|
}
|
|
@@ -2658,12 +2707,23 @@ var Vue = (function (exports) {
|
|
|
2658
2707
|
}
|
|
2659
2708
|
}
|
|
2660
2709
|
}
|
|
2661
|
-
function flushPostFlushCbs(seen) {
|
|
2710
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2662
2711
|
if (pendingPostFlushCbs.length) {
|
|
2663
|
-
|
|
2664
|
-
|
|
2665
|
-
)
|
|
2666
|
-
|
|
2712
|
+
let cbs = pendingPostFlushCbs;
|
|
2713
|
+
let kept = 0;
|
|
2714
|
+
if (skip) {
|
|
2715
|
+
cbs = [];
|
|
2716
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2717
|
+
const cb = pendingPostFlushCbs[i];
|
|
2718
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2719
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2720
|
+
} else {
|
|
2721
|
+
cbs.push(cb);
|
|
2722
|
+
}
|
|
2723
|
+
}
|
|
2724
|
+
}
|
|
2725
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2726
|
+
pendingPostFlushCbs.length = kept;
|
|
2667
2727
|
if (activePostFlushCbs) {
|
|
2668
2728
|
for (let i = 0; i < deduped.length; i++) {
|
|
2669
2729
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2689,6 +2749,22 @@ var Vue = (function (exports) {
|
|
|
2689
2749
|
postFlushIndex = 0;
|
|
2690
2750
|
}
|
|
2691
2751
|
}
|
|
2752
|
+
let isFlushing = false;
|
|
2753
|
+
function flushOnAppMount(fn, minUid) {
|
|
2754
|
+
if (isFlushing) {
|
|
2755
|
+
fn();
|
|
2756
|
+
return;
|
|
2757
|
+
}
|
|
2758
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2759
|
+
fn();
|
|
2760
|
+
isFlushing = true;
|
|
2761
|
+
try {
|
|
2762
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2763
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2764
|
+
} finally {
|
|
2765
|
+
isFlushing = false;
|
|
2766
|
+
}
|
|
2767
|
+
}
|
|
2692
2768
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2693
2769
|
function flushJobs(seen) {
|
|
2694
2770
|
{
|
|
@@ -3169,6 +3245,7 @@ var Vue = (function (exports) {
|
|
|
3169
3245
|
let isPre = false;
|
|
3170
3246
|
if (flush === "post") {
|
|
3171
3247
|
baseWatchOptions.scheduler = (job) => {
|
|
3248
|
+
job.i = instance;
|
|
3172
3249
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3173
3250
|
};
|
|
3174
3251
|
} else if (flush !== "sync") {
|
|
@@ -3463,7 +3540,11 @@ var Vue = (function (exports) {
|
|
|
3463
3540
|
};
|
|
3464
3541
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
3465
3542
|
if (moveType === 0) {
|
|
3543
|
+
if (vnode.targetStart) {
|
|
3544
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
3545
|
+
}
|
|
3466
3546
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3547
|
+
parentAnchor = vnode.targetAnchor;
|
|
3467
3548
|
}
|
|
3468
3549
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3469
3550
|
const isReorder = moveType === 2;
|
|
@@ -3632,10 +3713,6 @@ var Vue = (function (exports) {
|
|
|
3632
3713
|
onAfterAppear: TransitionHookValidator,
|
|
3633
3714
|
onAppearCancelled: TransitionHookValidator
|
|
3634
3715
|
};
|
|
3635
|
-
const recursiveGetSubtree = (instance) => {
|
|
3636
|
-
const subTree = instance.subTree;
|
|
3637
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3638
|
-
};
|
|
3639
3716
|
const BaseTransitionImpl = {
|
|
3640
3717
|
name: `BaseTransition`,
|
|
3641
3718
|
props: BaseTransitionPropsValidators,
|
|
@@ -3676,7 +3753,7 @@ var Vue = (function (exports) {
|
|
|
3676
3753
|
setTransitionHooks(innerChild, enterHooks);
|
|
3677
3754
|
}
|
|
3678
3755
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3679
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
3756
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
3680
3757
|
let leavingHooks = resolveTransitionHooks(
|
|
3681
3758
|
oldInnerChild,
|
|
3682
3759
|
rawProps,
|
|
@@ -3809,8 +3886,15 @@ var Vue = (function (exports) {
|
|
|
3809
3886
|
);
|
|
3810
3887
|
}
|
|
3811
3888
|
const leavingVNode = leavingVNodesCache[key];
|
|
3812
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
3813
|
-
leavingVNode.el[leaveCbKey]
|
|
3889
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
3890
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
3891
|
+
if (!leavingCb) {
|
|
3892
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
3893
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
3894
|
+
}
|
|
3895
|
+
if (leavingCb) {
|
|
3896
|
+
leavingCb();
|
|
3897
|
+
}
|
|
3814
3898
|
}
|
|
3815
3899
|
callHook(hook, [el]);
|
|
3816
3900
|
},
|
|
@@ -3938,6 +4022,12 @@ var Vue = (function (exports) {
|
|
|
3938
4022
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3939
4023
|
} else {
|
|
3940
4024
|
vnode.transition = hooks;
|
|
4025
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4026
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4027
|
+
if (child) {
|
|
4028
|
+
setTransitionHooks(child, hooks);
|
|
4029
|
+
}
|
|
4030
|
+
}
|
|
3941
4031
|
}
|
|
3942
4032
|
}
|
|
3943
4033
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -3962,6 +4052,18 @@ var Vue = (function (exports) {
|
|
|
3962
4052
|
}
|
|
3963
4053
|
return ret;
|
|
3964
4054
|
}
|
|
4055
|
+
function getTransitionRoot(vnode) {
|
|
4056
|
+
if (vnode.component) {
|
|
4057
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4058
|
+
}
|
|
4059
|
+
if (vnode.type === Fragment) {
|
|
4060
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4061
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4062
|
+
}
|
|
4063
|
+
if (vnode.type !== Comment) {
|
|
4064
|
+
return vnode;
|
|
4065
|
+
}
|
|
4066
|
+
}
|
|
3965
4067
|
|
|
3966
4068
|
// @__NO_SIDE_EFFECTS__
|
|
3967
4069
|
function defineComponent(options, extraOptions) {
|
|
@@ -4335,13 +4437,15 @@ var Vue = (function (exports) {
|
|
|
4335
4437
|
getContainerType(container),
|
|
4336
4438
|
optimized
|
|
4337
4439
|
);
|
|
4338
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4440
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
4339
4441
|
let subTree;
|
|
4340
4442
|
if (isFragmentStart) {
|
|
4341
4443
|
subTree = createVNode(Static);
|
|
4342
4444
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4343
4445
|
} else {
|
|
4344
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4446
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4447
|
+
node.nodeType === 8 ? Comment : "div"
|
|
4448
|
+
);
|
|
4345
4449
|
}
|
|
4346
4450
|
subTree.el = node;
|
|
4347
4451
|
vnode.component.subTree = subTree;
|
|
@@ -4865,14 +4969,22 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4865
4969
|
break;
|
|
4866
4970
|
}
|
|
4867
4971
|
}, opts);
|
|
4868
|
-
|
|
4869
|
-
if (!(el instanceof Element)) return;
|
|
4972
|
+
const observe = (el) => {
|
|
4870
4973
|
if (elementIsVisibleInViewport(el)) {
|
|
4871
4974
|
hydrate();
|
|
4872
4975
|
ob.disconnect();
|
|
4873
4976
|
return false;
|
|
4874
4977
|
}
|
|
4978
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4979
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
4980
|
+
if (observe(el.children[i]) === false) return false;
|
|
4981
|
+
}
|
|
4982
|
+
}
|
|
4875
4983
|
ob.observe(el);
|
|
4984
|
+
};
|
|
4985
|
+
forEach((el) => {
|
|
4986
|
+
if (!(el instanceof Element)) return;
|
|
4987
|
+
return observe(el);
|
|
4876
4988
|
});
|
|
4877
4989
|
return () => ob.disconnect();
|
|
4878
4990
|
};
|
|
@@ -5223,6 +5335,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5223
5335
|
unmount(cached);
|
|
5224
5336
|
} else if (current) {
|
|
5225
5337
|
resetShapeFlag(current);
|
|
5338
|
+
if (cached) resetShapeFlag(cached);
|
|
5226
5339
|
}
|
|
5227
5340
|
cache.delete(key);
|
|
5228
5341
|
keys.delete(key);
|
|
@@ -5514,9 +5627,11 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5514
5627
|
}
|
|
5515
5628
|
} else if (typeof source === "number") {
|
|
5516
5629
|
if (!Number.isInteger(source) || source < 0) {
|
|
5517
|
-
|
|
5518
|
-
|
|
5519
|
-
|
|
5630
|
+
{
|
|
5631
|
+
warn$1(
|
|
5632
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
5633
|
+
);
|
|
5634
|
+
}
|
|
5520
5635
|
ret = [];
|
|
5521
5636
|
} else {
|
|
5522
5637
|
ret = new Array(source);
|
|
@@ -7151,7 +7266,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7151
7266
|
}
|
|
7152
7267
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7153
7268
|
const key = nextKeys[i];
|
|
7154
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7269
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7155
7270
|
return true;
|
|
7156
7271
|
}
|
|
7157
7272
|
}
|
|
@@ -7778,6 +7893,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7778
7893
|
optimized = false;
|
|
7779
7894
|
n2.dynamicChildren = null;
|
|
7780
7895
|
}
|
|
7896
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
7897
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
7898
|
+
n2.dynamicChildren = [];
|
|
7899
|
+
}
|
|
7900
|
+
n2.dynamicChildren.hasOnce = true;
|
|
7901
|
+
}
|
|
7781
7902
|
const { type, ref, shapeFlag } = n2;
|
|
7782
7903
|
switch (type) {
|
|
7783
7904
|
case Text:
|
|
@@ -8184,15 +8305,16 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8184
8305
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8185
8306
|
const oldVNode = oldChildren[i];
|
|
8186
8307
|
const newVNode = newChildren[i];
|
|
8308
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8187
8309
|
const container = (
|
|
8188
8310
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
8189
8311
|
// which will not have a mounted element
|
|
8190
|
-
|
|
8312
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
8191
8313
|
// of the Fragment itself so it can move its children.
|
|
8192
8314
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
8193
8315
|
// which also requires the correct parent container
|
|
8194
8316
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
8195
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
8317
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
8196
8318
|
// In other cases, the parent container is not actually used so we
|
|
8197
8319
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
8198
8320
|
fallbackContainer
|
|
@@ -8356,7 +8478,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8356
8478
|
}
|
|
8357
8479
|
if (isHmrUpdating) initialVNode.el = null;
|
|
8358
8480
|
if (instance.asyncDep) {
|
|
8359
|
-
parentSuspense && parentSuspense.registerDep(
|
|
8481
|
+
parentSuspense && parentSuspense.registerDep(
|
|
8482
|
+
instance,
|
|
8483
|
+
setupRenderEffect,
|
|
8484
|
+
optimized,
|
|
8485
|
+
namespace
|
|
8486
|
+
);
|
|
8360
8487
|
if (!initialVNode.el) {
|
|
8361
8488
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8362
8489
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -8385,6 +8512,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8385
8512
|
{
|
|
8386
8513
|
pushWarningContext(n2);
|
|
8387
8514
|
}
|
|
8515
|
+
n2.el = n1.el;
|
|
8516
|
+
n2.placeholder = n1.placeholder;
|
|
8388
8517
|
updateComponentPreRender(instance, n2, optimized);
|
|
8389
8518
|
{
|
|
8390
8519
|
popWarningContext();
|
|
@@ -8396,6 +8525,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8396
8525
|
}
|
|
8397
8526
|
} else {
|
|
8398
8527
|
n2.el = n1.el;
|
|
8528
|
+
n2.placeholder = n1.placeholder;
|
|
8399
8529
|
instance.vnode = n2;
|
|
8400
8530
|
}
|
|
8401
8531
|
};
|
|
@@ -8976,7 +9106,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8976
9106
|
cacheIndex,
|
|
8977
9107
|
memo
|
|
8978
9108
|
} = vnode;
|
|
8979
|
-
if (patchFlag === -2) {
|
|
9109
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
8980
9110
|
optimized = false;
|
|
8981
9111
|
}
|
|
8982
9112
|
if (ref != null) {
|
|
@@ -8984,7 +9114,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
8984
9114
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
8985
9115
|
resetTracking();
|
|
8986
9116
|
}
|
|
8987
|
-
if (cacheIndex != null) {
|
|
9117
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
8988
9118
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
8989
9119
|
}
|
|
8990
9120
|
if (shapeFlag & 256) {
|
|
@@ -9049,35 +9179,37 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9049
9179
|
};
|
|
9050
9180
|
const remove = (vnode) => {
|
|
9051
9181
|
const { type, el, anchor, transition } = vnode;
|
|
9052
|
-
|
|
9053
|
-
|
|
9054
|
-
|
|
9055
|
-
if (child.type === Comment) {
|
|
9056
|
-
hostRemove(child.el);
|
|
9057
|
-
} else {
|
|
9058
|
-
remove(child);
|
|
9059
|
-
}
|
|
9060
|
-
});
|
|
9061
|
-
} else {
|
|
9062
|
-
removeFragment(el, anchor);
|
|
9063
|
-
}
|
|
9182
|
+
const isFragment = type === Fragment;
|
|
9183
|
+
if (isFragment && !transition) {
|
|
9184
|
+
removeFragment(el, anchor);
|
|
9064
9185
|
return;
|
|
9065
9186
|
}
|
|
9066
9187
|
if (type === Static) {
|
|
9067
9188
|
removeStaticNode(vnode);
|
|
9189
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
9190
|
+
transition.afterLeave();
|
|
9191
|
+
}
|
|
9068
9192
|
return;
|
|
9069
9193
|
}
|
|
9194
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
9070
9195
|
const performRemove = () => {
|
|
9071
|
-
|
|
9196
|
+
if (isFragment) {
|
|
9197
|
+
if (hostParentNode(el)) {
|
|
9198
|
+
removeFragment(el, anchor);
|
|
9199
|
+
}
|
|
9200
|
+
} else {
|
|
9201
|
+
hostRemove(el);
|
|
9202
|
+
}
|
|
9072
9203
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
9073
9204
|
transition.afterLeave();
|
|
9074
9205
|
}
|
|
9075
9206
|
};
|
|
9076
|
-
if (
|
|
9207
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
9077
9208
|
const { leave, delayLeave } = transition;
|
|
9078
|
-
const
|
|
9209
|
+
const leavingEl = leavingNode.el;
|
|
9210
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
9079
9211
|
if (delayLeave) {
|
|
9080
|
-
delayLeave(
|
|
9212
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
9081
9213
|
} else {
|
|
9082
9214
|
performLeave();
|
|
9083
9215
|
}
|
|
@@ -9108,6 +9240,9 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9108
9240
|
if (job) {
|
|
9109
9241
|
job.flags |= 8;
|
|
9110
9242
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
9243
|
+
} else if (instance.vnode.el && subTree) {
|
|
9244
|
+
subTree.transition = instance.vnode.transition;
|
|
9245
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
9111
9246
|
}
|
|
9112
9247
|
if (um) {
|
|
9113
9248
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -9135,32 +9270,26 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9135
9270
|
const teleportEnd = el && el[TeleportEndKey];
|
|
9136
9271
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
9137
9272
|
};
|
|
9138
|
-
let isFlushing = false;
|
|
9139
9273
|
const render = (vnode, container, namespace) => {
|
|
9140
|
-
|
|
9141
|
-
|
|
9142
|
-
if (
|
|
9143
|
-
|
|
9144
|
-
|
|
9274
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
9275
|
+
flushOnAppMount(() => {
|
|
9276
|
+
if (vnode == null) {
|
|
9277
|
+
if (container._vnode) {
|
|
9278
|
+
unmount(container._vnode, null, null, true);
|
|
9279
|
+
}
|
|
9280
|
+
} else {
|
|
9281
|
+
patch(
|
|
9282
|
+
container._vnode || null,
|
|
9283
|
+
vnode,
|
|
9284
|
+
container,
|
|
9285
|
+
null,
|
|
9286
|
+
null,
|
|
9287
|
+
null,
|
|
9288
|
+
namespace
|
|
9289
|
+
);
|
|
9145
9290
|
}
|
|
9146
|
-
|
|
9147
|
-
|
|
9148
|
-
container._vnode || null,
|
|
9149
|
-
vnode,
|
|
9150
|
-
container,
|
|
9151
|
-
null,
|
|
9152
|
-
null,
|
|
9153
|
-
null,
|
|
9154
|
-
namespace
|
|
9155
|
-
);
|
|
9156
|
-
}
|
|
9157
|
-
container._vnode = vnode;
|
|
9158
|
-
if (!isFlushing) {
|
|
9159
|
-
isFlushing = true;
|
|
9160
|
-
flushPreFlushCbs(instance);
|
|
9161
|
-
flushPostFlushCbs();
|
|
9162
|
-
isFlushing = false;
|
|
9163
|
-
}
|
|
9291
|
+
container._vnode = vnode;
|
|
9292
|
+
}, minUid);
|
|
9164
9293
|
};
|
|
9165
9294
|
const internals = {
|
|
9166
9295
|
p: patch,
|
|
@@ -9322,7 +9451,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9322
9451
|
rendererInternals
|
|
9323
9452
|
);
|
|
9324
9453
|
} else {
|
|
9325
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
9454
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
9326
9455
|
n2.suspense = n1.suspense;
|
|
9327
9456
|
n2.suspense.vnode = n2;
|
|
9328
9457
|
n2.el = n1.el;
|
|
@@ -9408,10 +9537,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9408
9537
|
if (pendingBranch) {
|
|
9409
9538
|
suspense.pendingBranch = newBranch;
|
|
9410
9539
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
9540
|
+
suspense.deps++;
|
|
9411
9541
|
patch(
|
|
9412
9542
|
pendingBranch,
|
|
9413
9543
|
newBranch,
|
|
9414
|
-
|
|
9544
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
9545
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
9415
9546
|
null,
|
|
9416
9547
|
parentComponent,
|
|
9417
9548
|
suspense,
|
|
@@ -9419,6 +9550,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9419
9550
|
slotScopeIds,
|
|
9420
9551
|
optimized
|
|
9421
9552
|
);
|
|
9553
|
+
suspense.deps--;
|
|
9422
9554
|
if (suspense.deps <= 0) {
|
|
9423
9555
|
suspense.resolve();
|
|
9424
9556
|
} else if (isInFallback) {
|
|
@@ -9684,6 +9816,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9684
9816
|
suspense.effects = [];
|
|
9685
9817
|
if (isSuspensible) {
|
|
9686
9818
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
9819
|
+
parentSuspenseId = void 0;
|
|
9687
9820
|
parentSuspense.deps--;
|
|
9688
9821
|
if (parentSuspense.deps === 0 && !sync) {
|
|
9689
9822
|
parentSuspense.resolve();
|
|
@@ -9744,7 +9877,10 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9744
9877
|
next() {
|
|
9745
9878
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
9746
9879
|
},
|
|
9747
|
-
|
|
9880
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
9881
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
9882
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
9883
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
9748
9884
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9749
9885
|
if (isInPendingSuspense) {
|
|
9750
9886
|
suspense.deps++;
|
|
@@ -9757,6 +9893,12 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9757
9893
|
return;
|
|
9758
9894
|
}
|
|
9759
9895
|
unsetCurrentInstance();
|
|
9896
|
+
if (!instance.scope.active) {
|
|
9897
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
9898
|
+
suspense.resolve();
|
|
9899
|
+
}
|
|
9900
|
+
return;
|
|
9901
|
+
}
|
|
9760
9902
|
instance.asyncResolved = true;
|
|
9761
9903
|
const { vnode: vnode2 } = instance;
|
|
9762
9904
|
{
|
|
@@ -9778,7 +9920,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
9778
9920
|
// consider the comment placeholder case.
|
|
9779
9921
|
hydratedEl ? null : next(instance.subTree),
|
|
9780
9922
|
suspense,
|
|
9781
|
-
|
|
9923
|
+
namespace2,
|
|
9782
9924
|
optimized2
|
|
9783
9925
|
);
|
|
9784
9926
|
if (placeholder) {
|
|
@@ -10178,7 +10320,8 @@ Component that was made reactive: `,
|
|
|
10178
10320
|
el: vnode.el,
|
|
10179
10321
|
anchor: vnode.anchor,
|
|
10180
10322
|
ctx: vnode.ctx,
|
|
10181
|
-
ce: vnode.ce
|
|
10323
|
+
ce: vnode.ce,
|
|
10324
|
+
cacheIndex: vnode.cacheIndex
|
|
10182
10325
|
};
|
|
10183
10326
|
if (transition && cloneTransition) {
|
|
10184
10327
|
setTransitionHooks(
|
|
@@ -10311,6 +10454,9 @@ Component that was made reactive: `,
|
|
|
10311
10454
|
|
|
10312
10455
|
const emptyAppContext = createAppContext();
|
|
10313
10456
|
let uid = 0;
|
|
10457
|
+
function getNextUid() {
|
|
10458
|
+
return uid;
|
|
10459
|
+
}
|
|
10314
10460
|
function createComponentInstance(vnode, parent, suspense) {
|
|
10315
10461
|
const type = vnode.type;
|
|
10316
10462
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -10969,7 +11115,7 @@ Component that was made reactive: `,
|
|
|
10969
11115
|
return true;
|
|
10970
11116
|
}
|
|
10971
11117
|
|
|
10972
|
-
const version = "3.5.
|
|
11118
|
+
const version = "3.5.44";
|
|
10973
11119
|
const warn = warn$1 ;
|
|
10974
11120
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10975
11121
|
const devtools = devtools$1 ;
|
|
@@ -11526,7 +11672,9 @@ Component that was made reactive: `,
|
|
|
11526
11672
|
}
|
|
11527
11673
|
}
|
|
11528
11674
|
if (vShowOriginalDisplay in el) {
|
|
11529
|
-
|
|
11675
|
+
if (!isCssString || prev !== next) {
|
|
11676
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11677
|
+
}
|
|
11530
11678
|
if (el[vShowHidden]) {
|
|
11531
11679
|
style.display = "none";
|
|
11532
11680
|
}
|
|
@@ -12008,7 +12156,9 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12008
12156
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
12009
12157
|
);
|
|
12010
12158
|
}
|
|
12011
|
-
this.
|
|
12159
|
+
if (this._connected) {
|
|
12160
|
+
this._mount(def);
|
|
12161
|
+
}
|
|
12012
12162
|
};
|
|
12013
12163
|
const asyncDef = this._def.__asyncLoader;
|
|
12014
12164
|
if (asyncDef) {
|
|
@@ -12366,6 +12516,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12366
12516
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12367
12517
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
12368
12518
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
12519
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
12369
12520
|
const decorate = (t) => {
|
|
12370
12521
|
delete t.props.mode;
|
|
12371
12522
|
return t;
|
|
@@ -12381,21 +12532,30 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12381
12532
|
const state = useTransitionState();
|
|
12382
12533
|
let prevChildren;
|
|
12383
12534
|
let children;
|
|
12384
|
-
|
|
12385
|
-
|
|
12386
|
-
|
|
12535
|
+
let origins;
|
|
12536
|
+
let moves;
|
|
12537
|
+
const willMove = () => {
|
|
12538
|
+
if (moves === void 0) {
|
|
12539
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
12540
|
+
prevChildren[0].el,
|
|
12541
|
+
instance.vnode.el,
|
|
12542
|
+
resolveMoveClass(props)
|
|
12543
|
+
);
|
|
12387
12544
|
}
|
|
12388
|
-
|
|
12389
|
-
|
|
12390
|
-
|
|
12391
|
-
|
|
12392
|
-
|
|
12393
|
-
)) {
|
|
12545
|
+
return moves;
|
|
12546
|
+
};
|
|
12547
|
+
onUpdated(() => {
|
|
12548
|
+
pendingGroups.delete(instance);
|
|
12549
|
+
if (!willMove()) {
|
|
12394
12550
|
prevChildren = [];
|
|
12551
|
+
origins = void 0;
|
|
12395
12552
|
return;
|
|
12396
12553
|
}
|
|
12554
|
+
const moveClass = resolveMoveClass(props);
|
|
12397
12555
|
prevChildren.forEach(callPendingCbs);
|
|
12398
|
-
|
|
12556
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
12557
|
+
origins = void 0;
|
|
12558
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
12399
12559
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
12400
12560
|
forceReflow(instance.vnode.el);
|
|
12401
12561
|
movedChildren.forEach((c) => {
|
|
@@ -12422,6 +12582,7 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12422
12582
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
12423
12583
|
let tag = rawProps.tag || Fragment;
|
|
12424
12584
|
prevChildren = [];
|
|
12585
|
+
moves = void 0;
|
|
12425
12586
|
if (children) {
|
|
12426
12587
|
for (let i = 0; i < children.length; i++) {
|
|
12427
12588
|
const child = children[i];
|
|
@@ -12453,6 +12614,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12453
12614
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12454
12615
|
}
|
|
12455
12616
|
}
|
|
12617
|
+
if (prevChildren.length) {
|
|
12618
|
+
origins = getOrigins(instance);
|
|
12619
|
+
pendingGroups.set(instance, willMove);
|
|
12620
|
+
}
|
|
12456
12621
|
return createVNode(tag, null, children);
|
|
12457
12622
|
};
|
|
12458
12623
|
}
|
|
@@ -12467,8 +12632,11 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12467
12632
|
el[enterCbKey]();
|
|
12468
12633
|
}
|
|
12469
12634
|
}
|
|
12470
|
-
function
|
|
12471
|
-
|
|
12635
|
+
function resolveMoveClass(props) {
|
|
12636
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
12637
|
+
}
|
|
12638
|
+
function recordPosition(c, shift) {
|
|
12639
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
12472
12640
|
}
|
|
12473
12641
|
function applyTranslation(c) {
|
|
12474
12642
|
const oldPos = positionMap.get(c);
|
|
@@ -12492,13 +12660,41 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
12492
12660
|
return c;
|
|
12493
12661
|
}
|
|
12494
12662
|
}
|
|
12495
|
-
function getPosition(el) {
|
|
12663
|
+
function getPosition(el, shift) {
|
|
12496
12664
|
const rect = el.getBoundingClientRect();
|
|
12497
12665
|
return {
|
|
12498
|
-
left: rect.left,
|
|
12499
|
-
top: rect.top
|
|
12666
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
12667
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
12500
12668
|
};
|
|
12501
12669
|
}
|
|
12670
|
+
function getOrigins(instance) {
|
|
12671
|
+
let origins;
|
|
12672
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
12673
|
+
const willMove = pendingGroups.get(group);
|
|
12674
|
+
if (willMove) {
|
|
12675
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
12676
|
+
if (item) {
|
|
12677
|
+
(origins || (origins = [])).push(
|
|
12678
|
+
extend(getPosition(item), { item, willMove })
|
|
12679
|
+
);
|
|
12680
|
+
}
|
|
12681
|
+
}
|
|
12682
|
+
}
|
|
12683
|
+
return origins;
|
|
12684
|
+
}
|
|
12685
|
+
function findItem(root, node) {
|
|
12686
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
12687
|
+
while (node && node.parentNode !== container) {
|
|
12688
|
+
node = node.parentNode;
|
|
12689
|
+
}
|
|
12690
|
+
if (node && node.nodeType === 1) {
|
|
12691
|
+
return node;
|
|
12692
|
+
}
|
|
12693
|
+
}
|
|
12694
|
+
function getOriginShift(origins, root) {
|
|
12695
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
12696
|
+
return origin && getPosition(origin.item, origin);
|
|
12697
|
+
}
|
|
12502
12698
|
function hasCSSTransform(el, root, moveClass) {
|
|
12503
12699
|
const clone = el.cloneNode();
|
|
12504
12700
|
const _vtc = el[vtcKey];
|