@vue/runtime-core 3.3.0-alpha.3 → 3.3.0-alpha.5
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 +74 -58
- package/dist/runtime-core.cjs.prod.js +58 -42
- package/dist/runtime-core.d.ts +15 -22
- package/dist/runtime-core.esm-bundler.js +74 -58
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -21,7 +21,7 @@ function warn(msg, ...args) {
|
|
|
21
21
|
callWithErrorHandling(
|
|
22
22
|
appWarnHandler,
|
|
23
23
|
instance,
|
|
24
|
-
|
|
24
|
+
11,
|
|
25
25
|
[
|
|
26
26
|
msg + args.join(""),
|
|
27
27
|
instance && instance.proxy,
|
|
@@ -134,21 +134,21 @@ const ErrorTypeStrings = {
|
|
|
134
134
|
["ec"]: "errorCaptured hook",
|
|
135
135
|
["rtc"]: "renderTracked hook",
|
|
136
136
|
["rtg"]: "renderTriggered hook",
|
|
137
|
-
[
|
|
138
|
-
[
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
137
|
+
[0]: "setup function",
|
|
138
|
+
[1]: "render function",
|
|
139
|
+
[2]: "watcher getter",
|
|
140
|
+
[3]: "watcher callback",
|
|
141
|
+
[4]: "watcher cleanup function",
|
|
142
|
+
[5]: "native event handler",
|
|
143
|
+
[6]: "component event handler",
|
|
144
|
+
[7]: "vnode hook",
|
|
145
|
+
[8]: "directive hook",
|
|
146
|
+
[9]: "transition hook",
|
|
147
|
+
[10]: "app errorHandler",
|
|
148
|
+
[11]: "app warnHandler",
|
|
149
|
+
[12]: "ref function",
|
|
150
|
+
[13]: "async component loader",
|
|
151
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
|
|
152
152
|
};
|
|
153
153
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
154
154
|
let res;
|
|
@@ -197,7 +197,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
197
197
|
callWithErrorHandling(
|
|
198
198
|
appErrorHandler,
|
|
199
199
|
null,
|
|
200
|
-
|
|
200
|
+
10,
|
|
201
201
|
[err, exposedInstance, errorInfo]
|
|
202
202
|
);
|
|
203
203
|
return;
|
|
@@ -350,7 +350,7 @@ function flushJobs(seen) {
|
|
|
350
350
|
if (check(job)) {
|
|
351
351
|
continue;
|
|
352
352
|
}
|
|
353
|
-
callWithErrorHandling(job, null,
|
|
353
|
+
callWithErrorHandling(job, null, 14);
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
356
|
} finally {
|
|
@@ -658,7 +658,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
658
658
|
callWithAsyncErrorHandling(
|
|
659
659
|
handler,
|
|
660
660
|
instance,
|
|
661
|
-
|
|
661
|
+
6,
|
|
662
662
|
args
|
|
663
663
|
);
|
|
664
664
|
}
|
|
@@ -673,7 +673,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
673
673
|
callWithAsyncErrorHandling(
|
|
674
674
|
onceHandler,
|
|
675
675
|
instance,
|
|
676
|
-
|
|
676
|
+
6,
|
|
677
677
|
args
|
|
678
678
|
);
|
|
679
679
|
}
|
|
@@ -844,7 +844,7 @@ function renderComponentRoot(instance) {
|
|
|
844
844
|
}
|
|
845
845
|
} catch (err) {
|
|
846
846
|
blockStack.length = 0;
|
|
847
|
-
handleError(err, instance,
|
|
847
|
+
handleError(err, instance, 1);
|
|
848
848
|
result = createVNode(Comment);
|
|
849
849
|
}
|
|
850
850
|
let root = result;
|
|
@@ -1355,7 +1355,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1355
1355
|
if (delayEnter) {
|
|
1356
1356
|
activeBranch.transition.afterLeave = () => {
|
|
1357
1357
|
if (pendingId === suspense.pendingId) {
|
|
1358
|
-
move(pendingBranch, container2, anchor2,
|
|
1358
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
1359
1359
|
}
|
|
1360
1360
|
};
|
|
1361
1361
|
}
|
|
@@ -1365,7 +1365,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1365
1365
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
1366
1366
|
}
|
|
1367
1367
|
if (!delayEnter) {
|
|
1368
|
-
move(pendingBranch, container2, anchor2,
|
|
1368
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
1369
1369
|
}
|
|
1370
1370
|
}
|
|
1371
1371
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -1443,7 +1443,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1443
1443
|
}
|
|
1444
1444
|
const hydratedEl = instance.vnode.el;
|
|
1445
1445
|
instance.asyncDep.catch((err) => {
|
|
1446
|
-
handleError(err, instance,
|
|
1446
|
+
handleError(err, instance, 0);
|
|
1447
1447
|
}).then((asyncSetupResult) => {
|
|
1448
1448
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
1449
1449
|
return;
|
|
@@ -1687,14 +1687,14 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1687
1687
|
} else if (reactivity.isReactive(s)) {
|
|
1688
1688
|
return traverse(s);
|
|
1689
1689
|
} else if (shared.isFunction(s)) {
|
|
1690
|
-
return callWithErrorHandling(s, instance,
|
|
1690
|
+
return callWithErrorHandling(s, instance, 2);
|
|
1691
1691
|
} else {
|
|
1692
1692
|
warnInvalidSource(s);
|
|
1693
1693
|
}
|
|
1694
1694
|
});
|
|
1695
1695
|
} else if (shared.isFunction(source)) {
|
|
1696
1696
|
if (cb) {
|
|
1697
|
-
getter = () => callWithErrorHandling(source, instance,
|
|
1697
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1698
1698
|
} else {
|
|
1699
1699
|
getter = () => {
|
|
1700
1700
|
if (instance && instance.isUnmounted) {
|
|
@@ -1706,7 +1706,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1706
1706
|
return callWithAsyncErrorHandling(
|
|
1707
1707
|
source,
|
|
1708
1708
|
instance,
|
|
1709
|
-
|
|
1709
|
+
3,
|
|
1710
1710
|
[onCleanup]
|
|
1711
1711
|
);
|
|
1712
1712
|
};
|
|
@@ -1722,7 +1722,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1722
1722
|
let cleanup;
|
|
1723
1723
|
let onCleanup = (fn) => {
|
|
1724
1724
|
cleanup = effect.onStop = () => {
|
|
1725
|
-
callWithErrorHandling(fn, instance,
|
|
1725
|
+
callWithErrorHandling(fn, instance, 4);
|
|
1726
1726
|
};
|
|
1727
1727
|
};
|
|
1728
1728
|
let ssrCleanup;
|
|
@@ -1731,7 +1731,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1731
1731
|
if (!cb) {
|
|
1732
1732
|
getter();
|
|
1733
1733
|
} else if (immediate) {
|
|
1734
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1734
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1735
1735
|
getter(),
|
|
1736
1736
|
isMultiSource ? [] : void 0,
|
|
1737
1737
|
onCleanup
|
|
@@ -1757,7 +1757,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1757
1757
|
if (cleanup) {
|
|
1758
1758
|
cleanup();
|
|
1759
1759
|
}
|
|
1760
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1760
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1761
1761
|
newValue,
|
|
1762
1762
|
// pass undefined as the old value when it's changed for the first time
|
|
1763
1763
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2034,7 +2034,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2034
2034
|
hook && callWithAsyncErrorHandling(
|
|
2035
2035
|
hook,
|
|
2036
2036
|
instance,
|
|
2037
|
-
|
|
2037
|
+
9,
|
|
2038
2038
|
args
|
|
2039
2039
|
);
|
|
2040
2040
|
};
|
|
@@ -2266,7 +2266,7 @@ function defineAsyncComponent(source) {
|
|
|
2266
2266
|
handleError(
|
|
2267
2267
|
err,
|
|
2268
2268
|
instance,
|
|
2269
|
-
|
|
2269
|
+
13,
|
|
2270
2270
|
!errorComponent
|
|
2271
2271
|
/* do not throw in dev if user provided error component */
|
|
2272
2272
|
);
|
|
@@ -2371,7 +2371,7 @@ const KeepAliveImpl = {
|
|
|
2371
2371
|
const storageContainer = createElement("div");
|
|
2372
2372
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
2373
2373
|
const instance2 = vnode.component;
|
|
2374
|
-
move(vnode, container, anchor,
|
|
2374
|
+
move(vnode, container, anchor, 0, parentSuspense);
|
|
2375
2375
|
patch(
|
|
2376
2376
|
instance2.vnode,
|
|
2377
2377
|
vnode,
|
|
@@ -2399,7 +2399,7 @@ const KeepAliveImpl = {
|
|
|
2399
2399
|
};
|
|
2400
2400
|
sharedContext.deactivate = (vnode) => {
|
|
2401
2401
|
const instance2 = vnode.component;
|
|
2402
|
-
move(vnode, storageContainer, null,
|
|
2402
|
+
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
2403
2403
|
queuePostRenderEffect(() => {
|
|
2404
2404
|
if (instance2.da) {
|
|
2405
2405
|
shared.invokeArrayFns(instance2.da);
|
|
@@ -2678,7 +2678,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2678
2678
|
let hook = binding.dir[name];
|
|
2679
2679
|
if (hook) {
|
|
2680
2680
|
reactivity.pauseTracking();
|
|
2681
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
2681
|
+
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
2682
2682
|
vnode.el,
|
|
2683
2683
|
binding,
|
|
2684
2684
|
vnode,
|
|
@@ -2694,7 +2694,7 @@ const DIRECTIVES = "directives";
|
|
|
2694
2694
|
function resolveComponent(name, maybeSelfReference) {
|
|
2695
2695
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2696
2696
|
}
|
|
2697
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
2697
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2698
2698
|
function resolveDynamicComponent(component) {
|
|
2699
2699
|
if (shared.isString(component)) {
|
|
2700
2700
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -4223,7 +4223,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4223
4223
|
}
|
|
4224
4224
|
}
|
|
4225
4225
|
if (shared.isFunction(ref)) {
|
|
4226
|
-
callWithErrorHandling(ref, owner,
|
|
4226
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4227
4227
|
} else {
|
|
4228
4228
|
const _isString = shared.isString(ref);
|
|
4229
4229
|
const _isRef = reactivity.isRef(ref);
|
|
@@ -5871,7 +5871,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5871
5871
|
);
|
|
5872
5872
|
} else if (moved) {
|
|
5873
5873
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
5874
|
-
move(nextChild, container, anchor,
|
|
5874
|
+
move(nextChild, container, anchor, 2);
|
|
5875
5875
|
} else {
|
|
5876
5876
|
j--;
|
|
5877
5877
|
}
|
|
@@ -5905,9 +5905,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5905
5905
|
moveStaticNode(vnode, container, anchor);
|
|
5906
5906
|
return;
|
|
5907
5907
|
}
|
|
5908
|
-
const needTransition = moveType !==
|
|
5908
|
+
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
5909
5909
|
if (needTransition) {
|
|
5910
|
-
if (moveType ===
|
|
5910
|
+
if (moveType === 0) {
|
|
5911
5911
|
transition.beforeEnter(el);
|
|
5912
5912
|
hostInsert(el, container, anchor);
|
|
5913
5913
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -6305,7 +6305,7 @@ const TeleportImpl = {
|
|
|
6305
6305
|
container,
|
|
6306
6306
|
mainAnchor,
|
|
6307
6307
|
internals,
|
|
6308
|
-
|
|
6308
|
+
1
|
|
6309
6309
|
);
|
|
6310
6310
|
}
|
|
6311
6311
|
} else {
|
|
@@ -6320,7 +6320,7 @@ const TeleportImpl = {
|
|
|
6320
6320
|
nextTarget,
|
|
6321
6321
|
null,
|
|
6322
6322
|
internals,
|
|
6323
|
-
|
|
6323
|
+
0
|
|
6324
6324
|
);
|
|
6325
6325
|
} else {
|
|
6326
6326
|
warn(
|
|
@@ -6335,7 +6335,7 @@ const TeleportImpl = {
|
|
|
6335
6335
|
target,
|
|
6336
6336
|
targetAnchor,
|
|
6337
6337
|
internals,
|
|
6338
|
-
|
|
6338
|
+
1
|
|
6339
6339
|
);
|
|
6340
6340
|
}
|
|
6341
6341
|
}
|
|
@@ -6366,12 +6366,12 @@ const TeleportImpl = {
|
|
|
6366
6366
|
move: moveTeleport,
|
|
6367
6367
|
hydrate: hydrateTeleport
|
|
6368
6368
|
};
|
|
6369
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType =
|
|
6370
|
-
if (moveType ===
|
|
6369
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
6370
|
+
if (moveType === 0) {
|
|
6371
6371
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
6372
6372
|
}
|
|
6373
6373
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
6374
|
-
const isReorder = moveType ===
|
|
6374
|
+
const isReorder = moveType === 2;
|
|
6375
6375
|
if (isReorder) {
|
|
6376
6376
|
insert(el, container, parentAnchor);
|
|
6377
6377
|
}
|
|
@@ -6382,7 +6382,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
6382
6382
|
children[i],
|
|
6383
6383
|
container,
|
|
6384
6384
|
parentAnchor,
|
|
6385
|
-
|
|
6385
|
+
2
|
|
6386
6386
|
);
|
|
6387
6387
|
}
|
|
6388
6388
|
}
|
|
@@ -6452,10 +6452,10 @@ function updateCssVars(vnode) {
|
|
|
6452
6452
|
}
|
|
6453
6453
|
}
|
|
6454
6454
|
|
|
6455
|
-
const Fragment = Symbol("
|
|
6456
|
-
const Text = Symbol("
|
|
6457
|
-
const Comment = Symbol("
|
|
6458
|
-
const Static = Symbol("
|
|
6455
|
+
const Fragment = Symbol.for("v-fgt");
|
|
6456
|
+
const Text = Symbol.for("v-txt");
|
|
6457
|
+
const Comment = Symbol.for("v-cmt");
|
|
6458
|
+
const Static = Symbol.for("v-stc");
|
|
6459
6459
|
const blockStack = [];
|
|
6460
6460
|
let currentBlock = null;
|
|
6461
6461
|
function openBlock(disableTracking = false) {
|
|
@@ -6810,7 +6810,7 @@ function mergeProps(...args) {
|
|
|
6810
6810
|
return ret;
|
|
6811
6811
|
}
|
|
6812
6812
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
6813
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
6813
|
+
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
6814
6814
|
vnode,
|
|
6815
6815
|
prevVNode
|
|
6816
6816
|
]);
|
|
@@ -6907,13 +6907,29 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
6907
6907
|
}
|
|
6908
6908
|
let currentInstance = null;
|
|
6909
6909
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
6910
|
+
let internalSetCurrentInstance;
|
|
6911
|
+
let globalCurrentInstanceSetters;
|
|
6912
|
+
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
6913
|
+
{
|
|
6914
|
+
if (!(globalCurrentInstanceSetters = shared.getGlobalThis()[settersKey])) {
|
|
6915
|
+
globalCurrentInstanceSetters = shared.getGlobalThis()[settersKey] = [];
|
|
6916
|
+
}
|
|
6917
|
+
globalCurrentInstanceSetters.push((i) => currentInstance = i);
|
|
6918
|
+
internalSetCurrentInstance = (instance) => {
|
|
6919
|
+
if (globalCurrentInstanceSetters.length > 1) {
|
|
6920
|
+
globalCurrentInstanceSetters.forEach((s) => s(instance));
|
|
6921
|
+
} else {
|
|
6922
|
+
globalCurrentInstanceSetters[0](instance);
|
|
6923
|
+
}
|
|
6924
|
+
};
|
|
6925
|
+
}
|
|
6910
6926
|
const setCurrentInstance = (instance) => {
|
|
6911
|
-
|
|
6927
|
+
internalSetCurrentInstance(instance);
|
|
6912
6928
|
instance.scope.on();
|
|
6913
6929
|
};
|
|
6914
6930
|
const unsetCurrentInstance = () => {
|
|
6915
6931
|
currentInstance && currentInstance.scope.off();
|
|
6916
|
-
|
|
6932
|
+
internalSetCurrentInstance(null);
|
|
6917
6933
|
};
|
|
6918
6934
|
const isBuiltInTag = /* @__PURE__ */ shared.makeMap("slot,component");
|
|
6919
6935
|
function validateComponentName(name, config) {
|
|
@@ -6976,7 +6992,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6976
6992
|
const setupResult = callWithErrorHandling(
|
|
6977
6993
|
setup,
|
|
6978
6994
|
instance,
|
|
6979
|
-
|
|
6995
|
+
0,
|
|
6980
6996
|
[reactivity.shallowReadonly(instance.props) , setupContext]
|
|
6981
6997
|
);
|
|
6982
6998
|
reactivity.resetTracking();
|
|
@@ -6987,7 +7003,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
6987
7003
|
return setupResult.then((resolvedResult) => {
|
|
6988
7004
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
6989
7005
|
}).catch((e) => {
|
|
6990
|
-
handleError(e, instance,
|
|
7006
|
+
handleError(e, instance, 0);
|
|
6991
7007
|
});
|
|
6992
7008
|
} else {
|
|
6993
7009
|
instance.asyncDep = setupResult;
|
|
@@ -7315,7 +7331,7 @@ function h(type, propsOrChildren, children) {
|
|
|
7315
7331
|
}
|
|
7316
7332
|
}
|
|
7317
7333
|
|
|
7318
|
-
const ssrContextKey = Symbol(
|
|
7334
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
7319
7335
|
const useSSRContext = () => {
|
|
7320
7336
|
{
|
|
7321
7337
|
const ctx = inject(ssrContextKey);
|
|
@@ -7533,7 +7549,7 @@ function isMemoSame(cached, memo) {
|
|
|
7533
7549
|
return true;
|
|
7534
7550
|
}
|
|
7535
7551
|
|
|
7536
|
-
const version = "3.3.0-alpha.
|
|
7552
|
+
const version = "3.3.0-alpha.5";
|
|
7537
7553
|
const _ssrUtils = {
|
|
7538
7554
|
createComponentInstance,
|
|
7539
7555
|
setupComponent,
|
|
@@ -59,7 +59,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
59
59
|
callWithErrorHandling(
|
|
60
60
|
appErrorHandler,
|
|
61
61
|
null,
|
|
62
|
-
|
|
62
|
+
10,
|
|
63
63
|
[err, exposedInstance, errorInfo]
|
|
64
64
|
);
|
|
65
65
|
return;
|
|
@@ -181,7 +181,7 @@ function flushJobs(seen) {
|
|
|
181
181
|
const job = queue[flushIndex];
|
|
182
182
|
if (job && job.active !== false) {
|
|
183
183
|
if (false) ;
|
|
184
|
-
callWithErrorHandling(job, null,
|
|
184
|
+
callWithErrorHandling(job, null, 14);
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
} finally {
|
|
@@ -255,7 +255,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
255
255
|
callWithAsyncErrorHandling(
|
|
256
256
|
handler,
|
|
257
257
|
instance,
|
|
258
|
-
|
|
258
|
+
6,
|
|
259
259
|
args
|
|
260
260
|
);
|
|
261
261
|
}
|
|
@@ -270,7 +270,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
270
270
|
callWithAsyncErrorHandling(
|
|
271
271
|
onceHandler,
|
|
272
272
|
instance,
|
|
273
|
-
|
|
273
|
+
6,
|
|
274
274
|
args
|
|
275
275
|
);
|
|
276
276
|
}
|
|
@@ -431,7 +431,7 @@ function renderComponentRoot(instance) {
|
|
|
431
431
|
}
|
|
432
432
|
} catch (err) {
|
|
433
433
|
blockStack.length = 0;
|
|
434
|
-
handleError(err, instance,
|
|
434
|
+
handleError(err, instance, 1);
|
|
435
435
|
result = createVNode(Comment);
|
|
436
436
|
}
|
|
437
437
|
let root = result;
|
|
@@ -853,7 +853,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
853
853
|
if (delayEnter) {
|
|
854
854
|
activeBranch.transition.afterLeave = () => {
|
|
855
855
|
if (pendingId === suspense.pendingId) {
|
|
856
|
-
move(pendingBranch, container2, anchor2,
|
|
856
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
857
857
|
}
|
|
858
858
|
};
|
|
859
859
|
}
|
|
@@ -863,7 +863,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
863
863
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
864
864
|
}
|
|
865
865
|
if (!delayEnter) {
|
|
866
|
-
move(pendingBranch, container2, anchor2,
|
|
866
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
867
867
|
}
|
|
868
868
|
}
|
|
869
869
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -941,7 +941,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
941
941
|
}
|
|
942
942
|
const hydratedEl = instance.vnode.el;
|
|
943
943
|
instance.asyncDep.catch((err) => {
|
|
944
|
-
handleError(err, instance,
|
|
944
|
+
handleError(err, instance, 0);
|
|
945
945
|
}).then((asyncSetupResult) => {
|
|
946
946
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
947
947
|
return;
|
|
@@ -1144,12 +1144,12 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1144
1144
|
} else if (reactivity.isReactive(s)) {
|
|
1145
1145
|
return traverse(s);
|
|
1146
1146
|
} else if (shared.isFunction(s)) {
|
|
1147
|
-
return callWithErrorHandling(s, instance,
|
|
1147
|
+
return callWithErrorHandling(s, instance, 2);
|
|
1148
1148
|
} else ;
|
|
1149
1149
|
});
|
|
1150
1150
|
} else if (shared.isFunction(source)) {
|
|
1151
1151
|
if (cb) {
|
|
1152
|
-
getter = () => callWithErrorHandling(source, instance,
|
|
1152
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1153
1153
|
} else {
|
|
1154
1154
|
getter = () => {
|
|
1155
1155
|
if (instance && instance.isUnmounted) {
|
|
@@ -1161,7 +1161,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1161
1161
|
return callWithAsyncErrorHandling(
|
|
1162
1162
|
source,
|
|
1163
1163
|
instance,
|
|
1164
|
-
|
|
1164
|
+
3,
|
|
1165
1165
|
[onCleanup]
|
|
1166
1166
|
);
|
|
1167
1167
|
};
|
|
@@ -1176,7 +1176,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1176
1176
|
let cleanup;
|
|
1177
1177
|
let onCleanup = (fn) => {
|
|
1178
1178
|
cleanup = effect.onStop = () => {
|
|
1179
|
-
callWithErrorHandling(fn, instance,
|
|
1179
|
+
callWithErrorHandling(fn, instance, 4);
|
|
1180
1180
|
};
|
|
1181
1181
|
};
|
|
1182
1182
|
let ssrCleanup;
|
|
@@ -1185,7 +1185,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1185
1185
|
if (!cb) {
|
|
1186
1186
|
getter();
|
|
1187
1187
|
} else if (immediate) {
|
|
1188
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1188
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1189
1189
|
getter(),
|
|
1190
1190
|
isMultiSource ? [] : void 0,
|
|
1191
1191
|
onCleanup
|
|
@@ -1211,7 +1211,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = sh
|
|
|
1211
1211
|
if (cleanup) {
|
|
1212
1212
|
cleanup();
|
|
1213
1213
|
}
|
|
1214
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1214
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1215
1215
|
newValue,
|
|
1216
1216
|
// pass undefined as the old value when it's changed for the first time
|
|
1217
1217
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -1474,7 +1474,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
1474
1474
|
hook && callWithAsyncErrorHandling(
|
|
1475
1475
|
hook,
|
|
1476
1476
|
instance,
|
|
1477
|
-
|
|
1477
|
+
9,
|
|
1478
1478
|
args
|
|
1479
1479
|
);
|
|
1480
1480
|
};
|
|
@@ -1698,7 +1698,7 @@ function defineAsyncComponent(source) {
|
|
|
1698
1698
|
handleError(
|
|
1699
1699
|
err,
|
|
1700
1700
|
instance,
|
|
1701
|
-
|
|
1701
|
+
13,
|
|
1702
1702
|
!errorComponent
|
|
1703
1703
|
/* do not throw in dev if user provided error component */
|
|
1704
1704
|
);
|
|
@@ -1800,7 +1800,7 @@ const KeepAliveImpl = {
|
|
|
1800
1800
|
const storageContainer = createElement("div");
|
|
1801
1801
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
1802
1802
|
const instance2 = vnode.component;
|
|
1803
|
-
move(vnode, container, anchor,
|
|
1803
|
+
move(vnode, container, anchor, 0, parentSuspense);
|
|
1804
1804
|
patch(
|
|
1805
1805
|
instance2.vnode,
|
|
1806
1806
|
vnode,
|
|
@@ -1825,7 +1825,7 @@ const KeepAliveImpl = {
|
|
|
1825
1825
|
};
|
|
1826
1826
|
sharedContext.deactivate = (vnode) => {
|
|
1827
1827
|
const instance2 = vnode.component;
|
|
1828
|
-
move(vnode, storageContainer, null,
|
|
1828
|
+
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
1829
1829
|
queuePostRenderEffect(() => {
|
|
1830
1830
|
if (instance2.da) {
|
|
1831
1831
|
shared.invokeArrayFns(instance2.da);
|
|
@@ -2087,7 +2087,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2087
2087
|
let hook = binding.dir[name];
|
|
2088
2088
|
if (hook) {
|
|
2089
2089
|
reactivity.pauseTracking();
|
|
2090
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
2090
|
+
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
2091
2091
|
vnode.el,
|
|
2092
2092
|
binding,
|
|
2093
2093
|
vnode,
|
|
@@ -2103,7 +2103,7 @@ const DIRECTIVES = "directives";
|
|
|
2103
2103
|
function resolveComponent(name, maybeSelfReference) {
|
|
2104
2104
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2105
2105
|
}
|
|
2106
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
2106
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2107
2107
|
function resolveDynamicComponent(component) {
|
|
2108
2108
|
if (shared.isString(component)) {
|
|
2109
2109
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -3223,7 +3223,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
3223
3223
|
}
|
|
3224
3224
|
}
|
|
3225
3225
|
if (shared.isFunction(ref)) {
|
|
3226
|
-
callWithErrorHandling(ref, owner,
|
|
3226
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
3227
3227
|
} else {
|
|
3228
3228
|
const _isString = shared.isString(ref);
|
|
3229
3229
|
const _isRef = reactivity.isRef(ref);
|
|
@@ -4653,7 +4653,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4653
4653
|
);
|
|
4654
4654
|
} else if (moved) {
|
|
4655
4655
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
4656
|
-
move(nextChild, container, anchor,
|
|
4656
|
+
move(nextChild, container, anchor, 2);
|
|
4657
4657
|
} else {
|
|
4658
4658
|
j--;
|
|
4659
4659
|
}
|
|
@@ -4687,9 +4687,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4687
4687
|
moveStaticNode(vnode, container, anchor);
|
|
4688
4688
|
return;
|
|
4689
4689
|
}
|
|
4690
|
-
const needTransition = moveType !==
|
|
4690
|
+
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
4691
4691
|
if (needTransition) {
|
|
4692
|
-
if (moveType ===
|
|
4692
|
+
if (moveType === 0) {
|
|
4693
4693
|
transition.beforeEnter(el);
|
|
4694
4694
|
hostInsert(el, container, anchor);
|
|
4695
4695
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -5053,7 +5053,7 @@ const TeleportImpl = {
|
|
|
5053
5053
|
container,
|
|
5054
5054
|
mainAnchor,
|
|
5055
5055
|
internals,
|
|
5056
|
-
|
|
5056
|
+
1
|
|
5057
5057
|
);
|
|
5058
5058
|
}
|
|
5059
5059
|
} else {
|
|
@@ -5068,7 +5068,7 @@ const TeleportImpl = {
|
|
|
5068
5068
|
nextTarget,
|
|
5069
5069
|
null,
|
|
5070
5070
|
internals,
|
|
5071
|
-
|
|
5071
|
+
0
|
|
5072
5072
|
);
|
|
5073
5073
|
}
|
|
5074
5074
|
} else if (wasDisabled) {
|
|
@@ -5077,7 +5077,7 @@ const TeleportImpl = {
|
|
|
5077
5077
|
target,
|
|
5078
5078
|
targetAnchor,
|
|
5079
5079
|
internals,
|
|
5080
|
-
|
|
5080
|
+
1
|
|
5081
5081
|
);
|
|
5082
5082
|
}
|
|
5083
5083
|
}
|
|
@@ -5108,12 +5108,12 @@ const TeleportImpl = {
|
|
|
5108
5108
|
move: moveTeleport,
|
|
5109
5109
|
hydrate: hydrateTeleport
|
|
5110
5110
|
};
|
|
5111
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType =
|
|
5112
|
-
if (moveType ===
|
|
5111
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
5112
|
+
if (moveType === 0) {
|
|
5113
5113
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
5114
5114
|
}
|
|
5115
5115
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
5116
|
-
const isReorder = moveType ===
|
|
5116
|
+
const isReorder = moveType === 2;
|
|
5117
5117
|
if (isReorder) {
|
|
5118
5118
|
insert(el, container, parentAnchor);
|
|
5119
5119
|
}
|
|
@@ -5124,7 +5124,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
5124
5124
|
children[i],
|
|
5125
5125
|
container,
|
|
5126
5126
|
parentAnchor,
|
|
5127
|
-
|
|
5127
|
+
2
|
|
5128
5128
|
);
|
|
5129
5129
|
}
|
|
5130
5130
|
}
|
|
@@ -5194,10 +5194,10 @@ function updateCssVars(vnode) {
|
|
|
5194
5194
|
}
|
|
5195
5195
|
}
|
|
5196
5196
|
|
|
5197
|
-
const Fragment = Symbol(
|
|
5198
|
-
const Text = Symbol(
|
|
5199
|
-
const Comment = Symbol(
|
|
5200
|
-
const Static = Symbol(
|
|
5197
|
+
const Fragment = Symbol.for("v-fgt");
|
|
5198
|
+
const Text = Symbol.for("v-txt");
|
|
5199
|
+
const Comment = Symbol.for("v-cmt");
|
|
5200
|
+
const Static = Symbol.for("v-stc");
|
|
5201
5201
|
const blockStack = [];
|
|
5202
5202
|
let currentBlock = null;
|
|
5203
5203
|
function openBlock(disableTracking = false) {
|
|
@@ -5518,7 +5518,7 @@ function mergeProps(...args) {
|
|
|
5518
5518
|
return ret;
|
|
5519
5519
|
}
|
|
5520
5520
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
5521
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
5521
|
+
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
5522
5522
|
vnode,
|
|
5523
5523
|
prevVNode
|
|
5524
5524
|
]);
|
|
@@ -5615,13 +5615,29 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
5615
5615
|
}
|
|
5616
5616
|
let currentInstance = null;
|
|
5617
5617
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
5618
|
+
let internalSetCurrentInstance;
|
|
5619
|
+
let globalCurrentInstanceSetters;
|
|
5620
|
+
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
5621
|
+
{
|
|
5622
|
+
if (!(globalCurrentInstanceSetters = shared.getGlobalThis()[settersKey])) {
|
|
5623
|
+
globalCurrentInstanceSetters = shared.getGlobalThis()[settersKey] = [];
|
|
5624
|
+
}
|
|
5625
|
+
globalCurrentInstanceSetters.push((i) => currentInstance = i);
|
|
5626
|
+
internalSetCurrentInstance = (instance) => {
|
|
5627
|
+
if (globalCurrentInstanceSetters.length > 1) {
|
|
5628
|
+
globalCurrentInstanceSetters.forEach((s) => s(instance));
|
|
5629
|
+
} else {
|
|
5630
|
+
globalCurrentInstanceSetters[0](instance);
|
|
5631
|
+
}
|
|
5632
|
+
};
|
|
5633
|
+
}
|
|
5618
5634
|
const setCurrentInstance = (instance) => {
|
|
5619
|
-
|
|
5635
|
+
internalSetCurrentInstance(instance);
|
|
5620
5636
|
instance.scope.on();
|
|
5621
5637
|
};
|
|
5622
5638
|
const unsetCurrentInstance = () => {
|
|
5623
5639
|
currentInstance && currentInstance.scope.off();
|
|
5624
|
-
|
|
5640
|
+
internalSetCurrentInstance(null);
|
|
5625
5641
|
};
|
|
5626
5642
|
function isStatefulComponent(instance) {
|
|
5627
5643
|
return instance.vnode.shapeFlag & 4;
|
|
@@ -5649,7 +5665,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
5649
5665
|
const setupResult = callWithErrorHandling(
|
|
5650
5666
|
setup,
|
|
5651
5667
|
instance,
|
|
5652
|
-
|
|
5668
|
+
0,
|
|
5653
5669
|
[instance.props, setupContext]
|
|
5654
5670
|
);
|
|
5655
5671
|
reactivity.resetTracking();
|
|
@@ -5660,7 +5676,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
5660
5676
|
return setupResult.then((resolvedResult) => {
|
|
5661
5677
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
5662
5678
|
}).catch((e) => {
|
|
5663
|
-
handleError(e, instance,
|
|
5679
|
+
handleError(e, instance, 0);
|
|
5664
5680
|
});
|
|
5665
5681
|
} else {
|
|
5666
5682
|
instance.asyncDep = setupResult;
|
|
@@ -5869,7 +5885,7 @@ function h(type, propsOrChildren, children) {
|
|
|
5869
5885
|
}
|
|
5870
5886
|
}
|
|
5871
5887
|
|
|
5872
|
-
const ssrContextKey = Symbol(
|
|
5888
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
5873
5889
|
const useSSRContext = () => {
|
|
5874
5890
|
{
|
|
5875
5891
|
const ctx = inject(ssrContextKey);
|
|
@@ -5908,7 +5924,7 @@ function isMemoSame(cached, memo) {
|
|
|
5908
5924
|
return true;
|
|
5909
5925
|
}
|
|
5910
5926
|
|
|
5911
|
-
const version = "3.3.0-alpha.
|
|
5927
|
+
const version = "3.3.0-alpha.5";
|
|
5912
5928
|
const _ssrUtils = {
|
|
5913
5929
|
createComponentInstance,
|
|
5914
5930
|
setupComponent,
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { computed as computed$1, ShallowUnwrapRef, UnwrapNestedRefs, DebuggerEvent, ComputedGetter, WritableComputedOptions, Ref, ReactiveFlags, ReactiveEffect, EffectScope, ComputedRef, DebuggerOptions, reactive } from '@vue/reactivity';
|
|
2
2
|
export { ComputedGetter, ComputedRef, ComputedSetter, CustomRefFactory, DebuggerEvent, DebuggerEventExtraInfo, DebuggerOptions, DeepReadonly, EffectScheduler, EffectScope, Raw, ReactiveEffect, ReactiveEffectOptions, ReactiveEffectRunner, ReactiveFlags, Ref, ShallowReactive, ShallowRef, ShallowUnwrapRef, ToRef, ToRefs, TrackOpTypes, TriggerOpTypes, UnwrapNestedRefs, UnwrapRef, WritableComputedOptions, WritableComputedRef, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, triggerRef, unref } from '@vue/reactivity';
|
|
3
|
-
import { SlotFlags, UnionToIntersection, IfAny, LooseRequired
|
|
3
|
+
import { SlotFlags, UnionToIntersection, Prettify, IfAny, LooseRequired } from '@vue/shared';
|
|
4
4
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
5
5
|
|
|
6
6
|
declare const computed: typeof computed$1;
|
|
@@ -108,7 +108,7 @@ D = {}, // return from data()
|
|
|
108
108
|
C extends ComputedOptions = {}, M extends MethodOptions = {}, E extends EmitsOptions = {}, PublicProps = P, Defaults = {}, MakeDefaultsOptional extends boolean = false, Options = ComponentOptionsBase<any, any, any, any, any, any, any, any, any>, I extends ComponentInjectOptions = {}> = {
|
|
109
109
|
$: ComponentInternalInstance;
|
|
110
110
|
$data: D;
|
|
111
|
-
$props: MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<P & PublicProps, keyof Defaults> : P & PublicProps
|
|
111
|
+
$props: Prettify<MakeDefaultsOptional extends true ? Partial<Defaults> & Omit<P & PublicProps, keyof Defaults> : P & PublicProps>;
|
|
112
112
|
$attrs: Data;
|
|
113
113
|
$refs: Data;
|
|
114
114
|
$slots: Slots;
|
|
@@ -498,16 +498,8 @@ declare function checkCompatEnabled(key: DeprecationTypes, instance: ComponentIn
|
|
|
498
498
|
export interface ComponentCustomOptions {
|
|
499
499
|
}
|
|
500
500
|
export type RenderFunction = () => VNodeChild;
|
|
501
|
-
export type ExtractOptionProp<T> = T extends ComponentOptionsBase<infer P, // Props
|
|
502
|
-
any, // RawBindings
|
|
503
|
-
any, // D
|
|
504
|
-
any, // C
|
|
505
|
-
any, // M
|
|
506
|
-
any, // Mixin
|
|
507
|
-
any, // Extends
|
|
508
|
-
any> ? unknown extends P ? {} : P : {};
|
|
509
501
|
export interface ComponentOptionsBase<Props, RawBindings, D, C extends ComputedOptions, M extends MethodOptions, Mixin extends ComponentOptionsMixin, Extends extends ComponentOptionsMixin, E extends EmitsOptions, EE extends string = string, Defaults = {}, I extends ComponentInjectOptions = {}, II extends string = string> extends LegacyOptions<Props, D, C, M, Mixin, Extends, I, II>, ComponentInternalOptions, ComponentCustomOptions {
|
|
510
|
-
setup?: (this: void, props:
|
|
502
|
+
setup?: (this: void, props: LooseRequired<Props & Prettify<UnwrapMixinsType<IntersectionMixin<Mixin> & IntersectionMixin<Extends>, 'P'>>>, ctx: SetupContext<E>) => Promise<RawBindings> | RawBindings | RenderFunction | void;
|
|
511
503
|
name?: string;
|
|
512
504
|
template?: string | object;
|
|
513
505
|
render?: Function;
|
|
@@ -540,12 +532,12 @@ export interface RuntimeCompilerOptions {
|
|
|
540
532
|
export type ComponentOptionsWithoutProps<Props = {}, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, PE = Props & EmitsToProps<E>> = ComponentOptionsBase<PE, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II> & {
|
|
541
533
|
props?: undefined;
|
|
542
534
|
} & ThisType<CreateComponentPublicInstance<PE, RawBindings, D, C, M, Mixin, Extends, E, PE, {}, false, I>>;
|
|
543
|
-
export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, Props = Readonly<{
|
|
535
|
+
export type ComponentOptionsWithArrayProps<PropNames extends string = string, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, Props = Prettify<Readonly<{
|
|
544
536
|
[key in PropNames]?: any;
|
|
545
|
-
}
|
|
537
|
+
} & EmitsToProps<E>>>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, {}, I, II> & {
|
|
546
538
|
props: PropNames[];
|
|
547
539
|
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, {}, false, I>>;
|
|
548
|
-
export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, Props = Readonly<ExtractPropTypes<PropsOptions
|
|
540
|
+
export type ComponentOptionsWithObjectProps<PropsOptions = ComponentObjectPropsOptions, RawBindings = {}, D = {}, C extends ComputedOptions = {}, M extends MethodOptions = {}, Mixin extends ComponentOptionsMixin = ComponentOptionsMixin, Extends extends ComponentOptionsMixin = ComponentOptionsMixin, E extends EmitsOptions = EmitsOptions, EE extends string = string, I extends ComponentInjectOptions = {}, II extends string = string, Props = Prettify<Readonly<ExtractPropTypes<PropsOptions> & EmitsToProps<E>>>, Defaults = ExtractDefaultPropTypes<PropsOptions>> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E, EE, Defaults, I, II> & {
|
|
549
541
|
props: PropsOptions & ThisType<void>;
|
|
550
542
|
} & ThisType<CreateComponentPublicInstance<Props, RawBindings, D, C, M, Mixin, Extends, E, Props, Defaults, false, I>>;
|
|
551
543
|
export type ComponentOptions<Props = {}, RawBindings = any, D = any, C extends ComputedOptions = any, M extends MethodOptions = any, Mixin extends ComponentOptionsMixin = any, Extends extends ComponentOptionsMixin = any, E extends EmitsOptions = any> = ComponentOptionsBase<Props, RawBindings, D, C, M, Mixin, Extends, E> & ThisType<CreateComponentPublicInstance<{}, RawBindings, D, C, M, Mixin, Extends, E, Readonly<Props>>>;
|
|
@@ -960,7 +952,7 @@ declare let vnodeArgsTransformer: ((args: Parameters<typeof _createVNode>, insta
|
|
|
960
952
|
* typings
|
|
961
953
|
*/
|
|
962
954
|
declare function transformVNodeArgs(transformer?: typeof vnodeArgsTransformer): void;
|
|
963
|
-
declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number
|
|
955
|
+
declare function createBaseVNode(type: VNodeTypes | ClassComponent | typeof NULL_DYNAMIC_COMPONENT, props?: (Data & VNodeProps) | null, children?: unknown, patchFlag?: number, dynamicProps?: string[] | null, shapeFlag?: number, isBlockNode?: boolean, needFullChildrenNormalization?: boolean): VNode<RendererNode, RendererElement, {
|
|
964
956
|
[key: string]: any;
|
|
965
957
|
}>;
|
|
966
958
|
|
|
@@ -1218,13 +1210,15 @@ declare function defineAsyncComponent<T extends Component = {
|
|
|
1218
1210
|
* This is only usable inside `<script setup>`, is compiled away in the
|
|
1219
1211
|
* output and should **not** be actually called at runtime.
|
|
1220
1212
|
*/
|
|
1221
|
-
declare function defineProps<PropNames extends string = string>(props: PropNames[]): Readonly<{
|
|
1213
|
+
declare function defineProps<PropNames extends string = string>(props: PropNames[]): Prettify<Readonly<{
|
|
1222
1214
|
[key in PropNames]?: any;
|
|
1223
|
-
}
|
|
1224
|
-
declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Readonly<ExtractPropTypes<PP
|
|
1225
|
-
declare function defineProps<TypeProps>():
|
|
1226
|
-
|
|
1227
|
-
|
|
1215
|
+
}>>;
|
|
1216
|
+
declare function defineProps<PP extends ComponentObjectPropsOptions = ComponentObjectPropsOptions>(props: PP): Prettify<Readonly<ExtractPropTypes<PP>>>;
|
|
1217
|
+
declare function defineProps<TypeProps>(): ResolveProps<TypeProps>;
|
|
1218
|
+
export type ResolveProps<T, BooleanKeys extends keyof T = BooleanKey<T>> = Prettify<Readonly<T & {
|
|
1219
|
+
[K in BooleanKeys]-?: boolean;
|
|
1220
|
+
}>>;
|
|
1221
|
+
export type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never;
|
|
1228
1222
|
/**
|
|
1229
1223
|
* Vue `<script setup>` compiler macro for declaring a component's emitted
|
|
1230
1224
|
* events. The expected argument is the same as the component `emits` option.
|
|
@@ -1265,7 +1259,6 @@ declare function defineEmits<TypeEmit>(): TypeEmit;
|
|
|
1265
1259
|
*/
|
|
1266
1260
|
declare function defineExpose<Exposed extends Record<string, any> = Record<string, any>>(exposed?: Exposed): void;
|
|
1267
1261
|
export type NotUndefined<T> = T extends undefined ? never : T;
|
|
1268
|
-
export type BooleanKey<T, K extends keyof T = keyof T> = K extends any ? [T[K]] extends [boolean | undefined] ? K : never : never;
|
|
1269
1262
|
export type InferDefaults<T> = {
|
|
1270
1263
|
[K in keyof T]?: InferDefault<T, NotUndefined<T[K]>>;
|
|
1271
1264
|
};
|
|
@@ -21,7 +21,7 @@ function warn(msg, ...args) {
|
|
|
21
21
|
callWithErrorHandling(
|
|
22
22
|
appWarnHandler,
|
|
23
23
|
instance,
|
|
24
|
-
|
|
24
|
+
11,
|
|
25
25
|
[
|
|
26
26
|
msg + args.join(""),
|
|
27
27
|
instance && instance.proxy,
|
|
@@ -136,21 +136,21 @@ const ErrorTypeStrings = {
|
|
|
136
136
|
["ec"]: "errorCaptured hook",
|
|
137
137
|
["rtc"]: "renderTracked hook",
|
|
138
138
|
["rtg"]: "renderTriggered hook",
|
|
139
|
-
[
|
|
140
|
-
[
|
|
141
|
-
[
|
|
142
|
-
[
|
|
143
|
-
[
|
|
144
|
-
[
|
|
145
|
-
[
|
|
146
|
-
[
|
|
147
|
-
[
|
|
148
|
-
[
|
|
149
|
-
[
|
|
150
|
-
[
|
|
151
|
-
[
|
|
152
|
-
[
|
|
153
|
-
[
|
|
139
|
+
[0]: "setup function",
|
|
140
|
+
[1]: "render function",
|
|
141
|
+
[2]: "watcher getter",
|
|
142
|
+
[3]: "watcher callback",
|
|
143
|
+
[4]: "watcher cleanup function",
|
|
144
|
+
[5]: "native event handler",
|
|
145
|
+
[6]: "component event handler",
|
|
146
|
+
[7]: "vnode hook",
|
|
147
|
+
[8]: "directive hook",
|
|
148
|
+
[9]: "transition hook",
|
|
149
|
+
[10]: "app errorHandler",
|
|
150
|
+
[11]: "app warnHandler",
|
|
151
|
+
[12]: "ref function",
|
|
152
|
+
[13]: "async component loader",
|
|
153
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://new-issue.vuejs.org/?repo=vuejs/core"
|
|
154
154
|
};
|
|
155
155
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
156
156
|
let res;
|
|
@@ -199,7 +199,7 @@ function handleError(err, instance, type, throwInDev = true) {
|
|
|
199
199
|
callWithErrorHandling(
|
|
200
200
|
appErrorHandler,
|
|
201
201
|
null,
|
|
202
|
-
|
|
202
|
+
10,
|
|
203
203
|
[err, exposedInstance, errorInfo]
|
|
204
204
|
);
|
|
205
205
|
return;
|
|
@@ -354,7 +354,7 @@ function flushJobs(seen) {
|
|
|
354
354
|
if (process.env.NODE_ENV !== "production" && check(job)) {
|
|
355
355
|
continue;
|
|
356
356
|
}
|
|
357
|
-
callWithErrorHandling(job, null,
|
|
357
|
+
callWithErrorHandling(job, null, 14);
|
|
358
358
|
}
|
|
359
359
|
}
|
|
360
360
|
} finally {
|
|
@@ -662,7 +662,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
662
662
|
callWithAsyncErrorHandling(
|
|
663
663
|
handler,
|
|
664
664
|
instance,
|
|
665
|
-
|
|
665
|
+
6,
|
|
666
666
|
args
|
|
667
667
|
);
|
|
668
668
|
}
|
|
@@ -677,7 +677,7 @@ function emit(instance, event, ...rawArgs) {
|
|
|
677
677
|
callWithAsyncErrorHandling(
|
|
678
678
|
onceHandler,
|
|
679
679
|
instance,
|
|
680
|
-
|
|
680
|
+
6,
|
|
681
681
|
args
|
|
682
682
|
);
|
|
683
683
|
}
|
|
@@ -848,7 +848,7 @@ function renderComponentRoot(instance) {
|
|
|
848
848
|
}
|
|
849
849
|
} catch (err) {
|
|
850
850
|
blockStack.length = 0;
|
|
851
|
-
handleError(err, instance,
|
|
851
|
+
handleError(err, instance, 1);
|
|
852
852
|
result = createVNode(Comment);
|
|
853
853
|
}
|
|
854
854
|
let root = result;
|
|
@@ -1359,7 +1359,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1359
1359
|
if (delayEnter) {
|
|
1360
1360
|
activeBranch.transition.afterLeave = () => {
|
|
1361
1361
|
if (pendingId === suspense.pendingId) {
|
|
1362
|
-
move(pendingBranch, container2, anchor2,
|
|
1362
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
1363
1363
|
}
|
|
1364
1364
|
};
|
|
1365
1365
|
}
|
|
@@ -1369,7 +1369,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1369
1369
|
unmount(activeBranch, parentComponent2, suspense, true);
|
|
1370
1370
|
}
|
|
1371
1371
|
if (!delayEnter) {
|
|
1372
|
-
move(pendingBranch, container2, anchor2,
|
|
1372
|
+
move(pendingBranch, container2, anchor2, 0);
|
|
1373
1373
|
}
|
|
1374
1374
|
}
|
|
1375
1375
|
setActiveBranch(suspense, pendingBranch);
|
|
@@ -1447,7 +1447,7 @@ function createSuspenseBoundary(vnode, parent, parentComponent, container, hidde
|
|
|
1447
1447
|
}
|
|
1448
1448
|
const hydratedEl = instance.vnode.el;
|
|
1449
1449
|
instance.asyncDep.catch((err) => {
|
|
1450
|
-
handleError(err, instance,
|
|
1450
|
+
handleError(err, instance, 0);
|
|
1451
1451
|
}).then((asyncSetupResult) => {
|
|
1452
1452
|
if (instance.isUnmounted || suspense.isUnmounted || suspense.pendingId !== instance.suspenseId) {
|
|
1453
1453
|
return;
|
|
@@ -1691,14 +1691,14 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1691
1691
|
} else if (isReactive(s)) {
|
|
1692
1692
|
return traverse(s);
|
|
1693
1693
|
} else if (isFunction(s)) {
|
|
1694
|
-
return callWithErrorHandling(s, instance,
|
|
1694
|
+
return callWithErrorHandling(s, instance, 2);
|
|
1695
1695
|
} else {
|
|
1696
1696
|
process.env.NODE_ENV !== "production" && warnInvalidSource(s);
|
|
1697
1697
|
}
|
|
1698
1698
|
});
|
|
1699
1699
|
} else if (isFunction(source)) {
|
|
1700
1700
|
if (cb) {
|
|
1701
|
-
getter = () => callWithErrorHandling(source, instance,
|
|
1701
|
+
getter = () => callWithErrorHandling(source, instance, 2);
|
|
1702
1702
|
} else {
|
|
1703
1703
|
getter = () => {
|
|
1704
1704
|
if (instance && instance.isUnmounted) {
|
|
@@ -1710,7 +1710,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1710
1710
|
return callWithAsyncErrorHandling(
|
|
1711
1711
|
source,
|
|
1712
1712
|
instance,
|
|
1713
|
-
|
|
1713
|
+
3,
|
|
1714
1714
|
[onCleanup]
|
|
1715
1715
|
);
|
|
1716
1716
|
};
|
|
@@ -1726,7 +1726,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1726
1726
|
let cleanup;
|
|
1727
1727
|
let onCleanup = (fn) => {
|
|
1728
1728
|
cleanup = effect.onStop = () => {
|
|
1729
|
-
callWithErrorHandling(fn, instance,
|
|
1729
|
+
callWithErrorHandling(fn, instance, 4);
|
|
1730
1730
|
};
|
|
1731
1731
|
};
|
|
1732
1732
|
let ssrCleanup;
|
|
@@ -1735,7 +1735,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1735
1735
|
if (!cb) {
|
|
1736
1736
|
getter();
|
|
1737
1737
|
} else if (immediate) {
|
|
1738
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1738
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1739
1739
|
getter(),
|
|
1740
1740
|
isMultiSource ? [] : void 0,
|
|
1741
1741
|
onCleanup
|
|
@@ -1761,7 +1761,7 @@ function doWatch(source, cb, { immediate, deep, flush, onTrack, onTrigger } = EM
|
|
|
1761
1761
|
if (cleanup) {
|
|
1762
1762
|
cleanup();
|
|
1763
1763
|
}
|
|
1764
|
-
callWithAsyncErrorHandling(cb, instance,
|
|
1764
|
+
callWithAsyncErrorHandling(cb, instance, 3, [
|
|
1765
1765
|
newValue,
|
|
1766
1766
|
// pass undefined as the old value when it's changed for the first time
|
|
1767
1767
|
oldValue === INITIAL_WATCHER_VALUE ? void 0 : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
|
|
@@ -2040,7 +2040,7 @@ function resolveTransitionHooks(vnode, props, state, instance) {
|
|
|
2040
2040
|
hook && callWithAsyncErrorHandling(
|
|
2041
2041
|
hook,
|
|
2042
2042
|
instance,
|
|
2043
|
-
|
|
2043
|
+
9,
|
|
2044
2044
|
args
|
|
2045
2045
|
);
|
|
2046
2046
|
};
|
|
@@ -2272,7 +2272,7 @@ function defineAsyncComponent(source) {
|
|
|
2272
2272
|
handleError(
|
|
2273
2273
|
err,
|
|
2274
2274
|
instance,
|
|
2275
|
-
|
|
2275
|
+
13,
|
|
2276
2276
|
!errorComponent
|
|
2277
2277
|
/* do not throw in dev if user provided error component */
|
|
2278
2278
|
);
|
|
@@ -2377,7 +2377,7 @@ const KeepAliveImpl = {
|
|
|
2377
2377
|
const storageContainer = createElement("div");
|
|
2378
2378
|
sharedContext.activate = (vnode, container, anchor, isSVG, optimized) => {
|
|
2379
2379
|
const instance2 = vnode.component;
|
|
2380
|
-
move(vnode, container, anchor,
|
|
2380
|
+
move(vnode, container, anchor, 0, parentSuspense);
|
|
2381
2381
|
patch(
|
|
2382
2382
|
instance2.vnode,
|
|
2383
2383
|
vnode,
|
|
@@ -2405,7 +2405,7 @@ const KeepAliveImpl = {
|
|
|
2405
2405
|
};
|
|
2406
2406
|
sharedContext.deactivate = (vnode) => {
|
|
2407
2407
|
const instance2 = vnode.component;
|
|
2408
|
-
move(vnode, storageContainer, null,
|
|
2408
|
+
move(vnode, storageContainer, null, 1, parentSuspense);
|
|
2409
2409
|
queuePostRenderEffect(() => {
|
|
2410
2410
|
if (instance2.da) {
|
|
2411
2411
|
invokeArrayFns(instance2.da);
|
|
@@ -2684,7 +2684,7 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
2684
2684
|
let hook = binding.dir[name];
|
|
2685
2685
|
if (hook) {
|
|
2686
2686
|
pauseTracking();
|
|
2687
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
2687
|
+
callWithAsyncErrorHandling(hook, instance, 8, [
|
|
2688
2688
|
vnode.el,
|
|
2689
2689
|
binding,
|
|
2690
2690
|
vnode,
|
|
@@ -2700,7 +2700,7 @@ const DIRECTIVES = "directives";
|
|
|
2700
2700
|
function resolveComponent(name, maybeSelfReference) {
|
|
2701
2701
|
return resolveAsset(COMPONENTS, name, true, maybeSelfReference) || name;
|
|
2702
2702
|
}
|
|
2703
|
-
const NULL_DYNAMIC_COMPONENT = Symbol();
|
|
2703
|
+
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2704
2704
|
function resolveDynamicComponent(component) {
|
|
2705
2705
|
if (isString(component)) {
|
|
2706
2706
|
return resolveAsset(COMPONENTS, component, false) || component;
|
|
@@ -4233,7 +4233,7 @@ function setRef(rawRef, oldRawRef, parentSuspense, vnode, isUnmount = false) {
|
|
|
4233
4233
|
}
|
|
4234
4234
|
}
|
|
4235
4235
|
if (isFunction(ref)) {
|
|
4236
|
-
callWithErrorHandling(ref, owner,
|
|
4236
|
+
callWithErrorHandling(ref, owner, 12, [value, refs]);
|
|
4237
4237
|
} else {
|
|
4238
4238
|
const _isString = isString(ref);
|
|
4239
4239
|
const _isRef = isRef(ref);
|
|
@@ -5902,7 +5902,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5902
5902
|
);
|
|
5903
5903
|
} else if (moved) {
|
|
5904
5904
|
if (j < 0 || i !== increasingNewIndexSequence[j]) {
|
|
5905
|
-
move(nextChild, container, anchor,
|
|
5905
|
+
move(nextChild, container, anchor, 2);
|
|
5906
5906
|
} else {
|
|
5907
5907
|
j--;
|
|
5908
5908
|
}
|
|
@@ -5936,9 +5936,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5936
5936
|
moveStaticNode(vnode, container, anchor);
|
|
5937
5937
|
return;
|
|
5938
5938
|
}
|
|
5939
|
-
const needTransition = moveType !==
|
|
5939
|
+
const needTransition = moveType !== 2 && shapeFlag & 1 && transition;
|
|
5940
5940
|
if (needTransition) {
|
|
5941
|
-
if (moveType ===
|
|
5941
|
+
if (moveType === 0) {
|
|
5942
5942
|
transition.beforeEnter(el);
|
|
5943
5943
|
hostInsert(el, container, anchor);
|
|
5944
5944
|
queuePostRenderEffect(() => transition.enter(el), parentSuspense);
|
|
@@ -6336,7 +6336,7 @@ const TeleportImpl = {
|
|
|
6336
6336
|
container,
|
|
6337
6337
|
mainAnchor,
|
|
6338
6338
|
internals,
|
|
6339
|
-
|
|
6339
|
+
1
|
|
6340
6340
|
);
|
|
6341
6341
|
}
|
|
6342
6342
|
} else {
|
|
@@ -6351,7 +6351,7 @@ const TeleportImpl = {
|
|
|
6351
6351
|
nextTarget,
|
|
6352
6352
|
null,
|
|
6353
6353
|
internals,
|
|
6354
|
-
|
|
6354
|
+
0
|
|
6355
6355
|
);
|
|
6356
6356
|
} else if (process.env.NODE_ENV !== "production") {
|
|
6357
6357
|
warn(
|
|
@@ -6366,7 +6366,7 @@ const TeleportImpl = {
|
|
|
6366
6366
|
target,
|
|
6367
6367
|
targetAnchor,
|
|
6368
6368
|
internals,
|
|
6369
|
-
|
|
6369
|
+
1
|
|
6370
6370
|
);
|
|
6371
6371
|
}
|
|
6372
6372
|
}
|
|
@@ -6397,12 +6397,12 @@ const TeleportImpl = {
|
|
|
6397
6397
|
move: moveTeleport,
|
|
6398
6398
|
hydrate: hydrateTeleport
|
|
6399
6399
|
};
|
|
6400
|
-
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType =
|
|
6401
|
-
if (moveType ===
|
|
6400
|
+
function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }, moveType = 2) {
|
|
6401
|
+
if (moveType === 0) {
|
|
6402
6402
|
insert(vnode.targetAnchor, container, parentAnchor);
|
|
6403
6403
|
}
|
|
6404
6404
|
const { el, anchor, shapeFlag, children, props } = vnode;
|
|
6405
|
-
const isReorder = moveType ===
|
|
6405
|
+
const isReorder = moveType === 2;
|
|
6406
6406
|
if (isReorder) {
|
|
6407
6407
|
insert(el, container, parentAnchor);
|
|
6408
6408
|
}
|
|
@@ -6413,7 +6413,7 @@ function moveTeleport(vnode, container, parentAnchor, { o: { insert }, m: move }
|
|
|
6413
6413
|
children[i],
|
|
6414
6414
|
container,
|
|
6415
6415
|
parentAnchor,
|
|
6416
|
-
|
|
6416
|
+
2
|
|
6417
6417
|
);
|
|
6418
6418
|
}
|
|
6419
6419
|
}
|
|
@@ -6483,10 +6483,10 @@ function updateCssVars(vnode) {
|
|
|
6483
6483
|
}
|
|
6484
6484
|
}
|
|
6485
6485
|
|
|
6486
|
-
const Fragment = Symbol(
|
|
6487
|
-
const Text = Symbol(
|
|
6488
|
-
const Comment = Symbol(
|
|
6489
|
-
const Static = Symbol(
|
|
6486
|
+
const Fragment = Symbol.for("v-fgt");
|
|
6487
|
+
const Text = Symbol.for("v-txt");
|
|
6488
|
+
const Comment = Symbol.for("v-cmt");
|
|
6489
|
+
const Static = Symbol.for("v-stc");
|
|
6490
6490
|
const blockStack = [];
|
|
6491
6491
|
let currentBlock = null;
|
|
6492
6492
|
function openBlock(disableTracking = false) {
|
|
@@ -6841,7 +6841,7 @@ function mergeProps(...args) {
|
|
|
6841
6841
|
return ret;
|
|
6842
6842
|
}
|
|
6843
6843
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
6844
|
-
callWithAsyncErrorHandling(hook, instance,
|
|
6844
|
+
callWithAsyncErrorHandling(hook, instance, 7, [
|
|
6845
6845
|
vnode,
|
|
6846
6846
|
prevVNode
|
|
6847
6847
|
]);
|
|
@@ -6940,13 +6940,29 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
6940
6940
|
}
|
|
6941
6941
|
let currentInstance = null;
|
|
6942
6942
|
const getCurrentInstance = () => currentInstance || currentRenderingInstance;
|
|
6943
|
+
let internalSetCurrentInstance;
|
|
6944
|
+
let globalCurrentInstanceSetters;
|
|
6945
|
+
let settersKey = "__VUE_INSTANCE_SETTERS__";
|
|
6946
|
+
{
|
|
6947
|
+
if (!(globalCurrentInstanceSetters = getGlobalThis()[settersKey])) {
|
|
6948
|
+
globalCurrentInstanceSetters = getGlobalThis()[settersKey] = [];
|
|
6949
|
+
}
|
|
6950
|
+
globalCurrentInstanceSetters.push((i) => currentInstance = i);
|
|
6951
|
+
internalSetCurrentInstance = (instance) => {
|
|
6952
|
+
if (globalCurrentInstanceSetters.length > 1) {
|
|
6953
|
+
globalCurrentInstanceSetters.forEach((s) => s(instance));
|
|
6954
|
+
} else {
|
|
6955
|
+
globalCurrentInstanceSetters[0](instance);
|
|
6956
|
+
}
|
|
6957
|
+
};
|
|
6958
|
+
}
|
|
6943
6959
|
const setCurrentInstance = (instance) => {
|
|
6944
|
-
|
|
6960
|
+
internalSetCurrentInstance(instance);
|
|
6945
6961
|
instance.scope.on();
|
|
6946
6962
|
};
|
|
6947
6963
|
const unsetCurrentInstance = () => {
|
|
6948
6964
|
currentInstance && currentInstance.scope.off();
|
|
6949
|
-
|
|
6965
|
+
internalSetCurrentInstance(null);
|
|
6950
6966
|
};
|
|
6951
6967
|
const isBuiltInTag = /* @__PURE__ */ makeMap("slot,component");
|
|
6952
6968
|
function validateComponentName(name, config) {
|
|
@@ -7009,7 +7025,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7009
7025
|
const setupResult = callWithErrorHandling(
|
|
7010
7026
|
setup,
|
|
7011
7027
|
instance,
|
|
7012
|
-
|
|
7028
|
+
0,
|
|
7013
7029
|
[process.env.NODE_ENV !== "production" ? shallowReadonly(instance.props) : instance.props, setupContext]
|
|
7014
7030
|
);
|
|
7015
7031
|
resetTracking();
|
|
@@ -7020,7 +7036,7 @@ function setupStatefulComponent(instance, isSSR) {
|
|
|
7020
7036
|
return setupResult.then((resolvedResult) => {
|
|
7021
7037
|
handleSetupResult(instance, resolvedResult, isSSR);
|
|
7022
7038
|
}).catch((e) => {
|
|
7023
|
-
handleError(e, instance,
|
|
7039
|
+
handleError(e, instance, 0);
|
|
7024
7040
|
});
|
|
7025
7041
|
} else {
|
|
7026
7042
|
instance.asyncDep = setupResult;
|
|
@@ -7362,7 +7378,7 @@ function h(type, propsOrChildren, children) {
|
|
|
7362
7378
|
}
|
|
7363
7379
|
}
|
|
7364
7380
|
|
|
7365
|
-
const ssrContextKey = Symbol(
|
|
7381
|
+
const ssrContextKey = Symbol.for("v-scx");
|
|
7366
7382
|
const useSSRContext = () => {
|
|
7367
7383
|
{
|
|
7368
7384
|
const ctx = inject(ssrContextKey);
|
|
@@ -7580,7 +7596,7 @@ function isMemoSame(cached, memo) {
|
|
|
7580
7596
|
return true;
|
|
7581
7597
|
}
|
|
7582
7598
|
|
|
7583
|
-
const version = "3.3.0-alpha.
|
|
7599
|
+
const version = "3.3.0-alpha.5";
|
|
7584
7600
|
const _ssrUtils = {
|
|
7585
7601
|
createComponentInstance,
|
|
7586
7602
|
setupComponent,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.3.0-alpha.
|
|
3
|
+
"version": "3.3.0-alpha.5",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
},
|
|
33
33
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@vue/shared": "3.3.0-alpha.
|
|
36
|
-
"@vue/reactivity": "3.3.0-alpha.
|
|
35
|
+
"@vue/shared": "3.3.0-alpha.5",
|
|
36
|
+
"@vue/reactivity": "3.3.0-alpha.5"
|
|
37
37
|
}
|
|
38
38
|
}
|