@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
|
@@ -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
|
}
|
|
@@ -787,6 +805,7 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
787
805
|
}
|
|
788
806
|
}
|
|
789
807
|
class Dep {
|
|
808
|
+
// TODO isolatedDeclarations "__v_skip"
|
|
790
809
|
constructor(computed) {
|
|
791
810
|
this.computed = computed;
|
|
792
811
|
this.version = 0;
|
|
@@ -807,6 +826,10 @@ var VueRuntimeDOM = (function (exports) {
|
|
|
807
826
|
* Subscriber counter
|
|
808
827
|
*/
|
|
809
828
|
this.sc = 0;
|
|
829
|
+
/**
|
|
830
|
+
* @internal
|
|
831
|
+
*/
|
|
832
|
+
this.__v_skip = true;
|
|
810
833
|
{
|
|
811
834
|
this.subsHead = void 0;
|
|
812
835
|
}
|
|
@@ -4376,10 +4399,8 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4376
4399
|
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
4377
4400
|
const cssVars = instance.getCssVars();
|
|
4378
4401
|
for (const key in cssVars) {
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
String(cssVars[key])
|
|
4382
|
-
);
|
|
4402
|
+
const value = normalizeCssVarValue(cssVars[key]);
|
|
4403
|
+
expectedMap.set(`--${getEscapedCssVarName(key)}`, value);
|
|
4383
4404
|
}
|
|
4384
4405
|
}
|
|
4385
4406
|
if (vnode === root && instance.parent) {
|
|
@@ -4410,7 +4431,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4410
4431
|
if (allowedType === 0 /* TEXT */ && list.includes("children")) {
|
|
4411
4432
|
return true;
|
|
4412
4433
|
}
|
|
4413
|
-
return
|
|
4434
|
+
return list.includes(MismatchTypeString[allowedType]);
|
|
4414
4435
|
}
|
|
4415
4436
|
}
|
|
4416
4437
|
|
|
@@ -4568,16 +4589,19 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4568
4589
|
__asyncLoader: load,
|
|
4569
4590
|
__asyncHydrate(el, instance, hydrate) {
|
|
4570
4591
|
let patched = false;
|
|
4571
|
-
|
|
4572
|
-
|
|
4573
|
-
|
|
4592
|
+
(instance.bu || (instance.bu = [])).push(() => patched = true);
|
|
4593
|
+
const performHydrate = () => {
|
|
4594
|
+
if (patched) {
|
|
4595
|
+
{
|
|
4574
4596
|
warn$1(
|
|
4575
|
-
`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.`
|
|
4576
4598
|
);
|
|
4577
|
-
return;
|
|
4578
4599
|
}
|
|
4579
|
-
|
|
4580
|
-
}
|
|
4600
|
+
return;
|
|
4601
|
+
}
|
|
4602
|
+
hydrate();
|
|
4603
|
+
};
|
|
4604
|
+
const doHydrate = hydrateStrategy ? () => {
|
|
4581
4605
|
const teardown = hydrateStrategy(
|
|
4582
4606
|
performHydrate,
|
|
4583
4607
|
(cb) => forEachElement(el, cb)
|
|
@@ -4585,8 +4609,7 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
4585
4609
|
if (teardown) {
|
|
4586
4610
|
(instance.bum || (instance.bum = [])).push(teardown);
|
|
4587
4611
|
}
|
|
4588
|
-
|
|
4589
|
-
} : hydrate;
|
|
4612
|
+
} : performHydrate;
|
|
4590
4613
|
if (resolvedComp) {
|
|
4591
4614
|
doHydrate();
|
|
4592
4615
|
} else {
|
|
@@ -5459,15 +5482,15 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5459
5482
|
return null;
|
|
5460
5483
|
}
|
|
5461
5484
|
function useSlots() {
|
|
5462
|
-
return getContext().slots;
|
|
5485
|
+
return getContext("useSlots").slots;
|
|
5463
5486
|
}
|
|
5464
5487
|
function useAttrs() {
|
|
5465
|
-
return getContext().attrs;
|
|
5488
|
+
return getContext("useAttrs").attrs;
|
|
5466
5489
|
}
|
|
5467
|
-
function getContext() {
|
|
5490
|
+
function getContext(calledFunctionName) {
|
|
5468
5491
|
const i = getCurrentInstance();
|
|
5469
5492
|
if (!i) {
|
|
5470
|
-
warn$1(
|
|
5493
|
+
warn$1(`${calledFunctionName}() called without active instance.`);
|
|
5471
5494
|
}
|
|
5472
5495
|
return i.setupContext || (i.setupContext = createSetupContext(i));
|
|
5473
5496
|
}
|
|
@@ -5718,7 +5741,8 @@ If this is a native custom element, make sure to exclude it from component resol
|
|
|
5718
5741
|
expose.forEach((key) => {
|
|
5719
5742
|
Object.defineProperty(exposed, key, {
|
|
5720
5743
|
get: () => publicThis[key],
|
|
5721
|
-
set: (val) => publicThis[key] = val
|
|
5744
|
+
set: (val) => publicThis[key] = val,
|
|
5745
|
+
enumerable: true
|
|
5722
5746
|
});
|
|
5723
5747
|
});
|
|
5724
5748
|
} else if (!instance.exposed) {
|
|
@@ -6165,7 +6189,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6165
6189
|
}
|
|
6166
6190
|
}
|
|
6167
6191
|
function inject(key, defaultValue, treatDefaultAsFactory = false) {
|
|
6168
|
-
const instance =
|
|
6192
|
+
const instance = getCurrentInstance();
|
|
6169
6193
|
if (instance || currentApp) {
|
|
6170
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;
|
|
6171
6195
|
if (provides && key in provides) {
|
|
@@ -6180,7 +6204,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6180
6204
|
}
|
|
6181
6205
|
}
|
|
6182
6206
|
function hasInjectionContext() {
|
|
6183
|
-
return !!(
|
|
6207
|
+
return !!(getCurrentInstance() || currentApp);
|
|
6184
6208
|
}
|
|
6185
6209
|
|
|
6186
6210
|
const internalObjectProto = {};
|
|
@@ -6594,7 +6618,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6594
6618
|
return args.some((elem) => elem.toLowerCase() === "boolean");
|
|
6595
6619
|
}
|
|
6596
6620
|
|
|
6597
|
-
const isInternalKey = (key) => key
|
|
6621
|
+
const isInternalKey = (key) => key === "_" || key === "__" || key === "_ctx" || key === "$stable";
|
|
6598
6622
|
const normalizeSlotValue = (value) => isArray(value) ? value.map(normalizeVNode) : [normalizeVNode(value)];
|
|
6599
6623
|
const normalizeSlot = (key, rawSlot, ctx) => {
|
|
6600
6624
|
if (rawSlot._n) {
|
|
@@ -6648,6 +6672,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6648
6672
|
const initSlots = (instance, children, optimized) => {
|
|
6649
6673
|
const slots = instance.slots = createInternalObject();
|
|
6650
6674
|
if (instance.vnode.shapeFlag & 32) {
|
|
6675
|
+
const cacheIndexes = children.__;
|
|
6676
|
+
if (cacheIndexes) def(slots, "__", cacheIndexes, true);
|
|
6651
6677
|
const type = children._;
|
|
6652
6678
|
if (type) {
|
|
6653
6679
|
assignSlots(slots, children, optimized);
|
|
@@ -6859,6 +6885,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
6859
6885
|
}
|
|
6860
6886
|
if (ref != null && parentComponent) {
|
|
6861
6887
|
setRef(ref, n1 && n1.ref, parentSuspense, n2 || n1, !n2);
|
|
6888
|
+
} else if (ref == null && n1 && n1.ref != null) {
|
|
6889
|
+
setRef(n1.ref, null, parentSuspense, n1, true);
|
|
6862
6890
|
}
|
|
6863
6891
|
};
|
|
6864
6892
|
const processText = (n1, n2, container, anchor) => {
|
|
@@ -7332,6 +7360,7 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7332
7360
|
if (!initialVNode.el) {
|
|
7333
7361
|
const placeholder = instance.subTree = createVNode(Comment);
|
|
7334
7362
|
processCommentNode(null, placeholder, container, anchor);
|
|
7363
|
+
initialVNode.placeholder = placeholder.el;
|
|
7335
7364
|
}
|
|
7336
7365
|
} else {
|
|
7337
7366
|
setupRenderEffect(
|
|
@@ -7418,7 +7447,8 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7418
7447
|
hydrateSubTree();
|
|
7419
7448
|
}
|
|
7420
7449
|
} else {
|
|
7421
|
-
if (root.ce
|
|
7450
|
+
if (root.ce && // @ts-expect-error _def is private
|
|
7451
|
+
root.ce._def.shadowRoot !== false) {
|
|
7422
7452
|
root.ce._injectChildStyle(type);
|
|
7423
7453
|
}
|
|
7424
7454
|
{
|
|
@@ -7832,7 +7862,11 @@ If you want to remount the same app, move your app creation logic into a factory
|
|
|
7832
7862
|
for (i = toBePatched - 1; i >= 0; i--) {
|
|
7833
7863
|
const nextIndex = s2 + i;
|
|
7834
7864
|
const nextChild = c2[nextIndex];
|
|
7835
|
-
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;
|
|
7836
7870
|
if (newIndexToOldIndexMap[i] === 0) {
|
|
7837
7871
|
patch(
|
|
7838
7872
|
null,
|
|
@@ -9697,6 +9731,7 @@ Component that was made reactive: `,
|
|
|
9697
9731
|
suspense: vnode.suspense,
|
|
9698
9732
|
ssContent: vnode.ssContent && cloneVNode(vnode.ssContent),
|
|
9699
9733
|
ssFallback: vnode.ssFallback && cloneVNode(vnode.ssFallback),
|
|
9734
|
+
placeholder: vnode.placeholder,
|
|
9700
9735
|
el: vnode.el,
|
|
9701
9736
|
anchor: vnode.anchor,
|
|
9702
9737
|
ctx: vnode.ctx,
|
|
@@ -10474,7 +10509,7 @@ Component that was made reactive: `,
|
|
|
10474
10509
|
return true;
|
|
10475
10510
|
}
|
|
10476
10511
|
|
|
10477
|
-
const version = "3.5.
|
|
10512
|
+
const version = "3.5.18";
|
|
10478
10513
|
const warn = warn$1 ;
|
|
10479
10514
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
10480
10515
|
const devtools = devtools$1 ;
|
|
@@ -10968,8 +11003,9 @@ Component that was made reactive: `,
|
|
|
10968
11003
|
const style = el.style;
|
|
10969
11004
|
let cssText = "";
|
|
10970
11005
|
for (const key in vars) {
|
|
10971
|
-
|
|
10972
|
-
|
|
11006
|
+
const value = normalizeCssVarValue(vars[key]);
|
|
11007
|
+
style.setProperty(`--${key}`, value);
|
|
11008
|
+
cssText += `--${key}: ${value};`;
|
|
10973
11009
|
}
|
|
10974
11010
|
style[CSS_VAR_TEXT] = cssText;
|
|
10975
11011
|
}
|
|
@@ -11458,9 +11494,10 @@ Expected function or array of functions, received type ${typeof value}.`
|
|
|
11458
11494
|
};
|
|
11459
11495
|
const asyncDef = this._def.__asyncLoader;
|
|
11460
11496
|
if (asyncDef) {
|
|
11461
|
-
this._pendingResolve = asyncDef().then(
|
|
11462
|
-
|
|
11463
|
-
|
|
11497
|
+
this._pendingResolve = asyncDef().then((def) => {
|
|
11498
|
+
def.configureApp = this._def.configureApp;
|
|
11499
|
+
resolve(this._def = def, true);
|
|
11500
|
+
});
|
|
11464
11501
|
} else {
|
|
11465
11502
|
resolve(this._def);
|
|
11466
11503
|
}
|