@vue/runtime-core 3.6.0-rc.11 → 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-core.cjs.js +224 -79
- package/dist/runtime-core.cjs.prod.js +230 -78
- package/dist/runtime-core.d.ts +16 -1
- package/dist/runtime-core.esm-bundler.js +210 -86
- package/package.json +3 -3
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-rc.
|
|
2
|
+
* @vue/runtime-core v3.6.0-rc.13
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -205,13 +205,13 @@ function queuePostFlushCb(jobs, id = Infinity) {
|
|
|
205
205
|
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
206
206
|
queueFlush();
|
|
207
207
|
}
|
|
208
|
-
function flushPreFlushCbs(instance, seen) {
|
|
208
|
+
function flushPreFlushCbs(instance, minUid, seen) {
|
|
209
209
|
for (let i = flushIndex; i < jobsLength; i++) {
|
|
210
210
|
const cb = jobs[i];
|
|
211
211
|
if (cb.order & 1 || cb.order === Infinity) continue;
|
|
212
|
-
if (instance && cb.order !== instance.uid * 2) continue;
|
|
212
|
+
if (instance && cb.order !== instance.uid * 2 || minUid !== void 0 && !(cb.order >= minUid * 2)) continue;
|
|
213
213
|
jobs.splice(i, 1);
|
|
214
|
-
i
|
|
214
|
+
i = instance ? i - 1 : flushIndex - 1;
|
|
215
215
|
jobsLength--;
|
|
216
216
|
if (cb.flags & 2) cb.flags &= -2;
|
|
217
217
|
try {
|
|
@@ -221,15 +221,24 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
221
221
|
}
|
|
222
222
|
}
|
|
223
223
|
}
|
|
224
|
-
function flushPostFlushCbs(seen) {
|
|
224
|
+
function flushPostFlushCbs(seen, skip, minUid = 0) {
|
|
225
225
|
if (postJobs.length) {
|
|
226
|
+
let cbs = postJobs;
|
|
227
|
+
if (skip) {
|
|
228
|
+
cbs = [];
|
|
229
|
+
let kept = 0;
|
|
230
|
+
for (let i = 0; i < postJobs.length; i++) {
|
|
231
|
+
const cb = postJobs[i];
|
|
232
|
+
if (cb.i !== void 0 ? !cb.i || cb.i.uid < minUid : skip.has(cb)) postJobs[kept++] = cb;
|
|
233
|
+
else cbs.push(cb);
|
|
234
|
+
}
|
|
235
|
+
postJobs.length = kept;
|
|
236
|
+
} else postJobs = [];
|
|
226
237
|
if (activePostJobs) {
|
|
227
|
-
for (let i = 0; i <
|
|
228
|
-
postJobs.length = 0;
|
|
238
|
+
for (let i = 0; i < cbs.length; i++) activePostJobs.push(cbs[i]);
|
|
229
239
|
return;
|
|
230
240
|
}
|
|
231
|
-
activePostJobs =
|
|
232
|
-
postJobs = [];
|
|
241
|
+
activePostJobs = cbs;
|
|
233
242
|
try {
|
|
234
243
|
while (postFlushIndex < activePostJobs.length) {
|
|
235
244
|
const cb = activePostJobs[postFlushIndex++];
|
|
@@ -249,17 +258,28 @@ function flushPostFlushCbs(seen) {
|
|
|
249
258
|
}
|
|
250
259
|
let isFlushing = false;
|
|
251
260
|
/**
|
|
261
|
+
* Run a root render, then flush the jobs it is responsible for. A mount or
|
|
262
|
+
* unmount (`minUid` given) only flushes the jobs of the components it created
|
|
263
|
+
* and the post cbs it queued, so pre watchers triggered in setup run before
|
|
264
|
+
* mounted (#5721) while the jobs of other components stay in the queue and
|
|
265
|
+
* keep their order (#6728). A root update keeps flushing all pending pre jobs
|
|
266
|
+
* and post cbs, as the jobs of the components it re-renders may predate it.
|
|
267
|
+
*
|
|
252
268
|
* @internal
|
|
253
269
|
*/
|
|
254
|
-
function flushOnAppMount(
|
|
255
|
-
if (
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
270
|
+
function flushOnAppMount(fn, minUid) {
|
|
271
|
+
if (isFlushing) {
|
|
272
|
+
fn();
|
|
273
|
+
return;
|
|
274
|
+
}
|
|
275
|
+
const queued = minUid === void 0 ? void 0 : new Set(postJobs);
|
|
276
|
+
fn();
|
|
277
|
+
isFlushing = true;
|
|
278
|
+
try {
|
|
279
|
+
flushPreFlushCbs(void 0, minUid);
|
|
280
|
+
flushPostFlushCbs(void 0, queued, minUid);
|
|
281
|
+
} finally {
|
|
282
|
+
isFlushing = false;
|
|
263
283
|
}
|
|
264
284
|
}
|
|
265
285
|
function flushJobs(seen) {
|
|
@@ -470,7 +490,7 @@ var RenderWatcherEffect = class extends _vue_reactivity.WatcherEffect {
|
|
|
470
490
|
this.flags |= 128;
|
|
471
491
|
job.flags |= 2;
|
|
472
492
|
}
|
|
473
|
-
|
|
493
|
+
job.i = instance;
|
|
474
494
|
this.job = job;
|
|
475
495
|
}
|
|
476
496
|
notify() {
|
|
@@ -539,6 +559,16 @@ function createPathGetter(ctx, path) {
|
|
|
539
559
|
};
|
|
540
560
|
}
|
|
541
561
|
//#endregion
|
|
562
|
+
//#region packages/runtime-core/src/vaporInteropState.ts
|
|
563
|
+
/**
|
|
564
|
+
* Set by `vaporInteropPlugin`. Stays false in apps that never import the
|
|
565
|
+
* plugin, so bundlers drop the vapor-in-vdom branches of the renderer.
|
|
566
|
+
*/
|
|
567
|
+
let isVaporInteropEnabled = false;
|
|
568
|
+
function setVaporInteropEnabled() {
|
|
569
|
+
isVaporInteropEnabled = true;
|
|
570
|
+
}
|
|
571
|
+
//#endregion
|
|
542
572
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
543
573
|
const pendingMounts = /* @__PURE__ */ new WeakMap();
|
|
544
574
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -662,7 +692,11 @@ const TeleportImpl = {
|
|
|
662
692
|
hydrate: hydrateTeleport
|
|
663
693
|
};
|
|
664
694
|
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, parentComponent, moveType = 2) {
|
|
665
|
-
if (moveType === 0)
|
|
695
|
+
if (moveType === 0) {
|
|
696
|
+
if (vnode.targetStart) insert(vnode.targetStart, container, parentAnchor);
|
|
697
|
+
insert(vnode.targetAnchor, container, parentAnchor);
|
|
698
|
+
parentAnchor = vnode.targetAnchor;
|
|
699
|
+
}
|
|
666
700
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
667
701
|
const isReorder = moveType === 2;
|
|
668
702
|
if (isReorder) insert(el, container, parentAnchor);
|
|
@@ -781,9 +815,18 @@ const BaseTransitionPropsValidators = {
|
|
|
781
815
|
onAfterAppear: TransitionHookValidator,
|
|
782
816
|
onAppearCancelled: TransitionHookValidator
|
|
783
817
|
};
|
|
818
|
+
let isTransitionEnabled = false;
|
|
819
|
+
function withTransitionEnabled(value) {
|
|
820
|
+
isTransitionEnabled = true;
|
|
821
|
+
return value;
|
|
822
|
+
}
|
|
784
823
|
function isEmptyTransitionChild(vnode, instance) {
|
|
785
824
|
if (vnode.type === Comment) return true;
|
|
786
|
-
if (vnode.type ===
|
|
825
|
+
if (vnode.type === Fragment) {
|
|
826
|
+
const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
827
|
+
return !child || isEmptyTransitionChild(child, instance);
|
|
828
|
+
}
|
|
829
|
+
if (isVaporInteropEnabled && (vnode.type === VaporSlot || isVaporComponent(vnode.type))) return !getVaporInterface(instance, vnode).hasTransitionChild(vnode);
|
|
787
830
|
return !!vnode.component && isEmptyTransitionChild(vnode.component.subTree, instance);
|
|
788
831
|
}
|
|
789
832
|
const BaseTransitionImpl = {
|
|
@@ -799,7 +842,7 @@ const BaseTransitionImpl = {
|
|
|
799
842
|
const rawProps = (0, _vue_reactivity.toRaw)(props);
|
|
800
843
|
const { mode } = rawProps;
|
|
801
844
|
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
802
|
-
if (!(instance.
|
|
845
|
+
if (!(instance.effect.flags & 1024)) instance.update();
|
|
803
846
|
}) : _vue_shared.NOOP);
|
|
804
847
|
};
|
|
805
848
|
}
|
|
@@ -814,7 +857,7 @@ function findNonCommentChild(children) {
|
|
|
814
857
|
}
|
|
815
858
|
return child;
|
|
816
859
|
}
|
|
817
|
-
const BaseTransition = BaseTransitionImpl;
|
|
860
|
+
const BaseTransition = /*@__PURE__*/ withTransitionEnabled(BaseTransitionImpl);
|
|
818
861
|
function getLeavingNodesForType(state, vnode) {
|
|
819
862
|
const { leavingNodes } = state;
|
|
820
863
|
let leavingVNodesCache = leavingNodes.get(vnode.type);
|
|
@@ -837,7 +880,14 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
837
880
|
},
|
|
838
881
|
earlyRemove: () => {
|
|
839
882
|
const leavingVNode = leavingVNodesCache[key];
|
|
840
|
-
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)
|
|
883
|
+
if (leavingVNode && isSameVNodeType(vnode, leavingVNode)) {
|
|
884
|
+
let leavingCb = leavingVNode.el[leaveCbKey];
|
|
885
|
+
if (!leavingCb) {
|
|
886
|
+
const leavingRoot = getTransitionRoot(leavingVNode);
|
|
887
|
+
leavingCb = leavingRoot && leavingRoot.el[leaveCbKey];
|
|
888
|
+
}
|
|
889
|
+
if (leavingCb) leavingCb();
|
|
890
|
+
}
|
|
841
891
|
},
|
|
842
892
|
cloneHooks: (vnode) => {
|
|
843
893
|
const hooks = resolveTransitionHooks(vnode, props, state, instance, postClone);
|
|
@@ -845,7 +895,7 @@ function resolveTransitionHooks(vnode, props, state, instance, postClone) {
|
|
|
845
895
|
return hooks;
|
|
846
896
|
}
|
|
847
897
|
}, props, state, instance);
|
|
848
|
-
if (vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
|
|
898
|
+
if (isVaporInteropEnabled && vnode.type === VaporSlot) (0, _vue_shared.extend)(hooks, {
|
|
849
899
|
__vapor: true,
|
|
850
900
|
props,
|
|
851
901
|
state,
|
|
@@ -1022,7 +1072,7 @@ function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, pr
|
|
|
1022
1072
|
function setTransitionHooks(vnode, hooks) {
|
|
1023
1073
|
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1024
1074
|
vnode.transition = hooks;
|
|
1025
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1075
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1026
1076
|
else {
|
|
1027
1077
|
const subTree = vnode.component.subTree;
|
|
1028
1078
|
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
@@ -1031,7 +1081,13 @@ function setTransitionHooks(vnode, hooks) {
|
|
|
1031
1081
|
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1032
1082
|
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1033
1083
|
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
1034
|
-
} else
|
|
1084
|
+
} else {
|
|
1085
|
+
vnode.transition = hooks;
|
|
1086
|
+
if (vnode.type === Fragment && (0, _vue_shared.isArray)(vnode.children)) {
|
|
1087
|
+
const child = filterSingleRoot(vnode.children, false);
|
|
1088
|
+
if (child) setTransitionHooks(child, hooks);
|
|
1089
|
+
}
|
|
1090
|
+
}
|
|
1035
1091
|
return hooks;
|
|
1036
1092
|
}
|
|
1037
1093
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
@@ -1048,6 +1104,14 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1048
1104
|
if (keyedFragmentCount > 1) for (let i = 0; i < ret.length; i++) ret[i].patchFlag = -2;
|
|
1049
1105
|
return ret;
|
|
1050
1106
|
}
|
|
1107
|
+
function getTransitionRoot(vnode) {
|
|
1108
|
+
if (vnode.component && (!isVaporInteropEnabled || !isVaporComponent(vnode.type))) return getTransitionRoot(vnode.component.subTree);
|
|
1109
|
+
if (vnode.type === Fragment) {
|
|
1110
|
+
const child = (0, _vue_shared.isArray)(vnode.children) && filterSingleRoot(vnode.children, false);
|
|
1111
|
+
return child ? getTransitionRoot(child) : void 0;
|
|
1112
|
+
}
|
|
1113
|
+
if (vnode.type !== Comment) return vnode;
|
|
1114
|
+
}
|
|
1051
1115
|
//#endregion
|
|
1052
1116
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
1053
1117
|
/*@__NO_SIDE_EFFECTS__*/
|
|
@@ -1285,7 +1349,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1285
1349
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1286
1350
|
break;
|
|
1287
1351
|
case VaporSlot:
|
|
1288
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
1352
|
+
if (isVaporInteropEnabled) nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
1289
1353
|
break;
|
|
1290
1354
|
default: if (shapeFlag & 1) {
|
|
1291
1355
|
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
@@ -1296,7 +1360,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1296
1360
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
1297
1361
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
1298
1362
|
else nextNode = nextSibling(node);
|
|
1299
|
-
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
1363
|
+
if ((isVaporInteropEnabled || false) && vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
1300
1364
|
else {
|
|
1301
1365
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
1302
1366
|
const component = vnode.component;
|
|
@@ -1408,7 +1472,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1408
1472
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
1409
1473
|
const container = parentNode(node);
|
|
1410
1474
|
const first = nextSibling(node);
|
|
1411
|
-
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1475
|
+
const next = isVaporInteropEnabled && vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1412
1476
|
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
1413
1477
|
else {
|
|
1414
1478
|
logMismatchError();
|
|
@@ -1536,14 +1600,20 @@ const hydrateOnVisible = (opts) => (hydrate, forEach) => {
|
|
|
1536
1600
|
break;
|
|
1537
1601
|
}
|
|
1538
1602
|
}, opts);
|
|
1539
|
-
|
|
1540
|
-
if (!(el instanceof Element)) return;
|
|
1603
|
+
const observe = (el) => {
|
|
1541
1604
|
if (elementIsVisibleInViewport(el)) {
|
|
1542
1605
|
hydrate();
|
|
1543
1606
|
ob.disconnect();
|
|
1544
1607
|
return false;
|
|
1545
1608
|
}
|
|
1609
|
+
if (getComputedStyle(el).display === "contents") {
|
|
1610
|
+
for (let i = 0; i < el.children.length; i++) if (observe(el.children[i]) === false) return false;
|
|
1611
|
+
}
|
|
1546
1612
|
ob.observe(el);
|
|
1613
|
+
};
|
|
1614
|
+
forEach((el) => {
|
|
1615
|
+
if (!(el instanceof Element)) return;
|
|
1616
|
+
return observe(el);
|
|
1547
1617
|
});
|
|
1548
1618
|
return () => ob.disconnect();
|
|
1549
1619
|
};
|
|
@@ -1691,7 +1761,7 @@ function createAsyncComponentContext(source) {
|
|
|
1691
1761
|
setPendingRequest: (request) => pendingRequest = request
|
|
1692
1762
|
};
|
|
1693
1763
|
}
|
|
1694
|
-
const useAsyncComponentState = (delay, timeout, onError, instance = currentInstance) => {
|
|
1764
|
+
const useAsyncComponentState = (delay = 200, timeout, onError, instance = currentInstance) => {
|
|
1695
1765
|
const loaded = (0, _vue_reactivity.ref)(false);
|
|
1696
1766
|
const error = (0, _vue_reactivity.ref)();
|
|
1697
1767
|
const delayed = (0, _vue_reactivity.ref)(!!delay);
|
|
@@ -1742,7 +1812,12 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
1742
1812
|
//#endregion
|
|
1743
1813
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
1744
1814
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
1745
|
-
|
|
1815
|
+
let isKeepAliveEnabled = false;
|
|
1816
|
+
function withKeepAliveEnabled(value) {
|
|
1817
|
+
isKeepAliveEnabled = true;
|
|
1818
|
+
return value;
|
|
1819
|
+
}
|
|
1820
|
+
const KeepAlive = /*@__PURE__*/ withKeepAliveEnabled({
|
|
1746
1821
|
name: `KeepAlive`,
|
|
1747
1822
|
__isKeepAlive: true,
|
|
1748
1823
|
props: {
|
|
@@ -1796,7 +1871,10 @@ const KeepAlive = {
|
|
|
1796
1871
|
function pruneCacheEntry(key) {
|
|
1797
1872
|
const cached = cache.get(key);
|
|
1798
1873
|
if (cached && (!current || !isSameVNodeType(cached, current))) unmount(cached);
|
|
1799
|
-
else if (current)
|
|
1874
|
+
else if (current) {
|
|
1875
|
+
resetShapeFlag(current);
|
|
1876
|
+
if (cached) resetShapeFlag(cached);
|
|
1877
|
+
}
|
|
1800
1878
|
cache.delete(key);
|
|
1801
1879
|
keys.delete(key);
|
|
1802
1880
|
}
|
|
@@ -1880,7 +1958,7 @@ const KeepAlive = {
|
|
|
1880
1958
|
return isSuspense(rawVNode.type) ? rawVNode : vnode;
|
|
1881
1959
|
};
|
|
1882
1960
|
}
|
|
1883
|
-
};
|
|
1961
|
+
});
|
|
1884
1962
|
function matches(pattern, name) {
|
|
1885
1963
|
if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
|
|
1886
1964
|
else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
|
|
@@ -2051,8 +2129,11 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2051
2129
|
ret = new Array(source.length);
|
|
2052
2130
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? (0, _vue_reactivity.toReadonly)((0, _vue_reactivity.toReactive)(source[i])) : (0, _vue_reactivity.toReactive)(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
2053
2131
|
} else if (typeof source === "number") {
|
|
2054
|
-
|
|
2055
|
-
|
|
2132
|
+
if (!Number.isInteger(source) || source < 0) ret = [];
|
|
2133
|
+
else {
|
|
2134
|
+
ret = new Array(source);
|
|
2135
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2136
|
+
}
|
|
2056
2137
|
} else if ((0, _vue_shared.isObject)(source)) {
|
|
2057
2138
|
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2058
2139
|
else {
|
|
@@ -2118,16 +2199,22 @@ function invokeSlotFallback(fallback, owner) {
|
|
|
2118
2199
|
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
2119
2200
|
if (props == null) props = {};
|
|
2120
2201
|
let slot = slots[name];
|
|
2121
|
-
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
2202
|
+
const vaporSlot = isVaporInteropEnabled && slot && slot[rawVaporSlotKey];
|
|
2122
2203
|
if (vaporSlot) {
|
|
2123
2204
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
2124
2205
|
ret.vs = {
|
|
2125
2206
|
slot: vaporSlot,
|
|
2207
|
+
name,
|
|
2126
2208
|
outlets: fallback ? [{
|
|
2127
2209
|
fallback,
|
|
2128
2210
|
owner: currentRenderingInstance
|
|
2129
2211
|
}] : void 0
|
|
2130
2212
|
};
|
|
2213
|
+
if (branchKey != null && props.key == null) {
|
|
2214
|
+
ret.vs.props = ret.props;
|
|
2215
|
+
ret.props = (0, _vue_shared.extend)({}, ret.props, { key: branchKey });
|
|
2216
|
+
ret.key = branchKey;
|
|
2217
|
+
}
|
|
2131
2218
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
2132
2219
|
return ret;
|
|
2133
2220
|
}
|
|
@@ -2144,7 +2231,7 @@ function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
|
2144
2231
|
try {
|
|
2145
2232
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
2146
2233
|
let attached = false;
|
|
2147
|
-
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
2234
|
+
if (isVaporInteropEnabled && fallback && validSlotContent && currentRenderingInstance) {
|
|
2148
2235
|
const interop = currentRenderingInstance.appContext.vapor;
|
|
2149
2236
|
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
2150
2237
|
}
|
|
@@ -3039,7 +3126,7 @@ function hasPropsChanged(prevProps, nextProps, emitsOptions) {
|
|
|
3039
3126
|
if (nextKeys.length !== Object.keys(prevProps).length) return true;
|
|
3040
3127
|
for (let i = 0; i < nextKeys.length; i++) {
|
|
3041
3128
|
const key = nextKeys[i];
|
|
3042
|
-
if (hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
3129
|
+
if (!(0, _vue_shared.hasOwn)(prevProps, key) || hasPropValueChanged(nextProps, prevProps, key) && !isEmitListener(emitsOptions, key)) return true;
|
|
3043
3130
|
}
|
|
3044
3131
|
return false;
|
|
3045
3132
|
}
|
|
@@ -3386,7 +3473,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3386
3473
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3387
3474
|
break;
|
|
3388
3475
|
case VaporSlot:
|
|
3389
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
3476
|
+
if (isVaporInteropEnabled) getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
3390
3477
|
break;
|
|
3391
3478
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
3392
3479
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -3496,7 +3583,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3496
3583
|
let vnodeHook;
|
|
3497
3584
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
3498
3585
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
3499
|
-
if (n2.ibu) n2.ibu();
|
|
3586
|
+
if (isVaporInteropEnabled && n2.ibu) n2.ibu();
|
|
3500
3587
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
3501
3588
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
3502
3589
|
if (dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -3528,9 +3615,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3528
3615
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
3529
3616
|
}
|
|
3530
3617
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
3531
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
3618
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || isVaporInteropEnabled && n2.iu) queuePostRenderEffect(() => {
|
|
3532
3619
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
3533
|
-
n2.iu && n2.iu();
|
|
3620
|
+
isVaporInteropEnabled && n2.iu && n2.iu();
|
|
3534
3621
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
3535
3622
|
}, void 0, parentSuspense);
|
|
3536
3623
|
};
|
|
@@ -3538,7 +3625,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3538
3625
|
for (let i = 0; i < newChildren.length; i++) {
|
|
3539
3626
|
const oldVNode = oldChildren[i];
|
|
3540
3627
|
const newVNode = newChildren[i];
|
|
3541
|
-
const
|
|
3628
|
+
const oldEl = oldVNode.el || resolveAsyncComponentPlaceholder(oldVNode);
|
|
3629
|
+
const container = oldEl && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldEl) : fallbackContainer;
|
|
3542
3630
|
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
3543
3631
|
}
|
|
3544
3632
|
};
|
|
@@ -3572,7 +3660,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3572
3660
|
};
|
|
3573
3661
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
3574
3662
|
n2.slotScopeIds = slotScopeIds;
|
|
3575
|
-
if (n2.type.__vapor) {
|
|
3663
|
+
if ((isVaporInteropEnabled || false) && n2.type.__vapor) {
|
|
3576
3664
|
if (n1 == null) {
|
|
3577
3665
|
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
3578
3666
|
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
@@ -3614,6 +3702,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3614
3702
|
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
3615
3703
|
if (instance.asyncDep && !instance.asyncResolved) {
|
|
3616
3704
|
n2.el = n1.el;
|
|
3705
|
+
n2.placeholder = n1.placeholder;
|
|
3617
3706
|
updateComponentPreRender(instance, n2, optimized);
|
|
3618
3707
|
return;
|
|
3619
3708
|
} else {
|
|
@@ -3622,6 +3711,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3622
3711
|
}
|
|
3623
3712
|
} else {
|
|
3624
3713
|
n2.el = n1.el;
|
|
3714
|
+
n2.placeholder = n1.placeholder;
|
|
3625
3715
|
instance.vnode = n2;
|
|
3626
3716
|
}
|
|
3627
3717
|
};
|
|
@@ -3706,7 +3796,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3706
3796
|
} else next = vnode;
|
|
3707
3797
|
if (bu) (0, _vue_shared.invokeArrayFns)(bu);
|
|
3708
3798
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
3709
|
-
if (next.ibu) next.ibu();
|
|
3799
|
+
if (isVaporInteropEnabled && next.ibu) next.ibu();
|
|
3710
3800
|
toggleRecurse(instance, true);
|
|
3711
3801
|
const nextTree = renderComponentRoot(instance);
|
|
3712
3802
|
const prevTree = instance.subTree;
|
|
@@ -3715,9 +3805,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3715
3805
|
next.el = nextTree.el;
|
|
3716
3806
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
3717
3807
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
3718
|
-
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
3808
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || isVaporInteropEnabled && next.iu) queuePostRenderEffect(() => {
|
|
3719
3809
|
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
3720
|
-
next.iu && next.iu();
|
|
3810
|
+
isVaporInteropEnabled && next.iu && next.iu();
|
|
3721
3811
|
}, void 0, parentSuspense);
|
|
3722
3812
|
}
|
|
3723
3813
|
}
|
|
@@ -3864,7 +3954,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3864
3954
|
};
|
|
3865
3955
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
3866
3956
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
3867
|
-
if (isVaporComponent(type) || type === VaporSlot) {
|
|
3957
|
+
if (isVaporInteropEnabled && (isVaporComponent(type) || type === VaporSlot)) {
|
|
3868
3958
|
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
3869
3959
|
return;
|
|
3870
3960
|
}
|
|
@@ -3908,11 +3998,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3908
3998
|
}
|
|
3909
3999
|
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
3910
4000
|
if (shapeFlag & 256) {
|
|
3911
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
4001
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
3912
4002
|
else parentComponent.ctx.deactivate(vnode);
|
|
3913
4003
|
return;
|
|
3914
4004
|
}
|
|
3915
|
-
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
4005
|
+
if (isVaporInteropEnabled && shapeFlag & 6 && isVaporComponent(type)) {
|
|
3916
4006
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
3917
4007
|
return;
|
|
3918
4008
|
}
|
|
@@ -3930,7 +4020,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3930
4020
|
if (shapeFlag & 64) vnode.type.remove(vnode, parentComponent, parentSuspense, internals, doRemove);
|
|
3931
4021
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
3932
4022
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
3933
|
-
if (type === VaporSlot) {
|
|
4023
|
+
if (isVaporInteropEnabled && type === VaporSlot) {
|
|
3934
4024
|
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
3935
4025
|
return;
|
|
3936
4026
|
}
|
|
@@ -3945,7 +4035,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3945
4035
|
};
|
|
3946
4036
|
const remove = (vnode) => {
|
|
3947
4037
|
const { type, el, anchor, transition } = vnode;
|
|
3948
|
-
|
|
4038
|
+
const isFragment = type === Fragment;
|
|
4039
|
+
if (isFragment && !transition) {
|
|
3949
4040
|
removeFragment(el, anchor);
|
|
3950
4041
|
return;
|
|
3951
4042
|
}
|
|
@@ -3954,8 +4045,21 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3954
4045
|
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
3955
4046
|
return;
|
|
3956
4047
|
}
|
|
3957
|
-
|
|
3958
|
-
|
|
4048
|
+
const leavingNode = isFragment ? getTransitionRoot(vnode) : vnode;
|
|
4049
|
+
const performRemove = () => {
|
|
4050
|
+
if (isFragment) {
|
|
4051
|
+
if (hostParentNode(el)) removeFragment(el, anchor);
|
|
4052
|
+
} else hostRemove(el);
|
|
4053
|
+
};
|
|
4054
|
+
if (transition) {
|
|
4055
|
+
let leavingEl = leavingNode && leavingNode.el;
|
|
4056
|
+
let isElement = !!(leavingNode && leavingNode.shapeFlag & 1);
|
|
4057
|
+
if (isVaporInteropEnabled && isFragment && leavingNode && isVaporComponent(leavingNode.type)) {
|
|
4058
|
+
leavingEl = getVaporInterface(leavingNode.component, leavingNode).getTransitionElement(leavingNode);
|
|
4059
|
+
isElement = !!leavingEl;
|
|
4060
|
+
}
|
|
4061
|
+
performTransitionLeave(leavingEl || el, transition, performRemove, isElement);
|
|
4062
|
+
} else performRemove();
|
|
3959
4063
|
};
|
|
3960
4064
|
const removeFragment = (cur, end) => {
|
|
3961
4065
|
let next;
|
|
@@ -3987,7 +4091,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3987
4091
|
};
|
|
3988
4092
|
const getNextHostNode = (vnode) => {
|
|
3989
4093
|
if (vnode.shapeFlag & 6) {
|
|
3990
|
-
if (isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
4094
|
+
if (isVaporInteropEnabled && isVaporComponent(vnode.type)) return hostNextSibling(vnode.anchor);
|
|
3991
4095
|
return getNextHostNode(vnode.component.subTree);
|
|
3992
4096
|
}
|
|
3993
4097
|
if (vnode.shapeFlag & 128) return vnode.suspense.next();
|
|
@@ -3996,15 +4100,12 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3996
4100
|
return teleportEnd ? hostNextSibling(teleportEnd) : el;
|
|
3997
4101
|
};
|
|
3998
4102
|
const render = (vnode, container, namespace) => {
|
|
3999
|
-
|
|
4000
|
-
|
|
4001
|
-
|
|
4002
|
-
|
|
4003
|
-
|
|
4004
|
-
|
|
4005
|
-
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
4006
|
-
container._vnode = vnode;
|
|
4007
|
-
flushOnAppMount(instance);
|
|
4103
|
+
flushOnAppMount(() => {
|
|
4104
|
+
if (vnode == null) {
|
|
4105
|
+
if (container._vnode) unmount(container._vnode, null, null, true);
|
|
4106
|
+
} else patch(container._vnode || null, vnode, container, null, null, null, namespace);
|
|
4107
|
+
container._vnode = vnode;
|
|
4108
|
+
}, vnode && container._vnode ? void 0 : vnode && vnode.component ? vnode.component.uid : getNextUid());
|
|
4008
4109
|
};
|
|
4009
4110
|
const internals = {
|
|
4010
4111
|
p: patch,
|
|
@@ -4046,7 +4147,7 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
4046
4147
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
4047
4148
|
}
|
|
4048
4149
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
4049
|
-
if (!vapor) {
|
|
4150
|
+
if (!isVaporInteropEnabled || !vapor) {
|
|
4050
4151
|
if (allowed) {
|
|
4051
4152
|
effect.flags |= 128;
|
|
4052
4153
|
job.flags |= 2;
|
|
@@ -4153,7 +4254,7 @@ function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true
|
|
|
4153
4254
|
currentParent = currentParent.parent;
|
|
4154
4255
|
} else break;
|
|
4155
4256
|
}
|
|
4156
|
-
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
4257
|
+
const vaporScopeIds = isVaporInteropEnabled && includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
4157
4258
|
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
4158
4259
|
return inheritedScopeIds;
|
|
4159
4260
|
}
|
|
@@ -4166,8 +4267,13 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
4166
4267
|
//#endregion
|
|
4167
4268
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
4168
4269
|
const isSuspense = (type) => type.__isSuspense;
|
|
4270
|
+
let isSuspenseEnabled = false;
|
|
4271
|
+
function withSuspenseEnabled(value) {
|
|
4272
|
+
isSuspenseEnabled = true;
|
|
4273
|
+
return value;
|
|
4274
|
+
}
|
|
4169
4275
|
let suspenseId = 0;
|
|
4170
|
-
const Suspense = {
|
|
4276
|
+
const Suspense = /*@__PURE__*/ withSuspenseEnabled({
|
|
4171
4277
|
name: "Suspense",
|
|
4172
4278
|
__isSuspense: true,
|
|
4173
4279
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -4184,7 +4290,7 @@ const Suspense = {
|
|
|
4184
4290
|
},
|
|
4185
4291
|
hydrate: hydrateSuspense,
|
|
4186
4292
|
normalize: normalizeSuspenseChildren
|
|
4187
|
-
};
|
|
4293
|
+
});
|
|
4188
4294
|
function triggerEvent(vnode, name) {
|
|
4189
4295
|
const eventListener = vnode.props && vnode.props[name];
|
|
4190
4296
|
if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
|
|
@@ -4378,13 +4484,12 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
4378
4484
|
registerDep(instance, onResolve) {
|
|
4379
4485
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
4380
4486
|
if (isInPendingSuspense) suspense.deps++;
|
|
4381
|
-
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
4382
4487
|
instance.asyncDep.catch((err) => {
|
|
4383
4488
|
handleError(err, instance, 0);
|
|
4384
4489
|
}).then((asyncSetupResult) => {
|
|
4385
4490
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
4386
4491
|
setCurrentInstance(null, void 0);
|
|
4387
|
-
if (
|
|
4492
|
+
if (!instance.scope.active) {
|
|
4388
4493
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
4389
4494
|
return;
|
|
4390
4495
|
}
|
|
@@ -4656,7 +4761,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
4656
4761
|
ctx: vnode.ctx,
|
|
4657
4762
|
ce: vnode.ce,
|
|
4658
4763
|
vi: vnode.vi,
|
|
4659
|
-
vs: cloneVaporSlotMeta(vnode),
|
|
4764
|
+
vs: cloneVaporSlotMeta(vnode, extraProps),
|
|
4660
4765
|
vb: vnode.vb,
|
|
4661
4766
|
ibu: vnode.ibu,
|
|
4662
4767
|
iu: vnode.iu,
|
|
@@ -4665,13 +4770,29 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
4665
4770
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
4666
4771
|
return cloned;
|
|
4667
4772
|
}
|
|
4668
|
-
function cloneVaporSlotMeta(vnode) {
|
|
4773
|
+
function cloneVaporSlotMeta(vnode, extraProps) {
|
|
4669
4774
|
const vaporSlot = vnode.vs;
|
|
4670
4775
|
if (!vaporSlot) return vaporSlot;
|
|
4671
4776
|
const cloned = {
|
|
4672
4777
|
slot: vaporSlot.slot,
|
|
4673
|
-
|
|
4778
|
+
name: vaporSlot.name,
|
|
4779
|
+
outlets: vaporSlot.outlets,
|
|
4780
|
+
props: vaporSlot.props,
|
|
4781
|
+
attrs: vaporSlot.attrs && vaporSlot.attrs === _vue_shared.EMPTY_OBJ ? {} : vaporSlot.attrs,
|
|
4782
|
+
group: vaporSlot.group
|
|
4674
4783
|
};
|
|
4784
|
+
const attrs = cloned.attrs;
|
|
4785
|
+
if (extraProps && vaporSlot.props) {
|
|
4786
|
+
let extraSlotProps;
|
|
4787
|
+
for (const key in extraProps) if (attrs ? !(0, _vue_shared.isReservedProp)(key) : key !== "key") {
|
|
4788
|
+
if (!extraSlotProps) extraSlotProps = {};
|
|
4789
|
+
extraSlotProps[key] = extraProps[key];
|
|
4790
|
+
}
|
|
4791
|
+
if (extraSlotProps) {
|
|
4792
|
+
if (attrs) cloned.attrs = mergeProps(attrs, extraSlotProps);
|
|
4793
|
+
else cloned.props = mergeProps(vaporSlot.props, extraSlotProps);
|
|
4794
|
+
}
|
|
4795
|
+
}
|
|
4675
4796
|
if (vnode.el) {
|
|
4676
4797
|
cloned.state = vaporSlot.state;
|
|
4677
4798
|
cloned.ref = vaporSlot.ref;
|
|
@@ -4848,6 +4969,9 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
4848
4969
|
//#region packages/runtime-core/src/component.ts
|
|
4849
4970
|
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
4850
4971
|
let uid = 0;
|
|
4972
|
+
function getNextUid() {
|
|
4973
|
+
return uid;
|
|
4974
|
+
}
|
|
4851
4975
|
function createComponentInstance(vnode, parent, suspense) {
|
|
4852
4976
|
const type = vnode.type;
|
|
4853
4977
|
const appContext = (parent ? parent.appContext : vnode.appContext) || emptyAppContext;
|
|
@@ -4928,7 +5052,7 @@ function setupComponent(instance, isSSR = false, optimized = false) {
|
|
|
4928
5052
|
isSSR && setInSSRSetupState(isSSR);
|
|
4929
5053
|
const { props, children, vi } = instance.vnode;
|
|
4930
5054
|
const isStateful = isStatefulComponent(instance);
|
|
4931
|
-
if (vi) vi(instance);
|
|
5055
|
+
if (isVaporInteropEnabled && vi) vi(instance);
|
|
4932
5056
|
else {
|
|
4933
5057
|
initProps(instance, props, isStateful, isSSR);
|
|
4934
5058
|
initSlots(instance, children, optimized || isSSR);
|
|
@@ -5105,7 +5229,7 @@ function isMemoSame(cached, memo) {
|
|
|
5105
5229
|
}
|
|
5106
5230
|
//#endregion
|
|
5107
5231
|
//#region packages/runtime-core/src/index.ts
|
|
5108
|
-
const version = "3.6.0-rc.
|
|
5232
|
+
const version = "3.6.0-rc.13";
|
|
5109
5233
|
const warn = _vue_shared.NOOP;
|
|
5110
5234
|
/**
|
|
5111
5235
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -5206,6 +5330,12 @@ exports.hydrateOnMediaQuery = hydrateOnMediaQuery;
|
|
|
5206
5330
|
exports.hydrateOnVisible = hydrateOnVisible;
|
|
5207
5331
|
exports.initCustomFormatter = initCustomFormatter;
|
|
5208
5332
|
exports.inject = inject;
|
|
5333
|
+
Object.defineProperty(exports, "isKeepAliveEnabled", {
|
|
5334
|
+
enumerable: true,
|
|
5335
|
+
get: function() {
|
|
5336
|
+
return isKeepAliveEnabled;
|
|
5337
|
+
}
|
|
5338
|
+
});
|
|
5209
5339
|
exports.isMemoSame = isMemoSame;
|
|
5210
5340
|
exports.isProxy = _vue_reactivity.isProxy;
|
|
5211
5341
|
exports.isReactive = _vue_reactivity.isReactive;
|
|
@@ -5213,7 +5343,25 @@ exports.isReadonly = _vue_reactivity.isReadonly;
|
|
|
5213
5343
|
exports.isRef = _vue_reactivity.isRef;
|
|
5214
5344
|
exports.isRuntimeOnly = isRuntimeOnly;
|
|
5215
5345
|
exports.isShallow = _vue_reactivity.isShallow;
|
|
5346
|
+
Object.defineProperty(exports, "isSuspenseEnabled", {
|
|
5347
|
+
enumerable: true,
|
|
5348
|
+
get: function() {
|
|
5349
|
+
return isSuspenseEnabled;
|
|
5350
|
+
}
|
|
5351
|
+
});
|
|
5352
|
+
Object.defineProperty(exports, "isTransitionEnabled", {
|
|
5353
|
+
enumerable: true,
|
|
5354
|
+
get: function() {
|
|
5355
|
+
return isTransitionEnabled;
|
|
5356
|
+
}
|
|
5357
|
+
});
|
|
5216
5358
|
exports.isVNode = isVNode;
|
|
5359
|
+
Object.defineProperty(exports, "isVaporInteropEnabled", {
|
|
5360
|
+
enumerable: true,
|
|
5361
|
+
get: function() {
|
|
5362
|
+
return isVaporInteropEnabled;
|
|
5363
|
+
}
|
|
5364
|
+
});
|
|
5217
5365
|
exports.markRaw = _vue_reactivity.markRaw;
|
|
5218
5366
|
exports.mergeDefaults = mergeDefaults;
|
|
5219
5367
|
exports.mergeModels = mergeModels;
|
|
@@ -5257,6 +5405,7 @@ exports.setBlockTracking = setBlockTracking;
|
|
|
5257
5405
|
exports.setDevtoolsHook = setDevtoolsHook;
|
|
5258
5406
|
exports.setIsHydratingEnabled = setIsHydratingEnabled;
|
|
5259
5407
|
exports.setTransitionHooks = setTransitionHooks;
|
|
5408
|
+
exports.setVaporInteropEnabled = setVaporInteropEnabled;
|
|
5260
5409
|
exports.shallowReactive = _vue_reactivity.shallowReactive;
|
|
5261
5410
|
exports.shallowReadonly = _vue_reactivity.shallowReadonly;
|
|
5262
5411
|
exports.shallowRef = _vue_reactivity.shallowRef;
|
|
@@ -5291,5 +5440,8 @@ exports.withAsyncContext = withAsyncContext;
|
|
|
5291
5440
|
exports.withCtx = withCtx;
|
|
5292
5441
|
exports.withDefaults = withDefaults;
|
|
5293
5442
|
exports.withDirectives = withDirectives;
|
|
5443
|
+
exports.withKeepAliveEnabled = withKeepAliveEnabled;
|
|
5294
5444
|
exports.withMemo = withMemo;
|
|
5295
5445
|
exports.withScopeId = withScopeId;
|
|
5446
|
+
exports.withSuspenseEnabled = withSuspenseEnabled;
|
|
5447
|
+
exports.withTransitionEnabled = withTransitionEnabled;
|