@vue/runtime-dom 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/runtime-dom.cjs.js +17 -6
- package/dist/runtime-dom.cjs.prod.js +17 -6
- package/dist/runtime-dom.esm-browser.js +89 -46
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +20 -10
- package/dist/runtime-dom.global.js +116 -45
- package/dist/runtime-dom.global.prod.js +4 -4
- package/package.json +4 -4
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { BaseTransition, BaseTransitionPropsValidators, Fragment, Static, Text, assertNumber, callWithAsyncErrorHandling, camelize, createHydrationRenderer, createRenderer, createVNode, defineComponent, getCurrentInstance, getTransitionRawChildren, h, isRuntimeOnly, nextTick, onBeforeUpdate, onMounted, onUnmounted, onUpdated, queuePostFlushCb, resolveTransitionHooks, setIsHydratingEnabled, setTransitionHooks, toRaw, unref, useInstanceOption, useTransitionState, warn, watch } from "@vue/runtime-core";
|
|
6
|
+
import { BaseTransition, BaseTransitionPropsValidators, Fragment, Static, Text, assertNumber, callWithAsyncErrorHandling, camelize, createHydrationRenderer, createRenderer, createVNode, defineComponent, getCurrentInstance, getTransitionRawChildren, h, isRuntimeOnly, isVaporInteropEnabled, nextTick, onBeforeUpdate, onMounted, onUnmounted, onUpdated, queuePostFlushCb, resolveTransitionHooks, setIsHydratingEnabled, setTransitionHooks, toRaw, unref, useInstanceOption, useTransitionState, warn, watch, withTransitionEnabled } from "@vue/runtime-core";
|
|
7
7
|
import { EMPTY_OBJ, NOOP, camelize as camelize$1, canSetValueDirectly, capitalize, extend, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isFunction, isHTMLTag, isMathMLTag, isModelListener, isNativeOn, isObject, isOn, isPlainObject, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, looseEqual, looseIndexOf, looseToNumber, normalizeCssVarValue, shouldSetAsAttr, toNumber } from "@vue/shared";
|
|
8
8
|
export * from "@vue/runtime-core";
|
|
9
9
|
//#region packages/runtime-dom/src/nodeOps.ts
|
|
@@ -400,14 +400,14 @@ function setVarsOnVNode(vnode, vars) {
|
|
|
400
400
|
}
|
|
401
401
|
while (vnode.component) {
|
|
402
402
|
const component = vnode.component;
|
|
403
|
-
if (component.vapor) {
|
|
403
|
+
if (isVaporInteropEnabled && component.vapor) {
|
|
404
404
|
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
405
405
|
return;
|
|
406
406
|
}
|
|
407
407
|
vnode = vnode.component.subTree;
|
|
408
408
|
}
|
|
409
409
|
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
410
|
-
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
410
|
+
else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
411
411
|
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
412
412
|
else if (vnode.type === Static) {
|
|
413
413
|
let { el, anchor } = vnode;
|
|
@@ -1110,7 +1110,7 @@ const decorate = (t) => {
|
|
|
1110
1110
|
delete t.props.mode;
|
|
1111
1111
|
return t;
|
|
1112
1112
|
};
|
|
1113
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
1113
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
1114
1114
|
name: "TransitionGroup",
|
|
1115
1115
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
1116
1116
|
tag: String,
|
|
@@ -1119,6 +1119,11 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
1119
1119
|
setup(props, { slots }) {
|
|
1120
1120
|
const instance = getCurrentInstance();
|
|
1121
1121
|
const state = useTransitionState();
|
|
1122
|
+
const group = {
|
|
1123
|
+
props: {},
|
|
1124
|
+
state,
|
|
1125
|
+
instance
|
|
1126
|
+
};
|
|
1122
1127
|
let prevChildren;
|
|
1123
1128
|
let children;
|
|
1124
1129
|
let origins;
|
|
@@ -1149,7 +1154,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
1149
1154
|
});
|
|
1150
1155
|
return () => {
|
|
1151
1156
|
const rawProps = toRaw(props);
|
|
1152
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
1157
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
1153
1158
|
let tag = rawProps.tag || Fragment;
|
|
1154
1159
|
prevChildren = [];
|
|
1155
1160
|
moves = void 0;
|
|
@@ -1159,12 +1164,17 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
1159
1164
|
prevChildren.push(child);
|
|
1160
1165
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
1161
1166
|
positionMap.set(child, getPosition(child.el));
|
|
1162
|
-
}
|
|
1167
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
1168
|
+
const row = { el };
|
|
1169
|
+
prevChildren.push(row);
|
|
1170
|
+
positionMap.set(row, getPosition(el));
|
|
1171
|
+
});
|
|
1163
1172
|
}
|
|
1164
1173
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
1165
1174
|
for (let i = 0; i < children.length; i++) {
|
|
1166
1175
|
const child = children[i];
|
|
1167
|
-
if (child.
|
|
1176
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
1177
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
1168
1178
|
else if (!!(process.env.NODE_ENV !== "production") && child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
1169
1179
|
}
|
|
1170
1180
|
if (prevChildren.length) {
|
|
@@ -1178,7 +1188,7 @@ const TransitionGroup = /* @__PURE__ */ decorate({
|
|
|
1178
1188
|
return createVNode(tag, null, children);
|
|
1179
1189
|
};
|
|
1180
1190
|
}
|
|
1181
|
-
});
|
|
1191
|
+
}));
|
|
1182
1192
|
function callPendingCbs(el) {
|
|
1183
1193
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
1184
1194
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -1322,7 +1332,7 @@ const vModelTextInit = (el, trim, number, lazy, set) => {
|
|
|
1322
1332
|
if (e.target.composing) return;
|
|
1323
1333
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
1324
1334
|
});
|
|
1325
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
1335
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
1326
1336
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
1327
1337
|
});
|
|
1328
1338
|
if (!lazy) {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-dom v3.6.0-rc.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -3209,6 +3209,16 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3209
3209
|
};
|
|
3210
3210
|
}
|
|
3211
3211
|
//#endregion
|
|
3212
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
3213
|
+
/**
|
|
3214
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
3215
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
3216
|
+
*/
|
|
3217
|
+
let isVaporInteropEnabled = false;
|
|
3218
|
+
function setVaporInteropEnabled() {
|
|
3219
|
+
isVaporInteropEnabled = true;
|
|
3220
|
+
}
|
|
3221
|
+
//#endregion
|
|
3212
3222
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
3213
3223
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
3214
3224
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -3468,13 +3478,18 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3468
3478
|
onAfterAppear: TransitionHookValidator,
|
|
3469
3479
|
onAppearCancelled: TransitionHookValidator
|
|
3470
3480
|
};
|
|
3481
|
+
let isTransitionEnabled = false;
|
|
3482
|
+
function withTransitionEnabled(value) {
|
|
3483
|
+
isTransitionEnabled = true;
|
|
3484
|
+
return value;
|
|
3485
|
+
}
|
|
3471
3486
|
function isEmptyTransitionChild(vnode, instance) {
|
|
3472
3487
|
if (vnode.type === Comment) return true;
|
|
3473
3488
|
if (vnode.type === Fragment) {
|
|
3474
3489
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3475
3490
|
return !child || isEmptyTransitionChild(child, instance);
|
|
3476
3491
|
}
|
|
3477
|
-
if (vnode.type === VaporSlot || isVaporComponent(vnode.type)) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3492
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
3478
3493
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
3479
3494
|
}
|
|
3480
3495
|
const BaseTransitionImpl = {
|
|
@@ -3491,7 +3506,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3491
3506
|
const { mode } = rawProps;
|
|
3492
3507
|
checkTransitionMode(mode);
|
|
3493
3508
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
3494
|
-
if (!(instance.
|
|
3509
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
3495
3510
|
}) : NOOP);
|
|
3496
3511
|
};
|
|
3497
3512
|
}
|
|
@@ -3511,7 +3526,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3511
3526
|
}
|
|
3512
3527
|
return child;
|
|
3513
3528
|
}
|
|
3514
|
-
const BaseTransition = BaseTransitionImpl;
|
|
3529
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
3515
3530
|
function getLeavingNodesForType(state, vnode) {
|
|
3516
3531
|
const { leavingNodes } = state;
|
|
3517
3532
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -3549,7 +3564,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3549
3564
|
return hooks;
|
|
3550
3565
|
}
|
|
3551
3566
|
}, props, state, instance);
|
|
3552
|
-
if (vnode.type === VaporSlot) extend(hooks, {
|
|
3567
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) extend(hooks, {
|
|
3553
3568
|
__vapor: true,
|
|
3554
3569
|
props,
|
|
3555
3570
|
state,
|
|
@@ -3726,7 +3741,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3726
3741
|
function setTransitionHooks(vnode, hooks) {
|
|
3727
3742
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
3728
3743
|
vnode.transition = hooks;
|
|
3729
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3744
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
3730
3745
|
else {
|
|
3731
3746
|
const subTree = vnode.component.subTree;
|
|
3732
3747
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -3765,7 +3780,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
3765
3780
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
3766
3781
|
}
|
|
3767
3782
|
function getTransitionRoot(vnode) {
|
|
3768
|
-
if (vnode.component && !isVaporComponent(vnode.type)) return getTransitionRoot(vnode.component.subTree);
|
|
3783
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
3769
3784
|
if (vnode.type === Fragment) {
|
|
3770
3785
|
const child = isArray(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
3771
3786
|
return child ? getTransitionRoot(child) : void 0;
|
|
@@ -4025,7 +4040,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4025
4040
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4026
4041
|
break;
|
|
4027
4042
|
case VaporSlot:
|
|
4028
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4043
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
4029
4044
|
break;
|
|
4030
4045
|
default: if (shapeFlag & 1) {
|
|
4031
4046
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
@@ -4157,7 +4172,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4157
4172
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
4158
4173
|
const container = parentNode(node);
|
|
4159
4174
|
const first = nextSibling(node);
|
|
4160
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4175
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
4161
4176
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
4162
4177
|
else {
|
|
4163
4178
|
logMismatchError();
|
|
@@ -4564,7 +4579,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4564
4579
|
setPendingRequest: (request) => pendingRequest = request
|
|
4565
4580
|
};
|
|
4566
4581
|
}
|
|
4567
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
4582
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
4568
4583
|
const loaded = /* @__PURE__ */ ref(false);
|
|
4569
4584
|
const error = /* @__PURE__ */ ref();
|
|
4570
4585
|
const delayed = /* @__PURE__ */ ref(!!delay);
|
|
@@ -4621,7 +4636,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4621
4636
|
//#endregion
|
|
4622
4637
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
4623
4638
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
4624
|
-
|
|
4639
|
+
let isKeepAliveEnabled = false;
|
|
4640
|
+
function withKeepAliveEnabled(value) {
|
|
4641
|
+
isKeepAliveEnabled = true;
|
|
4642
|
+
return value;
|
|
4643
|
+
}
|
|
4644
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
|
|
4625
4645
|
name: `KeepAlive`,
|
|
4626
4646
|
__isKeepAlive: true,
|
|
4627
4647
|
props: {
|
|
@@ -4760,7 +4780,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4760
4780
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
4761
4781
|
};
|
|
4762
4782
|
}
|
|
4763
|
-
};
|
|
4783
|
+
});
|
|
4764
4784
|
function matches(pattern, name) {
|
|
4765
4785
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
4766
4786
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -4992,11 +5012,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
4992
5012
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
4993
5013
|
if (props == null) props = {};
|
|
4994
5014
|
let slot = slots[name];
|
|
4995
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
5015
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
4996
5016
|
if (vaporSlot) {
|
|
4997
5017
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
4998
5018
|
ret.vs = {
|
|
4999
5019
|
slot: vaporSlot,
|
|
5020
|
+
name,
|
|
5000
5021
|
outlets: fallback ? [{
|
|
5001
5022
|
fallback,
|
|
5002
5023
|
owner: currentRenderingInstance
|
|
@@ -5027,7 +5048,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
5027
5048
|
try {
|
|
5028
5049
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
5029
5050
|
let attached = false;
|
|
5030
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
5051
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
5031
5052
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
5032
5053
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
5033
5054
|
}
|
|
@@ -6711,7 +6732,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6711
6732
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6712
6733
|
break;
|
|
6713
6734
|
case VaporSlot:
|
|
6714
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6735
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
6715
6736
|
break;
|
|
6716
6737
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
6717
6738
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -6845,7 +6866,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6845
6866
|
let vnodeHook;
|
|
6846
6867
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
6847
6868
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6848
|
-
if (n2.ibu) n2.ibu();
|
|
6869
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
6849
6870
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
6850
6871
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
6851
6872
|
if (isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -6879,9 +6900,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
6879
6900
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
6880
6901
|
}
|
|
6881
6902
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
6882
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
6903
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
6883
6904
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
6884
|
-
n2.iu && n2.iu();
|
|
6905
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
6885
6906
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
6886
6907
|
}, void 0, parentSuspense);
|
|
6887
6908
|
};
|
|
@@ -7089,7 +7110,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7089
7110
|
} else next = vnode;
|
|
7090
7111
|
if (bu) invokeArrayFns(bu);
|
|
7091
7112
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7092
|
-
if (next.ibu) next.ibu();
|
|
7113
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
7093
7114
|
toggleRecurse(instance, true);
|
|
7094
7115
|
startMeasure(instance, `render`);
|
|
7095
7116
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -7102,9 +7123,9 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7102
7123
|
next.el = nextTree.el;
|
|
7103
7124
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
7104
7125
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
7105
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
7126
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
7106
7127
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
7107
|
-
next.iu && next.iu();
|
|
7128
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
7108
7129
|
}, void 0, parentSuspense);
|
|
7109
7130
|
devtoolsComponentUpdated(instance);
|
|
7110
7131
|
popWarningContext();
|
|
@@ -7256,7 +7277,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7256
7277
|
};
|
|
7257
7278
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
7258
7279
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
7259
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
7280
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
7260
7281
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
7261
7282
|
return;
|
|
7262
7283
|
}
|
|
@@ -7300,11 +7321,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7300
7321
|
}
|
|
7301
7322
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
7302
7323
|
if (shapeFlag & 256) {
|
|
7303
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7324
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
7304
7325
|
else parentComponent.ctx.deactivate(vnode);
|
|
7305
7326
|
return;
|
|
7306
7327
|
}
|
|
7307
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
7328
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
7308
7329
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7309
7330
|
return;
|
|
7310
7331
|
}
|
|
@@ -7322,7 +7343,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7322
7343
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
7323
7344
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
7324
7345
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
7325
|
-
if (type === VaporSlot) {
|
|
7346
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
7326
7347
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
7327
7348
|
return;
|
|
7328
7349
|
}
|
|
@@ -7356,7 +7377,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7356
7377
|
if (transition) {
|
|
7357
7378
|
let leavingEl = leavingNode && leavingNode.el;
|
|
7358
7379
|
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
7359
|
-
if (isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7380
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
7360
7381
|
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
7361
7382
|
isElement = !!leavingEl;
|
|
7362
7383
|
}
|
|
@@ -7395,7 +7416,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7395
7416
|
};
|
|
7396
7417
|
const getNextHostNode = (vnode) => {
|
|
7397
7418
|
if (vnode.shapeFlag & 6) {
|
|
7398
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7419
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
7399
7420
|
return getNextHostNode(vnode.component.subTree);
|
|
7400
7421
|
}
|
|
7401
7422
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -7456,7 +7477,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7456
7477
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
7457
7478
|
}
|
|
7458
7479
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
7459
|
-
if (!vapor) {
|
|
7480
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
7460
7481
|
if (allowed) {
|
|
7461
7482
|
effect.flags |= 128;
|
|
7462
7483
|
job.flags |= 2;
|
|
@@ -7568,7 +7589,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7568
7589
|
currentParent = currentParent.parent;
|
|
7569
7590
|
} else break;
|
|
7570
7591
|
}
|
|
7571
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7592
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
7572
7593
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
7573
7594
|
return inheritedScopeIds;
|
|
7574
7595
|
}
|
|
@@ -7581,8 +7602,13 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7581
7602
|
//#endregion
|
|
7582
7603
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
7583
7604
|
const isSuspense = (type) => type.__isSuspense;
|
|
7605
|
+
let isSuspenseEnabled = false;
|
|
7606
|
+
function withSuspenseEnabled(value) {
|
|
7607
|
+
isSuspenseEnabled = true;
|
|
7608
|
+
return value;
|
|
7609
|
+
}
|
|
7584
7610
|
let suspenseId = 0;
|
|
7585
|
-
const Suspense = {
|
|
7611
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
7586
7612
|
name: "Suspense",
|
|
7587
7613
|
__isSuspense: true,
|
|
7588
7614
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -7599,7 +7625,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
7599
7625
|
},
|
|
7600
7626
|
hydrate: hydrateSuspense,
|
|
7601
7627
|
normalize: normalizeSuspenseChildren
|
|
7602
|
-
};
|
|
7628
|
+
});
|
|
7603
7629
|
function triggerEvent(vnode, name) {
|
|
7604
7630
|
const eventListener = vnode.props && vnode.props[name];
|
|
7605
7631
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -8134,16 +8160,23 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8134
8160
|
if (!vaporSlot) return vaporSlot;
|
|
8135
8161
|
const cloned = {
|
|
8136
8162
|
slot: vaporSlot.slot,
|
|
8163
|
+
name: vaporSlot.name,
|
|
8137
8164
|
outlets: vaporSlot.outlets,
|
|
8138
|
-
props: vaporSlot.props
|
|
8165
|
+
props: vaporSlot.props,
|
|
8166
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
8167
|
+
group: vaporSlot.group
|
|
8139
8168
|
};
|
|
8140
|
-
|
|
8169
|
+
const attrs = cloned.attrs;
|
|
8170
|
+
if (extraProps && vaporSlot.props) {
|
|
8141
8171
|
let extraSlotProps;
|
|
8142
|
-
for (const key in extraProps) if (key !== "key") {
|
|
8172
|
+
for (const key in extraProps) if (attrs ? !isReservedProp(key) : key !== "key") {
|
|
8143
8173
|
if (!extraSlotProps) extraSlotProps = {};
|
|
8144
8174
|
extraSlotProps[key] = extraProps[key];
|
|
8145
8175
|
}
|
|
8146
|
-
if (extraSlotProps)
|
|
8176
|
+
if (extraSlotProps) {
|
|
8177
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
8178
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
8179
|
+
}
|
|
8147
8180
|
}
|
|
8148
8181
|
if (vnode.el) {
|
|
8149
8182
|
cloned.state = vaporSlot.state;
|
|
@@ -8416,7 +8449,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8416
8449
|
isSSR && setInSSRSetupState(isSSR);
|
|
8417
8450
|
const { props, children, vi } = instance.vnode;
|
|
8418
8451
|
const isStateful = isStatefulComponent(instance);
|
|
8419
|
-
if (vi) vi(instance);
|
|
8452
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
8420
8453
|
else {
|
|
8421
8454
|
initProps(instance, props, isStateful, isSSR);
|
|
8422
8455
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -8834,7 +8867,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
8834
8867
|
}
|
|
8835
8868
|
//#endregion
|
|
8836
8869
|
//#region packages/runtime-core/src/index.ts
|
|
8837
|
-
const version = "3.6.0-rc.
|
|
8870
|
+
const version = "3.6.0-rc.13";
|
|
8838
8871
|
const warn = warn$1;
|
|
8839
8872
|
/**
|
|
8840
8873
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -9247,14 +9280,14 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9247
9280
|
}
|
|
9248
9281
|
while (vnode.component) {
|
|
9249
9282
|
const component = vnode.component;
|
|
9250
|
-
if (component.vapor) {
|
|
9283
|
+
if (isVaporInteropEnabled && component.vapor) {
|
|
9251
9284
|
component.appContext.vapor.applyCssVars(vnode, vars);
|
|
9252
9285
|
return;
|
|
9253
9286
|
}
|
|
9254
9287
|
vnode = vnode.component.subTree;
|
|
9255
9288
|
}
|
|
9256
9289
|
if (vnode.shapeFlag & 1 && vnode.el) setVarsOnNode(vnode.el, vars);
|
|
9257
|
-
else if (vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
9290
|
+
else if (isVaporInteropEnabled && vnode.vb) vnode.ctx.appContext.vapor.applyCssVars(vnode, vars);
|
|
9258
9291
|
else if (vnode.type === Fragment) vnode.children.forEach((c) => setVarsOnVNode(c, vars));
|
|
9259
9292
|
else if (vnode.type === Static) {
|
|
9260
9293
|
let { el, anchor } = vnode;
|
|
@@ -9933,7 +9966,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9933
9966
|
delete t.props.mode;
|
|
9934
9967
|
return t;
|
|
9935
9968
|
};
|
|
9936
|
-
const TransitionGroup = /* @__PURE__ */ decorate({
|
|
9969
|
+
const TransitionGroup = /*@__PURE__*/ withTransitionEnabled(/* @__PURE__ */ decorate({
|
|
9937
9970
|
name: "TransitionGroup",
|
|
9938
9971
|
props: /*@__PURE__*/ extend({}, TransitionPropsValidators, {
|
|
9939
9972
|
tag: String,
|
|
@@ -9942,6 +9975,11 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9942
9975
|
setup(props, { slots }) {
|
|
9943
9976
|
const instance = getCurrentInstance();
|
|
9944
9977
|
const state = useTransitionState();
|
|
9978
|
+
const group = {
|
|
9979
|
+
props: {},
|
|
9980
|
+
state,
|
|
9981
|
+
instance
|
|
9982
|
+
};
|
|
9945
9983
|
let prevChildren;
|
|
9946
9984
|
let children;
|
|
9947
9985
|
let origins;
|
|
@@ -9972,7 +10010,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9972
10010
|
});
|
|
9973
10011
|
return () => {
|
|
9974
10012
|
const rawProps = /* @__PURE__ */ toRaw(props);
|
|
9975
|
-
const cssTransitionProps = resolveTransitionProps(rawProps);
|
|
10013
|
+
const cssTransitionProps = group.props = resolveTransitionProps(rawProps);
|
|
9976
10014
|
let tag = rawProps.tag || Fragment;
|
|
9977
10015
|
prevChildren = [];
|
|
9978
10016
|
moves = void 0;
|
|
@@ -9982,12 +10020,17 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
9982
10020
|
prevChildren.push(child);
|
|
9983
10021
|
setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9984
10022
|
positionMap.set(child, getPosition(child.el));
|
|
9985
|
-
}
|
|
10023
|
+
} else if (isVaporInteropEnabled && child.vs && child.vb) instance.appContext.vapor.forEachGroupChild(child, (el) => {
|
|
10024
|
+
const row = { el };
|
|
10025
|
+
prevChildren.push(row);
|
|
10026
|
+
positionMap.set(row, getPosition(el));
|
|
10027
|
+
});
|
|
9986
10028
|
}
|
|
9987
10029
|
children = slots.default ? getTransitionRawChildren(slots.default()) : [];
|
|
9988
10030
|
for (let i = 0; i < children.length; i++) {
|
|
9989
10031
|
const child = children[i];
|
|
9990
|
-
if (child.
|
|
10032
|
+
if (isVaporInteropEnabled && child.vs) child.vs.group = group;
|
|
10033
|
+
else if (child.key != null) setTransitionHooks(child, resolveTransitionHooks(child, cssTransitionProps, state, instance));
|
|
9991
10034
|
else if (child.type !== Text) warn(`<TransitionGroup> children must be keyed.`);
|
|
9992
10035
|
}
|
|
9993
10036
|
if (prevChildren.length) {
|
|
@@ -10001,7 +10044,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10001
10044
|
return createVNode(tag, null, children);
|
|
10002
10045
|
};
|
|
10003
10046
|
}
|
|
10004
|
-
});
|
|
10047
|
+
}));
|
|
10005
10048
|
function callPendingCbs(el) {
|
|
10006
10049
|
if (el[moveCbKey]) el[moveCbKey]();
|
|
10007
10050
|
if (el[enterCbKey]) el[enterCbKey]();
|
|
@@ -10145,7 +10188,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10145
10188
|
if (e.target.composing) return;
|
|
10146
10189
|
(set || el[assignKey])(castValue(el.value, trim, number || el.type === "number"));
|
|
10147
10190
|
});
|
|
10148
|
-
if (trim || number) addEventListener(el, "change", () => {
|
|
10191
|
+
if (trim || number || el.type === "number") addEventListener(el, "change", () => {
|
|
10149
10192
|
el.value = castValue(el.value, trim, number || el.type === "number");
|
|
10150
10193
|
});
|
|
10151
10194
|
if (!lazy) {
|
|
@@ -10589,6 +10632,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10589
10632
|
exports.initCustomFormatter = initCustomFormatter;
|
|
10590
10633
|
exports.initDirectivesForSSR = initDirectivesForSSR;
|
|
10591
10634
|
exports.inject = inject;
|
|
10635
|
+
Object.defineProperty(exports, "isKeepAliveEnabled", {
|
|
10636
|
+
enumerable: true,
|
|
10637
|
+
get: function() {
|
|
10638
|
+
return isKeepAliveEnabled;
|
|
10639
|
+
}
|
|
10640
|
+
});
|
|
10592
10641
|
exports.isMemoSame = isMemoSame;
|
|
10593
10642
|
exports.isProxy = isProxy;
|
|
10594
10643
|
exports.isReactive = isReactive;
|
|
@@ -10596,7 +10645,25 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10596
10645
|
exports.isRef = isRef;
|
|
10597
10646
|
exports.isRuntimeOnly = isRuntimeOnly;
|
|
10598
10647
|
exports.isShallow = isShallow;
|
|
10648
|
+
Object.defineProperty(exports, "isSuspenseEnabled", {
|
|
10649
|
+
enumerable: true,
|
|
10650
|
+
get: function() {
|
|
10651
|
+
return isSuspenseEnabled;
|
|
10652
|
+
}
|
|
10653
|
+
});
|
|
10654
|
+
Object.defineProperty(exports, "isTransitionEnabled", {
|
|
10655
|
+
enumerable: true,
|
|
10656
|
+
get: function() {
|
|
10657
|
+
return isTransitionEnabled;
|
|
10658
|
+
}
|
|
10659
|
+
});
|
|
10599
10660
|
exports.isVNode = isVNode;
|
|
10661
|
+
Object.defineProperty(exports, "isVaporInteropEnabled", {
|
|
10662
|
+
enumerable: true,
|
|
10663
|
+
get: function() {
|
|
10664
|
+
return isVaporInteropEnabled;
|
|
10665
|
+
}
|
|
10666
|
+
});
|
|
10600
10667
|
exports.markRaw = markRaw;
|
|
10601
10668
|
exports.mergeDefaults = mergeDefaults;
|
|
10602
10669
|
exports.mergeModels = mergeModels;
|
|
@@ -10643,6 +10710,7 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10643
10710
|
exports.setDevtoolsHook = setDevtoolsHook;
|
|
10644
10711
|
exports.setIsHydratingEnabled = setIsHydratingEnabled;
|
|
10645
10712
|
exports.setTransitionHooks = setTransitionHooks;
|
|
10713
|
+
exports.setVaporInteropEnabled = setVaporInteropEnabled;
|
|
10646
10714
|
exports.shallowReactive = shallowReactive;
|
|
10647
10715
|
exports.shallowReadonly = shallowReadonly;
|
|
10648
10716
|
exports.shallowRef = shallowRef;
|
|
@@ -10687,9 +10755,12 @@ var VueRuntimeDOM = (function(exports) {
|
|
|
10687
10755
|
exports.withCtx = withCtx;
|
|
10688
10756
|
exports.withDefaults = withDefaults;
|
|
10689
10757
|
exports.withDirectives = withDirectives;
|
|
10758
|
+
exports.withKeepAliveEnabled = withKeepAliveEnabled;
|
|
10690
10759
|
exports.withKeys = withKeys;
|
|
10691
10760
|
exports.withMemo = withMemo;
|
|
10692
10761
|
exports.withModifiers = withModifiers;
|
|
10693
10762
|
exports.withScopeId = withScopeId;
|
|
10763
|
+
exports.withSuspenseEnabled = withSuspenseEnabled;
|
|
10764
|
+
exports.withTransitionEnabled = withTransitionEnabled;
|
|
10694
10765
|
return exports;
|
|
10695
10766
|
})({});
|