@vue/runtime-core 3.6.0-beta.7 → 3.6.0-beta.8
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 +55 -87
- package/dist/runtime-core.cjs.prod.js +46 -83
- package/dist/runtime-core.d.ts +28 -3
- package/dist/runtime-core.esm-bundler.js +51 -78
- package/package.json +3 -3
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.6.0-beta.
|
|
2
|
+
* @vue/runtime-core v3.6.0-beta.8
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { EffectScope, EffectScope as EffectScope$1, ReactiveEffect, ReactiveEffect as ReactiveEffect$1, TrackOpTypes, TriggerOpTypes, WatcherEffect, computed as computed$1, customRef, customRef as customRef$1, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isProxy as isProxy$1, isReactive, isReactive as isReactive$1, isReadonly, isReadonly as isReadonly$1, isRef, isRef as isRef$1, isShallow, isShallow as isShallow$1, markRaw, markRaw as markRaw$1, onScopeDispose, onWatcherCleanup, proxyRefs, proxyRefs as proxyRefs$1, reactive, reactive as reactive$1, readonly, readonly as readonly$1, ref, ref as ref$1, setActiveSub, setCurrentScope, shallowReactive, shallowReactive as shallowReactive$1, shallowReadArray, shallowReadonly, shallowReadonly as shallowReadonly$1, shallowRef, shallowRef as shallowRef$1, stop, toRaw, toRaw as toRaw$1, toReactive, toReadonly, toRef, toRefs, toValue, track, traverse, trigger, triggerRef, unref } from "@vue/reactivity";
|
|
7
7
|
import { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, camelize, camelize as camelize$1, capitalize, capitalize as capitalize$1, def, extend, getEscapedCssVarName, getGlobalThis, getModifierPropName, getSequence, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isBuiltInTag, isFunction, isGloballyAllowed, isKnownHtmlAttr, isKnownSvgAttr, isModelListener, isObject, isOn, isPromise, isRegExp, isRenderableAttrValue, isReservedProp, isString, isSymbol, looseEqual, looseToNumber, makeMap, normalizeClass, normalizeClass as normalizeClass$1, normalizeCssVarValue, normalizeProps, normalizeStyle, normalizeStyle as normalizeStyle$1, remove, stringifyStyle, toDisplayString, toHandlerKey, toHandlerKey as toHandlerKey$1, toNumber, toRawType } from "@vue/shared";
|
|
8
|
-
|
|
9
8
|
//#region packages/runtime-core/src/warning.ts
|
|
10
9
|
const stack = [];
|
|
11
10
|
/**
|
|
@@ -31,8 +30,8 @@ function warn$1(msg, ...args) {
|
|
|
31
30
|
const trace = getComponentTrace();
|
|
32
31
|
if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
|
|
33
32
|
msg + args.map((a) => {
|
|
34
|
-
|
|
35
|
-
return
|
|
33
|
+
const toString = a.toString;
|
|
34
|
+
return toString == null ? JSON.stringify(a) : toString.call(a);
|
|
36
35
|
}).join(""),
|
|
37
36
|
instance && instance.proxy || instance,
|
|
38
37
|
trace.map(({ ctx }) => `at <${formatComponentName(instance, ctx.type)}>`).join("\n"),
|
|
@@ -123,7 +122,6 @@ function assertNumber(val, type) {
|
|
|
123
122
|
else if (isNaN(val)) warn$1(`${type} is NaN - the duration expression might be incorrect.`);
|
|
124
123
|
}
|
|
125
124
|
/* v8 ignore stop */
|
|
126
|
-
|
|
127
125
|
//#endregion
|
|
128
126
|
//#region packages/runtime-core/src/errorHandling.ts
|
|
129
127
|
const ErrorCodes = {
|
|
@@ -247,7 +245,6 @@ function logError(err, type, instance, throwInDev = true, throwInProd = false) {
|
|
|
247
245
|
} else if (throwInProd) throw err;
|
|
248
246
|
else console.error(err);
|
|
249
247
|
}
|
|
250
|
-
|
|
251
248
|
//#endregion
|
|
252
249
|
//#region packages/runtime-core/src/scheduler.ts
|
|
253
250
|
const SchedulerJobFlags = {
|
|
@@ -408,7 +405,6 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
408
405
|
seen.set(fn, count + 1);
|
|
409
406
|
return false;
|
|
410
407
|
}
|
|
411
|
-
|
|
412
408
|
//#endregion
|
|
413
409
|
//#region packages/runtime-core/src/hmr.ts
|
|
414
410
|
let isHmrUpdating = false;
|
|
@@ -530,7 +526,6 @@ function tryWrap(fn) {
|
|
|
530
526
|
}
|
|
531
527
|
};
|
|
532
528
|
}
|
|
533
|
-
|
|
534
529
|
//#endregion
|
|
535
530
|
//#region packages/runtime-core/src/devtools.ts
|
|
536
531
|
let devtools$1;
|
|
@@ -599,7 +594,6 @@ function createDevtoolsPerformanceHook(hook) {
|
|
|
599
594
|
function devtoolsComponentEmit(component, event, params) {
|
|
600
595
|
emit$1("component:emit", component.appContext.app, component, event, params);
|
|
601
596
|
}
|
|
602
|
-
|
|
603
597
|
//#endregion
|
|
604
598
|
//#region packages/runtime-core/src/componentRenderContext.ts
|
|
605
599
|
/**
|
|
@@ -669,7 +663,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
669
663
|
renderFnWithContext._d = true;
|
|
670
664
|
return renderFnWithContext;
|
|
671
665
|
}
|
|
672
|
-
|
|
673
666
|
//#endregion
|
|
674
667
|
//#region packages/runtime-core/src/directives.ts
|
|
675
668
|
function validateDirectiveName(name) {
|
|
@@ -724,7 +717,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
724
717
|
}
|
|
725
718
|
}
|
|
726
719
|
}
|
|
727
|
-
|
|
728
720
|
//#endregion
|
|
729
721
|
//#region packages/runtime-core/src/apiInject.ts
|
|
730
722
|
function provide(key, value) {
|
|
@@ -755,7 +747,6 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
755
747
|
function hasInjectionContext() {
|
|
756
748
|
return !!(getCurrentGenericInstance() || currentApp);
|
|
757
749
|
}
|
|
758
|
-
|
|
759
750
|
//#endregion
|
|
760
751
|
//#region packages/runtime-core/src/helpers/useSsrContext.ts
|
|
761
752
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -766,7 +757,6 @@ const useSSRContext = () => {
|
|
|
766
757
|
return ctx;
|
|
767
758
|
}
|
|
768
759
|
};
|
|
769
|
-
|
|
770
760
|
//#endregion
|
|
771
761
|
//#region packages/runtime-core/src/apiWatch.ts
|
|
772
762
|
function watchEffect(effect, options) {
|
|
@@ -867,7 +857,6 @@ function createPathGetter(ctx, path) {
|
|
|
867
857
|
return cur;
|
|
868
858
|
};
|
|
869
859
|
}
|
|
870
|
-
|
|
871
860
|
//#endregion
|
|
872
861
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
873
862
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -1065,7 +1054,6 @@ function prepareAnchor(target, vnode, createText, insert, anchor = null) {
|
|
|
1065
1054
|
}
|
|
1066
1055
|
return targetAnchor;
|
|
1067
1056
|
}
|
|
1068
|
-
|
|
1069
1057
|
//#endregion
|
|
1070
1058
|
//#region packages/runtime-core/src/components/BaseTransition.ts
|
|
1071
1059
|
const leaveCbKey = Symbol("_leaveCb");
|
|
@@ -1329,14 +1317,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1329
1317
|
function checkTransitionMode(mode) {
|
|
1330
1318
|
if (!!(process.env.NODE_ENV !== "production") && mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
1331
1319
|
}
|
|
1332
|
-
|
|
1333
1320
|
//#endregion
|
|
1334
1321
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
1335
1322
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1336
1323
|
function defineComponent(options, extraOptions) {
|
|
1337
1324
|
return isFunction(options) ? extend({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
1338
1325
|
}
|
|
1339
|
-
|
|
1340
1326
|
//#endregion
|
|
1341
1327
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
1342
1328
|
function useId() {
|
|
@@ -1358,7 +1344,6 @@ function markAsyncBoundary(instance) {
|
|
|
1358
1344
|
0
|
|
1359
1345
|
];
|
|
1360
1346
|
}
|
|
1361
|
-
|
|
1362
1347
|
//#endregion
|
|
1363
1348
|
//#region packages/runtime-core/src/helpers/useTemplateRef.ts
|
|
1364
1349
|
const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
|
|
@@ -1382,7 +1367,6 @@ function isTemplateRefKey(refs, key) {
|
|
|
1382
1367
|
let desc;
|
|
1383
1368
|
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
1384
1369
|
}
|
|
1385
|
-
|
|
1386
1370
|
//#endregion
|
|
1387
1371
|
//#region packages/runtime-core/src/rendererTemplateRef.ts
|
|
1388
1372
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1483,7 +1467,6 @@ function invalidatePendingSetRef(rawRef) {
|
|
|
1483
1467
|
pendingSetRefMap.delete(rawRef);
|
|
1484
1468
|
}
|
|
1485
1469
|
}
|
|
1486
|
-
|
|
1487
1470
|
//#endregion
|
|
1488
1471
|
//#region packages/runtime-core/src/hydration.ts
|
|
1489
1472
|
let isHydratingEnabled = false;
|
|
@@ -1910,7 +1893,6 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
1910
1893
|
return list.includes(MismatchTypeString[allowedType]);
|
|
1911
1894
|
}
|
|
1912
1895
|
}
|
|
1913
|
-
|
|
1914
1896
|
//#endregion
|
|
1915
1897
|
//#region packages/runtime-core/src/hydrationStrategies.ts
|
|
1916
1898
|
let requestIdleCallback;
|
|
@@ -1999,7 +1981,6 @@ function forEachElement(node, cb) {
|
|
|
1999
1981
|
}
|
|
2000
1982
|
} else cb(node);
|
|
2001
1983
|
}
|
|
2002
|
-
|
|
2003
1984
|
//#endregion
|
|
2004
1985
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
2005
1986
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
@@ -2136,11 +2117,10 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
2136
2117
|
if (getResolvedComp()) doHydrate();
|
|
2137
2118
|
else load().then(() => !instance.isUnmounted && doHydrate());
|
|
2138
2119
|
}
|
|
2139
|
-
|
|
2140
2120
|
//#endregion
|
|
2141
2121
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
2142
2122
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
2143
|
-
const
|
|
2123
|
+
const KeepAlive = {
|
|
2144
2124
|
name: `KeepAlive`,
|
|
2145
2125
|
__isKeepAlive: true,
|
|
2146
2126
|
props: {
|
|
@@ -2278,7 +2258,6 @@ const KeepAliveImpl = {
|
|
|
2278
2258
|
};
|
|
2279
2259
|
}
|
|
2280
2260
|
};
|
|
2281
|
-
const KeepAlive = KeepAliveImpl;
|
|
2282
2261
|
function matches(pattern, name) {
|
|
2283
2262
|
if (isArray(pattern)) return pattern.some((p) => matches(p, name));
|
|
2284
2263
|
else if (isString(pattern)) return pattern.split(",").includes(name);
|
|
@@ -2358,7 +2337,6 @@ function deactivate(vnode, container, { m: move }, parentComponent, parentSuspen
|
|
|
2358
2337
|
}, void 0, parentSuspense);
|
|
2359
2338
|
if (!!(process.env.NODE_ENV !== "production") || __VUE_PROD_DEVTOOLS__) devtoolsComponentAdded(instance);
|
|
2360
2339
|
}
|
|
2361
|
-
|
|
2362
2340
|
//#endregion
|
|
2363
2341
|
//#region packages/runtime-core/src/apiLifecycle.ts
|
|
2364
2342
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -2394,23 +2372,19 @@ const onRenderTracked = /* @__PURE__ */ createHook("rtc");
|
|
|
2394
2372
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
2395
2373
|
injectHook("ec", hook, target);
|
|
2396
2374
|
}
|
|
2397
|
-
|
|
2398
|
-
//#endregion
|
|
2399
|
-
//#region packages/runtime-core/src/helpers/resolveAssets.ts
|
|
2400
|
-
const COMPONENTS = "components";
|
|
2401
2375
|
const DIRECTIVES = "directives";
|
|
2402
2376
|
/**
|
|
2403
2377
|
* @private
|
|
2404
2378
|
*/
|
|
2405
2379
|
function resolveComponent(name, maybeSelfReference) {
|
|
2406
|
-
return resolveAsset(
|
|
2380
|
+
return resolveAsset("components", name, true, maybeSelfReference) || name;
|
|
2407
2381
|
}
|
|
2408
2382
|
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2409
2383
|
/**
|
|
2410
2384
|
* @private
|
|
2411
2385
|
*/
|
|
2412
2386
|
function resolveDynamicComponent(component) {
|
|
2413
|
-
if (isString(component)) return resolveAsset(
|
|
2387
|
+
if (isString(component)) return resolveAsset("components", component, false) || component;
|
|
2414
2388
|
else return component || NULL_DYNAMIC_COMPONENT;
|
|
2415
2389
|
}
|
|
2416
2390
|
/**
|
|
@@ -2423,14 +2397,14 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
2423
2397
|
const instance = currentRenderingInstance || currentInstance;
|
|
2424
2398
|
if (instance) {
|
|
2425
2399
|
const Component = instance.type;
|
|
2426
|
-
if (type ===
|
|
2400
|
+
if (type === "components") {
|
|
2427
2401
|
const selfName = getComponentName(Component, false);
|
|
2428
2402
|
if (selfName && (selfName === name || selfName === camelize$1(name) || selfName === capitalize$1(camelize$1(name)))) return Component;
|
|
2429
2403
|
}
|
|
2430
2404
|
const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
|
|
2431
2405
|
if (!res && maybeSelfReference) return Component;
|
|
2432
2406
|
if (!!(process.env.NODE_ENV !== "production") && warnMissing && !res) {
|
|
2433
|
-
const extra = type ===
|
|
2407
|
+
const extra = type === "components" ? "\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement." : ``;
|
|
2434
2408
|
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2435
2409
|
}
|
|
2436
2410
|
return res;
|
|
@@ -2439,7 +2413,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
2439
2413
|
function resolve(registry, name) {
|
|
2440
2414
|
return registry && (registry[name] || registry[camelize$1(name)] || registry[capitalize$1(camelize$1(name))]);
|
|
2441
2415
|
}
|
|
2442
|
-
|
|
2443
2416
|
//#endregion
|
|
2444
2417
|
//#region packages/runtime-core/src/helpers/renderList.ts
|
|
2445
2418
|
/**
|
|
@@ -2460,11 +2433,14 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2460
2433
|
}
|
|
2461
2434
|
ret = new Array(source.length);
|
|
2462
2435
|
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]);
|
|
2463
|
-
} else if (typeof source === "number") {
|
|
2464
|
-
|
|
2436
|
+
} else if (typeof source === "number") if (!!(process.env.NODE_ENV !== "production") && (!Number.isInteger(source) || source < 0)) {
|
|
2437
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
2438
|
+
ret = [];
|
|
2439
|
+
} else {
|
|
2465
2440
|
ret = new Array(source);
|
|
2466
2441
|
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2467
|
-
}
|
|
2442
|
+
}
|
|
2443
|
+
else if (isObject(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2468
2444
|
else {
|
|
2469
2445
|
const keys = Object.keys(source);
|
|
2470
2446
|
ret = new Array(keys.length);
|
|
@@ -2477,7 +2453,6 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2477
2453
|
if (cache) cache[index] = ret;
|
|
2478
2454
|
return ret;
|
|
2479
2455
|
}
|
|
2480
|
-
|
|
2481
2456
|
//#endregion
|
|
2482
2457
|
//#region packages/runtime-core/src/helpers/createSlots.ts
|
|
2483
2458
|
/**
|
|
@@ -2496,7 +2471,6 @@ function createSlots(slots, dynamicSlots) {
|
|
|
2496
2471
|
}
|
|
2497
2472
|
return slots;
|
|
2498
2473
|
}
|
|
2499
|
-
|
|
2500
2474
|
//#endregion
|
|
2501
2475
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
2502
2476
|
/**
|
|
@@ -2547,7 +2521,6 @@ function ensureVaporSlotFallback(vnodes, fallback) {
|
|
|
2547
2521
|
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
2548
2522
|
}
|
|
2549
2523
|
}
|
|
2550
|
-
|
|
2551
2524
|
//#endregion
|
|
2552
2525
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
2553
2526
|
/**
|
|
@@ -2563,7 +2536,6 @@ function toHandlers(obj, preserveCaseIfNecessary) {
|
|
|
2563
2536
|
for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : toHandlerKey$1(key)] = obj[key];
|
|
2564
2537
|
return ret;
|
|
2565
2538
|
}
|
|
2566
|
-
|
|
2567
2539
|
//#endregion
|
|
2568
2540
|
//#region packages/runtime-core/src/componentPublicInstance.ts
|
|
2569
2541
|
/**
|
|
@@ -2742,7 +2714,6 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
2742
2714
|
}
|
|
2743
2715
|
});
|
|
2744
2716
|
}
|
|
2745
|
-
|
|
2746
2717
|
//#endregion
|
|
2747
2718
|
//#region packages/runtime-core/src/apiSetupHelpers.ts
|
|
2748
2719
|
const warnRuntimeUsage = (method) => warn$1(`${method}() is a compiler-hint helper that is only usable inside <script setup> of a single file component. Its arguments should be compiled away and passing it at runtime has no effect.`);
|
|
@@ -2781,6 +2752,22 @@ function defineExpose(exposed) {
|
|
|
2781
2752
|
function defineOptions(options) {
|
|
2782
2753
|
if (!!(process.env.NODE_ENV !== "production")) warnRuntimeUsage(`defineOptions`);
|
|
2783
2754
|
}
|
|
2755
|
+
/**
|
|
2756
|
+
* Vue `<script setup>` compiler macro for providing type hints to IDEs for
|
|
2757
|
+
* slot name and slot props type checking.
|
|
2758
|
+
*
|
|
2759
|
+
* Example usage:
|
|
2760
|
+
* ```ts
|
|
2761
|
+
* const slots = defineSlots<{
|
|
2762
|
+
* default(props: { msg: string }): any
|
|
2763
|
+
* }>()
|
|
2764
|
+
* ```
|
|
2765
|
+
*
|
|
2766
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
2767
|
+
* output and should **not** be actually called at runtime.
|
|
2768
|
+
*
|
|
2769
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
|
|
2770
|
+
*/
|
|
2784
2771
|
function defineSlots() {
|
|
2785
2772
|
if (!!(process.env.NODE_ENV !== "production")) warnRuntimeUsage(`defineSlots`);
|
|
2786
2773
|
return null;
|
|
@@ -2897,21 +2884,29 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
2897
2884
|
*/
|
|
2898
2885
|
function withAsyncContext(getAwaitable) {
|
|
2899
2886
|
const ctx = getCurrentGenericInstance();
|
|
2887
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
2900
2888
|
if (!!(process.env.NODE_ENV !== "production") && !ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
2901
2889
|
let awaitable = getAwaitable();
|
|
2902
2890
|
setCurrentInstance(null, void 0);
|
|
2903
|
-
|
|
2904
|
-
|
|
2891
|
+
if (inSSRSetup) setInSSRSetupState(false);
|
|
2892
|
+
const restore = () => {
|
|
2905
2893
|
setCurrentInstance(ctx);
|
|
2894
|
+
if (inSSRSetup) setInSSRSetupState(true);
|
|
2895
|
+
};
|
|
2896
|
+
const cleanup = () => {
|
|
2897
|
+
setCurrentInstance(null, void 0);
|
|
2898
|
+
if (inSSRSetup) setInSSRSetupState(false);
|
|
2899
|
+
};
|
|
2900
|
+
if (isPromise(awaitable)) awaitable = awaitable.catch((e) => {
|
|
2901
|
+
restore();
|
|
2906
2902
|
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
2907
2903
|
throw e;
|
|
2908
2904
|
});
|
|
2909
2905
|
return [awaitable, () => {
|
|
2910
|
-
|
|
2906
|
+
restore();
|
|
2911
2907
|
Promise.resolve().then(cleanup);
|
|
2912
2908
|
}];
|
|
2913
2909
|
}
|
|
2914
|
-
|
|
2915
2910
|
//#endregion
|
|
2916
2911
|
//#region packages/runtime-core/src/componentOptions.ts
|
|
2917
2912
|
function createDuplicateChecker() {
|
|
@@ -3158,7 +3153,6 @@ function mergeWatchOptions(to, from) {
|
|
|
3158
3153
|
for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
|
|
3159
3154
|
return merged;
|
|
3160
3155
|
}
|
|
3161
|
-
|
|
3162
3156
|
//#endregion
|
|
3163
3157
|
//#region packages/runtime-core/src/apiCreateApp.ts
|
|
3164
3158
|
function createAppContext() {
|
|
@@ -3296,7 +3290,6 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
3296
3290
|
* `app.runWithContext()`.
|
|
3297
3291
|
*/
|
|
3298
3292
|
let currentApp = null;
|
|
3299
|
-
|
|
3300
3293
|
//#endregion
|
|
3301
3294
|
//#region packages/runtime-core/src/helpers/useModel.ts
|
|
3302
3295
|
function useModel(props, name, options = EMPTY_OBJ) {
|
|
@@ -3369,7 +3362,6 @@ function useModel(props, name, options = EMPTY_OBJ) {
|
|
|
3369
3362
|
const getModelModifiers = (props, modelName, getter) => {
|
|
3370
3363
|
return getter(props, getModifierPropName(modelName)) || getter(props, `${camelize$1(modelName)}Modifiers`) || getter(props, `${hyphenate(modelName)}Modifiers`);
|
|
3371
3364
|
};
|
|
3372
|
-
|
|
3373
3365
|
//#endregion
|
|
3374
3366
|
//#region packages/runtime-core/src/componentEmits.ts
|
|
3375
3367
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -3459,7 +3451,6 @@ function isEmitListener(options, key) {
|
|
|
3459
3451
|
key = key.slice(2).replace(/Once$/, "");
|
|
3460
3452
|
return hasOwn(options, key[0].toLowerCase() + key.slice(1)) || hasOwn(options, hyphenate(key)) || hasOwn(options, key);
|
|
3461
3453
|
}
|
|
3462
|
-
|
|
3463
3454
|
//#endregion
|
|
3464
3455
|
//#region packages/runtime-core/src/componentRenderUtils.ts
|
|
3465
3456
|
/**
|
|
@@ -3655,7 +3646,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3655
3646
|
} else break;
|
|
3656
3647
|
}
|
|
3657
3648
|
}
|
|
3658
|
-
|
|
3659
3649
|
//#endregion
|
|
3660
3650
|
//#region packages/runtime-core/src/internalObject.ts
|
|
3661
3651
|
/**
|
|
@@ -3667,7 +3657,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3667
3657
|
const internalObjectProto = {};
|
|
3668
3658
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3669
3659
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3670
|
-
|
|
3671
3660
|
//#endregion
|
|
3672
3661
|
//#region packages/runtime-core/src/componentProps.ts
|
|
3673
3662
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
@@ -3963,7 +3952,6 @@ function isExplicable(type) {
|
|
|
3963
3952
|
function isBoolean(...args) {
|
|
3964
3953
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
3965
3954
|
}
|
|
3966
|
-
|
|
3967
3955
|
//#endregion
|
|
3968
3956
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
3969
3957
|
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
@@ -4032,7 +4020,6 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
4032
4020
|
for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
|
|
4033
4021
|
}
|
|
4034
4022
|
};
|
|
4035
|
-
|
|
4036
4023
|
//#endregion
|
|
4037
4024
|
//#region packages/runtime-core/src/profiling.ts
|
|
4038
4025
|
let supported;
|
|
@@ -4071,7 +4058,6 @@ function isSupported() {
|
|
|
4071
4058
|
} else supported = false;
|
|
4072
4059
|
return supported;
|
|
4073
4060
|
}
|
|
4074
|
-
|
|
4075
4061
|
//#endregion
|
|
4076
4062
|
//#region packages/runtime-core/src/featureFlags.ts
|
|
4077
4063
|
let initialized = false;
|
|
@@ -4101,7 +4087,6 @@ function initFeatureFlags() {
|
|
|
4101
4087
|
}
|
|
4102
4088
|
initialized = true;
|
|
4103
4089
|
}
|
|
4104
|
-
|
|
4105
4090
|
//#endregion
|
|
4106
4091
|
//#region packages/runtime-core/src/renderer.ts
|
|
4107
4092
|
const MoveType = {
|
|
@@ -4499,7 +4484,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4499
4484
|
if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
|
|
4500
4485
|
else hydrateSubTree();
|
|
4501
4486
|
} else {
|
|
4502
|
-
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
|
|
4487
|
+
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);
|
|
4503
4488
|
if (!!(process.env.NODE_ENV !== "production")) startMeasure(instance, `render`);
|
|
4504
4489
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
4505
4490
|
if (!!(process.env.NODE_ENV !== "production")) endMeasure(instance, `render`);
|
|
@@ -5013,12 +4998,11 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
5013
4998
|
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
5014
4999
|
return null;
|
|
5015
5000
|
}
|
|
5016
|
-
|
|
5017
5001
|
//#endregion
|
|
5018
5002
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
5019
5003
|
const isSuspense = (type) => type.__isSuspense;
|
|
5020
5004
|
let suspenseId = 0;
|
|
5021
|
-
const
|
|
5005
|
+
const Suspense = {
|
|
5022
5006
|
name: "Suspense",
|
|
5023
5007
|
__isSuspense: true,
|
|
5024
5008
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -5036,7 +5020,6 @@ const SuspenseImpl = {
|
|
|
5036
5020
|
hydrate: hydrateSuspense,
|
|
5037
5021
|
normalize: normalizeSuspenseChildren
|
|
5038
5022
|
};
|
|
5039
|
-
const Suspense = SuspenseImpl;
|
|
5040
5023
|
function triggerEvent(vnode, name) {
|
|
5041
5024
|
const eventListener = vnode.props && vnode.props[name];
|
|
5042
5025
|
if (isFunction(eventListener)) eventListener();
|
|
@@ -5299,7 +5282,6 @@ function isVNodeSuspensible(vnode) {
|
|
|
5299
5282
|
const suspensible = vnode.props && vnode.props.suspensible;
|
|
5300
5283
|
return suspensible != null && suspensible !== false;
|
|
5301
5284
|
}
|
|
5302
|
-
|
|
5303
5285
|
//#endregion
|
|
5304
5286
|
//#region packages/runtime-core/src/vnode.ts
|
|
5305
5287
|
const Fragment = Symbol.for("v-fgt");
|
|
@@ -5617,7 +5599,6 @@ function mergeProps(...args) {
|
|
|
5617
5599
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
5618
5600
|
callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
|
|
5619
5601
|
}
|
|
5620
|
-
|
|
5621
5602
|
//#endregion
|
|
5622
5603
|
//#region packages/runtime-core/src/componentCurrentInstance.ts
|
|
5623
5604
|
/**
|
|
@@ -5685,7 +5666,6 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
5685
5666
|
value: instance[key]
|
|
5686
5667
|
};
|
|
5687
5668
|
};
|
|
5688
|
-
|
|
5689
5669
|
//#endregion
|
|
5690
5670
|
//#region packages/runtime-core/src/component.ts
|
|
5691
5671
|
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
@@ -6000,13 +5980,11 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
6000
5980
|
function isClassComponent(value) {
|
|
6001
5981
|
return isFunction(value) && "__vccOpts" in value;
|
|
6002
5982
|
}
|
|
6003
|
-
|
|
6004
5983
|
//#endregion
|
|
6005
5984
|
//#region packages/runtime-core/src/apiComputed.ts
|
|
6006
5985
|
const computed = (getterOrOptions, debugOptions) => {
|
|
6007
5986
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
6008
5987
|
};
|
|
6009
|
-
|
|
6010
5988
|
//#endregion
|
|
6011
5989
|
//#region packages/runtime-core/src/h.ts
|
|
6012
5990
|
function h(type, propsOrChildren, children) {
|
|
@@ -6026,7 +6004,6 @@ function h(type, propsOrChildren, children) {
|
|
|
6026
6004
|
setBlockTracking(1);
|
|
6027
6005
|
}
|
|
6028
6006
|
}
|
|
6029
|
-
|
|
6030
6007
|
//#endregion
|
|
6031
6008
|
//#region packages/runtime-core/src/customFormatter.ts
|
|
6032
6009
|
function initCustomFormatter() {
|
|
@@ -6191,7 +6168,6 @@ function initCustomFormatter() {
|
|
|
6191
6168
|
if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
|
|
6192
6169
|
else window.devtoolsFormatters = [formatter];
|
|
6193
6170
|
}
|
|
6194
|
-
|
|
6195
6171
|
//#endregion
|
|
6196
6172
|
//#region packages/runtime-core/src/helpers/withMemo.ts
|
|
6197
6173
|
function withMemo(memo, render, cache, index) {
|
|
@@ -6209,10 +6185,9 @@ function isMemoSame(cached, memo) {
|
|
|
6209
6185
|
if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
|
|
6210
6186
|
return true;
|
|
6211
6187
|
}
|
|
6212
|
-
|
|
6213
6188
|
//#endregion
|
|
6214
6189
|
//#region packages/runtime-core/src/index.ts
|
|
6215
|
-
const version = "3.6.0-beta.
|
|
6190
|
+
const version = "3.6.0-beta.8";
|
|
6216
6191
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
6217
6192
|
/**
|
|
6218
6193
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -6221,7 +6196,11 @@ const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
|
6221
6196
|
const ErrorTypeStrings = ErrorTypeStrings$1;
|
|
6222
6197
|
const devtools = (process.env.NODE_ENV, devtools$1);
|
|
6223
6198
|
const setDevtoolsHook = (process.env.NODE_ENV, setDevtoolsHook$1);
|
|
6224
|
-
|
|
6199
|
+
/**
|
|
6200
|
+
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
6201
|
+
* @internal
|
|
6202
|
+
*/
|
|
6203
|
+
const ssrUtils = {
|
|
6225
6204
|
createComponentInstance,
|
|
6226
6205
|
setupComponent,
|
|
6227
6206
|
renderComponentRoot,
|
|
@@ -6234,11 +6213,6 @@ const _ssrUtils = {
|
|
|
6234
6213
|
popWarningContext
|
|
6235
6214
|
};
|
|
6236
6215
|
/**
|
|
6237
|
-
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
6238
|
-
* @internal
|
|
6239
|
-
*/
|
|
6240
|
-
const ssrUtils = _ssrUtils;
|
|
6241
|
-
/**
|
|
6242
6216
|
* @internal only exposed in compat builds
|
|
6243
6217
|
*/
|
|
6244
6218
|
const resolveFilter = null;
|
|
@@ -6247,6 +6221,5 @@ const resolveFilter = null;
|
|
|
6247
6221
|
*/
|
|
6248
6222
|
const compatUtils = null;
|
|
6249
6223
|
const DeprecationTypes = null;
|
|
6250
|
-
|
|
6251
6224
|
//#endregion
|
|
6252
|
-
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, 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, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, 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 };
|
|
6225
|
+
export { BaseTransition, BaseTransitionPropsValidators, Comment, DeprecationTypes, EffectScope, ErrorCodes, ErrorTypeStrings, Fragment, KeepAlive, MismatchTypes, MoveType, NULL_DYNAMIC_COMPONENT, ReactiveEffect, SchedulerJobFlags, Static, Suspense, Teleport, Text, TrackOpTypes, TriggerOpTypes, 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, ensureVaporSlotFallback, expose, flushOnAppMount, getAttributeMismatch, getComponentName, getCurrentInstance, getCurrentScope, getCurrentWatcher, getFunctionalFallthrough, getInheritedScopeIds, getTransitionRawChildren, guardReactiveProps, h, handleError, hasInjectionContext, hydrateOnIdle, hydrateOnInteraction, hydrateOnMediaQuery, hydrateOnVisible, initCustomFormatter, initFeatureFlags, inject, isAsyncWrapper, isEmitListener, isHydrating, isKeepAlive, isMapEqual, isMemoSame, isMismatchAllowed, isProxy, isReactive, isReadonly, isRef, isRuntimeOnly, isSetEqual, isShallow, isTeleportDeferred, isTeleportDisabled, isTemplateNode, isTemplateRefKey, isVNode, isValidHtmlOrSvgAttribute, knownTemplateRefs, leaveCbKey, markAsyncBoundary, markRaw, matches, mergeDefaults, mergeModels, mergeProps, nextTick, nextUid, normalizeClass, normalizeProps, normalizeRef, normalizeStyle, onActivated, onBeforeMount, onBeforeUnmount, onBeforeUpdate, onDeactivated, onErrorCaptured, onMounted, onRenderTracked, onRenderTriggered, onScopeDispose, onServerPrefetch, onUnmounted, onUpdated, onWatcherCleanup, openBlock, performAsyncHydrate, performTransitionEnter, performTransitionLeave, popScopeId, popWarningContext, provide, proxyRefs, pushScopeId, pushWarningContext, queueJob, queuePostFlushCb, reactive, readonly, ref, registerHMR, registerRuntimeCompiler, renderList, renderSlot, resetShapeFlag, resolveComponent, resolveDirective, resolveDynamicComponent, resolveFilter, resolvePropValue, resolveTarget as resolveTeleportTarget, resolveTransitionHooks, setBlockTracking, setCurrentInstance, setCurrentRenderingInstance, setDevtoolsHook, setIsHydratingEnabled, setRef, setTransitionHooks, shallowReactive, shallowReadonly, shallowRef, 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 };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/runtime-core",
|
|
3
|
-
"version": "3.6.0-beta.
|
|
3
|
+
"version": "3.6.0-beta.8",
|
|
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.6.0-beta.
|
|
50
|
-
"@vue/reactivity": "3.6.0-beta.
|
|
49
|
+
"@vue/shared": "3.6.0-beta.8",
|
|
50
|
+
"@vue/reactivity": "3.6.0-beta.8"
|
|
51
51
|
}
|
|
52
52
|
}
|