@vue/runtime-core 3.4.26 → 3.5.0-alpha.2
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 +118 -74
- package/dist/runtime-core.cjs.prod.js +100 -60
- package/dist/runtime-core.d.ts +511 -389
- package/dist/runtime-core.esm-bundler.js +121 -77
- package/package.json +3 -3
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.
|
|
2
|
+
* @vue/runtime-core v3.5.0-alpha.2
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
|
-
import { pauseTracking, resetTracking, isRef, toRaw, shallowReadonly, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';
|
|
6
|
+
import { pauseTracking, resetTracking, isRef, toRaw, shallowReadonly, isShallow, isReactive, ReactiveEffect, getCurrentScope, ref, shallowReadArray, toReactive, track, reactive, shallowReactive, trigger, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1, customRef, isReadonly } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
8
|
import { isString, isFunction, isPromise, isArray, NOOP, getGlobalThis, extend, EMPTY_OBJ, toHandlerKey, looseToNumber, hyphenate, camelize, isObject, isOn, hasOwn, isModelListener, capitalize, toNumber, hasChanged, remove, isSet, isMap, isPlainObject, isBuiltInDirective, invokeArrayFns, isRegExp, isGloballyAllowed, NO, isReservedProp, EMPTY_ARR, toRawType, makeMap, def, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
@@ -157,7 +157,9 @@ const ErrorCodes = {
|
|
|
157
157
|
"ASYNC_COMPONENT_LOADER": 13,
|
|
158
158
|
"13": "ASYNC_COMPONENT_LOADER",
|
|
159
159
|
"SCHEDULER": 14,
|
|
160
|
-
"14": "SCHEDULER"
|
|
160
|
+
"14": "SCHEDULER",
|
|
161
|
+
"APP_UNMOUNT_CLEANUP": 15,
|
|
162
|
+
"15": "APP_UNMOUNT_CLEANUP"
|
|
161
163
|
};
|
|
162
164
|
const ErrorTypeStrings$1 = {
|
|
163
165
|
["sp"]: "serverPrefetch hook",
|
|
@@ -188,7 +190,8 @@ const ErrorTypeStrings$1 = {
|
|
|
188
190
|
[11]: "app warnHandler",
|
|
189
191
|
[12]: "ref function",
|
|
190
192
|
[13]: "async component loader",
|
|
191
|
-
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core ."
|
|
193
|
+
[14]: "scheduler flush. This is likely a Vue internals bug. Please open an issue at https://github.com/vuejs/core .",
|
|
194
|
+
[15]: "app unmount cleanup function"
|
|
192
195
|
};
|
|
193
196
|
function callWithErrorHandling(fn, instance, type, args) {
|
|
194
197
|
try {
|
|
@@ -292,7 +295,7 @@ function findInsertionIndex(id) {
|
|
|
292
295
|
const middle = start + end >>> 1;
|
|
293
296
|
const middleJob = queue[middle];
|
|
294
297
|
const middleJobId = getId(middleJob);
|
|
295
|
-
if (middleJobId < id || middleJobId === id && middleJob.
|
|
298
|
+
if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
|
|
296
299
|
start = middle + 1;
|
|
297
300
|
} else {
|
|
298
301
|
end = middle;
|
|
@@ -301,15 +304,21 @@ function findInsertionIndex(id) {
|
|
|
301
304
|
return start;
|
|
302
305
|
}
|
|
303
306
|
function queueJob(job) {
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
isFlushing && job.allowRecurse ? flushIndex + 1 : flushIndex
|
|
307
|
-
)) {
|
|
307
|
+
var _a;
|
|
308
|
+
if (!(job.flags & 1)) {
|
|
308
309
|
if (job.id == null) {
|
|
309
310
|
queue.push(job);
|
|
311
|
+
} else if (
|
|
312
|
+
// fast path when the job id is larger than the tail
|
|
313
|
+
!(job.flags & 2) && job.id >= (((_a = queue[queue.length - 1]) == null ? void 0 : _a.id) || 0)
|
|
314
|
+
) {
|
|
315
|
+
queue.push(job);
|
|
310
316
|
} else {
|
|
311
317
|
queue.splice(findInsertionIndex(job.id), 0, job);
|
|
312
318
|
}
|
|
319
|
+
if (!(job.flags & 4)) {
|
|
320
|
+
job.flags |= 1;
|
|
321
|
+
}
|
|
313
322
|
queueFlush();
|
|
314
323
|
}
|
|
315
324
|
}
|
|
@@ -327,11 +336,11 @@ function invalidateJob(job) {
|
|
|
327
336
|
}
|
|
328
337
|
function queuePostFlushCb(cb) {
|
|
329
338
|
if (!isArray(cb)) {
|
|
330
|
-
if (!
|
|
331
|
-
cb,
|
|
332
|
-
cb.allowRecurse ? postFlushIndex + 1 : postFlushIndex
|
|
333
|
-
)) {
|
|
339
|
+
if (!(cb.flags & 1)) {
|
|
334
340
|
pendingPostFlushCbs.push(cb);
|
|
341
|
+
if (!(cb.flags & 4)) {
|
|
342
|
+
cb.flags |= 1;
|
|
343
|
+
}
|
|
335
344
|
}
|
|
336
345
|
} else {
|
|
337
346
|
pendingPostFlushCbs.push(...cb);
|
|
@@ -344,7 +353,7 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
344
353
|
}
|
|
345
354
|
for (; i < queue.length; i++) {
|
|
346
355
|
const cb = queue[i];
|
|
347
|
-
if (cb && cb.
|
|
356
|
+
if (cb && cb.flags & 2) {
|
|
348
357
|
if (instance && cb.id !== instance.uid) {
|
|
349
358
|
continue;
|
|
350
359
|
}
|
|
@@ -354,6 +363,7 @@ function flushPreFlushCbs(instance, seen, i = isFlushing ? flushIndex + 1 : 0) {
|
|
|
354
363
|
queue.splice(i, 1);
|
|
355
364
|
i--;
|
|
356
365
|
cb();
|
|
366
|
+
cb.flags &= ~1;
|
|
357
367
|
}
|
|
358
368
|
}
|
|
359
369
|
}
|
|
@@ -376,6 +386,7 @@ function flushPostFlushCbs(seen) {
|
|
|
376
386
|
continue;
|
|
377
387
|
}
|
|
378
388
|
activePostFlushCbs[postFlushIndex]();
|
|
389
|
+
activePostFlushCbs[postFlushIndex].flags &= ~1;
|
|
379
390
|
}
|
|
380
391
|
activePostFlushCbs = null;
|
|
381
392
|
postFlushIndex = 0;
|
|
@@ -385,9 +396,11 @@ const getId = (job) => job.id == null ? Infinity : job.id;
|
|
|
385
396
|
const comparator = (a, b) => {
|
|
386
397
|
const diff = getId(a) - getId(b);
|
|
387
398
|
if (diff === 0) {
|
|
388
|
-
|
|
399
|
+
const isAPre = a.flags & 2;
|
|
400
|
+
const isBPre = b.flags & 2;
|
|
401
|
+
if (isAPre && !isBPre)
|
|
389
402
|
return -1;
|
|
390
|
-
if (
|
|
403
|
+
if (isBPre && !isAPre)
|
|
391
404
|
return 1;
|
|
392
405
|
}
|
|
393
406
|
return diff;
|
|
@@ -403,11 +416,12 @@ function flushJobs(seen) {
|
|
|
403
416
|
try {
|
|
404
417
|
for (flushIndex = 0; flushIndex < queue.length; flushIndex++) {
|
|
405
418
|
const job = queue[flushIndex];
|
|
406
|
-
if (job && job.
|
|
419
|
+
if (job && !(job.flags & 8)) {
|
|
407
420
|
if (!!(process.env.NODE_ENV !== "production") && check(job)) {
|
|
408
421
|
continue;
|
|
409
422
|
}
|
|
410
423
|
callWithErrorHandling(job, null, 14);
|
|
424
|
+
job.flags &= ~1;
|
|
411
425
|
}
|
|
412
426
|
}
|
|
413
427
|
} finally {
|
|
@@ -489,7 +503,6 @@ function rerender(id, newRender) {
|
|
|
489
503
|
}
|
|
490
504
|
instance.renderCache = [];
|
|
491
505
|
isHmrUpdating = true;
|
|
492
|
-
instance.effect.dirty = true;
|
|
493
506
|
instance.update();
|
|
494
507
|
isHmrUpdating = false;
|
|
495
508
|
});
|
|
@@ -517,7 +530,6 @@ function reload(id, newComp) {
|
|
|
517
530
|
instance.ceReload(newComp.styles);
|
|
518
531
|
hmrDirtyComponents.delete(oldComp);
|
|
519
532
|
} else if (instance.parent) {
|
|
520
|
-
instance.parent.effect.dirty = true;
|
|
521
533
|
queueJob(instance.parent.update);
|
|
522
534
|
} else if (instance.appContext.reload) {
|
|
523
535
|
instance.appContext.reload();
|
|
@@ -1942,8 +1954,8 @@ function doWatch(source, cb, {
|
|
|
1942
1954
|
}
|
|
1943
1955
|
}
|
|
1944
1956
|
let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
|
|
1945
|
-
const job = () => {
|
|
1946
|
-
if (!effect.
|
|
1957
|
+
const job = (immediateFirstRun) => {
|
|
1958
|
+
if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
|
|
1947
1959
|
return;
|
|
1948
1960
|
}
|
|
1949
1961
|
if (cb) {
|
|
@@ -1964,19 +1976,22 @@ function doWatch(source, cb, {
|
|
|
1964
1976
|
effect.run();
|
|
1965
1977
|
}
|
|
1966
1978
|
};
|
|
1967
|
-
|
|
1979
|
+
if (cb)
|
|
1980
|
+
job.flags |= 4;
|
|
1981
|
+
const effect = new ReactiveEffect(getter);
|
|
1968
1982
|
let scheduler;
|
|
1969
1983
|
if (flush === "sync") {
|
|
1984
|
+
effect.flags |= 64;
|
|
1970
1985
|
scheduler = job;
|
|
1971
1986
|
} else if (flush === "post") {
|
|
1972
1987
|
scheduler = () => queuePostRenderEffect(job, instance && instance.suspense);
|
|
1973
1988
|
} else {
|
|
1974
|
-
job.
|
|
1989
|
+
job.flags |= 2;
|
|
1975
1990
|
if (instance)
|
|
1976
1991
|
job.id = instance.uid;
|
|
1977
1992
|
scheduler = () => queueJob(job);
|
|
1978
1993
|
}
|
|
1979
|
-
|
|
1994
|
+
effect.scheduler = scheduler;
|
|
1980
1995
|
const scope = getCurrentScope();
|
|
1981
1996
|
const unwatch = () => {
|
|
1982
1997
|
effect.stop();
|
|
@@ -1990,7 +2005,7 @@ function doWatch(source, cb, {
|
|
|
1990
2005
|
}
|
|
1991
2006
|
if (cb) {
|
|
1992
2007
|
if (immediate) {
|
|
1993
|
-
job();
|
|
2008
|
+
job(true);
|
|
1994
2009
|
} else {
|
|
1995
2010
|
oldValue = effect.run();
|
|
1996
2011
|
}
|
|
@@ -2166,24 +2181,7 @@ const BaseTransitionImpl = {
|
|
|
2166
2181
|
if (!children || !children.length) {
|
|
2167
2182
|
return;
|
|
2168
2183
|
}
|
|
2169
|
-
|
|
2170
|
-
if (children.length > 1) {
|
|
2171
|
-
let hasFound = false;
|
|
2172
|
-
for (const c of children) {
|
|
2173
|
-
if (c.type !== Comment) {
|
|
2174
|
-
if (!!(process.env.NODE_ENV !== "production") && hasFound) {
|
|
2175
|
-
warn$1(
|
|
2176
|
-
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
2177
|
-
);
|
|
2178
|
-
break;
|
|
2179
|
-
}
|
|
2180
|
-
child = c;
|
|
2181
|
-
hasFound = true;
|
|
2182
|
-
if (!!!(process.env.NODE_ENV !== "production"))
|
|
2183
|
-
break;
|
|
2184
|
-
}
|
|
2185
|
-
}
|
|
2186
|
-
}
|
|
2184
|
+
const child = findNonCommentChild(children);
|
|
2187
2185
|
const rawProps = toRaw(props);
|
|
2188
2186
|
const { mode } = rawProps;
|
|
2189
2187
|
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") {
|
|
@@ -2192,7 +2190,7 @@ const BaseTransitionImpl = {
|
|
|
2192
2190
|
if (state.isLeaving) {
|
|
2193
2191
|
return emptyPlaceholder(child);
|
|
2194
2192
|
}
|
|
2195
|
-
const innerChild =
|
|
2193
|
+
const innerChild = getInnerChild$1(child);
|
|
2196
2194
|
if (!innerChild) {
|
|
2197
2195
|
return emptyPlaceholder(child);
|
|
2198
2196
|
}
|
|
@@ -2204,7 +2202,7 @@ const BaseTransitionImpl = {
|
|
|
2204
2202
|
);
|
|
2205
2203
|
setTransitionHooks(innerChild, enterHooks);
|
|
2206
2204
|
const oldChild = instance.subTree;
|
|
2207
|
-
const oldInnerChild = oldChild &&
|
|
2205
|
+
const oldInnerChild = oldChild && getInnerChild$1(oldChild);
|
|
2208
2206
|
if (oldInnerChild && oldInnerChild.type !== Comment && !isSameVNodeType(innerChild, oldInnerChild)) {
|
|
2209
2207
|
const leavingHooks = resolveTransitionHooks(
|
|
2210
2208
|
oldInnerChild,
|
|
@@ -2217,8 +2215,7 @@ const BaseTransitionImpl = {
|
|
|
2217
2215
|
state.isLeaving = true;
|
|
2218
2216
|
leavingHooks.afterLeave = () => {
|
|
2219
2217
|
state.isLeaving = false;
|
|
2220
|
-
if (instance.
|
|
2221
|
-
instance.effect.dirty = true;
|
|
2218
|
+
if (!(instance.job.flags & 8)) {
|
|
2222
2219
|
instance.update();
|
|
2223
2220
|
}
|
|
2224
2221
|
};
|
|
@@ -2243,6 +2240,27 @@ const BaseTransitionImpl = {
|
|
|
2243
2240
|
};
|
|
2244
2241
|
}
|
|
2245
2242
|
};
|
|
2243
|
+
function findNonCommentChild(children) {
|
|
2244
|
+
let child = children[0];
|
|
2245
|
+
if (children.length > 1) {
|
|
2246
|
+
let hasFound = false;
|
|
2247
|
+
for (const c of children) {
|
|
2248
|
+
if (c.type !== Comment) {
|
|
2249
|
+
if (!!(process.env.NODE_ENV !== "production") && hasFound) {
|
|
2250
|
+
warn$1(
|
|
2251
|
+
"<transition> can only be used on a single element or component. Use <transition-group> for lists."
|
|
2252
|
+
);
|
|
2253
|
+
break;
|
|
2254
|
+
}
|
|
2255
|
+
child = c;
|
|
2256
|
+
hasFound = true;
|
|
2257
|
+
if (!!!(process.env.NODE_ENV !== "production"))
|
|
2258
|
+
break;
|
|
2259
|
+
}
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
return child;
|
|
2263
|
+
}
|
|
2246
2264
|
const BaseTransition = BaseTransitionImpl;
|
|
2247
2265
|
function getLeavingNodesForType(state, vnode) {
|
|
2248
2266
|
const { leavingVNodes } = state;
|
|
@@ -2397,8 +2415,11 @@ function emptyPlaceholder(vnode) {
|
|
|
2397
2415
|
return vnode;
|
|
2398
2416
|
}
|
|
2399
2417
|
}
|
|
2400
|
-
function
|
|
2418
|
+
function getInnerChild$1(vnode) {
|
|
2401
2419
|
if (!isKeepAlive(vnode)) {
|
|
2420
|
+
if (isTeleport(vnode.type) && vnode.children) {
|
|
2421
|
+
return findNonCommentChild(vnode.children);
|
|
2422
|
+
}
|
|
2402
2423
|
return vnode;
|
|
2403
2424
|
}
|
|
2404
2425
|
if (!!(process.env.NODE_ENV !== "production") && vnode.component) {
|
|
@@ -2567,7 +2588,6 @@ function defineAsyncComponent(source) {
|
|
|
2567
2588
|
load().then(() => {
|
|
2568
2589
|
loaded.value = true;
|
|
2569
2590
|
if (instance.parent && isKeepAlive(instance.parent.vnode)) {
|
|
2570
|
-
instance.parent.effect.dirty = true;
|
|
2571
2591
|
queueJob(instance.parent.update);
|
|
2572
2592
|
}
|
|
2573
2593
|
}).catch((err) => {
|
|
@@ -2898,10 +2918,20 @@ function onErrorCaptured(hook, target = currentInstance) {
|
|
|
2898
2918
|
function renderList(source, renderItem, cache, index) {
|
|
2899
2919
|
let ret;
|
|
2900
2920
|
const cached = cache && cache[index];
|
|
2901
|
-
|
|
2921
|
+
const sourceIsArray = isArray(source);
|
|
2922
|
+
const sourceIsReactiveArray = sourceIsArray && isReactive(source);
|
|
2923
|
+
if (sourceIsArray || isString(source)) {
|
|
2924
|
+
if (sourceIsReactiveArray) {
|
|
2925
|
+
source = shallowReadArray(source);
|
|
2926
|
+
}
|
|
2902
2927
|
ret = new Array(source.length);
|
|
2903
2928
|
for (let i = 0, l = source.length; i < l; i++) {
|
|
2904
|
-
ret[i] = renderItem(
|
|
2929
|
+
ret[i] = renderItem(
|
|
2930
|
+
sourceIsReactiveArray ? toReactive(source[i]) : source[i],
|
|
2931
|
+
i,
|
|
2932
|
+
void 0,
|
|
2933
|
+
cached && cached[i]
|
|
2934
|
+
);
|
|
2905
2935
|
}
|
|
2906
2936
|
} else if (typeof source === "number") {
|
|
2907
2937
|
if (!!(process.env.NODE_ENV !== "production") && !Number.isInteger(source)) {
|
|
@@ -3036,7 +3066,6 @@ const publicPropertiesMap = (
|
|
|
3036
3066
|
$emit: (i) => i.emit,
|
|
3037
3067
|
$options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
|
|
3038
3068
|
$forceUpdate: (i) => i.f || (i.f = () => {
|
|
3039
|
-
i.effect.dirty = true;
|
|
3040
3069
|
queueJob(i.update);
|
|
3041
3070
|
}),
|
|
3042
3071
|
$nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
|
|
@@ -3833,6 +3862,7 @@ function createAppAPI(render, hydrate) {
|
|
|
3833
3862
|
}
|
|
3834
3863
|
const context = createAppContext();
|
|
3835
3864
|
const installedPlugins = /* @__PURE__ */ new WeakSet();
|
|
3865
|
+
const pluginCleanupFns = [];
|
|
3836
3866
|
let isMounted = false;
|
|
3837
3867
|
const app = context.app = {
|
|
3838
3868
|
_uid: uid$1++,
|
|
@@ -3952,8 +3982,21 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
3952
3982
|
);
|
|
3953
3983
|
}
|
|
3954
3984
|
},
|
|
3985
|
+
onUnmount(cleanupFn) {
|
|
3986
|
+
if (!!(process.env.NODE_ENV !== "production") && typeof cleanupFn !== "function") {
|
|
3987
|
+
warn$1(
|
|
3988
|
+
`Expected function as first argument to app.onUnmount(), but got ${typeof cleanupFn}`
|
|
3989
|
+
);
|
|
3990
|
+
}
|
|
3991
|
+
pluginCleanupFns.push(cleanupFn);
|
|
3992
|
+
},
|
|
3955
3993
|
unmount() {
|
|
3956
3994
|
if (isMounted) {
|
|
3995
|
+
callWithAsyncErrorHandling(
|
|
3996
|
+
pluginCleanupFns,
|
|
3997
|
+
app._instance,
|
|
3998
|
+
15
|
|
3999
|
+
);
|
|
3957
4000
|
render(null, app._container);
|
|
3958
4001
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) {
|
|
3959
4002
|
app._instance = null;
|
|
@@ -4373,7 +4416,9 @@ const isSimpleType = /* @__PURE__ */ makeMap(
|
|
|
4373
4416
|
function assertType(value, type) {
|
|
4374
4417
|
let valid;
|
|
4375
4418
|
const expectedType = getType(type);
|
|
4376
|
-
if (
|
|
4419
|
+
if (expectedType === "null") {
|
|
4420
|
+
valid = value === null;
|
|
4421
|
+
} else if (isSimpleType(expectedType)) {
|
|
4377
4422
|
const t = typeof value;
|
|
4378
4423
|
valid = t === expectedType.toLowerCase();
|
|
4379
4424
|
if (!valid && t === "object") {
|
|
@@ -4383,8 +4428,6 @@ function assertType(value, type) {
|
|
|
4383
4428
|
valid = isObject(value);
|
|
4384
4429
|
} else if (expectedType === "Array") {
|
|
4385
4430
|
valid = isArray(value);
|
|
4386
|
-
} else if (expectedType === "null") {
|
|
4387
|
-
valid = value === null;
|
|
4388
4431
|
} else {
|
|
4389
4432
|
valid = value instanceof type;
|
|
4390
4433
|
}
|
|
@@ -5956,7 +5999,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5956
5999
|
} else {
|
|
5957
6000
|
instance.next = n2;
|
|
5958
6001
|
invalidateJob(instance.update);
|
|
5959
|
-
instance.effect.dirty = true;
|
|
5960
6002
|
instance.update();
|
|
5961
6003
|
}
|
|
5962
6004
|
} else {
|
|
@@ -6139,24 +6181,18 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6139
6181
|
}
|
|
6140
6182
|
}
|
|
6141
6183
|
};
|
|
6142
|
-
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
|
|
6146
|
-
|
|
6147
|
-
|
|
6148
|
-
);
|
|
6149
|
-
const update = instance.update = () => {
|
|
6150
|
-
if (effect.dirty) {
|
|
6151
|
-
effect.run();
|
|
6152
|
-
}
|
|
6153
|
-
};
|
|
6154
|
-
update.id = instance.uid;
|
|
6184
|
+
instance.scope.on();
|
|
6185
|
+
const effect = instance.effect = new ReactiveEffect(componentUpdateFn);
|
|
6186
|
+
instance.scope.off();
|
|
6187
|
+
const update = instance.update = effect.run.bind(effect);
|
|
6188
|
+
const job = instance.job = effect.runIfDirty.bind(effect);
|
|
6189
|
+
job.id = instance.uid;
|
|
6190
|
+
effect.scheduler = () => queueJob(job);
|
|
6155
6191
|
toggleRecurse(instance, true);
|
|
6156
6192
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
6157
6193
|
effect.onTrack = instance.rtc ? (e) => invokeArrayFns(instance.rtc, e) : void 0;
|
|
6158
6194
|
effect.onTrigger = instance.rtg ? (e) => invokeArrayFns(instance.rtg, e) : void 0;
|
|
6159
|
-
|
|
6195
|
+
job.ownerInstance = instance;
|
|
6160
6196
|
}
|
|
6161
6197
|
update();
|
|
6162
6198
|
};
|
|
@@ -6623,13 +6659,13 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6623
6659
|
if (!!(process.env.NODE_ENV !== "production") && instance.type.__hmrId) {
|
|
6624
6660
|
unregisterHMR(instance);
|
|
6625
6661
|
}
|
|
6626
|
-
const { bum, scope,
|
|
6662
|
+
const { bum, scope, job, subTree, um } = instance;
|
|
6627
6663
|
if (bum) {
|
|
6628
6664
|
invokeArrayFns(bum);
|
|
6629
6665
|
}
|
|
6630
6666
|
scope.stop();
|
|
6631
|
-
if (
|
|
6632
|
-
|
|
6667
|
+
if (job) {
|
|
6668
|
+
job.flags |= 8;
|
|
6633
6669
|
unmount(subTree, instance, parentSuspense, doRemove);
|
|
6634
6670
|
}
|
|
6635
6671
|
if (um) {
|
|
@@ -6715,8 +6751,14 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6715
6751
|
function resolveChildrenNamespace({ type, props }, currentNamespace) {
|
|
6716
6752
|
return currentNamespace === "svg" && type === "foreignObject" || currentNamespace === "mathml" && type === "annotation-xml" && props && props.encoding && props.encoding.includes("html") ? void 0 : currentNamespace;
|
|
6717
6753
|
}
|
|
6718
|
-
function toggleRecurse({ effect,
|
|
6719
|
-
|
|
6754
|
+
function toggleRecurse({ effect, job }, allowed) {
|
|
6755
|
+
if (allowed) {
|
|
6756
|
+
effect.flags |= 32;
|
|
6757
|
+
job.flags |= 4;
|
|
6758
|
+
} else {
|
|
6759
|
+
effect.flags &= ~32;
|
|
6760
|
+
job.flags &= ~4;
|
|
6761
|
+
}
|
|
6720
6762
|
}
|
|
6721
6763
|
function needTransition(parentSuspense, transition) {
|
|
6722
6764
|
return (!parentSuspense || parentSuspense && !parentSuspense.pendingBranch) && transition && !transition.persisted;
|
|
@@ -7456,6 +7498,7 @@ function createComponentInstance(vnode, parent, suspense) {
|
|
|
7456
7498
|
effect: null,
|
|
7457
7499
|
update: null,
|
|
7458
7500
|
// will be set synchronously right after creation
|
|
7501
|
+
job: null,
|
|
7459
7502
|
scope: new EffectScope(
|
|
7460
7503
|
true
|
|
7461
7504
|
/* detached */
|
|
@@ -7980,7 +8023,8 @@ function initCustomFormatter() {
|
|
|
7980
8023
|
{},
|
|
7981
8024
|
["span", vueStyle, genRefFlag(obj)],
|
|
7982
8025
|
"<",
|
|
7983
|
-
|
|
8026
|
+
// avoid debugger accessing value affecting behavior
|
|
8027
|
+
formatValue("_value" in obj ? obj._value : obj),
|
|
7984
8028
|
`>`
|
|
7985
8029
|
];
|
|
7986
8030
|
} else if (isReactive(obj)) {
|
|
@@ -8160,7 +8204,7 @@ function isMemoSame(cached, memo) {
|
|
|
8160
8204
|
return true;
|
|
8161
8205
|
}
|
|
8162
8206
|
|
|
8163
|
-
const version = "3.
|
|
8207
|
+
const version = "3.5.0-alpha.2";
|
|
8164
8208
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8165
8209
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8166
8210
|
const devtools = !!(process.env.NODE_ENV !== "production") || true ? devtools$1 : void 0;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.5.0-alpha.2",
|
|
4
4
|
"description": "@vue/runtime-core",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/runtime-core.esm-bundler.js",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
},
|
|
47
47
|
"homepage": "https://github.com/vuejs/core/tree/main/packages/runtime-core#readme",
|
|
48
48
|
"dependencies": {
|
|
49
|
-
"@vue/shared": "3.
|
|
50
|
-
"@vue/reactivity": "3.
|
|
49
|
+
"@vue/shared": "3.5.0-alpha.2",
|
|
50
|
+
"@vue/reactivity": "3.5.0-alpha.2"
|
|
51
51
|
}
|
|
52
52
|
}
|