@vue/runtime-dom 3.6.0-rc.11 → 3.6.0-rc.13
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 +73 -17
- package/dist/runtime-dom.cjs.prod.js +73 -17
- package/dist/runtime-dom.esm-browser.js +321 -113
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +77 -22
- package/dist/runtime-dom.global.js +348 -112
- 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.13
|
|
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() {
|
|
@@ -3153,6 +3209,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3153
3209
|
};
|
|
3154
3210
|
}
|
|
3155
3211
|
//#endregion
|
|
3212
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3213
|
+
/**
|
|
3214
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3215
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3216
|
+
*/
|
|
3217
|
+
let isVaporInteropEnabled = false;
|
|
3218
|
+
function setVaporInteropEnabled() {
|
|
3219
|
+
isVaporInteropEnabled = true;
|
|
3220
|
+
}
|
|
3221
|
+
//#endregion
|
|
3156
3222
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3157
3223
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3158
3224
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3289,7 +3355,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3289
3355
|
hydrate: hydrateTeleport
|
|
3290
3356
|
};
|
|
3291
3357
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3292
|
-
if (moveType === 0)
|
|
3358
|
+
if (moveType === 0) {
|
|
3359
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3360
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3361
|
+
parentAnchor = vnode.targetAnchor;
|
|
3362
|
+
}
|
|
3293
3363
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3294
3364
|
const isReorder = moveType === 2;
|
|
3295
3365
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3408,9 +3478,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3408
3478
|
onAfterAppear: TransitionHookValidator,
|
|
3409
3479
|
onAppearCancelled: TransitionHookValidator
|
|
3410
3480
|
};
|
|
3481
|
+
let isTransitionEnabled = false;
|
|
3482
|
+
function withTransitionEnabled(value) {
|
|
3483
|
+
isTransitionEnabled = true;
|
|
3484
|
+
return value;
|
|
3485
|
+
}
|
|
3411
3486
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3412
3487
|
if (vnode.type === Comment) return true;
|
|
3413
|
-
if (vnode.type ===
|
|
3488
|
+
if (vnode.type === Fragment) {
|
|
3489
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3490
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3491
|
+
}
|
|
3492
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3414
3493
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3415
3494
|
}
|
|
3416
3495
|
const BaseTransitionImpl = {
|
|
@@ -3427,7 +3506,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3427
3506
|
const { mode } = rawProps;
|
|
3428
3507
|
checkTransitionMode(mode);
|
|
3429
3508
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3430
|
-
if (!(instance.
|
|
3509
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3431
3510
|
}) : NOOP);
|
|
3432
3511
|
};
|
|
3433
3512
|
}
|
|
@@ -3447,7 +3526,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3447
3526
|
}
|
|
3448
3527
|
return child;
|
|
3449
3528
|
}
|
|
3450
|
-
const BaseTransition = BaseTransitionImpl;
|
|
3529
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3451
3530
|
function getLeavingNodesForType(state, vnode) {
|
|
3452
3531
|
const { leavingNodes } = state;
|
|
3453
3532
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3470,7 +3549,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3470
3549
|
},
|
|
3471
3550
|
earlyRemove: () => {
|
|
3472
3551
|
const leavingVNode = leavingVNodesCache[key];
|
|
3473
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
3552
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
3553
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
3554
|
+
if (!leavingCb) {
|
|
3555
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
3556
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
3557
|
+
}
|
|
3558
|
+
if (leavingCb) leavingCb();
|
|
3559
|
+
}
|
|
3474
3560
|
},
|
|
3475
3561
|
cloneHooks: (vnode) => {
|
|
3476
3562
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -3478,7 +3564,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3478
3564
|
return hooks;
|
|
3479
3565
|
}
|
|
3480
3566
|
}, props, state, instance);
|
|
3481
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
3567
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3482
3568
|
__vapor: true,
|
|
3483
3569
|
props,
|
|
3484
3570
|
state,
|
|
@@ -3655,7 +3741,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3655
3741
|
function setTransitionHooks(vnode, hooks) {
|
|
3656
3742
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3657
3743
|
vnode.transition = hooks;
|
|
3658
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3744
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3659
3745
|
else {
|
|
3660
3746
|
const subTree = vnode.component.subTree;
|
|
3661
3747
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -3664,7 +3750,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3664
3750
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
3665
3751
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
3666
3752
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
3667
|
-
} else
|
|
3753
|
+
} else {
|
|
3754
|
+
vnode.transition = hooks;
|
|
3755
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
3756
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
3757
|
+
if (child) setTransitionHooks(child, hooks);
|
|
3758
|
+
}
|
|
3759
|
+
}
|
|
3668
3760
|
return hooks;
|
|
3669
3761
|
}
|
|
3670
3762
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -3687,6 +3779,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3687
3779
|
function checkTransitionMode(mode) {
|
|
3688
3780
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
3689
3781
|
}
|
|
3782
|
+
function getTransitionRoot(vnode) {
|
|
3783
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
3784
|
+
if (vnode.type === Fragment) {
|
|
3785
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3786
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
3787
|
+
}
|
|
3788
|
+
if (vnode.type !== Comment) return vnode;
|
|
3789
|
+
}
|
|
3690
3790
|
//#endregion
|
|
3691
3791
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
3692
3792
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -3940,7 +4040,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3940
4040
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3941
4041
|
break;
|
|
3942
4042
|
case VaporSlot:
|
|
3943
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4043
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3944
4044
|
break;
|
|
3945
4045
|
default: if (shapeFlag & 1) {
|
|
3946
4046
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
@@ -4072,7 +4172,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4072
4172
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4073
4173
|
const container = parentNode(node);
|
|
4074
4174
|
const first = nextSibling(node);
|
|
4075
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4175
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4076
4176
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4077
4177
|
else {
|
|
4078
4178
|
logMismatchError();
|
|
@@ -4316,14 +4416,20 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4316
4416
|
break;
|
|
4317
4417
|
}
|
|
4318
4418
|
}, opts);
|
|
4319
|
-
|
|
4320
|
-
if (!(el instanceof Element)) return;
|
|
4419
|
+
const observe = (el) => {
|
|
4321
4420
|
if (elementIsVisibleInViewport(el)) {
|
|
4322
4421
|
hydrate();
|
|
4323
4422
|
ob.disconnect();
|
|
4324
4423
|
return false;
|
|
4325
4424
|
}
|
|
4425
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4426
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4427
|
+
}
|
|
4326
4428
|
ob.observe(el);
|
|
4429
|
+
};
|
|
4430
|
+
forEach((el) => {
|
|
4431
|
+
if (!(el instanceof Element)) return;
|
|
4432
|
+
return observe(el);
|
|
4327
4433
|
});
|
|
4328
4434
|
return () => ob.disconnect();
|
|
4329
4435
|
};
|
|
@@ -4473,7 +4579,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4473
4579
|
setPendingRequest: (request) => pendingRequest = request
|
|
4474
4580
|
};
|
|
4475
4581
|
}
|
|
4476
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4582
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
4477
4583
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4478
4584
|
const error = /* @__PURE__ */ ref();
|
|
4479
4585
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -4530,7 +4636,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4530
4636
|
//#endregion
|
|
4531
4637
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
4532
4638
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
4533
|
-
|
|
4639
|
+
let isKeepAliveEnabled = false;
|
|
4640
|
+
function withKeepAliveEnabled(value) {
|
|
4641
|
+
isKeepAliveEnabled = true;
|
|
4642
|
+
return value;
|
|
4643
|
+
}
|
|
4644
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
|
|
4534
4645
|
name: `KeepAlive`,
|
|
4535
4646
|
__isKeepAlive: true,
|
|
4536
4647
|
props: {
|
|
@@ -4581,7 +4692,10 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4581
4692
|
function pruneCacheEntry(key) {
|
|
4582
4693
|
const cached = cache.get(key);
|
|
4583
4694
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
4584
|
-
else if (current)
|
|
4695
|
+
else if (current) {
|
|
4696
|
+
resetShapeFlag(current);
|
|
4697
|
+
if (cached) resetShapeFlag(cached);
|
|
4698
|
+
}
|
|
4585
4699
|
cache.delete(key);
|
|
4586
4700
|
keys.delete(key);
|
|
4587
4701
|
}
|
|
@@ -4666,7 +4780,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4666
4780
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
4667
4781
|
};
|
|
4668
4782
|
}
|
|
4669
|
-
};
|
|
4783
|
+
});
|
|
4670
4784
|
function matches(pattern, name) {
|
|
4671
4785
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
4672
4786
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -4898,16 +5012,22 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4898
5012
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4899
5013
|
if (props == null) props = {};
|
|
4900
5014
|
let slot = slots[name];
|
|
4901
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5015
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
4902
5016
|
if (vaporSlot) {
|
|
4903
5017
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4904
5018
|
ret.vs = {
|
|
4905
5019
|
slot: vaporSlot,
|
|
5020
|
+
name,
|
|
4906
5021
|
outlets: fallback ? [{
|
|
4907
5022
|
fallback,
|
|
4908
5023
|
owner: currentRenderingInstance
|
|
4909
5024
|
}] : void 0
|
|
4910
5025
|
};
|
|
5026
|
+
if (branchKey != null && props.key == null) {
|
|
5027
|
+
ret.vs.props = ret.props;
|
|
5028
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5029
|
+
ret.key = branchKey;
|
|
5030
|
+
}
|
|
4911
5031
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
4912
5032
|
return ret;
|
|
4913
5033
|
}
|
|
@@ -4928,7 +5048,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4928
5048
|
try {
|
|
4929
5049
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
4930
5050
|
let attached = false;
|
|
4931
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5051
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
4932
5052
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
4933
5053
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
4934
5054
|
}
|
|
@@ -6099,7 +6219,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6099
6219
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
6100
6220
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
6101
6221
|
const key = nextKeys[i];
|
|
6102
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
6222
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
6103
6223
|
}
|
|
6104
6224
|
return false;
|
|
6105
6225
|
}
|
|
@@ -6612,7 +6732,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6612
6732
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6613
6733
|
break;
|
|
6614
6734
|
case VaporSlot:
|
|
6615
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6735
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6616
6736
|
break;
|
|
6617
6737
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6618
6738
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -6746,7 +6866,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6746
6866
|
let vnodeHook;
|
|
6747
6867
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6748
6868
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6749
|
-
if (n2.ibu) n2.ibu();
|
|
6869
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
6750
6870
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6751
6871
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6752
6872
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6780,9 +6900,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6780
6900
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6781
6901
|
}
|
|
6782
6902
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6783
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6903
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
6784
6904
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6785
|
-
n2.iu && n2.iu();
|
|
6905
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
6786
6906
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6787
6907
|
}, void 0, parentSuspense);
|
|
6788
6908
|
};
|
|
@@ -6790,7 +6910,8 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6790
6910
|
for (let i = 0; i < newChildren.length; i++) {
|
|
6791
6911
|
const oldVNode = oldChildren[i];
|
|
6792
6912
|
const newVNode = newChildren[i];
|
|
6793
|
-
const
|
|
6913
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
6914
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
6794
6915
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
6795
6916
|
}
|
|
6796
6917
|
};
|
|
@@ -6882,6 +7003,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6882
7003
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
6883
7004
|
pushWarningContext(n2);
|
|
6884
7005
|
n2.el = n1.el;
|
|
7006
|
+
n2.placeholder = n1.placeholder;
|
|
6885
7007
|
updateComponentPreRender(instance, n2, optimized);
|
|
6886
7008
|
popWarningContext();
|
|
6887
7009
|
return;
|
|
@@ -6891,6 +7013,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6891
7013
|
}
|
|
6892
7014
|
} else {
|
|
6893
7015
|
n2.el = n1.el;
|
|
7016
|
+
n2.placeholder = n1.placeholder;
|
|
6894
7017
|
instance.vnode = n2;
|
|
6895
7018
|
}
|
|
6896
7019
|
};
|
|
@@ -6987,7 +7110,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6987
7110
|
} else next = vnode;
|
|
6988
7111
|
if (bu) invokeArrayFns(bu);
|
|
6989
7112
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
6990
|
-
if (next.ibu) next.ibu();
|
|
7113
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
6991
7114
|
toggleRecurse(instance, true);
|
|
6992
7115
|
startMeasure(instance, `render`);
|
|
6993
7116
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -7000,9 +7123,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7000
7123
|
next.el = nextTree.el;
|
|
7001
7124
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
7002
7125
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
7003
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
7126
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
7004
7127
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7005
|
-
next.iu && next.iu();
|
|
7128
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
7006
7129
|
}, void 0, parentSuspense);
|
|
7007
7130
|
devtoolsComponentUpdated(instance);
|
|
7008
7131
|
popWarningContext();
|
|
@@ -7154,7 +7277,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7154
7277
|
};
|
|
7155
7278
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
7156
7279
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
7157
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
7280
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
7158
7281
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
7159
7282
|
return;
|
|
7160
7283
|
}
|
|
@@ -7198,11 +7321,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7198
7321
|
}
|
|
7199
7322
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7200
7323
|
if (shapeFlag & 256) {
|
|
7201
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7324
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7202
7325
|
else parentComponent.ctx.deactivate(vnode);
|
|
7203
7326
|
return;
|
|
7204
7327
|
}
|
|
7205
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
7328
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
7206
7329
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7207
7330
|
return;
|
|
7208
7331
|
}
|
|
@@ -7220,7 +7343,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7220
7343
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
7221
7344
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7222
7345
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7223
|
-
if (type === VaporSlot) {
|
|
7346
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
7224
7347
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7225
7348
|
return;
|
|
7226
7349
|
}
|
|
@@ -7235,12 +7358,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7235
7358
|
};
|
|
7236
7359
|
const remove = (vnode) => {
|
|
7237
7360
|
const { type, el, anchor, transition } = vnode;
|
|
7238
|
-
|
|
7239
|
-
|
|
7240
|
-
|
|
7241
|
-
else remove(child);
|
|
7242
|
-
});
|
|
7243
|
-
else removeFragment(el, anchor);
|
|
7361
|
+
const isFragment = type === Fragment;
|
|
7362
|
+
if (isFragment && !transition) {
|
|
7363
|
+
removeFragment(el, anchor);
|
|
7244
7364
|
return;
|
|
7245
7365
|
}
|
|
7246
7366
|
if (type === Static) {
|
|
@@ -7248,8 +7368,21 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7248
7368
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
7249
7369
|
return;
|
|
7250
7370
|
}
|
|
7251
|
-
|
|
7252
|
-
|
|
7371
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
7372
|
+
const performRemove = () => {
|
|
7373
|
+
if (isFragment) {
|
|
7374
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
7375
|
+
} else hostRemove(el);
|
|
7376
|
+
};
|
|
7377
|
+
if (transition) {
|
|
7378
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
7379
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
7380
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7381
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
7382
|
+
isElement = !!leavingEl;
|
|
7383
|
+
}
|
|
7384
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
7385
|
+
} else performRemove();
|
|
7253
7386
|
};
|
|
7254
7387
|
const removeFragment = (cur, end) => {
|
|
7255
7388
|
let next;
|
|
@@ -7283,7 +7416,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7283
7416
|
};
|
|
7284
7417
|
const getNextHostNode = (vnode) => {
|
|
7285
7418
|
if (vnode.shapeFlag & 6) {
|
|
7286
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7419
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7287
7420
|
return getNextHostNode(vnode.component.subTree);
|
|
7288
7421
|
}
|
|
7289
7422
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -7292,15 +7425,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7292
7425
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
7293
7426
|
};
|
|
7294
7427
|
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);
|
|
7428
|
+
flushOnAppMount(() => {
|
|
7429
|
+
if (vnode == null) {
|
|
7430
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
7431
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
7432
|
+
container._vnode = vnode;
|
|
7433
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
7304
7434
|
};
|
|
7305
7435
|
const internals = {
|
|
7306
7436
|
p: patch,
|
|
@@ -7347,7 +7477,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7347
7477
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7348
7478
|
}
|
|
7349
7479
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7350
|
-
if (!vapor) {
|
|
7480
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
7351
7481
|
if (allowed) {
|
|
7352
7482
|
effect.flags |= 128;
|
|
7353
7483
|
job.flags |= 2;
|
|
@@ -7459,7 +7589,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7459
7589
|
currentParent = currentParent.parent;
|
|
7460
7590
|
} else break;
|
|
7461
7591
|
}
|
|
7462
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7592
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7463
7593
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
7464
7594
|
return inheritedScopeIds;
|
|
7465
7595
|
}
|
|
@@ -7472,8 +7602,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7472
7602
|
//#endregion
|
|
7473
7603
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
7474
7604
|
const isSuspense = (type) => type.__isSuspense;
|
|
7605
|
+
let isSuspenseEnabled = false;
|
|
7606
|
+
function withSuspenseEnabled(value) {
|
|
7607
|
+
isSuspenseEnabled = true;
|
|
7608
|
+
return value;
|
|
7609
|
+
}
|
|
7475
7610
|
let suspenseId = 0;
|
|
7476
|
-
const Suspense = {
|
|
7611
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
7477
7612
|
name: "Suspense",
|
|
7478
7613
|
__isSuspense: true,
|
|
7479
7614
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -7490,7 +7625,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7490
7625
|
},
|
|
7491
7626
|
hydrate: hydrateSuspense,
|
|
7492
7627
|
normalize: normalizeSuspenseChildren
|
|
7493
|
-
};
|
|
7628
|
+
});
|
|
7494
7629
|
function triggerEvent(vnode, name) {
|
|
7495
7630
|
const eventListener = vnode.props && vnode.props[name];
|
|
7496
7631
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -7693,13 +7828,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7693
7828
|
registerDep(instance, onResolve) {
|
|
7694
7829
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
7695
7830
|
if (isInPendingSuspense) suspense.deps++;
|
|
7696
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
7697
7831
|
instance.asyncDep.catch((err) => {
|
|
7698
7832
|
handleError(err, instance, 0);
|
|
7699
7833
|
}).then((asyncSetupResult) => {
|
|
7700
7834
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
7701
7835
|
setCurrentInstance(null, void 0);
|
|
7702
|
-
if (
|
|
7836
|
+
if (!instance.scope.active) {
|
|
7703
7837
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
7704
7838
|
return;
|
|
7705
7839
|
}
|
|
@@ -8012,7 +8146,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8012
8146
|
ctx: vnode.ctx,
|
|
8013
8147
|
ce: vnode.ce,
|
|
8014
8148
|
vi: vnode.vi,
|
|
8015
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
8149
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
8016
8150
|
vb: vnode.vb,
|
|
8017
8151
|
ibu: vnode.ibu,
|
|
8018
8152
|
iu: vnode.iu,
|
|
@@ -8021,13 +8155,29 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8021
8155
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
8022
8156
|
return cloned;
|
|
8023
8157
|
}
|
|
8024
|
-
function cloneVaporSlotMeta(vnode) {
|
|
8158
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
8025
8159
|
const vaporSlot = vnode.vs;
|
|
8026
8160
|
if (!vaporSlot) return vaporSlot;
|
|
8027
8161
|
const cloned = {
|
|
8028
8162
|
slot: vaporSlot.slot,
|
|
8029
|
-
|
|
8163
|
+
name: vaporSlot.name,
|
|
8164
|
+
outlets: vaporSlot.outlets,
|
|
8165
|
+
props: vaporSlot.props,
|
|
8166
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
8167
|
+
group: vaporSlot.group
|
|
8030
8168
|
};
|
|
8169
|
+
const attrs = cloned.attrs;
|
|
8170
|
+
if (extraProps && vaporSlot.props) {
|
|
8171
|
+
let extraSlotProps;
|
|
8172
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
8173
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
8174
|
+
extraSlotProps[key] = extraProps[key];
|
|
8175
|
+
}
|
|
8176
|
+
if (extraSlotProps) {
|
|
8177
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
8178
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
8179
|
+
}
|
|
8180
|
+
}
|
|
8031
8181
|
if (vnode.el) {
|
|
8032
8182
|
cloned.state = vaporSlot.state;
|
|
8033
8183
|
cloned.ref = vaporSlot.ref;
|
|
@@ -8210,6 +8360,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8210
8360
|
//#region packages/runtime-core/src/component.ts
|
|
8211
8361
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
8212
8362
|
let uid = 0;
|
|
8363
|
+
function getNextUid() {
|
|
8364
|
+
return uid;
|
|
8365
|
+
}
|
|
8213
8366
|
function createComponentInstance(vnode, parent, suspense) {
|
|
8214
8367
|
const type = vnode.type;
|
|
8215
8368
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -8296,7 +8449,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8296
8449
|
isSSR && setInSSRSetupState(isSSR);
|
|
8297
8450
|
const { props, children, vi } = instance.vnode;
|
|
8298
8451
|
const isStateful = isStatefulComponent(instance);
|
|
8299
|
-
if (vi) vi(instance);
|
|
8452
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
8300
8453
|
else {
|
|
8301
8454
|
initProps(instance, props, isStateful, isSSR);
|
|
8302
8455
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -8714,7 +8867,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8714
8867
|
}
|
|
8715
8868
|
//#endregion
|
|
8716
8869
|
//#region packages/runtime-core/src/index.ts
|
|
8717
|
-
const version = "3.6.0-rc.
|
|
8870
|
+
const version = "3.6.0-rc.13";
|
|
8718
8871
|
const warn = warn$1;
|
|
8719
8872
|
/**
|
|
8720
8873
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9127,14 +9280,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9127
9280
|
}
|
|
9128
9281
|
while (vnode.component) {
|
|
9129
9282
|
const component = vnode.component;
|
|
9130
|
-
if (component.vapor) {
|
|
9283
|
+
if (isVaporInteropEnabled && component.vapor) {
|
|
9131
9284
|
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
9132
9285
|
return;
|
|
9133
9286
|
}
|
|
9134
9287
|
vnode = vnode.component.subTree;
|
|
9135
9288
|
}
|
|
9136
9289
|
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
9137
|
-
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
9290
|
+
else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
9138
9291
|
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
9139
9292
|
else if (vnode.type === Static) {
|
|
9140
9293
|
let { el, anchor } = vnode;
|
|
@@ -9197,7 +9350,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9197
9350
|
else el.removeAttribute("style");
|
|
9198
9351
|
}
|
|
9199
9352
|
if (vShowOriginalDisplay in el) {
|
|
9200
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
9353
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
9201
9354
|
if (el[vShowHidden]) style.display = "none";
|
|
9202
9355
|
}
|
|
9203
9356
|
}
|
|
@@ -9502,7 +9655,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9502
9655
|
this._resolveProps(def);
|
|
9503
9656
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
9504
9657
|
else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
9505
|
-
this._mountComponent(def);
|
|
9658
|
+
if (this._connected) this._mountComponent(def);
|
|
9506
9659
|
};
|
|
9507
9660
|
const asyncDef = this._def.__asyncLoader;
|
|
9508
9661
|
if (asyncDef) {
|
|
@@ -9804,6 +9957,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9804
9957
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
9805
9958
|
const moveCbKey = Symbol("_moveCb");
|
|
9806
9959
|
const enterCbKey = Symbol("_enterCb");
|
|
9960
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
9807
9961
|
/**
|
|
9808
9962
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
9809
9963
|
* so that it can be annotated as pure
|
|
@@ -9812,7 +9966,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9812
9966
|
delete t.props.mode;
|
|
9813
9967
|
return t;
|
|
9814
9968
|
};
|
|
9815
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9969
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
9816
9970
|
name: "TransitionGroup",
|
|
9817
9971
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9818
9972
|
tag: String,
|
|
@@ -9821,17 +9975,31 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9821
9975
|
setup(props, { slots }) {
|
|
9822
9976
|
const instance = getCurrentInstance();
|
|
9823
9977
|
const state = useTransitionState();
|
|
9978
|
+
const group = {
|
|
9979
|
+
props: {},
|
|
9980
|
+
state,
|
|
9981
|
+
instance
|
|
9982
|
+
};
|
|
9824
9983
|
let prevChildren;
|
|
9825
9984
|
let children;
|
|
9985
|
+
let origins;
|
|
9986
|
+
let moves;
|
|
9987
|
+
const willMove = () => {
|
|
9988
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
9989
|
+
return moves;
|
|
9990
|
+
};
|
|
9826
9991
|
onUpdated(() => {
|
|
9827
|
-
|
|
9828
|
-
|
|
9829
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
9992
|
+
pendingGroups.delete(instance);
|
|
9993
|
+
if (!willMove()) {
|
|
9830
9994
|
prevChildren = [];
|
|
9995
|
+
origins = void 0;
|
|
9831
9996
|
return;
|
|
9832
9997
|
}
|
|
9998
|
+
const moveClass = resolveMoveClass(props);
|
|
9833
9999
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
9834
|
-
|
|
10000
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
10001
|
+
origins = void 0;
|
|
10002
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
9835
10003
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
9836
10004
|
forceReflow(instance.vnode.el);
|
|
9837
10005
|
movedChildren.forEach((c) => {
|
|
@@ -9842,33 +10010,50 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9842
10010
|
});
|
|
9843
10011
|
return () => {
|
|
9844
10012
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
9845
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
10013
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
9846
10014
|
let tag = rawProps.tag || Fragment;
|
|
9847
10015
|
prevChildren = [];
|
|
10016
|
+
moves = void 0;
|
|
9848
10017
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
9849
10018
|
const child = children[i];
|
|
9850
10019
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
9851
10020
|
prevChildren.push(child);
|
|
9852
10021
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9853
10022
|
positionMap.set(child, getPosition(child.el));
|
|
9854
|
-
}
|
|
10023
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
10024
|
+
const row = { el };
|
|
10025
|
+
prevChildren.push(row);
|
|
10026
|
+
positionMap.set(row, getPosition(el));
|
|
10027
|
+
});
|
|
9855
10028
|
}
|
|
9856
10029
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
9857
10030
|
for (let i = 0; i < children.length; i++) {
|
|
9858
10031
|
const child = children[i];
|
|
9859
|
-
if (child.
|
|
10032
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
10033
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9860
10034
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
9861
10035
|
}
|
|
10036
|
+
if (prevChildren.length) {
|
|
10037
|
+
const root = instance.vnode.el;
|
|
10038
|
+
origins = getOrigins(instance, root);
|
|
10039
|
+
pendingGroups.set(instance, {
|
|
10040
|
+
root,
|
|
10041
|
+
willMove
|
|
10042
|
+
});
|
|
10043
|
+
}
|
|
9862
10044
|
return createVNode(tag, null, children);
|
|
9863
10045
|
};
|
|
9864
10046
|
}
|
|
9865
|
-
});
|
|
10047
|
+
}));
|
|
9866
10048
|
function callPendingCbs(el) {
|
|
9867
10049
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
9868
10050
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
9869
10051
|
}
|
|
9870
|
-
function
|
|
9871
|
-
|
|
10052
|
+
function resolveMoveClass(props) {
|
|
10053
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
10054
|
+
}
|
|
10055
|
+
function recordPosition(c, shift) {
|
|
10056
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
9872
10057
|
}
|
|
9873
10058
|
function applyTranslation(c) {
|
|
9874
10059
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -9893,13 +10078,36 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9893
10078
|
}
|
|
9894
10079
|
return false;
|
|
9895
10080
|
}
|
|
9896
|
-
function getPosition(el) {
|
|
10081
|
+
function getPosition(el, shift) {
|
|
9897
10082
|
const rect = el.getBoundingClientRect();
|
|
9898
10083
|
return {
|
|
9899
|
-
left: rect.left,
|
|
9900
|
-
top: rect.top
|
|
10084
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
10085
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
9901
10086
|
};
|
|
9902
10087
|
}
|
|
10088
|
+
function getOrigins(instance, root) {
|
|
10089
|
+
let origins;
|
|
10090
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
10091
|
+
const pending = pendingGroups.get(group);
|
|
10092
|
+
if (pending) {
|
|
10093
|
+
const item = findItem(pending.root, root);
|
|
10094
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
10095
|
+
item,
|
|
10096
|
+
willMove: pending.willMove
|
|
10097
|
+
}));
|
|
10098
|
+
}
|
|
10099
|
+
}
|
|
10100
|
+
return origins;
|
|
10101
|
+
}
|
|
10102
|
+
function findItem(root, node) {
|
|
10103
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
10104
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
10105
|
+
if (node && node.nodeType === 1) return node;
|
|
10106
|
+
}
|
|
10107
|
+
function getOriginShift(origins, root) {
|
|
10108
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
10109
|
+
return origin && getPosition(origin.item, origin);
|
|
10110
|
+
}
|
|
9903
10111
|
function hasCSSTransform(el, root, moveClass) {
|
|
9904
10112
|
const clone = el.cloneNode();
|
|
9905
10113
|
const _vtc = el[vtcKey];
|
|
@@ -9980,7 +10188,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9980
10188
|
if (e.target.composing) return;
|
|
9981
10189
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
9982
10190
|
});
|
|
9983
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
10191
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
9984
10192
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
9985
10193
|
});
|
|
9986
10194
|
if (!lazy) {
|
|
@@ -10424,6 +10632,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10424
10632
|
exports.initCustomFormatter = initCustomFormatter;
|
|
10425
10633
|
exports.initDirectivesForSSR = initDirectivesForSSR;
|
|
10426
10634
|
exports.inject = inject;
|
|
10635
|
+
Object.defineProperty(exports, "isKeepAliveEnabled", {
|
|
10636
|
+
enumerable: true,
|
|
10637
|
+
get: function() {
|
|
10638
|
+
return isKeepAliveEnabled;
|
|
10639
|
+
}
|
|
10640
|
+
});
|
|
10427
10641
|
exports.isMemoSame = isMemoSame;
|
|
10428
10642
|
exports.isProxy = isProxy;
|
|
10429
10643
|
exports.isReactive = isReactive;
|
|
@@ -10431,7 +10645,25 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10431
10645
|
exports.isRef = isRef;
|
|
10432
10646
|
exports.isRuntimeOnly = isRuntimeOnly;
|
|
10433
10647
|
exports.isShallow = isShallow;
|
|
10648
|
+
Object.defineProperty(exports, "isSuspenseEnabled", {
|
|
10649
|
+
enumerable: true,
|
|
10650
|
+
get: function() {
|
|
10651
|
+
return isSuspenseEnabled;
|
|
10652
|
+
}
|
|
10653
|
+
});
|
|
10654
|
+
Object.defineProperty(exports, "isTransitionEnabled", {
|
|
10655
|
+
enumerable: true,
|
|
10656
|
+
get: function() {
|
|
10657
|
+
return isTransitionEnabled;
|
|
10658
|
+
}
|
|
10659
|
+
});
|
|
10434
10660
|
exports.isVNode = isVNode;
|
|
10661
|
+
Object.defineProperty(exports, "isVaporInteropEnabled", {
|
|
10662
|
+
enumerable: true,
|
|
10663
|
+
get: function() {
|
|
10664
|
+
return isVaporInteropEnabled;
|
|
10665
|
+
}
|
|
10666
|
+
});
|
|
10435
10667
|
exports.markRaw = markRaw;
|
|
10436
10668
|
exports.mergeDefaults = mergeDefaults;
|
|
10437
10669
|
exports.mergeModels = mergeModels;
|
|
@@ -10478,6 +10710,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10478
10710
|
exports.setDevtoolsHook = setDevtoolsHook;
|
|
10479
10711
|
exports.setIsHydratingEnabled = setIsHydratingEnabled;
|
|
10480
10712
|
exports.setTransitionHooks = setTransitionHooks;
|
|
10713
|
+
exports.setVaporInteropEnabled = setVaporInteropEnabled;
|
|
10481
10714
|
exports.shallowReactive = shallowReactive;
|
|
10482
10715
|
exports.shallowReadonly = shallowReadonly;
|
|
10483
10716
|
exports.shallowRef = shallowRef;
|
|
@@ -10522,9 +10755,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10522
10755
|
exports.withCtx = withCtx;
|
|
10523
10756
|
exports.withDefaults = withDefaults;
|
|
10524
10757
|
exports.withDirectives = withDirectives;
|
|
10758
|
+
exports.withKeepAliveEnabled = withKeepAliveEnabled;
|
|
10525
10759
|
exports.withKeys = withKeys;
|
|
10526
10760
|
exports.withMemo = withMemo;
|
|
10527
10761
|
exports.withModifiers = withModifiers;
|
|
10528
10762
|
exports.withScopeId = withScopeId;
|
|
10763
|
+
exports.withSuspenseEnabled = withSuspenseEnabled;
|
|
10764
|
+
exports.withTransitionEnabled = withTransitionEnabled;
|
|
10529
10765
|
return exports;
|
|
10530
10766
|
})({});
|