@vue/compat 3.6.0-rc.12 → 3.6.0-rc.14
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 +127 -50
- package/dist/vue.cjs.prod.js +128 -51
- package/dist/vue.esm-browser.js +121 -53
- package/dist/vue.esm-browser.prod.js +7 -7
- package/dist/vue.esm-bundler.js +131 -61
- package/dist/vue.global.js +120 -52
- package/dist/vue.global.prod.js +7 -7
- package/dist/vue.runtime.esm-browser.js +121 -53
- package/dist/vue.runtime.esm-browser.prod.js +7 -7
- package/dist/vue.runtime.esm-bundler.js +131 -61
- package/dist/vue.runtime.global.js +120 -52
- 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.14
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -517,6 +517,21 @@ var Vue = (function() {
|
|
|
517
517
|
return String(value);
|
|
518
518
|
}
|
|
519
519
|
//#endregion
|
|
520
|
+
//#region packages/shared/src/vaporFlags.ts
|
|
521
|
+
/**
|
|
522
|
+
* The data of the comment a vapor server render opens the branch of a `v-if`
|
|
523
|
+
* chain with, `<!--[1-->`: the digits are the branch's position in the chain,
|
|
524
|
+
* and `<!--]-->` closes it like a fragment.
|
|
525
|
+
*/
|
|
526
|
+
function isVaporBranchStart(data) {
|
|
527
|
+
if (data.length < 2 || data.charCodeAt(0) !== 91) return false;
|
|
528
|
+
for (let i = 1; i < data.length; i++) {
|
|
529
|
+
const c = data.charCodeAt(i);
|
|
530
|
+
if (c < 48 || c > 57) return false;
|
|
531
|
+
}
|
|
532
|
+
return true;
|
|
533
|
+
}
|
|
534
|
+
//#endregion
|
|
520
535
|
//#region packages/reactivity/src/debug.ts
|
|
521
536
|
const triggerEventInfos = [];
|
|
522
537
|
function onTrack(sub, debugInfo) {
|
|
@@ -3651,6 +3666,16 @@ var Vue = (function() {
|
|
|
3651
3666
|
};
|
|
3652
3667
|
}
|
|
3653
3668
|
//#endregion
|
|
3669
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3670
|
+
/**
|
|
3671
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3672
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3673
|
+
*/
|
|
3674
|
+
let isVaporInteropEnabled = false;
|
|
3675
|
+
function setVaporInteropEnabled() {
|
|
3676
|
+
isVaporInteropEnabled = true;
|
|
3677
|
+
}
|
|
3678
|
+
//#endregion
|
|
3654
3679
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3655
3680
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3656
3681
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3910,13 +3935,18 @@ var Vue = (function() {
|
|
|
3910
3935
|
onAfterAppear: TransitionHookValidator,
|
|
3911
3936
|
onAppearCancelled: TransitionHookValidator
|
|
3912
3937
|
};
|
|
3938
|
+
let isTransitionEnabled = false;
|
|
3939
|
+
function withTransitionEnabled(value) {
|
|
3940
|
+
isTransitionEnabled = true;
|
|
3941
|
+
return value;
|
|
3942
|
+
}
|
|
3913
3943
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3914
3944
|
if (vnode.type === Comment) return true;
|
|
3915
3945
|
if (vnode.type === Fragment) {
|
|
3916
3946
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3917
3947
|
return !child || isEmptyTransitionChild(child, instance);
|
|
3918
3948
|
}
|
|
3919
|
-
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3949
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3920
3950
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3921
3951
|
}
|
|
3922
3952
|
const BaseTransitionImpl = {
|
|
@@ -3933,7 +3963,7 @@ var Vue = (function() {
|
|
|
3933
3963
|
const { mode } = rawProps;
|
|
3934
3964
|
checkTransitionMode(mode);
|
|
3935
3965
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3936
|
-
if (!(instance.
|
|
3966
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3937
3967
|
}) : NOOP);
|
|
3938
3968
|
};
|
|
3939
3969
|
}
|
|
@@ -3954,7 +3984,7 @@ var Vue = (function() {
|
|
|
3954
3984
|
}
|
|
3955
3985
|
return child;
|
|
3956
3986
|
}
|
|
3957
|
-
const BaseTransition = BaseTransitionImpl;
|
|
3987
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3958
3988
|
function getLeavingNodesForType(state, vnode) {
|
|
3959
3989
|
const { leavingNodes } = state;
|
|
3960
3990
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3992,7 +4022,7 @@ var Vue = (function() {
|
|
|
3992
4022
|
return hooks;
|
|
3993
4023
|
}
|
|
3994
4024
|
}, props, state, instance);
|
|
3995
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
4025
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3996
4026
|
__vapor: true,
|
|
3997
4027
|
props,
|
|
3998
4028
|
state,
|
|
@@ -4169,7 +4199,7 @@ var Vue = (function() {
|
|
|
4169
4199
|
function setTransitionHooks(vnode, hooks) {
|
|
4170
4200
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
4171
4201
|
vnode.transition = hooks;
|
|
4172
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4202
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
4173
4203
|
else {
|
|
4174
4204
|
const subTree = vnode.component.subTree;
|
|
4175
4205
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -4208,7 +4238,7 @@ var Vue = (function() {
|
|
|
4208
4238
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
4209
4239
|
}
|
|
4210
4240
|
function getTransitionRoot(vnode) {
|
|
4211
|
-
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
4241
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
4212
4242
|
if (vnode.type === Fragment) {
|
|
4213
4243
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
4214
4244
|
return child ? getTransitionRoot(child) : void 0;
|
|
@@ -4395,6 +4425,8 @@ var Vue = (function() {
|
|
|
4395
4425
|
if (isMathMLContainer(container)) return "mathml";
|
|
4396
4426
|
};
|
|
4397
4427
|
const isComment = (node) => node.nodeType === 8;
|
|
4428
|
+
/** The data of a comment opening a range a hydration steps over as one. */
|
|
4429
|
+
const isRangeStart = (data) => data === "[" || data === "(" || isVaporBranchStart(data);
|
|
4398
4430
|
function createHydrationFunctions(rendererInternals) {
|
|
4399
4431
|
const { mt: mountComponent, p: patch, o: { patchProp, createText, nextSibling, parentNode, remove, insert, createComment } } = rendererInternals;
|
|
4400
4432
|
const hydrate = (vnode, container) => {
|
|
@@ -4412,7 +4444,7 @@ var Vue = (function() {
|
|
|
4412
4444
|
};
|
|
4413
4445
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
4414
4446
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
4415
|
-
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
4447
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(" || isVaporInteropEnabled && isVaporBranchStart(node.data));
|
|
4416
4448
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
4417
4449
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
4418
4450
|
let domType = node.nodeType;
|
|
@@ -4468,7 +4500,7 @@ var Vue = (function() {
|
|
|
4468
4500
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4469
4501
|
break;
|
|
4470
4502
|
case VaporSlot:
|
|
4471
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4503
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4472
4504
|
break;
|
|
4473
4505
|
default: if (shapeFlag & 1) {
|
|
4474
4506
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode$1(node)) nextNode = onMismatch();
|
|
@@ -4600,7 +4632,7 @@ var Vue = (function() {
|
|
|
4600
4632
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4601
4633
|
const container = parentNode(node);
|
|
4602
4634
|
const first = nextSibling(node);
|
|
4603
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4635
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4604
4636
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4605
4637
|
else {
|
|
4606
4638
|
logMismatchError();
|
|
@@ -4610,7 +4642,7 @@ var Vue = (function() {
|
|
|
4610
4642
|
};
|
|
4611
4643
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
4612
4644
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
4613
|
-
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data
|
|
4645
|
+
warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && isRangeStart(node.data) ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
4614
4646
|
logMismatchError();
|
|
4615
4647
|
}
|
|
4616
4648
|
vnode.el = null;
|
|
@@ -4637,7 +4669,7 @@ var Vue = (function() {
|
|
|
4637
4669
|
while (node) {
|
|
4638
4670
|
node = nextSibling(node);
|
|
4639
4671
|
if (node && isComment(node)) {
|
|
4640
|
-
if (node.data === open) match++;
|
|
4672
|
+
if (node.data === open || isVaporInteropEnabled && open === "[" && isVaporBranchStart(node.data)) match++;
|
|
4641
4673
|
if (node.data === close) {
|
|
4642
4674
|
if (match === 0) return nextSibling(node);
|
|
4643
4675
|
else match--;
|
|
@@ -4893,9 +4925,9 @@ var Vue = (function() {
|
|
|
4893
4925
|
return teardown;
|
|
4894
4926
|
};
|
|
4895
4927
|
function forEachElement(node, cb) {
|
|
4896
|
-
if (isComment(node) && (node.data
|
|
4928
|
+
if (isComment(node) && isRangeStart(node.data)) {
|
|
4897
4929
|
const open = node.data;
|
|
4898
|
-
const close = open === "
|
|
4930
|
+
const close = open === "(" ? ")" : "]";
|
|
4899
4931
|
let depth = 1;
|
|
4900
4932
|
let next = node.nextSibling;
|
|
4901
4933
|
while (next) {
|
|
@@ -4904,7 +4936,7 @@ var Vue = (function() {
|
|
|
4904
4936
|
} else if (isComment(next)) {
|
|
4905
4937
|
if (next.data === close) {
|
|
4906
4938
|
if (--depth === 0) break;
|
|
4907
|
-
} else if (next.data === open) depth++;
|
|
4939
|
+
} else if (close === "]" ? next.data === "[" || isVaporBranchStart(next.data) : next.data === open) depth++;
|
|
4908
4940
|
}
|
|
4909
4941
|
next = next.nextSibling;
|
|
4910
4942
|
}
|
|
@@ -5007,7 +5039,7 @@ var Vue = (function() {
|
|
|
5007
5039
|
setPendingRequest: (request) => pendingRequest = request
|
|
5008
5040
|
};
|
|
5009
5041
|
}
|
|
5010
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
5042
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
5011
5043
|
const loaded = /* @__PURE__ */ ref(false);
|
|
5012
5044
|
const error = /* @__PURE__ */ ref();
|
|
5013
5045
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -5064,6 +5096,11 @@ var Vue = (function() {
|
|
|
5064
5096
|
//#endregion
|
|
5065
5097
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
5066
5098
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
5099
|
+
let isKeepAliveEnabled = false;
|
|
5100
|
+
function withKeepAliveEnabled(value) {
|
|
5101
|
+
isKeepAliveEnabled = true;
|
|
5102
|
+
return value;
|
|
5103
|
+
}
|
|
5067
5104
|
const KeepAliveImpl = {
|
|
5068
5105
|
name: `KeepAlive`,
|
|
5069
5106
|
__isKeepAlive: true,
|
|
@@ -5208,7 +5245,7 @@ var Vue = (function() {
|
|
|
5208
5245
|
t.__isBuiltIn = true;
|
|
5209
5246
|
return t;
|
|
5210
5247
|
};
|
|
5211
|
-
const KeepAlive = /*@__PURE__*/ decorate$2(KeepAliveImpl);
|
|
5248
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled(/*@__PURE__*/ decorate$2(KeepAliveImpl));
|
|
5212
5249
|
function matches(pattern, name) {
|
|
5213
5250
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
5214
5251
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -5654,11 +5691,12 @@ var Vue = (function() {
|
|
|
5654
5691
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
5655
5692
|
if (props == null) props = {};
|
|
5656
5693
|
let slot = slots[name];
|
|
5657
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5694
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
5658
5695
|
if (vaporSlot) {
|
|
5659
5696
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
5660
5697
|
ret.vs = {
|
|
5661
5698
|
slot: vaporSlot,
|
|
5699
|
+
name,
|
|
5662
5700
|
outlets: fallback ? [{
|
|
5663
5701
|
fallback,
|
|
5664
5702
|
owner: currentRenderingInstance
|
|
@@ -5689,7 +5727,7 @@ var Vue = (function() {
|
|
|
5689
5727
|
try {
|
|
5690
5728
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5691
5729
|
let attached = false;
|
|
5692
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5730
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
5693
5731
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
5694
5732
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5695
5733
|
}
|
|
@@ -6648,7 +6686,7 @@ var Vue = (function() {
|
|
|
6648
6686
|
if (options.el) return vm.$mount(options.el);
|
|
6649
6687
|
else return vm;
|
|
6650
6688
|
}
|
|
6651
|
-
Vue.version = `2.6.14-compat:3.6.0-rc.
|
|
6689
|
+
Vue.version = `2.6.14-compat:3.6.0-rc.14`;
|
|
6652
6690
|
Vue.config = singletonApp.config;
|
|
6653
6691
|
Vue.use = (plugin, ...options) => {
|
|
6654
6692
|
if (plugin && isFunction(plugin.install)) plugin.install(Vue, ...options);
|
|
@@ -8012,7 +8050,7 @@ var Vue = (function() {
|
|
|
8012
8050
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8013
8051
|
break;
|
|
8014
8052
|
case VaporSlot:
|
|
8015
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8053
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
8016
8054
|
break;
|
|
8017
8055
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
8018
8056
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -8146,7 +8184,7 @@ var Vue = (function() {
|
|
|
8146
8184
|
let vnodeHook;
|
|
8147
8185
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
8148
8186
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8149
|
-
if (n2.ibu) n2.ibu();
|
|
8187
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
8150
8188
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
8151
8189
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
8152
8190
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -8180,9 +8218,9 @@ var Vue = (function() {
|
|
|
8180
8218
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
8181
8219
|
}
|
|
8182
8220
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
8183
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
8221
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
8184
8222
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
8185
|
-
n2.iu && n2.iu();
|
|
8223
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
8186
8224
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
8187
8225
|
}, void 0, parentSuspense);
|
|
8188
8226
|
};
|
|
@@ -8398,7 +8436,7 @@ var Vue = (function() {
|
|
|
8398
8436
|
} else next = vnode;
|
|
8399
8437
|
if (bu) invokeArrayFns(bu);
|
|
8400
8438
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8401
|
-
if (next.ibu) next.ibu();
|
|
8439
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
8402
8440
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) instance.emit("hook:beforeUpdate");
|
|
8403
8441
|
toggleRecurse(instance, true);
|
|
8404
8442
|
startMeasure(instance, `render`);
|
|
@@ -8412,9 +8450,9 @@ var Vue = (function() {
|
|
|
8412
8450
|
next.el = nextTree.el;
|
|
8413
8451
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
8414
8452
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
8415
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
8453
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
8416
8454
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
8417
|
-
next.iu && next.iu();
|
|
8455
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
8418
8456
|
}, void 0, parentSuspense);
|
|
8419
8457
|
if (isCompatEnabled$1("INSTANCE_EVENT_HOOKS", instance)) queuePostRenderEffect(() => instance.emit("hook:updated"), void 0, parentSuspense);
|
|
8420
8458
|
devtoolsComponentUpdated(instance);
|
|
@@ -8567,7 +8605,7 @@ var Vue = (function() {
|
|
|
8567
8605
|
};
|
|
8568
8606
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
8569
8607
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
8570
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
8608
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
8571
8609
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
8572
8610
|
return;
|
|
8573
8611
|
}
|
|
@@ -8611,11 +8649,11 @@ var Vue = (function() {
|
|
|
8611
8649
|
}
|
|
8612
8650
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
8613
8651
|
if (shapeFlag & 256) {
|
|
8614
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8652
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
8615
8653
|
else parentComponent.ctx.deactivate(vnode);
|
|
8616
8654
|
return;
|
|
8617
8655
|
}
|
|
8618
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
8656
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
8619
8657
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8620
8658
|
return;
|
|
8621
8659
|
}
|
|
@@ -8633,7 +8671,7 @@ var Vue = (function() {
|
|
|
8633
8671
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
8634
8672
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
8635
8673
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
8636
|
-
if (type === VaporSlot) {
|
|
8674
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
8637
8675
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
8638
8676
|
return;
|
|
8639
8677
|
}
|
|
@@ -8667,7 +8705,7 @@ var Vue = (function() {
|
|
|
8667
8705
|
if (transition) {
|
|
8668
8706
|
let leavingEl = leavingNode && leavingNode.el;
|
|
8669
8707
|
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
8670
|
-
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8708
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
8671
8709
|
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
8672
8710
|
isElement = !!leavingEl;
|
|
8673
8711
|
}
|
|
@@ -8708,7 +8746,7 @@ var Vue = (function() {
|
|
|
8708
8746
|
};
|
|
8709
8747
|
const getNextHostNode = (vnode) => {
|
|
8710
8748
|
if (vnode.shapeFlag & 6) {
|
|
8711
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8749
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
8712
8750
|
return getNextHostNode(vnode.component.subTree);
|
|
8713
8751
|
}
|
|
8714
8752
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -8769,7 +8807,7 @@ var Vue = (function() {
|
|
|
8769
8807
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
8770
8808
|
}
|
|
8771
8809
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
8772
|
-
if (!vapor) {
|
|
8810
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
8773
8811
|
if (allowed) {
|
|
8774
8812
|
effect.flags |= 128;
|
|
8775
8813
|
job.flags |= 2;
|
|
@@ -8881,7 +8919,7 @@ var Vue = (function() {
|
|
|
8881
8919
|
currentParent = currentParent.parent;
|
|
8882
8920
|
} else break;
|
|
8883
8921
|
}
|
|
8884
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8922
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
8885
8923
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
8886
8924
|
return inheritedScopeIds;
|
|
8887
8925
|
}
|
|
@@ -8894,8 +8932,13 @@ var Vue = (function() {
|
|
|
8894
8932
|
//#endregion
|
|
8895
8933
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
8896
8934
|
const isSuspense = (type) => type.__isSuspense;
|
|
8935
|
+
let isSuspenseEnabled = false;
|
|
8936
|
+
function withSuspenseEnabled(value) {
|
|
8937
|
+
isSuspenseEnabled = true;
|
|
8938
|
+
return value;
|
|
8939
|
+
}
|
|
8897
8940
|
let suspenseId = 0;
|
|
8898
|
-
const Suspense = {
|
|
8941
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
8899
8942
|
name: "Suspense",
|
|
8900
8943
|
__isSuspense: true,
|
|
8901
8944
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -8912,7 +8955,7 @@ var Vue = (function() {
|
|
|
8912
8955
|
},
|
|
8913
8956
|
hydrate: hydrateSuspense,
|
|
8914
8957
|
normalize: normalizeSuspenseChildren
|
|
8915
|
-
};
|
|
8958
|
+
});
|
|
8916
8959
|
function triggerEvent(vnode, name) {
|
|
8917
8960
|
const eventListener = vnode.props && vnode.props[name];
|
|
8918
8961
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -9491,16 +9534,23 @@ var Vue = (function() {
|
|
|
9491
9534
|
if (!vaporSlot) return vaporSlot;
|
|
9492
9535
|
const cloned = {
|
|
9493
9536
|
slot: vaporSlot.slot,
|
|
9537
|
+
name: vaporSlot.name,
|
|
9494
9538
|
outlets: vaporSlot.outlets,
|
|
9495
|
-
props: vaporSlot.props
|
|
9539
|
+
props: vaporSlot.props,
|
|
9540
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
9541
|
+
group: vaporSlot.group
|
|
9496
9542
|
};
|
|
9497
|
-
|
|
9543
|
+
const attrs = cloned.attrs;
|
|
9544
|
+
if (extraProps && vaporSlot.props) {
|
|
9498
9545
|
let extraSlotProps;
|
|
9499
|
-
for (const key in extraProps) if (key !== "key") {
|
|
9546
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
9500
9547
|
if (!extraSlotProps) extraSlotProps = {};
|
|
9501
9548
|
extraSlotProps[key] = extraProps[key];
|
|
9502
9549
|
}
|
|
9503
|
-
if (extraSlotProps)
|
|
9550
|
+
if (extraSlotProps) {
|
|
9551
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
9552
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
9553
|
+
}
|
|
9504
9554
|
}
|
|
9505
9555
|
if (vnode.el) {
|
|
9506
9556
|
cloned.state = vaporSlot.state;
|
|
@@ -9773,7 +9823,7 @@ var Vue = (function() {
|
|
|
9773
9823
|
isSSR && setInSSRSetupState(isSSR);
|
|
9774
9824
|
const { props, children, vi } = instance.vnode;
|
|
9775
9825
|
const isStateful = isStatefulComponent(instance);
|
|
9776
|
-
if (vi) vi(instance);
|
|
9826
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
9777
9827
|
else {
|
|
9778
9828
|
initProps(instance, props, isStateful, isSSR);
|
|
9779
9829
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -10195,7 +10245,7 @@ var Vue = (function() {
|
|
|
10195
10245
|
}
|
|
10196
10246
|
//#endregion
|
|
10197
10247
|
//#region packages/runtime-core/src/index.ts
|
|
10198
|
-
const version = "3.6.0-rc.
|
|
10248
|
+
const version = "3.6.0-rc.14";
|
|
10199
10249
|
const warn = warn$1;
|
|
10200
10250
|
/**
|
|
10201
10251
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -10628,14 +10678,14 @@ var Vue = (function() {
|
|
|
10628
10678
|
}
|
|
10629
10679
|
while (vnode.component) {
|
|
10630
10680
|
const component = vnode.component;
|
|
10631
|
-
if (component.vapor) {
|
|
10681
|
+
if (isVaporInteropEnabled && component.vapor) {
|
|
10632
10682
|
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
10633
10683
|
return;
|
|
10634
10684
|
}
|
|
10635
10685
|
vnode = vnode.component.subTree;
|
|
10636
10686
|
}
|
|
10637
10687
|
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
10638
|
-
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10688
|
+
else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
10639
10689
|
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
10640
10690
|
else if (vnode.type === Static) {
|
|
10641
10691
|
let { el, anchor } = vnode;
|
|
@@ -11340,7 +11390,7 @@ var Vue = (function() {
|
|
|
11340
11390
|
t.__isBuiltIn = true;
|
|
11341
11391
|
return t;
|
|
11342
11392
|
};
|
|
11343
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
11393
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
11344
11394
|
name: "TransitionGroup",
|
|
11345
11395
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
11346
11396
|
tag: String,
|
|
@@ -11349,6 +11399,11 @@ var Vue = (function() {
|
|
|
11349
11399
|
setup(props, { slots }) {
|
|
11350
11400
|
const instance = getCurrentInstance();
|
|
11351
11401
|
const state = useTransitionState();
|
|
11402
|
+
const group = {
|
|
11403
|
+
props: {},
|
|
11404
|
+
state,
|
|
11405
|
+
instance
|
|
11406
|
+
};
|
|
11352
11407
|
let prevChildren;
|
|
11353
11408
|
let children;
|
|
11354
11409
|
let origins;
|
|
@@ -11379,7 +11434,7 @@ var Vue = (function() {
|
|
|
11379
11434
|
});
|
|
11380
11435
|
return () => {
|
|
11381
11436
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
11382
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
11437
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
11383
11438
|
let tag = rawProps.tag || Fragment;
|
|
11384
11439
|
if (!rawProps.tag && compatUtils.checkCompatEnabled("TRANSITION_GROUP_ROOT", instance.parent)) tag = "span";
|
|
11385
11440
|
prevChildren = [];
|
|
@@ -11390,12 +11445,17 @@ var Vue = (function() {
|
|
|
11390
11445
|
prevChildren.push(child);
|
|
11391
11446
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11392
11447
|
positionMap.set(child, getPosition(child.el));
|
|
11393
|
-
}
|
|
11448
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
11449
|
+
const row = { el };
|
|
11450
|
+
prevChildren.push(row);
|
|
11451
|
+
positionMap.set(row, getPosition(el));
|
|
11452
|
+
});
|
|
11394
11453
|
}
|
|
11395
11454
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
11396
11455
|
for (let i = 0; i < children.length; i++) {
|
|
11397
11456
|
const child = children[i];
|
|
11398
|
-
if (child.
|
|
11457
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
11458
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
11399
11459
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
11400
11460
|
}
|
|
11401
11461
|
if (prevChildren.length) {
|
|
@@ -11409,7 +11469,7 @@ var Vue = (function() {
|
|
|
11409
11469
|
return createVNode(tag, null, children);
|
|
11410
11470
|
};
|
|
11411
11471
|
}
|
|
11412
|
-
});
|
|
11472
|
+
}));
|
|
11413
11473
|
function callPendingCbs(el) {
|
|
11414
11474
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
11415
11475
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -11553,7 +11613,7 @@ var Vue = (function() {
|
|
|
11553
11613
|
if (e.target.composing) return;
|
|
11554
11614
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
11555
11615
|
});
|
|
11556
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
11616
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
11557
11617
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
11558
11618
|
});
|
|
11559
11619
|
if (!lazy) {
|
|
@@ -11915,6 +11975,7 @@ var Vue = (function() {
|
|
|
11915
11975
|
initCustomFormatter: () => initCustomFormatter,
|
|
11916
11976
|
initDirectivesForSSR: () => initDirectivesForSSR,
|
|
11917
11977
|
inject: () => inject,
|
|
11978
|
+
isKeepAliveEnabled: () => isKeepAliveEnabled,
|
|
11918
11979
|
isMemoSame: () => isMemoSame,
|
|
11919
11980
|
isProxy: () => isProxy,
|
|
11920
11981
|
isReactive: () => isReactive,
|
|
@@ -11922,7 +11983,10 @@ var Vue = (function() {
|
|
|
11922
11983
|
isRef: () => isRef,
|
|
11923
11984
|
isRuntimeOnly: () => isRuntimeOnly,
|
|
11924
11985
|
isShallow: () => isShallow,
|
|
11986
|
+
isSuspenseEnabled: () => isSuspenseEnabled,
|
|
11987
|
+
isTransitionEnabled: () => isTransitionEnabled,
|
|
11925
11988
|
isVNode: () => isVNode,
|
|
11989
|
+
isVaporInteropEnabled: () => isVaporInteropEnabled,
|
|
11926
11990
|
markRaw: () => markRaw,
|
|
11927
11991
|
mergeDefaults: () => mergeDefaults,
|
|
11928
11992
|
mergeModels: () => mergeModels,
|
|
@@ -11969,6 +12033,7 @@ var Vue = (function() {
|
|
|
11969
12033
|
setDevtoolsHook: () => setDevtoolsHook,
|
|
11970
12034
|
setIsHydratingEnabled: () => setIsHydratingEnabled,
|
|
11971
12035
|
setTransitionHooks: () => setTransitionHooks,
|
|
12036
|
+
setVaporInteropEnabled: () => setVaporInteropEnabled,
|
|
11972
12037
|
shallowReactive: () => shallowReactive,
|
|
11973
12038
|
shallowReadonly: () => shallowReadonly,
|
|
11974
12039
|
shallowRef: () => shallowRef,
|
|
@@ -12013,10 +12078,13 @@ var Vue = (function() {
|
|
|
12013
12078
|
withCtx: () => withCtx,
|
|
12014
12079
|
withDefaults: () => withDefaults,
|
|
12015
12080
|
withDirectives: () => withDirectives,
|
|
12081
|
+
withKeepAliveEnabled: () => withKeepAliveEnabled,
|
|
12016
12082
|
withKeys: () => withKeys,
|
|
12017
12083
|
withMemo: () => withMemo,
|
|
12018
12084
|
withModifiers: () => withModifiers,
|
|
12019
|
-
withScopeId: () => withScopeId
|
|
12085
|
+
withScopeId: () => withScopeId,
|
|
12086
|
+
withSuspenseEnabled: () => withSuspenseEnabled,
|
|
12087
|
+
withTransitionEnabled: () => withTransitionEnabled
|
|
12020
12088
|
});
|
|
12021
12089
|
const rendererOptions = /*@__PURE__*/ extend({ patchProp }, nodeOps);
|
|
12022
12090
|
let renderer;
|