@vue/compat 3.6.0-rc.12 → 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 +29 -1
- package/dist/vue.cjs.js +95 -44
- package/dist/vue.cjs.prod.js +97 -46
- package/dist/vue.esm-browser.js +98 -47
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +107 -55
- package/dist/vue.global.js +97 -46
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +98 -47
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +107 -55
- package/dist/vue.runtime.global.js +97 -46
- package/dist/vue.runtime.global.prod.js +7 -7
- package/package.json +2 -2
package/dist/vue.cjs.prod.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
|
**/
|
|
@@ -2954,6 +2954,16 @@ function createPathGetter(ctx, path) {
|
|
|
2954
2954
|
};
|
|
2955
2955
|
}
|
|
2956
2956
|
//#endregion
|
|
2957
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
2958
|
+
/**
|
|
2959
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
2960
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
2961
|
+
*/
|
|
2962
|
+
let isVaporInteropEnabled = false;
|
|
2963
|
+
function setVaporInteropEnabled() {
|
|
2964
|
+
isVaporInteropEnabled = true;
|
|
2965
|
+
}
|
|
2966
|
+
//#endregion
|
|
2957
2967
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
2958
2968
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
2959
2969
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3200,13 +3210,18 @@ const BaseTransitionPropsValidators = {
|
|
|
3200
3210
|
onAfterAppear: TransitionHookValidator,
|
|
3201
3211
|
onAppearCancelled: TransitionHookValidator
|
|
3202
3212
|
};
|
|
3213
|
+
let isTransitionEnabled = false;
|
|
3214
|
+
function withTransitionEnabled(value) {
|
|
3215
|
+
isTransitionEnabled = true;
|
|
3216
|
+
return value;
|
|
3217
|
+
}
|
|
3203
3218
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3204
3219
|
if (vnode.type === Comment) return true;
|
|
3205
3220
|
if (vnode.type === Fragment) {
|
|
3206
3221
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3207
3222
|
return !child || isEmptyTransitionChild(child, instance);
|
|
3208
3223
|
}
|
|
3209
|
-
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3224
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3210
3225
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3211
3226
|
}
|
|
3212
3227
|
const BaseTransitionImpl = {
|
|
@@ -3222,7 +3237,7 @@ const BaseTransitionImpl = {
|
|
|
3222
3237
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
3223
3238
|
const { mode } = rawProps;
|
|
3224
3239
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3225
|
-
if (!(instance.
|
|
3240
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3226
3241
|
}) : NOOP);
|
|
3227
3242
|
};
|
|
3228
3243
|
}
|
|
@@ -3238,7 +3253,7 @@ function findNonCommentChild(children) {
|
|
|
3238
3253
|
}
|
|
3239
3254
|
return child;
|
|
3240
3255
|
}
|
|
3241
|
-
const BaseTransition = BaseTransitionImpl;
|
|
3256
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3242
3257
|
function getLeavingNodesForType(state, vnode) {
|
|
3243
3258
|
const { leavingNodes } = state;
|
|
3244
3259
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3276,7 +3291,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3276
3291
|
return hooks;
|
|
3277
3292
|
}
|
|
3278
3293
|
}, props, state, instance);
|
|
3279
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
3294
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3280
3295
|
__vapor: true,
|
|
3281
3296
|
props,
|
|
3282
3297
|
state,
|
|
@@ -3453,7 +3468,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
|
|
|
3453
3468
|
function setTransitionHooks(vnode, hooks) {
|
|
3454
3469
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3455
3470
|
vnode.transition = hooks;
|
|
3456
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3471
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3457
3472
|
else {
|
|
3458
3473
|
const subTree = vnode.component.subTree;
|
|
3459
3474
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -3486,7 +3501,7 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
3486
3501
|
return ret;
|
|
3487
3502
|
}
|
|
3488
3503
|
function getTransitionRoot(vnode) {
|
|
3489
|
-
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
3504
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
3490
3505
|
if (vnode.type === Fragment) {
|
|
3491
3506
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3492
3507
|
return child ? getTransitionRoot(child) : void 0;
|
|
@@ -3730,7 +3745,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3730
3745
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3731
3746
|
break;
|
|
3732
3747
|
case VaporSlot:
|
|
3733
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3748
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
3734
3749
|
break;
|
|
3735
3750
|
default: if (shapeFlag & 1) {
|
|
3736
3751
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
@@ -3741,7 +3756,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3741
3756
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
3742
3757
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
3743
3758
|
else nextNode = nextSibling(node);
|
|
3744
|
-
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
3759
|
+
if ((isVaporInteropEnabled || false) && vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
3745
3760
|
else {
|
|
3746
3761
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
3747
3762
|
const component = vnode.component;
|
|
@@ -3853,7 +3868,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
3853
3868
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
3854
3869
|
const container = parentNode(node);
|
|
3855
3870
|
const first = nextSibling(node);
|
|
3856
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3871
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
3857
3872
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
3858
3873
|
else {
|
|
3859
3874
|
logMismatchError();
|
|
@@ -4142,7 +4157,7 @@ function createAsyncComponentContext(source) {
|
|
|
4142
4157
|
setPendingRequest: (request) => pendingRequest = request
|
|
4143
4158
|
};
|
|
4144
4159
|
}
|
|
4145
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4160
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
4146
4161
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4147
4162
|
const error = /* @__PURE__ */ ref();
|
|
4148
4163
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -4193,6 +4208,11 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
4193
4208
|
//#endregion
|
|
4194
4209
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
4195
4210
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
4211
|
+
let isKeepAliveEnabled = false;
|
|
4212
|
+
function withKeepAliveEnabled(value) {
|
|
4213
|
+
isKeepAliveEnabled = true;
|
|
4214
|
+
return value;
|
|
4215
|
+
}
|
|
4196
4216
|
const KeepAliveImpl = {
|
|
4197
4217
|
name: `KeepAlive`,
|
|
4198
4218
|
__isKeepAlive: true,
|
|
@@ -4339,7 +4359,7 @@ const decorate$2 = (t) => {
|
|
|
4339
4359
|
t.__isBuiltIn = true;
|
|
4340
4360
|
return t;
|
|
4341
4361
|
};
|
|
4342
|
-
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
4362
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
|
|
4343
4363
|
function matches(pattern, name) {
|
|
4344
4364
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
4345
4365
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -4794,11 +4814,12 @@ function invokeSlotFallback(fallback, owner) {
|
|
|
4794
4814
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4795
4815
|
if (props == null) props = {};
|
|
4796
4816
|
let slot = slots[name];
|
|
4797
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
4817
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
4798
4818
|
if (vaporSlot) {
|
|
4799
4819
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4800
4820
|
ret.vs = {
|
|
4801
4821
|
slot: vaporSlot,
|
|
4822
|
+
name,
|
|
4802
4823
|
outlets: fallback ? [{
|
|
4803
4824
|
fallback,
|
|
4804
4825
|
owner: currentRenderingInstance
|
|
@@ -4825,7 +4846,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
4825
4846
|
try {
|
|
4826
4847
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
4827
4848
|
let attached = false;
|
|
4828
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
4849
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
4829
4850
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
4830
4851
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
4831
4852
|
}
|
|
@@ -5598,7 +5619,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
5598
5619
|
if (options.el) return vm.$mount(options.el);
|
|
5599
5620
|
else return vm;
|
|
5600
5621
|
}
|
|
5601
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
5622
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.13`;
|
|
5602
5623
|
Vue.config = singletonApp.config;
|
|
5603
5624
|
Vue.use = (plugin, ...options) => {
|
|
5604
5625
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -6634,7 +6655,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6634
6655
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6635
6656
|
break;
|
|
6636
6657
|
case VaporSlot:
|
|
6637
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6658
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6638
6659
|
break;
|
|
6639
6660
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6640
6661
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -6744,7 +6765,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6744
6765
|
let vnodeHook;
|
|
6745
6766
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6746
6767
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6747
|
-
if (n2.ibu) n2.ibu();
|
|
6768
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
6748
6769
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6749
6770
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6750
6771
|
if (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6776,9 +6797,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6776
6797
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6777
6798
|
}
|
|
6778
6799
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6779
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6800
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
6780
6801
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6781
|
-
n2.iu && n2.iu();
|
|
6802
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
6782
6803
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6783
6804
|
}, void 0, parentSuspense);
|
|
6784
6805
|
};
|
|
@@ -6821,7 +6842,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6821
6842
|
};
|
|
6822
6843
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6823
6844
|
n2.slotScopeIds = slotScopeIds;
|
|
6824
|
-
if (n2.type.__vapor) {
|
|
6845
|
+
if ((isVaporInteropEnabled || false) && n2.type.__vapor) {
|
|
6825
6846
|
if (n1 == null) {
|
|
6826
6847
|
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
6827
6848
|
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
@@ -6963,7 +6984,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6963
6984
|
} else next = vnode;
|
|
6964
6985
|
if (bu) invokeArrayFns(bu);
|
|
6965
6986
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
6966
|
-
if (next.ibu) next.ibu();
|
|
6987
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
6967
6988
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
6968
6989
|
toggleRecurse(instance, true);
|
|
6969
6990
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -6973,9 +6994,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6973
6994
|
next.el = nextTree.el;
|
|
6974
6995
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
6975
6996
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
6976
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
6997
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
6977
6998
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
6978
|
-
next.iu && next.iu();
|
|
6999
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
6979
7000
|
}, void 0, parentSuspense);
|
|
6980
7001
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
6981
7002
|
}
|
|
@@ -7123,7 +7144,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7123
7144
|
};
|
|
7124
7145
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
7125
7146
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
7126
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
7147
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
7127
7148
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
7128
7149
|
return;
|
|
7129
7150
|
}
|
|
@@ -7167,11 +7188,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7167
7188
|
}
|
|
7168
7189
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7169
7190
|
if (shapeFlag & 256) {
|
|
7170
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7191
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7171
7192
|
else parentComponent.ctx.deactivate(vnode);
|
|
7172
7193
|
return;
|
|
7173
7194
|
}
|
|
7174
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
7195
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
7175
7196
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7176
7197
|
return;
|
|
7177
7198
|
}
|
|
@@ -7189,7 +7210,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7189
7210
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
7190
7211
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7191
7212
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7192
|
-
if (type === VaporSlot) {
|
|
7213
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
7193
7214
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7194
7215
|
return;
|
|
7195
7216
|
}
|
|
@@ -7223,7 +7244,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7223
7244
|
if (transition) {
|
|
7224
7245
|
let leavingEl = leavingNode && leavingNode.el;
|
|
7225
7246
|
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
7226
|
-
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7247
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7227
7248
|
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
7228
7249
|
isElement = !!leavingEl;
|
|
7229
7250
|
}
|
|
@@ -7262,7 +7283,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7262
7283
|
};
|
|
7263
7284
|
const getNextHostNode = (vnode) => {
|
|
7264
7285
|
if (vnode.shapeFlag & 6) {
|
|
7265
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7286
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7266
7287
|
return getNextHostNode(vnode.component.subTree);
|
|
7267
7288
|
}
|
|
7268
7289
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -7318,7 +7339,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
7318
7339
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7319
7340
|
}
|
|
7320
7341
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7321
|
-
if (!vapor) {
|
|
7342
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
7322
7343
|
if (allowed) {
|
|
7323
7344
|
effect.flags |= 128;
|
|
7324
7345
|
job.flags |= 2;
|
|
@@ -7425,7 +7446,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
7425
7446
|
currentParent = currentParent.parent;
|
|
7426
7447
|
} else break;
|
|
7427
7448
|
}
|
|
7428
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7449
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7429
7450
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
7430
7451
|
return inheritedScopeIds;
|
|
7431
7452
|
}
|
|
@@ -7438,8 +7459,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
7438
7459
|
//#endregion
|
|
7439
7460
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
7440
7461
|
const isSuspense = (type) => type.__isSuspense;
|
|
7462
|
+
let isSuspenseEnabled = false;
|
|
7463
|
+
function withSuspenseEnabled(value) {
|
|
7464
|
+
isSuspenseEnabled = true;
|
|
7465
|
+
return value;
|
|
7466
|
+
}
|
|
7441
7467
|
let suspenseId = 0;
|
|
7442
|
-
const Suspense = {
|
|
7468
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
7443
7469
|
name: "Suspense",
|
|
7444
7470
|
__isSuspense: true,
|
|
7445
7471
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -7456,7 +7482,7 @@ const Suspense = {
|
|
|
7456
7482
|
},
|
|
7457
7483
|
hydrate: hydrateSuspense,
|
|
7458
7484
|
normalize: normalizeSuspenseChildren
|
|
7459
|
-
};
|
|
7485
|
+
});
|
|
7460
7486
|
function triggerEvent(vnode, name) {
|
|
7461
7487
|
const eventListener = vnode.props && vnode.props[name];
|
|
7462
7488
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -7985,16 +8011,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
|
|
|
7985
8011
|
if (!vaporSlot) return vaporSlot;
|
|
7986
8012
|
const cloned = {
|
|
7987
8013
|
slot: vaporSlot.slot,
|
|
8014
|
+
name: vaporSlot.name,
|
|
7988
8015
|
outlets: vaporSlot.outlets,
|
|
7989
|
-
props: vaporSlot.props
|
|
8016
|
+
props: vaporSlot.props,
|
|
8017
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
8018
|
+
group: vaporSlot.group
|
|
7990
8019
|
};
|
|
7991
|
-
|
|
8020
|
+
const attrs = cloned.attrs;
|
|
8021
|
+
if (extraProps && vaporSlot.props) {
|
|
7992
8022
|
let extraSlotProps;
|
|
7993
|
-
for (const key in extraProps) if (key !== "key") {
|
|
8023
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
7994
8024
|
if (!extraSlotProps) extraSlotProps = {};
|
|
7995
8025
|
extraSlotProps[key] = extraProps[key];
|
|
7996
8026
|
}
|
|
7997
|
-
if (extraSlotProps)
|
|
8027
|
+
if (extraSlotProps) {
|
|
8028
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
8029
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
8030
|
+
}
|
|
7998
8031
|
}
|
|
7999
8032
|
if (vnode.el) {
|
|
8000
8033
|
cloned.state = vaporSlot.state;
|
|
@@ -8255,7 +8288,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
8255
8288
|
isSSR && setInSSRSetupState(isSSR);
|
|
8256
8289
|
const { props, children, vi } = instance.vnode;
|
|
8257
8290
|
const isStateful = isStatefulComponent(instance);
|
|
8258
|
-
if (vi) vi(instance);
|
|
8291
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
8259
8292
|
else {
|
|
8260
8293
|
initProps(instance, props, isStateful, isSSR);
|
|
8261
8294
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -8435,7 +8468,7 @@ function isMemoSame(cached, memo) {
|
|
|
8435
8468
|
}
|
|
8436
8469
|
//#endregion
|
|
8437
8470
|
//#region packages/runtime-core/src/index.ts
|
|
8438
|
-
const version = "3.6.0-rc.
|
|
8471
|
+
const version = "3.6.0-rc.13";
|
|
8439
8472
|
const warn = NOOP;
|
|
8440
8473
|
/**
|
|
8441
8474
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9484,7 +9517,7 @@ const decorate = (t) => {
|
|
|
9484
9517
|
t.__isBuiltIn = true;
|
|
9485
9518
|
return t;
|
|
9486
9519
|
};
|
|
9487
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9520
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
9488
9521
|
name: "TransitionGroup",
|
|
9489
9522
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9490
9523
|
tag: String,
|
|
@@ -9493,6 +9526,11 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
9493
9526
|
setup(props, { slots }) {
|
|
9494
9527
|
const instance = getCurrentInstance();
|
|
9495
9528
|
const state = useTransitionState();
|
|
9529
|
+
const group = {
|
|
9530
|
+
props: {},
|
|
9531
|
+
state,
|
|
9532
|
+
instance
|
|
9533
|
+
};
|
|
9496
9534
|
let prevChildren;
|
|
9497
9535
|
let children;
|
|
9498
9536
|
let origins;
|
|
@@ -9523,7 +9561,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
9523
9561
|
});
|
|
9524
9562
|
return () => {
|
|
9525
9563
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
9526
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
9564
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
9527
9565
|
let tag = rawProps.tag || Fragment;
|
|
9528
9566
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
9529
9567
|
prevChildren = [];
|
|
@@ -9534,12 +9572,17 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
9534
9572
|
prevChildren.push(child);
|
|
9535
9573
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9536
9574
|
positionMap.set(child, getPosition(child.el));
|
|
9537
|
-
}
|
|
9575
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
9576
|
+
const row = { el };
|
|
9577
|
+
prevChildren.push(row);
|
|
9578
|
+
positionMap.set(row, getPosition(el));
|
|
9579
|
+
});
|
|
9538
9580
|
}
|
|
9539
9581
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
9540
9582
|
for (let i = 0; i < children.length; i++) {
|
|
9541
9583
|
const child = children[i];
|
|
9542
|
-
if (child.
|
|
9584
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
9585
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9543
9586
|
}
|
|
9544
9587
|
if (prevChildren.length) {
|
|
9545
9588
|
const root = instance.vnode.el;
|
|
@@ -9552,7 +9595,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
9552
9595
|
return createVNode(tag, null, children);
|
|
9553
9596
|
};
|
|
9554
9597
|
}
|
|
9555
|
-
});
|
|
9598
|
+
}));
|
|
9556
9599
|
function callPendingCbs(el) {
|
|
9557
9600
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
9558
9601
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -9696,7 +9739,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
|
9696
9739
|
if (e.target.composing) return;
|
|
9697
9740
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
9698
9741
|
});
|
|
9699
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
9742
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
9700
9743
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
9701
9744
|
});
|
|
9702
9745
|
if (!lazy) {
|
|
@@ -10072,6 +10115,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
10072
10115
|
initCustomFormatter: () => initCustomFormatter,
|
|
10073
10116
|
initDirectivesForSSR: () => initDirectivesForSSR,
|
|
10074
10117
|
inject: () => inject,
|
|
10118
|
+
isKeepAliveEnabled: () => isKeepAliveEnabled,
|
|
10075
10119
|
isMemoSame: () => isMemoSame,
|
|
10076
10120
|
isProxy: () => isProxy,
|
|
10077
10121
|
isReactive: () => isReactive,
|
|
@@ -10079,7 +10123,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
10079
10123
|
isRef: () => isRef,
|
|
10080
10124
|
isRuntimeOnly: () => isRuntimeOnly,
|
|
10081
10125
|
isShallow: () => isShallow,
|
|
10126
|
+
isSuspenseEnabled: () => isSuspenseEnabled,
|
|
10127
|
+
isTransitionEnabled: () => isTransitionEnabled,
|
|
10082
10128
|
isVNode: () => isVNode,
|
|
10129
|
+
isVaporInteropEnabled: () => isVaporInteropEnabled,
|
|
10083
10130
|
markRaw: () => markRaw,
|
|
10084
10131
|
mergeDefaults: () => mergeDefaults,
|
|
10085
10132
|
mergeModels: () => mergeModels,
|
|
@@ -10126,6 +10173,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
10126
10173
|
setDevtoolsHook: () => setDevtoolsHook,
|
|
10127
10174
|
setIsHydratingEnabled: () => setIsHydratingEnabled,
|
|
10128
10175
|
setTransitionHooks: () => setTransitionHooks,
|
|
10176
|
+
setVaporInteropEnabled: () => setVaporInteropEnabled,
|
|
10129
10177
|
shallowReactive: () => shallowReactive,
|
|
10130
10178
|
shallowReadonly: () => shallowReadonly,
|
|
10131
10179
|
shallowRef: () => shallowRef,
|
|
@@ -10170,10 +10218,13 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
10170
10218
|
withCtx: () => withCtx,
|
|
10171
10219
|
withDefaults: () => withDefaults,
|
|
10172
10220
|
withDirectives: () => withDirectives,
|
|
10221
|
+
withKeepAliveEnabled: () => withKeepAliveEnabled,
|
|
10173
10222
|
withKeys: () => withKeys,
|
|
10174
10223
|
withMemo: () => withMemo,
|
|
10175
10224
|
withModifiers: () => withModifiers,
|
|
10176
|
-
withScopeId: () => withScopeId
|
|
10225
|
+
withScopeId: () => withScopeId,
|
|
10226
|
+
withSuspenseEnabled: () => withSuspenseEnabled,
|
|
10227
|
+
withTransitionEnabled: () => withTransitionEnabled
|
|
10177
10228
|
});
|
|
10178
10229
|
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
10179
10230
|
let renderer;
|