@vue/runtime-dom 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/runtime-dom.cjs.js +57 -12
- package/dist/runtime-dom.cjs.prod.js +57 -12
- package/dist/runtime-dom.esm-browser.js +240 -75
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +58 -13
- package/dist/runtime-dom.global.js +240 -75
- package/dist/runtime-dom.global.prod.js +4 -4
- package/package.json +4 -4
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.12
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -223,9 +223,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
223
223
|
* - ismap -> isMap
|
|
224
224
|
* - nomodule -> noModule
|
|
225
225
|
* - novalidate -> noValidate
|
|
226
|
+
* - playsinline -> playsInline
|
|
226
227
|
* - readonly -> readOnly
|
|
227
228
|
*/
|
|
228
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
229
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
229
230
|
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
230
231
|
/**
|
|
231
232
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
@@ -916,17 +917,33 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
916
917
|
};
|
|
917
918
|
function iterator(self, method, wrapValue) {
|
|
918
919
|
const arr = shallowReadArray(self);
|
|
919
|
-
const
|
|
920
|
+
const methodFn = arr[method];
|
|
921
|
+
const iter = methodFn.call(arr);
|
|
920
922
|
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
923
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
924
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
925
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
926
|
+
if (methodFn !== arrayProto[method]) Object.defineProperties(wrapped, {
|
|
927
|
+
return: { get() {
|
|
928
|
+
const fn = iter.return;
|
|
929
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
930
|
+
} },
|
|
931
|
+
throw: { get() {
|
|
932
|
+
const fn = iter.throw;
|
|
933
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
934
|
+
} }
|
|
935
|
+
});
|
|
936
|
+
return wrapped;
|
|
937
|
+
}
|
|
921
938
|
iter._next = iter.next;
|
|
922
|
-
iter.next = () =>
|
|
923
|
-
const result = iter._next();
|
|
924
|
-
if (!result.done) result.value = wrapValue(result.value);
|
|
925
|
-
return result;
|
|
926
|
-
};
|
|
939
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
927
940
|
}
|
|
928
941
|
return iter;
|
|
929
942
|
}
|
|
943
|
+
function wrapResult(result, wrapValue) {
|
|
944
|
+
if (!result.done) result.value = wrapValue(result.value);
|
|
945
|
+
return result;
|
|
946
|
+
}
|
|
930
947
|
const arrayProto = Array.prototype;
|
|
931
948
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
932
949
|
const arr = shallowReadArray(self);
|
|
@@ -1244,6 +1261,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
1244
1261
|
return (target, key, receiver) => {
|
|
1245
1262
|
if (key === "__v_isReactive") return !isReadonly;
|
|
1246
1263
|
else if (key === "__v_isReadonly") return isReadonly;
|
|
1264
|
+
else if (key === "__v_isShallow") return shallow;
|
|
1247
1265
|
else if (key === "__v_raw") return target;
|
|
1248
1266
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1249
1267
|
};
|
|
@@ -2153,8 +2171,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2153
2171
|
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
2154
2172
|
if (owner) {
|
|
2155
2173
|
const { call } = owner.options;
|
|
2156
|
-
|
|
2157
|
-
|
|
2174
|
+
const cleanup = call ? () => call(cleanupFn, 4) : cleanupFn;
|
|
2175
|
+
if (owner.cb) (owner.cbCleanups || (owner.cbCleanups = [])).push(cleanup);
|
|
2176
|
+
else owner.cleanups[owner.cleanupsLength++] = cleanup;
|
|
2158
2177
|
} else if (!failSilently) warn$2("onWatcherCleanup() was called when there was no active watcher to associate with.");
|
|
2159
2178
|
}
|
|
2160
2179
|
var WatcherEffect = class extends ReactiveEffect {
|
|
@@ -2215,9 +2234,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2215
2234
|
if (once && cb) {
|
|
2216
2235
|
const _cb = cb;
|
|
2217
2236
|
cb = (...args) => {
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2237
|
+
try {
|
|
2238
|
+
return _cb(...args);
|
|
2239
|
+
} finally {
|
|
2240
|
+
this.stop();
|
|
2241
|
+
}
|
|
2221
2242
|
};
|
|
2222
2243
|
}
|
|
2223
2244
|
this.cb = cb;
|
|
@@ -2225,6 +2246,19 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2225
2246
|
this.onTrack = options.onTrack;
|
|
2226
2247
|
this.onTrigger = options.onTrigger;
|
|
2227
2248
|
}
|
|
2249
|
+
cleanupCallback() {
|
|
2250
|
+
const cleanups = this.cbCleanups;
|
|
2251
|
+
if (cleanups) {
|
|
2252
|
+
this.cbCleanups = void 0;
|
|
2253
|
+
for (let i = 0, l = cleanups.length; i < l; i++) cleanups[i]();
|
|
2254
|
+
}
|
|
2255
|
+
}
|
|
2256
|
+
stop() {
|
|
2257
|
+
if (this.active) {
|
|
2258
|
+
super.stop();
|
|
2259
|
+
this.cleanupCallback();
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2228
2262
|
run(initialRun = false) {
|
|
2229
2263
|
const oldValue = this.oldValue;
|
|
2230
2264
|
const newValue = this.oldValue = super.run();
|
|
@@ -2232,10 +2266,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2232
2266
|
const { immediate, deep, call } = this.options;
|
|
2233
2267
|
if (initialRun && !immediate) return;
|
|
2234
2268
|
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2235
|
-
cleanup(this);
|
|
2236
2269
|
const currentWatcher = activeWatcher;
|
|
2237
|
-
|
|
2270
|
+
const prevSub = setActiveSub();
|
|
2238
2271
|
try {
|
|
2272
|
+
this.cleanupCallback();
|
|
2273
|
+
activeWatcher = this;
|
|
2239
2274
|
const args = [
|
|
2240
2275
|
newValue,
|
|
2241
2276
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : this.isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2244,6 +2279,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2244
2279
|
call ? call(this.cb, 3, args) : this.cb(...args);
|
|
2245
2280
|
} finally {
|
|
2246
2281
|
activeWatcher = currentWatcher;
|
|
2282
|
+
setActiveSub(prevSub);
|
|
2247
2283
|
}
|
|
2248
2284
|
}
|
|
2249
2285
|
}
|
|
@@ -2574,15 +2610,15 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2574
2610
|
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2575
2611
|
queueFlush();
|
|
2576
2612
|
}
|
|
2577
|
-
function flushPreFlushCbs(instance, seen) {
|
|
2613
|
+
function flushPreFlushCbs(instance, minUid, seen) {
|
|
2578
2614
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2579
2615
|
for (let i = flushIndex; i < jobsLength; i++) {
|
|
2580
2616
|
const cb = jobs[i];
|
|
2581
2617
|
if (cb.order & 1 || cb.order === Infinity) continue;
|
|
2582
|
-
if (instance && cb.order !== instance.uid * 2) continue;
|
|
2618
|
+
if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
|
|
2583
2619
|
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2584
2620
|
jobs.splice(i, 1);
|
|
2585
|
-
i
|
|
2621
|
+
i = instance ? i - 1 : flushIndex - 1;
|
|
2586
2622
|
jobsLength--;
|
|
2587
2623
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2588
2624
|
try {
|
|
@@ -2592,15 +2628,24 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2592
2628
|
}
|
|
2593
2629
|
}
|
|
2594
2630
|
}
|
|
2595
|
-
function flushPostFlushCbs(seen) {
|
|
2631
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2596
2632
|
if (postJobs.length) {
|
|
2633
|
+
let cbs = postJobs;
|
|
2634
|
+
if (skip) {
|
|
2635
|
+
cbs = [];
|
|
2636
|
+
let kept = 0;
|
|
2637
|
+
for (let i = 0; i < postJobs.length; i++) {
|
|
2638
|
+
const cb = postJobs[i];
|
|
2639
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
|
|
2640
|
+
else cbs.push(cb);
|
|
2641
|
+
}
|
|
2642
|
+
postJobs.length = kept;
|
|
2643
|
+
} else postJobs = [];
|
|
2597
2644
|
if (activePostJobs) {
|
|
2598
|
-
for (let i = 0; i <
|
|
2599
|
-
postJobs.length = 0;
|
|
2645
|
+
for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
|
|
2600
2646
|
return;
|
|
2601
2647
|
}
|
|
2602
|
-
activePostJobs =
|
|
2603
|
-
postJobs = [];
|
|
2648
|
+
activePostJobs = cbs;
|
|
2604
2649
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2605
2650
|
try {
|
|
2606
2651
|
while (postFlushIndex < activePostJobs.length) {
|
|
@@ -2622,17 +2667,28 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
2622
2667
|
}
|
|
2623
2668
|
let isFlushing = false;
|
|
2624
2669
|
/**
|
|
2670
|
+
* Run a root render, then flush the jobs it is responsible for. A mount or
|
|
2671
|
+
* unmount (`minUid` given) only flushes the jobs of the components it created
|
|
2672
|
+
* and the post cbs it queued, so pre watchers triggered in setup run before
|
|
2673
|
+
* mounted (#5721) while the jobs of other components stay in the queue and
|
|
2674
|
+
* keep their order (#6728). A root update keeps flushing all pending pre jobs
|
|
2675
|
+
* and post cbs, as the jobs of the components it re-renders may predate it.
|
|
2676
|
+
*
|
|
2625
2677
|
* @internal
|
|
2626
2678
|
*/
|
|
2627
|
-
function flushOnAppMount(
|
|
2628
|
-
if (
|
|
2629
|
-
|
|
2630
|
-
|
|
2631
|
-
|
|
2632
|
-
|
|
2633
|
-
|
|
2634
|
-
|
|
2635
|
-
|
|
2679
|
+
function flushOnAppMount(fn, minUid) {
|
|
2680
|
+
if (isFlushing) {
|
|
2681
|
+
fn();
|
|
2682
|
+
return;
|
|
2683
|
+
}
|
|
2684
|
+
const queued = minUid === void 0 ? void 0 : new Set(postJobs);
|
|
2685
|
+
fn();
|
|
2686
|
+
isFlushing = true;
|
|
2687
|
+
try {
|
|
2688
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2689
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2690
|
+
} finally {
|
|
2691
|
+
isFlushing = false;
|
|
2636
2692
|
}
|
|
2637
2693
|
}
|
|
2638
2694
|
function flushJobs(seen) {
|
|
@@ -3096,7 +3152,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3096
3152
|
this.flags |= 128;
|
|
3097
3153
|
job.flags |= 2;
|
|
3098
3154
|
}
|
|
3099
|
-
|
|
3155
|
+
job.i = instance;
|
|
3100
3156
|
this.job = job;
|
|
3101
3157
|
}
|
|
3102
3158
|
notify() {
|
|
@@ -3289,7 +3345,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3289
3345
|
hydrate: hydrateTeleport
|
|
3290
3346
|
};
|
|
3291
3347
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3292
|
-
if (moveType === 0)
|
|
3348
|
+
if (moveType === 0) {
|
|
3349
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3350
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3351
|
+
parentAnchor = vnode.targetAnchor;
|
|
3352
|
+
}
|
|
3293
3353
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3294
3354
|
const isReorder = moveType === 2;
|
|
3295
3355
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3410,6 +3470,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3410
3470
|
};
|
|
3411
3471
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3412
3472
|
if (vnode.type === Comment) return true;
|
|
3473
|
+
if (vnode.type === Fragment) {
|
|
3474
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3475
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3476
|
+
}
|
|
3413
3477
|
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3414
3478
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3415
3479
|
}
|
|
@@ -3470,7 +3534,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3470
3534
|
},
|
|
3471
3535
|
earlyRemove: () => {
|
|
3472
3536
|
const leavingVNode = leavingVNodesCache[key];
|
|
3473
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
3537
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
3538
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
3539
|
+
if (!leavingCb) {
|
|
3540
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
3541
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
3542
|
+
}
|
|
3543
|
+
if (leavingCb) leavingCb();
|
|
3544
|
+
}
|
|
3474
3545
|
},
|
|
3475
3546
|
cloneHooks: (vnode) => {
|
|
3476
3547
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -3664,7 +3735,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3664
3735
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3665
3736
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3666
3737
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
3667
|
-
} else
|
|
3738
|
+
} else {
|
|
3739
|
+
vnode.transition = hooks;
|
|
3740
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
3741
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
3742
|
+
if (child) setTransitionHooks(child, hooks);
|
|
3743
|
+
}
|
|
3744
|
+
}
|
|
3668
3745
|
return hooks;
|
|
3669
3746
|
}
|
|
3670
3747
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -3687,6 +3764,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3687
3764
|
function checkTransitionMode(mode) {
|
|
3688
3765
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
3689
3766
|
}
|
|
3767
|
+
function getTransitionRoot(vnode) {
|
|
3768
|
+
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
3769
|
+
if (vnode.type === Fragment) {
|
|
3770
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3771
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
3772
|
+
}
|
|
3773
|
+
if (vnode.type !== Comment) return vnode;
|
|
3774
|
+
}
|
|
3690
3775
|
//#endregion
|
|
3691
3776
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
3692
3777
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -4316,14 +4401,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4316
4401
|
break;
|
|
4317
4402
|
}
|
|
4318
4403
|
}, opts);
|
|
4319
|
-
|
|
4320
|
-
if (!(el instanceof Element)) return;
|
|
4404
|
+
const observe = (el) => {
|
|
4321
4405
|
if (elementIsVisibleInViewport(el)) {
|
|
4322
4406
|
hydrate();
|
|
4323
4407
|
ob.disconnect();
|
|
4324
4408
|
return false;
|
|
4325
4409
|
}
|
|
4410
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4411
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4412
|
+
}
|
|
4326
4413
|
ob.observe(el);
|
|
4414
|
+
};
|
|
4415
|
+
forEach((el) => {
|
|
4416
|
+
if (!(el instanceof Element)) return;
|
|
4417
|
+
return observe(el);
|
|
4327
4418
|
});
|
|
4328
4419
|
return () => ob.disconnect();
|
|
4329
4420
|
};
|
|
@@ -4581,7 +4672,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4581
4672
|
function pruneCacheEntry(key) {
|
|
4582
4673
|
const cached = cache.get(key);
|
|
4583
4674
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
4584
|
-
else if (current)
|
|
4675
|
+
else if (current) {
|
|
4676
|
+
resetShapeFlag(current);
|
|
4677
|
+
if (cached) resetShapeFlag(cached);
|
|
4678
|
+
}
|
|
4585
4679
|
cache.delete(key);
|
|
4586
4680
|
keys.delete(key);
|
|
4587
4681
|
}
|
|
@@ -4908,6 +5002,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4908
5002
|
owner: currentRenderingInstance
|
|
4909
5003
|
}] : void 0
|
|
4910
5004
|
};
|
|
5005
|
+
if (branchKey != null && props.key == null) {
|
|
5006
|
+
ret.vs.props = ret.props;
|
|
5007
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5008
|
+
ret.key = branchKey;
|
|
5009
|
+
}
|
|
4911
5010
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
4912
5011
|
return ret;
|
|
4913
5012
|
}
|
|
@@ -6099,7 +6198,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6099
6198
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
6100
6199
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
6101
6200
|
const key = nextKeys[i];
|
|
6102
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
6201
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
6103
6202
|
}
|
|
6104
6203
|
return false;
|
|
6105
6204
|
}
|
|
@@ -6790,7 +6889,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6790
6889
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6791
6890
|
const oldVNode = oldChildren[i];
|
|
6792
6891
|
const newVNode = newChildren[i];
|
|
6793
|
-
const
|
|
6892
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
6893
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
6794
6894
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
6795
6895
|
}
|
|
6796
6896
|
};
|
|
@@ -6882,6 +6982,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6882
6982
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6883
6983
|
pushWarningContext(n2);
|
|
6884
6984
|
n2.el = n1.el;
|
|
6985
|
+
n2.placeholder = n1.placeholder;
|
|
6885
6986
|
updateComponentPreRender(instance, n2, optimized);
|
|
6886
6987
|
popWarningContext();
|
|
6887
6988
|
return;
|
|
@@ -6891,6 +6992,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6891
6992
|
}
|
|
6892
6993
|
} else {
|
|
6893
6994
|
n2.el = n1.el;
|
|
6995
|
+
n2.placeholder = n1.placeholder;
|
|
6894
6996
|
instance.vnode = n2;
|
|
6895
6997
|
}
|
|
6896
6998
|
};
|
|
@@ -7235,12 +7337,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7235
7337
|
};
|
|
7236
7338
|
const remove = (vnode) => {
|
|
7237
7339
|
const { type, el, anchor, transition } = vnode;
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
else remove(child);
|
|
7242
|
-
});
|
|
7243
|
-
else removeFragment(el, anchor);
|
|
7340
|
+
const isFragment = type === Fragment;
|
|
7341
|
+
if (isFragment && !transition) {
|
|
7342
|
+
removeFragment(el, anchor);
|
|
7244
7343
|
return;
|
|
7245
7344
|
}
|
|
7246
7345
|
if (type === Static) {
|
|
@@ -7248,8 +7347,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7248
7347
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7249
7348
|
return;
|
|
7250
7349
|
}
|
|
7251
|
-
|
|
7252
|
-
|
|
7350
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
7351
|
+
const performRemove = () => {
|
|
7352
|
+
if (isFragment) {
|
|
7353
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
7354
|
+
} else hostRemove(el);
|
|
7355
|
+
};
|
|
7356
|
+
if (transition) {
|
|
7357
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
7358
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
7359
|
+
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7360
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
7361
|
+
isElement = !!leavingEl;
|
|
7362
|
+
}
|
|
7363
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
7364
|
+
} else performRemove();
|
|
7253
7365
|
};
|
|
7254
7366
|
const removeFragment = (cur, end) => {
|
|
7255
7367
|
let next;
|
|
@@ -7292,15 +7404,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7292
7404
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
7293
7405
|
};
|
|
7294
7406
|
const render = (vnode, container, namespace) => {
|
|
7295
|
-
|
|
7296
|
-
|
|
7297
|
-
|
|
7298
|
-
|
|
7299
|
-
|
|
7300
|
-
|
|
7301
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
7302
|
-
container._vnode = vnode;
|
|
7303
|
-
flushOnAppMount(instance);
|
|
7407
|
+
flushOnAppMount(() => {
|
|
7408
|
+
if (vnode == null) {
|
|
7409
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
7410
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
7411
|
+
container._vnode = vnode;
|
|
7412
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
7304
7413
|
};
|
|
7305
7414
|
const internals = {
|
|
7306
7415
|
p: patch,
|
|
@@ -7693,13 +7802,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7693
7802
|
registerDep(instance, onResolve) {
|
|
7694
7803
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
7695
7804
|
if (isInPendingSuspense) suspense.deps++;
|
|
7696
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
7697
7805
|
instance.asyncDep.catch((err) => {
|
|
7698
7806
|
handleError(err, instance, 0);
|
|
7699
7807
|
}).then((asyncSetupResult) => {
|
|
7700
7808
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
7701
7809
|
setCurrentInstance(null, void 0);
|
|
7702
|
-
if (
|
|
7810
|
+
if (!instance.scope.active) {
|
|
7703
7811
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
7704
7812
|
return;
|
|
7705
7813
|
}
|
|
@@ -8012,7 +8120,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8012
8120
|
ctx: vnode.ctx,
|
|
8013
8121
|
ce: vnode.ce,
|
|
8014
8122
|
vi: vnode.vi,
|
|
8015
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
8123
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
8016
8124
|
vb: vnode.vb,
|
|
8017
8125
|
ibu: vnode.ibu,
|
|
8018
8126
|
iu: vnode.iu,
|
|
@@ -8021,13 +8129,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8021
8129
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
8022
8130
|
return cloned;
|
|
8023
8131
|
}
|
|
8024
|
-
function cloneVaporSlotMeta(vnode) {
|
|
8132
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
8025
8133
|
const vaporSlot = vnode.vs;
|
|
8026
8134
|
if (!vaporSlot) return vaporSlot;
|
|
8027
8135
|
const cloned = {
|
|
8028
8136
|
slot: vaporSlot.slot,
|
|
8029
|
-
outlets: vaporSlot.outlets
|
|
8137
|
+
outlets: vaporSlot.outlets,
|
|
8138
|
+
props: vaporSlot.props
|
|
8030
8139
|
};
|
|
8140
|
+
if (vaporSlot.props && extraProps) {
|
|
8141
|
+
let extraSlotProps;
|
|
8142
|
+
for (const key in extraProps) if (key !== "key") {
|
|
8143
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
8144
|
+
extraSlotProps[key] = extraProps[key];
|
|
8145
|
+
}
|
|
8146
|
+
if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
8147
|
+
}
|
|
8031
8148
|
if (vnode.el) {
|
|
8032
8149
|
cloned.state = vaporSlot.state;
|
|
8033
8150
|
cloned.ref = vaporSlot.ref;
|
|
@@ -8210,6 +8327,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8210
8327
|
//#region packages/runtime-core/src/component.ts
|
|
8211
8328
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
8212
8329
|
let uid = 0;
|
|
8330
|
+
function getNextUid() {
|
|
8331
|
+
return uid;
|
|
8332
|
+
}
|
|
8213
8333
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8214
8334
|
const type = vnode.type;
|
|
8215
8335
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -8714,7 +8834,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8714
8834
|
}
|
|
8715
8835
|
//#endregion
|
|
8716
8836
|
//#region packages/runtime-core/src/index.ts
|
|
8717
|
-
const version = "3.6.0-rc.
|
|
8837
|
+
const version = "3.6.0-rc.12";
|
|
8718
8838
|
const warn = warn$1;
|
|
8719
8839
|
/**
|
|
8720
8840
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9197,7 +9317,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9197
9317
|
else el.removeAttribute("style");
|
|
9198
9318
|
}
|
|
9199
9319
|
if (vShowOriginalDisplay in el) {
|
|
9200
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
9320
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
9201
9321
|
if (el[vShowHidden]) style.display = "none";
|
|
9202
9322
|
}
|
|
9203
9323
|
}
|
|
@@ -9502,7 +9622,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9502
9622
|
this._resolveProps(def);
|
|
9503
9623
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
9504
9624
|
else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
9505
|
-
this._mountComponent(def);
|
|
9625
|
+
if (this._connected) this._mountComponent(def);
|
|
9506
9626
|
};
|
|
9507
9627
|
const asyncDef = this._def.__asyncLoader;
|
|
9508
9628
|
if (asyncDef) {
|
|
@@ -9804,6 +9924,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9804
9924
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
9805
9925
|
const moveCbKey = Symbol("_moveCb");
|
|
9806
9926
|
const enterCbKey = Symbol("_enterCb");
|
|
9927
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
9807
9928
|
/**
|
|
9808
9929
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
9809
9930
|
* so that it can be annotated as pure
|
|
@@ -9823,15 +9944,24 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9823
9944
|
const state = useTransitionState();
|
|
9824
9945
|
let prevChildren;
|
|
9825
9946
|
let children;
|
|
9947
|
+
let origins;
|
|
9948
|
+
let moves;
|
|
9949
|
+
const willMove = () => {
|
|
9950
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
9951
|
+
return moves;
|
|
9952
|
+
};
|
|
9826
9953
|
onUpdated(() => {
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
9954
|
+
pendingGroups.delete(instance);
|
|
9955
|
+
if (!willMove()) {
|
|
9830
9956
|
prevChildren = [];
|
|
9957
|
+
origins = void 0;
|
|
9831
9958
|
return;
|
|
9832
9959
|
}
|
|
9960
|
+
const moveClass = resolveMoveClass(props);
|
|
9833
9961
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
9834
|
-
|
|
9962
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
9963
|
+
origins = void 0;
|
|
9964
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
9835
9965
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
9836
9966
|
forceReflow(instance.vnode.el);
|
|
9837
9967
|
movedChildren.forEach((c) => {
|
|
@@ -9845,6 +9975,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9845
9975
|
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
9846
9976
|
let tag = rawProps.tag || Fragment;
|
|
9847
9977
|
prevChildren = [];
|
|
9978
|
+
moves = void 0;
|
|
9848
9979
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
9849
9980
|
const child = children[i];
|
|
9850
9981
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
@@ -9859,6 +9990,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9859
9990
|
if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9860
9991
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
9861
9992
|
}
|
|
9993
|
+
if (prevChildren.length) {
|
|
9994
|
+
const root = instance.vnode.el;
|
|
9995
|
+
origins = getOrigins(instance, root);
|
|
9996
|
+
pendingGroups.set(instance, {
|
|
9997
|
+
root,
|
|
9998
|
+
willMove
|
|
9999
|
+
});
|
|
10000
|
+
}
|
|
9862
10001
|
return createVNode(tag, null, children);
|
|
9863
10002
|
};
|
|
9864
10003
|
}
|
|
@@ -9867,8 +10006,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9867
10006
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
9868
10007
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
9869
10008
|
}
|
|
9870
|
-
function
|
|
9871
|
-
|
|
10009
|
+
function resolveMoveClass(props) {
|
|
10010
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
10011
|
+
}
|
|
10012
|
+
function recordPosition(c, shift) {
|
|
10013
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
9872
10014
|
}
|
|
9873
10015
|
function applyTranslation(c) {
|
|
9874
10016
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -9893,13 +10035,36 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9893
10035
|
}
|
|
9894
10036
|
return false;
|
|
9895
10037
|
}
|
|
9896
|
-
function getPosition(el) {
|
|
10038
|
+
function getPosition(el, shift) {
|
|
9897
10039
|
const rect = el.getBoundingClientRect();
|
|
9898
10040
|
return {
|
|
9899
|
-
left: rect.left,
|
|
9900
|
-
top: rect.top
|
|
10041
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
10042
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
9901
10043
|
};
|
|
9902
10044
|
}
|
|
10045
|
+
function getOrigins(instance, root) {
|
|
10046
|
+
let origins;
|
|
10047
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
10048
|
+
const pending = pendingGroups.get(group);
|
|
10049
|
+
if (pending) {
|
|
10050
|
+
const item = findItem(pending.root, root);
|
|
10051
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
10052
|
+
item,
|
|
10053
|
+
willMove: pending.willMove
|
|
10054
|
+
}));
|
|
10055
|
+
}
|
|
10056
|
+
}
|
|
10057
|
+
return origins;
|
|
10058
|
+
}
|
|
10059
|
+
function findItem(root, node) {
|
|
10060
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
10061
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
10062
|
+
if (node && node.nodeType === 1) return node;
|
|
10063
|
+
}
|
|
10064
|
+
function getOriginShift(origins, root) {
|
|
10065
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
10066
|
+
return origin && getPosition(origin.item, origin);
|
|
10067
|
+
}
|
|
9903
10068
|
function hasCSSTransform(el, root, moveClass) {
|
|
9904
10069
|
const clone = el.cloneNode();
|
|
9905
10070
|
const _vtc = el[vtcKey];
|