@vue/runtime-dom 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-dom.cjs.js +5 -4
- package/dist/runtime-dom.cjs.prod.js +5 -4
- package/dist/runtime-dom.d.ts +3 -3
- package/dist/runtime-dom.esm-browser.js +68 -31
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +9 -7
- package/dist/runtime-dom.global.js +68 -31
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -924,9 +924,10 @@ class VueElement extends BaseClass {
|
|
|
924
924
|
};
|
|
925
925
|
const asyncDef = this._def.__asyncLoader;
|
|
926
926
|
if (asyncDef) {
|
|
927
|
-
this._pendingResolve = asyncDef().then(
|
|
928
|
-
|
|
929
|
-
|
|
927
|
+
this._pendingResolve = asyncDef().then((def) => {
|
|
928
|
+
def.configureApp = this._def.configureApp;
|
|
929
|
+
resolve(this._def = def, true);
|
|
930
|
+
});
|
|
930
931
|
} else {
|
|
931
932
|
resolve(this._def);
|
|
932
933
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -884,9 +884,10 @@ class VueElement extends BaseClass {
|
|
|
884
884
|
};
|
|
885
885
|
const asyncDef = this._def.__asyncLoader;
|
|
886
886
|
if (asyncDef) {
|
|
887
|
-
this._pendingResolve = asyncDef().then(
|
|
888
|
-
|
|
889
|
-
|
|
887
|
+
this._pendingResolve = asyncDef().then((def) => {
|
|
888
|
+
def.configureApp = this._def.configureApp;
|
|
889
|
+
resolve(this._def = def, true);
|
|
890
|
+
});
|
|
890
891
|
} else {
|
|
891
892
|
resolve(this._def);
|
|
892
893
|
}
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -181,7 +181,7 @@ export declare function useCssModule(name?: string): Record<string, string>;
|
|
|
181
181
|
* Runtime helper for SFC's CSS variable injection feature.
|
|
182
182
|
* @private
|
|
183
183
|
*/
|
|
184
|
-
export declare function useCssVars(getter: (ctx: any) => Record<string,
|
|
184
|
+
export declare function useCssVars(getter: (ctx: any) => Record<string, unknown>): void;
|
|
185
185
|
|
|
186
186
|
export interface CSSProperties extends CSS.Properties<string | number>, CSS.PropertiesHyphen<string | number> {
|
|
187
187
|
/**
|
|
@@ -1385,8 +1385,8 @@ declare module '@vue/runtime-core' {
|
|
|
1385
1385
|
vOn: VOnDirective;
|
|
1386
1386
|
vBind: VModelDirective;
|
|
1387
1387
|
vIf: Directive<any, boolean>;
|
|
1388
|
-
|
|
1389
|
-
|
|
1388
|
+
vOnce: Directive;
|
|
1389
|
+
vSlot: Directive;
|
|
1390
1390
|
}
|
|
1391
1391
|
}
|
|
1392
1392
|
export declare const render: RootRenderFunction<Element | ShadowRoot>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.5.
|
|
2
|
+
* @vue/runtime-dom v3.5.18
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -311,6 +311,24 @@ const stringifySymbol = (v, i = "") => {
|
|
|
311
311
|
);
|
|
312
312
|
};
|
|
313
313
|
|
|
314
|
+
function normalizeCssVarValue(value) {
|
|
315
|
+
if (value == null) {
|
|
316
|
+
return "initial";
|
|
317
|
+
}
|
|
318
|
+
if (typeof value === "string") {
|
|
319
|
+
return value === "" ? " " : value;
|
|
320
|
+
}
|
|
321
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
322
|
+
{
|
|
323
|
+
console.warn(
|
|
324
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
325
|
+
value
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
}
|
|
329
|
+
return String(value);
|
|
330
|
+
}
|
|
331
|
+
|
|
314
332
|
function warn$2(msg, ...args) {
|
|
315
333
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
316
334
|
}
|
|
@@ -784,6 +802,7 @@ class Link {
|
|
|
784
802
|
}
|
|
785
803
|
}
|
|
786
804
|
class Dep {
|
|
805
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
787
806
|
constructor(computed) {
|
|
788
807
|
this.computed = computed;
|
|
789
808
|
this.version = 0;
|
|
@@ -804,6 +823,10 @@ class Dep {
|
|
|
804
823
|
* Subscriber counter
|
|
805
824
|
*/
|
|
806
825
|
this.sc = 0;
|
|
826
|
+
/**
|
|
827
|
+
* @internal
|
|
828
|
+
*/
|
|
829
|
+
this.__v_skip = true;
|
|
807
830
|
{
|
|
808
831
|
this.subsHead = void 0;
|
|
809
832
|
}
|
|
@@ -4373,10 +4396,8 @@ function resolveCssVars(instance, vnode, expectedMap) {
|
|
|
4373
4396
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4374
4397
|
const cssVars = instance.getCssVars();
|
|
4375
4398
|
for (const key in cssVars) {
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
String(cssVars[key])
|
|
4379
|
-
);
|
|
4399
|
+
const value = normalizeCssVarValue(cssVars[key]);
|
|
4400
|
+
expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
|
|
4380
4401
|
}
|
|
4381
4402
|
}
|
|
4382
4403
|
if (vnode === root && instance.parent) {
|
|
@@ -4407,7 +4428,7 @@ function isMismatchAllowed(el, allowedType) {
|
|
|
4407
4428
|
if (allowedType === 0 /* TEXT */ && list.includes("children")) {
|
|
4408
4429
|
return true;
|
|
4409
4430
|
}
|
|
4410
|
-
return
|
|
4431
|
+
return list.includes(MismatchTypeString[allowedType]);
|
|
4411
4432
|
}
|
|
4412
4433
|
}
|
|
4413
4434
|
|
|
@@ -4565,16 +4586,19 @@ function defineAsyncComponent(source) {
|
|
|
4565
4586
|
__asyncLoader: load,
|
|
4566
4587
|
__asyncHydrate(el, instance, hydrate) {
|
|
4567
4588
|
let patched = false;
|
|
4568
|
-
|
|
4569
|
-
|
|
4570
|
-
|
|
4589
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4590
|
+
const performHydrate = () => {
|
|
4591
|
+
if (patched) {
|
|
4592
|
+
{
|
|
4571
4593
|
warn$1(
|
|
4572
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
4594
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
4573
4595
|
);
|
|
4574
|
-
return;
|
|
4575
4596
|
}
|
|
4576
|
-
|
|
4577
|
-
}
|
|
4597
|
+
return;
|
|
4598
|
+
}
|
|
4599
|
+
hydrate();
|
|
4600
|
+
};
|
|
4601
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
4578
4602
|
const teardown = hydrateStrategy(
|
|
4579
4603
|
performHydrate,
|
|
4580
4604
|
(cb) => forEachElement(el, cb)
|
|
@@ -4582,8 +4606,7 @@ function defineAsyncComponent(source) {
|
|
|
4582
4606
|
if (teardown) {
|
|
4583
4607
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4584
4608
|
}
|
|
4585
|
-
|
|
4586
|
-
} : hydrate;
|
|
4609
|
+
} : performHydrate;
|
|
4587
4610
|
if (resolvedComp) {
|
|
4588
4611
|
doHydrate();
|
|
4589
4612
|
} else {
|
|
@@ -5462,15 +5485,15 @@ function withDefaults(props, defaults) {
|
|
|
5462
5485
|
return null;
|
|
5463
5486
|
}
|
|
5464
5487
|
function useSlots() {
|
|
5465
|
-
return getContext().slots;
|
|
5488
|
+
return getContext("useSlots").slots;
|
|
5466
5489
|
}
|
|
5467
5490
|
function useAttrs() {
|
|
5468
|
-
return getContext().attrs;
|
|
5491
|
+
return getContext("useAttrs").attrs;
|
|
5469
5492
|
}
|
|
5470
|
-
function getContext() {
|
|
5493
|
+
function getContext(calledFunctionName) {
|
|
5471
5494
|
const i = getCurrentInstance();
|
|
5472
5495
|
if (!i) {
|
|
5473
|
-
warn$1(
|
|
5496
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
5474
5497
|
}
|
|
5475
5498
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
5476
5499
|
}
|
|
@@ -5721,7 +5744,8 @@ function applyOptions(instance) {
|
|
|
5721
5744
|
expose.forEach((key) => {
|
|
5722
5745
|
Object.defineProperty(exposed, key, {
|
|
5723
5746
|
get: () => publicThis[key],
|
|
5724
|
-
set: (val) => publicThis[key] = val
|
|
5747
|
+
set: (val) => publicThis[key] = val,
|
|
5748
|
+
enumerable: true
|
|
5725
5749
|
});
|
|
5726
5750
|
});
|
|
5727
5751
|
} else if (!instance.exposed) {
|
|
@@ -6171,7 +6195,7 @@ function provide(key, value) {
|
|
|
6171
6195
|
}
|
|
6172
6196
|
}
|
|
6173
6197
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6174
|
-
const instance =
|
|
6198
|
+
const instance = getCurrentInstance();
|
|
6175
6199
|
if (instance || currentApp) {
|
|
6176
6200
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6177
6201
|
if (provides && key in provides) {
|
|
@@ -6186,7 +6210,7 @@ function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
|
6186
6210
|
}
|
|
6187
6211
|
}
|
|
6188
6212
|
function hasInjectionContext() {
|
|
6189
|
-
return !!(
|
|
6213
|
+
return !!(getCurrentInstance() || currentApp);
|
|
6190
6214
|
}
|
|
6191
6215
|
|
|
6192
6216
|
const internalObjectProto = {};
|
|
@@ -6600,7 +6624,7 @@ function isBoolean(...args) {
|
|
|
6600
6624
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6601
6625
|
}
|
|
6602
6626
|
|
|
6603
|
-
const isInternalKey = (key) => key
|
|
6627
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
6604
6628
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6605
6629
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6606
6630
|
if (rawSlot._n) {
|
|
@@ -6654,6 +6678,8 @@ const assignSlots = (slots, children, optimized) => {
|
|
|
6654
6678
|
const initSlots = (instance, children, optimized) => {
|
|
6655
6679
|
const slots = instance.slots = createInternalObject();
|
|
6656
6680
|
if (instance.vnode.shapeFlag & 32) {
|
|
6681
|
+
const cacheIndexes = children.__;
|
|
6682
|
+
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
6657
6683
|
const type = children._;
|
|
6658
6684
|
if (type) {
|
|
6659
6685
|
assignSlots(slots, children, optimized);
|
|
@@ -6865,6 +6891,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6865
6891
|
}
|
|
6866
6892
|
if (ref != null && parentComponent) {
|
|
6867
6893
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
6894
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
6895
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
6868
6896
|
}
|
|
6869
6897
|
};
|
|
6870
6898
|
const processText = (n1, n2, container, anchor) => {
|
|
@@ -7338,6 +7366,7 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7338
7366
|
if (!initialVNode.el) {
|
|
7339
7367
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
7340
7368
|
processCommentNode(null, placeholder, container, anchor);
|
|
7369
|
+
initialVNode.placeholder = placeholder.el;
|
|
7341
7370
|
}
|
|
7342
7371
|
} else {
|
|
7343
7372
|
setupRenderEffect(
|
|
@@ -7424,7 +7453,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7424
7453
|
hydrateSubTree();
|
|
7425
7454
|
}
|
|
7426
7455
|
} else {
|
|
7427
|
-
if (root.ce
|
|
7456
|
+
if (root.ce && // @ts-expect-error _def is private
|
|
7457
|
+
root.ce._def.shadowRoot !== false) {
|
|
7428
7458
|
root.ce._injectChildStyle(type);
|
|
7429
7459
|
}
|
|
7430
7460
|
{
|
|
@@ -7838,7 +7868,11 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7838
7868
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
7839
7869
|
const nextIndex = s2 + i;
|
|
7840
7870
|
const nextChild = c2[nextIndex];
|
|
7841
|
-
const
|
|
7871
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
7872
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
7873
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
7874
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
7875
|
+
) : parentAnchor;
|
|
7842
7876
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
7843
7877
|
patch(
|
|
7844
7878
|
null,
|
|
@@ -9731,6 +9765,7 @@ function cloneVNode(vnode, extraProps, mergeRef = false, cloneTransition = false
|
|
|
9731
9765
|
suspense: vnode.suspense,
|
|
9732
9766
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
9733
9767
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
9768
|
+
placeholder: vnode.placeholder,
|
|
9734
9769
|
el: vnode.el,
|
|
9735
9770
|
anchor: vnode.anchor,
|
|
9736
9771
|
ctx: vnode.ctx,
|
|
@@ -10522,7 +10557,7 @@ function isMemoSame(cached, memo) {
|
|
|
10522
10557
|
return true;
|
|
10523
10558
|
}
|
|
10524
10559
|
|
|
10525
|
-
const version = "3.5.
|
|
10560
|
+
const version = "3.5.18";
|
|
10526
10561
|
const warn = warn$1 ;
|
|
10527
10562
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10528
10563
|
const devtools = devtools$1 ;
|
|
@@ -11035,8 +11070,9 @@ function setVarsOnNode(el, vars) {
|
|
|
11035
11070
|
const style = el.style;
|
|
11036
11071
|
let cssText = "";
|
|
11037
11072
|
for (const key in vars) {
|
|
11038
|
-
|
|
11039
|
-
|
|
11073
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
11074
|
+
style.setProperty(`--${key}`, value);
|
|
11075
|
+
cssText += `--${key}: ${value};`;
|
|
11040
11076
|
}
|
|
11041
11077
|
style[CSS_VAR_TEXT] = cssText;
|
|
11042
11078
|
}
|
|
@@ -11525,9 +11561,10 @@ class VueElement extends BaseClass {
|
|
|
11525
11561
|
};
|
|
11526
11562
|
const asyncDef = this._def.__asyncLoader;
|
|
11527
11563
|
if (asyncDef) {
|
|
11528
|
-
this._pendingResolve = asyncDef().then(
|
|
11529
|
-
|
|
11530
|
-
|
|
11564
|
+
this._pendingResolve = asyncDef().then((def) => {
|
|
11565
|
+
def.configureApp = this._def.configureApp;
|
|
11566
|
+
resolve(this._def = def, true);
|
|
11567
|
+
});
|
|
11531
11568
|
} else {
|
|
11532
11569
|
resolve(this._def);
|
|
11533
11570
|
}
|