@vue/compat 3.6.0-rc.10 → 3.6.0-rc.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/vue-compat.d.ts +9 -1
- package/dist/vue.cjs.js +273 -89
- package/dist/vue.cjs.prod.js +305 -86
- package/dist/vue.esm-browser.js +267 -85
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +288 -92
- package/dist/vue.global.js +267 -85
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +267 -85
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +288 -92
- package/dist/vue.runtime.global.js +267 -85
- 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.12
|
|
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() {
|
|
@@ -3797,7 +3853,11 @@ const TeleportImpl = {
|
|
|
3797
3853
|
hydrate: hydrateTeleport
|
|
3798
3854
|
};
|
|
3799
3855
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
3800
|
-
if (moveType === 0)
|
|
3856
|
+
if (moveType === 0) {
|
|
3857
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
3858
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
3859
|
+
parentAnchor = vnode.targetAnchor;
|
|
3860
|
+
}
|
|
3801
3861
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
3802
3862
|
const isReorder = moveType === 2;
|
|
3803
3863
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -3916,10 +3976,15 @@ const BaseTransitionPropsValidators = {
|
|
|
3916
3976
|
onAfterAppear: TransitionHookValidator,
|
|
3917
3977
|
onAppearCancelled: TransitionHookValidator
|
|
3918
3978
|
};
|
|
3919
|
-
|
|
3920
|
-
|
|
3921
|
-
|
|
3922
|
-
|
|
3979
|
+
function isEmptyTransitionChild(vnode, instance) {
|
|
3980
|
+
if (vnode.type === Comment) return true;
|
|
3981
|
+
if (vnode.type === Fragment) {
|
|
3982
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3983
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
3984
|
+
}
|
|
3985
|
+
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3986
|
+
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3987
|
+
}
|
|
3923
3988
|
const BaseTransitionImpl = {
|
|
3924
3989
|
name: `BaseTransition`,
|
|
3925
3990
|
props: BaseTransitionPropsValidators,
|
|
@@ -3968,7 +4033,7 @@ function getLeavingNodesForType(state, vnode) {
|
|
|
3968
4033
|
function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
3969
4034
|
const key = String(vnode.key);
|
|
3970
4035
|
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
3971
|
-
|
|
4036
|
+
const hooks = baseResolveTransitionHooks({
|
|
3972
4037
|
isLeaving: () => leavingVNodesCache[key] === vnode,
|
|
3973
4038
|
setLeavingNodeCache: () => {
|
|
3974
4039
|
leavingVNodesCache[key] = vnode;
|
|
@@ -3978,7 +4043,14 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3978
4043
|
},
|
|
3979
4044
|
earlyRemove: () => {
|
|
3980
4045
|
const leavingVNode = leavingVNodesCache[key];
|
|
3981
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
4046
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
4047
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
4048
|
+
if (!leavingCb) {
|
|
4049
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
4050
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
4051
|
+
}
|
|
4052
|
+
if (leavingCb) leavingCb();
|
|
4053
|
+
}
|
|
3982
4054
|
},
|
|
3983
4055
|
cloneHooks: (vnode) => {
|
|
3984
4056
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -3986,6 +4058,13 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3986
4058
|
return hooks;
|
|
3987
4059
|
}
|
|
3988
4060
|
}, props, state, instance);
|
|
4061
|
+
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4062
|
+
__vapor: true,
|
|
4063
|
+
props,
|
|
4064
|
+
state,
|
|
4065
|
+
instance
|
|
4066
|
+
});
|
|
4067
|
+
return hooks;
|
|
3989
4068
|
}
|
|
3990
4069
|
function baseResolveTransitionHooks(context, props, state, instance) {
|
|
3991
4070
|
const { isLeaving, setLeavingNodeCache, unsetLeavingNodeCache, earlyRemove, cloneHooks } = context;
|
|
@@ -4101,7 +4180,7 @@ function prepareTransitionSwitch(previous, next, props, state, instance, resumeA
|
|
|
4101
4180
|
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
4102
4181
|
const mode = props.mode;
|
|
4103
4182
|
const previousInner = previous && getInnerChild$1(previous);
|
|
4104
|
-
if (previous && previousInner &&
|
|
4183
|
+
if (previous && previousInner && !isSameVNodeType(previousInner, nextInner) && !isEmptyTransitionChild(previousInner, instance)) {
|
|
4105
4184
|
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
4106
4185
|
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
4107
4186
|
}
|
|
@@ -4165,7 +4244,13 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
4165
4244
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
4166
4245
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
4167
4246
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
4168
|
-
} else
|
|
4247
|
+
} else {
|
|
4248
|
+
vnode.transition = hooks;
|
|
4249
|
+
if (vnode.type === Fragment && isArray(vnode.children)) {
|
|
4250
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
4251
|
+
if (child) setTransitionHooks(child, hooks);
|
|
4252
|
+
}
|
|
4253
|
+
}
|
|
4169
4254
|
return hooks;
|
|
4170
4255
|
}
|
|
4171
4256
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -4188,6 +4273,14 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
4188
4273
|
function checkTransitionMode(mode) {
|
|
4189
4274
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4190
4275
|
}
|
|
4276
|
+
function getTransitionRoot(vnode) {
|
|
4277
|
+
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4278
|
+
if (vnode.type === Fragment) {
|
|
4279
|
+
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4280
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
4281
|
+
}
|
|
4282
|
+
if (vnode.type !== Comment) return vnode;
|
|
4283
|
+
}
|
|
4191
4284
|
//#endregion
|
|
4192
4285
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
4193
4286
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -4817,14 +4910,20 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
4817
4910
|
break;
|
|
4818
4911
|
}
|
|
4819
4912
|
}, opts);
|
|
4820
|
-
|
|
4821
|
-
if (!(el instanceof Element)) return;
|
|
4913
|
+
const observe = (el) => {
|
|
4822
4914
|
if (elementIsVisibleInViewport(el)) {
|
|
4823
4915
|
hydrate();
|
|
4824
4916
|
ob.disconnect();
|
|
4825
4917
|
return false;
|
|
4826
4918
|
}
|
|
4919
|
+
if (getComputedStyle(el).display === "contents") {
|
|
4920
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
4921
|
+
}
|
|
4827
4922
|
ob.observe(el);
|
|
4923
|
+
};
|
|
4924
|
+
forEach((el) => {
|
|
4925
|
+
if (!(el instanceof Element)) return;
|
|
4926
|
+
return observe(el);
|
|
4828
4927
|
});
|
|
4829
4928
|
return () => ob.disconnect();
|
|
4830
4929
|
};
|
|
@@ -5086,7 +5185,10 @@ const KeepAliveImpl = {
|
|
|
5086
5185
|
function pruneCacheEntry(key) {
|
|
5087
5186
|
const cached = cache.get(key);
|
|
5088
5187
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
5089
|
-
else if (current)
|
|
5188
|
+
else if (current) {
|
|
5189
|
+
resetShapeFlag(current);
|
|
5190
|
+
if (cached) resetShapeFlag(cached);
|
|
5191
|
+
}
|
|
5090
5192
|
cache.delete(key);
|
|
5091
5193
|
keys.delete(key);
|
|
5092
5194
|
}
|
|
@@ -5649,6 +5751,11 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5649
5751
|
owner: currentRenderingInstance
|
|
5650
5752
|
}] : void 0
|
|
5651
5753
|
};
|
|
5754
|
+
if (branchKey != null && props.key == null) {
|
|
5755
|
+
ret.vs.props = ret.props;
|
|
5756
|
+
ret.props = extend({}, ret.props, { key: branchKey });
|
|
5757
|
+
ret.key = branchKey;
|
|
5758
|
+
}
|
|
5652
5759
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
5653
5760
|
return ret;
|
|
5654
5761
|
}
|
|
@@ -5852,6 +5959,7 @@ function installCompatInstanceProperties(map) {
|
|
|
5852
5959
|
const privateAPIs = {
|
|
5853
5960
|
$vnode: (i) => i.vnode,
|
|
5854
5961
|
_self: (i) => i.proxy,
|
|
5962
|
+
_setupProxy: (i) => i.setupState,
|
|
5855
5963
|
_uid: (i) => i.uid,
|
|
5856
5964
|
_data: (i) => i.data,
|
|
5857
5965
|
_isMounted: (i) => i.isMounted,
|
|
@@ -6628,7 +6736,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6628
6736
|
if (options.el) return vm.$mount(options.el);
|
|
6629
6737
|
else return vm;
|
|
6630
6738
|
}
|
|
6631
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6739
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.12`;
|
|
6632
6740
|
Vue.config = singletonApp.config;
|
|
6633
6741
|
Vue.use = (plugin, ...options) => {
|
|
6634
6742
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -7446,7 +7554,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
7446
7554
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
7447
7555
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
7448
7556
|
const key = nextKeys[i];
|
|
7449
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7557
|
+
if (!hasOwn(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
7450
7558
|
}
|
|
7451
7559
|
return false;
|
|
7452
7560
|
}
|
|
@@ -8170,7 +8278,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8170
8278
|
for (let i = 0; i < newChildren.length; i++) {
|
|
8171
8279
|
const oldVNode = oldChildren[i];
|
|
8172
8280
|
const newVNode = newChildren[i];
|
|
8173
|
-
const
|
|
8281
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
8282
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
8174
8283
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
8175
8284
|
}
|
|
8176
8285
|
};
|
|
@@ -8265,6 +8374,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8265
8374
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
8266
8375
|
pushWarningContext(n2);
|
|
8267
8376
|
n2.el = n1.el;
|
|
8377
|
+
n2.placeholder = n1.placeholder;
|
|
8268
8378
|
updateComponentPreRender(instance, n2, optimized);
|
|
8269
8379
|
popWarningContext();
|
|
8270
8380
|
return;
|
|
@@ -8274,6 +8384,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8274
8384
|
}
|
|
8275
8385
|
} else {
|
|
8276
8386
|
n2.el = n1.el;
|
|
8387
|
+
n2.placeholder = n1.placeholder;
|
|
8277
8388
|
instance.vnode = n2;
|
|
8278
8389
|
}
|
|
8279
8390
|
};
|
|
@@ -8625,12 +8736,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8625
8736
|
};
|
|
8626
8737
|
const remove = (vnode) => {
|
|
8627
8738
|
const { type, el, anchor, transition } = vnode;
|
|
8628
|
-
|
|
8629
|
-
|
|
8630
|
-
|
|
8631
|
-
else remove(child);
|
|
8632
|
-
});
|
|
8633
|
-
else removeFragment(el, anchor);
|
|
8739
|
+
const isFragment = type === Fragment;
|
|
8740
|
+
if (isFragment && !transition) {
|
|
8741
|
+
removeFragment(el, anchor);
|
|
8634
8742
|
return;
|
|
8635
8743
|
}
|
|
8636
8744
|
if (type === Static) {
|
|
@@ -8638,8 +8746,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8638
8746
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
8639
8747
|
return;
|
|
8640
8748
|
}
|
|
8641
|
-
|
|
8642
|
-
|
|
8749
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
8750
|
+
const performRemove = () => {
|
|
8751
|
+
if (isFragment) {
|
|
8752
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
8753
|
+
} else hostRemove(el);
|
|
8754
|
+
};
|
|
8755
|
+
if (transition) {
|
|
8756
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
8757
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8758
|
+
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8759
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8760
|
+
isElement = !!leavingEl;
|
|
8761
|
+
}
|
|
8762
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
8763
|
+
} else performRemove();
|
|
8643
8764
|
};
|
|
8644
8765
|
const removeFragment = (cur, end) => {
|
|
8645
8766
|
let next;
|
|
@@ -8684,15 +8805,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8684
8805
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
8685
8806
|
};
|
|
8686
8807
|
const render = (vnode, container, namespace) => {
|
|
8687
|
-
|
|
8688
|
-
|
|
8689
|
-
|
|
8690
|
-
|
|
8691
|
-
|
|
8692
|
-
|
|
8693
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8694
|
-
container._vnode = vnode;
|
|
8695
|
-
flushOnAppMount(instance);
|
|
8808
|
+
flushOnAppMount(() => {
|
|
8809
|
+
if (vnode == null) {
|
|
8810
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
8811
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
8812
|
+
container._vnode = vnode;
|
|
8813
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
8696
8814
|
};
|
|
8697
8815
|
const internals = {
|
|
8698
8816
|
p: patch,
|
|
@@ -9085,13 +9203,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
9085
9203
|
registerDep(instance, onResolve) {
|
|
9086
9204
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
9087
9205
|
if (isInPendingSuspense) suspense.deps++;
|
|
9088
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
9089
9206
|
instance.asyncDep.catch((err) => {
|
|
9090
9207
|
handleError(err, instance, 0);
|
|
9091
9208
|
}).then((asyncSetupResult) => {
|
|
9092
9209
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
9093
9210
|
setCurrentInstance(null, void 0);
|
|
9094
|
-
if (
|
|
9211
|
+
if (!instance.scope.active) {
|
|
9095
9212
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
9096
9213
|
return;
|
|
9097
9214
|
}
|
|
@@ -9447,7 +9564,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9447
9564
|
ctx: vnode.ctx,
|
|
9448
9565
|
ce: vnode.ce,
|
|
9449
9566
|
vi: vnode.vi,
|
|
9450
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
9567
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
9451
9568
|
vb: vnode.vb,
|
|
9452
9569
|
ibu: vnode.ibu,
|
|
9453
9570
|
iu: vnode.iu,
|
|
@@ -9457,13 +9574,22 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9457
9574
|
defineLegacyVNodeProperties(cloned);
|
|
9458
9575
|
return cloned;
|
|
9459
9576
|
}
|
|
9460
|
-
function cloneVaporSlotMeta(vnode) {
|
|
9577
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
9461
9578
|
const vaporSlot = vnode.vs;
|
|
9462
9579
|
if (!vaporSlot) return vaporSlot;
|
|
9463
9580
|
const cloned = {
|
|
9464
9581
|
slot: vaporSlot.slot,
|
|
9465
|
-
outlets: vaporSlot.outlets
|
|
9582
|
+
outlets: vaporSlot.outlets,
|
|
9583
|
+
props: vaporSlot.props
|
|
9466
9584
|
};
|
|
9585
|
+
if (vaporSlot.props && extraProps) {
|
|
9586
|
+
let extraSlotProps;
|
|
9587
|
+
for (const key in extraProps) if (key !== "key") {
|
|
9588
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
9589
|
+
extraSlotProps[key] = extraProps[key];
|
|
9590
|
+
}
|
|
9591
|
+
if (extraSlotProps) cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9592
|
+
}
|
|
9467
9593
|
if (vnode.el) {
|
|
9468
9594
|
cloned.state = vaporSlot.state;
|
|
9469
9595
|
cloned.ref = vaporSlot.ref;
|
|
@@ -9655,6 +9781,9 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
9655
9781
|
//#region packages/runtime-core/src/component.ts
|
|
9656
9782
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
9657
9783
|
let uid = 0;
|
|
9784
|
+
function getNextUid() {
|
|
9785
|
+
return uid;
|
|
9786
|
+
}
|
|
9658
9787
|
function createComponentInstance(vnode, parent, suspense) {
|
|
9659
9788
|
const type = vnode.type;
|
|
9660
9789
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -10165,7 +10294,7 @@ function isMemoSame(cached, memo) {
|
|
|
10165
10294
|
}
|
|
10166
10295
|
//#endregion
|
|
10167
10296
|
//#region packages/runtime-core/src/index.ts
|
|
10168
|
-
const version = "3.6.0-rc.
|
|
10297
|
+
const version = "3.6.0-rc.12";
|
|
10169
10298
|
const warn = warn$1;
|
|
10170
10299
|
/**
|
|
10171
10300
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10617,7 +10746,7 @@ function patchStyle(el, prev, next) {
|
|
|
10617
10746
|
else el.removeAttribute("style");
|
|
10618
10747
|
}
|
|
10619
10748
|
if (vShowOriginalDisplay in el) {
|
|
10620
|
-
el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10749
|
+
if (!isCssString || prev !== next) el[vShowOriginalDisplay] = hasControlledDisplay ? style.display : "";
|
|
10621
10750
|
if (el[vShowHidden]) style.display = "none";
|
|
10622
10751
|
}
|
|
10623
10752
|
}
|
|
@@ -10947,7 +11076,7 @@ var VueElementBase = class VueElementBase extends BaseClass {
|
|
|
10947
11076
|
this._resolveProps(def);
|
|
10948
11077
|
if (this.shadowRoot) this._applyStyles(styles);
|
|
10949
11078
|
else if (styles) warn("Custom element style injection is not supported when using shadowRoot: false");
|
|
10950
|
-
this._mountComponent(def);
|
|
11079
|
+
if (this._connected) this._mountComponent(def);
|
|
10951
11080
|
};
|
|
10952
11081
|
const asyncDef = this._def.__asyncLoader;
|
|
10953
11082
|
if (asyncDef) {
|
|
@@ -11265,6 +11394,7 @@ const positionMap = /* @__PURE__ */ new WeakMap();
|
|
|
11265
11394
|
const newPositionMap = /* @__PURE__ */ new WeakMap();
|
|
11266
11395
|
const moveCbKey = Symbol("_moveCb");
|
|
11267
11396
|
const enterCbKey = Symbol("_enterCb");
|
|
11397
|
+
const pendingGroups = /* @__PURE__ */ new WeakMap();
|
|
11268
11398
|
/**
|
|
11269
11399
|
* Wrap logic that modifies TransitionGroup properties in a function
|
|
11270
11400
|
* so that it can be annotated as pure
|
|
@@ -11285,15 +11415,24 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11285
11415
|
const state = useTransitionState();
|
|
11286
11416
|
let prevChildren;
|
|
11287
11417
|
let children;
|
|
11418
|
+
let origins;
|
|
11419
|
+
let moves;
|
|
11420
|
+
const willMove = () => {
|
|
11421
|
+
if (moves === void 0) moves = prevChildren.length > 0 && hasCSSTransform(prevChildren[0].el, instance.vnode.el, resolveMoveClass(props));
|
|
11422
|
+
return moves;
|
|
11423
|
+
};
|
|
11288
11424
|
onUpdated(() => {
|
|
11289
|
-
|
|
11290
|
-
|
|
11291
|
-
if (!hasCSSTransform(prevChildren[0].el, instance.vnode.el, moveClass)) {
|
|
11425
|
+
pendingGroups.delete(instance);
|
|
11426
|
+
if (!willMove()) {
|
|
11292
11427
|
prevChildren = [];
|
|
11428
|
+
origins = void 0;
|
|
11293
11429
|
return;
|
|
11294
11430
|
}
|
|
11431
|
+
const moveClass = resolveMoveClass(props);
|
|
11295
11432
|
prevChildren.forEach((vnode) => callPendingCbs(vnode.el));
|
|
11296
|
-
|
|
11433
|
+
const shift = origins && getOriginShift(origins, instance.vnode.el);
|
|
11434
|
+
origins = void 0;
|
|
11435
|
+
prevChildren.forEach((c) => recordPosition(c, shift));
|
|
11297
11436
|
const movedChildren = prevChildren.filter(applyTranslation);
|
|
11298
11437
|
forceReflow(instance.vnode.el);
|
|
11299
11438
|
movedChildren.forEach((c) => {
|
|
@@ -11308,6 +11447,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11308
11447
|
let tag = rawProps.tag || Fragment;
|
|
11309
11448
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11310
11449
|
prevChildren = [];
|
|
11450
|
+
moves = void 0;
|
|
11311
11451
|
if (children) for (let i = 0; i < children.length; i++) {
|
|
11312
11452
|
const child = children[i];
|
|
11313
11453
|
if (child.el && child.el instanceof Element && !child.el[vShowHidden]) {
|
|
@@ -11322,6 +11462,14 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11322
11462
|
if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11323
11463
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11324
11464
|
}
|
|
11465
|
+
if (prevChildren.length) {
|
|
11466
|
+
const root = instance.vnode.el;
|
|
11467
|
+
origins = getOrigins(instance, root);
|
|
11468
|
+
pendingGroups.set(instance, {
|
|
11469
|
+
root,
|
|
11470
|
+
willMove
|
|
11471
|
+
});
|
|
11472
|
+
}
|
|
11325
11473
|
return createVNode(tag, null, children);
|
|
11326
11474
|
};
|
|
11327
11475
|
}
|
|
@@ -11330,8 +11478,11 @@ function callPendingCbs(el) {
|
|
|
11330
11478
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11331
11479
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
11332
11480
|
}
|
|
11333
|
-
function
|
|
11334
|
-
|
|
11481
|
+
function resolveMoveClass(props) {
|
|
11482
|
+
return props.moveClass || `${props.name || "v"}-move`;
|
|
11483
|
+
}
|
|
11484
|
+
function recordPosition(c, shift) {
|
|
11485
|
+
newPositionMap.set(c, getPosition(c.el, shift));
|
|
11335
11486
|
}
|
|
11336
11487
|
function applyTranslation(c) {
|
|
11337
11488
|
if (baseApplyTranslation(positionMap.get(c), newPositionMap.get(c), c.el)) return c;
|
|
@@ -11356,13 +11507,36 @@ function baseApplyTranslation(oldPos, newPos, el) {
|
|
|
11356
11507
|
}
|
|
11357
11508
|
return false;
|
|
11358
11509
|
}
|
|
11359
|
-
function getPosition(el) {
|
|
11510
|
+
function getPosition(el, shift) {
|
|
11360
11511
|
const rect = el.getBoundingClientRect();
|
|
11361
11512
|
return {
|
|
11362
|
-
left: rect.left,
|
|
11363
|
-
top: rect.top
|
|
11513
|
+
left: rect.left - (shift ? shift.left : 0),
|
|
11514
|
+
top: rect.top - (shift ? shift.top : 0)
|
|
11364
11515
|
};
|
|
11365
11516
|
}
|
|
11517
|
+
function getOrigins(instance, root) {
|
|
11518
|
+
let origins;
|
|
11519
|
+
for (let group = instance.parent; group; group = group.parent) {
|
|
11520
|
+
const pending = pendingGroups.get(group);
|
|
11521
|
+
if (pending) {
|
|
11522
|
+
const item = findItem(pending.root, root);
|
|
11523
|
+
if (item) (origins || (origins = [])).push(extend(getPosition(item), {
|
|
11524
|
+
item,
|
|
11525
|
+
willMove: pending.willMove
|
|
11526
|
+
}));
|
|
11527
|
+
}
|
|
11528
|
+
}
|
|
11529
|
+
return origins;
|
|
11530
|
+
}
|
|
11531
|
+
function findItem(root, node) {
|
|
11532
|
+
const container = root.nodeType === 1 ? root : root.parentNode;
|
|
11533
|
+
while (node && node.parentNode !== container) node = node.parentNode;
|
|
11534
|
+
if (node && node.nodeType === 1) return node;
|
|
11535
|
+
}
|
|
11536
|
+
function getOriginShift(origins, root) {
|
|
11537
|
+
const origin = origins.find((o) => o.willMove() && o.item.contains(root));
|
|
11538
|
+
return origin && getPosition(origin.item, origin);
|
|
11539
|
+
}
|
|
11366
11540
|
function hasCSSTransform(el, root, moveClass) {
|
|
11367
11541
|
const clone = el.cloneNode();
|
|
11368
11542
|
const _vtc = el[vtcKey];
|
|
@@ -13647,7 +13821,7 @@ const errorMessages = {
|
|
|
13647
13821
|
[41]: `v-model is missing expression.`,
|
|
13648
13822
|
[42]: `v-model value must be a valid JavaScript member expression.`,
|
|
13649
13823
|
[43]: `v-model cannot be used on v-for or v-slot scope variables because they are not writable.`,
|
|
13650
|
-
[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.`,
|
|
13824
|
+
[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.`,
|
|
13651
13825
|
[45]: `v-model cannot be used on a const binding because it is not writable.`,
|
|
13652
13826
|
[46]: `Error parsing JavaScript expression: `,
|
|
13653
13827
|
[47]: `<KeepAlive> expects exactly one child component.`,
|
|
@@ -15974,7 +16148,11 @@ const transformFor = createStructuralDirectiveTransform("for", (node, dir, conte
|
|
|
15974
16148
|
]),
|
|
15975
16149
|
createCompoundExpression([
|
|
15976
16150
|
`if (_cached && _cached.el`,
|
|
15977
|
-
...keyExp ? [
|
|
16151
|
+
...keyExp ? [
|
|
16152
|
+
` && _cached.key === (`,
|
|
16153
|
+
keyExp,
|
|
16154
|
+
`)`
|
|
16155
|
+
] : [],
|
|
15978
16156
|
` && ${context.helperString(IS_MEMO_SAME)}(_cached, _memo)) return _cached`
|
|
15979
16157
|
]),
|
|
15980
16158
|
createCompoundExpression([`const _item = `, childBlock]),
|
|
@@ -17459,7 +17637,7 @@ function stringifyNode(node, context) {
|
|
|
17459
17637
|
}
|
|
17460
17638
|
function stringifyElement(node, context) {
|
|
17461
17639
|
let res = `<${node.tag}`;
|
|
17462
|
-
let innerHTML =
|
|
17640
|
+
let innerHTML = void 0;
|
|
17463
17641
|
for (let i = 0; i < node.props.length; i++) {
|
|
17464
17642
|
const p = node.props[i];
|
|
17465
17643
|
if (p.type === 6) {
|
|
@@ -17481,13 +17659,15 @@ function stringifyElement(node, context) {
|
|
|
17481
17659
|
else if (arg === "style") evaluated = stringifyStyle(normalizeStyle(evaluated));
|
|
17482
17660
|
res += ` ${p.arg.content}="${escapeHtml(evaluated)}"`;
|
|
17483
17661
|
}
|
|
17484
|
-
} else if (p.name === "html")
|
|
17485
|
-
|
|
17662
|
+
} else if (p.name === "html") {
|
|
17663
|
+
var _evaluateConstant;
|
|
17664
|
+
innerHTML = (_evaluateConstant = evaluateConstant(p.exp)) !== null && _evaluateConstant !== void 0 ? _evaluateConstant : "";
|
|
17665
|
+
} else if (p.name === "text") innerHTML = escapeHtml(toDisplayString(evaluateConstant(p.exp)));
|
|
17486
17666
|
}
|
|
17487
17667
|
}
|
|
17488
17668
|
if (context.scopeId) res += ` ${context.scopeId}`;
|
|
17489
17669
|
res += `>`;
|
|
17490
|
-
if (innerHTML) res += innerHTML;
|
|
17670
|
+
if (innerHTML !== void 0) res += innerHTML;
|
|
17491
17671
|
else for (let i = 0; i < node.children.length; i++) res += stringifyNode(node.children[i], context);
|
|
17492
17672
|
if (!isVoidTag(node.tag)) res += `</${node.tag}>`;
|
|
17493
17673
|
return res;
|
|
@@ -17714,7 +17894,11 @@ const validateHtmlNesting = (node, context) => {
|
|
|
17714
17894
|
};
|
|
17715
17895
|
//#endregion
|
|
17716
17896
|
//#region packages/compiler-dom/src/index.ts
|
|
17717
|
-
const DOMNodeTransforms = [
|
|
17897
|
+
const DOMNodeTransforms = [
|
|
17898
|
+
transformStyle,
|
|
17899
|
+
transformTransition,
|
|
17900
|
+
...[validateHtmlNesting]
|
|
17901
|
+
];
|
|
17718
17902
|
const DOMDirectiveTransforms = {
|
|
17719
17903
|
cloak: noopDirectiveTransform,
|
|
17720
17904
|
html: transformVHtml,
|