@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
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,12 +1,14 @@
|
|
|
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
|
-
Object.defineProperties(exports, {
|
|
6
|
+
Object.defineProperties(exports, {
|
|
7
|
+
__esModule: { value: true },
|
|
8
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
9
|
+
});
|
|
7
10
|
let _vue_reactivity = require("@vue/reactivity");
|
|
8
11
|
let _vue_shared = require("@vue/shared");
|
|
9
|
-
|
|
10
12
|
//#region packages/runtime-core/src/warning.ts
|
|
11
13
|
const stack = [];
|
|
12
14
|
/**
|
|
@@ -32,8 +34,8 @@ function warn$1(msg, ...args) {
|
|
|
32
34
|
const trace = getComponentTrace();
|
|
33
35
|
if (appWarnHandler) callWithErrorHandling(appWarnHandler, instance, 11, [
|
|
34
36
|
msg + args.map((a) => {
|
|
35
|
-
|
|
36
|
-
return
|
|
37
|
+
const toString = a.toString;
|
|
38
|
+
return toString == null ? JSON.stringify(a) : toString.call(a);
|
|
37
39
|
}).join(""),
|
|
38
40
|
instance && instance.proxy || instance,
|
|
39
41
|
trace.map(({ ctx }) => `at <${formatComponentName(instance, ctx.type)}>`).join("\n"),
|
|
@@ -123,7 +125,6 @@ function assertNumber(val, type) {
|
|
|
123
125
|
else if (isNaN(val)) warn$1(`${type} is NaN - the duration expression might be incorrect.`);
|
|
124
126
|
}
|
|
125
127
|
/* v8 ignore stop */
|
|
126
|
-
|
|
127
128
|
//#endregion
|
|
128
129
|
//#region packages/runtime-core/src/errorHandling.ts
|
|
129
130
|
const ErrorCodes = {
|
|
@@ -246,7 +247,6 @@ function logError(err, type, instance, throwInDev = true, throwInProd = false) {
|
|
|
246
247
|
else console.error(err);
|
|
247
248
|
}
|
|
248
249
|
}
|
|
249
|
-
|
|
250
250
|
//#endregion
|
|
251
251
|
//#region packages/runtime-core/src/scheduler.ts
|
|
252
252
|
const jobs = [];
|
|
@@ -399,7 +399,6 @@ function checkRecursiveUpdates(seen, fn) {
|
|
|
399
399
|
seen.set(fn, count + 1);
|
|
400
400
|
return false;
|
|
401
401
|
}
|
|
402
|
-
|
|
403
402
|
//#endregion
|
|
404
403
|
//#region packages/runtime-core/src/hmr.ts
|
|
405
404
|
let isHmrUpdating = false;
|
|
@@ -521,7 +520,6 @@ function tryWrap(fn) {
|
|
|
521
520
|
}
|
|
522
521
|
};
|
|
523
522
|
}
|
|
524
|
-
|
|
525
523
|
//#endregion
|
|
526
524
|
//#region packages/runtime-core/src/devtools.ts
|
|
527
525
|
let devtools$1;
|
|
@@ -590,7 +588,6 @@ function createDevtoolsPerformanceHook(hook) {
|
|
|
590
588
|
function devtoolsComponentEmit(component, event, params) {
|
|
591
589
|
emit$1("component:emit", component.appContext.app, component, event, params);
|
|
592
590
|
}
|
|
593
|
-
|
|
594
591
|
//#endregion
|
|
595
592
|
//#region packages/runtime-core/src/componentRenderContext.ts
|
|
596
593
|
/**
|
|
@@ -660,7 +657,6 @@ function withCtx(fn, ctx = currentRenderingInstance, isNonScopedSlot) {
|
|
|
660
657
|
renderFnWithContext._d = true;
|
|
661
658
|
return renderFnWithContext;
|
|
662
659
|
}
|
|
663
|
-
|
|
664
660
|
//#endregion
|
|
665
661
|
//#region packages/runtime-core/src/directives.ts
|
|
666
662
|
function validateDirectiveName(name) {
|
|
@@ -715,7 +711,6 @@ function invokeDirectiveHook(vnode, prevVNode, instance, name) {
|
|
|
715
711
|
}
|
|
716
712
|
}
|
|
717
713
|
}
|
|
718
|
-
|
|
719
714
|
//#endregion
|
|
720
715
|
//#region packages/runtime-core/src/apiInject.ts
|
|
721
716
|
function provide(key, value) {
|
|
@@ -744,7 +739,6 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
744
739
|
function hasInjectionContext() {
|
|
745
740
|
return !!(getCurrentGenericInstance() || currentApp);
|
|
746
741
|
}
|
|
747
|
-
|
|
748
742
|
//#endregion
|
|
749
743
|
//#region packages/runtime-core/src/helpers/useSsrContext.ts
|
|
750
744
|
const ssrContextKey = Symbol.for("v-scx");
|
|
@@ -755,7 +749,6 @@ const useSSRContext = () => {
|
|
|
755
749
|
return ctx;
|
|
756
750
|
}
|
|
757
751
|
};
|
|
758
|
-
|
|
759
752
|
//#endregion
|
|
760
753
|
//#region packages/runtime-core/src/apiWatch.ts
|
|
761
754
|
function watchEffect(effect, options) {
|
|
@@ -856,7 +849,6 @@ function createPathGetter(ctx, path) {
|
|
|
856
849
|
return cur;
|
|
857
850
|
};
|
|
858
851
|
}
|
|
859
|
-
|
|
860
852
|
//#endregion
|
|
861
853
|
//#region packages/runtime-core/src/components/Teleport.ts
|
|
862
854
|
const TeleportEndKey = Symbol("_vte");
|
|
@@ -1054,7 +1046,6 @@ function prepareAnchor(target, vnode, createText, insert, anchor = null) {
|
|
|
1054
1046
|
}
|
|
1055
1047
|
return targetAnchor;
|
|
1056
1048
|
}
|
|
1057
|
-
|
|
1058
1049
|
//#endregion
|
|
1059
1050
|
//#region packages/runtime-core/src/components/BaseTransition.ts
|
|
1060
1051
|
const leaveCbKey = Symbol("_leaveCb");
|
|
@@ -1317,14 +1308,12 @@ function getTransitionRawChildren(children, keepComment = false, parentKey) {
|
|
|
1317
1308
|
function checkTransitionMode(mode) {
|
|
1318
1309
|
if (mode && mode !== "in-out" && mode !== "out-in" && mode !== "default") warn$1(`invalid <transition> mode: ${mode}`);
|
|
1319
1310
|
}
|
|
1320
|
-
|
|
1321
1311
|
//#endregion
|
|
1322
1312
|
//#region packages/runtime-core/src/apiDefineComponent.ts
|
|
1323
1313
|
/* @__NO_SIDE_EFFECTS__ */
|
|
1324
1314
|
function defineComponent(options, extraOptions) {
|
|
1325
1315
|
return (0, _vue_shared.isFunction)(options) ? (0, _vue_shared.extend)({ name: options.name }, extraOptions, { setup: options }) : options;
|
|
1326
1316
|
}
|
|
1327
|
-
|
|
1328
1317
|
//#endregion
|
|
1329
1318
|
//#region packages/runtime-core/src/helpers/useId.ts
|
|
1330
1319
|
function useId() {
|
|
@@ -1346,7 +1335,6 @@ function markAsyncBoundary(instance) {
|
|
|
1346
1335
|
0
|
|
1347
1336
|
];
|
|
1348
1337
|
}
|
|
1349
|
-
|
|
1350
1338
|
//#endregion
|
|
1351
1339
|
//#region packages/runtime-core/src/helpers/useTemplateRef.ts
|
|
1352
1340
|
const knownTemplateRefs = /* @__PURE__ */ new WeakSet();
|
|
@@ -1370,7 +1358,6 @@ function isTemplateRefKey(refs, key) {
|
|
|
1370
1358
|
let desc;
|
|
1371
1359
|
return !!((desc = Object.getOwnPropertyDescriptor(refs, key)) && !desc.configurable);
|
|
1372
1360
|
}
|
|
1373
|
-
|
|
1374
1361
|
//#endregion
|
|
1375
1362
|
//#region packages/runtime-core/src/rendererTemplateRef.ts
|
|
1376
1363
|
const pendingSetRefMap = /* @__PURE__ */ new WeakMap();
|
|
@@ -1469,20 +1456,12 @@ function invalidatePendingSetRef(rawRef) {
|
|
|
1469
1456
|
pendingSetRefMap.delete(rawRef);
|
|
1470
1457
|
}
|
|
1471
1458
|
}
|
|
1472
|
-
|
|
1473
1459
|
//#endregion
|
|
1474
1460
|
//#region packages/runtime-core/src/hydration.ts
|
|
1475
1461
|
let isHydratingEnabled = false;
|
|
1476
1462
|
function setIsHydratingEnabled(value) {
|
|
1477
1463
|
isHydratingEnabled = value;
|
|
1478
1464
|
}
|
|
1479
|
-
/**
|
|
1480
|
-
* VDOM hydration state.
|
|
1481
|
-
* Also used by vapor interop plugin for tree-shaking:
|
|
1482
|
-
* In non-hydration builds, this is never set to true, so the logic in
|
|
1483
|
-
* vaporInteropImpl's hydrate/hydrateSlot can be tree-shaken.
|
|
1484
|
-
*/
|
|
1485
|
-
let isHydrating = false;
|
|
1486
1465
|
let hasLoggedMismatchError = false;
|
|
1487
1466
|
const logMismatchError = () => {
|
|
1488
1467
|
if (hasLoggedMismatchError) return;
|
|
@@ -1508,9 +1487,7 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
1508
1487
|
container._vnode = vnode;
|
|
1509
1488
|
return;
|
|
1510
1489
|
}
|
|
1511
|
-
isHydrating = true;
|
|
1512
1490
|
hydrateNode(container.firstChild, vnode, null, null, null);
|
|
1513
|
-
isHydrating = false;
|
|
1514
1491
|
flushPostFlushCbs();
|
|
1515
1492
|
container._vnode = vnode;
|
|
1516
1493
|
};
|
|
@@ -1879,7 +1856,6 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
1879
1856
|
return list.includes(MismatchTypeString[allowedType]);
|
|
1880
1857
|
}
|
|
1881
1858
|
}
|
|
1882
|
-
|
|
1883
1859
|
//#endregion
|
|
1884
1860
|
//#region packages/runtime-core/src/hydrationStrategies.ts
|
|
1885
1861
|
let requestIdleCallback;
|
|
@@ -1968,7 +1944,6 @@ function forEachElement(node, cb) {
|
|
|
1968
1944
|
}
|
|
1969
1945
|
} else cb(node);
|
|
1970
1946
|
}
|
|
1971
|
-
|
|
1972
1947
|
//#endregion
|
|
1973
1948
|
//#region packages/runtime-core/src/apiAsyncComponent.ts
|
|
1974
1949
|
const isAsyncWrapper = (i) => !!i.type.__asyncLoader;
|
|
@@ -2105,11 +2080,10 @@ function performAsyncHydrate(el, instance, hydrate, getResolvedComp, load, hydra
|
|
|
2105
2080
|
if (getResolvedComp()) doHydrate();
|
|
2106
2081
|
else load().then(() => !instance.isUnmounted && doHydrate());
|
|
2107
2082
|
}
|
|
2108
|
-
|
|
2109
2083
|
//#endregion
|
|
2110
2084
|
//#region packages/runtime-core/src/components/KeepAlive.ts
|
|
2111
2085
|
const isKeepAlive = (vnode) => vnode.type.__isKeepAlive;
|
|
2112
|
-
const
|
|
2086
|
+
const KeepAlive = {
|
|
2113
2087
|
name: `KeepAlive`,
|
|
2114
2088
|
__isKeepAlive: true,
|
|
2115
2089
|
props: {
|
|
@@ -2247,7 +2221,6 @@ const KeepAliveImpl = {
|
|
|
2247
2221
|
};
|
|
2248
2222
|
}
|
|
2249
2223
|
};
|
|
2250
|
-
const KeepAlive = KeepAliveImpl;
|
|
2251
2224
|
function matches(pattern, name) {
|
|
2252
2225
|
if ((0, _vue_shared.isArray)(pattern)) return pattern.some((p) => matches(p, name));
|
|
2253
2226
|
else if ((0, _vue_shared.isString)(pattern)) return pattern.split(",").includes(name);
|
|
@@ -2327,7 +2300,6 @@ function deactivate(vnode, container, { m: move }, parentComponent, parentSuspen
|
|
|
2327
2300
|
}, void 0, parentSuspense);
|
|
2328
2301
|
devtoolsComponentAdded(instance);
|
|
2329
2302
|
}
|
|
2330
|
-
|
|
2331
2303
|
//#endregion
|
|
2332
2304
|
//#region packages/runtime-core/src/apiLifecycle.ts
|
|
2333
2305
|
function injectHook(type, hook, target = currentInstance, prepend = false) {
|
|
@@ -2363,23 +2335,19 @@ const onRenderTracked = /* @__PURE__ */ createHook("rtc");
|
|
|
2363
2335
|
function onErrorCaptured(hook, target = currentInstance) {
|
|
2364
2336
|
injectHook("ec", hook, target);
|
|
2365
2337
|
}
|
|
2366
|
-
|
|
2367
|
-
//#endregion
|
|
2368
|
-
//#region packages/runtime-core/src/helpers/resolveAssets.ts
|
|
2369
|
-
const COMPONENTS = "components";
|
|
2370
2338
|
const DIRECTIVES = "directives";
|
|
2371
2339
|
/**
|
|
2372
2340
|
* @private
|
|
2373
2341
|
*/
|
|
2374
2342
|
function resolveComponent(name, maybeSelfReference) {
|
|
2375
|
-
return resolveAsset(
|
|
2343
|
+
return resolveAsset("components", name, true, maybeSelfReference) || name;
|
|
2376
2344
|
}
|
|
2377
2345
|
const NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
|
|
2378
2346
|
/**
|
|
2379
2347
|
* @private
|
|
2380
2348
|
*/
|
|
2381
2349
|
function resolveDynamicComponent(component) {
|
|
2382
|
-
if ((0, _vue_shared.isString)(component)) return resolveAsset(
|
|
2350
|
+
if ((0, _vue_shared.isString)(component)) return resolveAsset("components", component, false) || component;
|
|
2383
2351
|
else return component || NULL_DYNAMIC_COMPONENT;
|
|
2384
2352
|
}
|
|
2385
2353
|
/**
|
|
@@ -2392,14 +2360,14 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
2392
2360
|
const instance = currentRenderingInstance || currentInstance;
|
|
2393
2361
|
if (instance) {
|
|
2394
2362
|
const Component = instance.type;
|
|
2395
|
-
if (type ===
|
|
2363
|
+
if (type === "components") {
|
|
2396
2364
|
const selfName = getComponentName(Component, false);
|
|
2397
2365
|
if (selfName && (selfName === name || selfName === (0, _vue_shared.camelize)(name) || selfName === (0, _vue_shared.capitalize)((0, _vue_shared.camelize)(name)))) return Component;
|
|
2398
2366
|
}
|
|
2399
2367
|
const res = resolve(instance[type] || Component[type], name) || resolve(instance.appContext[type], name);
|
|
2400
2368
|
if (!res && maybeSelfReference) return Component;
|
|
2401
2369
|
if (warnMissing && !res) {
|
|
2402
|
-
const extra = type ===
|
|
2370
|
+
const extra = type === "components" ? "\nIf this is a native custom element, make sure to exclude it from component resolution via compilerOptions.isCustomElement." : ``;
|
|
2403
2371
|
warn$1(`Failed to resolve ${type.slice(0, -1)}: ${name}${extra}`);
|
|
2404
2372
|
}
|
|
2405
2373
|
return res;
|
|
@@ -2408,7 +2376,6 @@ function resolveAsset(type, name, warnMissing = true, maybeSelfReference = false
|
|
|
2408
2376
|
function resolve(registry, name) {
|
|
2409
2377
|
return registry && (registry[name] || registry[(0, _vue_shared.camelize)(name)] || registry[(0, _vue_shared.capitalize)((0, _vue_shared.camelize)(name))]);
|
|
2410
2378
|
}
|
|
2411
|
-
|
|
2412
2379
|
//#endregion
|
|
2413
2380
|
//#region packages/runtime-core/src/helpers/renderList.ts
|
|
2414
2381
|
/**
|
|
@@ -2429,11 +2396,14 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2429
2396
|
}
|
|
2430
2397
|
ret = new Array(source.length);
|
|
2431
2398
|
for (let i = 0, l = source.length; i < l; i++) ret[i] = renderItem(needsWrap ? isReadonlySource ? (0, _vue_reactivity.toReadonly)((0, _vue_reactivity.toReactive)(source[i])) : (0, _vue_reactivity.toReactive)(source[i]) : source[i], i, void 0, cached && cached[i]);
|
|
2432
|
-
} else if (typeof source === "number") {
|
|
2433
|
-
|
|
2399
|
+
} else if (typeof source === "number") if (!Number.isInteger(source) || source < 0) {
|
|
2400
|
+
warn$1(`The v-for range expects a positive integer value but got ${source}.`);
|
|
2401
|
+
ret = [];
|
|
2402
|
+
} else {
|
|
2434
2403
|
ret = new Array(source);
|
|
2435
2404
|
for (let i = 0; i < source; i++) ret[i] = renderItem(i + 1, i, void 0, cached && cached[i]);
|
|
2436
|
-
}
|
|
2405
|
+
}
|
|
2406
|
+
else if ((0, _vue_shared.isObject)(source)) if (source[Symbol.iterator]) ret = Array.from(source, (item, i) => renderItem(item, i, void 0, cached && cached[i]));
|
|
2437
2407
|
else {
|
|
2438
2408
|
const keys = Object.keys(source);
|
|
2439
2409
|
ret = new Array(keys.length);
|
|
@@ -2446,7 +2416,6 @@ function renderList(source, renderItem, cache, index) {
|
|
|
2446
2416
|
if (cache) cache[index] = ret;
|
|
2447
2417
|
return ret;
|
|
2448
2418
|
}
|
|
2449
|
-
|
|
2450
2419
|
//#endregion
|
|
2451
2420
|
//#region packages/runtime-core/src/helpers/createSlots.ts
|
|
2452
2421
|
/**
|
|
@@ -2465,7 +2434,6 @@ function createSlots(slots, dynamicSlots) {
|
|
|
2465
2434
|
}
|
|
2466
2435
|
return slots;
|
|
2467
2436
|
}
|
|
2468
|
-
|
|
2469
2437
|
//#endregion
|
|
2470
2438
|
//#region packages/runtime-core/src/helpers/renderSlot.ts
|
|
2471
2439
|
/**
|
|
@@ -2516,7 +2484,6 @@ function ensureVaporSlotFallback(vnodes, fallback) {
|
|
|
2516
2484
|
if (!vaporSlot.fallback && fallback) vaporSlot.fallback = fallback;
|
|
2517
2485
|
}
|
|
2518
2486
|
}
|
|
2519
|
-
|
|
2520
2487
|
//#endregion
|
|
2521
2488
|
//#region packages/runtime-core/src/helpers/toHandlers.ts
|
|
2522
2489
|
/**
|
|
@@ -2532,7 +2499,6 @@ function toHandlers(obj, preserveCaseIfNecessary) {
|
|
|
2532
2499
|
for (const key in obj) ret[preserveCaseIfNecessary && /[A-Z]/.test(key) ? `on:${key}` : (0, _vue_shared.toHandlerKey)(key)] = obj[key];
|
|
2533
2500
|
return ret;
|
|
2534
2501
|
}
|
|
2535
|
-
|
|
2536
2502
|
//#endregion
|
|
2537
2503
|
//#region packages/runtime-core/src/componentPublicInstance.ts
|
|
2538
2504
|
/**
|
|
@@ -2711,7 +2677,6 @@ function exposeSetupStateOnRenderContext(instance) {
|
|
|
2711
2677
|
}
|
|
2712
2678
|
});
|
|
2713
2679
|
}
|
|
2714
|
-
|
|
2715
2680
|
//#endregion
|
|
2716
2681
|
//#region packages/runtime-core/src/apiSetupHelpers.ts
|
|
2717
2682
|
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.`);
|
|
@@ -2750,6 +2715,22 @@ function defineExpose(exposed) {
|
|
|
2750
2715
|
function defineOptions(options) {
|
|
2751
2716
|
warnRuntimeUsage(`defineOptions`);
|
|
2752
2717
|
}
|
|
2718
|
+
/**
|
|
2719
|
+
* Vue `<script setup>` compiler macro for providing type hints to IDEs for
|
|
2720
|
+
* slot name and slot props type checking.
|
|
2721
|
+
*
|
|
2722
|
+
* Example usage:
|
|
2723
|
+
* ```ts
|
|
2724
|
+
* const slots = defineSlots<{
|
|
2725
|
+
* default(props: { msg: string }): any
|
|
2726
|
+
* }>()
|
|
2727
|
+
* ```
|
|
2728
|
+
*
|
|
2729
|
+
* This is only usable inside `<script setup>`, is compiled away in the
|
|
2730
|
+
* output and should **not** be actually called at runtime.
|
|
2731
|
+
*
|
|
2732
|
+
* @see {@link https://vuejs.org/api/sfc-script-setup.html#defineslots}
|
|
2733
|
+
*/
|
|
2753
2734
|
function defineSlots() {
|
|
2754
2735
|
warnRuntimeUsage(`defineSlots`);
|
|
2755
2736
|
return null;
|
|
@@ -2866,21 +2847,29 @@ function createPropsRestProxy(props, excludedKeys) {
|
|
|
2866
2847
|
*/
|
|
2867
2848
|
function withAsyncContext(getAwaitable) {
|
|
2868
2849
|
const ctx = getCurrentGenericInstance();
|
|
2850
|
+
const inSSRSetup = isInSSRComponentSetup;
|
|
2869
2851
|
if (!ctx) warn$1("withAsyncContext called without active current instance. This is likely a bug.");
|
|
2870
2852
|
let awaitable = getAwaitable();
|
|
2871
2853
|
setCurrentInstance(null, void 0);
|
|
2872
|
-
|
|
2873
|
-
|
|
2854
|
+
if (inSSRSetup) setInSSRSetupState(false);
|
|
2855
|
+
const restore = () => {
|
|
2874
2856
|
setCurrentInstance(ctx);
|
|
2857
|
+
if (inSSRSetup) setInSSRSetupState(true);
|
|
2858
|
+
};
|
|
2859
|
+
const cleanup = () => {
|
|
2860
|
+
setCurrentInstance(null, void 0);
|
|
2861
|
+
if (inSSRSetup) setInSSRSetupState(false);
|
|
2862
|
+
};
|
|
2863
|
+
if ((0, _vue_shared.isPromise)(awaitable)) awaitable = awaitable.catch((e) => {
|
|
2864
|
+
restore();
|
|
2875
2865
|
Promise.resolve().then(() => Promise.resolve().then(cleanup));
|
|
2876
2866
|
throw e;
|
|
2877
2867
|
});
|
|
2878
2868
|
return [awaitable, () => {
|
|
2879
|
-
|
|
2869
|
+
restore();
|
|
2880
2870
|
Promise.resolve().then(cleanup);
|
|
2881
2871
|
}];
|
|
2882
2872
|
}
|
|
2883
|
-
|
|
2884
2873
|
//#endregion
|
|
2885
2874
|
//#region packages/runtime-core/src/componentOptions.ts
|
|
2886
2875
|
function createDuplicateChecker() {
|
|
@@ -3126,7 +3115,6 @@ function mergeWatchOptions(to, from) {
|
|
|
3126
3115
|
for (const key in from) merged[key] = mergeAsArray(to[key], from[key]);
|
|
3127
3116
|
return merged;
|
|
3128
3117
|
}
|
|
3129
|
-
|
|
3130
3118
|
//#endregion
|
|
3131
3119
|
//#region packages/runtime-core/src/apiCreateApp.ts
|
|
3132
3120
|
function createAppContext() {
|
|
@@ -3258,7 +3246,6 @@ function createAppAPI(mount, unmount, getPublicInstance, render) {
|
|
|
3258
3246
|
* `app.runWithContext()`.
|
|
3259
3247
|
*/
|
|
3260
3248
|
let currentApp = null;
|
|
3261
|
-
|
|
3262
3249
|
//#endregion
|
|
3263
3250
|
//#region packages/runtime-core/src/helpers/useModel.ts
|
|
3264
3251
|
function useModel(props, name, options = _vue_shared.EMPTY_OBJ) {
|
|
@@ -3331,7 +3318,6 @@ function useModel(props, name, options = _vue_shared.EMPTY_OBJ) {
|
|
|
3331
3318
|
const getModelModifiers = (props, modelName, getter) => {
|
|
3332
3319
|
return getter(props, (0, _vue_shared.getModifierPropName)(modelName)) || getter(props, `${(0, _vue_shared.camelize)(modelName)}Modifiers`) || getter(props, `${(0, _vue_shared.hyphenate)(modelName)}Modifiers`);
|
|
3333
3320
|
};
|
|
3334
|
-
|
|
3335
3321
|
//#endregion
|
|
3336
3322
|
//#region packages/runtime-core/src/componentEmits.ts
|
|
3337
3323
|
function emit(instance, event, ...rawArgs) {
|
|
@@ -3421,7 +3407,6 @@ function isEmitListener(options, key) {
|
|
|
3421
3407
|
key = key.slice(2).replace(/Once$/, "");
|
|
3422
3408
|
return (0, _vue_shared.hasOwn)(options, key[0].toLowerCase() + key.slice(1)) || (0, _vue_shared.hasOwn)(options, (0, _vue_shared.hyphenate)(key)) || (0, _vue_shared.hasOwn)(options, key);
|
|
3423
3409
|
}
|
|
3424
|
-
|
|
3425
3410
|
//#endregion
|
|
3426
3411
|
//#region packages/runtime-core/src/componentRenderUtils.ts
|
|
3427
3412
|
/**
|
|
@@ -3613,7 +3598,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3613
3598
|
} else break;
|
|
3614
3599
|
}
|
|
3615
3600
|
}
|
|
3616
|
-
|
|
3617
3601
|
//#endregion
|
|
3618
3602
|
//#region packages/runtime-core/src/internalObject.ts
|
|
3619
3603
|
/**
|
|
@@ -3625,7 +3609,6 @@ function updateHOCHostEl({ vnode, parent }, el) {
|
|
|
3625
3609
|
const internalObjectProto = {};
|
|
3626
3610
|
const createInternalObject = () => Object.create(internalObjectProto);
|
|
3627
3611
|
const isInternalObject = (obj) => Object.getPrototypeOf(obj) === internalObjectProto;
|
|
3628
|
-
|
|
3629
3612
|
//#endregion
|
|
3630
3613
|
//#region packages/runtime-core/src/componentProps.ts
|
|
3631
3614
|
function initProps(instance, rawProps, isStateful, isSSR = false) {
|
|
@@ -3921,7 +3904,6 @@ function isExplicable(type) {
|
|
|
3921
3904
|
function isBoolean(...args) {
|
|
3922
3905
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
3923
3906
|
}
|
|
3924
|
-
|
|
3925
3907
|
//#endregion
|
|
3926
3908
|
//#region packages/runtime-core/src/componentSlots.ts
|
|
3927
3909
|
const isInternalKey = (key) => key === "_" || key === "_ctx" || key === "$stable";
|
|
@@ -3990,7 +3972,6 @@ const updateSlots = (instance, children, optimized) => {
|
|
|
3990
3972
|
for (const key in slots) if (!isInternalKey(key) && deletionComparisonTarget[key] == null) delete slots[key];
|
|
3991
3973
|
}
|
|
3992
3974
|
};
|
|
3993
|
-
|
|
3994
3975
|
//#endregion
|
|
3995
3976
|
//#region packages/runtime-core/src/profiling.ts
|
|
3996
3977
|
let supported;
|
|
@@ -4029,7 +4010,6 @@ function isSupported() {
|
|
|
4029
4010
|
} else supported = false;
|
|
4030
4011
|
return supported;
|
|
4031
4012
|
}
|
|
4032
|
-
|
|
4033
4013
|
//#endregion
|
|
4034
4014
|
//#region packages/runtime-core/src/renderer.ts
|
|
4035
4015
|
const MoveType = {
|
|
@@ -4417,7 +4397,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4417
4397
|
if (isAsyncWrapperVNode && type.__asyncHydrate) type.__asyncHydrate(el, instance, hydrateSubTree);
|
|
4418
4398
|
else hydrateSubTree();
|
|
4419
4399
|
} else {
|
|
4420
|
-
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type);
|
|
4400
|
+
if (root.ce && root.ce._hasShadowRoot()) root.ce._injectChildStyle(type, instance.parent ? instance.parent.type : void 0);
|
|
4421
4401
|
startMeasure(instance, `render`);
|
|
4422
4402
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
4423
4403
|
endMeasure(instance, `render`);
|
|
@@ -4931,12 +4911,11 @@ function resolveAsyncComponentPlaceholder(anchorVnode) {
|
|
|
4931
4911
|
if (instance) return resolveAsyncComponentPlaceholder(instance.subTree);
|
|
4932
4912
|
return null;
|
|
4933
4913
|
}
|
|
4934
|
-
|
|
4935
4914
|
//#endregion
|
|
4936
4915
|
//#region packages/runtime-core/src/components/Suspense.ts
|
|
4937
4916
|
const isSuspense = (type) => type.__isSuspense;
|
|
4938
4917
|
let suspenseId = 0;
|
|
4939
|
-
const
|
|
4918
|
+
const Suspense = {
|
|
4940
4919
|
name: "Suspense",
|
|
4941
4920
|
__isSuspense: true,
|
|
4942
4921
|
process(n1, n2, container, anchor, parentComponent, parentSuspense, namespace, slotScopeIds, optimized, rendererInternals) {
|
|
@@ -4954,7 +4933,6 @@ const SuspenseImpl = {
|
|
|
4954
4933
|
hydrate: hydrateSuspense,
|
|
4955
4934
|
normalize: normalizeSuspenseChildren
|
|
4956
4935
|
};
|
|
4957
|
-
const Suspense = SuspenseImpl;
|
|
4958
4936
|
function triggerEvent(vnode, name) {
|
|
4959
4937
|
const eventListener = vnode.props && vnode.props[name];
|
|
4960
4938
|
if ((0, _vue_shared.isFunction)(eventListener)) eventListener();
|
|
@@ -5215,7 +5193,6 @@ function isVNodeSuspensible(vnode) {
|
|
|
5215
5193
|
const suspensible = vnode.props && vnode.props.suspensible;
|
|
5216
5194
|
return suspensible != null && suspensible !== false;
|
|
5217
5195
|
}
|
|
5218
|
-
|
|
5219
5196
|
//#endregion
|
|
5220
5197
|
//#region packages/runtime-core/src/vnode.ts
|
|
5221
5198
|
const Fragment = Symbol.for("v-fgt");
|
|
@@ -5533,7 +5510,6 @@ function mergeProps(...args) {
|
|
|
5533
5510
|
function invokeVNodeHook(hook, instance, vnode, prevVNode = null) {
|
|
5534
5511
|
callWithAsyncErrorHandling(hook, instance, 7, [vnode, prevVNode]);
|
|
5535
5512
|
}
|
|
5536
|
-
|
|
5537
5513
|
//#endregion
|
|
5538
5514
|
//#region packages/runtime-core/src/componentCurrentInstance.ts
|
|
5539
5515
|
/**
|
|
@@ -5601,7 +5577,6 @@ const useInstanceOption = (key, silent = false) => {
|
|
|
5601
5577
|
value: instance[key]
|
|
5602
5578
|
};
|
|
5603
5579
|
};
|
|
5604
|
-
|
|
5605
5580
|
//#endregion
|
|
5606
5581
|
//#region packages/runtime-core/src/component.ts
|
|
5607
5582
|
const emptyAppContext = /* @__PURE__ */ createAppContext();
|
|
@@ -5897,13 +5872,11 @@ function formatComponentName(instance, Component, isRoot = false) {
|
|
|
5897
5872
|
function isClassComponent(value) {
|
|
5898
5873
|
return (0, _vue_shared.isFunction)(value) && "__vccOpts" in value;
|
|
5899
5874
|
}
|
|
5900
|
-
|
|
5901
5875
|
//#endregion
|
|
5902
5876
|
//#region packages/runtime-core/src/apiComputed.ts
|
|
5903
5877
|
const computed = (getterOrOptions, debugOptions) => {
|
|
5904
5878
|
return (0, _vue_reactivity.computed)(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
5905
5879
|
};
|
|
5906
|
-
|
|
5907
5880
|
//#endregion
|
|
5908
5881
|
//#region packages/runtime-core/src/h.ts
|
|
5909
5882
|
function h(type, propsOrChildren, children) {
|
|
@@ -5923,7 +5896,6 @@ function h(type, propsOrChildren, children) {
|
|
|
5923
5896
|
setBlockTracking(1);
|
|
5924
5897
|
}
|
|
5925
5898
|
}
|
|
5926
|
-
|
|
5927
5899
|
//#endregion
|
|
5928
5900
|
//#region packages/runtime-core/src/customFormatter.ts
|
|
5929
5901
|
function initCustomFormatter() {
|
|
@@ -6088,7 +6060,6 @@ function initCustomFormatter() {
|
|
|
6088
6060
|
if (window.devtoolsFormatters) window.devtoolsFormatters.push(formatter);
|
|
6089
6061
|
else window.devtoolsFormatters = [formatter];
|
|
6090
6062
|
}
|
|
6091
|
-
|
|
6092
6063
|
//#endregion
|
|
6093
6064
|
//#region packages/runtime-core/src/helpers/withMemo.ts
|
|
6094
6065
|
function withMemo(memo, render, cache, index) {
|
|
@@ -6106,10 +6077,9 @@ function isMemoSame(cached, memo) {
|
|
|
6106
6077
|
if (isBlockTreeEnabled > 0 && currentBlock) currentBlock.push(cached);
|
|
6107
6078
|
return true;
|
|
6108
6079
|
}
|
|
6109
|
-
|
|
6110
6080
|
//#endregion
|
|
6111
6081
|
//#region packages/runtime-core/src/index.ts
|
|
6112
|
-
const version = "3.6.0-beta.
|
|
6082
|
+
const version = "3.6.0-beta.8";
|
|
6113
6083
|
const warn = warn$1;
|
|
6114
6084
|
/**
|
|
6115
6085
|
* Runtime error messages. Only exposed in dev or esm builds.
|
|
@@ -6118,7 +6088,11 @@ const warn = warn$1;
|
|
|
6118
6088
|
const ErrorTypeStrings = ErrorTypeStrings$1;
|
|
6119
6089
|
const devtools = devtools$1;
|
|
6120
6090
|
const setDevtoolsHook = setDevtoolsHook$1;
|
|
6121
|
-
|
|
6091
|
+
/**
|
|
6092
|
+
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
6093
|
+
* @internal
|
|
6094
|
+
*/
|
|
6095
|
+
const ssrUtils = {
|
|
6122
6096
|
createComponentInstance,
|
|
6123
6097
|
setupComponent,
|
|
6124
6098
|
renderComponentRoot,
|
|
@@ -6131,11 +6105,6 @@ const _ssrUtils = {
|
|
|
6131
6105
|
popWarningContext
|
|
6132
6106
|
};
|
|
6133
6107
|
/**
|
|
6134
|
-
* SSR utils for \@vue/server-renderer. Only exposed in ssr-possible builds.
|
|
6135
|
-
* @internal
|
|
6136
|
-
*/
|
|
6137
|
-
const ssrUtils = _ssrUtils;
|
|
6138
|
-
/**
|
|
6139
6108
|
* @internal only exposed in compat builds
|
|
6140
6109
|
*/
|
|
6141
6110
|
const resolveFilter = null;
|
|
@@ -6144,7 +6113,6 @@ const resolveFilter = null;
|
|
|
6144
6113
|
*/
|
|
6145
6114
|
const compatUtils = null;
|
|
6146
6115
|
const DeprecationTypes = null;
|
|
6147
|
-
|
|
6148
6116
|
//#endregion
|
|
6149
6117
|
exports.BaseTransition = BaseTransition;
|
|
6150
6118
|
exports.BaseTransitionPropsValidators = BaseTransitionPropsValidators;
|
|
@@ -6295,4 +6263,4 @@ exports.withCtx = withCtx;
|
|
|
6295
6263
|
exports.withDefaults = withDefaults;
|
|
6296
6264
|
exports.withDirectives = withDirectives;
|
|
6297
6265
|
exports.withMemo = withMemo;
|
|
6298
|
-
exports.withScopeId = withScopeId;
|
|
6266
|
+
exports.withScopeId = withScopeId;
|