@vue/runtime-dom 3.5.17 → 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 +1 -1
- package/dist/runtime-dom.cjs.prod.js +1 -1
- package/dist/runtime-dom.d.ts +1 -1
- package/dist/runtime-dom.esm-browser.js +52 -26
- package/dist/runtime-dom.esm-browser.prod.js +3 -3
- package/dist/runtime-dom.esm-bundler.js +5 -4
- package/dist/runtime-dom.global.js +52 -26
- package/dist/runtime-dom.global.prod.js +3 -3
- package/package.json +4 -4
|
@@ -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
|
**/
|
|
@@ -314,6 +314,24 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
314
314
|
);
|
|
315
315
|
};
|
|
316
316
|
|
|
317
|
+
function normalizeCssVarValue(value) {
|
|
318
|
+
if (value == null) {
|
|
319
|
+
return "initial";
|
|
320
|
+
}
|
|
321
|
+
if (typeof value === "string") {
|
|
322
|
+
return value === "" ? " " : value;
|
|
323
|
+
}
|
|
324
|
+
if (typeof value !== "number" || !Number.isFinite(value)) {
|
|
325
|
+
{
|
|
326
|
+
console.warn(
|
|
327
|
+
"[Vue warn] Invalid value used for CSS binding. Expected a string or a finite number but received:",
|
|
328
|
+
value
|
|
329
|
+
);
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
return String(value);
|
|
333
|
+
}
|
|
334
|
+
|
|
317
335
|
function warn$2(msg, ...args) {
|
|
318
336
|
console.warn(`[Vue warn] ${msg}`, ...args);
|
|
319
337
|
}
|
|
@@ -4381,10 +4399,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4381
4399
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4382
4400
|
const cssVars = instance.getCssVars();
|
|
4383
4401
|
for (const key in cssVars) {
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
String(cssVars[key])
|
|
4387
|
-
);
|
|
4402
|
+
const value = normalizeCssVarValue(cssVars[key]);
|
|
4403
|
+
expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
|
|
4388
4404
|
}
|
|
4389
4405
|
}
|
|
4390
4406
|
if (vnode === root && instance.parent) {
|
|
@@ -4573,16 +4589,19 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4573
4589
|
__asyncLoader: load,
|
|
4574
4590
|
__asyncHydrate(el, instance, hydrate) {
|
|
4575
4591
|
let patched = false;
|
|
4576
|
-
|
|
4577
|
-
|
|
4578
|
-
|
|
4592
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4593
|
+
const performHydrate = () => {
|
|
4594
|
+
if (patched) {
|
|
4595
|
+
{
|
|
4579
4596
|
warn$1(
|
|
4580
|
-
`Skipping lazy hydration for component '${getComponentName(resolvedComp)}': it was updated before lazy hydration performed.`
|
|
4597
|
+
`Skipping lazy hydration for component '${getComponentName(resolvedComp) || resolvedComp.__file}': it was updated before lazy hydration performed.`
|
|
4581
4598
|
);
|
|
4582
|
-
return;
|
|
4583
4599
|
}
|
|
4584
|
-
|
|
4585
|
-
}
|
|
4600
|
+
return;
|
|
4601
|
+
}
|
|
4602
|
+
hydrate();
|
|
4603
|
+
};
|
|
4604
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
4586
4605
|
const teardown = hydrateStrategy(
|
|
4587
4606
|
performHydrate,
|
|
4588
4607
|
(cb) => forEachElement(el, cb)
|
|
@@ -4590,8 +4609,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4590
4609
|
if (teardown) {
|
|
4591
4610
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4592
4611
|
}
|
|
4593
|
-
|
|
4594
|
-
} : hydrate;
|
|
4612
|
+
} : performHydrate;
|
|
4595
4613
|
if (resolvedComp) {
|
|
4596
4614
|
doHydrate();
|
|
4597
4615
|
} else {
|
|
@@ -5464,15 +5482,15 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5464
5482
|
return null;
|
|
5465
5483
|
}
|
|
5466
5484
|
function useSlots() {
|
|
5467
|
-
return getContext().slots;
|
|
5485
|
+
return getContext("useSlots").slots;
|
|
5468
5486
|
}
|
|
5469
5487
|
function useAttrs() {
|
|
5470
|
-
return getContext().attrs;
|
|
5488
|
+
return getContext("useAttrs").attrs;
|
|
5471
5489
|
}
|
|
5472
|
-
function getContext() {
|
|
5490
|
+
function getContext(calledFunctionName) {
|
|
5473
5491
|
const i = getCurrentInstance();
|
|
5474
5492
|
if (!i) {
|
|
5475
|
-
warn$1(
|
|
5493
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
5476
5494
|
}
|
|
5477
5495
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
5478
5496
|
}
|
|
@@ -5723,7 +5741,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5723
5741
|
expose.forEach((key) => {
|
|
5724
5742
|
Object.defineProperty(exposed, key, {
|
|
5725
5743
|
get: () => publicThis[key],
|
|
5726
|
-
set: (val) => publicThis[key] = val
|
|
5744
|
+
set: (val) => publicThis[key] = val,
|
|
5745
|
+
enumerable: true
|
|
5727
5746
|
});
|
|
5728
5747
|
});
|
|
5729
5748
|
} else if (!instance.exposed) {
|
|
@@ -6170,7 +6189,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6170
6189
|
}
|
|
6171
6190
|
}
|
|
6172
6191
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6173
|
-
const instance =
|
|
6192
|
+
const instance = getCurrentInstance();
|
|
6174
6193
|
if (instance || currentApp) {
|
|
6175
6194
|
let provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null || instance.ce ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : void 0;
|
|
6176
6195
|
if (provides && key in provides) {
|
|
@@ -6185,7 +6204,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6185
6204
|
}
|
|
6186
6205
|
}
|
|
6187
6206
|
function hasInjectionContext() {
|
|
6188
|
-
return !!(
|
|
6207
|
+
return !!(getCurrentInstance() || currentApp);
|
|
6189
6208
|
}
|
|
6190
6209
|
|
|
6191
6210
|
const internalObjectProto = {};
|
|
@@ -6599,7 +6618,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6599
6618
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6600
6619
|
}
|
|
6601
6620
|
|
|
6602
|
-
const isInternalKey = (key) => key
|
|
6621
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
6603
6622
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6604
6623
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6605
6624
|
if (rawSlot._n) {
|
|
@@ -7341,6 +7360,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7341
7360
|
if (!initialVNode.el) {
|
|
7342
7361
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
7343
7362
|
processCommentNode(null, placeholder, container, anchor);
|
|
7363
|
+
initialVNode.placeholder = placeholder.el;
|
|
7344
7364
|
}
|
|
7345
7365
|
} else {
|
|
7346
7366
|
setupRenderEffect(
|
|
@@ -7842,7 +7862,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7842
7862
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
7843
7863
|
const nextIndex = s2 + i;
|
|
7844
7864
|
const nextChild = c2[nextIndex];
|
|
7845
|
-
const
|
|
7865
|
+
const anchorVNode = c2[nextIndex + 1];
|
|
7866
|
+
const anchor = nextIndex + 1 < l2 ? (
|
|
7867
|
+
// #13559, fallback to el placeholder for unresolved async component
|
|
7868
|
+
anchorVNode.el || anchorVNode.placeholder
|
|
7869
|
+
) : parentAnchor;
|
|
7846
7870
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
7847
7871
|
patch(
|
|
7848
7872
|
null,
|
|
@@ -9707,6 +9731,7 @@ Component that was made reactive: `,
|
|
|
9707
9731
|
suspense: vnode.suspense,
|
|
9708
9732
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
9709
9733
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
9734
|
+
placeholder: vnode.placeholder,
|
|
9710
9735
|
el: vnode.el,
|
|
9711
9736
|
anchor: vnode.anchor,
|
|
9712
9737
|
ctx: vnode.ctx,
|
|
@@ -10484,7 +10509,7 @@ Component that was made reactive: `,
|
|
|
10484
10509
|
return true;
|
|
10485
10510
|
}
|
|
10486
10511
|
|
|
10487
|
-
const version = "3.5.
|
|
10512
|
+
const version = "3.5.18";
|
|
10488
10513
|
const warn = warn$1 ;
|
|
10489
10514
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10490
10515
|
const devtools = devtools$1 ;
|
|
@@ -10978,8 +11003,9 @@ Component that was made reactive: `,
|
|
|
10978
11003
|
const style = el.style;
|
|
10979
11004
|
let cssText = "";
|
|
10980
11005
|
for (const key in vars) {
|
|
10981
|
-
|
|
10982
|
-
|
|
11006
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
11007
|
+
style.setProperty(`--${key}`, value);
|
|
11008
|
+
cssText += `--${key}: ${value};`;
|
|
10983
11009
|
}
|
|
10984
11010
|
style[CSS_VAR_TEXT] = cssText;
|
|
10985
11011
|
}
|