@vue/compat 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/vue-compat.d.ts +33 -2
- package/dist/vue.cjs.js +345 -118
- package/dist/vue.cjs.prod.js +379 -117
- package/dist/vue.esm-browser.js +342 -117
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +369 -130
- package/dist/vue.global.js +341 -116
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +342 -117
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +369 -130
- package/dist/vue.runtime.global.js +341 -116
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +4 -4
package/dist/vue.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/compat v3.6.0-rc.
|
|
2
|
+
* @vue/compat v3.6.0-rc.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -318,9 +318,10 @@ const isVoidTag = /*@__PURE__*/ makeMap(VOID_TAGS);
|
|
|
318
318
|
* - ismap -> isMap
|
|
319
319
|
* - nomodule -> noModule
|
|
320
320
|
* - novalidate -> noValidate
|
|
321
|
+
* - playsinline -> playsInline
|
|
321
322
|
* - readonly -> readOnly
|
|
322
323
|
*/
|
|
323
|
-
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
|
|
324
|
+
const specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,playsinline,readonly`;
|
|
324
325
|
const isSpecialBooleanAttr = /*@__PURE__*/ makeMap(specialBooleanAttrs);
|
|
325
326
|
/**
|
|
326
327
|
* The full list is needed during SSR to produce the correct initial markup.
|
|
@@ -1049,17 +1050,33 @@ const arrayInstrumentations = {
|
|
|
1049
1050
|
};
|
|
1050
1051
|
function iterator(self, method, wrapValue) {
|
|
1051
1052
|
const arr = shallowReadArray(self);
|
|
1052
|
-
const
|
|
1053
|
+
const methodFn = arr[method];
|
|
1054
|
+
const iter = methodFn.call(arr);
|
|
1053
1055
|
if (arr !== self && !/* @__PURE__ */ isShallow(self)) {
|
|
1056
|
+
if (iter[Symbol.toStringTag] === "Array Iterator") {
|
|
1057
|
+
const wrapped = Object.create(Object.getPrototypeOf(iter));
|
|
1058
|
+
wrapped.next = () => wrapResult(iter.next(), wrapValue);
|
|
1059
|
+
if (methodFn !== arrayProto[method]) Object.defineProperties(wrapped, {
|
|
1060
|
+
return: { get() {
|
|
1061
|
+
const fn = iter.return;
|
|
1062
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1063
|
+
} },
|
|
1064
|
+
throw: { get() {
|
|
1065
|
+
const fn = iter.throw;
|
|
1066
|
+
return typeof fn === "function" ? fn.bind(iter) : fn;
|
|
1067
|
+
} }
|
|
1068
|
+
});
|
|
1069
|
+
return wrapped;
|
|
1070
|
+
}
|
|
1054
1071
|
iter._next = iter.next;
|
|
1055
|
-
iter.next = () =>
|
|
1056
|
-
const result = iter._next();
|
|
1057
|
-
if (!result.done) result.value = wrapValue(result.value);
|
|
1058
|
-
return result;
|
|
1059
|
-
};
|
|
1072
|
+
iter.next = () => wrapResult(iter._next(), wrapValue);
|
|
1060
1073
|
}
|
|
1061
1074
|
return iter;
|
|
1062
1075
|
}
|
|
1076
|
+
function wrapResult(result, wrapValue) {
|
|
1077
|
+
if (!result.done) result.value = wrapValue(result.value);
|
|
1078
|
+
return result;
|
|
1079
|
+
}
|
|
1063
1080
|
const arrayProto = Array.prototype;
|
|
1064
1081
|
function apply(self, method, fn, thisArg, wrappedRetFn, args) {
|
|
1065
1082
|
const arr = shallowReadArray(self);
|
|
@@ -1377,6 +1394,7 @@ function createInstrumentationGetter(isReadonly, shallow) {
|
|
|
1377
1394
|
return (target, key, receiver) => {
|
|
1378
1395
|
if (key === "__v_isReactive") return !isReadonly;
|
|
1379
1396
|
else if (key === "__v_isReadonly") return isReadonly;
|
|
1397
|
+
else if (key === "__v_isShallow") return shallow;
|
|
1380
1398
|
else if (key === "__v_raw") return target;
|
|
1381
1399
|
return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
|
|
1382
1400
|
};
|
|
@@ -2286,8 +2304,9 @@ function getCurrentWatcher() {
|
|
|
2286
2304
|
function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
|
|
2287
2305
|
if (owner) {
|
|
2288
2306
|
const { call } = owner.options;
|
|
2289
|
-
|
|
2290
|
-
|
|
2307
|
+
const cleanup = call ? () => call(cleanupFn, 4) : cleanupFn;
|
|
2308
|
+
if (owner.cb) (owner.cbCleanups || (owner.cbCleanups = [])).push(cleanup);
|
|
2309
|
+
else owner.cleanups[owner.cleanupsLength++] = cleanup;
|
|
2291
2310
|
} else if (!failSilently) warn$2("onWatcherCleanup() was called when there was no active watcher to associate with.");
|
|
2292
2311
|
}
|
|
2293
2312
|
var WatcherEffect = class extends ReactiveEffect {
|
|
@@ -2348,9 +2367,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2348
2367
|
if (once && cb) {
|
|
2349
2368
|
const _cb = cb;
|
|
2350
2369
|
cb = (...args) => {
|
|
2351
|
-
|
|
2352
|
-
|
|
2353
|
-
|
|
2370
|
+
try {
|
|
2371
|
+
return _cb(...args);
|
|
2372
|
+
} finally {
|
|
2373
|
+
this.stop();
|
|
2374
|
+
}
|
|
2354
2375
|
};
|
|
2355
2376
|
}
|
|
2356
2377
|
this.cb = cb;
|
|
@@ -2358,6 +2379,19 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2358
2379
|
this.onTrack = options.onTrack;
|
|
2359
2380
|
this.onTrigger = options.onTrigger;
|
|
2360
2381
|
}
|
|
2382
|
+
cleanupCallback() {
|
|
2383
|
+
const cleanups = this.cbCleanups;
|
|
2384
|
+
if (cleanups) {
|
|
2385
|
+
this.cbCleanups = void 0;
|
|
2386
|
+
for (let i = 0, l = cleanups.length; i < l; i++) cleanups[i]();
|
|
2387
|
+
}
|
|
2388
|
+
}
|
|
2389
|
+
stop() {
|
|
2390
|
+
if (this.active) {
|
|
2391
|
+
super.stop();
|
|
2392
|
+
this.cleanupCallback();
|
|
2393
|
+
}
|
|
2394
|
+
}
|
|
2361
2395
|
run(initialRun = false) {
|
|
2362
2396
|
const oldValue = this.oldValue;
|
|
2363
2397
|
const newValue = this.oldValue = super.run();
|
|
@@ -2365,10 +2399,11 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2365
2399
|
const { immediate, deep, call } = this.options;
|
|
2366
2400
|
if (initialRun && !immediate) return;
|
|
2367
2401
|
if (initialRun || deep || this.forceTrigger || (this.isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
|
|
2368
|
-
cleanup(this);
|
|
2369
2402
|
const currentWatcher = activeWatcher;
|
|
2370
|
-
|
|
2403
|
+
const prevSub = setActiveSub();
|
|
2371
2404
|
try {
|
|
2405
|
+
this.cleanupCallback();
|
|
2406
|
+
activeWatcher = this;
|
|
2372
2407
|
const args = [
|
|
2373
2408
|
newValue,
|
|
2374
2409
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : this.isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2377,6 +2412,7 @@ var WatcherEffect = class extends ReactiveEffect {
|
|
|
2377
2412
|
call ? call(this.cb, 3, args) : this.cb(...args);
|
|
2378
2413
|
} finally {
|
|
2379
2414
|
activeWatcher = currentWatcher;
|
|
2415
|
+
setActiveSub(prevSub);
|
|
2380
2416
|
}
|
|
2381
2417
|
}
|
|
2382
2418
|
}
|
|
@@ -2707,15 +2743,15 @@ function queuePostFlushCb(jobs, id = Infinity) {
|
|
|
2707
2743
|
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
2708
2744
|
queueFlush();
|
|
2709
2745
|
}
|
|
2710
|
-
function flushPreFlushCbs(instance, seen) {
|
|
2746
|
+
function flushPreFlushCbs(instance, minUid, seen) {
|
|
2711
2747
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2712
2748
|
for (let i = flushIndex; i < jobsLength; i++) {
|
|
2713
2749
|
const cb = jobs[i];
|
|
2714
2750
|
if (cb.order & 1 || cb.order === Infinity) continue;
|
|
2715
|
-
if (instance && cb.order !== instance.uid * 2) continue;
|
|
2751
|
+
if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
|
|
2716
2752
|
if (checkRecursiveUpdates(seen, cb)) continue;
|
|
2717
2753
|
jobs.splice(i, 1);
|
|
2718
|
-
i
|
|
2754
|
+
i = instance ? i - 1 : flushIndex - 1;
|
|
2719
2755
|
jobsLength--;
|
|
2720
2756
|
if (cb.flags & 2) cb.flags &= -2;
|
|
2721
2757
|
try {
|
|
@@ -2725,15 +2761,24 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
2725
2761
|
}
|
|
2726
2762
|
}
|
|
2727
2763
|
}
|
|
2728
|
-
function flushPostFlushCbs(seen) {
|
|
2764
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
2729
2765
|
if (postJobs.length) {
|
|
2766
|
+
let cbs = postJobs;
|
|
2767
|
+
if (skip) {
|
|
2768
|
+
cbs = [];
|
|
2769
|
+
let kept = 0;
|
|
2770
|
+
for (let i = 0; i < postJobs.length; i++) {
|
|
2771
|
+
const cb = postJobs[i];
|
|
2772
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
|
|
2773
|
+
else cbs.push(cb);
|
|
2774
|
+
}
|
|
2775
|
+
postJobs.length = kept;
|
|
2776
|
+
} else postJobs = [];
|
|
2730
2777
|
if (activePostJobs) {
|
|
2731
|
-
for (let i = 0; i <
|
|
2732
|
-
postJobs.length = 0;
|
|
2778
|
+
for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
|
|
2733
2779
|
return;
|
|
2734
2780
|
}
|
|
2735
|
-
activePostJobs =
|
|
2736
|
-
postJobs = [];
|
|
2781
|
+
activePostJobs = cbs;
|
|
2737
2782
|
seen = seen || /* @__PURE__ */ new Map();
|
|
2738
2783
|
try {
|
|
2739
2784
|
while (postFlushIndex < activePostJobs.length) {
|
|
@@ -2755,17 +2800,28 @@ function flushPostFlushCbs(seen) {
|
|
|
2755
2800
|
}
|
|
2756
2801
|
let isFlushing = false;
|
|
2757
2802
|
/**
|
|
2803
|
+
* Run a root render, then flush the jobs it is responsible for. A mount or
|
|
2804
|
+
* unmount (`minUid` given) only flushes the jobs of the components it created
|
|
2805
|
+
* and the post cbs it queued, so pre watchers triggered in setup run before
|
|
2806
|
+
* mounted (#5721) while the jobs of other components stay in the queue and
|
|
2807
|
+
* keep their order (#6728). A root update keeps flushing all pending pre jobs
|
|
2808
|
+
* and post cbs, as the jobs of the components it re-renders may predate it.
|
|
2809
|
+
*
|
|
2758
2810
|
* @internal
|
|
2759
2811
|
*/
|
|
2760
|
-
function flushOnAppMount(
|
|
2761
|
-
if (
|
|
2762
|
-
|
|
2763
|
-
|
|
2764
|
-
|
|
2765
|
-
|
|
2766
|
-
|
|
2767
|
-
|
|
2768
|
-
|
|
2812
|
+
function flushOnAppMount(fn, minUid) {
|
|
2813
|
+
if (isFlushing) {
|
|
2814
|
+
fn();
|
|
2815
|
+
return;
|
|
2816
|
+
}
|
|
2817
|
+
const queued = minUid === void 0 ? void 0 : new Set(postJobs);
|
|
2818
|
+
fn();
|
|
2819
|
+
isFlushing = true;
|
|
2820
|
+
try {
|
|
2821
|
+
flushPreFlushCbs(void 0, minUid);
|
|
2822
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
2823
|
+
} finally {
|
|
2824
|
+
isFlushing = false;
|
|
2769
2825
|
}
|
|
2770
2826
|
}
|
|
2771
2827
|
function flushJobs(seen) {
|
|
@@ -3586,7 +3642,7 @@ var RenderWatcherEffect = class extends WatcherEffect {
|
|
|
3586
3642
|
this.flags |= 128;
|
|
3587
3643
|
job.flags |= 2;
|
|
3588
3644
|
}
|
|
3589
|
-
|
|
3645
|
+
job.i = instance;
|
|
3590
3646
|
this.job = job;
|
|
3591
3647
|
}
|
|
3592
3648
|
notify() {
|
|
@@ -3661,6 +3717,16 @@ function createPathGetter(ctx, path) {
|
|
|
3661
3717
|
};
|
|
3662
3718
|
}
|
|
3663
3719
|
//#endregion
|
|
3720
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3721
|
+
/**
|
|
3722
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3723
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3724
|
+
*/
|
|
3725
|
+
let isVaporInteropEnabled = false;
|
|
3726
|
+
function setVaporInteropEnabled() {
|
|
3727
|
+
isVaporInteropEnabled = true;
|
|
3728
|
+
}
|
|
3729
|
+
//#endregion
|
|
3664
3730
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3665
3731
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3666
3732
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3797,7 +3863,11 @@ const TeleportImpl = {
|
|
|
3797
3863
|
hydrate: hydrateTeleport
|
|
3798
3864
|
};
|
|
3799
3865
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3800
|
-
if (moveType === 0)
|
|
3866
|
+
if (moveType === 0) {
|
|
3867
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3868
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3869
|
+
parentAnchor = vnode.targetAnchor;
|
|
3870
|
+
}
|
|
3801
3871
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3802
3872
|
const isReorder = moveType === 2;
|
|
3803
3873
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3916,9 +3986,18 @@ const BaseTransitionPropsValidators = {
|
|
|
3916
3986
|
onAfterAppear: TransitionHookValidator,
|
|
3917
3987
|
onAppearCancelled: TransitionHookValidator
|
|
3918
3988
|
};
|
|
3989
|
+
let isTransitionEnabled = false;
|
|
3990
|
+
function withTransitionEnabled(value) {
|
|
3991
|
+
isTransitionEnabled = true;
|
|
3992
|
+
return value;
|
|
3993
|
+
}
|
|
3919
3994
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3920
3995
|
if (vnode.type === Comment) return true;
|
|
3921
|
-
if (vnode.type ===
|
|
3996
|
+
if (vnode.type === Fragment) {
|
|
3997
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3998
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3999
|
+
}
|
|
4000
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3922
4001
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3923
4002
|
}
|
|
3924
4003
|
const BaseTransitionImpl = {
|
|
@@ -3935,7 +4014,7 @@ const BaseTransitionImpl = {
|
|
|
3935
4014
|
const { mode } = rawProps;
|
|
3936
4015
|
checkTransitionMode(mode);
|
|
3937
4016
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3938
|
-
if (!(instance.
|
|
4017
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3939
4018
|
}) : NOOP);
|
|
3940
4019
|
};
|
|
3941
4020
|
}
|
|
@@ -3956,7 +4035,7 @@ function findNonCommentChild(children) {
|
|
|
3956
4035
|
}
|
|
3957
4036
|
return child;
|
|
3958
4037
|
}
|
|
3959
|
-
const BaseTransition = BaseTransitionImpl;
|
|
4038
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3960
4039
|
function getLeavingNodesForType(state, vnode) {
|
|
3961
4040
|
const { leavingNodes } = state;
|
|
3962
4041
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3979,7 +4058,14 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3979
4058
|
},
|
|
3980
4059
|
earlyRemove: () => {
|
|
3981
4060
|
const leavingVNode = leavingVNodesCache[key];
|
|
3982
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4061
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4062
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4063
|
+
if (!leavingCb) {
|
|
4064
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4065
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4066
|
+
}
|
|
4067
|
+
if (leavingCb) leavingCb();
|
|
4068
|
+
}
|
|
3983
4069
|
},
|
|
3984
4070
|
cloneHooks: (vnode) => {
|
|
3985
4071
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -3987,7 +4073,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3987
4073
|
return hooks;
|
|
3988
4074
|
}
|
|
3989
4075
|
}, props, state, instance);
|
|
3990
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4076
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3991
4077
|
__vapor: true,
|
|
3992
4078
|
props,
|
|
3993
4079
|
state,
|
|
@@ -4164,7 +4250,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
|
|
|
4164
4250
|
function setTransitionHooks(vnode, hooks) {
|
|
4165
4251
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4166
4252
|
vnode.transition = hooks;
|
|
4167
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4253
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4168
4254
|
else {
|
|
4169
4255
|
const subTree = vnode.component.subTree;
|
|
4170
4256
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -4173,7 +4259,13 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4173
4259
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4174
4260
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4175
4261
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
4176
|
-
} else
|
|
4262
|
+
} else {
|
|
4263
|
+
vnode.transition = hooks;
|
|
4264
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4265
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4266
|
+
if (child) setTransitionHooks(child, hooks);
|
|
4267
|
+
}
|
|
4268
|
+
}
|
|
4177
4269
|
return hooks;
|
|
4178
4270
|
}
|
|
4179
4271
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4196,6 +4288,14 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4196
4288
|
function checkTransitionMode(mode) {
|
|
4197
4289
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4198
4290
|
}
|
|
4291
|
+
function getTransitionRoot(vnode) {
|
|
4292
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
4293
|
+
if (vnode.type === Fragment) {
|
|
4294
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4295
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4296
|
+
}
|
|
4297
|
+
if (vnode.type !== Comment) return vnode;
|
|
4298
|
+
}
|
|
4199
4299
|
//#endregion
|
|
4200
4300
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4201
4301
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -4449,7 +4549,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4449
4549
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4450
4550
|
break;
|
|
4451
4551
|
case VaporSlot:
|
|
4452
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4552
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4453
4553
|
break;
|
|
4454
4554
|
default: if (shapeFlag & 1) {
|
|
4455
4555
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
@@ -4581,7 +4681,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4581
4681
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4582
4682
|
const container = parentNode(node);
|
|
4583
4683
|
const first = nextSibling(node);
|
|
4584
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4684
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4585
4685
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4586
4686
|
else {
|
|
4587
4687
|
logMismatchError();
|
|
@@ -4825,14 +4925,20 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4825
4925
|
break;
|
|
4826
4926
|
}
|
|
4827
4927
|
}, opts);
|
|
4828
|
-
|
|
4829
|
-
if (!(el instanceof Element)) return;
|
|
4928
|
+
const observe = (el) => {
|
|
4830
4929
|
if (elementIsVisibleInViewport(el)) {
|
|
4831
4930
|
hydrate();
|
|
4832
4931
|
ob.disconnect();
|
|
4833
4932
|
return false;
|
|
4834
4933
|
}
|
|
4934
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4935
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4936
|
+
}
|
|
4835
4937
|
ob.observe(el);
|
|
4938
|
+
};
|
|
4939
|
+
forEach((el) => {
|
|
4940
|
+
if (!(el instanceof Element)) return;
|
|
4941
|
+
return observe(el);
|
|
4836
4942
|
});
|
|
4837
4943
|
return () => ob.disconnect();
|
|
4838
4944
|
};
|
|
@@ -4982,7 +5088,7 @@ function createAsyncComponentContext(source) {
|
|
|
4982
5088
|
setPendingRequest: (request) => pendingRequest = request
|
|
4983
5089
|
};
|
|
4984
5090
|
}
|
|
4985
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
5091
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
4986
5092
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4987
5093
|
const error = /* @__PURE__ */ ref();
|
|
4988
5094
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -5039,6 +5145,11 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
5039
5145
|
//#endregion
|
|
5040
5146
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
5041
5147
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5148
|
+
let isKeepAliveEnabled = false;
|
|
5149
|
+
function withKeepAliveEnabled(value) {
|
|
5150
|
+
isKeepAliveEnabled = true;
|
|
5151
|
+
return value;
|
|
5152
|
+
}
|
|
5042
5153
|
const KeepAliveImpl = {
|
|
5043
5154
|
name: `KeepAlive`,
|
|
5044
5155
|
__isKeepAlive: true,
|
|
@@ -5094,7 +5205,10 @@ const KeepAliveImpl = {
|
|
|
5094
5205
|
function pruneCacheEntry(key) {
|
|
5095
5206
|
const cached = cache.get(key);
|
|
5096
5207
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
5097
|
-
else if (current)
|
|
5208
|
+
else if (current) {
|
|
5209
|
+
resetShapeFlag(current);
|
|
5210
|
+
if (cached) resetShapeFlag(cached);
|
|
5211
|
+
}
|
|
5098
5212
|
cache.delete(key);
|
|
5099
5213
|
keys.delete(key);
|
|
5100
5214
|
}
|
|
@@ -5184,7 +5298,7 @@ const decorate$2 = (t) => {
|
|
|
5184
5298
|
t.__isBuiltIn = true;
|
|
5185
5299
|
return t;
|
|
5186
5300
|
};
|
|
5187
|
-
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
5301
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
|
|
5188
5302
|
function matches(pattern, name) {
|
|
5189
5303
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
5190
5304
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5647,16 +5761,22 @@ function invokeSlotFallback(fallback, owner) {
|
|
|
5647
5761
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5648
5762
|
if (props == null) props = {};
|
|
5649
5763
|
let slot = slots[name];
|
|
5650
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5764
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
5651
5765
|
if (vaporSlot) {
|
|
5652
5766
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5653
5767
|
ret.vs = {
|
|
5654
5768
|
slot: vaporSlot,
|
|
5769
|
+
name,
|
|
5655
5770
|
outlets: fallback ? [{
|
|
5656
5771
|
fallback,
|
|
5657
5772
|
owner: currentRenderingInstance
|
|
5658
5773
|
}] : void 0
|
|
5659
5774
|
};
|
|
5775
|
+
if (branchKey != null && props.key == null) {
|
|
5776
|
+
ret.vs.props = ret.props;
|
|
5777
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5778
|
+
ret.key = branchKey;
|
|
5779
|
+
}
|
|
5660
5780
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5661
5781
|
return ret;
|
|
5662
5782
|
}
|
|
@@ -5677,7 +5797,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5677
5797
|
try {
|
|
5678
5798
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5679
5799
|
let attached = false;
|
|
5680
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5800
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
5681
5801
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
5682
5802
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5683
5803
|
}
|
|
@@ -5860,6 +5980,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5860
5980
|
const privateAPIs = {
|
|
5861
5981
|
$vnode: (i) => i.vnode,
|
|
5862
5982
|
_self: (i) => i.proxy,
|
|
5983
|
+
_setupProxy: (i) => i.setupState,
|
|
5863
5984
|
_uid: (i) => i.uid,
|
|
5864
5985
|
_data: (i) => i.data,
|
|
5865
5986
|
_isMounted: (i) => i.isMounted,
|
|
@@ -6636,7 +6757,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6636
6757
|
if (options.el) return vm.$mount(options.el);
|
|
6637
6758
|
else return vm;
|
|
6638
6759
|
}
|
|
6639
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6760
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.13`;
|
|
6640
6761
|
Vue.config = singletonApp.config;
|
|
6641
6762
|
Vue.use = (plugin, ...options) => {
|
|
6642
6763
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7454,7 +7575,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7454
7575
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
7455
7576
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7456
7577
|
const key = nextKeys[i];
|
|
7457
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7578
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7458
7579
|
}
|
|
7459
7580
|
return false;
|
|
7460
7581
|
}
|
|
@@ -8000,7 +8121,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8000
8121
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8001
8122
|
break;
|
|
8002
8123
|
case VaporSlot:
|
|
8003
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8124
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8004
8125
|
break;
|
|
8005
8126
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8006
8127
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -8134,7 +8255,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8134
8255
|
let vnodeHook;
|
|
8135
8256
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
8136
8257
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8137
|
-
if (n2.ibu) n2.ibu();
|
|
8258
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
8138
8259
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8139
8260
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
8140
8261
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -8168,9 +8289,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8168
8289
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
8169
8290
|
}
|
|
8170
8291
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
8171
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
8292
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
8172
8293
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8173
|
-
n2.iu && n2.iu();
|
|
8294
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
8174
8295
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8175
8296
|
}, void 0, parentSuspense);
|
|
8176
8297
|
};
|
|
@@ -8178,7 +8299,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8178
8299
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8179
8300
|
const oldVNode = oldChildren[i];
|
|
8180
8301
|
const newVNode = newChildren[i];
|
|
8181
|
-
const
|
|
8302
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8303
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
8182
8304
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
8183
8305
|
}
|
|
8184
8306
|
};
|
|
@@ -8273,6 +8395,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8273
8395
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8274
8396
|
pushWarningContext(n2);
|
|
8275
8397
|
n2.el = n1.el;
|
|
8398
|
+
n2.placeholder = n1.placeholder;
|
|
8276
8399
|
updateComponentPreRender(instance, n2, optimized);
|
|
8277
8400
|
popWarningContext();
|
|
8278
8401
|
return;
|
|
@@ -8282,6 +8405,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8282
8405
|
}
|
|
8283
8406
|
} else {
|
|
8284
8407
|
n2.el = n1.el;
|
|
8408
|
+
n2.placeholder = n1.placeholder;
|
|
8285
8409
|
instance.vnode = n2;
|
|
8286
8410
|
}
|
|
8287
8411
|
};
|
|
@@ -8383,7 +8507,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8383
8507
|
} else next = vnode;
|
|
8384
8508
|
if (bu) invokeArrayFns(bu);
|
|
8385
8509
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8386
|
-
if (next.ibu) next.ibu();
|
|
8510
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
8387
8511
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8388
8512
|
toggleRecurse(instance, true);
|
|
8389
8513
|
startMeasure(instance, `render`);
|
|
@@ -8397,9 +8521,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8397
8521
|
next.el = nextTree.el;
|
|
8398
8522
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8399
8523
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8400
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8524
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
8401
8525
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8402
|
-
next.iu && next.iu();
|
|
8526
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
8403
8527
|
}, void 0, parentSuspense);
|
|
8404
8528
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8405
8529
|
devtoolsComponentUpdated(instance);
|
|
@@ -8552,7 +8676,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8552
8676
|
};
|
|
8553
8677
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8554
8678
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8555
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8679
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
8556
8680
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8557
8681
|
return;
|
|
8558
8682
|
}
|
|
@@ -8596,11 +8720,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8596
8720
|
}
|
|
8597
8721
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8598
8722
|
if (shapeFlag & 256) {
|
|
8599
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8723
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8600
8724
|
else parentComponent.ctx.deactivate(vnode);
|
|
8601
8725
|
return;
|
|
8602
8726
|
}
|
|
8603
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8727
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8604
8728
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8605
8729
|
return;
|
|
8606
8730
|
}
|
|
@@ -8618,7 +8742,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8618
8742
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
8619
8743
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8620
8744
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8621
|
-
if (type === VaporSlot) {
|
|
8745
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
8622
8746
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8623
8747
|
return;
|
|
8624
8748
|
}
|
|
@@ -8633,12 +8757,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8633
8757
|
};
|
|
8634
8758
|
const remove = (vnode) => {
|
|
8635
8759
|
const { type, el, anchor, transition } = vnode;
|
|
8636
|
-
|
|
8637
|
-
|
|
8638
|
-
|
|
8639
|
-
else remove(child);
|
|
8640
|
-
});
|
|
8641
|
-
else removeFragment(el, anchor);
|
|
8760
|
+
const isFragment = type === Fragment;
|
|
8761
|
+
if (isFragment && !transition) {
|
|
8762
|
+
removeFragment(el, anchor);
|
|
8642
8763
|
return;
|
|
8643
8764
|
}
|
|
8644
8765
|
if (type === Static) {
|
|
@@ -8646,8 +8767,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8646
8767
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8647
8768
|
return;
|
|
8648
8769
|
}
|
|
8649
|
-
|
|
8650
|
-
|
|
8770
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
8771
|
+
const performRemove = () => {
|
|
8772
|
+
if (isFragment) {
|
|
8773
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
8774
|
+
} else hostRemove(el);
|
|
8775
|
+
};
|
|
8776
|
+
if (transition) {
|
|
8777
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
8778
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8779
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8780
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8781
|
+
isElement = !!leavingEl;
|
|
8782
|
+
}
|
|
8783
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
8784
|
+
} else performRemove();
|
|
8651
8785
|
};
|
|
8652
8786
|
const removeFragment = (cur, end) => {
|
|
8653
8787
|
let next;
|
|
@@ -8683,7 +8817,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8683
8817
|
};
|
|
8684
8818
|
const getNextHostNode = (vnode) => {
|
|
8685
8819
|
if (vnode.shapeFlag & 6) {
|
|
8686
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8820
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8687
8821
|
return getNextHostNode(vnode.component.subTree);
|
|
8688
8822
|
}
|
|
8689
8823
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -8692,15 +8826,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8692
8826
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
8693
8827
|
};
|
|
8694
8828
|
const render = (vnode, container, namespace) => {
|
|
8695
|
-
|
|
8696
|
-
|
|
8697
|
-
|
|
8698
|
-
|
|
8699
|
-
|
|
8700
|
-
|
|
8701
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8702
|
-
container._vnode = vnode;
|
|
8703
|
-
flushOnAppMount(instance);
|
|
8829
|
+
flushOnAppMount(() => {
|
|
8830
|
+
if (vnode == null) {
|
|
8831
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
8832
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8833
|
+
container._vnode = vnode;
|
|
8834
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
8704
8835
|
};
|
|
8705
8836
|
const internals = {
|
|
8706
8837
|
p: patch,
|
|
@@ -8747,7 +8878,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
8747
8878
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8748
8879
|
}
|
|
8749
8880
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8750
|
-
if (!vapor) {
|
|
8881
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
8751
8882
|
if (allowed) {
|
|
8752
8883
|
effect.flags |= 128;
|
|
8753
8884
|
job.flags |= 2;
|
|
@@ -8859,7 +8990,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
8859
8990
|
currentParent = currentParent.parent;
|
|
8860
8991
|
} else break;
|
|
8861
8992
|
}
|
|
8862
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8993
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8863
8994
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8864
8995
|
return inheritedScopeIds;
|
|
8865
8996
|
}
|
|
@@ -8872,8 +9003,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
8872
9003
|
//#endregion
|
|
8873
9004
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
8874
9005
|
const isSuspense = (type) => type.__isSuspense;
|
|
9006
|
+
let isSuspenseEnabled = false;
|
|
9007
|
+
function withSuspenseEnabled(value) {
|
|
9008
|
+
isSuspenseEnabled = true;
|
|
9009
|
+
return value;
|
|
9010
|
+
}
|
|
8875
9011
|
let suspenseId = 0;
|
|
8876
|
-
const Suspense = {
|
|
9012
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
8877
9013
|
name: "Suspense",
|
|
8878
9014
|
__isSuspense: true,
|
|
8879
9015
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -8890,7 +9026,7 @@ const Suspense = {
|
|
|
8890
9026
|
},
|
|
8891
9027
|
hydrate: hydrateSuspense,
|
|
8892
9028
|
normalize: normalizeSuspenseChildren
|
|
8893
|
-
};
|
|
9029
|
+
});
|
|
8894
9030
|
function triggerEvent(vnode, name) {
|
|
8895
9031
|
const eventListener = vnode.props && vnode.props[name];
|
|
8896
9032
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -9093,13 +9229,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9093
9229
|
registerDep(instance, onResolve) {
|
|
9094
9230
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9095
9231
|
if (isInPendingSuspense) suspense.deps++;
|
|
9096
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
9097
9232
|
instance.asyncDep.catch((err) => {
|
|
9098
9233
|
handleError(err, instance, 0);
|
|
9099
9234
|
}).then((asyncSetupResult) => {
|
|
9100
9235
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
9101
9236
|
setCurrentInstance(null, void 0);
|
|
9102
|
-
if (
|
|
9237
|
+
if (!instance.scope.active) {
|
|
9103
9238
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9104
9239
|
return;
|
|
9105
9240
|
}
|
|
@@ -9455,7 +9590,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9455
9590
|
ctx: vnode.ctx,
|
|
9456
9591
|
ce: vnode.ce,
|
|
9457
9592
|
vi: vnode.vi,
|
|
9458
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
9593
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
9459
9594
|
vb: vnode.vb,
|
|
9460
9595
|
ibu: vnode.ibu,
|
|
9461
9596
|
iu: vnode.iu,
|
|
@@ -9465,13 +9600,29 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9465
9600
|
defineLegacyVNodeProperties(cloned);
|
|
9466
9601
|
return cloned;
|
|
9467
9602
|
}
|
|
9468
|
-
function cloneVaporSlotMeta(vnode) {
|
|
9603
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
9469
9604
|
const vaporSlot = vnode.vs;
|
|
9470
9605
|
if (!vaporSlot) return vaporSlot;
|
|
9471
9606
|
const cloned = {
|
|
9472
9607
|
slot: vaporSlot.slot,
|
|
9473
|
-
|
|
9608
|
+
name: vaporSlot.name,
|
|
9609
|
+
outlets: vaporSlot.outlets,
|
|
9610
|
+
props: vaporSlot.props,
|
|
9611
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
9612
|
+
group: vaporSlot.group
|
|
9474
9613
|
};
|
|
9614
|
+
const attrs = cloned.attrs;
|
|
9615
|
+
if (extraProps && vaporSlot.props) {
|
|
9616
|
+
let extraSlotProps;
|
|
9617
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
9618
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
9619
|
+
extraSlotProps[key] = extraProps[key];
|
|
9620
|
+
}
|
|
9621
|
+
if (extraSlotProps) {
|
|
9622
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
9623
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9624
|
+
}
|
|
9625
|
+
}
|
|
9475
9626
|
if (vnode.el) {
|
|
9476
9627
|
cloned.state = vaporSlot.state;
|
|
9477
9628
|
cloned.ref = vaporSlot.ref;
|
|
@@ -9663,6 +9814,9 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
9663
9814
|
//#region packages/runtime-core/src/component.ts
|
|
9664
9815
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9665
9816
|
let uid = 0;
|
|
9817
|
+
function getNextUid() {
|
|
9818
|
+
return uid;
|
|
9819
|
+
}
|
|
9666
9820
|
function createComponentInstance(vnode, parent, suspense) {
|
|
9667
9821
|
const type = vnode.type;
|
|
9668
9822
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -9749,7 +9903,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
9749
9903
|
isSSR && setInSSRSetupState(isSSR);
|
|
9750
9904
|
const { props, children, vi } = instance.vnode;
|
|
9751
9905
|
const isStateful = isStatefulComponent(instance);
|
|
9752
|
-
if (vi) vi(instance);
|
|
9906
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
9753
9907
|
else {
|
|
9754
9908
|
initProps(instance, props, isStateful, isSSR);
|
|
9755
9909
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -10173,7 +10327,7 @@ function isMemoSame(cached, memo) {
|
|
|
10173
10327
|
}
|
|
10174
10328
|
//#endregion
|
|
10175
10329
|
//#region packages/runtime-core/src/index.ts
|
|
10176
|
-
const version = "3.6.0-rc.
|
|
10330
|
+
const version = "3.6.0-rc.13";
|
|
10177
10331
|
const warn = warn$1;
|
|
10178
10332
|
/**
|
|
10179
10333
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10625,7 +10779,7 @@ function patchStyle(el, prev, next) {
|
|
|
10625
10779
|
else el.removeAttribute("style");
|
|
10626
10780
|
}
|
|
10627
10781
|
if (vShowOriginalDisplay in el) {
|
|
10628
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10782
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10629
10783
|
if (el[vShowHidden]) style.display = "none";
|
|
10630
10784
|
}
|
|
10631
10785
|
}
|
|
@@ -10955,7 +11109,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10955
11109
|
this._resolveProps(def);
|
|
10956
11110
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
10957
11111
|
else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
10958
|
-
this._mountComponent(def);
|
|
11112
|
+
if (this._connected) this._mountComponent(def);
|
|
10959
11113
|
};
|
|
10960
11114
|
const asyncDef = this._def.__asyncLoader;
|
|
10961
11115
|
if (asyncDef) {
|
|
@@ -11273,6 +11427,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
11273
11427
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11274
11428
|
const moveCbKey = Symbol("_moveCb");
|
|
11275
11429
|
const enterCbKey = Symbol("_enterCb");
|
|
11430
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
11276
11431
|
/**
|
|
11277
11432
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
11278
11433
|
* so that it can be annotated as pure
|
|
@@ -11282,7 +11437,7 @@ const decorate = (t) => {
|
|
|
11282
11437
|
t.__isBuiltIn = true;
|
|
11283
11438
|
return t;
|
|
11284
11439
|
};
|
|
11285
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
11440
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
11286
11441
|
name: "TransitionGroup",
|
|
11287
11442
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
11288
11443
|
tag: String,
|
|
@@ -11291,17 +11446,31 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11291
11446
|
setup(props, { slots }) {
|
|
11292
11447
|
const instance = getCurrentInstance();
|
|
11293
11448
|
const state = useTransitionState();
|
|
11449
|
+
const group = {
|
|
11450
|
+
props: {},
|
|
11451
|
+
state,
|
|
11452
|
+
instance
|
|
11453
|
+
};
|
|
11294
11454
|
let prevChildren;
|
|
11295
11455
|
let children;
|
|
11456
|
+
let origins;
|
|
11457
|
+
let moves;
|
|
11458
|
+
const willMove = () => {
|
|
11459
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
11460
|
+
return moves;
|
|
11461
|
+
};
|
|
11296
11462
|
onUpdated(() => {
|
|
11297
|
-
|
|
11298
|
-
|
|
11299
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
11463
|
+
pendingGroups.delete(instance);
|
|
11464
|
+
if (!willMove()) {
|
|
11300
11465
|
prevChildren = [];
|
|
11466
|
+
origins = void 0;
|
|
11301
11467
|
return;
|
|
11302
11468
|
}
|
|
11469
|
+
const moveClass = resolveMoveClass(props);
|
|
11303
11470
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
11304
|
-
|
|
11471
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
11472
|
+
origins = void 0;
|
|
11473
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
11305
11474
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11306
11475
|
forceReflow(instance.vnode.el);
|
|
11307
11476
|
movedChildren.forEach((c) => {
|
|
@@ -11312,34 +11481,51 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11312
11481
|
});
|
|
11313
11482
|
return () => {
|
|
11314
11483
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
11315
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
11484
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
11316
11485
|
let tag = rawProps.tag || Fragment;
|
|
11317
11486
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11318
11487
|
prevChildren = [];
|
|
11488
|
+
moves = void 0;
|
|
11319
11489
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11320
11490
|
const child = children[i];
|
|
11321
11491
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
11322
11492
|
prevChildren.push(child);
|
|
11323
11493
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11324
11494
|
positionMap.set(child, getPosition(child.el));
|
|
11325
|
-
}
|
|
11495
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
11496
|
+
const row = { el };
|
|
11497
|
+
prevChildren.push(row);
|
|
11498
|
+
positionMap.set(row, getPosition(el));
|
|
11499
|
+
});
|
|
11326
11500
|
}
|
|
11327
11501
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
11328
11502
|
for (let i = 0; i < children.length; i++) {
|
|
11329
11503
|
const child = children[i];
|
|
11330
|
-
if (child.
|
|
11504
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
11505
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11331
11506
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11332
11507
|
}
|
|
11508
|
+
if (prevChildren.length) {
|
|
11509
|
+
const root = instance.vnode.el;
|
|
11510
|
+
origins = getOrigins(instance, root);
|
|
11511
|
+
pendingGroups.set(instance, {
|
|
11512
|
+
root,
|
|
11513
|
+
willMove
|
|
11514
|
+
});
|
|
11515
|
+
}
|
|
11333
11516
|
return createVNode(tag, null, children);
|
|
11334
11517
|
};
|
|
11335
11518
|
}
|
|
11336
|
-
});
|
|
11519
|
+
}));
|
|
11337
11520
|
function callPendingCbs(el) {
|
|
11338
11521
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11339
11522
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
11340
11523
|
}
|
|
11341
|
-
function
|
|
11342
|
-
|
|
11524
|
+
function resolveMoveClass(props) {
|
|
11525
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
11526
|
+
}
|
|
11527
|
+
function recordPosition(c, shift) {
|
|
11528
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
11343
11529
|
}
|
|
11344
11530
|
function applyTranslation(c) {
|
|
11345
11531
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -11364,13 +11550,36 @@ function baseApplyTranslation(oldPos, newPos, el) {
|
|
|
11364
11550
|
}
|
|
11365
11551
|
return false;
|
|
11366
11552
|
}
|
|
11367
|
-
function getPosition(el) {
|
|
11553
|
+
function getPosition(el, shift) {
|
|
11368
11554
|
const rect = el.getBoundingClientRect();
|
|
11369
11555
|
return {
|
|
11370
|
-
left: rect.left,
|
|
11371
|
-
top: rect.top
|
|
11556
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
11557
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
11372
11558
|
};
|
|
11373
11559
|
}
|
|
11560
|
+
function getOrigins(instance, root) {
|
|
11561
|
+
let origins;
|
|
11562
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
11563
|
+
const pending = pendingGroups.get(group);
|
|
11564
|
+
if (pending) {
|
|
11565
|
+
const item = findItem(pending.root, root);
|
|
11566
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
11567
|
+
item,
|
|
11568
|
+
willMove: pending.willMove
|
|
11569
|
+
}));
|
|
11570
|
+
}
|
|
11571
|
+
}
|
|
11572
|
+
return origins;
|
|
11573
|
+
}
|
|
11574
|
+
function findItem(root, node) {
|
|
11575
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
11576
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
11577
|
+
if (node && node.nodeType === 1) return node;
|
|
11578
|
+
}
|
|
11579
|
+
function getOriginShift(origins, root) {
|
|
11580
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
11581
|
+
return origin && getPosition(origin.item, origin);
|
|
11582
|
+
}
|
|
11374
11583
|
function hasCSSTransform(el, root, moveClass) {
|
|
11375
11584
|
const clone = el.cloneNode();
|
|
11376
11585
|
const _vtc = el[vtcKey];
|
|
@@ -11451,7 +11660,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
|
11451
11660
|
if (e.target.composing) return;
|
|
11452
11661
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
11453
11662
|
});
|
|
11454
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
11663
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
11455
11664
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
11456
11665
|
});
|
|
11457
11666
|
if (!lazy) {
|
|
@@ -11831,6 +12040,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11831
12040
|
initCustomFormatter: () => initCustomFormatter,
|
|
11832
12041
|
initDirectivesForSSR: () => initDirectivesForSSR,
|
|
11833
12042
|
inject: () => inject,
|
|
12043
|
+
isKeepAliveEnabled: () => isKeepAliveEnabled,
|
|
11834
12044
|
isMemoSame: () => isMemoSame,
|
|
11835
12045
|
isProxy: () => isProxy,
|
|
11836
12046
|
isReactive: () => isReactive,
|
|
@@ -11838,7 +12048,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11838
12048
|
isRef: () => isRef,
|
|
11839
12049
|
isRuntimeOnly: () => isRuntimeOnly,
|
|
11840
12050
|
isShallow: () => isShallow,
|
|
12051
|
+
isSuspenseEnabled: () => isSuspenseEnabled,
|
|
12052
|
+
isTransitionEnabled: () => isTransitionEnabled,
|
|
11841
12053
|
isVNode: () => isVNode,
|
|
12054
|
+
isVaporInteropEnabled: () => isVaporInteropEnabled,
|
|
11842
12055
|
markRaw: () => markRaw,
|
|
11843
12056
|
mergeDefaults: () => mergeDefaults,
|
|
11844
12057
|
mergeModels: () => mergeModels,
|
|
@@ -11885,6 +12098,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11885
12098
|
setDevtoolsHook: () => setDevtoolsHook,
|
|
11886
12099
|
setIsHydratingEnabled: () => setIsHydratingEnabled,
|
|
11887
12100
|
setTransitionHooks: () => setTransitionHooks,
|
|
12101
|
+
setVaporInteropEnabled: () => setVaporInteropEnabled,
|
|
11888
12102
|
shallowReactive: () => shallowReactive,
|
|
11889
12103
|
shallowReadonly: () => shallowReadonly,
|
|
11890
12104
|
shallowRef: () => shallowRef,
|
|
@@ -11929,10 +12143,13 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11929
12143
|
withCtx: () => withCtx,
|
|
11930
12144
|
withDefaults: () => withDefaults,
|
|
11931
12145
|
withDirectives: () => withDirectives,
|
|
12146
|
+
withKeepAliveEnabled: () => withKeepAliveEnabled,
|
|
11932
12147
|
withKeys: () => withKeys,
|
|
11933
12148
|
withMemo: () => withMemo,
|
|
11934
12149
|
withModifiers: () => withModifiers,
|
|
11935
|
-
withScopeId: () => withScopeId
|
|
12150
|
+
withScopeId: () => withScopeId,
|
|
12151
|
+
withSuspenseEnabled: () => withSuspenseEnabled,
|
|
12152
|
+
withTransitionEnabled: () => withTransitionEnabled
|
|
11936
12153
|
});
|
|
11937
12154
|
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
11938
12155
|
let renderer;
|
|
@@ -13655,7 +13872,7 @@ const errorMessages = {
|
|
|
13655
13872
|
[41]: `v-model is missing expression.`,
|
|
13656
13873
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
13657
13874
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13658
|
-
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.`,
|
|
13875
|
+
[44]: `v-model cannot be used on a prop, because local prop bindings are not writable.\nUse a v-bind binding combined with a v-on listener that emits update:x event instead.\nFor props declared with defineModel(), assign the returned ref to a variable and use v-model on that variable.`,
|
|
13659
13876
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
13660
13877
|
[46]: `Error parsing JavaScript expression: `,
|
|
13661
13878
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -15982,7 +16199,11 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15982
16199
|
]),
|
|
15983
16200
|
createCompoundExpression([
|
|
15984
16201
|
`if (_cached && _cached.el`,
|
|
15985
|
-
...keyExp ? [
|
|
16202
|
+
...keyExp ? [
|
|
16203
|
+
` && _cached.key === (`,
|
|
16204
|
+
keyExp,
|
|
16205
|
+
`)`
|
|
16206
|
+
] : [],
|
|
15986
16207
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
15987
16208
|
]),
|
|
15988
16209
|
createCompoundExpression([`const _item = `, childBlock]),
|
|
@@ -17467,7 +17688,7 @@ function stringifyNode(node, context) {
|
|
|
17467
17688
|
}
|
|
17468
17689
|
function stringifyElement(node, context) {
|
|
17469
17690
|
let res = `<${node.tag}`;
|
|
17470
|
-
let innerHTML =
|
|
17691
|
+
let innerHTML = void 0;
|
|
17471
17692
|
for (let i = 0; i < node.props.length; i++) {
|
|
17472
17693
|
const p = node.props[i];
|
|
17473
17694
|
if (p.type === 6) {
|
|
@@ -17489,13 +17710,15 @@ function stringifyElement(node, context) {
|
|
|
17489
17710
|
else if (arg === "style") evaluated = stringifyStyle(normalizeStyle(evaluated));
|
|
17490
17711
|
res += ` ${p.arg.content}="${escapeHtml(evaluated)}"`;
|
|
17491
17712
|
}
|
|
17492
|
-
} else if (p.name === "html")
|
|
17493
|
-
|
|
17713
|
+
} else if (p.name === "html") {
|
|
17714
|
+
var _evaluateConstant;
|
|
17715
|
+
innerHTML = (_evaluateConstant = evaluateConstant(p.exp)) !== null && _evaluateConstant !== void 0 ? _evaluateConstant : "";
|
|
17716
|
+
} else if (p.name === "text") innerHTML = escapeHtml(toDisplayString(evaluateConstant(p.exp)));
|
|
17494
17717
|
}
|
|
17495
17718
|
}
|
|
17496
17719
|
if (context.scopeId) res += ` ${context.scopeId}`;
|
|
17497
17720
|
res += `>`;
|
|
17498
|
-
if (innerHTML) res += innerHTML;
|
|
17721
|
+
if (innerHTML !== void 0) res += innerHTML;
|
|
17499
17722
|
else for (let i = 0; i < node.children.length; i++) res += stringifyNode(node.children[i], context);
|
|
17500
17723
|
if (!isVoidTag(node.tag)) res += `</${node.tag}>`;
|
|
17501
17724
|
return res;
|
|
@@ -17722,7 +17945,11 @@ const validateHtmlNesting = (node, context) => {
|
|
|
17722
17945
|
};
|
|
17723
17946
|
//#endregion
|
|
17724
17947
|
//#region packages/compiler-dom/src/index.ts
|
|
17725
|
-
const DOMNodeTransforms = [
|
|
17948
|
+
const DOMNodeTransforms = [
|
|
17949
|
+
transformStyle,
|
|
17950
|
+
transformTransition,
|
|
17951
|
+
...[validateHtmlNesting]
|
|
17952
|
+
];
|
|
17726
17953
|
const DOMDirectiveTransforms = {
|
|
17727
17954
|
cloak: noopDirectiveTransform,
|
|
17728
17955
|
html: transformVHtml,
|