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
|
**/
|
|
@@ -128,10 +128,10 @@ function normalizeStyle(value) {
|
|
|
128
128
|
}
|
|
129
129
|
const listDelimiterRE = /;(?![^(]*\))/g;
|
|
130
130
|
const propertyDelimiterRE = /:([^]+)/;
|
|
131
|
-
const styleCommentRE =
|
|
131
|
+
const styleCommentRE = /"(?:[^"\\]|\\[^])*"|'(?:[^'\\]|\\[^])*'|\\[^]|\/\*[^]*?\*\//g;
|
|
132
132
|
function parseStringStyle(cssText) {
|
|
133
133
|
const ret = {};
|
|
134
|
-
cssText.replace(styleCommentRE, "").split(listDelimiterRE).forEach((item) => {
|
|
134
|
+
cssText.replace(styleCommentRE, (match) => match.startsWith("/*") ? "" : match).split(listDelimiterRE).forEach((item) => {
|
|
135
135
|
if (item) {
|
|
136
136
|
const tmp = item.split(propertyDelimiterRE);
|
|
137
137
|
tmp.length > 1 && (ret[tmp[0].trim()] = tmp[1].trim());
|
|
@@ -191,7 +191,7 @@ const isHTMLTag = /* @__PURE__ */ makeMap(HTML_TAGS);
|
|
|
191
191
|
const isSVGTag = /* @__PURE__ */ makeMap(SVG_TAGS);
|
|
192
192
|
const isMathMLTag = /* @__PURE__ */ makeMap(MATH_TAGS);
|
|
193
193
|
|
|
194
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
194
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
195
195
|
const isSpecialBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs);
|
|
196
196
|
const isBooleanAttr = /* @__PURE__ */ makeMap(
|
|
197
197
|
specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`
|
|
@@ -221,22 +221,22 @@ function getEscapedCssVarName(key, doubleEscape) {
|
|
|
221
221
|
);
|
|
222
222
|
}
|
|
223
223
|
|
|
224
|
-
function looseCompareArrays(a, b) {
|
|
224
|
+
function looseCompareArrays(a, b, seen) {
|
|
225
225
|
if (a.length !== b.length) return false;
|
|
226
226
|
let equal = true;
|
|
227
227
|
for (let i = 0; equal && i < a.length; i++) {
|
|
228
|
-
equal = looseEqual(a[i], b[i]);
|
|
228
|
+
equal = looseEqual(a[i], b[i], seen);
|
|
229
229
|
}
|
|
230
230
|
return equal;
|
|
231
231
|
}
|
|
232
|
-
function looseCompareCollections(a, b) {
|
|
232
|
+
function looseCompareCollections(a, b, seen) {
|
|
233
233
|
if (a.size !== b.size) return false;
|
|
234
234
|
const candidates = Array.from(b);
|
|
235
235
|
const matched = new Uint8Array(candidates.length);
|
|
236
236
|
for (const item of a) {
|
|
237
237
|
let index = -1;
|
|
238
238
|
for (let i = 0; i < candidates.length; i++) {
|
|
239
|
-
if (!matched[i] && looseEqual(item, candidates[i])) {
|
|
239
|
+
if (!matched[i] && looseEqual(item, candidates[i], seen)) {
|
|
240
240
|
index = i;
|
|
241
241
|
break;
|
|
242
242
|
}
|
|
@@ -246,7 +246,47 @@ function looseCompareCollections(a, b) {
|
|
|
246
246
|
}
|
|
247
247
|
return true;
|
|
248
248
|
}
|
|
249
|
-
function
|
|
249
|
+
function looseCompareObjects(a, b, seen) {
|
|
250
|
+
let aValidType = isMap(a);
|
|
251
|
+
let bValidType = isMap(b);
|
|
252
|
+
if (aValidType || bValidType) {
|
|
253
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
254
|
+
}
|
|
255
|
+
aValidType = isSet(a);
|
|
256
|
+
bValidType = isSet(b);
|
|
257
|
+
if (aValidType || bValidType) {
|
|
258
|
+
return aValidType && bValidType ? looseCompareCollections(a, b, seen) : false;
|
|
259
|
+
}
|
|
260
|
+
const aKeysCount = Object.keys(a).length;
|
|
261
|
+
const bKeysCount = Object.keys(b).length;
|
|
262
|
+
if (aKeysCount !== bKeysCount) {
|
|
263
|
+
return false;
|
|
264
|
+
}
|
|
265
|
+
for (const key in a) {
|
|
266
|
+
const aHasKey = a.hasOwnProperty(key);
|
|
267
|
+
const bHasKey = b.hasOwnProperty(key);
|
|
268
|
+
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key], seen)) {
|
|
269
|
+
return false;
|
|
270
|
+
}
|
|
271
|
+
}
|
|
272
|
+
return String(a) === String(b);
|
|
273
|
+
}
|
|
274
|
+
function looseCompareNested(a, b, seen, compare) {
|
|
275
|
+
if (!seen) {
|
|
276
|
+
seen = [/* @__PURE__ */ new Map(), /* @__PURE__ */ new Map()];
|
|
277
|
+
}
|
|
278
|
+
const [seenA, seenB] = seen;
|
|
279
|
+
if (seenA.has(a) || seenB.has(b)) {
|
|
280
|
+
return seenA.get(a) === b && seenB.get(b) === a;
|
|
281
|
+
}
|
|
282
|
+
seenA.set(a, b);
|
|
283
|
+
seenB.set(b, a);
|
|
284
|
+
const equal = compare(a, b, seen);
|
|
285
|
+
seenA.delete(a);
|
|
286
|
+
seenB.delete(b);
|
|
287
|
+
return equal;
|
|
288
|
+
}
|
|
289
|
+
function looseEqual(a, b, seen) {
|
|
250
290
|
if (a === b) return true;
|
|
251
291
|
let aValidType = isDate(a);
|
|
252
292
|
let bValidType = isDate(b);
|
|
@@ -261,7 +301,7 @@ function looseEqual(a, b) {
|
|
|
261
301
|
aValidType = isArray(a);
|
|
262
302
|
bValidType = isArray(b);
|
|
263
303
|
if (aValidType || bValidType) {
|
|
264
|
-
return aValidType && bValidType ?
|
|
304
|
+
return aValidType && bValidType ? looseCompareNested(a, b, seen, looseCompareArrays) : false;
|
|
265
305
|
}
|
|
266
306
|
aValidType = isObject(a);
|
|
267
307
|
bValidType = isObject(b);
|
|
@@ -269,28 +309,7 @@ function looseEqual(a, b) {
|
|
|
269
309
|
if (!aValidType || !bValidType) {
|
|
270
310
|
return false;
|
|
271
311
|
}
|
|
272
|
-
|
|
273
|
-
bValidType = isMap(b);
|
|
274
|
-
if (aValidType || bValidType) {
|
|
275
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
276
|
-
}
|
|
277
|
-
aValidType = isSet(a);
|
|
278
|
-
bValidType = isSet(b);
|
|
279
|
-
if (aValidType || bValidType) {
|
|
280
|
-
return aValidType && bValidType ? looseCompareCollections(a, b) : false;
|
|
281
|
-
}
|
|
282
|
-
const aKeysCount = Object.keys(a).length;
|
|
283
|
-
const bKeysCount = Object.keys(b).length;
|
|
284
|
-
if (aKeysCount !== bKeysCount) {
|
|
285
|
-
return false;
|
|
286
|
-
}
|
|
287
|
-
for (const key in a) {
|
|
288
|
-
const aHasKey = a.hasOwnProperty(key);
|
|
289
|
-
const bHasKey = b.hasOwnProperty(key);
|
|
290
|
-
if (aHasKey && !bHasKey || !aHasKey && bHasKey || !looseEqual(a[key], b[key])) {
|
|
291
|
-
return false;
|
|
292
|
-
}
|
|
293
|
-
}
|
|
312
|
+
return looseCompareNested(a, b, seen, looseCompareObjects);
|
|
294
313
|
}
|
|
295
314
|
return String(a) === String(b);
|
|
296
315
|
}
|
|
@@ -1091,7 +1110,9 @@ function reactiveReadArray(array) {
|
|
|
1091
1110
|
const raw = toRaw(array);
|
|
1092
1111
|
if (raw === array) return raw;
|
|
1093
1112
|
track(raw, "iterate", ARRAY_ITERATE_KEY);
|
|
1094
|
-
|
|
1113
|
+
if (isShallow(array)) return raw;
|
|
1114
|
+
if (!isReadonly(array)) return raw.map(toReactive);
|
|
1115
|
+
return isReactive(array) ? raw.map((item) => toReadonly(toReactive(item))) : raw.map(toReadonly);
|
|
1095
1116
|
}
|
|
1096
1117
|
function shallowReadArray(arr) {
|
|
1097
1118
|
track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
|
|
@@ -1218,19 +1239,41 @@ const arrayInstrumentations = {
|
|
|
1218
1239
|
};
|
|
1219
1240
|
function iterator(self, method, wrapValue) {
|
|
1220
1241
|
const arr = shallowReadArray(self);
|
|
1221
|
-
const
|
|
1242
|
+
const methodFn = arr[method];
|
|
1243
|
+
const iter = methodFn.call(arr);
|
|
1222
1244
|
if (arr !== self && !isShallow(self)) {
|
|
1223
|
-
iter.
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
if (
|
|
1227
|
-
|
|
1245
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1246
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1247
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1248
|
+
if (methodFn !== arrayProto[method]) {
|
|
1249
|
+
Object.defineProperties(wrapped, {
|
|
1250
|
+
return: {
|
|
1251
|
+
get() {
|
|
1252
|
+
const fn = iter.return;
|
|
1253
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1254
|
+
}
|
|
1255
|
+
},
|
|
1256
|
+
throw: {
|
|
1257
|
+
get() {
|
|
1258
|
+
const fn = iter.throw;
|
|
1259
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1260
|
+
}
|
|
1261
|
+
}
|
|
1262
|
+
});
|
|
1228
1263
|
}
|
|
1229
|
-
return
|
|
1230
|
-
}
|
|
1264
|
+
return wrapped;
|
|
1265
|
+
}
|
|
1266
|
+
iter._next = iter.next;
|
|
1267
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1231
1268
|
}
|
|
1232
1269
|
return iter;
|
|
1233
1270
|
}
|
|
1271
|
+
function wrapResult(result, wrapValue) {
|
|
1272
|
+
if (!result.done) {
|
|
1273
|
+
result.value = wrapValue(result.value);
|
|
1274
|
+
}
|
|
1275
|
+
return result;
|
|
1276
|
+
}
|
|
1234
1277
|
const arrayProto = Array.prototype;
|
|
1235
1278
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1236
1279
|
const arr = shallowReadArray(self);
|
|
@@ -1653,6 +1696,8 @@ function createInstrumentationGetter(isReadonly2, shallow) {
|
|
|
1653
1696
|
return !isReadonly2;
|
|
1654
1697
|
} else if (key === "__v_isReadonly") {
|
|
1655
1698
|
return isReadonly2;
|
|
1699
|
+
} else if (key === "__v_isShallow") {
|
|
1700
|
+
return shallow;
|
|
1656
1701
|
} else if (key === "__v_raw") {
|
|
1657
1702
|
return target;
|
|
1658
1703
|
}
|
|
@@ -2198,9 +2243,11 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2198
2243
|
if (once && cb) {
|
|
2199
2244
|
const _cb = cb;
|
|
2200
2245
|
cb = (...args) => {
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2246
|
+
try {
|
|
2247
|
+
return _cb(...args);
|
|
2248
|
+
} finally {
|
|
2249
|
+
watchHandle();
|
|
2250
|
+
}
|
|
2204
2251
|
};
|
|
2205
2252
|
}
|
|
2206
2253
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
@@ -2211,12 +2258,13 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2211
2258
|
if (cb) {
|
|
2212
2259
|
const newValue = effect.run();
|
|
2213
2260
|
if (immediateFirstRun || deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2214
|
-
if (cleanup) {
|
|
2215
|
-
cleanup();
|
|
2216
|
-
}
|
|
2217
2261
|
const currentWatcher = activeWatcher;
|
|
2218
|
-
|
|
2262
|
+
pauseTracking();
|
|
2219
2263
|
try {
|
|
2264
|
+
if (cleanup) {
|
|
2265
|
+
cleanup();
|
|
2266
|
+
}
|
|
2267
|
+
activeWatcher = effect;
|
|
2220
2268
|
const args = [
|
|
2221
2269
|
newValue,
|
|
2222
2270
|
// pass undefined as the old value when it's changed for the first time
|
|
@@ -2230,6 +2278,7 @@ function watch$1(source, cb, options = EMPTY_OBJ) {
|
|
|
2230
2278
|
);
|
|
2231
2279
|
} finally {
|
|
2232
2280
|
activeWatcher = currentWatcher;
|
|
2281
|
+
resetTracking();
|
|
2233
2282
|
}
|
|
2234
2283
|
}
|
|
2235
2284
|
} else {
|
|
@@ -2630,21 +2679,21 @@ function queuePostFlushCb(cb) {
|
|
|
2630
2679
|
}
|
|
2631
2680
|
queueFlush();
|
|
2632
2681
|
}
|
|
2633
|
-
function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
2682
|
+
function flushPreFlushCbs(instance, minUid, seen, i = flushIndex + 1) {
|
|
2634
2683
|
{
|
|
2635
2684
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2636
2685
|
}
|
|
2637
2686
|
for (; i < queue.length; i++) {
|
|
2638
2687
|
const cb = queue[i];
|
|
2639
2688
|
if (cb && cb.flags & 2) {
|
|
2640
|
-
if (instance && cb.id !== instance.uid) {
|
|
2689
|
+
if (instance && cb.id !== instance.uid || minUid !== void 0 && !(cb.id >= minUid)) {
|
|
2641
2690
|
continue;
|
|
2642
2691
|
}
|
|
2643
2692
|
if (checkRecursiveUpdates(seen, cb)) {
|
|
2644
2693
|
continue;
|
|
2645
2694
|
}
|
|
2646
2695
|
queue.splice(i, 1);
|
|
2647
|
-
i
|
|
2696
|
+
i = instance ? i - 1 : flushIndex;
|
|
2648
2697
|
if (cb.flags & 4) {
|
|
2649
2698
|
cb.flags &= -2;
|
|
2650
2699
|
}
|
|
@@ -2655,12 +2704,23 @@ function flushPreFlushCbs(instance, seen, i = flushIndex + 1) {
|
|
|
2655
2704
|
}
|
|
2656
2705
|
}
|
|
2657
2706
|
}
|
|
2658
|
-
function flushPostFlushCbs(seen) {
|
|
2707
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2659
2708
|
if (pendingPostFlushCbs.length) {
|
|
2660
|
-
|
|
2661
|
-
|
|
2662
|
-
)
|
|
2663
|
-
|
|
2709
|
+
let cbs = pendingPostFlushCbs;
|
|
2710
|
+
let kept = 0;
|
|
2711
|
+
if (skip) {
|
|
2712
|
+
cbs = [];
|
|
2713
|
+
for (let i = 0; i < pendingPostFlushCbs.length; i++) {
|
|
2714
|
+
const cb = pendingPostFlushCbs[i];
|
|
2715
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) {
|
|
2716
|
+
pendingPostFlushCbs[kept++] = cb;
|
|
2717
|
+
} else {
|
|
2718
|
+
cbs.push(cb);
|
|
2719
|
+
}
|
|
2720
|
+
}
|
|
2721
|
+
}
|
|
2722
|
+
const deduped = [...new Set(cbs)].sort((a, b) => getId(a) - getId(b));
|
|
2723
|
+
pendingPostFlushCbs.length = kept;
|
|
2664
2724
|
if (activePostFlushCbs) {
|
|
2665
2725
|
for (let i = 0; i < deduped.length; i++) {
|
|
2666
2726
|
activePostFlushCbs.push(deduped[i]);
|
|
@@ -2686,6 +2746,22 @@ function flushPostFlushCbs(seen) {
|
|
|
2686
2746
|
postFlushIndex = 0;
|
|
2687
2747
|
}
|
|
2688
2748
|
}
|
|
2749
|
+
let isFlushing = false;
|
|
2750
|
+
function flushOnAppMount(fn, minUid) {
|
|
2751
|
+
if (isFlushing) {
|
|
2752
|
+
fn();
|
|
2753
|
+
return;
|
|
2754
|
+
}
|
|
2755
|
+
const queued = minUid === void 0 ? void 0 : new Set(pendingPostFlushCbs);
|
|
2756
|
+
fn();
|
|
2757
|
+
isFlushing = true;
|
|
2758
|
+
try {
|
|
2759
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2760
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2761
|
+
} finally {
|
|
2762
|
+
isFlushing = false;
|
|
2763
|
+
}
|
|
2764
|
+
}
|
|
2689
2765
|
const getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
|
|
2690
2766
|
function flushJobs(seen) {
|
|
2691
2767
|
{
|
|
@@ -3187,6 +3263,7 @@ function doWatch(source, cb, options = EMPTY_OBJ) {
|
|
|
3187
3263
|
let isPre = false;
|
|
3188
3264
|
if (flush === "post") {
|
|
3189
3265
|
baseWatchOptions.scheduler = (job) => {
|
|
3266
|
+
job.i = instance;
|
|
3190
3267
|
queuePostRenderEffect(job, instance && instance.suspense);
|
|
3191
3268
|
};
|
|
3192
3269
|
} else if (flush !== "sync") {
|
|
@@ -3488,7 +3565,11 @@ const TeleportImpl = {
|
|
|
3488
3565
|
};
|
|
3489
3566
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
3490
3567
|
if (moveType === 0) {
|
|
3568
|
+
if (vnode.targetStart) {
|
|
3569
|
+
insert(vnode.targetStart, container, parentAnchor);
|
|
3570
|
+
}
|
|
3491
3571
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3572
|
+
parentAnchor = vnode.targetAnchor;
|
|
3492
3573
|
}
|
|
3493
3574
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3494
3575
|
const isReorder = moveType === 2;
|
|
@@ -3657,10 +3738,6 @@ const BaseTransitionPropsValidators = {
|
|
|
3657
3738
|
onAfterAppear: TransitionHookValidator,
|
|
3658
3739
|
onAppearCancelled: TransitionHookValidator
|
|
3659
3740
|
};
|
|
3660
|
-
const recursiveGetSubtree = (instance) => {
|
|
3661
|
-
const subTree = instance.subTree;
|
|
3662
|
-
return subTree.component ? recursiveGetSubtree(subTree.component) : subTree;
|
|
3663
|
-
};
|
|
3664
3741
|
const BaseTransitionImpl = {
|
|
3665
3742
|
name: `BaseTransition`,
|
|
3666
3743
|
props: BaseTransitionPropsValidators,
|
|
@@ -3701,7 +3778,7 @@ const BaseTransitionImpl = {
|
|
|
3701
3778
|
setTransitionHooks(innerChild, enterHooks);
|
|
3702
3779
|
}
|
|
3703
3780
|
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
3704
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) &&
|
|
3781
|
+
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && getTransitionRoot(instance.subTree)) {
|
|
3705
3782
|
let leavingHooks = resolveTransitionHooks(
|
|
3706
3783
|
oldInnerChild,
|
|
3707
3784
|
rawProps,
|
|
@@ -3834,8 +3911,15 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3834
3911
|
);
|
|
3835
3912
|
}
|
|
3836
3913
|
const leavingVNode = leavingVNodesCache[key];
|
|
3837
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
3838
|
-
leavingVNode.el[leaveCbKey]
|
|
3914
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
3915
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
3916
|
+
if (!leavingCb) {
|
|
3917
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
3918
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
3919
|
+
}
|
|
3920
|
+
if (leavingCb) {
|
|
3921
|
+
leavingCb();
|
|
3922
|
+
}
|
|
3839
3923
|
}
|
|
3840
3924
|
callHook(hook, [el]);
|
|
3841
3925
|
},
|
|
@@ -3963,6 +4047,12 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
3963
4047
|
vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3964
4048
|
} else {
|
|
3965
4049
|
vnode.transition = hooks;
|
|
4050
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4051
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4052
|
+
if (child) {
|
|
4053
|
+
setTransitionHooks(child, hooks);
|
|
4054
|
+
}
|
|
4055
|
+
}
|
|
3966
4056
|
}
|
|
3967
4057
|
}
|
|
3968
4058
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -3987,6 +4077,18 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3987
4077
|
}
|
|
3988
4078
|
return ret;
|
|
3989
4079
|
}
|
|
4080
|
+
function getTransitionRoot(vnode) {
|
|
4081
|
+
if (vnode.component) {
|
|
4082
|
+
return getTransitionRoot(vnode.component.subTree);
|
|
4083
|
+
}
|
|
4084
|
+
if (vnode.type === Fragment) {
|
|
4085
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4086
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4087
|
+
}
|
|
4088
|
+
if (vnode.type !== Comment) {
|
|
4089
|
+
return vnode;
|
|
4090
|
+
}
|
|
4091
|
+
}
|
|
3990
4092
|
|
|
3991
4093
|
// @__NO_SIDE_EFFECTS__
|
|
3992
4094
|
function defineComponent(options, extraOptions) {
|
|
@@ -4360,13 +4462,15 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4360
4462
|
getContainerType(container),
|
|
4361
4463
|
optimized
|
|
4362
4464
|
);
|
|
4363
|
-
if (isAsyncWrapper(vnode) && !vnode.component.subTree) {
|
|
4465
|
+
if ((isAsyncWrapper(vnode) || vnode.component.asyncDep) && !vnode.component.subTree) {
|
|
4364
4466
|
let subTree;
|
|
4365
4467
|
if (isFragmentStart) {
|
|
4366
4468
|
subTree = createVNode(Static);
|
|
4367
4469
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
4368
4470
|
} else {
|
|
4369
|
-
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4471
|
+
subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(
|
|
4472
|
+
node.nodeType === 8 ? Comment : "div"
|
|
4473
|
+
);
|
|
4370
4474
|
}
|
|
4371
4475
|
subTree.el = node;
|
|
4372
4476
|
vnode.component.subTree = subTree;
|
|
@@ -4890,14 +4994,22 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4890
4994
|
break;
|
|
4891
4995
|
}
|
|
4892
4996
|
}, opts);
|
|
4893
|
-
|
|
4894
|
-
if (!(el instanceof Element)) return;
|
|
4997
|
+
const observe = (el) => {
|
|
4895
4998
|
if (elementIsVisibleInViewport(el)) {
|
|
4896
4999
|
hydrate();
|
|
4897
5000
|
ob.disconnect();
|
|
4898
5001
|
return false;
|
|
4899
5002
|
}
|
|
5003
|
+
if (getComputedStyle(el).display === "contents") {
|
|
5004
|
+
for (let i = 0; i < el.children.length; i++) {
|
|
5005
|
+
if (observe(el.children[i]) === false) return false;
|
|
5006
|
+
}
|
|
5007
|
+
}
|
|
4900
5008
|
ob.observe(el);
|
|
5009
|
+
};
|
|
5010
|
+
forEach((el) => {
|
|
5011
|
+
if (!(el instanceof Element)) return;
|
|
5012
|
+
return observe(el);
|
|
4901
5013
|
});
|
|
4902
5014
|
return () => ob.disconnect();
|
|
4903
5015
|
};
|
|
@@ -5254,6 +5366,7 @@ const KeepAliveImpl = {
|
|
|
5254
5366
|
unmount(cached);
|
|
5255
5367
|
} else if (current) {
|
|
5256
5368
|
resetShapeFlag(current);
|
|
5369
|
+
if (cached) resetShapeFlag(cached);
|
|
5257
5370
|
}
|
|
5258
5371
|
cache.delete(key);
|
|
5259
5372
|
keys.delete(key);
|
|
@@ -5545,9 +5658,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
5545
5658
|
}
|
|
5546
5659
|
} else if (typeof source === "number") {
|
|
5547
5660
|
if (!Number.isInteger(source) || source < 0) {
|
|
5548
|
-
|
|
5549
|
-
|
|
5550
|
-
|
|
5661
|
+
{
|
|
5662
|
+
warn$1(
|
|
5663
|
+
`The v-for range expects a positive integer value but got ${source}.`
|
|
5664
|
+
);
|
|
5665
|
+
}
|
|
5551
5666
|
ret = [];
|
|
5552
5667
|
} else {
|
|
5553
5668
|
ret = new Array(source);
|
|
@@ -7185,7 +7300,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7185
7300
|
}
|
|
7186
7301
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7187
7302
|
const key = nextKeys[i];
|
|
7188
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7303
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) {
|
|
7189
7304
|
return true;
|
|
7190
7305
|
}
|
|
7191
7306
|
}
|
|
@@ -7812,6 +7927,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7812
7927
|
optimized = false;
|
|
7813
7928
|
n2.dynamicChildren = null;
|
|
7814
7929
|
}
|
|
7930
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
7931
|
+
if (n2.dynamicChildren === EMPTY_ARR) {
|
|
7932
|
+
n2.dynamicChildren = [];
|
|
7933
|
+
}
|
|
7934
|
+
n2.dynamicChildren.hasOnce = true;
|
|
7935
|
+
}
|
|
7815
7936
|
const { type, ref, shapeFlag } = n2;
|
|
7816
7937
|
switch (type) {
|
|
7817
7938
|
case Text:
|
|
@@ -8218,15 +8339,16 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8218
8339
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8219
8340
|
const oldVNode = oldChildren[i];
|
|
8220
8341
|
const newVNode = newChildren[i];
|
|
8342
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8221
8343
|
const container = (
|
|
8222
8344
|
// oldVNode may be an errored async setup() component inside Suspense
|
|
8223
8345
|
// which will not have a mounted element
|
|
8224
|
-
|
|
8346
|
+
oldEl && // - In the case of a Fragment, we need to provide the actual parent
|
|
8225
8347
|
// of the Fragment itself so it can move its children.
|
|
8226
8348
|
(oldVNode.type === Fragment || // - In the case of different nodes, there is going to be a replacement
|
|
8227
8349
|
// which also requires the correct parent container
|
|
8228
8350
|
!isSameVNodeType(oldVNode, newVNode) || // - In the case of a component, it could contain anything.
|
|
8229
|
-
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(
|
|
8351
|
+
oldVNode.shapeFlag & (6 | 64 | 128)) ? hostParentNode(oldEl) : (
|
|
8230
8352
|
// In other cases, the parent container is not actually used so we
|
|
8231
8353
|
// just pass the block element here to avoid a DOM parentNode call.
|
|
8232
8354
|
fallbackContainer
|
|
@@ -8390,7 +8512,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8390
8512
|
}
|
|
8391
8513
|
if (isHmrUpdating) initialVNode.el = null;
|
|
8392
8514
|
if (instance.asyncDep) {
|
|
8393
|
-
parentSuspense && parentSuspense.registerDep(
|
|
8515
|
+
parentSuspense && parentSuspense.registerDep(
|
|
8516
|
+
instance,
|
|
8517
|
+
setupRenderEffect,
|
|
8518
|
+
optimized,
|
|
8519
|
+
namespace
|
|
8520
|
+
);
|
|
8394
8521
|
if (!initialVNode.el) {
|
|
8395
8522
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
8396
8523
|
processCommentNode(null, placeholder, container, anchor);
|
|
@@ -8419,6 +8546,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8419
8546
|
{
|
|
8420
8547
|
pushWarningContext(n2);
|
|
8421
8548
|
}
|
|
8549
|
+
n2.el = n1.el;
|
|
8550
|
+
n2.placeholder = n1.placeholder;
|
|
8422
8551
|
updateComponentPreRender(instance, n2, optimized);
|
|
8423
8552
|
{
|
|
8424
8553
|
popWarningContext();
|
|
@@ -8430,6 +8559,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8430
8559
|
}
|
|
8431
8560
|
} else {
|
|
8432
8561
|
n2.el = n1.el;
|
|
8562
|
+
n2.placeholder = n1.placeholder;
|
|
8433
8563
|
instance.vnode = n2;
|
|
8434
8564
|
}
|
|
8435
8565
|
};
|
|
@@ -9010,7 +9140,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9010
9140
|
cacheIndex,
|
|
9011
9141
|
memo
|
|
9012
9142
|
} = vnode;
|
|
9013
|
-
if (patchFlag === -2) {
|
|
9143
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) {
|
|
9014
9144
|
optimized = false;
|
|
9015
9145
|
}
|
|
9016
9146
|
if (ref != null) {
|
|
@@ -9018,7 +9148,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9018
9148
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
9019
9149
|
resetTracking();
|
|
9020
9150
|
}
|
|
9021
|
-
if (cacheIndex != null) {
|
|
9151
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) {
|
|
9022
9152
|
parentComponent.renderCache[cacheIndex] = void 0;
|
|
9023
9153
|
}
|
|
9024
9154
|
if (shapeFlag & 256) {
|
|
@@ -9083,35 +9213,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9083
9213
|
};
|
|
9084
9214
|
const remove = (vnode) => {
|
|
9085
9215
|
const { type, el, anchor, transition } = vnode;
|
|
9086
|
-
|
|
9087
|
-
|
|
9088
|
-
|
|
9089
|
-
if (child.type === Comment) {
|
|
9090
|
-
hostRemove(child.el);
|
|
9091
|
-
} else {
|
|
9092
|
-
remove(child);
|
|
9093
|
-
}
|
|
9094
|
-
});
|
|
9095
|
-
} else {
|
|
9096
|
-
removeFragment(el, anchor);
|
|
9097
|
-
}
|
|
9216
|
+
const isFragment = type === Fragment;
|
|
9217
|
+
if (isFragment && !transition) {
|
|
9218
|
+
removeFragment(el, anchor);
|
|
9098
9219
|
return;
|
|
9099
9220
|
}
|
|
9100
9221
|
if (type === Static) {
|
|
9101
9222
|
removeStaticNode(vnode);
|
|
9223
|
+
if (transition && !transition.persisted && transition.afterLeave) {
|
|
9224
|
+
transition.afterLeave();
|
|
9225
|
+
}
|
|
9102
9226
|
return;
|
|
9103
9227
|
}
|
|
9228
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
9104
9229
|
const performRemove = () => {
|
|
9105
|
-
|
|
9230
|
+
if (isFragment) {
|
|
9231
|
+
if (hostParentNode(el)) {
|
|
9232
|
+
removeFragment(el, anchor);
|
|
9233
|
+
}
|
|
9234
|
+
} else {
|
|
9235
|
+
hostRemove(el);
|
|
9236
|
+
}
|
|
9106
9237
|
if (transition && !transition.persisted && transition.afterLeave) {
|
|
9107
9238
|
transition.afterLeave();
|
|
9108
9239
|
}
|
|
9109
9240
|
};
|
|
9110
|
-
if (
|
|
9241
|
+
if (leavingNode && leavingNode.shapeFlag & 1 && transition && !transition.persisted) {
|
|
9111
9242
|
const { leave, delayLeave } = transition;
|
|
9112
|
-
const
|
|
9243
|
+
const leavingEl = leavingNode.el;
|
|
9244
|
+
const performLeave = () => leave(leavingEl, performRemove);
|
|
9113
9245
|
if (delayLeave) {
|
|
9114
|
-
delayLeave(
|
|
9246
|
+
delayLeave(leavingEl, performRemove, performLeave);
|
|
9115
9247
|
} else {
|
|
9116
9248
|
performLeave();
|
|
9117
9249
|
}
|
|
@@ -9142,6 +9274,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9142
9274
|
if (job) {
|
|
9143
9275
|
job.flags |= 8;
|
|
9144
9276
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
9277
|
+
} else if (instance.vnode.el && subTree) {
|
|
9278
|
+
subTree.transition = instance.vnode.transition;
|
|
9279
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
9145
9280
|
}
|
|
9146
9281
|
if (um) {
|
|
9147
9282
|
queuePostRenderEffect(um, parentSuspense);
|
|
@@ -9169,32 +9304,26 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
9169
9304
|
const teleportEnd = el && el[TeleportEndKey];
|
|
9170
9305
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
9171
9306
|
};
|
|
9172
|
-
let isFlushing = false;
|
|
9173
9307
|
const render = (vnode, container, namespace) => {
|
|
9174
|
-
|
|
9175
|
-
|
|
9176
|
-
if (
|
|
9177
|
-
|
|
9178
|
-
|
|
9308
|
+
const minUid = vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid();
|
|
9309
|
+
flushOnAppMount(() => {
|
|
9310
|
+
if (vnode == null) {
|
|
9311
|
+
if (container._vnode) {
|
|
9312
|
+
unmount(container._vnode, null, null, true);
|
|
9313
|
+
}
|
|
9314
|
+
} else {
|
|
9315
|
+
patch(
|
|
9316
|
+
container._vnode || null,
|
|
9317
|
+
vnode,
|
|
9318
|
+
container,
|
|
9319
|
+
null,
|
|
9320
|
+
null,
|
|
9321
|
+
null,
|
|
9322
|
+
namespace
|
|
9323
|
+
);
|
|
9179
9324
|
}
|
|
9180
|
-
|
|
9181
|
-
|
|
9182
|
-
container._vnode || null,
|
|
9183
|
-
vnode,
|
|
9184
|
-
container,
|
|
9185
|
-
null,
|
|
9186
|
-
null,
|
|
9187
|
-
null,
|
|
9188
|
-
namespace
|
|
9189
|
-
);
|
|
9190
|
-
}
|
|
9191
|
-
container._vnode = vnode;
|
|
9192
|
-
if (!isFlushing) {
|
|
9193
|
-
isFlushing = true;
|
|
9194
|
-
flushPreFlushCbs(instance);
|
|
9195
|
-
flushPostFlushCbs();
|
|
9196
|
-
isFlushing = false;
|
|
9197
|
-
}
|
|
9325
|
+
container._vnode = vnode;
|
|
9326
|
+
}, minUid);
|
|
9198
9327
|
};
|
|
9199
9328
|
const internals = {
|
|
9200
9329
|
p: patch,
|
|
@@ -9356,7 +9485,7 @@ const SuspenseImpl = {
|
|
|
9356
9485
|
rendererInternals
|
|
9357
9486
|
);
|
|
9358
9487
|
} else {
|
|
9359
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
9488
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
9360
9489
|
n2.suspense = n1.suspense;
|
|
9361
9490
|
n2.suspense.vnode = n2;
|
|
9362
9491
|
n2.el = n1.el;
|
|
@@ -9442,10 +9571,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9442
9571
|
if (pendingBranch) {
|
|
9443
9572
|
suspense.pendingBranch = newBranch;
|
|
9444
9573
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
9574
|
+
suspense.deps++;
|
|
9445
9575
|
patch(
|
|
9446
9576
|
pendingBranch,
|
|
9447
9577
|
newBranch,
|
|
9448
|
-
|
|
9578
|
+
// a hydrating pending branch is adopted SSR DOM, already in place
|
|
9579
|
+
isHydrating ? container : suspense.hiddenContainer,
|
|
9449
9580
|
null,
|
|
9450
9581
|
parentComponent,
|
|
9451
9582
|
suspense,
|
|
@@ -9453,6 +9584,7 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
9453
9584
|
slotScopeIds,
|
|
9454
9585
|
optimized
|
|
9455
9586
|
);
|
|
9587
|
+
suspense.deps--;
|
|
9456
9588
|
if (suspense.deps <= 0) {
|
|
9457
9589
|
suspense.resolve();
|
|
9458
9590
|
} else if (isInFallback) {
|
|
@@ -9718,6 +9850,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9718
9850
|
suspense.effects = [];
|
|
9719
9851
|
if (isSuspensible) {
|
|
9720
9852
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
9853
|
+
parentSuspenseId = void 0;
|
|
9721
9854
|
parentSuspense.deps--;
|
|
9722
9855
|
if (parentSuspense.deps === 0 && !sync) {
|
|
9723
9856
|
parentSuspense.resolve();
|
|
@@ -9778,7 +9911,10 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9778
9911
|
next() {
|
|
9779
9912
|
return suspense.activeBranch && next(suspense.activeBranch);
|
|
9780
9913
|
},
|
|
9781
|
-
|
|
9914
|
+
// `namespace` intentionally shadows the boundary's own: the dep must be
|
|
9915
|
+
// mounted with the namespace of the position it was rendered at, which can
|
|
9916
|
+
// differ from the boundary's (e.g. a component nested inside an <svg>).
|
|
9917
|
+
registerDep(instance, setupRenderEffect, optimized2, namespace2) {
|
|
9782
9918
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9783
9919
|
if (isInPendingSuspense) {
|
|
9784
9920
|
suspense.deps++;
|
|
@@ -9791,6 +9927,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9791
9927
|
return;
|
|
9792
9928
|
}
|
|
9793
9929
|
unsetCurrentInstance();
|
|
9930
|
+
if (!instance.scope.active) {
|
|
9931
|
+
if (isInPendingSuspense && --suspense.deps === 0) {
|
|
9932
|
+
suspense.resolve();
|
|
9933
|
+
}
|
|
9934
|
+
return;
|
|
9935
|
+
}
|
|
9794
9936
|
instance.asyncResolved = true;
|
|
9795
9937
|
const { vnode: vnode2 } = instance;
|
|
9796
9938
|
{
|
|
@@ -9812,7 +9954,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9812
9954
|
// consider the comment placeholder case.
|
|
9813
9955
|
hydratedEl ? null : next(instance.subTree),
|
|
9814
9956
|
suspense,
|
|
9815
|
-
|
|
9957
|
+
namespace2,
|
|
9816
9958
|
optimized2
|
|
9817
9959
|
);
|
|
9818
9960
|
if (placeholder) {
|
|
@@ -10212,7 +10354,8 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
10212
10354
|
el: vnode.el,
|
|
10213
10355
|
anchor: vnode.anchor,
|
|
10214
10356
|
ctx: vnode.ctx,
|
|
10215
|
-
ce: vnode.ce
|
|
10357
|
+
ce: vnode.ce,
|
|
10358
|
+
cacheIndex: vnode.cacheIndex
|
|
10216
10359
|
};
|
|
10217
10360
|
if (transition && cloneTransition) {
|
|
10218
10361
|
setTransitionHooks(
|
|
@@ -10345,6 +10488,9 @@ function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
|
10345
10488
|
|
|
10346
10489
|
const emptyAppContext = createAppContext();
|
|
10347
10490
|
let uid = 0;
|
|
10491
|
+
function getNextUid() {
|
|
10492
|
+
return uid;
|
|
10493
|
+
}
|
|
10348
10494
|
function createComponentInstance(vnode, parent, suspense) {
|
|
10349
10495
|
const type = vnode.type;
|
|
10350
10496
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -11017,7 +11163,7 @@ function isMemoSame(cached, memo) {
|
|
|
11017
11163
|
return true;
|
|
11018
11164
|
}
|
|
11019
11165
|
|
|
11020
|
-
const version = "3.5.
|
|
11166
|
+
const version = "3.5.44";
|
|
11021
11167
|
const warn = warn$1 ;
|
|
11022
11168
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
11023
11169
|
const devtools = devtools$1 ;
|
|
@@ -11593,7 +11739,9 @@ function patchStyle(el, prev, next) {
|
|
|
11593
11739
|
}
|
|
11594
11740
|
}
|
|
11595
11741
|
if (vShowOriginalDisplay in el) {
|
|
11596
|
-
|
|
11742
|
+
if (!isCssString || prev !== next) {
|
|
11743
|
+
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
11744
|
+
}
|
|
11597
11745
|
if (el[vShowHidden]) {
|
|
11598
11746
|
style.display = "none";
|
|
11599
11747
|
}
|
|
@@ -12075,7 +12223,9 @@ class VueElement extends BaseClass {
|
|
|
12075
12223
|
"Custom element style injection is not supported when using shadowRoot: false"
|
|
12076
12224
|
);
|
|
12077
12225
|
}
|
|
12078
|
-
this.
|
|
12226
|
+
if (this._connected) {
|
|
12227
|
+
this._mount(def);
|
|
12228
|
+
}
|
|
12079
12229
|
};
|
|
12080
12230
|
const asyncDef = this._def.__asyncLoader;
|
|
12081
12231
|
if (asyncDef) {
|
|
@@ -12445,6 +12595,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
12445
12595
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
12446
12596
|
const moveCbKey = /* @__PURE__ */ Symbol("_moveCb");
|
|
12447
12597
|
const enterCbKey = /* @__PURE__ */ Symbol("_enterCb");
|
|
12598
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
12448
12599
|
const decorate = (t) => {
|
|
12449
12600
|
delete t.props.mode;
|
|
12450
12601
|
return t;
|
|
@@ -12460,21 +12611,30 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12460
12611
|
const state = useTransitionState();
|
|
12461
12612
|
let prevChildren;
|
|
12462
12613
|
let children;
|
|
12463
|
-
|
|
12464
|
-
|
|
12465
|
-
|
|
12614
|
+
let origins;
|
|
12615
|
+
let moves;
|
|
12616
|
+
const willMove = () => {
|
|
12617
|
+
if (moves === void 0) {
|
|
12618
|
+
moves = prevChildren.length > 0 && hasCSSTransform(
|
|
12619
|
+
prevChildren[0].el,
|
|
12620
|
+
instance.vnode.el,
|
|
12621
|
+
resolveMoveClass(props)
|
|
12622
|
+
);
|
|
12466
12623
|
}
|
|
12467
|
-
|
|
12468
|
-
|
|
12469
|
-
|
|
12470
|
-
|
|
12471
|
-
|
|
12472
|
-
)) {
|
|
12624
|
+
return moves;
|
|
12625
|
+
};
|
|
12626
|
+
onUpdated(() => {
|
|
12627
|
+
pendingGroups.delete(instance);
|
|
12628
|
+
if (!willMove()) {
|
|
12473
12629
|
prevChildren = [];
|
|
12630
|
+
origins = void 0;
|
|
12474
12631
|
return;
|
|
12475
12632
|
}
|
|
12633
|
+
const moveClass = resolveMoveClass(props);
|
|
12476
12634
|
prevChildren.forEach(callPendingCbs);
|
|
12477
|
-
|
|
12635
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
12636
|
+
origins = void 0;
|
|
12637
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
12478
12638
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
12479
12639
|
forceReflow(instance.vnode.el);
|
|
12480
12640
|
movedChildren.forEach((c) => {
|
|
@@ -12501,6 +12661,7 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12501
12661
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
12502
12662
|
let tag = rawProps.tag || Fragment;
|
|
12503
12663
|
prevChildren = [];
|
|
12664
|
+
moves = void 0;
|
|
12504
12665
|
if (children) {
|
|
12505
12666
|
for (let i = 0; i < children.length; i++) {
|
|
12506
12667
|
const child = children[i];
|
|
@@ -12532,6 +12693,10 @@ const TransitionGroupImpl = /* @__PURE__ */ decorate({
|
|
|
12532
12693
|
warn(`<TransitionGroup> children must be keyed.`);
|
|
12533
12694
|
}
|
|
12534
12695
|
}
|
|
12696
|
+
if (prevChildren.length) {
|
|
12697
|
+
origins = getOrigins(instance);
|
|
12698
|
+
pendingGroups.set(instance, willMove);
|
|
12699
|
+
}
|
|
12535
12700
|
return createVNode(tag, null, children);
|
|
12536
12701
|
};
|
|
12537
12702
|
}
|
|
@@ -12546,8 +12711,11 @@ function callPendingCbs(c) {
|
|
|
12546
12711
|
el[enterCbKey]();
|
|
12547
12712
|
}
|
|
12548
12713
|
}
|
|
12549
|
-
function
|
|
12550
|
-
|
|
12714
|
+
function resolveMoveClass(props) {
|
|
12715
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
12716
|
+
}
|
|
12717
|
+
function recordPosition(c, shift) {
|
|
12718
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
12551
12719
|
}
|
|
12552
12720
|
function applyTranslation(c) {
|
|
12553
12721
|
const oldPos = positionMap.get(c);
|
|
@@ -12571,13 +12739,41 @@ function applyTranslation(c) {
|
|
|
12571
12739
|
return c;
|
|
12572
12740
|
}
|
|
12573
12741
|
}
|
|
12574
|
-
function getPosition(el) {
|
|
12742
|
+
function getPosition(el, shift) {
|
|
12575
12743
|
const rect = el.getBoundingClientRect();
|
|
12576
12744
|
return {
|
|
12577
|
-
left: rect.left,
|
|
12578
|
-
top: rect.top
|
|
12745
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
12746
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
12579
12747
|
};
|
|
12580
12748
|
}
|
|
12749
|
+
function getOrigins(instance) {
|
|
12750
|
+
let origins;
|
|
12751
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
12752
|
+
const willMove = pendingGroups.get(group);
|
|
12753
|
+
if (willMove) {
|
|
12754
|
+
const item = findItem(group.vnode.el, instance.vnode.el);
|
|
12755
|
+
if (item) {
|
|
12756
|
+
(origins || (origins = [])).push(
|
|
12757
|
+
extend(getPosition(item), { item, willMove })
|
|
12758
|
+
);
|
|
12759
|
+
}
|
|
12760
|
+
}
|
|
12761
|
+
}
|
|
12762
|
+
return origins;
|
|
12763
|
+
}
|
|
12764
|
+
function findItem(root, node) {
|
|
12765
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
12766
|
+
while (node && node.parentNode !== container) {
|
|
12767
|
+
node = node.parentNode;
|
|
12768
|
+
}
|
|
12769
|
+
if (node && node.nodeType === 1) {
|
|
12770
|
+
return node;
|
|
12771
|
+
}
|
|
12772
|
+
}
|
|
12773
|
+
function getOriginShift(origins, root) {
|
|
12774
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
12775
|
+
return origin && getPosition(origin.item, origin);
|
|
12776
|
+
}
|
|
12581
12777
|
function hasCSSTransform(el, root, moveClass) {
|
|
12582
12778
|
const clone = el.cloneNode();
|
|
12583
12779
|
const _vtc = el[vtcKey];
|