@vue/runtime-core 3.5.16 → 3.5.18
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 +38 -26
- package/dist/runtime-core.cjs.prod.js +31 -15
- package/dist/runtime-core.d.ts +1 -0
- package/dist/runtime-core.esm-bundler.js +39 -27
- package/package.json +3 -3
package/dist/runtime-core.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2229,10 +2229,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
2229
2229
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
2230
2230
|
const cssVars = instance.getCssVars();
|
|
2231
2231
|
for (const key in cssVars) {
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
String(cssVars[key])
|
|
2235
|
-
);
|
|
2232
|
+
const value = shared.normalizeCssVarValue(cssVars[key]);
|
|
2233
|
+
expectedMap.set(`--${shared.getEscapedCssVarName(key, false)}`, value);
|
|
2236
2234
|
}
|
|
2237
2235
|
}
|
|
2238
2236
|
if (vnode === root && instance.parent) {
|
|
@@ -2263,7 +2261,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2263
2261
|
if (allowedType === 0 /* TEXT */ && list.includes("children")) {
|
|
2264
2262
|
return true;
|
|
2265
2263
|
}
|
|
2266
|
-
return
|
|
2264
|
+
return list.includes(MismatchTypeString[allowedType]);
|
|
2267
2265
|
}
|
|
2268
2266
|
}
|
|
2269
2267
|
|
|
@@ -2421,16 +2419,19 @@ function defineAsyncComponent(source) {
|
|
|
2421
2419
|
__asyncLoader: load,
|
|
2422
2420
|
__asyncHydrate(el, instance, hydrate) {
|
|
2423
2421
|
let patched = false;
|
|
2424
|
-
|
|
2425
|
-
|
|
2426
|
-
|
|
2422
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2423
|
+
const performHydrate = () => {
|
|
2424
|
+
if (patched) {
|
|
2425
|
+
{
|
|
2427
2426
|
warn$1(
|
|
2428
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
2427
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
2429
2428
|
);
|
|
2430
|
-
return;
|
|
2431
2429
|
}
|
|
2432
|
-
|
|
2433
|
-
}
|
|
2430
|
+
return;
|
|
2431
|
+
}
|
|
2432
|
+
hydrate();
|
|
2433
|
+
};
|
|
2434
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
2434
2435
|
const teardown = hydrateStrategy(
|
|
2435
2436
|
performHydrate,
|
|
2436
2437
|
(cb) => forEachElement(el, cb)
|
|
@@ -2438,8 +2439,7 @@ function defineAsyncComponent(source) {
|
|
|
2438
2439
|
if (teardown) {
|
|
2439
2440
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
2440
2441
|
}
|
|
2441
|
-
|
|
2442
|
-
} : hydrate;
|
|
2442
|
+
} : performHydrate;
|
|
2443
2443
|
if (resolvedComp) {
|
|
2444
2444
|
doHydrate();
|
|
2445
2445
|
} else {
|
|
@@ -3315,15 +3315,15 @@ function withDefaults(props, defaults) {
|
|
|
3315
3315
|
return null;
|
|
3316
3316
|
}
|
|
3317
3317
|
function useSlots() {
|
|
3318
|
-
return getContext().slots;
|
|
3318
|
+
return getContext("useSlots").slots;
|
|
3319
3319
|
}
|
|
3320
3320
|
function useAttrs() {
|
|
3321
|
-
return getContext().attrs;
|
|
3321
|
+
return getContext("useAttrs").attrs;
|
|
3322
3322
|
}
|
|
3323
|
-
function getContext() {
|
|
3323
|
+
function getContext(calledFunctionName) {
|
|
3324
3324
|
const i = getCurrentInstance();
|
|
3325
3325
|
if (!i) {
|
|
3326
|
-
warn$1(
|
|
3326
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
3327
3327
|
}
|
|
3328
3328
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
3329
3329
|
}
|
|
@@ -3574,7 +3574,8 @@ function applyOptions(instance) {
|
|
|
3574
3574
|
expose.forEach((key) => {
|
|
3575
3575
|
Object.defineProperty(exposed, key, {
|
|
3576
3576
|
get: () => publicThis[key],
|
|
3577
|
-
set: (val) => publicThis[key] = val
|
|
3577
|
+
set: (val) => publicThis[key] = val,
|
|
3578
|
+
enumerable: true
|
|
3578
3579
|
});
|
|
3579
3580
|
});
|
|
3580
3581
|
} else if (!instance.exposed) {
|
|
@@ -4024,7 +4025,7 @@ function provide(key, value) {
|
|
|
4024
4025
|
}
|
|
4025
4026
|
}
|
|
4026
4027
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4027
|
-
const instance =
|
|
4028
|
+
const instance = getCurrentInstance();
|
|
4028
4029
|
if (instance || currentApp) {
|
|
4029
4030
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4030
4031
|
if (provides && key in provides) {
|
|
@@ -4039,7 +4040,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
4039
4040
|
}
|
|
4040
4041
|
}
|
|
4041
4042
|
function hasInjectionContext() {
|
|
4042
|
-
return !!(
|
|
4043
|
+
return !!(getCurrentInstance() || currentApp);
|
|
4043
4044
|
}
|
|
4044
4045
|
|
|
4045
4046
|
const internalObjectProto = {};
|
|
@@ -4453,7 +4454,7 @@ function isBoolean(...args) {
|
|
|
4453
4454
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
4454
4455
|
}
|
|
4455
4456
|
|
|
4456
|
-
const isInternalKey = (key) => key
|
|
4457
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
4457
4458
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
4458
4459
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
4459
4460
|
if (rawSlot._n) {
|
|
@@ -4507,6 +4508,8 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
4507
4508
|
const initSlots = (instance, children, optimized) => {
|
|
4508
4509
|
const slots = instance.slots = createInternalObject();
|
|
4509
4510
|
if (instance.vnode.shapeFlag & 32) {
|
|
4511
|
+
const cacheIndexes = children.__;
|
|
4512
|
+
if (cacheIndexes) shared.def(slots, "__", cacheIndexes, true);
|
|
4510
4513
|
const type = children._;
|
|
4511
4514
|
if (type) {
|
|
4512
4515
|
assignSlots(slots, children, optimized);
|
|
@@ -4718,6 +4721,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4718
4721
|
}
|
|
4719
4722
|
if (ref != null && parentComponent) {
|
|
4720
4723
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
4724
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
4725
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
4721
4726
|
}
|
|
4722
4727
|
};
|
|
4723
4728
|
const processText = (n1, n2, container, anchor) => {
|
|
@@ -5191,6 +5196,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5191
5196
|
if (!initialVNode.el) {
|
|
5192
5197
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
5193
5198
|
processCommentNode(null, placeholder, container, anchor);
|
|
5199
|
+
initialVNode.placeholder = placeholder.el;
|
|
5194
5200
|
}
|
|
5195
5201
|
} else {
|
|
5196
5202
|
setupRenderEffect(
|
|
@@ -5277,7 +5283,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5277
5283
|
hydrateSubTree();
|
|
5278
5284
|
}
|
|
5279
5285
|
} else {
|
|
5280
|
-
if (root.ce
|
|
5286
|
+
if (root.ce && // @ts-expect-error _def is private
|
|
5287
|
+
root.ce._def.shadowRoot !== false) {
|
|
5281
5288
|
root.ce._injectChildStyle(type);
|
|
5282
5289
|
}
|
|
5283
5290
|
{
|
|
@@ -5691,7 +5698,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5691
5698
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
5692
5699
|
const nextIndex = s2 + i;
|
|
5693
5700
|
const nextChild = c2[nextIndex];
|
|
5694
|
-
const
|
|
5701
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
5702
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
5703
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
5704
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
5705
|
+
) : parentAnchor;
|
|
5695
5706
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
5696
5707
|
patch(
|
|
5697
5708
|
null,
|
|
@@ -7584,6 +7595,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7584
7595
|
suspense: vnode.suspense,
|
|
7585
7596
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
7586
7597
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
7598
|
+
placeholder: vnode.placeholder,
|
|
7587
7599
|
el: vnode.el,
|
|
7588
7600
|
anchor: vnode.anchor,
|
|
7589
7601
|
ctx: vnode.ctx,
|
|
@@ -8375,7 +8387,7 @@ function isMemoSame(cached, memo) {
|
|
|
8375
8387
|
return true;
|
|
8376
8388
|
}
|
|
8377
8389
|
|
|
8378
|
-
const version = "3.5.
|
|
8390
|
+
const version = "3.5.18";
|
|
8379
8391
|
const warn = warn$1 ;
|
|
8380
8392
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8381
8393
|
const devtools = devtools$1 ;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -1632,7 +1632,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
1632
1632
|
if (allowedType === 0 /* TEXT */ && list.includes("children")) {
|
|
1633
1633
|
return true;
|
|
1634
1634
|
}
|
|
1635
|
-
return
|
|
1635
|
+
return list.includes(MismatchTypeString[allowedType]);
|
|
1636
1636
|
}
|
|
1637
1637
|
}
|
|
1638
1638
|
|
|
@@ -1781,10 +1781,15 @@ function defineAsyncComponent(source) {
|
|
|
1781
1781
|
name: "AsyncComponentWrapper",
|
|
1782
1782
|
__asyncLoader: load,
|
|
1783
1783
|
__asyncHydrate(el, instance, hydrate) {
|
|
1784
|
+
let patched = false;
|
|
1785
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
1786
|
+
const performHydrate = () => {
|
|
1787
|
+
if (patched) {
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
hydrate();
|
|
1791
|
+
};
|
|
1784
1792
|
const doHydrate = hydrateStrategy ? () => {
|
|
1785
|
-
const performHydrate = () => {
|
|
1786
|
-
hydrate();
|
|
1787
|
-
};
|
|
1788
1793
|
const teardown = hydrateStrategy(
|
|
1789
1794
|
performHydrate,
|
|
1790
1795
|
(cb) => forEachElement(el, cb)
|
|
@@ -1792,8 +1797,7 @@ function defineAsyncComponent(source) {
|
|
|
1792
1797
|
if (teardown) {
|
|
1793
1798
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
1794
1799
|
}
|
|
1795
|
-
|
|
1796
|
-
} : hydrate;
|
|
1800
|
+
} : performHydrate;
|
|
1797
1801
|
if (resolvedComp) {
|
|
1798
1802
|
doHydrate();
|
|
1799
1803
|
} else {
|
|
@@ -2506,7 +2510,7 @@ function useSlots() {
|
|
|
2506
2510
|
function useAttrs() {
|
|
2507
2511
|
return getContext().attrs;
|
|
2508
2512
|
}
|
|
2509
|
-
function getContext() {
|
|
2513
|
+
function getContext(calledFunctionName) {
|
|
2510
2514
|
const i = getCurrentInstance();
|
|
2511
2515
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
2512
2516
|
}
|
|
@@ -2685,7 +2689,8 @@ function applyOptions(instance) {
|
|
|
2685
2689
|
expose.forEach((key) => {
|
|
2686
2690
|
Object.defineProperty(exposed, key, {
|
|
2687
2691
|
get: () => publicThis[key],
|
|
2688
|
-
set: (val) => publicThis[key] = val
|
|
2692
|
+
set: (val) => publicThis[key] = val,
|
|
2693
|
+
enumerable: true
|
|
2689
2694
|
});
|
|
2690
2695
|
});
|
|
2691
2696
|
} else if (!instance.exposed) {
|
|
@@ -3046,7 +3051,7 @@ function provide(key, value) {
|
|
|
3046
3051
|
}
|
|
3047
3052
|
}
|
|
3048
3053
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
3049
|
-
const instance =
|
|
3054
|
+
const instance = getCurrentInstance();
|
|
3050
3055
|
if (instance || currentApp) {
|
|
3051
3056
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
3052
3057
|
if (provides && key in provides) {
|
|
@@ -3057,7 +3062,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
3057
3062
|
}
|
|
3058
3063
|
}
|
|
3059
3064
|
function hasInjectionContext() {
|
|
3060
|
-
return !!(
|
|
3065
|
+
return !!(getCurrentInstance() || currentApp);
|
|
3061
3066
|
}
|
|
3062
3067
|
|
|
3063
3068
|
const internalObjectProto = {};
|
|
@@ -3336,7 +3341,7 @@ function validatePropName(key) {
|
|
|
3336
3341
|
return false;
|
|
3337
3342
|
}
|
|
3338
3343
|
|
|
3339
|
-
const isInternalKey = (key) => key
|
|
3344
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
3340
3345
|
const normalizeSlotValue = (value) => shared.isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
3341
3346
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
3342
3347
|
if (rawSlot._n) {
|
|
@@ -3376,6 +3381,8 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
3376
3381
|
const initSlots = (instance, children, optimized) => {
|
|
3377
3382
|
const slots = instance.slots = createInternalObject();
|
|
3378
3383
|
if (instance.vnode.shapeFlag & 32) {
|
|
3384
|
+
const cacheIndexes = children.__;
|
|
3385
|
+
if (cacheIndexes) shared.def(slots, "__", cacheIndexes, true);
|
|
3379
3386
|
const type = children._;
|
|
3380
3387
|
if (type) {
|
|
3381
3388
|
assignSlots(slots, children, optimized);
|
|
@@ -3537,6 +3544,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3537
3544
|
}
|
|
3538
3545
|
if (ref != null && parentComponent) {
|
|
3539
3546
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
3547
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
3548
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
3540
3549
|
}
|
|
3541
3550
|
};
|
|
3542
3551
|
const processText = (n1, n2, container, anchor) => {
|
|
@@ -3966,6 +3975,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
3966
3975
|
if (!initialVNode.el) {
|
|
3967
3976
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
3968
3977
|
processCommentNode(null, placeholder, container, anchor);
|
|
3978
|
+
initialVNode.placeholder = placeholder.el;
|
|
3969
3979
|
}
|
|
3970
3980
|
} else {
|
|
3971
3981
|
setupRenderEffect(
|
|
@@ -4030,7 +4040,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4030
4040
|
hydrateSubTree();
|
|
4031
4041
|
}
|
|
4032
4042
|
} else {
|
|
4033
|
-
if (root.ce
|
|
4043
|
+
if (root.ce && // @ts-expect-error _def is private
|
|
4044
|
+
root.ce._def.shadowRoot !== false) {
|
|
4034
4045
|
root.ce._injectChildStyle(type);
|
|
4035
4046
|
}
|
|
4036
4047
|
const subTree = instance.subTree = renderComponentRoot(instance);
|
|
@@ -4397,7 +4408,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4397
4408
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
4398
4409
|
const nextIndex = s2 + i;
|
|
4399
4410
|
const nextChild = c2[nextIndex];
|
|
4400
|
-
const
|
|
4411
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
4412
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
4413
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
4414
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
4415
|
+
) : parentAnchor;
|
|
4401
4416
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
4402
4417
|
patch(
|
|
4403
4418
|
null,
|
|
@@ -6056,6 +6071,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
6056
6071
|
suspense: vnode.suspense,
|
|
6057
6072
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
6058
6073
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
6074
|
+
placeholder: vnode.placeholder,
|
|
6059
6075
|
el: vnode.el,
|
|
6060
6076
|
anchor: vnode.anchor,
|
|
6061
6077
|
ctx: vnode.ctx,
|
|
@@ -6521,7 +6537,7 @@ function isMemoSame(cached, memo) {
|
|
|
6521
6537
|
return true;
|
|
6522
6538
|
}
|
|
6523
6539
|
|
|
6524
|
-
const version = "3.5.
|
|
6540
|
+
const version = "3.5.18";
|
|
6525
6541
|
const warn$1 = shared.NOOP;
|
|
6526
6542
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
6527
6543
|
const devtools = void 0;
|
package/dist/runtime-core.d.ts
CHANGED
|
@@ -1220,6 +1220,7 @@ export interface VNode<HostNode = RendererNode, HostElement = RendererElement, E
|
|
|
1220
1220
|
dirs: DirectiveBinding[] | null;
|
|
1221
1221
|
transition: TransitionHooks<HostElement> | null;
|
|
1222
1222
|
el: HostNode | null;
|
|
1223
|
+
placeholder: HostNode | null;
|
|
1223
1224
|
anchor: HostNode | null;
|
|
1224
1225
|
target: HostElement | null;
|
|
1225
1226
|
targetStart: HostNode | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-core v3.5.
|
|
2
|
+
* @vue/runtime-core v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
6
6
|
import { pauseTracking, resetTracking, isRef, toRaw, traverse, shallowRef, readonly, isReactive, ref, isShallow, isReadonly, shallowReadArray, toReadonly, toReactive, shallowReadonly, track, reactive, shallowReactive, trigger, ReactiveEffect, watch as watch$1, customRef, isProxy, proxyRefs, markRaw, EffectScope, computed as computed$1 } from '@vue/reactivity';
|
|
7
7
|
export { EffectScope, ReactiveEffect, TrackOpTypes, TriggerOpTypes, customRef, effect, effectScope, getCurrentScope, getCurrentWatcher, isProxy, isReactive, isReadonly, isRef, isShallow, markRaw, onScopeDispose, onWatcherCleanup, proxyRefs, reactive, readonly, ref, shallowReactive, shallowReadonly, shallowRef, stop, toRaw, toRef, toRefs, toValue, triggerRef, unref } from '@vue/reactivity';
|
|
8
|
-
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, NO, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
|
|
8
|
+
import { isString, isFunction, EMPTY_OBJ, isPromise, isArray, NOOP, getGlobalThis, extend, isBuiltInDirective, hasOwn, remove, def, isOn, isReservedProp, normalizeClass, stringifyStyle, normalizeStyle, isKnownSvgAttr, isBooleanAttr, isKnownHtmlAttr, includeBooleanAttr, isRenderableAttrValue, normalizeCssVarValue, getEscapedCssVarName, isObject, isRegExp, invokeArrayFns, toHandlerKey, camelize, capitalize, isSymbol, isGloballyAllowed, NO, EMPTY_ARR, hyphenate, makeMap, toRawType, hasChanged, looseToNumber, isModelListener, toNumber } from '@vue/shared';
|
|
9
9
|
export { camelize, capitalize, normalizeClass, normalizeProps, normalizeStyle, toDisplayString, toHandlerKey } from '@vue/shared';
|
|
10
10
|
|
|
11
11
|
const stack = [];
|
|
@@ -2244,10 +2244,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
2244
2244
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
2245
2245
|
const cssVars = instance.getCssVars();
|
|
2246
2246
|
for (const key in cssVars) {
|
|
2247
|
-
|
|
2248
|
-
|
|
2249
|
-
String(cssVars[key])
|
|
2250
|
-
);
|
|
2247
|
+
const value = normalizeCssVarValue(cssVars[key]);
|
|
2248
|
+
expectedMap.set(`--${getEscapedCssVarName(key, false)}`, value);
|
|
2251
2249
|
}
|
|
2252
2250
|
}
|
|
2253
2251
|
if (vnode === root && instance.parent) {
|
|
@@ -2278,7 +2276,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
2278
2276
|
if (allowedType === 0 /* TEXT */ && list.includes("children")) {
|
|
2279
2277
|
return true;
|
|
2280
2278
|
}
|
|
2281
|
-
return
|
|
2279
|
+
return list.includes(MismatchTypeString[allowedType]);
|
|
2282
2280
|
}
|
|
2283
2281
|
}
|
|
2284
2282
|
|
|
@@ -2436,16 +2434,19 @@ function defineAsyncComponent(source) {
|
|
|
2436
2434
|
__asyncLoader: load,
|
|
2437
2435
|
__asyncHydrate(el, instance, hydrate) {
|
|
2438
2436
|
let patched = false;
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2437
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
2438
|
+
const performHydrate = () => {
|
|
2439
|
+
if (patched) {
|
|
2440
|
+
if (!!(process.env.NODE_ENV !== "production")) {
|
|
2442
2441
|
warn$1(
|
|
2443
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
2442
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
2444
2443
|
);
|
|
2445
|
-
return;
|
|
2446
2444
|
}
|
|
2447
|
-
|
|
2448
|
-
}
|
|
2445
|
+
return;
|
|
2446
|
+
}
|
|
2447
|
+
hydrate();
|
|
2448
|
+
};
|
|
2449
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
2449
2450
|
const teardown = hydrateStrategy(
|
|
2450
2451
|
performHydrate,
|
|
2451
2452
|
(cb) => forEachElement(el, cb)
|
|
@@ -2453,8 +2454,7 @@ function defineAsyncComponent(source) {
|
|
|
2453
2454
|
if (teardown) {
|
|
2454
2455
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
2455
2456
|
}
|
|
2456
|
-
|
|
2457
|
-
} : hydrate;
|
|
2457
|
+
} : performHydrate;
|
|
2458
2458
|
if (resolvedComp) {
|
|
2459
2459
|
doHydrate();
|
|
2460
2460
|
} else {
|
|
@@ -3333,15 +3333,15 @@ function withDefaults(props, defaults) {
|
|
|
3333
3333
|
return null;
|
|
3334
3334
|
}
|
|
3335
3335
|
function useSlots() {
|
|
3336
|
-
return getContext().slots;
|
|
3336
|
+
return getContext("useSlots").slots;
|
|
3337
3337
|
}
|
|
3338
3338
|
function useAttrs() {
|
|
3339
|
-
return getContext().attrs;
|
|
3339
|
+
return getContext("useAttrs").attrs;
|
|
3340
3340
|
}
|
|
3341
|
-
function getContext() {
|
|
3341
|
+
function getContext(calledFunctionName) {
|
|
3342
3342
|
const i = getCurrentInstance();
|
|
3343
3343
|
if (!!(process.env.NODE_ENV !== "production") && !i) {
|
|
3344
|
-
warn$1(
|
|
3344
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
3345
3345
|
}
|
|
3346
3346
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
3347
3347
|
}
|
|
@@ -3594,7 +3594,8 @@ function applyOptions(instance) {
|
|
|
3594
3594
|
expose.forEach((key) => {
|
|
3595
3595
|
Object.defineProperty(exposed, key, {
|
|
3596
3596
|
get: () => publicThis[key],
|
|
3597
|
-
set: (val) => publicThis[key] = val
|
|
3597
|
+
set: (val) => publicThis[key] = val,
|
|
3598
|
+
enumerable: true
|
|
3598
3599
|
});
|
|
3599
3600
|
});
|
|
3600
3601
|
} else if (!instance.exposed) {
|
|
@@ -4046,7 +4047,7 @@ function provide(key, value) {
|
|
|
4046
4047
|
}
|
|
4047
4048
|
}
|
|
4048
4049
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
4049
|
-
const instance =
|
|
4050
|
+
const instance = getCurrentInstance();
|
|
4050
4051
|
if (instance || currentApp) {
|
|
4051
4052
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
4052
4053
|
if (provides && key in provides) {
|
|
@@ -4061,7 +4062,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
4061
4062
|
}
|
|
4062
4063
|
}
|
|
4063
4064
|
function hasInjectionContext() {
|
|
4064
|
-
return !!(
|
|
4065
|
+
return !!(getCurrentInstance() || currentApp);
|
|
4065
4066
|
}
|
|
4066
4067
|
|
|
4067
4068
|
const internalObjectProto = {};
|
|
@@ -4475,7 +4476,7 @@ function isBoolean(...args) {
|
|
|
4475
4476
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
4476
4477
|
}
|
|
4477
4478
|
|
|
4478
|
-
const isInternalKey = (key) => key
|
|
4479
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
4479
4480
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
4480
4481
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
4481
4482
|
if (rawSlot._n) {
|
|
@@ -4529,6 +4530,8 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
4529
4530
|
const initSlots = (instance, children, optimized) => {
|
|
4530
4531
|
const slots = instance.slots = createInternalObject();
|
|
4531
4532
|
if (instance.vnode.shapeFlag & 32) {
|
|
4533
|
+
const cacheIndexes = children.__;
|
|
4534
|
+
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
4532
4535
|
const type = children._;
|
|
4533
4536
|
if (type) {
|
|
4534
4537
|
assignSlots(slots, children, optimized);
|
|
@@ -4767,6 +4770,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
4767
4770
|
}
|
|
4768
4771
|
if (ref != null && parentComponent) {
|
|
4769
4772
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
4773
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
4774
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
4770
4775
|
}
|
|
4771
4776
|
};
|
|
4772
4777
|
const processText = (n1, n2, container, anchor) => {
|
|
@@ -5251,6 +5256,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5251
5256
|
if (!initialVNode.el) {
|
|
5252
5257
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
5253
5258
|
processCommentNode(null, placeholder, container, anchor);
|
|
5259
|
+
initialVNode.placeholder = placeholder.el;
|
|
5254
5260
|
}
|
|
5255
5261
|
} else {
|
|
5256
5262
|
setupRenderEffect(
|
|
@@ -5337,7 +5343,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5337
5343
|
hydrateSubTree();
|
|
5338
5344
|
}
|
|
5339
5345
|
} else {
|
|
5340
|
-
if (root.ce
|
|
5346
|
+
if (root.ce && // @ts-expect-error _def is private
|
|
5347
|
+
root.ce._def.shadowRoot !== false) {
|
|
5341
5348
|
root.ce._injectChildStyle(type);
|
|
5342
5349
|
}
|
|
5343
5350
|
if (!!(process.env.NODE_ENV !== "production")) {
|
|
@@ -5751,7 +5758,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
5751
5758
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
5752
5759
|
const nextIndex = s2 + i;
|
|
5753
5760
|
const nextChild = c2[nextIndex];
|
|
5754
|
-
const
|
|
5761
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
5762
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
5763
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
5764
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
5765
|
+
) : parentAnchor;
|
|
5755
5766
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
5756
5767
|
patch(
|
|
5757
5768
|
null,
|
|
@@ -7644,6 +7655,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
7644
7655
|
suspense: vnode.suspense,
|
|
7645
7656
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
7646
7657
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
7658
|
+
placeholder: vnode.placeholder,
|
|
7647
7659
|
el: vnode.el,
|
|
7648
7660
|
anchor: vnode.anchor,
|
|
7649
7661
|
ctx: vnode.ctx,
|
|
@@ -8449,7 +8461,7 @@ function isMemoSame(cached, memo) {
|
|
|
8449
8461
|
return true;
|
|
8450
8462
|
}
|
|
8451
8463
|
|
|
8452
|
-
const version = "3.5.
|
|
8464
|
+
const version = "3.5.18";
|
|
8453
8465
|
const warn = !!(process.env.NODE_ENV !== "production") ? warn$1 : NOOP;
|
|
8454
8466
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
8455
8467
|
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.5.
|
|
3
|
+
"version": "3.5.18",
|
|
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/
|
|
50
|
-
"@vue/
|
|
49
|
+
"@vue/shared": "3.5.18",
|
|
50
|
+
"@vue/reactivity": "3.5.18"
|
|
51
51
|
}
|
|
52
52
|
}
|