@vue/runtime-core 3.6.0-rc.1 → 3.6.0-rc.10
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 +673 -457
- package/dist/runtime-core.cjs.prod.js +527 -378
- package/dist/runtime-core.d.ts +608 -608
- package/dist/runtime-core.esm-bundler.js +688 -459
- 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.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -253,7 +253,9 @@ const SchedulerJobFlags = {
|
|
|
253
253
|
"ALLOW_RECURSE": 2,
|
|
254
254
|
"2": "ALLOW_RECURSE",
|
|
255
255
|
"DISPOSED": 4,
|
|
256
|
-
"4": "DISPOSED"
|
|
256
|
+
"4": "DISPOSED",
|
|
257
|
+
"REQUEUE_ON_SUSPENSE_DISCARD": 8,
|
|
258
|
+
"8": "REQUEUE_ON_SUSPENSE_DISCARD"
|
|
257
259
|
};
|
|
258
260
|
const jobs = [];
|
|
259
261
|
let postJobs = [];
|
|
@@ -262,7 +264,7 @@ let currentFlushPromise = null;
|
|
|
262
264
|
let jobsLength = 0;
|
|
263
265
|
let flushIndex = 0;
|
|
264
266
|
let postFlushIndex = 0;
|
|
265
|
-
const resolvedPromise =
|
|
267
|
+
const resolvedPromise = /*@__PURE__*/ Promise.resolve();
|
|
266
268
|
const RECURSION_LIMIT = 100;
|
|
267
269
|
function nextTick(fn) {
|
|
268
270
|
const p = currentFlushPromise || resolvedPromise;
|
|
@@ -301,6 +303,7 @@ const doFlushJobs = () => {
|
|
|
301
303
|
flushJobs();
|
|
302
304
|
} catch (e) {
|
|
303
305
|
currentFlushPromise = null;
|
|
306
|
+
if (jobsLength || postJobs.length) queueFlush();
|
|
304
307
|
throw e;
|
|
305
308
|
}
|
|
306
309
|
};
|
|
@@ -308,9 +311,10 @@ function queueFlush() {
|
|
|
308
311
|
if (!currentFlushPromise) currentFlushPromise = resolvedPromise.then(doFlushJobs);
|
|
309
312
|
}
|
|
310
313
|
function queuePostFlushCb(jobs, id = Infinity) {
|
|
311
|
-
if (!isArray(jobs))
|
|
312
|
-
|
|
313
|
-
|
|
314
|
+
if (!isArray(jobs)) {
|
|
315
|
+
if (activePostJobs && id === -1) activePostJobs.splice(postFlushIndex, 0, jobs);
|
|
316
|
+
else queueJobWorker(jobs, id, postJobs, postJobs.length, 0);
|
|
317
|
+
} else for (let i = 0; i < jobs.length; i++) queueJobWorker(jobs[i], id, postJobs, postJobs.length, 0);
|
|
314
318
|
queueFlush();
|
|
315
319
|
}
|
|
316
320
|
function flushPreFlushCbs(instance, seen) {
|
|
@@ -324,32 +328,39 @@ function flushPreFlushCbs(instance, seen) {
|
|
|
324
328
|
i--;
|
|
325
329
|
jobsLength--;
|
|
326
330
|
if (cb.flags & 2) cb.flags &= -2;
|
|
327
|
-
|
|
328
|
-
|
|
331
|
+
try {
|
|
332
|
+
cb();
|
|
333
|
+
} finally {
|
|
334
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
335
|
+
}
|
|
329
336
|
}
|
|
330
337
|
}
|
|
331
338
|
function flushPostFlushCbs(seen) {
|
|
332
339
|
if (postJobs.length) {
|
|
333
340
|
if (activePostJobs) {
|
|
334
|
-
activePostJobs.push(
|
|
341
|
+
for (let i = 0; i < postJobs.length; i++) activePostJobs.push(postJobs[i]);
|
|
335
342
|
postJobs.length = 0;
|
|
336
343
|
return;
|
|
337
344
|
}
|
|
338
345
|
activePostJobs = postJobs;
|
|
339
346
|
postJobs = [];
|
|
340
347
|
if (!!(process.env.NODE_ENV !== "production")) seen = seen || /* @__PURE__ */ new Map();
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
cb
|
|
347
|
-
|
|
348
|
-
|
|
348
|
+
try {
|
|
349
|
+
while (postFlushIndex < activePostJobs.length) {
|
|
350
|
+
const cb = activePostJobs[postFlushIndex++];
|
|
351
|
+
if (!!(process.env.NODE_ENV !== "production") && checkRecursiveUpdates(seen, cb)) continue;
|
|
352
|
+
if (cb.flags & 2) cb.flags &= -2;
|
|
353
|
+
if (!(cb.flags & 4)) try {
|
|
354
|
+
cb();
|
|
355
|
+
} finally {
|
|
356
|
+
if (!(cb.flags & 2)) cb.flags &= -2;
|
|
357
|
+
}
|
|
349
358
|
}
|
|
359
|
+
} finally {
|
|
360
|
+
while (postFlushIndex < activePostJobs.length) activePostJobs[postFlushIndex++].flags &= -2;
|
|
361
|
+
activePostJobs = null;
|
|
362
|
+
postFlushIndex = 0;
|
|
350
363
|
}
|
|
351
|
-
activePostJobs = null;
|
|
352
|
-
postFlushIndex = 0;
|
|
353
364
|
}
|
|
354
365
|
}
|
|
355
366
|
let isFlushing = false;
|
|
@@ -359,9 +370,12 @@ let isFlushing = false;
|
|
|
359
370
|
function flushOnAppMount(instance) {
|
|
360
371
|
if (!isFlushing) {
|
|
361
372
|
isFlushing = true;
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
373
|
+
try {
|
|
374
|
+
flushPreFlushCbs(instance);
|
|
375
|
+
flushPostFlushCbs();
|
|
376
|
+
} finally {
|
|
377
|
+
isFlushing = false;
|
|
378
|
+
}
|
|
365
379
|
}
|
|
366
380
|
}
|
|
367
381
|
function flushJobs(seen) {
|
|
@@ -391,8 +405,8 @@ function flushJobs(seen) {
|
|
|
391
405
|
jobsLength = 0;
|
|
392
406
|
jobs.length = 0;
|
|
393
407
|
flushPostFlushCbs(seen);
|
|
394
|
-
currentFlushPromise = null;
|
|
395
408
|
if (jobsLength || postJobs.length) flushJobs(seen);
|
|
409
|
+
else currentFlushPromise = null;
|
|
396
410
|
}
|
|
397
411
|
}
|
|
398
412
|
function checkRecursiveUpdates(seen, fn) {
|
|
@@ -423,6 +437,19 @@ if (!!(process.env.NODE_ENV !== "production")) getGlobalThis().__VUE_HMR_RUNTIME
|
|
|
423
437
|
rerender: tryWrap(rerender),
|
|
424
438
|
reload: tryWrap(reload)
|
|
425
439
|
};
|
|
440
|
+
function runWithHmrUpdating(fn) {
|
|
441
|
+
isHmrUpdating = true;
|
|
442
|
+
let done = false;
|
|
443
|
+
try {
|
|
444
|
+
fn();
|
|
445
|
+
done = true;
|
|
446
|
+
} finally {
|
|
447
|
+
if (done) nextTick(() => {
|
|
448
|
+
isHmrUpdating = false;
|
|
449
|
+
});
|
|
450
|
+
else isHmrUpdating = false;
|
|
451
|
+
}
|
|
452
|
+
}
|
|
426
453
|
const map = /* @__PURE__ */ new Map();
|
|
427
454
|
function registerHMR(instance) {
|
|
428
455
|
const id = instance.type.__hmrId;
|
|
@@ -464,18 +491,16 @@ function rerender(id, newRender) {
|
|
|
464
491
|
instance.render = newRender;
|
|
465
492
|
normalizeClassComponent(instance.type).render = newRender;
|
|
466
493
|
}
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
472
|
-
|
|
473
|
-
|
|
474
|
-
|
|
494
|
+
runWithHmrUpdating(() => {
|
|
495
|
+
if (instance.vapor) {
|
|
496
|
+
if (!instance.isUnmounted) instance.hmrRerender();
|
|
497
|
+
} else {
|
|
498
|
+
const i = instance;
|
|
499
|
+
if (!(i.effect.flags & 1024)) {
|
|
500
|
+
i.renderCache = [];
|
|
501
|
+
i.effect.run();
|
|
502
|
+
}
|
|
475
503
|
}
|
|
476
|
-
}
|
|
477
|
-
nextTick(() => {
|
|
478
|
-
isHmrUpdating = false;
|
|
479
504
|
});
|
|
480
505
|
});
|
|
481
506
|
}
|
|
@@ -490,17 +515,19 @@ function reload(id, newComp) {
|
|
|
490
515
|
for (const instance of instances) if (instance.root && instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(instance.type);
|
|
491
516
|
const dirtyInstances = new Set(instances);
|
|
492
517
|
const rerenderedParents = /* @__PURE__ */ new Set();
|
|
493
|
-
|
|
494
|
-
const
|
|
495
|
-
|
|
496
|
-
if (
|
|
497
|
-
rerenderedParents.
|
|
498
|
-
|
|
499
|
-
|
|
500
|
-
|
|
501
|
-
|
|
518
|
+
runWithHmrUpdating(() => {
|
|
519
|
+
for (const instance of instances) {
|
|
520
|
+
const parent = instance.parent;
|
|
521
|
+
if (parent) {
|
|
522
|
+
if (!hasDirtyAncestor(instance, dirtyInstances) && !rerenderedParents.has(parent)) {
|
|
523
|
+
rerenderedParents.add(parent);
|
|
524
|
+
parent.hmrRerender();
|
|
525
|
+
}
|
|
526
|
+
} else instance.hmrReload(newComp);
|
|
527
|
+
}
|
|
528
|
+
});
|
|
502
529
|
} else {
|
|
503
|
-
const
|
|
530
|
+
const parents = /* @__PURE__ */ new Set();
|
|
504
531
|
const dirtyInstanceSet = new Set(instances);
|
|
505
532
|
for (const instance of instances) {
|
|
506
533
|
const oldComp = normalizeClassComponent(instance.type);
|
|
@@ -519,33 +546,23 @@ function reload(id, newComp) {
|
|
|
519
546
|
instance.ceReload(newComp.styles);
|
|
520
547
|
dirtyInstances.delete(instance);
|
|
521
548
|
} else if (instance.parent) {
|
|
522
|
-
|
|
523
|
-
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) {
|
|
524
|
-
let updates = parentUpdates.get(parent);
|
|
525
|
-
if (!updates) parentUpdates.set(parent, updates = []);
|
|
526
|
-
updates.push([instance, dirtyInstances]);
|
|
527
|
-
}
|
|
549
|
+
if (!hasDirtyAncestor(instance, dirtyInstanceSet)) parents.add(instance.parent);
|
|
528
550
|
} else if (instance.appContext.reload) instance.appContext.reload();
|
|
529
551
|
else if (typeof window !== "undefined") window.location.reload();
|
|
530
552
|
else console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
|
|
531
553
|
if (instance.root.ce && instance !== instance.root) instance.root.ce._removeChildStyle(oldComp);
|
|
532
554
|
}
|
|
533
|
-
|
|
555
|
+
parents.forEach((parent) => {
|
|
534
556
|
queueJob(() => {
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
|
|
557
|
+
runWithHmrUpdating(() => {
|
|
558
|
+
if (parent.vapor) parent.hmrRerender();
|
|
559
|
+
else {
|
|
560
|
+
const i = parent;
|
|
561
|
+
if (!(i.effect.flags & 1024)) {
|
|
562
|
+
i.renderCache = [];
|
|
563
|
+
i.effect.run();
|
|
564
|
+
}
|
|
542
565
|
}
|
|
543
|
-
}
|
|
544
|
-
nextTick(() => {
|
|
545
|
-
isHmrUpdating = false;
|
|
546
|
-
});
|
|
547
|
-
updates.forEach(([instance, dirtyInstances]) => {
|
|
548
|
-
dirtyInstances.delete(instance);
|
|
549
566
|
});
|
|
550
567
|
});
|
|
551
568
|
});
|
|
@@ -615,20 +632,20 @@ function devtoolsInitApp(app, version) {
|
|
|
615
632
|
function devtoolsUnmountApp(app) {
|
|
616
633
|
emit$1("app:unmount", app);
|
|
617
634
|
}
|
|
618
|
-
const devtoolsComponentAdded =
|
|
619
|
-
const devtoolsComponentUpdated =
|
|
620
|
-
const _devtoolsComponentRemoved =
|
|
635
|
+
const devtoolsComponentAdded = /*@__PURE__*/ createDevtoolsComponentHook("component:added");
|
|
636
|
+
const devtoolsComponentUpdated = /*@__PURE__*/ createDevtoolsComponentHook("component:updated");
|
|
637
|
+
const _devtoolsComponentRemoved = /*@__PURE__*/ createDevtoolsComponentHook("component:removed");
|
|
621
638
|
const devtoolsComponentRemoved = (component) => {
|
|
622
639
|
if (devtools$1 && typeof devtools$1.cleanupBuffer === "function" && !devtools$1.cleanupBuffer(component)) _devtoolsComponentRemoved(component);
|
|
623
640
|
};
|
|
624
|
-
|
|
641
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
625
642
|
function createDevtoolsComponentHook(hook) {
|
|
626
643
|
return (component) => {
|
|
627
644
|
emit$1(hook, component.appContext.app, component.uid, component.parent ? component.parent.uid : void 0, component);
|
|
628
645
|
};
|
|
629
646
|
}
|
|
630
|
-
const devtoolsPerfStart =
|
|
631
|
-
const devtoolsPerfEnd =
|
|
647
|
+
const devtoolsPerfStart = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:start");
|
|
648
|
+
const devtoolsPerfEnd = /*@__PURE__*/ createDevtoolsPerformanceHook("perf:end");
|
|
632
649
|
function createDevtoolsPerformanceHook(hook) {
|
|
633
650
|
return (component, type, time) => {
|
|
634
651
|
emit$1(hook, component.appContext.app, component.uid, component, type, time);
|
|
@@ -891,7 +908,7 @@ function instanceWatch(source, value, options) {
|
|
|
891
908
|
}
|
|
892
909
|
const prev = setCurrentInstance(this);
|
|
893
910
|
const res = doWatch(getter, cb.bind(publicThis), options);
|
|
894
|
-
|
|
911
|
+
restoreCurrentInstance(prev);
|
|
895
912
|
return res;
|
|
896
913
|
}
|
|
897
914
|
function createPathGetter(ctx, path) {
|
|
@@ -913,15 +930,16 @@ const isTargetSVG = (target) => typeof SVGElement !== "undefined" && target inst
|
|
|
913
930
|
const isTargetMathML = (target) => typeof MathMLElement === "function" && target instanceof MathMLElement;
|
|
914
931
|
const resolveTarget = (props, select) => {
|
|
915
932
|
const targetSelector = props && props.to;
|
|
916
|
-
if (isString(targetSelector))
|
|
917
|
-
|
|
918
|
-
|
|
933
|
+
if (isString(targetSelector)) {
|
|
934
|
+
if (!select) {
|
|
935
|
+
process.env.NODE_ENV !== "production" && warn$1("Current renderer does not support string target for Teleports. (missing querySelector renderer option)");
|
|
936
|
+
return null;
|
|
937
|
+
} else {
|
|
938
|
+
const target = select(targetSelector);
|
|
939
|
+
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
940
|
+
return target;
|
|
941
|
+
}
|
|
919
942
|
} else {
|
|
920
|
-
const target = select(targetSelector);
|
|
921
|
-
if (!!(process.env.NODE_ENV !== "production") && !target && !isTeleportDisabled(props)) warn$1(`Failed to locate Teleport target with selector "${targetSelector}". Note the target element must exist before the component is mounted - i.e. the target cannot be rendered by the component itself, and ideally should be outside of the entire Vue component tree.`);
|
|
922
|
-
return target;
|
|
923
|
-
}
|
|
924
|
-
else {
|
|
925
943
|
if (!!(process.env.NODE_ENV !== "production") && !targetSelector && !isTeleportDisabled(props)) warn$1(`Invalid Teleport target: ${targetSelector}`);
|
|
926
944
|
return targetSelector;
|
|
927
945
|
}
|
|
@@ -959,7 +977,8 @@ const TeleportImpl = {
|
|
|
959
977
|
if (pendingMounts.get(vnode) !== mountJob) return;
|
|
960
978
|
pendingMounts.delete(vnode);
|
|
961
979
|
if (isTeleportDisabled(vnode.props)) {
|
|
962
|
-
|
|
980
|
+
const mountContainer = parentNode(vnode.el) || container;
|
|
981
|
+
mount(vnode, mountContainer, vnode.anchor);
|
|
963
982
|
updateCssVars(vnode, true);
|
|
964
983
|
}
|
|
965
984
|
mountToTarget(vnode);
|
|
@@ -1068,15 +1087,17 @@ function hydrateTeleport(node, vnode, parentComponent, parentSuspense, slotScope
|
|
|
1068
1087
|
const disabled = isTeleportDisabled(vnode.props);
|
|
1069
1088
|
if (target) {
|
|
1070
1089
|
const targetNode = target._lpa || target.firstChild;
|
|
1071
|
-
if (vnode.shapeFlag & 16)
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
|
|
1076
|
-
|
|
1077
|
-
|
|
1078
|
-
|
|
1079
|
-
|
|
1090
|
+
if (vnode.shapeFlag & 16) {
|
|
1091
|
+
if (disabled) {
|
|
1092
|
+
hydrateDisabledTeleport(node, vnode);
|
|
1093
|
+
hydrateAnchor(target, targetNode);
|
|
1094
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert, parentNode(node) === target ? node : null);
|
|
1095
|
+
} else {
|
|
1096
|
+
vnode.anchor = nextSibling(node);
|
|
1097
|
+
hydrateAnchor(target, targetNode);
|
|
1098
|
+
if (!vnode.targetAnchor) prepareAnchor(target, vnode, createText, insert);
|
|
1099
|
+
hydrateChildren(targetNode && nextSibling(targetNode), vnode, target, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1100
|
+
}
|
|
1080
1101
|
}
|
|
1081
1102
|
updateCssVars(vnode, disabled);
|
|
1082
1103
|
} else if (disabled) {
|
|
@@ -1164,49 +1185,16 @@ const BaseTransitionImpl = {
|
|
|
1164
1185
|
setup(props, { slots }) {
|
|
1165
1186
|
const instance = getCurrentInstance();
|
|
1166
1187
|
const state = useTransitionState();
|
|
1188
|
+
let resumeAfterLeave;
|
|
1167
1189
|
return () => {
|
|
1168
|
-
const
|
|
1169
|
-
const child = children && children.length ? findNonCommentChild(children) : instance.subTree ? createCommentVNode() : void 0;
|
|
1190
|
+
const child = resolveTransitionChild(slots.default && slots.default(), !!instance.subTree);
|
|
1170
1191
|
if (!child) return;
|
|
1171
1192
|
const rawProps = toRaw$1(props);
|
|
1172
1193
|
const { mode } = rawProps;
|
|
1173
1194
|
checkTransitionMode(mode);
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
let enterHooks = resolveTransitionHooks(innerChild, rawProps, state, instance, (hooks) => enterHooks = hooks);
|
|
1178
|
-
if (innerChild.type !== Comment) setTransitionHooks(innerChild, enterHooks);
|
|
1179
|
-
let oldInnerChild = instance.subTree && getInnerChild$1(instance.subTree);
|
|
1180
|
-
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(oldInnerChild, innerChild) && recursiveGetSubtree(instance).type !== Comment) {
|
|
1181
|
-
let leavingHooks = resolveTransitionHooks(oldInnerChild, rawProps, state, instance);
|
|
1182
|
-
setTransitionHooks(oldInnerChild, leavingHooks);
|
|
1183
|
-
if (mode === "out-in" && innerChild.type !== Comment) {
|
|
1184
|
-
state.isLeaving = true;
|
|
1185
|
-
leavingHooks.afterLeave = () => {
|
|
1186
|
-
state.isLeaving = false;
|
|
1187
|
-
if (!(instance.job.flags & 4)) instance.update();
|
|
1188
|
-
delete leavingHooks.afterLeave;
|
|
1189
|
-
oldInnerChild = void 0;
|
|
1190
|
-
};
|
|
1191
|
-
return emptyPlaceholder(child);
|
|
1192
|
-
} else if (mode === "in-out" && innerChild.type !== Comment) leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
1193
|
-
const leavingVNodesCache = getLeavingNodesForType(state, oldInnerChild);
|
|
1194
|
-
leavingVNodesCache[String(oldInnerChild.key)] = oldInnerChild;
|
|
1195
|
-
el[leaveCbKey] = () => {
|
|
1196
|
-
earlyRemove();
|
|
1197
|
-
el[leaveCbKey] = void 0;
|
|
1198
|
-
delete enterHooks.delayedLeave;
|
|
1199
|
-
oldInnerChild = void 0;
|
|
1200
|
-
};
|
|
1201
|
-
enterHooks.delayedLeave = () => {
|
|
1202
|
-
delayedLeave();
|
|
1203
|
-
delete enterHooks.delayedLeave;
|
|
1204
|
-
oldInnerChild = void 0;
|
|
1205
|
-
};
|
|
1206
|
-
};
|
|
1207
|
-
else oldInnerChild = void 0;
|
|
1208
|
-
} else if (oldInnerChild) oldInnerChild = void 0;
|
|
1209
|
-
return child;
|
|
1195
|
+
return prepareTransitionSwitch(instance.subTree, child, rawProps, state, instance, mode === "out-in" ? resumeAfterLeave || (resumeAfterLeave = () => {
|
|
1196
|
+
if (!(instance.job.flags & 4)) instance.update();
|
|
1197
|
+
}) : NOOP);
|
|
1210
1198
|
};
|
|
1211
1199
|
}
|
|
1212
1200
|
};
|
|
@@ -1276,8 +1264,10 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1276
1264
|
persisted,
|
|
1277
1265
|
beforeEnter(el) {
|
|
1278
1266
|
let hook = onBeforeEnter;
|
|
1279
|
-
if (!state.isMounted)
|
|
1280
|
-
|
|
1267
|
+
if (!state.isMounted) {
|
|
1268
|
+
if (appear) hook = onBeforeAppear || onBeforeEnter;
|
|
1269
|
+
else return;
|
|
1270
|
+
}
|
|
1281
1271
|
if (el[leaveCbKey]) el[leaveCbKey](true);
|
|
1282
1272
|
earlyRemove();
|
|
1283
1273
|
callHook(hook, [el]);
|
|
@@ -1287,11 +1277,13 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1287
1277
|
let hook = onEnter;
|
|
1288
1278
|
let afterHook = onAfterEnter;
|
|
1289
1279
|
let cancelHook = onEnterCancelled;
|
|
1290
|
-
if (!state.isMounted)
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
1280
|
+
if (!state.isMounted) {
|
|
1281
|
+
if (appear) {
|
|
1282
|
+
hook = onAppear || onEnter;
|
|
1283
|
+
afterHook = onAfterAppear || onAfterEnter;
|
|
1284
|
+
cancelHook = onAppearCancelled || onEnterCancelled;
|
|
1285
|
+
} else return;
|
|
1286
|
+
}
|
|
1295
1287
|
let called = false;
|
|
1296
1288
|
el[enterCbKey] = (cancelled) => {
|
|
1297
1289
|
if (called) return;
|
|
@@ -1325,7 +1317,7 @@ function baseResolveTransitionHooks(context, props, state, instance) {
|
|
|
1325
1317
|
else done();
|
|
1326
1318
|
},
|
|
1327
1319
|
clone(node) {
|
|
1328
|
-
return cloneHooks(node);
|
|
1320
|
+
return cloneHooks ? cloneHooks(node) : hooks;
|
|
1329
1321
|
}
|
|
1330
1322
|
};
|
|
1331
1323
|
return hooks;
|
|
@@ -1349,16 +1341,102 @@ function getInnerChild$1(vnode) {
|
|
|
1349
1341
|
if (shapeFlag & 32 && isFunction(children.default)) return children.default();
|
|
1350
1342
|
}
|
|
1351
1343
|
}
|
|
1344
|
+
function resolveTransitionChild(children, renderEmpty = false) {
|
|
1345
|
+
const branches = children && getTransitionRawChildren(children, true);
|
|
1346
|
+
return branches && branches.length ? findNonCommentChild(branches) : renderEmpty ? createCommentVNode() : void 0;
|
|
1347
|
+
}
|
|
1348
|
+
/**
|
|
1349
|
+
* @internal
|
|
1350
|
+
*/
|
|
1351
|
+
function prepareTransitionSwitch(previous, next, props, state, instance, resumeAfterLeave, delayedLeaveSource) {
|
|
1352
|
+
if (state.isLeaving) return emptyPlaceholder(next);
|
|
1353
|
+
const nextInner = getInnerChild$1(next);
|
|
1354
|
+
if (!nextInner) return emptyPlaceholder(next);
|
|
1355
|
+
let enterHooks = resolveTransitionHooks(nextInner, props, state, instance, (hooks) => {
|
|
1356
|
+
if (delayedLeaveSource) forwardDelayedLeave(hooks, delayedLeaveSource);
|
|
1357
|
+
enterHooks = hooks;
|
|
1358
|
+
});
|
|
1359
|
+
if (delayedLeaveSource) forwardDelayedLeave(enterHooks, delayedLeaveSource);
|
|
1360
|
+
if (nextInner.type !== Comment) setTransitionHooks(nextInner, enterHooks);
|
|
1361
|
+
const mode = props.mode;
|
|
1362
|
+
const previousInner = previous && getInnerChild$1(previous);
|
|
1363
|
+
if (previous && previousInner && previousInner.type !== Comment && !isSameVNodeType(previousInner, nextInner) && (!previous.component || recursiveGetSubtree(previous.component).type !== Comment)) {
|
|
1364
|
+
const leavingHooks = prepareLeavingTransitionHooks(previousInner, props, state, instance);
|
|
1365
|
+
if (nextInner.type !== Comment && (mode === "out-in" || mode === "in-out") && applyTransitionModeSwitch(previousInner, leavingHooks, mode === "in-out" ? () => enterHooks : void 0, props, state, resumeAfterLeave)) return emptyPlaceholder(next);
|
|
1366
|
+
}
|
|
1367
|
+
return next;
|
|
1368
|
+
}
|
|
1369
|
+
function forwardDelayedLeave(hooks, source) {
|
|
1370
|
+
const delayedLeave = source && source.delayedLeave;
|
|
1371
|
+
if (!delayedLeave) return;
|
|
1372
|
+
hooks.delayedLeave = () => {
|
|
1373
|
+
if (source.delayedLeave === delayedLeave) delayedLeave();
|
|
1374
|
+
delete hooks.delayedLeave;
|
|
1375
|
+
};
|
|
1376
|
+
}
|
|
1377
|
+
/**
|
|
1378
|
+
* Prepares an outgoing VNode when the incoming branch belongs to another
|
|
1379
|
+
* renderer. Returns true when out-in must defer the incoming branch.
|
|
1380
|
+
*
|
|
1381
|
+
* @internal
|
|
1382
|
+
*/
|
|
1383
|
+
function prepareTransitionLeave(previous, enterHooks, props, state, instance, resumeAfterLeave) {
|
|
1384
|
+
const previousInner = getInnerChild$1(previous);
|
|
1385
|
+
if (!previousInner || previousInner.type === Comment || previous.component && recursiveGetSubtree(previous.component).type === Comment) return false;
|
|
1386
|
+
return applyTransitionModeSwitch(previousInner, prepareLeavingTransitionHooks(previousInner, props, state, instance), enterHooks ? () => enterHooks : void 0, props, state, resumeAfterLeave);
|
|
1387
|
+
}
|
|
1388
|
+
function prepareLeavingTransitionHooks(previousInner, props, state, instance) {
|
|
1389
|
+
return setTransitionHooks(previousInner, resolveTransitionHooks(previousInner, props, state, instance));
|
|
1390
|
+
}
|
|
1391
|
+
function applyTransitionModeSwitch(leavingVNode, leavingHooks, getEnterHooks, props, state, resumeAfterLeave) {
|
|
1392
|
+
if (props.mode === "out-in") {
|
|
1393
|
+
state.isLeaving = true;
|
|
1394
|
+
leavingHooks.afterLeave = () => {
|
|
1395
|
+
state.isLeaving = false;
|
|
1396
|
+
resumeAfterLeave();
|
|
1397
|
+
delete leavingHooks.afterLeave;
|
|
1398
|
+
};
|
|
1399
|
+
return true;
|
|
1400
|
+
} else if (props.mode === "in-out" && getEnterHooks) {
|
|
1401
|
+
let delayedLeavingVNode = leavingVNode;
|
|
1402
|
+
leavingHooks.delayLeave = (el, earlyRemove, delayedLeave) => {
|
|
1403
|
+
const enterHooks = getEnterHooks();
|
|
1404
|
+
if (!enterHooks) {
|
|
1405
|
+
delayedLeave();
|
|
1406
|
+
return;
|
|
1407
|
+
}
|
|
1408
|
+
const vnode = delayedLeavingVNode;
|
|
1409
|
+
const leavingVNodesCache = getLeavingNodesForType(state, vnode);
|
|
1410
|
+
leavingVNodesCache[String(vnode.key)] = vnode;
|
|
1411
|
+
el[leaveCbKey] = () => {
|
|
1412
|
+
earlyRemove();
|
|
1413
|
+
el[leaveCbKey] = void 0;
|
|
1414
|
+
delete enterHooks.delayedLeave;
|
|
1415
|
+
delayedLeavingVNode = void 0;
|
|
1416
|
+
};
|
|
1417
|
+
enterHooks.delayedLeave = () => {
|
|
1418
|
+
delayedLeave();
|
|
1419
|
+
delete enterHooks.delayedLeave;
|
|
1420
|
+
delayedLeavingVNode = void 0;
|
|
1421
|
+
};
|
|
1422
|
+
};
|
|
1423
|
+
}
|
|
1424
|
+
return false;
|
|
1425
|
+
}
|
|
1352
1426
|
function setTransitionHooks(vnode, hooks) {
|
|
1353
|
-
if (vnode.shapeFlag & 6 && vnode.component)
|
|
1354
|
-
else {
|
|
1427
|
+
if (vnode.shapeFlag & 6 && vnode.component) {
|
|
1355
1428
|
vnode.transition = hooks;
|
|
1356
|
-
setTransitionHooks(vnode.component
|
|
1357
|
-
|
|
1358
|
-
|
|
1359
|
-
|
|
1360
|
-
|
|
1429
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(vnode.component, vnode).setTransitionHooks(vnode.component, hooks);
|
|
1430
|
+
else {
|
|
1431
|
+
const subTree = vnode.component.subTree;
|
|
1432
|
+
return setTransitionHooks(isTeleport(subTree.type) ? getInnerChild$1(subTree) || subTree : subTree, hooks);
|
|
1433
|
+
}
|
|
1434
|
+
} else if (vnode.shapeFlag & 128) {
|
|
1435
|
+
const contentHooks = vnode.ssContent.transition = hooks.clone(vnode.ssContent);
|
|
1436
|
+
const fallbackHooks = vnode.ssFallback.transition = hooks.clone(vnode.ssFallback);
|
|
1437
|
+
return vnode.suspense && vnode.suspense.activeBranch === vnode.ssFallback ? fallbackHooks : contentHooks;
|
|
1361
1438
|
} else vnode.transition = hooks;
|
|
1439
|
+
return hooks;
|
|
1362
1440
|
}
|
|
1363
1441
|
function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
1364
1442
|
let ret = [];
|
|
@@ -1382,9 +1460,9 @@ function checkTransitionMode(mode) {
|
|
|
1382
1460
|
}
|
|
1383
1461
|
//#endregion
|
|
1384
1462
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
1385
|
-
|
|
1463
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
1386
1464
|
function defineComponent(options, extraOptions) {
|
|
1387
|
-
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
1465
|
+
return isFunction(options) ? /*@__PURE__*/ (() => extend({ name: options.name }, extraOptions, { setup: options }))() : options;
|
|
1388
1466
|
}
|
|
1389
1467
|
//#endregion
|
|
1390
1468
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
@@ -1481,15 +1559,16 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
1481
1559
|
if (rawRef.f) {
|
|
1482
1560
|
const existing = _isString ? canSetSetupRef(ref) ? setupState[ref] : refs[ref] : canSetRef(ref) || !rawRef.k ? ref.value : refs[rawRef.k];
|
|
1483
1561
|
if (isUnmount) isArray(existing) && remove(existing, refValue);
|
|
1484
|
-
else if (!isArray(existing))
|
|
1485
|
-
|
|
1486
|
-
|
|
1487
|
-
|
|
1488
|
-
|
|
1489
|
-
|
|
1490
|
-
|
|
1491
|
-
|
|
1492
|
-
|
|
1562
|
+
else if (!isArray(existing)) {
|
|
1563
|
+
if (_isString) {
|
|
1564
|
+
refs[ref] = [refValue];
|
|
1565
|
+
if (canSetSetupRef(ref)) setupState[ref] = refs[ref];
|
|
1566
|
+
} else {
|
|
1567
|
+
const newVal = [refValue];
|
|
1568
|
+
if (canSetRef(ref, rawRef.k)) ref.value = newVal;
|
|
1569
|
+
if (rawRef.k) refs[rawRef.k] = newVal;
|
|
1570
|
+
}
|
|
1571
|
+
} else if (!existing.includes(refValue)) existing.push(refValue);
|
|
1493
1572
|
} else if (_isString) {
|
|
1494
1573
|
refs[ref] = value;
|
|
1495
1574
|
if (canSetSetupRef(ref)) setupState[ref] = value;
|
|
@@ -1550,7 +1629,18 @@ const logMismatchError = () => {
|
|
|
1550
1629
|
hasLoggedMismatchError = true;
|
|
1551
1630
|
};
|
|
1552
1631
|
const isSVGContainer = (container) => container.namespaceURI.includes("svg") && container.tagName !== "foreignObject";
|
|
1553
|
-
const isMathMLContainer = (container) =>
|
|
1632
|
+
const isMathMLContainer = (container) => {
|
|
1633
|
+
if (!container.namespaceURI.includes("MathML")) return false;
|
|
1634
|
+
if (container.tagName !== "annotation-xml") return true;
|
|
1635
|
+
const encoding = container.getAttribute("encoding");
|
|
1636
|
+
return !encoding || !encoding.includes("html");
|
|
1637
|
+
};
|
|
1638
|
+
/**
|
|
1639
|
+
* Resolve the element namespace a container's children should be created in.
|
|
1640
|
+
* The live DOM is the source of truth, so this also covers containers that are
|
|
1641
|
+
* only known at runtime (interop boundaries, teleport targets).
|
|
1642
|
+
* @internal
|
|
1643
|
+
*/
|
|
1554
1644
|
const getContainerType = (container) => {
|
|
1555
1645
|
if (container.nodeType !== 1) return void 0;
|
|
1556
1646
|
if (isSVGContainer(container)) return "svg";
|
|
@@ -1576,7 +1666,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1576
1666
|
};
|
|
1577
1667
|
const hydrateNode = (node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized = false) => {
|
|
1578
1668
|
optimized = optimized || !!vnode.dynamicChildren;
|
|
1579
|
-
const isFragmentStart = isComment(node) && node.data === "[";
|
|
1669
|
+
const isFragmentStart = isComment(node) && (node.data === "[" || node.data === "(");
|
|
1580
1670
|
const onMismatch = () => handleMismatch(node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragmentStart);
|
|
1581
1671
|
const { type, ref, shapeFlag, patchFlag } = vnode;
|
|
1582
1672
|
let domType = node.nodeType;
|
|
@@ -1592,11 +1682,12 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1592
1682
|
let nextNode = null;
|
|
1593
1683
|
switch (type) {
|
|
1594
1684
|
case Text:
|
|
1595
|
-
if (domType !== 3)
|
|
1596
|
-
|
|
1597
|
-
|
|
1598
|
-
|
|
1599
|
-
|
|
1685
|
+
if (domType !== 3) {
|
|
1686
|
+
if (vnode.children === "") {
|
|
1687
|
+
insert(vnode.el = createText(""), parentNode(node), node);
|
|
1688
|
+
nextNode = node;
|
|
1689
|
+
} else nextNode = onMismatch();
|
|
1690
|
+
} else {
|
|
1600
1691
|
if (node.data !== vnode.children) {
|
|
1601
1692
|
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration text mismatch in`, node.parentNode, `\n - rendered on server: ${JSON.stringify(node.data)}\n - expected on client: ${JSON.stringify(vnode.children)}`);
|
|
1602
1693
|
logMismatchError();
|
|
@@ -1633,45 +1724,35 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1633
1724
|
else nextNode = hydrateFragment(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1634
1725
|
break;
|
|
1635
1726
|
case VaporSlot:
|
|
1636
|
-
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense);
|
|
1727
|
+
nextNode = getVaporInterface(parentComponent, vnode).hydrateSlot(vnode, node, parentComponent, parentSuspense, slotScopeIds);
|
|
1637
1728
|
break;
|
|
1638
|
-
default: if (shapeFlag & 1)
|
|
1639
|
-
|
|
1640
|
-
|
|
1729
|
+
default: if (shapeFlag & 1) {
|
|
1730
|
+
if ((domType !== 1 || vnode.type.toLowerCase() !== node.tagName.toLowerCase()) && !isTemplateNode(node)) nextNode = onMismatch();
|
|
1731
|
+
else nextNode = hydrateElement(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1732
|
+
} else if (shapeFlag & 6) {
|
|
1641
1733
|
vnode.slotScopeIds = slotScopeIds;
|
|
1642
1734
|
const container = parentNode(node);
|
|
1643
1735
|
if (isFragmentStart) nextNode = locateClosingAnchor(node);
|
|
1644
1736
|
else if (isComment(node) && node.data === "teleport start") nextNode = locateClosingAnchor(node, node.data, "teleport end");
|
|
1645
1737
|
else nextNode = nextSibling(node);
|
|
1646
|
-
if (vnode.type.__vapor)
|
|
1647
|
-
|
|
1648
|
-
getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense, () => {
|
|
1649
|
-
if (vnode.dirs) {
|
|
1650
|
-
invokeDirectiveHook(vnode, null, parentComponent, "created");
|
|
1651
|
-
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
1652
|
-
}
|
|
1653
|
-
}, () => {
|
|
1654
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, vnode);
|
|
1655
|
-
});
|
|
1656
|
-
if (vnode.dirs) queueEffectWithSuspense(() => invokeDirectiveHook(vnode, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
1657
|
-
const vnodeMountedHook = !isAsyncWrapper(vnode) && vnode.props && vnode.props.onVnodeMounted;
|
|
1658
|
-
if (vnodeMountedHook) queueEffectWithSuspense(() => invokeVNodeHook(vnodeMountedHook, parentComponent, vnode), void 0, parentSuspense);
|
|
1659
|
-
} else {
|
|
1738
|
+
if (vnode.type.__vapor) getVaporInterface(parentComponent, vnode).hydrate(vnode, node, container, nextNode, parentComponent, parentSuspense);
|
|
1739
|
+
else {
|
|
1660
1740
|
mountComponent(vnode, container, null, parentComponent, parentSuspense, getContainerType(container), optimized);
|
|
1661
1741
|
const component = vnode.component;
|
|
1662
|
-
if (isAsyncWrapper(vnode)
|
|
1742
|
+
if (!component.subTree && (isAsyncWrapper(vnode) || component.asyncDep)) {
|
|
1663
1743
|
let subTree;
|
|
1664
1744
|
if (isFragmentStart) {
|
|
1665
|
-
subTree = createVNode(
|
|
1745
|
+
subTree = createVNode(Static);
|
|
1666
1746
|
subTree.anchor = nextNode ? nextNode.previousSibling : container.lastChild;
|
|
1667
|
-
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode("div");
|
|
1747
|
+
} else subTree = node.nodeType === 3 ? createTextVNode("") : createVNode(node.nodeType === 8 ? Comment : "div");
|
|
1668
1748
|
subTree.el = node;
|
|
1669
1749
|
component.subTree = subTree;
|
|
1670
1750
|
}
|
|
1671
1751
|
}
|
|
1672
|
-
} else if (shapeFlag & 64)
|
|
1673
|
-
|
|
1674
|
-
|
|
1752
|
+
} else if (shapeFlag & 64) {
|
|
1753
|
+
if (domType !== 8) nextNode = onMismatch();
|
|
1754
|
+
else nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, slotScopeIds, optimized, rendererInternals, hydrateChildren);
|
|
1755
|
+
} else if (shapeFlag & 128) nextNode = vnode.type.hydrate(node, vnode, parentComponent, parentSuspense, getContainerType(parentNode(node)), slotScopeIds, optimized, rendererInternals, hydrateNode);
|
|
1675
1756
|
else if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) warn$1("Invalid HostVNode type:", type, `(${typeof type})`);
|
|
1676
1757
|
}
|
|
1677
1758
|
if (ref != null) setRef(ref, null, parentSuspense, vnode);
|
|
@@ -1725,7 +1806,10 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1725
1806
|
const namespace = el.namespaceURI.includes("svg") ? "svg" : el.namespaceURI.includes("MathML") ? "mathml" : void 0;
|
|
1726
1807
|
for (const key in props) {
|
|
1727
1808
|
if ((!!(process.env.NODE_ENV !== "production") || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && !(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) logMismatchError();
|
|
1728
|
-
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key))
|
|
1809
|
+
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || key[0] === "." || isCustomElement && !isReservedProp(key) || dynamicProps && dynamicProps.includes(key)) {
|
|
1810
|
+
if (isUnchangedResourceProp(el, key, props[key])) continue;
|
|
1811
|
+
patchProp(el, key, null, props[key], namespace, parentComponent);
|
|
1812
|
+
}
|
|
1729
1813
|
}
|
|
1730
1814
|
} else if (props.onClick) patchProp(el, "onClick", null, props.onClick, void 0, parentComponent);
|
|
1731
1815
|
else if (patchFlag & 4 && isReactive$1(props.style)) for (const key in props.style) props.style[key];
|
|
@@ -1775,8 +1859,9 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1775
1859
|
const { slotScopeIds: fragmentSlotScopeIds } = vnode;
|
|
1776
1860
|
if (fragmentSlotScopeIds) slotScopeIds = slotScopeIds ? slotScopeIds.concat(fragmentSlotScopeIds) : fragmentSlotScopeIds;
|
|
1777
1861
|
const container = parentNode(node);
|
|
1778
|
-
const
|
|
1779
|
-
|
|
1862
|
+
const first = nextSibling(node);
|
|
1863
|
+
const next = vnode.vo && node.data === "(" ? getVaporInterface(parentComponent, vnode).hydrateSlotOutlet(vnode, node, parentComponent, parentSuspense, slotScopeIds) : hydrateChildren(first, vnode, container, parentComponent, parentSuspense, slotScopeIds, optimized);
|
|
1864
|
+
if (next && isComment(next) && next.data === (node.data === "(" ? ")" : "]")) return nextSibling(vnode.anchor = next);
|
|
1780
1865
|
else {
|
|
1781
1866
|
logMismatchError();
|
|
1782
1867
|
insert(vnode.anchor = createComment(`]`), container, next);
|
|
@@ -1785,7 +1870,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1785
1870
|
};
|
|
1786
1871
|
const handleMismatch = (node, vnode, parentComponent, parentSuspense, slotScopeIds, isFragment) => {
|
|
1787
1872
|
if (!isNodeMismatchAllowed(node, vnode)) {
|
|
1788
|
-
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && node.data === "[" ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
1873
|
+
(process.env.NODE_ENV !== "production" || __VUE_PROD_HYDRATION_MISMATCH_DETAILS__) && warn$1(`Hydration node mismatch:\n- rendered on server:`, node, node.nodeType === 3 ? `(text)` : isComment(node) && (node.data === "[" || node.data === "(") ? `(start of fragment)` : ``, `\n- expected on client:`, vnode.type);
|
|
1789
1874
|
logMismatchError();
|
|
1790
1875
|
}
|
|
1791
1876
|
vnode.el = null;
|
|
@@ -1801,20 +1886,22 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1801
1886
|
const container = parentNode(node);
|
|
1802
1887
|
remove(node);
|
|
1803
1888
|
patch(null, vnode, container, next, parentComponent, parentSuspense, getContainerType(container), slotScopeIds);
|
|
1804
|
-
if (parentComponent) {
|
|
1889
|
+
if (parentComponent && parentComponent.vnode) {
|
|
1805
1890
|
parentComponent.vnode.el = vnode.el;
|
|
1806
1891
|
updateHOCHostEl(parentComponent, vnode.el);
|
|
1807
1892
|
}
|
|
1808
1893
|
return next;
|
|
1809
1894
|
};
|
|
1810
|
-
const locateClosingAnchor = (node, open = "[", close = "]") => {
|
|
1895
|
+
const locateClosingAnchor = (node, open = node && isComment(node) && node.data === "(" ? "(" : "[", close = open === "(" ? ")" : "]") => {
|
|
1811
1896
|
let match = 0;
|
|
1812
1897
|
while (node) {
|
|
1813
1898
|
node = nextSibling(node);
|
|
1814
1899
|
if (node && isComment(node)) {
|
|
1815
1900
|
if (node.data === open) match++;
|
|
1816
|
-
if (node.data === close)
|
|
1817
|
-
|
|
1901
|
+
if (node.data === close) {
|
|
1902
|
+
if (match === 0) return nextSibling(node);
|
|
1903
|
+
else match--;
|
|
1904
|
+
}
|
|
1818
1905
|
}
|
|
1819
1906
|
}
|
|
1820
1907
|
return node;
|
|
@@ -1824,7 +1911,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1824
1911
|
if (parentNode) parentNode.replaceChild(newNode, oldNode);
|
|
1825
1912
|
let parent = parentComponent;
|
|
1826
1913
|
while (parent) {
|
|
1827
|
-
if (parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
1914
|
+
if (parent.vnode && parent.vnode.el === oldNode) parent.vnode.el = parent.subTree.el = newNode;
|
|
1828
1915
|
parent = parent.parent;
|
|
1829
1916
|
}
|
|
1830
1917
|
};
|
|
@@ -1833,6 +1920,16 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1833
1920
|
const isTemplateNode = (node) => {
|
|
1834
1921
|
return node.nodeType === 1 && node.tagName === "TEMPLATE";
|
|
1835
1922
|
};
|
|
1923
|
+
const resourceProps = /*@__PURE__*/ new Set([
|
|
1924
|
+
"src",
|
|
1925
|
+
"srcset",
|
|
1926
|
+
"href",
|
|
1927
|
+
"poster"
|
|
1928
|
+
]);
|
|
1929
|
+
function isUnchangedResourceProp(el, key, clientValue) {
|
|
1930
|
+
if (!resourceProps.has(key)) return false;
|
|
1931
|
+
return el.getAttribute(key) === (clientValue == null ? null : `${clientValue}`);
|
|
1932
|
+
}
|
|
1836
1933
|
/**
|
|
1837
1934
|
* Dev only
|
|
1838
1935
|
*/
|
|
@@ -1876,7 +1973,10 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
1876
1973
|
function getAttributeMismatch(el, key, clientValue) {
|
|
1877
1974
|
let actual;
|
|
1878
1975
|
let expected;
|
|
1879
|
-
if (
|
|
1976
|
+
if (key === "hidden") {
|
|
1977
|
+
actual = normalizeHiddenValue(el.getAttribute(key));
|
|
1978
|
+
expected = normalizeHiddenValue(clientValue);
|
|
1979
|
+
} else if (isBooleanAttr(key)) {
|
|
1880
1980
|
actual = el.hasAttribute(key);
|
|
1881
1981
|
expected = includeBooleanAttr(clientValue);
|
|
1882
1982
|
} else if (clientValue == null) {
|
|
@@ -1904,6 +2004,11 @@ function warnPropMismatch(el, mismatchKey, mismatchType, actual, expected) {
|
|
|
1904
2004
|
}
|
|
1905
2005
|
return false;
|
|
1906
2006
|
}
|
|
2007
|
+
function normalizeHiddenValue(value) {
|
|
2008
|
+
if (!isRenderableAttrValue(value)) return false;
|
|
2009
|
+
if (isString(value)) return value.toLowerCase() === "until-found" ? "until-found" : "";
|
|
2010
|
+
return includeBooleanAttr(value) ? "" : false;
|
|
2011
|
+
}
|
|
1907
2012
|
function toClassSet(str) {
|
|
1908
2013
|
return new Set(str.trim().split(/\s+/));
|
|
1909
2014
|
}
|
|
@@ -2054,16 +2159,18 @@ const hydrateOnInteraction = (interactions = []) => (hydrate, forEach) => {
|
|
|
2054
2159
|
return teardown;
|
|
2055
2160
|
};
|
|
2056
2161
|
function forEachElement(node, cb) {
|
|
2057
|
-
if (isComment(node) && node.data === "[") {
|
|
2162
|
+
if (isComment(node) && (node.data === "[" || node.data === "(")) {
|
|
2163
|
+
const open = node.data;
|
|
2164
|
+
const close = open === "[" ? "]" : ")";
|
|
2058
2165
|
let depth = 1;
|
|
2059
2166
|
let next = node.nextSibling;
|
|
2060
2167
|
while (next) {
|
|
2061
2168
|
if (next.nodeType === 1) {
|
|
2062
2169
|
if (cb(next) === false) break;
|
|
2063
2170
|
} else if (isComment(next)) {
|
|
2064
|
-
if (next.data ===
|
|
2171
|
+
if (next.data === close) {
|
|
2065
2172
|
if (--depth === 0) break;
|
|
2066
|
-
} else if (next.data ===
|
|
2173
|
+
} else if (next.data === open) depth++;
|
|
2067
2174
|
}
|
|
2068
2175
|
next = next.nextSibling;
|
|
2069
2176
|
}
|
|
@@ -2072,14 +2179,14 @@ function forEachElement(node, cb) {
|
|
|
2072
2179
|
//#endregion
|
|
2073
2180
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
2074
2181
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
2075
|
-
|
|
2182
|
+
/*@__NO_SIDE_EFFECTS__*/
|
|
2076
2183
|
function defineAsyncComponent(source) {
|
|
2077
2184
|
const { load, getResolvedComp, setPendingRequest, source: { loadingComponent, errorComponent, delay, hydrate: hydrateStrategy, timeout, suspensible = true } } = createAsyncComponentContext(source);
|
|
2078
2185
|
return /* @__PURE__ */ defineComponent({
|
|
2079
2186
|
name: "AsyncComponentWrapper",
|
|
2080
2187
|
__asyncLoader: load,
|
|
2081
2188
|
__asyncHydrate(el, instance, hydrate) {
|
|
2082
|
-
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy);
|
|
2189
|
+
performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, true);
|
|
2083
2190
|
},
|
|
2084
2191
|
get __asyncResolved() {
|
|
2085
2192
|
return getResolvedComp();
|
|
@@ -2198,10 +2305,10 @@ const useAsyncComponentState = (delay, timeout, onError, instance = currentInsta
|
|
|
2198
2305
|
* shared between core and vapor
|
|
2199
2306
|
* @internal
|
|
2200
2307
|
*/
|
|
2201
|
-
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy) {
|
|
2308
|
+
function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydrateStrategy, skipIfUpdated) {
|
|
2202
2309
|
const wasConnected = el.isConnected;
|
|
2203
2310
|
let patched = false;
|
|
2204
|
-
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2311
|
+
if (skipIfUpdated) (instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2205
2312
|
const performHydrate = () => {
|
|
2206
2313
|
if (patched) {
|
|
2207
2314
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -2291,10 +2398,13 @@ const KeepAlive = {
|
|
|
2291
2398
|
});
|
|
2292
2399
|
let pendingCacheKey = null;
|
|
2293
2400
|
const cacheSubtree = () => {
|
|
2294
|
-
if (pendingCacheKey != null)
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
|
|
2401
|
+
if (pendingCacheKey != null) {
|
|
2402
|
+
if (isSuspense(keepAliveInstance.subTree.type)) queuePostRenderEffect(() => {
|
|
2403
|
+
const vnode = getInnerChild(keepAliveInstance.subTree);
|
|
2404
|
+
if (vnode.component) cache.set(pendingCacheKey, vnode);
|
|
2405
|
+
}, void 0, keepAliveInstance.subTree.suspense);
|
|
2406
|
+
else cache.set(pendingCacheKey, getInnerChild(keepAliveInstance.subTree));
|
|
2407
|
+
}
|
|
2298
2408
|
};
|
|
2299
2409
|
onMounted(cacheSubtree);
|
|
2300
2410
|
onUpdated(cacheSubtree);
|
|
@@ -2451,7 +2561,7 @@ function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
|
2451
2561
|
try {
|
|
2452
2562
|
return callWithAsyncErrorHandling(hook, target, type, args);
|
|
2453
2563
|
} finally {
|
|
2454
|
-
|
|
2564
|
+
restoreCurrentInstance(prev);
|
|
2455
2565
|
setActiveSub(prevSub);
|
|
2456
2566
|
}
|
|
2457
2567
|
});
|
|
@@ -2536,23 +2646,25 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2536
2646
|
}
|
|
2537
2647
|
ret = new Array(source.length);
|
|
2538
2648
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? toReadonly(toReactive(source[i])) : toReactive(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
2539
|
-
} else if (typeof source === "number")
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2547
|
-
else {
|
|
2548
|
-
const keys = Object.keys(source);
|
|
2549
|
-
ret = new Array(keys.length);
|
|
2550
|
-
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2551
|
-
const key = keys[i];
|
|
2552
|
-
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2649
|
+
} else if (typeof source === "number") {
|
|
2650
|
+
if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
2651
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
2652
|
+
ret = [];
|
|
2653
|
+
} else {
|
|
2654
|
+
ret = new Array(source);
|
|
2655
|
+
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2553
2656
|
}
|
|
2554
|
-
}
|
|
2555
|
-
|
|
2657
|
+
} else if (isObject(source)) {
|
|
2658
|
+
if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2659
|
+
else {
|
|
2660
|
+
const keys = Object.keys(source);
|
|
2661
|
+
ret = new Array(keys.length);
|
|
2662
|
+
for (let i = 0, l = keys.length; i < l; i++) {
|
|
2663
|
+
const key = keys[i];
|
|
2664
|
+
ret[i] = renderItem(source[key], key, i, cached && cached[i]);
|
|
2665
|
+
}
|
|
2666
|
+
}
|
|
2667
|
+
} else ret = [];
|
|
2556
2668
|
if (cache) cache[index] = ret;
|
|
2557
2669
|
return ret;
|
|
2558
2670
|
}
|
|
@@ -2577,18 +2689,45 @@ function createSlots(slots, dynamicSlots) {
|
|
|
2577
2689
|
//#endregion
|
|
2578
2690
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
2579
2691
|
/**
|
|
2692
|
+
* Links a slot function to its raw vapor slot: a raw vapor slot carries
|
|
2693
|
+
* itself, and the wrapper the interop slots proxy hands out carries the raw
|
|
2694
|
+
* slot it wraps — one lookup answers both "is this a vapor slot" and
|
|
2695
|
+
* "which one". Internal to vapor interop.
|
|
2696
|
+
*/
|
|
2697
|
+
const rawVaporSlotKey = Symbol(`rawVaporSlot`);
|
|
2698
|
+
/**
|
|
2699
|
+
* Invokes a VDOM slot fallback under the outlet owner that produced it, the
|
|
2700
|
+
* way `renderSlot` would have rendered it inline. Vapor interop invokes
|
|
2701
|
+
* fallbacks late, outside any render, so it passes the owner recorded on the
|
|
2702
|
+
* vapor slot vnode. Internal to vapor interop.
|
|
2703
|
+
*/
|
|
2704
|
+
function invokeSlotFallback(fallback, owner) {
|
|
2705
|
+
if (!owner) return fallback();
|
|
2706
|
+
const prev = setCurrentRenderingInstance(owner);
|
|
2707
|
+
const prevStackSize = blockStack.length;
|
|
2708
|
+
try {
|
|
2709
|
+
return fallback();
|
|
2710
|
+
} finally {
|
|
2711
|
+
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
2712
|
+
setCurrentRenderingInstance(prev);
|
|
2713
|
+
}
|
|
2714
|
+
}
|
|
2715
|
+
/**
|
|
2580
2716
|
* Compiler runtime helper for rendering `<slot/>`
|
|
2581
2717
|
* @private
|
|
2582
2718
|
*/
|
|
2583
|
-
function renderSlot(slots, name, props
|
|
2719
|
+
function renderSlot(slots, name, props, fallback, noSlotted, branchKey) {
|
|
2720
|
+
if (props == null) props = {};
|
|
2584
2721
|
let slot = slots[name];
|
|
2585
|
-
|
|
2586
|
-
const vaporSlot = slot && (slot.__vs || (slot.__vapor ? slot : null));
|
|
2722
|
+
const vaporSlot = slot && slot[rawVaporSlotKey];
|
|
2587
2723
|
if (vaporSlot) {
|
|
2588
2724
|
const ret = (openBlock(), createBlock(VaporSlot, props));
|
|
2589
2725
|
ret.vs = {
|
|
2590
2726
|
slot: vaporSlot,
|
|
2591
|
-
fallback
|
|
2727
|
+
outlets: fallback ? [{
|
|
2728
|
+
fallback,
|
|
2729
|
+
owner: currentRenderingInstance
|
|
2730
|
+
}] : void 0
|
|
2592
2731
|
};
|
|
2593
2732
|
if (!noSlotted && ret.scopeId) ret.slotScopeIds = [ret.scopeId + "-s"];
|
|
2594
2733
|
return ret;
|
|
@@ -2609,9 +2748,15 @@ function renderSlot(slots, name, props = {}, fallback, noSlotted, branchKey) {
|
|
|
2609
2748
|
let rendered;
|
|
2610
2749
|
try {
|
|
2611
2750
|
const validSlotContent = slot && ensureValidVNode(slot(props));
|
|
2612
|
-
|
|
2751
|
+
let attached = false;
|
|
2752
|
+
if (fallback && validSlotContent && currentRenderingInstance) {
|
|
2753
|
+
const interop = currentRenderingInstance.appContext.vapor;
|
|
2754
|
+
if (interop) attached = interop.attachSlotOutlet(validSlotContent, fallback, currentRenderingInstance);
|
|
2755
|
+
}
|
|
2613
2756
|
const slotKey = props.key || branchKey || validSlotContent && validSlotContent.key;
|
|
2614
2757
|
rendered = createBlock(Fragment, { key: (slotKey && !isSymbol(slotKey) ? slotKey : `_${name}`) + (!validSlotContent && fallback ? "_fb" : "") }, validSlotContent || (fallback ? fallback() : []), validSlotContent && slots._ === 1 ? 64 : -2);
|
|
2758
|
+
if (!validSlotContent && fallback) rendered.shapeFlag |= 1024;
|
|
2759
|
+
if (attached) rendered.vo = true;
|
|
2615
2760
|
} catch (err) {
|
|
2616
2761
|
for (let i = blockStack.length; i > prevStackSize; i--) closeBlock();
|
|
2617
2762
|
throw err;
|
|
@@ -2629,10 +2774,6 @@ function ensureValidVNode(vnodes) {
|
|
|
2629
2774
|
return true;
|
|
2630
2775
|
}) ? vnodes : null;
|
|
2631
2776
|
}
|
|
2632
|
-
function ensureVaporSlotFallback(vnodes, fallback) {
|
|
2633
|
-
let vaporSlot;
|
|
2634
|
-
if (vnodes && vnodes.length === 1 && isVNode(vnodes[0]) && (vaporSlot = vnodes[0].vs)) vaporSlot.outletFallback = fallback;
|
|
2635
|
-
}
|
|
2636
2777
|
//#endregion
|
|
2637
2778
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
2638
2779
|
/**
|
|
@@ -2660,11 +2801,38 @@ const getPublicInstance = (i) => {
|
|
|
2660
2801
|
if (isStatefulComponent(i)) return getComponentPublicInstance(i);
|
|
2661
2802
|
return getPublicInstance(i.parent);
|
|
2662
2803
|
};
|
|
2804
|
+
const resolveDevRootEl = (vnode) => {
|
|
2805
|
+
let found = false;
|
|
2806
|
+
while (true) {
|
|
2807
|
+
if (vnode.patchFlag > 0 && vnode.patchFlag & 2048) {
|
|
2808
|
+
const root = filterSingleRoot(vnode.children);
|
|
2809
|
+
if (!root) return;
|
|
2810
|
+
vnode = root;
|
|
2811
|
+
found = true;
|
|
2812
|
+
continue;
|
|
2813
|
+
}
|
|
2814
|
+
const component = vnode.component;
|
|
2815
|
+
if (component && component.subTree) {
|
|
2816
|
+
vnode = component.subTree;
|
|
2817
|
+
continue;
|
|
2818
|
+
}
|
|
2819
|
+
const suspense = vnode.suspense;
|
|
2820
|
+
if (suspense && suspense.activeBranch) {
|
|
2821
|
+
vnode = suspense.activeBranch;
|
|
2822
|
+
continue;
|
|
2823
|
+
}
|
|
2824
|
+
return found ? vnode.el : void 0;
|
|
2825
|
+
}
|
|
2826
|
+
};
|
|
2827
|
+
const getDevRootFragmentEl = (i) => {
|
|
2828
|
+
const el = i.subTree && resolveDevRootEl(i.subTree);
|
|
2829
|
+
return el === void 0 ? i.vnode.el : el;
|
|
2830
|
+
};
|
|
2663
2831
|
let publicPropertiesMap;
|
|
2664
2832
|
const getPublicPropertiesMap = () => {
|
|
2665
2833
|
if (!publicPropertiesMap) publicPropertiesMap = extend(Object.create(null), {
|
|
2666
2834
|
$: (i) => i,
|
|
2667
|
-
$el: (i) => i.vnode.el,
|
|
2835
|
+
$el: (i) => !!(process.env.NODE_ENV !== "production") ? getDevRootFragmentEl(i) : i.vnode.el,
|
|
2668
2836
|
$data: (i) => i.data,
|
|
2669
2837
|
$props: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.props) : i.props,
|
|
2670
2838
|
$attrs: (i) => !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(i.attrs) : i.attrs,
|
|
@@ -2770,7 +2938,7 @@ if (!!(process.env.NODE_ENV !== "production") && true) PublicInstanceProxyHandle
|
|
|
2770
2938
|
warn$1("Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.");
|
|
2771
2939
|
return Reflect.ownKeys(target);
|
|
2772
2940
|
};
|
|
2773
|
-
const RuntimeCompiledPublicInstanceProxyHandlers =
|
|
2941
|
+
const RuntimeCompiledPublicInstanceProxyHandlers = /*@__PURE__*/ extend({}, PublicInstanceProxyHandlers, {
|
|
2774
2942
|
get(target, key) {
|
|
2775
2943
|
if (key === Symbol.unscopables) return;
|
|
2776
2944
|
return PublicInstanceProxyHandlers.get(target, key, target);
|
|
@@ -2942,12 +3110,13 @@ function mergeDefaults(raw, defaults) {
|
|
|
2942
3110
|
for (const key in defaults) {
|
|
2943
3111
|
if (key.startsWith("__skip")) continue;
|
|
2944
3112
|
let opt = props[key];
|
|
2945
|
-
if (opt)
|
|
2946
|
-
|
|
2947
|
-
|
|
2948
|
-
|
|
2949
|
-
|
|
2950
|
-
|
|
3113
|
+
if (opt) {
|
|
3114
|
+
if (isArray(opt) || isFunction(opt)) opt = props[key] = {
|
|
3115
|
+
type: opt,
|
|
3116
|
+
default: defaults[key]
|
|
3117
|
+
};
|
|
3118
|
+
else opt.default = defaults[key];
|
|
3119
|
+
} else if (opt === null) opt = props[key] = { default: defaults[key] };
|
|
2951
3120
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`props default key "${key}" has no corresponding declaration.`);
|
|
2952
3121
|
if (opt && defaults[`__skip_${key}`]) opt.skipFactory = true;
|
|
2953
3122
|
}
|
|
@@ -2997,37 +3166,32 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
2997
3166
|
function withAsyncContext(getAwaitable) {
|
|
2998
3167
|
const ctx = getCurrentGenericInstance();
|
|
2999
3168
|
const inSSRSetup = isInSSRComponentSetup;
|
|
3000
|
-
const restoreAsyncContext = ctx && ctx.restoreAsyncContext ? ctx.restoreAsyncContext.bind(ctx) : void 0;
|
|
3001
3169
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
3002
3170
|
let awaitable = getAwaitable();
|
|
3003
3171
|
setCurrentInstance(null, void 0);
|
|
3004
3172
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
3005
3173
|
const restore = () => {
|
|
3006
|
-
const
|
|
3174
|
+
const stoppedScope = ctx && !ctx.scope.active ? ctx.scope : void 0;
|
|
3007
3175
|
setCurrentInstance(ctx);
|
|
3008
3176
|
if (inSSRSetup) setInSSRSetupState(true);
|
|
3009
|
-
|
|
3010
|
-
return () => {
|
|
3011
|
-
if (reset) reset();
|
|
3012
|
-
if (resetStoppedScope) resetStoppedScope.reset();
|
|
3013
|
-
};
|
|
3177
|
+
return stoppedScope;
|
|
3014
3178
|
};
|
|
3015
3179
|
const cleanup = () => {
|
|
3016
3180
|
setCurrentInstance(null, void 0);
|
|
3017
3181
|
if (inSSRSetup) setInSSRSetupState(false);
|
|
3018
3182
|
};
|
|
3019
3183
|
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
3020
|
-
const
|
|
3184
|
+
const stoppedScope = restore();
|
|
3021
3185
|
Promise.resolve().then(() => Promise.resolve().then(() => {
|
|
3022
|
-
if (
|
|
3186
|
+
if (stoppedScope) stoppedScope.reset();
|
|
3023
3187
|
cleanup();
|
|
3024
3188
|
}));
|
|
3025
3189
|
throw e;
|
|
3026
3190
|
});
|
|
3027
3191
|
return [awaitable, () => {
|
|
3028
|
-
const
|
|
3192
|
+
const stoppedScope = restore();
|
|
3029
3193
|
Promise.resolve().then(() => {
|
|
3030
|
-
if (
|
|
3194
|
+
if (stoppedScope) stoppedScope.reset();
|
|
3031
3195
|
cleanup();
|
|
3032
3196
|
});
|
|
3033
3197
|
}];
|
|
@@ -3091,11 +3255,12 @@ function applyOptions(instance) {
|
|
|
3091
3255
|
const opt = computedOptions[key];
|
|
3092
3256
|
const get = isFunction(opt) ? opt.bind(publicThis, publicThis) : isFunction(opt.get) ? opt.get.bind(publicThis, publicThis) : NOOP;
|
|
3093
3257
|
if (!!(process.env.NODE_ENV !== "production") && get === NOOP) warn$1(`Computed property "${key}" has no getter.`);
|
|
3258
|
+
const set = !isFunction(opt) && isFunction(opt.set) ? opt.set.bind(publicThis) : !!(process.env.NODE_ENV !== "production") ? () => {
|
|
3259
|
+
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
3260
|
+
} : NOOP;
|
|
3094
3261
|
const c = computed({
|
|
3095
3262
|
get,
|
|
3096
|
-
set
|
|
3097
|
-
warn$1(`Write operation failed: computed property "${key}" is readonly.`);
|
|
3098
|
-
} : NOOP
|
|
3263
|
+
set
|
|
3099
3264
|
});
|
|
3100
3265
|
Object.defineProperty(ctx, key, {
|
|
3101
3266
|
enumerable: true,
|
|
@@ -3152,9 +3317,10 @@ function resolveInjections(injectOptions, ctx, checkDuplicateProperties = NOOP)
|
|
|
3152
3317
|
for (const key in injectOptions) {
|
|
3153
3318
|
const opt = injectOptions[key];
|
|
3154
3319
|
let injected;
|
|
3155
|
-
if (isObject(opt))
|
|
3156
|
-
|
|
3157
|
-
|
|
3320
|
+
if (isObject(opt)) {
|
|
3321
|
+
if ("default" in opt) injected = inject(opt.from || key, opt.default, true);
|
|
3322
|
+
else injected = inject(opt.from || key);
|
|
3323
|
+
} else injected = inject(opt);
|
|
3158
3324
|
if (isRef$1(injected)) Object.defineProperty(ctx, key, {
|
|
3159
3325
|
enumerable: true,
|
|
3160
3326
|
configurable: true,
|
|
@@ -3175,13 +3341,14 @@ function createWatcher(raw, ctx, publicThis, key) {
|
|
|
3175
3341
|
if (isFunction(handler)) watch(getter, handler);
|
|
3176
3342
|
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw}"`, handler);
|
|
3177
3343
|
} else if (isFunction(raw)) watch(getter, raw.bind(publicThis));
|
|
3178
|
-
else if (isObject(raw))
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
|
|
3182
|
-
|
|
3183
|
-
|
|
3184
|
-
|
|
3344
|
+
else if (isObject(raw)) {
|
|
3345
|
+
if (isArray(raw)) raw.forEach((r) => createWatcher(r, ctx, publicThis, key));
|
|
3346
|
+
else {
|
|
3347
|
+
const handler = isFunction(raw.handler) ? raw.handler.bind(publicThis) : ctx[raw.handler];
|
|
3348
|
+
if (isFunction(handler)) watch(getter, handler, raw);
|
|
3349
|
+
else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch handler specified by key "${raw.handler}"`, handler);
|
|
3350
|
+
}
|
|
3351
|
+
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Invalid watch option: "${key}"`, raw);
|
|
3185
3352
|
}
|
|
3186
3353
|
/**
|
|
3187
3354
|
* Resolve merged options and cache it on the component.
|
|
@@ -3267,7 +3434,7 @@ function mergeObjectOptions(to, from) {
|
|
|
3267
3434
|
}
|
|
3268
3435
|
function mergeEmitsOrPropsOptions(to, from) {
|
|
3269
3436
|
if (to) {
|
|
3270
|
-
if (isArray(to) && isArray(from)) return [
|
|
3437
|
+
if (isArray(to) && isArray(from)) return [.../* @__PURE__ */ new Set([...to, ...from])];
|
|
3271
3438
|
return extend(Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from !== null && from !== void 0 ? from : {}));
|
|
3272
3439
|
} else return from;
|
|
3273
3440
|
}
|
|
@@ -3392,8 +3559,10 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
3392
3559
|
} else if (!!(process.env.NODE_ENV !== "production")) warn$1(`Cannot unmount an app that is not mounted.`);
|
|
3393
3560
|
},
|
|
3394
3561
|
provide(key, value) {
|
|
3395
|
-
if (!!(process.env.NODE_ENV !== "production") && key in context.provides)
|
|
3396
|
-
|
|
3562
|
+
if (!!(process.env.NODE_ENV !== "production") && key in context.provides) {
|
|
3563
|
+
if (hasOwn(context.provides, key)) warn$1(`App already provides property with key "${String(key)}". It will be overwritten with the new value.`);
|
|
3564
|
+
else warn$1(`App already provides property with key "${String(key)}" inherited from its parent element. It will be overwritten with the new value.`);
|
|
3565
|
+
}
|
|
3397
3566
|
context.provides[key] = value;
|
|
3398
3567
|
return app;
|
|
3399
3568
|
},
|
|
@@ -3432,13 +3601,17 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3432
3601
|
const modifiers = getModelModifiers(props, camelizedName, defaultPropGetter);
|
|
3433
3602
|
const res = customRef$1((track, trigger) => {
|
|
3434
3603
|
let localValue;
|
|
3604
|
+
let prevPropValue = EMPTY_OBJ;
|
|
3435
3605
|
let prevSetValue = EMPTY_OBJ;
|
|
3436
3606
|
let prevEmittedValue;
|
|
3437
3607
|
watchSyncEffect(() => {
|
|
3438
3608
|
const propValue = props[camelizedName];
|
|
3439
|
-
if (hasChanged(
|
|
3440
|
-
|
|
3441
|
-
|
|
3609
|
+
if (hasChanged(prevPropValue, propValue)) {
|
|
3610
|
+
prevPropValue = propValue;
|
|
3611
|
+
if (hasChanged(localValue, propValue)) {
|
|
3612
|
+
localValue = propValue;
|
|
3613
|
+
trigger();
|
|
3614
|
+
}
|
|
3442
3615
|
}
|
|
3443
3616
|
});
|
|
3444
3617
|
return {
|
|
@@ -3500,12 +3673,14 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
3500
3673
|
if (instance.isUnmounted) return;
|
|
3501
3674
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
3502
3675
|
const { emitsOptions, propsOptions } = instance;
|
|
3503
|
-
if (emitsOptions)
|
|
3504
|
-
if (!
|
|
3505
|
-
|
|
3506
|
-
|
|
3507
|
-
|
|
3508
|
-
if (
|
|
3676
|
+
if (emitsOptions) {
|
|
3677
|
+
if (!(event in emitsOptions) && true) {
|
|
3678
|
+
if (!propsOptions || !propsOptions[0] || !(toHandlerKey$1(camelize$1(event)) in propsOptions[0])) warn$1(`Component emitted event "${event}" but it is neither declared in the emits option nor as an "${toHandlerKey$1(camelize$1(event))}" prop.`);
|
|
3679
|
+
} else {
|
|
3680
|
+
const validator = emitsOptions[event];
|
|
3681
|
+
if (isFunction(validator)) {
|
|
3682
|
+
if (!validator(...rawArgs)) warn$1(`Invalid event arguments: event validation failed for event "${event}".`);
|
|
3683
|
+
}
|
|
3509
3684
|
}
|
|
3510
3685
|
}
|
|
3511
3686
|
}
|
|
@@ -3514,7 +3689,7 @@ function baseEmit(instance, props, getter, event, ...rawArgs) {
|
|
|
3514
3689
|
const modifiers = isModelListener && getModelModifiers(props, event.slice(7), getter);
|
|
3515
3690
|
if (modifiers) {
|
|
3516
3691
|
if (modifiers.trim) args = rawArgs.map((a) => isString(a) ? a.trim() : a);
|
|
3517
|
-
if (modifiers.number) args =
|
|
3692
|
+
if (modifiers.number) args = args.map(looseToNumber);
|
|
3518
3693
|
}
|
|
3519
3694
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentEmit(instance, event, args);
|
|
3520
3695
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -3645,8 +3820,9 @@ function renderComponentRoot(instance) {
|
|
|
3645
3820
|
root.dirs = root.dirs ? root.dirs.concat(vnode.dirs) : vnode.dirs;
|
|
3646
3821
|
}
|
|
3647
3822
|
if (vnode.transition) {
|
|
3648
|
-
|
|
3649
|
-
|
|
3823
|
+
const child = isTeleport(root.type) ? getInnerChild$1(root) || root : root;
|
|
3824
|
+
if (!!(process.env.NODE_ENV !== "production") && !isElementRoot(child)) warn$1("Component inside <Transition> renders non-element root node that cannot be animated.");
|
|
3825
|
+
setTransitionHooks(child, vnode.transition);
|
|
3650
3826
|
}
|
|
3651
3827
|
if (!!(process.env.NODE_ENV !== "production") && setRoot) setRoot(root);
|
|
3652
3828
|
else result = root;
|
|
@@ -3697,18 +3873,21 @@ function filterSingleRoot(children, recurse = true) {
|
|
|
3697
3873
|
for (let i = 0; i < children.length; i++) {
|
|
3698
3874
|
const child = children[i];
|
|
3699
3875
|
if (isVNode(child)) {
|
|
3700
|
-
if (child.type !== Comment || child.children === "v-if")
|
|
3701
|
-
|
|
3702
|
-
|
|
3703
|
-
|
|
3876
|
+
if (child.type !== Comment || child.children === "v-if") {
|
|
3877
|
+
if (singleRoot) return;
|
|
3878
|
+
else {
|
|
3879
|
+
singleRoot = child;
|
|
3880
|
+
if (!!(process.env.NODE_ENV !== "production") && recurse && singleRoot.patchFlag > 0 && singleRoot.patchFlag & 2048) return filterSingleRoot(singleRoot.children);
|
|
3881
|
+
}
|
|
3704
3882
|
}
|
|
3705
3883
|
} else return;
|
|
3706
3884
|
}
|
|
3707
3885
|
return singleRoot;
|
|
3708
3886
|
}
|
|
3887
|
+
const isFunctionalFallthroughKey = (key) => key === "class" || key === "style" || isOn(key);
|
|
3709
3888
|
const getFunctionalFallthrough = (attrs) => {
|
|
3710
3889
|
let res;
|
|
3711
|
-
for (const key in attrs) if (
|
|
3890
|
+
for (const key in attrs) if (isFunctionalFallthroughKey(key)) (res || (res = {}))[key] = attrs[key];
|
|
3712
3891
|
return res;
|
|
3713
3892
|
};
|
|
3714
3893
|
const filterModelListeners = (attrs, props) => {
|
|
@@ -3820,16 +3999,17 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3820
3999
|
let key = propsToUpdate[i];
|
|
3821
4000
|
if (isEmitListener(instance.emitsOptions, key)) continue;
|
|
3822
4001
|
const value = rawProps[key];
|
|
3823
|
-
if (options)
|
|
3824
|
-
if (
|
|
3825
|
-
attrs[key]
|
|
3826
|
-
|
|
4002
|
+
if (options) {
|
|
4003
|
+
if (hasOwn(attrs, key)) {
|
|
4004
|
+
if (value !== attrs[key]) {
|
|
4005
|
+
attrs[key] = value;
|
|
4006
|
+
hasAttrsChanged = true;
|
|
4007
|
+
}
|
|
4008
|
+
} else {
|
|
4009
|
+
const camelizedKey = camelize$1(key);
|
|
4010
|
+
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
3827
4011
|
}
|
|
3828
|
-
} else {
|
|
3829
|
-
const camelizedKey = camelize$1(key);
|
|
3830
|
-
props[camelizedKey] = resolvePropValue(options, camelizedKey, value, instance, baseResolveDefault);
|
|
3831
|
-
}
|
|
3832
|
-
else if (value !== attrs[key]) {
|
|
4012
|
+
} else if (value !== attrs[key]) {
|
|
3833
4013
|
attrs[key] = value;
|
|
3834
4014
|
hasAttrsChanged = true;
|
|
3835
4015
|
}
|
|
@@ -3838,9 +4018,11 @@ function updateProps(instance, rawProps, rawPrevProps, optimized) {
|
|
|
3838
4018
|
} else {
|
|
3839
4019
|
if (setFullProps(instance, rawProps, props, attrs)) hasAttrsChanged = true;
|
|
3840
4020
|
let kebabKey;
|
|
3841
|
-
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey)))
|
|
3842
|
-
if (
|
|
3843
|
-
|
|
4021
|
+
for (const key in rawCurrentProps) if (!rawProps || !hasOwn(rawProps, key) && ((kebabKey = hyphenate(key)) === key || !hasOwn(rawProps, kebabKey))) {
|
|
4022
|
+
if (options) {
|
|
4023
|
+
if (rawPrevProps && (rawPrevProps[key] !== void 0 || rawPrevProps[kebabKey] !== void 0)) props[key] = resolvePropValue(options, key, void 0, instance, baseResolveDefault, true);
|
|
4024
|
+
} else delete props[key];
|
|
4025
|
+
}
|
|
3844
4026
|
if (attrs !== rawCurrentProps) {
|
|
3845
4027
|
for (const key in attrs) if (!rawProps || !hasOwn(rawProps, key) && true) {
|
|
3846
4028
|
delete attrs[key];
|
|
@@ -3859,9 +4041,10 @@ function setFullProps(instance, rawProps, props, attrs) {
|
|
|
3859
4041
|
if (isReservedProp(key)) continue;
|
|
3860
4042
|
const value = rawProps[key];
|
|
3861
4043
|
let camelKey;
|
|
3862
|
-
if (options && hasOwn(options, camelKey = camelize$1(key)))
|
|
3863
|
-
|
|
3864
|
-
|
|
4044
|
+
if (options && hasOwn(options, camelKey = camelize$1(key))) {
|
|
4045
|
+
if (!needCastKeys || !needCastKeys.includes(camelKey)) props[camelKey] = value;
|
|
4046
|
+
else (rawCastValues || (rawCastValues = {}))[camelKey] = value;
|
|
4047
|
+
} else if (!isEmitListener(instance.emitsOptions, key)) {
|
|
3865
4048
|
if (!(key in attrs) || value !== attrs[key]) {
|
|
3866
4049
|
attrs[key] = value;
|
|
3867
4050
|
hasAttrsChanged = true;
|
|
@@ -3908,7 +4091,7 @@ function baseResolveDefault(factory, instance, key) {
|
|
|
3908
4091
|
const prev = setCurrentInstance(instance);
|
|
3909
4092
|
const props = toRaw$1(instance.props);
|
|
3910
4093
|
value = factory.call(null, props);
|
|
3911
|
-
|
|
4094
|
+
restoreCurrentInstance(prev);
|
|
3912
4095
|
return value;
|
|
3913
4096
|
}
|
|
3914
4097
|
const mixinPropsCache = /* @__PURE__ */ new WeakMap();
|
|
@@ -4024,7 +4207,7 @@ function validateProp(key, value, propOptions, resolvedProps, isAbsent) {
|
|
|
4024
4207
|
}
|
|
4025
4208
|
if (validator && !validator(value, !!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(resolvedProps) : resolvedProps)) warn$1("Invalid prop: custom validator check failed for prop \"" + key + "\".");
|
|
4026
4209
|
}
|
|
4027
|
-
const isSimpleType =
|
|
4210
|
+
const isSimpleType = /*@__PURE__*/ makeMap("String,Number,Boolean,Function,Symbol,BigInt");
|
|
4028
4211
|
/**
|
|
4029
4212
|
* dev only
|
|
4030
4213
|
*/
|
|
@@ -4137,12 +4320,13 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4137
4320
|
let deletionComparisonTarget = EMPTY_OBJ;
|
|
4138
4321
|
if (vnode.shapeFlag & 32) {
|
|
4139
4322
|
const type = children._;
|
|
4140
|
-
if (type)
|
|
4141
|
-
|
|
4142
|
-
|
|
4143
|
-
|
|
4144
|
-
|
|
4145
|
-
|
|
4323
|
+
if (type) {
|
|
4324
|
+
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating) {
|
|
4325
|
+
assignSlots(slots, children, optimized);
|
|
4326
|
+
trigger(instance, "set", "$slots");
|
|
4327
|
+
} else if (optimized && type === 1) needDeletionCheck = false;
|
|
4328
|
+
else assignSlots(slots, children, optimized);
|
|
4329
|
+
} else {
|
|
4146
4330
|
needDeletionCheck = !children.$stable;
|
|
4147
4331
|
normalizeObjectSlots(children, slots, instance);
|
|
4148
4332
|
}
|
|
@@ -4160,7 +4344,7 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4160
4344
|
let supported;
|
|
4161
4345
|
let perf;
|
|
4162
4346
|
let cachedNow = 0;
|
|
4163
|
-
const p =
|
|
4347
|
+
const p = /*@__PURE__*/ Promise.resolve();
|
|
4164
4348
|
const getNow = () => cachedNow || (p.then(() => cachedNow = 0), cachedNow = isSupported() ? perf.now() : Date.now());
|
|
4165
4349
|
/**
|
|
4166
4350
|
* @internal
|
|
@@ -4271,6 +4455,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4271
4455
|
optimized = false;
|
|
4272
4456
|
n2.dynamicChildren = null;
|
|
4273
4457
|
}
|
|
4458
|
+
if (n2.dynamicChildren && n1 && n1.dynamicChildren && n1.dynamicChildren.hasOnce) {
|
|
4459
|
+
if (n2.dynamicChildren === EMPTY_ARR) n2.dynamicChildren = [];
|
|
4460
|
+
n2.dynamicChildren.hasOnce = true;
|
|
4461
|
+
}
|
|
4274
4462
|
const { type, ref, shapeFlag } = n2;
|
|
4275
4463
|
switch (type) {
|
|
4276
4464
|
case Text:
|
|
@@ -4287,7 +4475,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4287
4475
|
processFragment(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4288
4476
|
break;
|
|
4289
4477
|
case VaporSlot:
|
|
4290
|
-
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense);
|
|
4478
|
+
getVaporInterface(parentComponent, n2).slot(n1, n2, container, anchor, parentComponent, parentSuspense, slotScopeIds);
|
|
4291
4479
|
break;
|
|
4292
4480
|
default: if (shapeFlag & 1) processElement(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4293
4481
|
else if (shapeFlag & 6) processComponent(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
@@ -4408,7 +4596,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4408
4596
|
for (let i = 0; i < inheritedScopeIds.length; i++) hostSetScopeId(el, inheritedScopeIds[i]);
|
|
4409
4597
|
};
|
|
4410
4598
|
const mountChildren = (children, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, start = 0) => {
|
|
4411
|
-
for (let i = start; i < children.length; i++)
|
|
4599
|
+
for (let i = start; i < children.length; i++) {
|
|
4600
|
+
const child = children[i] = optimized ? cloneIfMounted(children[i]) : normalizeVNode(children[i]);
|
|
4601
|
+
patch(null, child, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4602
|
+
}
|
|
4412
4603
|
};
|
|
4413
4604
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4414
4605
|
const el = n2.el = n1.el;
|
|
@@ -4420,6 +4611,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4420
4611
|
let vnodeHook;
|
|
4421
4612
|
parentComponent && toggleRecurse(parentComponent, false);
|
|
4422
4613
|
if (vnodeHook = newProps.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4614
|
+
if (n2.ibu) n2.ibu();
|
|
4423
4615
|
if (dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4424
4616
|
parentComponent && toggleRecurse(parentComponent, true);
|
|
4425
4617
|
if (!!(process.env.NODE_ENV !== "production") && isHmrUpdating || dynamicChildren && (!n1.dynamicChildren || n1.dynamicChildren.length !== dynamicChildren.length)) {
|
|
@@ -4453,8 +4645,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4453
4645
|
if (n1.children !== n2.children) hostSetElementText(el, n2.children);
|
|
4454
4646
|
}
|
|
4455
4647
|
} else if (!optimized && dynamicChildren == null) patchProps(el, oldProps, newProps, parentComponent, namespace);
|
|
4456
|
-
if ((vnodeHook = newProps.onVnodeUpdated) || dirs) queuePostRenderEffect(() => {
|
|
4648
|
+
if ((vnodeHook = newProps.onVnodeUpdated) || dirs || n2.iu) queuePostRenderEffect(() => {
|
|
4457
4649
|
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, n2, n1);
|
|
4650
|
+
n2.iu && n2.iu();
|
|
4458
4651
|
dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
4459
4652
|
}, void 0, parentSuspense);
|
|
4460
4653
|
};
|
|
@@ -4462,7 +4655,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4462
4655
|
for (let i = 0; i < newChildren.length; i++) {
|
|
4463
4656
|
const oldVNode = oldChildren[i];
|
|
4464
4657
|
const newVNode = newChildren[i];
|
|
4465
|
-
|
|
4658
|
+
const container = oldVNode.el && (oldVNode.type === Fragment || !isSameVNodeType(oldVNode, newVNode) || oldVNode.shapeFlag & 198) ? hostParentNode(oldVNode.el) : fallbackContainer;
|
|
4659
|
+
patch(oldVNode, newVNode, container, null, parentComponent, parentSuspense, namespace, slotScopeIds, true);
|
|
4466
4660
|
}
|
|
4467
4661
|
};
|
|
4468
4662
|
const patchProps = (el, oldProps, newProps, parentComponent, namespace) => {
|
|
@@ -4501,41 +4695,15 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4501
4695
|
};
|
|
4502
4696
|
const processComponent = (n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
4503
4697
|
n2.slotScopeIds = slotScopeIds;
|
|
4504
|
-
if (n2.type.__vapor)
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
if (vnodeBeforeMountHook) invokeVNodeHook(vnodeBeforeMountHook, parentComponent, n2);
|
|
4514
|
-
});
|
|
4515
|
-
if (n2.dirs) queuePostRenderEffect(() => invokeDirectiveHook(n2, null, parentComponent, "mounted"), void 0, parentSuspense);
|
|
4516
|
-
const vnodeMountedHook = !isAsyncWrapper(n2) && n2.props && n2.props.onVnodeMounted;
|
|
4517
|
-
if (vnodeMountedHook) {
|
|
4518
|
-
const scopedVNode = n2;
|
|
4519
|
-
queuePostRenderEffect(() => invokeVNodeHook(vnodeMountedHook, parentComponent, scopedVNode), void 0, parentSuspense);
|
|
4520
|
-
}
|
|
4521
|
-
}
|
|
4522
|
-
else {
|
|
4523
|
-
const shouldUpdate = shouldUpdateComponent(n1, n2, optimized);
|
|
4524
|
-
getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdate, () => {
|
|
4525
|
-
if (n2.dirs) invokeDirectiveHook(n2, n1, parentComponent, "beforeUpdate");
|
|
4526
|
-
}, () => {
|
|
4527
|
-
const vnodeBeforeUpdateHook = n2.props && n2.props.onVnodeBeforeUpdate;
|
|
4528
|
-
if (vnodeBeforeUpdateHook) invokeVNodeHook(vnodeBeforeUpdateHook, parentComponent, n2, n1);
|
|
4529
|
-
});
|
|
4530
|
-
const vnodeUpdatedHook = n2.props && n2.props.onVnodeUpdated;
|
|
4531
|
-
if (shouldUpdate && (vnodeUpdatedHook || n2.dirs)) queuePostRenderEffect(() => {
|
|
4532
|
-
n2.dirs && invokeDirectiveHook(n2, n1, parentComponent, "updated");
|
|
4533
|
-
vnodeUpdatedHook && invokeVNodeHook(vnodeUpdatedHook, parentComponent, n2, n1);
|
|
4534
|
-
}, void 0, parentSuspense);
|
|
4535
|
-
}
|
|
4536
|
-
else if (n1 == null) if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
4537
|
-
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
4538
|
-
else updateComponent(n1, n2, optimized);
|
|
4698
|
+
if (n2.type.__vapor) {
|
|
4699
|
+
if (n1 == null) {
|
|
4700
|
+
if (n2.shapeFlag & 512) getVaporInterface(parentComponent, n2).activate(n2, container, anchor, parentComponent, parentSuspense);
|
|
4701
|
+
else getVaporInterface(parentComponent, n2).mount(n2, container, anchor, parentComponent, parentSuspense);
|
|
4702
|
+
} else getVaporInterface(parentComponent, n2).update(n1, n2, shouldUpdateComponent(n1, n2, optimized));
|
|
4703
|
+
} else if (n1 == null) {
|
|
4704
|
+
if (n2.shapeFlag & 512) parentComponent.ctx.activate(n2, container, anchor, namespace, optimized);
|
|
4705
|
+
else mountComponent(n2, container, anchor, parentComponent, parentSuspense, namespace, optimized);
|
|
4706
|
+
} else updateComponent(n1, n2, optimized);
|
|
4539
4707
|
};
|
|
4540
4708
|
const mountComponent = (initialVNode, container, anchor, parentComponent, parentSuspense, namespace, optimized) => {
|
|
4541
4709
|
const instance = initialVNode.component = createComponentInstance(initialVNode, parentComponent, parentSuspense);
|
|
@@ -4580,16 +4748,18 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4580
4748
|
};
|
|
4581
4749
|
const updateComponent = (n1, n2, optimized) => {
|
|
4582
4750
|
const instance = n2.component = n1.component;
|
|
4583
|
-
if (shouldUpdateComponent(n1, n2, optimized))
|
|
4584
|
-
if (
|
|
4585
|
-
|
|
4586
|
-
|
|
4587
|
-
|
|
4751
|
+
if (shouldUpdateComponent(n1, n2, optimized)) {
|
|
4752
|
+
if (instance.asyncDep && !instance.asyncResolved) {
|
|
4753
|
+
if (!!(process.env.NODE_ENV !== "production")) pushWarningContext(n2);
|
|
4754
|
+
n2.el = n1.el;
|
|
4755
|
+
updateComponentPreRender(instance, n2, optimized);
|
|
4756
|
+
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
4757
|
+
return;
|
|
4758
|
+
} else {
|
|
4759
|
+
instance.next = n2;
|
|
4760
|
+
instance.effect.run();
|
|
4761
|
+
}
|
|
4588
4762
|
} else {
|
|
4589
|
-
instance.next = n2;
|
|
4590
|
-
instance.effect.run();
|
|
4591
|
-
}
|
|
4592
|
-
else {
|
|
4593
4763
|
n2.el = n1.el;
|
|
4594
4764
|
instance.vnode = n2;
|
|
4595
4765
|
}
|
|
@@ -4689,6 +4859,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4689
4859
|
} else next = vnode;
|
|
4690
4860
|
if (bu) invokeArrayFns(bu);
|
|
4691
4861
|
if (vnodeHook = next.props && next.props.onVnodeBeforeUpdate) invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
4862
|
+
if (next.ibu) next.ibu();
|
|
4692
4863
|
toggleRecurse(instance, true);
|
|
4693
4864
|
if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
|
|
4694
4865
|
const nextTree = renderComponentRoot(instance);
|
|
@@ -4701,7 +4872,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4701
4872
|
next.el = nextTree.el;
|
|
4702
4873
|
if (originNext === null) updateHOCHostEl(instance, nextTree.el);
|
|
4703
4874
|
if (u) queuePostRenderEffect(u, void 0, parentSuspense);
|
|
4704
|
-
if (vnodeHook = next.props && next.props.onVnodeUpdated) queuePostRenderEffect(() =>
|
|
4875
|
+
if ((vnodeHook = next.props && next.props.onVnodeUpdated) || next.iu) queuePostRenderEffect(() => {
|
|
4876
|
+
vnodeHook && invokeVNodeHook(vnodeHook, parent, next, vnode);
|
|
4877
|
+
next.iu && next.iu();
|
|
4878
|
+
}, void 0, parentSuspense);
|
|
4705
4879
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentUpdated(instance);
|
|
4706
4880
|
if (!!(process.env.NODE_ENV !== "production")) popWarningContext();
|
|
4707
4881
|
}
|
|
@@ -4741,9 +4915,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4741
4915
|
if (shapeFlag & 8) {
|
|
4742
4916
|
if (prevShapeFlag & 16) unmountChildren(c1, parentComponent, parentSuspense);
|
|
4743
4917
|
if (c2 !== c1) hostSetElementText(container, c2);
|
|
4744
|
-
} else if (prevShapeFlag & 16)
|
|
4745
|
-
|
|
4746
|
-
|
|
4918
|
+
} else if (prevShapeFlag & 16) {
|
|
4919
|
+
if (shapeFlag & 16) patchKeyedChildren(c1, c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4920
|
+
else unmountChildren(c1, parentComponent, parentSuspense, true);
|
|
4921
|
+
} else {
|
|
4747
4922
|
if (prevShapeFlag & 8) hostSetElementText(container, "");
|
|
4748
4923
|
if (shapeFlag & 16) mountChildren(c2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4749
4924
|
}
|
|
@@ -4842,15 +5017,17 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4842
5017
|
const anchorVNode = c2[nextIndex + 1];
|
|
4843
5018
|
const anchor = nextIndex + 1 < l2 ? anchorVNode.el || resolveAsyncComponentPlaceholder(anchorVNode) : parentAnchor;
|
|
4844
5019
|
if (newIndexToOldIndexMap[i] === 0) patch(null, nextChild, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized);
|
|
4845
|
-
else if (moved)
|
|
4846
|
-
|
|
5020
|
+
else if (moved) {
|
|
5021
|
+
if (j < 0 || i !== increasingNewIndexSequence[j]) move(nextChild, container, anchor, 2, parentComponent);
|
|
5022
|
+
else j--;
|
|
5023
|
+
}
|
|
4847
5024
|
}
|
|
4848
5025
|
}
|
|
4849
5026
|
};
|
|
4850
5027
|
const move = (vnode, container, anchor, moveType, parentComponent, parentSuspense = null) => {
|
|
4851
5028
|
const { el, type, transition, children, shapeFlag } = vnode;
|
|
4852
5029
|
if (isVaporComponent(type) || type === VaporSlot) {
|
|
4853
|
-
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType);
|
|
5030
|
+
getVaporInterface(parentComponent, vnode).move(vnode, container, anchor, moveType, parentSuspense);
|
|
4854
5031
|
return;
|
|
4855
5032
|
}
|
|
4856
5033
|
if (shapeFlag & 6) {
|
|
@@ -4875,54 +5052,37 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4875
5052
|
moveStaticNode(vnode, container, anchor);
|
|
4876
5053
|
return;
|
|
4877
5054
|
}
|
|
4878
|
-
if (moveType !== 2 && shapeFlag & 1 && transition)
|
|
4879
|
-
|
|
4880
|
-
|
|
4881
|
-
const remove = () => {
|
|
5055
|
+
if (moveType !== 2 && shapeFlag & 1 && transition) {
|
|
5056
|
+
if (moveType === 0) performTransitionEnter(el, transition, () => hostInsert(el, container, anchor), parentSuspense, true);
|
|
5057
|
+
else performTransitionLeave(el, transition, () => {
|
|
4882
5058
|
if (vnode.ctx.isUnmounted) hostRemove(el);
|
|
4883
5059
|
else hostInsert(el, container, anchor);
|
|
4884
|
-
};
|
|
4885
|
-
|
|
4886
|
-
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
4887
|
-
if (el._isLeaving) el[leaveCbKey](true);
|
|
4888
|
-
if (transition.persisted && !wasLeaving) remove();
|
|
4889
|
-
else leave(el, () => {
|
|
4890
|
-
remove();
|
|
4891
|
-
afterLeave && afterLeave();
|
|
4892
|
-
});
|
|
4893
|
-
};
|
|
4894
|
-
if (delayLeave) delayLeave(el, remove, performLeave);
|
|
4895
|
-
else performLeave();
|
|
4896
|
-
}
|
|
4897
|
-
else hostInsert(el, container, anchor);
|
|
5060
|
+
}, true, true);
|
|
5061
|
+
} else hostInsert(el, container, anchor);
|
|
4898
5062
|
};
|
|
4899
5063
|
const unmount = (vnode, parentComponent, parentSuspense, doRemove = false, optimized = false) => {
|
|
4900
5064
|
const { type, props, ref, children, dynamicChildren, shapeFlag, patchFlag, dirs, cacheIndex, memo } = vnode;
|
|
4901
|
-
if (patchFlag === -2) optimized = false;
|
|
5065
|
+
if (patchFlag === -2 || dynamicChildren && dynamicChildren.hasOnce) optimized = false;
|
|
4902
5066
|
if (ref != null) {
|
|
4903
5067
|
const prevSub = setActiveSub();
|
|
4904
5068
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
4905
5069
|
setActiveSub(prevSub);
|
|
4906
5070
|
}
|
|
4907
|
-
if (cacheIndex != null) parentComponent.renderCache[cacheIndex] = void 0;
|
|
5071
|
+
if (cacheIndex != null && (!vnode.ctx || vnode.ctx === parentComponent)) parentComponent.renderCache[cacheIndex] = void 0;
|
|
4908
5072
|
if (shapeFlag & 256) {
|
|
4909
|
-
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer());
|
|
5073
|
+
if (isVaporComponent(vnode.type)) getVaporInterface(parentComponent, vnode).deactivate(vnode, parentComponent.ctx.getStorageContainer(), parentSuspense);
|
|
4910
5074
|
else parentComponent.ctx.deactivate(vnode);
|
|
4911
5075
|
return;
|
|
4912
5076
|
}
|
|
5077
|
+
if (shapeFlag & 6 && isVaporComponent(type)) {
|
|
5078
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
5079
|
+
return;
|
|
5080
|
+
}
|
|
4913
5081
|
const shouldInvokeDirs = shapeFlag & 1 && dirs;
|
|
4914
5082
|
const shouldInvokeVnodeHook = !isAsyncWrapper(vnode);
|
|
4915
5083
|
let vnodeHook;
|
|
4916
5084
|
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeBeforeUnmount)) invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4917
|
-
if (shapeFlag & 6)
|
|
4918
|
-
if (dirs) invokeDirectiveHook(vnode, null, parentComponent, "beforeUnmount");
|
|
4919
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
4920
|
-
if (shouldInvokeVnodeHook && (vnodeHook = props && props.onVnodeUnmounted) || dirs) queuePostRenderEffect(() => {
|
|
4921
|
-
dirs && invokeDirectiveHook(vnode, null, parentComponent, "unmounted");
|
|
4922
|
-
vnodeHook && invokeVNodeHook(vnodeHook, parentComponent, vnode);
|
|
4923
|
-
}, void 0, parentSuspense);
|
|
4924
|
-
return;
|
|
4925
|
-
} else unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
5085
|
+
if (shapeFlag & 6) unmountComponent(vnode.component, parentSuspense, doRemove);
|
|
4926
5086
|
else {
|
|
4927
5087
|
if (shapeFlag & 128) {
|
|
4928
5088
|
vnode.suspense.unmount(parentSuspense, doRemove);
|
|
@@ -4933,7 +5093,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4933
5093
|
else if (dynamicChildren && !dynamicChildren.hasOnce && (type !== Fragment || patchFlag > 0 && patchFlag & 64)) unmountChildren(dynamicChildren, parentComponent, parentSuspense, false, true);
|
|
4934
5094
|
else if (type === Fragment && patchFlag & 384 || !optimized && shapeFlag & 16) unmountChildren(children, parentComponent, parentSuspense);
|
|
4935
5095
|
if (type === VaporSlot) {
|
|
4936
|
-
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove);
|
|
5096
|
+
getVaporInterface(parentComponent, vnode).unmount(vnode, doRemove, parentSuspense);
|
|
4937
5097
|
return;
|
|
4938
5098
|
}
|
|
4939
5099
|
if (doRemove) remove(vnode);
|
|
@@ -4957,6 +5117,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4957
5117
|
}
|
|
4958
5118
|
if (type === Static) {
|
|
4959
5119
|
removeStaticNode(vnode);
|
|
5120
|
+
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
4960
5121
|
return;
|
|
4961
5122
|
}
|
|
4962
5123
|
if (transition) performTransitionLeave(el, transition, () => hostRemove(el), !!(vnode.shapeFlag & 1));
|
|
@@ -4981,7 +5142,10 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4981
5142
|
if (effect) {
|
|
4982
5143
|
effect.stop();
|
|
4983
5144
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
4984
|
-
} else if (
|
|
5145
|
+
} else if (instance.vnode.el && subTree) {
|
|
5146
|
+
subTree.transition = instance.vnode.transition;
|
|
5147
|
+
unmount(subTree, instance, parentSuspense, doRemove);
|
|
5148
|
+
}
|
|
4985
5149
|
if (um) queuePostRenderEffect(um, void 0, parentSuspense);
|
|
4986
5150
|
queuePostRenderEffect(() => instance.isUnmounted = true, void 0, parentSuspense);
|
|
4987
5151
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentRemoved(instance);
|
|
@@ -5055,12 +5219,14 @@ function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
|
5055
5219
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
5056
5220
|
}
|
|
5057
5221
|
function toggleRecurse({ effect, job, vapor }, allowed) {
|
|
5058
|
-
if (!vapor)
|
|
5059
|
-
|
|
5060
|
-
|
|
5061
|
-
|
|
5062
|
-
|
|
5063
|
-
|
|
5222
|
+
if (!vapor) {
|
|
5223
|
+
if (allowed) {
|
|
5224
|
+
effect.flags |= 128;
|
|
5225
|
+
job.flags |= 2;
|
|
5226
|
+
} else {
|
|
5227
|
+
effect.flags &= -129;
|
|
5228
|
+
job.flags &= -3;
|
|
5229
|
+
}
|
|
5064
5230
|
}
|
|
5065
5231
|
}
|
|
5066
5232
|
function needTransition(parentSuspense, transition) {
|
|
@@ -5100,8 +5266,10 @@ function traverseStaticChildren(n1, n2, shallow = false) {
|
|
|
5100
5266
|
}
|
|
5101
5267
|
function locateNonHydratedAsyncRoot(instance) {
|
|
5102
5268
|
const subComponent = instance.subTree && instance.subTree.component;
|
|
5103
|
-
if (subComponent)
|
|
5104
|
-
|
|
5269
|
+
if (subComponent) {
|
|
5270
|
+
if (subComponent.asyncDep && !subComponent.asyncResolved) return subComponent;
|
|
5271
|
+
else return locateNonHydratedAsyncRoot(subComponent);
|
|
5272
|
+
}
|
|
5105
5273
|
}
|
|
5106
5274
|
function invalidateMount(hooks) {
|
|
5107
5275
|
if (hooks) for (let i = 0; i < hooks.length; i++) hooks[i].flags |= 4;
|
|
@@ -5120,13 +5288,15 @@ function performTransitionEnter(el, transition, insert, parentSuspense, force =
|
|
|
5120
5288
|
function performTransitionLeave(el, transition, remove, isElement = true, force = false) {
|
|
5121
5289
|
const performRemove = () => {
|
|
5122
5290
|
remove();
|
|
5123
|
-
if (transition && !transition.persisted && transition.afterLeave) transition.afterLeave();
|
|
5291
|
+
if (transition && (force || !transition.persisted) && transition.afterLeave) transition.afterLeave();
|
|
5124
5292
|
};
|
|
5125
5293
|
if (force || isElement && transition && !transition.persisted) {
|
|
5126
5294
|
const { leave, delayLeave } = transition;
|
|
5127
5295
|
const performLeave = () => {
|
|
5296
|
+
const wasLeaving = el._isLeaving || !!el[leaveCbKey];
|
|
5128
5297
|
if (el._isLeaving && force) el[leaveCbKey](true);
|
|
5129
|
-
|
|
5298
|
+
if (force && transition.persisted && !wasLeaving) remove();
|
|
5299
|
+
else leave(el, performRemove);
|
|
5130
5300
|
};
|
|
5131
5301
|
if (delayLeave) delayLeave(el, performRemove, performLeave);
|
|
5132
5302
|
else performLeave();
|
|
@@ -5145,7 +5315,7 @@ function isVaporComponent(type) {
|
|
|
5145
5315
|
/**
|
|
5146
5316
|
* shared between vdom and vapor
|
|
5147
5317
|
*/
|
|
5148
|
-
function getInheritedScopeIds(vnode, parentComponent) {
|
|
5318
|
+
function getInheritedScopeIds(vnode, parentComponent, includeVaporRootIds = true) {
|
|
5149
5319
|
const inheritedScopeIds = [];
|
|
5150
5320
|
let currentParent = parentComponent;
|
|
5151
5321
|
let currentVNode = vnode;
|
|
@@ -5161,6 +5331,8 @@ function getInheritedScopeIds(vnode, parentComponent) {
|
|
|
5161
5331
|
currentParent = currentParent.parent;
|
|
5162
5332
|
} else break;
|
|
5163
5333
|
}
|
|
5334
|
+
const vaporScopeIds = includeVaporRootIds && currentVNode.vaporScopeIds;
|
|
5335
|
+
if (vaporScopeIds) inheritedScopeIds.push(...vaporScopeIds);
|
|
5164
5336
|
return inheritedScopeIds;
|
|
5165
5337
|
}
|
|
5166
5338
|
function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
@@ -5179,7 +5351,7 @@ const Suspense = {
|
|
|
5179
5351
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
5180
5352
|
if (n1 == null) mountSuspense(n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals);
|
|
5181
5353
|
else {
|
|
5182
|
-
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback) {
|
|
5354
|
+
if (parentSuspense && parentSuspense.deps > 0 && !n1.suspense.isInFallback && !parentSuspense.isHydrating) {
|
|
5183
5355
|
n2.suspense = n1.suspense;
|
|
5184
5356
|
n2.suspense.vnode = n2;
|
|
5185
5357
|
n2.el = n1.el;
|
|
@@ -5217,10 +5389,12 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
5217
5389
|
if (pendingBranch) {
|
|
5218
5390
|
suspense.pendingBranch = newBranch;
|
|
5219
5391
|
if (isSameVNodeType(pendingBranch, newBranch)) {
|
|
5220
|
-
|
|
5392
|
+
suspense.deps++;
|
|
5393
|
+
patch(pendingBranch, newBranch, isHydrating ? container : suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
5394
|
+
suspense.deps--;
|
|
5221
5395
|
if (suspense.deps <= 0) suspense.resolve();
|
|
5222
5396
|
else if (isInFallback) {
|
|
5223
|
-
if (!isHydrating) {
|
|
5397
|
+
if (!isHydrating && !suspense.isFallbackMountPending) {
|
|
5224
5398
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5225
5399
|
setActiveBranch(suspense, newFallback);
|
|
5226
5400
|
}
|
|
@@ -5232,12 +5406,16 @@ function patchSuspense(n1, n2, container, anchor, parentComponent, namespace, sl
|
|
|
5232
5406
|
suspense.activeBranch = pendingBranch;
|
|
5233
5407
|
} else unmount(pendingBranch, parentComponent, suspense);
|
|
5234
5408
|
suspense.deps = 0;
|
|
5409
|
+
for (let i = 0; i < suspense.effects.length; i++) {
|
|
5410
|
+
const effect = suspense.effects[i];
|
|
5411
|
+
if (effect.flags & 8) queuePostFlushCb(effect);
|
|
5412
|
+
}
|
|
5235
5413
|
suspense.effects.length = 0;
|
|
5236
5414
|
suspense.hiddenContainer = createElement("div");
|
|
5237
5415
|
if (isInFallback) {
|
|
5238
5416
|
patch(null, newBranch, suspense.hiddenContainer, null, parentComponent, suspense, namespace, slotScopeIds, optimized);
|
|
5239
5417
|
if (suspense.deps <= 0) suspense.resolve();
|
|
5240
|
-
else {
|
|
5418
|
+
else if (!suspense.isFallbackMountPending) {
|
|
5241
5419
|
patch(activeBranch, newFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5242
5420
|
setActiveBranch(suspense, newFallback);
|
|
5243
5421
|
}
|
|
@@ -5341,7 +5519,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5341
5519
|
let hasUnresolvedAncestor = false;
|
|
5342
5520
|
while (parent) {
|
|
5343
5521
|
if (parent.pendingBranch) {
|
|
5344
|
-
parent.effects.push(
|
|
5522
|
+
for (let i = 0; i < effects.length; i++) parent.effects.push(effects[i]);
|
|
5345
5523
|
hasUnresolvedAncestor = true;
|
|
5346
5524
|
break;
|
|
5347
5525
|
}
|
|
@@ -5351,6 +5529,7 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5351
5529
|
suspense.effects = [];
|
|
5352
5530
|
if (isSuspensible) {
|
|
5353
5531
|
if (parentSuspense && parentSuspense.pendingBranch && parentSuspenseId === parentSuspense.pendingId) {
|
|
5532
|
+
parentSuspenseId = void 0;
|
|
5354
5533
|
parentSuspense.deps--;
|
|
5355
5534
|
if (parentSuspense.deps === 0 && !sync) parentSuspense.resolve();
|
|
5356
5535
|
}
|
|
@@ -5365,8 +5544,9 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5365
5544
|
const mountFallback = () => {
|
|
5366
5545
|
suspense.isFallbackMountPending = false;
|
|
5367
5546
|
if (!suspense.isInFallback) return;
|
|
5368
|
-
|
|
5369
|
-
|
|
5547
|
+
const latestFallback = suspense.vnode.ssFallback;
|
|
5548
|
+
patch(null, latestFallback, container, anchor, parentComponent, null, namespace, slotScopeIds, optimized);
|
|
5549
|
+
setActiveBranch(suspense, latestFallback);
|
|
5370
5550
|
};
|
|
5371
5551
|
const delayEnter = fallbackVNode.transition && fallbackVNode.transition.mode === "out-in";
|
|
5372
5552
|
if (delayEnter) {
|
|
@@ -5387,11 +5567,16 @@ function createSuspenseBoundary(vnode, parentSuspense, parentComponent, containe
|
|
|
5387
5567
|
registerDep(instance, onResolve) {
|
|
5388
5568
|
const isInPendingSuspense = !!suspense.pendingBranch;
|
|
5389
5569
|
if (isInPendingSuspense) suspense.deps++;
|
|
5570
|
+
const hydratedEl = instance.vnode && instance.vnode.el;
|
|
5390
5571
|
instance.asyncDep.catch((err) => {
|
|
5391
5572
|
handleError(err, instance, 0);
|
|
5392
5573
|
}).then((asyncSetupResult) => {
|
|
5393
5574
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) return;
|
|
5394
5575
|
setCurrentInstance(null, void 0);
|
|
5576
|
+
if (hydratedEl && !instance.scope.active) {
|
|
5577
|
+
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
5578
|
+
return;
|
|
5579
|
+
}
|
|
5395
5580
|
instance.asyncResolved = true;
|
|
5396
5581
|
onResolve(asyncSetupResult);
|
|
5397
5582
|
if (isInPendingSuspense && --suspense.deps === 0) suspense.resolve();
|
|
@@ -5442,9 +5627,10 @@ function normalizeSuspenseSlot(s) {
|
|
|
5442
5627
|
return s;
|
|
5443
5628
|
}
|
|
5444
5629
|
function queueEffectWithSuspense(fn, id, suspense) {
|
|
5445
|
-
if (suspense && suspense.pendingBranch)
|
|
5446
|
-
|
|
5447
|
-
|
|
5630
|
+
if (suspense && suspense.pendingBranch) {
|
|
5631
|
+
if (isArray(fn)) suspense.effects.push(...fn);
|
|
5632
|
+
else suspense.effects.push(fn);
|
|
5633
|
+
} else queuePostFlushCb(fn, id);
|
|
5448
5634
|
}
|
|
5449
5635
|
function setActiveBranch(suspense, branch) {
|
|
5450
5636
|
suspense.activeBranch = branch;
|
|
@@ -5611,9 +5797,24 @@ function createBaseVNode(type, props = null, children = null, patchFlag = 0, dyn
|
|
|
5611
5797
|
if (shapeFlag & 128) type.normalize(vnode);
|
|
5612
5798
|
} else if (children) vnode.shapeFlag |= isString(children) ? 8 : 16;
|
|
5613
5799
|
if (!!(process.env.NODE_ENV !== "production") && vnode.key !== vnode.key) warn$1(`VNode created with invalid key (NaN). VNode type:`, vnode.type);
|
|
5800
|
+
if (!!(process.env.NODE_ENV !== "production") && props && vnode.shapeFlag & 1) {
|
|
5801
|
+
const overwritingProp = props.innerHTML != null ? "innerHTML" : props.textContent != null ? "textContent" : null;
|
|
5802
|
+
if (overwritingProp && hasContentChildren(vnode.children)) warn$1(`The \`${overwritingProp}\` prop on <${vnode.type}> will override its children. Remove either the \`${overwritingProp}\` prop or the children.`);
|
|
5803
|
+
}
|
|
5614
5804
|
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock && (vnode.patchFlag > 0 || shapeFlag & 6) && vnode.patchFlag !== 32) currentBlock.push(vnode);
|
|
5615
5805
|
return vnode;
|
|
5616
5806
|
}
|
|
5807
|
+
/**
|
|
5808
|
+
* dev only
|
|
5809
|
+
* Whether children would actually render something. Empty text and empty
|
|
5810
|
+
* arrays are ignored, mirroring the compiler's `node.children.length` check
|
|
5811
|
+
* for `v-html` / `v-text`.
|
|
5812
|
+
*/
|
|
5813
|
+
function hasContentChildren(children) {
|
|
5814
|
+
if (isString(children)) return children !== "";
|
|
5815
|
+
if (isArray(children)) return children.length > 0;
|
|
5816
|
+
return false;
|
|
5817
|
+
}
|
|
5617
5818
|
const createVNode = !!(process.env.NODE_ENV !== "production") ? createVNodeWithArgsTransform : _createVNode;
|
|
5618
5819
|
function _createVNode(type, props = null, children = null, patchFlag = 0, dynamicProps = null, isBlockNode = false) {
|
|
5619
5820
|
if (!type || type === NULL_DYNAMIC_COMPONENT) {
|
|
@@ -5623,8 +5824,10 @@ function _createVNode(type, props = null, children = null, patchFlag = 0, dynami
|
|
|
5623
5824
|
if (isVNode(type)) {
|
|
5624
5825
|
const cloned = cloneVNode(type, props, true);
|
|
5625
5826
|
if (children) normalizeChildren(cloned, children);
|
|
5626
|
-
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock)
|
|
5627
|
-
|
|
5827
|
+
if (isBlockTreeEnabled > 0 && !isBlockNode && currentBlock) {
|
|
5828
|
+
if (cloned.shapeFlag & 6) currentBlock[currentBlock.indexOf(type)] = cloned;
|
|
5829
|
+
else currentBlock.push(cloned);
|
|
5830
|
+
}
|
|
5628
5831
|
cloned.patchFlag = -2;
|
|
5629
5832
|
return cloned;
|
|
5630
5833
|
}
|
|
@@ -5684,7 +5887,10 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
5684
5887
|
ce: vnode.ce,
|
|
5685
5888
|
vi: vnode.vi,
|
|
5686
5889
|
vs: cloneVaporSlotMeta(vnode),
|
|
5687
|
-
vb: vnode.vb
|
|
5890
|
+
vb: vnode.vb,
|
|
5891
|
+
ibu: vnode.ibu,
|
|
5892
|
+
iu: vnode.iu,
|
|
5893
|
+
cacheIndex: vnode.cacheIndex
|
|
5688
5894
|
};
|
|
5689
5895
|
if (transition && cloneTransition) setTransitionHooks(cloned, transition.clone(cloned));
|
|
5690
5896
|
return cloned;
|
|
@@ -5694,8 +5900,7 @@ function cloneVaporSlotMeta(vnode) {
|
|
|
5694
5900
|
if (!vaporSlot) return vaporSlot;
|
|
5695
5901
|
const cloned = {
|
|
5696
5902
|
slot: vaporSlot.slot,
|
|
5697
|
-
|
|
5698
|
-
outletFallback: vaporSlot.outletFallback
|
|
5903
|
+
outlets: vaporSlot.outlets
|
|
5699
5904
|
};
|
|
5700
5905
|
if (vnode.el) {
|
|
5701
5906
|
cloned.state = vaporSlot.state;
|
|
@@ -5747,25 +5952,28 @@ function normalizeChildren(vnode, children) {
|
|
|
5747
5952
|
const { shapeFlag } = vnode;
|
|
5748
5953
|
if (children == null) children = null;
|
|
5749
5954
|
else if (isArray(children)) type = 16;
|
|
5750
|
-
else if (typeof children === "object")
|
|
5751
|
-
|
|
5752
|
-
|
|
5753
|
-
|
|
5754
|
-
|
|
5755
|
-
|
|
5756
|
-
|
|
5757
|
-
|
|
5758
|
-
|
|
5759
|
-
|
|
5760
|
-
|
|
5761
|
-
|
|
5762
|
-
|
|
5763
|
-
|
|
5764
|
-
|
|
5765
|
-
|
|
5955
|
+
else if (typeof children === "object") {
|
|
5956
|
+
if (shapeFlag & 65) {
|
|
5957
|
+
const slot = children.default;
|
|
5958
|
+
if (slot) {
|
|
5959
|
+
slot._c && (slot._d = false);
|
|
5960
|
+
normalizeChildren(vnode, slot());
|
|
5961
|
+
slot._c && (slot._d = true);
|
|
5962
|
+
}
|
|
5963
|
+
return;
|
|
5964
|
+
} else {
|
|
5965
|
+
type = 32;
|
|
5966
|
+
const slotFlag = children._;
|
|
5967
|
+
if (!slotFlag && !isInternalObject(children)) children._ctx = currentRenderingInstance;
|
|
5968
|
+
else if (slotFlag === 3 && currentRenderingInstance) {
|
|
5969
|
+
if (currentRenderingInstance.slots._ === 1) children._ = 1;
|
|
5970
|
+
else {
|
|
5971
|
+
children._ = 2;
|
|
5972
|
+
vnode.patchFlag |= 1024;
|
|
5973
|
+
}
|
|
5974
|
+
}
|
|
5766
5975
|
}
|
|
5767
|
-
}
|
|
5768
|
-
else if (isFunction(children)) {
|
|
5976
|
+
} else if (isFunction(children)) {
|
|
5769
5977
|
if (shapeFlag & 65) {
|
|
5770
5978
|
normalizeChildren(vnode, { default: children });
|
|
5771
5979
|
return;
|
|
@@ -5842,6 +6050,16 @@ const setCurrentInstance = (instance, scope = instance !== null ? instance.scope
|
|
|
5842
6050
|
simpleSetCurrentInstance(instance);
|
|
5843
6051
|
}
|
|
5844
6052
|
};
|
|
6053
|
+
/**
|
|
6054
|
+
* Restores a snapshot returned by {@link setCurrentInstance}. Unlike calling
|
|
6055
|
+
* `setCurrentInstance(...prev)`, an `undefined` saved scope is restored
|
|
6056
|
+
* verbatim instead of re-triggering the `instance.scope` default.
|
|
6057
|
+
* @internal
|
|
6058
|
+
*/
|
|
6059
|
+
const restoreCurrentInstance = (prev) => {
|
|
6060
|
+
setCurrentScope(prev[1]);
|
|
6061
|
+
simpleSetCurrentInstance(prev[0]);
|
|
6062
|
+
};
|
|
5845
6063
|
const internalOptions = [
|
|
5846
6064
|
"ce",
|
|
5847
6065
|
"type",
|
|
@@ -5873,7 +6091,7 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
5873
6091
|
};
|
|
5874
6092
|
//#endregion
|
|
5875
6093
|
//#region packages/runtime-core/src/component.ts
|
|
5876
|
-
const emptyAppContext =
|
|
6094
|
+
const emptyAppContext = /*@__PURE__*/ createAppContext();
|
|
5877
6095
|
let uid = 0;
|
|
5878
6096
|
/**
|
|
5879
6097
|
* @internal for vapor
|
|
@@ -6002,7 +6220,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6002
6220
|
const setupResult = callWithErrorHandling(setup, instance, 0, [!!(process.env.NODE_ENV !== "production") ? shallowReadonly$1(instance.props) : instance.props, setupContext]);
|
|
6003
6221
|
const isAsyncSetup = isPromise(setupResult);
|
|
6004
6222
|
setActiveSub(prevSub);
|
|
6005
|
-
|
|
6223
|
+
restoreCurrentInstance(prev);
|
|
6006
6224
|
if ((isAsyncSetup || instance.sp) && !isAsyncWrapper(instance)) markAsyncBoundary(instance);
|
|
6007
6225
|
if (isAsyncSetup) {
|
|
6008
6226
|
const unsetCurrentInstance = () => {
|
|
@@ -6010,7 +6228,12 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6010
6228
|
};
|
|
6011
6229
|
setupResult.then(unsetCurrentInstance, unsetCurrentInstance);
|
|
6012
6230
|
if (isSSR) return setupResult.then((resolvedResult) => {
|
|
6013
|
-
|
|
6231
|
+
setInSSRSetupState(true);
|
|
6232
|
+
try {
|
|
6233
|
+
handleSetupResult(instance, resolvedResult, isSSR);
|
|
6234
|
+
} finally {
|
|
6235
|
+
setInSSRSetupState(false);
|
|
6236
|
+
}
|
|
6014
6237
|
}).catch((e) => {
|
|
6015
6238
|
handleError(e, instance, 0);
|
|
6016
6239
|
});
|
|
@@ -6022,9 +6245,10 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6022
6245
|
} else finishComponentSetup(instance, isSSR);
|
|
6023
6246
|
}
|
|
6024
6247
|
function handleSetupResult(instance, setupResult, isSSR) {
|
|
6025
|
-
if (isFunction(setupResult))
|
|
6026
|
-
|
|
6027
|
-
|
|
6248
|
+
if (isFunction(setupResult)) {
|
|
6249
|
+
if (instance.type.__ssrInlineRender) instance.ssrRender = setupResult;
|
|
6250
|
+
else instance.render = setupResult;
|
|
6251
|
+
} else if (isObject(setupResult)) {
|
|
6028
6252
|
if (!!(process.env.NODE_ENV !== "production") && isVNode(setupResult)) warn$1("setup() should not return VNodes directly - return a render function instead.");
|
|
6029
6253
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) instance.devtoolsRawSetupState = setupResult;
|
|
6030
6254
|
instance.setupState = proxyRefs$1(setupResult);
|
|
@@ -6072,13 +6296,15 @@ function finishComponentSetup(instance, isSSR, skipOptions) {
|
|
|
6072
6296
|
applyOptions(instance);
|
|
6073
6297
|
} finally {
|
|
6074
6298
|
setActiveSub(prevSub);
|
|
6075
|
-
|
|
6299
|
+
restoreCurrentInstance(prevInstance);
|
|
6076
6300
|
}
|
|
6077
6301
|
}
|
|
6078
|
-
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR)
|
|
6302
|
+
if (!!(process.env.NODE_ENV !== "production") && !Component.render && instance.render === NOOP && !isSSR) {
|
|
6303
|
+
if (!compile && Component.template)
|
|
6079
6304
|
/* v8 ignore start */
|
|
6080
|
-
|
|
6081
|
-
|
|
6305
|
+
warn$1("Component provided template option but runtime compilation is not supported in this build of Vue. Configure your bundler to alias \"vue\" to \"vue/dist/vue.esm-bundler.js\".");
|
|
6306
|
+
else warn$1(`Component is missing template or render function: `, Component);
|
|
6307
|
+
}
|
|
6082
6308
|
}
|
|
6083
6309
|
const attrsProxyHandlers = !!(process.env.NODE_ENV !== "production") ? {
|
|
6084
6310
|
get(target, key) {
|
|
@@ -6151,14 +6377,13 @@ function getComponentPublicInstance(instance) {
|
|
|
6151
6377
|
if (instance.exposed) return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs$1(markRaw$1(instance.exposed)), {
|
|
6152
6378
|
get(target, key) {
|
|
6153
6379
|
if (key in target) return target[key];
|
|
6154
|
-
else {
|
|
6380
|
+
else if (!instance.vapor) {
|
|
6155
6381
|
const publicPropertiesMap = getPublicPropertiesMap();
|
|
6156
6382
|
if (key in publicPropertiesMap) return publicPropertiesMap[key](instance);
|
|
6157
6383
|
}
|
|
6158
6384
|
},
|
|
6159
6385
|
has(target, key) {
|
|
6160
|
-
|
|
6161
|
-
return key in target || key in publicPropertiesMap;
|
|
6386
|
+
return key in target || !instance.vapor && key in getPublicPropertiesMap();
|
|
6162
6387
|
}
|
|
6163
6388
|
}));
|
|
6164
6389
|
else return instance.proxy;
|
|
@@ -6196,11 +6421,12 @@ function h(type, propsOrChildren, children) {
|
|
|
6196
6421
|
try {
|
|
6197
6422
|
setBlockTracking(-1);
|
|
6198
6423
|
const l = arguments.length;
|
|
6199
|
-
if (l === 2)
|
|
6200
|
-
if (
|
|
6201
|
-
|
|
6202
|
-
|
|
6203
|
-
|
|
6424
|
+
if (l === 2) {
|
|
6425
|
+
if (isObject(propsOrChildren) && !isArray(propsOrChildren)) {
|
|
6426
|
+
if (isVNode(propsOrChildren)) return createVNode(type, null, [propsOrChildren]);
|
|
6427
|
+
return createVNode(type, propsOrChildren);
|
|
6428
|
+
} else return createVNode(type, null, propsOrChildren);
|
|
6429
|
+
} else {
|
|
6204
6430
|
if (l > 3) children = Array.prototype.slice.call(arguments, 2);
|
|
6205
6431
|
else if (l === 3 && isVNode(children)) children = [children];
|
|
6206
6432
|
return createVNode(type, propsOrChildren, children);
|
|
@@ -6392,7 +6618,7 @@ function isMemoSame(cached, memo) {
|
|
|
6392
6618
|
}
|
|
6393
6619
|
//#endregion
|
|
6394
6620
|
//#region packages/runtime-core/src/index.ts
|
|
6395
|
-
const version = "3.6.0-rc.
|
|
6621
|
+
const version = "3.6.0-rc.10";
|
|
6396
6622
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
6397
6623
|
/**
|
|
6398
6624
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -6415,7 +6641,10 @@ const ssrUtils = {
|
|
|
6415
6641
|
getComponentPublicInstance,
|
|
6416
6642
|
ensureValidVNode,
|
|
6417
6643
|
pushWarningContext,
|
|
6418
|
-
popWarningContext
|
|
6644
|
+
popWarningContext,
|
|
6645
|
+
VaporSlot,
|
|
6646
|
+
rawVaporSlotKey,
|
|
6647
|
+
invokeSlotFallback
|
|
6419
6648
|
};
|
|
6420
6649
|
/**
|
|
6421
6650
|
* @internal only exposed in compat builds
|
|
@@ -6427,4 +6656,4 @@ const resolveFilter = null;
|
|
|
6427
6656
|
const compatUtils = null;
|
|
6428
6657
|
const DeprecationTypes = null;
|
|
6429
6658
|
//#endregion
|
|
6430
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode,
|
|
6659
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, VaporSlot, activate, assertNumber, baseEmit, baseNormalizePropsOptions, baseResolveTransitionHooks, callWithAsyncErrorHandling, callWithErrorHandling, camelize, capitalize, checkTransitionMode, cloneVNode, compatUtils, computed, createAppAPI, createAsyncComponentContext, createBlock, createCanSetSetupRefChecker, createCommentVNode, createElementBlock, createBaseVNode as createElementVNode, createHydrationRenderer, createInternalObject, createPropsRestProxy, createRenderer, createSlots, createStaticVNode, createTextVNode, createVNode, currentInstance, customRef, deactivate, defaultPropGetter, defineAsyncComponent, defineComponent, defineEmits, defineExpose, defineModel, defineOptions, defineProps, defineSlots, devtools, devtoolsComponentAdded, effect, effectScope, endMeasure, ensureValidVNode, expose, filterModelListeners, flushOnAppMount, getAttributeMismatch, getComponentName, getContainerType, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, invalidateMount, invokeDirectiveHook, invokeSlotFallback, invokeVNodeHook, isAsyncWrapper, isEmitListener, isFunctionalFallthroughKey, isHydrating, isHydratingEnabled, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isUnchangedResourceProp, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, logMismatchError, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, normalizeVNode, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, prepareTransitionLeave, prepareTransitionSwitch, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, queuePostRenderEffect, rawVaporSlotKey, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveCssVars, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionChild, resolveTransitionHooks, restoreCurrentInstance, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, shouldUpdateComponent, simpleSetCurrentInstance, ssrContextKey, ssrUtils, startMeasure, stop, toClassSet, toDisplayString, toHandlerKey, toHandlers, toRaw, toRef, toRefs, toStyleMap, toValue, transformVNodeArgs, triggerRef, unref, unregisterHMR, useAsyncComponentState, useAttrs, useId, useInstanceOption, useModel, useSSRContext, useSlots, useTemplateRef, useTransitionState, validateComponentName, validateProps, version, warn, warnExtraneousAttributes, warnPropMismatch, watch, watchEffect, watchPostEffect, watchSyncEffect, withAsyncContext, withCtx, withDefaults, withDirectives, withMemo, withScopeId };
|