@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
|
@@ -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
|
**/
|
|
@@ -3654,6 +3654,16 @@ function createPathGetter(ctx, path) {
|
|
|
3654
3654
|
};
|
|
3655
3655
|
}
|
|
3656
3656
|
//#endregion
|
|
3657
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3658
|
+
/**
|
|
3659
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3660
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3661
|
+
*/
|
|
3662
|
+
let isVaporInteropEnabled = false;
|
|
3663
|
+
function setVaporInteropEnabled() {
|
|
3664
|
+
isVaporInteropEnabled = true;
|
|
3665
|
+
}
|
|
3666
|
+
//#endregion
|
|
3657
3667
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3658
3668
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3659
3669
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3913,13 +3923,18 @@ const BaseTransitionPropsValidators = {
|
|
|
3913
3923
|
onAfterAppear: TransitionHookValidator,
|
|
3914
3924
|
onAppearCancelled: TransitionHookValidator
|
|
3915
3925
|
};
|
|
3926
|
+
let isTransitionEnabled = false;
|
|
3927
|
+
function withTransitionEnabled(value) {
|
|
3928
|
+
isTransitionEnabled = true;
|
|
3929
|
+
return value;
|
|
3930
|
+
}
|
|
3916
3931
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3917
3932
|
if (vnode.type === Comment) return true;
|
|
3918
3933
|
if (vnode.type === Fragment) {
|
|
3919
3934
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3920
3935
|
return !child || isEmptyTransitionChild(child, instance);
|
|
3921
3936
|
}
|
|
3922
|
-
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3937
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3923
3938
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3924
3939
|
}
|
|
3925
3940
|
const BaseTransitionImpl = {
|
|
@@ -3936,7 +3951,7 @@ const BaseTransitionImpl = {
|
|
|
3936
3951
|
const { mode } = rawProps;
|
|
3937
3952
|
checkTransitionMode(mode);
|
|
3938
3953
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3939
|
-
if (!(instance.
|
|
3954
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3940
3955
|
}) : NOOP);
|
|
3941
3956
|
};
|
|
3942
3957
|
}
|
|
@@ -3957,7 +3972,7 @@ function findNonCommentChild(children) {
|
|
|
3957
3972
|
}
|
|
3958
3973
|
return child;
|
|
3959
3974
|
}
|
|
3960
|
-
const BaseTransition = BaseTransitionImpl;
|
|
3975
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3961
3976
|
function getLeavingNodesForType(state, vnode) {
|
|
3962
3977
|
const { leavingNodes } = state;
|
|
3963
3978
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3995,7 +4010,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
3995
4010
|
return hooks;
|
|
3996
4011
|
}
|
|
3997
4012
|
}, props, state, instance);
|
|
3998
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4013
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3999
4014
|
__vapor: true,
|
|
4000
4015
|
props,
|
|
4001
4016
|
state,
|
|
@@ -4172,7 +4187,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
|
|
|
4172
4187
|
function setTransitionHooks(vnode, hooks) {
|
|
4173
4188
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4174
4189
|
vnode.transition = hooks;
|
|
4175
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4190
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4176
4191
|
else {
|
|
4177
4192
|
const subTree = vnode.component.subTree;
|
|
4178
4193
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -4211,7 +4226,7 @@ function checkTransitionMode(mode) {
|
|
|
4211
4226
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4212
4227
|
}
|
|
4213
4228
|
function getTransitionRoot(vnode) {
|
|
4214
|
-
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4229
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
4215
4230
|
if (vnode.type === Fragment) {
|
|
4216
4231
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4217
4232
|
return child ? getTransitionRoot(child) : void 0;
|
|
@@ -4471,7 +4486,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4471
4486
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4472
4487
|
break;
|
|
4473
4488
|
case VaporSlot:
|
|
4474
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4489
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4475
4490
|
break;
|
|
4476
4491
|
default: if (shapeFlag & 1) {
|
|
4477
4492
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
@@ -4603,7 +4618,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
4603
4618
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4604
4619
|
const container = parentNode(node);
|
|
4605
4620
|
const first = nextSibling(node);
|
|
4606
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4621
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4607
4622
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4608
4623
|
else {
|
|
4609
4624
|
logMismatchError();
|
|
@@ -5010,7 +5025,7 @@ function createAsyncComponentContext(source) {
|
|
|
5010
5025
|
setPendingRequest: (request) => pendingRequest = request
|
|
5011
5026
|
};
|
|
5012
5027
|
}
|
|
5013
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
5028
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
5014
5029
|
const loaded = /* @__PURE__ */ ref(false);
|
|
5015
5030
|
const error = /* @__PURE__ */ ref();
|
|
5016
5031
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -5067,6 +5082,11 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
5067
5082
|
//#endregion
|
|
5068
5083
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
5069
5084
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5085
|
+
let isKeepAliveEnabled = false;
|
|
5086
|
+
function withKeepAliveEnabled(value) {
|
|
5087
|
+
isKeepAliveEnabled = true;
|
|
5088
|
+
return value;
|
|
5089
|
+
}
|
|
5070
5090
|
const KeepAliveImpl = {
|
|
5071
5091
|
name: `KeepAlive`,
|
|
5072
5092
|
__isKeepAlive: true,
|
|
@@ -5211,7 +5231,7 @@ const decorate$2 = (t) => {
|
|
|
5211
5231
|
t.__isBuiltIn = true;
|
|
5212
5232
|
return t;
|
|
5213
5233
|
};
|
|
5214
|
-
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
5234
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
|
|
5215
5235
|
function matches(pattern, name) {
|
|
5216
5236
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
5217
5237
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5657,11 +5677,12 @@ const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
|
5657
5677
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5658
5678
|
if (props == null) props = {};
|
|
5659
5679
|
let slot = slots[name];
|
|
5660
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5680
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
5661
5681
|
if (vaporSlot) {
|
|
5662
5682
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5663
5683
|
ret.vs = {
|
|
5664
5684
|
slot: vaporSlot,
|
|
5685
|
+
name,
|
|
5665
5686
|
outlets: fallback ? [{
|
|
5666
5687
|
fallback,
|
|
5667
5688
|
owner: currentRenderingInstance
|
|
@@ -5692,7 +5713,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
5692
5713
|
try {
|
|
5693
5714
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5694
5715
|
let attached = false;
|
|
5695
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5716
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
5696
5717
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
5697
5718
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5698
5719
|
}
|
|
@@ -6651,7 +6672,7 @@ function createCompatVue$1(createApp, createSingletonApp) {
|
|
|
6651
6672
|
if (options.el) return vm.$mount(options.el);
|
|
6652
6673
|
else return vm;
|
|
6653
6674
|
}
|
|
6654
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6675
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.13`;
|
|
6655
6676
|
Vue.config = singletonApp.config;
|
|
6656
6677
|
Vue.use = (plugin, ...options) => {
|
|
6657
6678
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8015,7 +8036,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8015
8036
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8016
8037
|
break;
|
|
8017
8038
|
case VaporSlot:
|
|
8018
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8039
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8019
8040
|
break;
|
|
8020
8041
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8021
8042
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -8149,7 +8170,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8149
8170
|
let vnodeHook;
|
|
8150
8171
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
8151
8172
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8152
|
-
if (n2.ibu) n2.ibu();
|
|
8173
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
8153
8174
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8154
8175
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
8155
8176
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -8183,9 +8204,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8183
8204
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
8184
8205
|
}
|
|
8185
8206
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
8186
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
8207
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
8187
8208
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8188
|
-
n2.iu && n2.iu();
|
|
8209
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
8189
8210
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8190
8211
|
}, void 0, parentSuspense);
|
|
8191
8212
|
};
|
|
@@ -8401,7 +8422,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8401
8422
|
} else next = vnode;
|
|
8402
8423
|
if (bu) invokeArrayFns(bu);
|
|
8403
8424
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8404
|
-
if (next.ibu) next.ibu();
|
|
8425
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
8405
8426
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8406
8427
|
toggleRecurse(instance, true);
|
|
8407
8428
|
startMeasure(instance, `render`);
|
|
@@ -8415,9 +8436,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8415
8436
|
next.el = nextTree.el;
|
|
8416
8437
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8417
8438
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8418
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8439
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
8419
8440
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8420
|
-
next.iu && next.iu();
|
|
8441
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
8421
8442
|
}, void 0, parentSuspense);
|
|
8422
8443
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8423
8444
|
devtoolsComponentUpdated(instance);
|
|
@@ -8570,7 +8591,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8570
8591
|
};
|
|
8571
8592
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8572
8593
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8573
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8594
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
8574
8595
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8575
8596
|
return;
|
|
8576
8597
|
}
|
|
@@ -8614,11 +8635,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8614
8635
|
}
|
|
8615
8636
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8616
8637
|
if (shapeFlag & 256) {
|
|
8617
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8638
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8618
8639
|
else parentComponent.ctx.deactivate(vnode);
|
|
8619
8640
|
return;
|
|
8620
8641
|
}
|
|
8621
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8642
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8622
8643
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8623
8644
|
return;
|
|
8624
8645
|
}
|
|
@@ -8636,7 +8657,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8636
8657
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
8637
8658
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8638
8659
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8639
|
-
if (type === VaporSlot) {
|
|
8660
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
8640
8661
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8641
8662
|
return;
|
|
8642
8663
|
}
|
|
@@ -8670,7 +8691,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8670
8691
|
if (transition) {
|
|
8671
8692
|
let leavingEl = leavingNode && leavingNode.el;
|
|
8672
8693
|
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8673
|
-
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8694
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8674
8695
|
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8675
8696
|
isElement = !!leavingEl;
|
|
8676
8697
|
}
|
|
@@ -8711,7 +8732,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
8711
8732
|
};
|
|
8712
8733
|
const getNextHostNode = (vnode) => {
|
|
8713
8734
|
if (vnode.shapeFlag & 6) {
|
|
8714
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8735
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8715
8736
|
return getNextHostNode(vnode.component.subTree);
|
|
8716
8737
|
}
|
|
8717
8738
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -8772,7 +8793,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
8772
8793
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8773
8794
|
}
|
|
8774
8795
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8775
|
-
if (!vapor) {
|
|
8796
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
8776
8797
|
if (allowed) {
|
|
8777
8798
|
effect.flags |= 128;
|
|
8778
8799
|
job.flags |= 2;
|
|
@@ -8884,7 +8905,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
8884
8905
|
currentParent = currentParent.parent;
|
|
8885
8906
|
} else break;
|
|
8886
8907
|
}
|
|
8887
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8908
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8888
8909
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8889
8910
|
return inheritedScopeIds;
|
|
8890
8911
|
}
|
|
@@ -8897,8 +8918,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
8897
8918
|
//#endregion
|
|
8898
8919
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
8899
8920
|
const isSuspense = (type) => type.__isSuspense;
|
|
8921
|
+
let isSuspenseEnabled = false;
|
|
8922
|
+
function withSuspenseEnabled(value) {
|
|
8923
|
+
isSuspenseEnabled = true;
|
|
8924
|
+
return value;
|
|
8925
|
+
}
|
|
8900
8926
|
let suspenseId = 0;
|
|
8901
|
-
const Suspense = {
|
|
8927
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
8902
8928
|
name: "Suspense",
|
|
8903
8929
|
__isSuspense: true,
|
|
8904
8930
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -8915,7 +8941,7 @@ const Suspense = {
|
|
|
8915
8941
|
},
|
|
8916
8942
|
hydrate: hydrateSuspense,
|
|
8917
8943
|
normalize: normalizeSuspenseChildren
|
|
8918
|
-
};
|
|
8944
|
+
});
|
|
8919
8945
|
function triggerEvent(vnode, name) {
|
|
8920
8946
|
const eventListener = vnode.props && vnode.props[name];
|
|
8921
8947
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -9494,16 +9520,23 @@ function cloneVaporSlotMeta(vnode, extraProps) {
|
|
|
9494
9520
|
if (!vaporSlot) return vaporSlot;
|
|
9495
9521
|
const cloned = {
|
|
9496
9522
|
slot: vaporSlot.slot,
|
|
9523
|
+
name: vaporSlot.name,
|
|
9497
9524
|
outlets: vaporSlot.outlets,
|
|
9498
|
-
props: vaporSlot.props
|
|
9525
|
+
props: vaporSlot.props,
|
|
9526
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
9527
|
+
group: vaporSlot.group
|
|
9499
9528
|
};
|
|
9500
|
-
|
|
9529
|
+
const attrs = cloned.attrs;
|
|
9530
|
+
if (extraProps && vaporSlot.props) {
|
|
9501
9531
|
let extraSlotProps;
|
|
9502
|
-
for (const key in extraProps) if (key !== "key") {
|
|
9532
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
9503
9533
|
if (!extraSlotProps) extraSlotProps = {};
|
|
9504
9534
|
extraSlotProps[key] = extraProps[key];
|
|
9505
9535
|
}
|
|
9506
|
-
if (extraSlotProps)
|
|
9536
|
+
if (extraSlotProps) {
|
|
9537
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
9538
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9539
|
+
}
|
|
9507
9540
|
}
|
|
9508
9541
|
if (vnode.el) {
|
|
9509
9542
|
cloned.state = vaporSlot.state;
|
|
@@ -9776,7 +9809,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
9776
9809
|
isSSR && setInSSRSetupState(isSSR);
|
|
9777
9810
|
const { props, children, vi } = instance.vnode;
|
|
9778
9811
|
const isStateful = isStatefulComponent(instance);
|
|
9779
|
-
if (vi) vi(instance);
|
|
9812
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
9780
9813
|
else {
|
|
9781
9814
|
initProps(instance, props, isStateful, isSSR);
|
|
9782
9815
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -10198,7 +10231,7 @@ function isMemoSame(cached, memo) {
|
|
|
10198
10231
|
}
|
|
10199
10232
|
//#endregion
|
|
10200
10233
|
//#region packages/runtime-core/src/index.ts
|
|
10201
|
-
const version = "3.6.0-rc.
|
|
10234
|
+
const version = "3.6.0-rc.13";
|
|
10202
10235
|
const warn = warn$1;
|
|
10203
10236
|
/**
|
|
10204
10237
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10636,14 +10669,14 @@ function setVarsOnVNode(vnode, vars) {
|
|
|
10636
10669
|
}
|
|
10637
10670
|
while (vnode.component) {
|
|
10638
10671
|
const component = vnode.component;
|
|
10639
|
-
if (component.vapor) {
|
|
10672
|
+
if (isVaporInteropEnabled && component.vapor) {
|
|
10640
10673
|
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
10641
10674
|
return;
|
|
10642
10675
|
}
|
|
10643
10676
|
vnode = vnode.component.subTree;
|
|
10644
10677
|
}
|
|
10645
10678
|
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10646
|
-
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10679
|
+
else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10647
10680
|
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10648
10681
|
else if (vnode.type === Static) {
|
|
10649
10682
|
let { el, anchor } = vnode;
|
|
@@ -11364,7 +11397,7 @@ const decorate = (t) => {
|
|
|
11364
11397
|
t.__isBuiltIn = true;
|
|
11365
11398
|
return t;
|
|
11366
11399
|
};
|
|
11367
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
11400
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
11368
11401
|
name: "TransitionGroup",
|
|
11369
11402
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
11370
11403
|
tag: String,
|
|
@@ -11373,6 +11406,11 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11373
11406
|
setup(props, { slots }) {
|
|
11374
11407
|
const instance = getCurrentInstance();
|
|
11375
11408
|
const state = useTransitionState();
|
|
11409
|
+
const group = {
|
|
11410
|
+
props: {},
|
|
11411
|
+
state,
|
|
11412
|
+
instance
|
|
11413
|
+
};
|
|
11376
11414
|
let prevChildren;
|
|
11377
11415
|
let children;
|
|
11378
11416
|
let origins;
|
|
@@ -11403,7 +11441,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11403
11441
|
});
|
|
11404
11442
|
return () => {
|
|
11405
11443
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
11406
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
11444
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
11407
11445
|
let tag = rawProps.tag || Fragment;
|
|
11408
11446
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11409
11447
|
prevChildren = [];
|
|
@@ -11414,12 +11452,17 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11414
11452
|
prevChildren.push(child);
|
|
11415
11453
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11416
11454
|
positionMap.set(child, getPosition(child.el));
|
|
11417
|
-
}
|
|
11455
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
11456
|
+
const row = { el };
|
|
11457
|
+
prevChildren.push(row);
|
|
11458
|
+
positionMap.set(row, getPosition(el));
|
|
11459
|
+
});
|
|
11418
11460
|
}
|
|
11419
11461
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
11420
11462
|
for (let i = 0; i < children.length; i++) {
|
|
11421
11463
|
const child = children[i];
|
|
11422
|
-
if (child.
|
|
11464
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
11465
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11423
11466
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11424
11467
|
}
|
|
11425
11468
|
if (prevChildren.length) {
|
|
@@ -11433,7 +11476,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
11433
11476
|
return createVNode(tag, null, children);
|
|
11434
11477
|
};
|
|
11435
11478
|
}
|
|
11436
|
-
});
|
|
11479
|
+
}));
|
|
11437
11480
|
function callPendingCbs(el) {
|
|
11438
11481
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11439
11482
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -11577,7 +11620,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
|
11577
11620
|
if (e.target.composing) return;
|
|
11578
11621
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
11579
11622
|
});
|
|
11580
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
11623
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
11581
11624
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
11582
11625
|
});
|
|
11583
11626
|
if (!lazy) {
|
|
@@ -11939,6 +11982,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11939
11982
|
initCustomFormatter: () => initCustomFormatter,
|
|
11940
11983
|
initDirectivesForSSR: () => initDirectivesForSSR,
|
|
11941
11984
|
inject: () => inject,
|
|
11985
|
+
isKeepAliveEnabled: () => isKeepAliveEnabled,
|
|
11942
11986
|
isMemoSame: () => isMemoSame,
|
|
11943
11987
|
isProxy: () => isProxy,
|
|
11944
11988
|
isReactive: () => isReactive,
|
|
@@ -11946,7 +11990,10 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11946
11990
|
isRef: () => isRef,
|
|
11947
11991
|
isRuntimeOnly: () => isRuntimeOnly,
|
|
11948
11992
|
isShallow: () => isShallow,
|
|
11993
|
+
isSuspenseEnabled: () => isSuspenseEnabled,
|
|
11994
|
+
isTransitionEnabled: () => isTransitionEnabled,
|
|
11949
11995
|
isVNode: () => isVNode,
|
|
11996
|
+
isVaporInteropEnabled: () => isVaporInteropEnabled,
|
|
11950
11997
|
markRaw: () => markRaw,
|
|
11951
11998
|
mergeDefaults: () => mergeDefaults,
|
|
11952
11999
|
mergeModels: () => mergeModels,
|
|
@@ -11993,6 +12040,7 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
11993
12040
|
setDevtoolsHook: () => setDevtoolsHook,
|
|
11994
12041
|
setIsHydratingEnabled: () => setIsHydratingEnabled,
|
|
11995
12042
|
setTransitionHooks: () => setTransitionHooks,
|
|
12043
|
+
setVaporInteropEnabled: () => setVaporInteropEnabled,
|
|
11996
12044
|
shallowReactive: () => shallowReactive,
|
|
11997
12045
|
shallowReadonly: () => shallowReadonly,
|
|
11998
12046
|
shallowRef: () => shallowRef,
|
|
@@ -12037,10 +12085,13 @@ var src_exports = /* @__PURE__ */ __exportAll({
|
|
|
12037
12085
|
withCtx: () => withCtx,
|
|
12038
12086
|
withDefaults: () => withDefaults,
|
|
12039
12087
|
withDirectives: () => withDirectives,
|
|
12088
|
+
withKeepAliveEnabled: () => withKeepAliveEnabled,
|
|
12040
12089
|
withKeys: () => withKeys,
|
|
12041
12090
|
withMemo: () => withMemo,
|
|
12042
12091
|
withModifiers: () => withModifiers,
|
|
12043
|
-
withScopeId: () => withScopeId
|
|
12092
|
+
withScopeId: () => withScopeId,
|
|
12093
|
+
withSuspenseEnabled: () => withSuspenseEnabled,
|
|
12094
|
+
withTransitionEnabled: () => withTransitionEnabled
|
|
12044
12095
|
});
|
|
12045
12096
|
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12046
12097
|
let renderer;
|
|
@@ -16564,4 +16615,4 @@ Vue.compile = compileToFunction;
|
|
|
16564
16615
|
var esm_index_default = Vue;
|
|
16565
16616
|
const configureCompat = Vue.configureCompat;
|
|
16566
16617
|
//#endregion
|
|
16567
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isVNode, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeys, withMemo, withModifiers, withScopeId };
|
|
16618
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, Static, Suspense, Teleport, Text, TrackOpTypes, Transition, TransitionGroup, TriggerOpTypes, VueElement, VueElementBase, assertNumber, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, cloneVNode, compatUtils, computed, configureCompat, createApp, createBlock, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createPropsRestProxy, createRenderer, createSSRApp, createSlots, createStaticVNode, createTextVNode, createVNode, customRef, esm_index_default as default, defineAsyncComponent, defineComponent, defineCustomElement, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSSRCustomElement, defineSlots, devtools, effect, effectScope, getCurrentInstance, getCurrentScope, getCurrentWatcher, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrate, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initDirectivesForSSR, inject, isKeepAliveEnabled, isMemoSame, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isShallow, isSuspenseEnabled, isTransitionEnabled, isVNode, isVaporInteropEnabled, markRaw, mergeDefaults, mergeModels, mergeProps, nextTick, nodeOps, normalizeClass, normalizeProps, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, patchProp, popScopeId, provide, proxyRefs, pushScopeId, queuePostFlushCb, reactive, readonly, ref, registerRuntimeCompiler, render, renderList, renderSlot, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolveTransitionHooks, setBlockTracking, setDevtoolsHook, setIsHydratingEnabled, setTransitionHooks, setVaporInteropEnabled, shallowReactive, shallowReadonly, shallowRef, ssrContextKey, ssrUtils, stop, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toValue, transformVNodeArgs, triggerRef, unref, useAttrs, useCssModule, useCssVars, useHost, useId, useInstanceOption, useModel, useSSRContext, useShadowRoot, useSlots, useTemplateRef, useTransitionState, vModelCheckbox, vModelDynamic, vModelRadio, vModelSelect, vModelText, vShow, version, warn, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withKeepAliveEnabled, withKeys, withMemo, withModifiers, withScopeId, withSuspenseEnabled, withTransitionEnabled };
|