@vue/runtime-dom 3.4.29 → 3.4.31
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 +6 -3
- package/dist/runtime-dom.cjs.prod.js +6 -3
- package/dist/runtime-dom.esm-browser.js +55 -66
- package/dist/runtime-dom.esm-browser.prod.js +2 -9
- package/dist/runtime-dom.esm-bundler.js +7 -4
- package/dist/runtime-dom.global.js +55 -66
- package/dist/runtime-dom.global.prod.js +2 -10
- package/package.json +4 -4
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -527,7 +527,10 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecial
|
|
|
527
527
|
if (value == null || isBoolean && !shared.includeBooleanAttr(value)) {
|
|
528
528
|
el.removeAttribute(key);
|
|
529
529
|
} else {
|
|
530
|
-
el.setAttribute(
|
|
530
|
+
el.setAttribute(
|
|
531
|
+
key,
|
|
532
|
+
isBoolean ? "" : shared.isSymbol(value) ? String(value) : value
|
|
533
|
+
);
|
|
531
534
|
}
|
|
532
535
|
}
|
|
533
536
|
}
|
|
@@ -688,7 +691,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
|
|
|
688
691
|
parentSuspense,
|
|
689
692
|
unmountChildren
|
|
690
693
|
);
|
|
691
|
-
if (key === "value" || key === "checked" || key === "selected") {
|
|
694
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
692
695
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
693
696
|
}
|
|
694
697
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -513,7 +513,10 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = shared.isSpecial
|
|
|
513
513
|
if (value == null || isBoolean && !shared.includeBooleanAttr(value)) {
|
|
514
514
|
el.removeAttribute(key);
|
|
515
515
|
} else {
|
|
516
|
-
el.setAttribute(
|
|
516
|
+
el.setAttribute(
|
|
517
|
+
key,
|
|
518
|
+
isBoolean ? "" : shared.isSymbol(value) ? String(value) : value
|
|
519
|
+
);
|
|
517
520
|
}
|
|
518
521
|
}
|
|
519
522
|
}
|
|
@@ -658,7 +661,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
|
|
|
658
661
|
parentSuspense,
|
|
659
662
|
unmountChildren
|
|
660
663
|
);
|
|
661
|
-
if (key === "value" || key === "checked" || key === "selected") {
|
|
664
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
662
665
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
663
666
|
}
|
|
664
667
|
} else {
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.31
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -260,11 +260,14 @@ function looseIndexOf(arr, val) {
|
|
|
260
260
|
return arr.findIndex((item) => looseEqual(item, val));
|
|
261
261
|
}
|
|
262
262
|
|
|
263
|
+
const isRef$1 = (val) => {
|
|
264
|
+
return !!(val && val.__v_isRef === true);
|
|
265
|
+
};
|
|
263
266
|
const toDisplayString = (val) => {
|
|
264
|
-
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? JSON.stringify(val, replacer, 2) : String(val);
|
|
267
|
+
return isString(val) ? val : val == null ? "" : isArray(val) || isObject(val) && (val.toString === objectToString || !isFunction(val.toString)) ? isRef$1(val) ? toDisplayString(val.value) : JSON.stringify(val, replacer, 2) : String(val);
|
|
265
268
|
};
|
|
266
269
|
const replacer = (_key, val) => {
|
|
267
|
-
if (val
|
|
270
|
+
if (isRef$1(val)) {
|
|
268
271
|
return replacer(_key, val.value);
|
|
269
272
|
} else if (isMap(val)) {
|
|
270
273
|
return {
|
|
@@ -411,7 +414,7 @@ class ReactiveEffect {
|
|
|
411
414
|
/**
|
|
412
415
|
* @internal
|
|
413
416
|
*/
|
|
414
|
-
this._dirtyLevel =
|
|
417
|
+
this._dirtyLevel = 4;
|
|
415
418
|
/**
|
|
416
419
|
* @internal
|
|
417
420
|
*/
|
|
@@ -431,18 +434,14 @@ class ReactiveEffect {
|
|
|
431
434
|
recordEffectScope(this, scope);
|
|
432
435
|
}
|
|
433
436
|
get dirty() {
|
|
434
|
-
if (this._dirtyLevel === 2)
|
|
435
|
-
return false;
|
|
436
|
-
if (this._dirtyLevel === 3 || this._dirtyLevel === 4) {
|
|
437
|
+
if (this._dirtyLevel === 2 || this._dirtyLevel === 3) {
|
|
437
438
|
this._dirtyLevel = 1;
|
|
438
439
|
pauseTracking();
|
|
439
440
|
for (let i = 0; i < this._depsLength; i++) {
|
|
440
441
|
const dep = this.deps[i];
|
|
441
442
|
if (dep.computed) {
|
|
442
|
-
if (dep.computed.effect._dirtyLevel === 2)
|
|
443
|
-
return true;
|
|
444
443
|
triggerComputed(dep.computed);
|
|
445
|
-
if (this._dirtyLevel >=
|
|
444
|
+
if (this._dirtyLevel >= 4) {
|
|
446
445
|
break;
|
|
447
446
|
}
|
|
448
447
|
}
|
|
@@ -452,10 +451,10 @@ class ReactiveEffect {
|
|
|
452
451
|
}
|
|
453
452
|
resetTracking();
|
|
454
453
|
}
|
|
455
|
-
return this._dirtyLevel >=
|
|
454
|
+
return this._dirtyLevel >= 4;
|
|
456
455
|
}
|
|
457
456
|
set dirty(v) {
|
|
458
|
-
this._dirtyLevel = v ?
|
|
457
|
+
this._dirtyLevel = v ? 4 : 0;
|
|
459
458
|
}
|
|
460
459
|
run() {
|
|
461
460
|
this._dirtyLevel = 0;
|
|
@@ -576,18 +575,9 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
576
575
|
var _a;
|
|
577
576
|
pauseScheduling();
|
|
578
577
|
for (const effect2 of dep.keys()) {
|
|
579
|
-
if (!dep.computed && effect2.computed) {
|
|
580
|
-
if (dep.get(effect2) === effect2._trackId && effect2._runnings > 0) {
|
|
581
|
-
effect2._dirtyLevel = 2;
|
|
582
|
-
continue;
|
|
583
|
-
}
|
|
584
|
-
}
|
|
585
578
|
let tracking;
|
|
586
579
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
587
580
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
588
|
-
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
589
|
-
effect2._shouldSchedule = true;
|
|
590
|
-
}
|
|
591
581
|
effect2._dirtyLevel = dirtyLevel;
|
|
592
582
|
}
|
|
593
583
|
if (effect2._shouldSchedule && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
@@ -595,7 +585,7 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
595
585
|
(_a = effect2.onTrigger) == null ? void 0 : _a.call(effect2, extend({ effect: effect2 }, debuggerEventExtraInfo));
|
|
596
586
|
}
|
|
597
587
|
effect2.trigger();
|
|
598
|
-
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !==
|
|
588
|
+
if ((!effect2._runnings || effect2.allowRecurse) && effect2._dirtyLevel !== 2) {
|
|
599
589
|
effect2._shouldSchedule = false;
|
|
600
590
|
if (effect2.scheduler) {
|
|
601
591
|
queueEffectSchedulers.push(effect2.scheduler);
|
|
@@ -687,7 +677,7 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
|
|
|
687
677
|
if (dep) {
|
|
688
678
|
triggerEffects(
|
|
689
679
|
dep,
|
|
690
|
-
|
|
680
|
+
4,
|
|
691
681
|
{
|
|
692
682
|
target,
|
|
693
683
|
type,
|
|
@@ -1290,7 +1280,7 @@ class ComputedRefImpl {
|
|
|
1290
1280
|
() => getter(this._value),
|
|
1291
1281
|
() => triggerRefValue(
|
|
1292
1282
|
this,
|
|
1293
|
-
this.effect._dirtyLevel ===
|
|
1283
|
+
this.effect._dirtyLevel === 2 ? 2 : 3
|
|
1294
1284
|
)
|
|
1295
1285
|
);
|
|
1296
1286
|
this.effect.computed = this;
|
|
@@ -1300,7 +1290,7 @@ class ComputedRefImpl {
|
|
|
1300
1290
|
get value() {
|
|
1301
1291
|
const self = toRaw(this);
|
|
1302
1292
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1303
|
-
triggerRefValue(self,
|
|
1293
|
+
triggerRefValue(self, 4);
|
|
1304
1294
|
}
|
|
1305
1295
|
trackRefValue(self);
|
|
1306
1296
|
if (self.effect._dirtyLevel >= 2) {
|
|
@@ -1309,7 +1299,7 @@ class ComputedRefImpl {
|
|
|
1309
1299
|
|
|
1310
1300
|
getter: `, this.getter);
|
|
1311
1301
|
}
|
|
1312
|
-
triggerRefValue(self,
|
|
1302
|
+
triggerRefValue(self, 2);
|
|
1313
1303
|
}
|
|
1314
1304
|
return self._value;
|
|
1315
1305
|
}
|
|
@@ -1364,7 +1354,7 @@ function trackRefValue(ref2) {
|
|
|
1364
1354
|
);
|
|
1365
1355
|
}
|
|
1366
1356
|
}
|
|
1367
|
-
function triggerRefValue(ref2, dirtyLevel =
|
|
1357
|
+
function triggerRefValue(ref2, dirtyLevel = 4, newVal, oldVal) {
|
|
1368
1358
|
ref2 = toRaw(ref2);
|
|
1369
1359
|
const dep = ref2.dep;
|
|
1370
1360
|
if (dep) {
|
|
@@ -1415,12 +1405,12 @@ class RefImpl {
|
|
|
1415
1405
|
const oldVal = this._rawValue;
|
|
1416
1406
|
this._rawValue = newVal;
|
|
1417
1407
|
this._value = useDirectValue ? newVal : toReactive(newVal);
|
|
1418
|
-
triggerRefValue(this,
|
|
1408
|
+
triggerRefValue(this, 4, newVal, oldVal);
|
|
1419
1409
|
}
|
|
1420
1410
|
}
|
|
1421
1411
|
}
|
|
1422
1412
|
function triggerRef(ref2) {
|
|
1423
|
-
triggerRefValue(ref2,
|
|
1413
|
+
triggerRefValue(ref2, 4, ref2.value );
|
|
1424
1414
|
}
|
|
1425
1415
|
function unref(ref2) {
|
|
1426
1416
|
return isRef(ref2) ? ref2.value : ref2;
|
|
@@ -2748,7 +2738,6 @@ const SuspenseImpl = {
|
|
|
2748
2738
|
}
|
|
2749
2739
|
},
|
|
2750
2740
|
hydrate: hydrateSuspense,
|
|
2751
|
-
create: createSuspenseBoundary,
|
|
2752
2741
|
normalize: normalizeSuspenseChildren
|
|
2753
2742
|
};
|
|
2754
2743
|
const Suspense = SuspenseImpl ;
|
|
@@ -5306,18 +5295,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5306
5295
|
let domType = node.nodeType;
|
|
5307
5296
|
vnode.el = node;
|
|
5308
5297
|
{
|
|
5309
|
-
|
|
5310
|
-
|
|
5311
|
-
value: vnode,
|
|
5312
|
-
enumerable: false
|
|
5313
|
-
});
|
|
5314
|
-
}
|
|
5315
|
-
if (!("__vueParentComponent" in node)) {
|
|
5316
|
-
Object.defineProperty(node, "__vueParentComponent", {
|
|
5317
|
-
value: parentComponent,
|
|
5318
|
-
enumerable: false
|
|
5319
|
-
});
|
|
5320
|
-
}
|
|
5298
|
+
def(node, "__vnode", vnode, true);
|
|
5299
|
+
def(node, "__vueParentComponent", parentComponent, true);
|
|
5321
5300
|
}
|
|
5322
5301
|
if (patchFlag === -2) {
|
|
5323
5302
|
optimized = false;
|
|
@@ -5540,7 +5519,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
5540
5519
|
if (props) {
|
|
5541
5520
|
{
|
|
5542
5521
|
for (const key in props) {
|
|
5543
|
-
if (
|
|
5522
|
+
if (// #11189 skip if this node has directives that have created hooks
|
|
5523
|
+
// as it could have mutated the DOM in any possible way
|
|
5524
|
+
!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
5544
5525
|
logMismatchError();
|
|
5545
5526
|
}
|
|
5546
5527
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -5715,7 +5696,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5715
5696
|
return [hydrate, hydrateNode];
|
|
5716
5697
|
}
|
|
5717
5698
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5718
|
-
var _a;
|
|
5719
5699
|
let mismatchType;
|
|
5720
5700
|
let mismatchKey;
|
|
5721
5701
|
let actual;
|
|
@@ -5738,13 +5718,8 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5738
5718
|
}
|
|
5739
5719
|
}
|
|
5740
5720
|
}
|
|
5741
|
-
|
|
5742
|
-
|
|
5743
|
-
(root == null ? void 0 : root.type) === Fragment && root.children.includes(vnode)) {
|
|
5744
|
-
const cssVars = (_a = instance == null ? void 0 : instance.getCssVars) == null ? void 0 : _a.call(instance);
|
|
5745
|
-
for (const key2 in cssVars) {
|
|
5746
|
-
expectedMap.set(`--${key2}`, String(cssVars[key2]));
|
|
5747
|
-
}
|
|
5721
|
+
if (instance) {
|
|
5722
|
+
resolveCssVars(instance, vnode, expectedMap);
|
|
5748
5723
|
}
|
|
5749
5724
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
5750
5725
|
mismatchType = mismatchKey = "style";
|
|
@@ -5804,8 +5779,8 @@ function toStyleMap(str) {
|
|
|
5804
5779
|
const styleMap = /* @__PURE__ */ new Map();
|
|
5805
5780
|
for (const item of str.split(";")) {
|
|
5806
5781
|
let [key, value] = item.split(":");
|
|
5807
|
-
key = key
|
|
5808
|
-
value = value
|
|
5782
|
+
key = key.trim();
|
|
5783
|
+
value = value && value.trim();
|
|
5809
5784
|
if (key && value) {
|
|
5810
5785
|
styleMap.set(key, value);
|
|
5811
5786
|
}
|
|
@@ -5823,6 +5798,18 @@ function isMapEqual(a, b) {
|
|
|
5823
5798
|
}
|
|
5824
5799
|
return true;
|
|
5825
5800
|
}
|
|
5801
|
+
function resolveCssVars(instance, vnode, expectedMap) {
|
|
5802
|
+
const root = instance.subTree;
|
|
5803
|
+
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
5804
|
+
const cssVars = instance.getCssVars();
|
|
5805
|
+
for (const key in cssVars) {
|
|
5806
|
+
expectedMap.set(`--${key}`, String(cssVars[key]));
|
|
5807
|
+
}
|
|
5808
|
+
}
|
|
5809
|
+
if (vnode === root && instance.parent) {
|
|
5810
|
+
resolveCssVars(instance.parent, instance.vnode, expectedMap);
|
|
5811
|
+
}
|
|
5812
|
+
}
|
|
5826
5813
|
|
|
5827
5814
|
let supported;
|
|
5828
5815
|
let perf;
|
|
@@ -6140,14 +6127,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6140
6127
|
}
|
|
6141
6128
|
}
|
|
6142
6129
|
{
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
enumerable: false
|
|
6146
|
-
});
|
|
6147
|
-
Object.defineProperty(el, "__vueParentComponent", {
|
|
6148
|
-
value: parentComponent,
|
|
6149
|
-
enumerable: false
|
|
6150
|
-
});
|
|
6130
|
+
def(el, "__vnode", vnode, true);
|
|
6131
|
+
def(el, "__vueParentComponent", parentComponent, true);
|
|
6151
6132
|
}
|
|
6152
6133
|
if (dirs) {
|
|
6153
6134
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
@@ -6209,6 +6190,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6209
6190
|
};
|
|
6210
6191
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6211
6192
|
const el = n2.el = n1.el;
|
|
6193
|
+
{
|
|
6194
|
+
el.__vnode = n2;
|
|
6195
|
+
}
|
|
6212
6196
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
6213
6197
|
patchFlag |= n1.patchFlag & 16;
|
|
6214
6198
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
@@ -7103,6 +7087,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7103
7087
|
dirs,
|
|
7104
7088
|
memoIndex
|
|
7105
7089
|
} = vnode;
|
|
7090
|
+
if (patchFlag === -2) {
|
|
7091
|
+
optimized = false;
|
|
7092
|
+
}
|
|
7106
7093
|
if (ref != null) {
|
|
7107
7094
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
7108
7095
|
}
|
|
@@ -7134,7 +7121,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7134
7121
|
vnode,
|
|
7135
7122
|
parentComponent,
|
|
7136
7123
|
parentSuspense,
|
|
7137
|
-
optimized,
|
|
7138
7124
|
internals,
|
|
7139
7125
|
doRemove
|
|
7140
7126
|
);
|
|
@@ -8410,7 +8396,7 @@ const TeleportImpl = {
|
|
|
8410
8396
|
}
|
|
8411
8397
|
updateCssVars(n2);
|
|
8412
8398
|
},
|
|
8413
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
8399
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
8414
8400
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
8415
8401
|
if (target) {
|
|
8416
8402
|
hostRemove(targetAnchor);
|
|
@@ -9582,7 +9568,7 @@ function isMemoSame(cached, memo) {
|
|
|
9582
9568
|
return true;
|
|
9583
9569
|
}
|
|
9584
9570
|
|
|
9585
|
-
const version = "3.4.
|
|
9571
|
+
const version = "3.4.31";
|
|
9586
9572
|
const warn = warn$1 ;
|
|
9587
9573
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9588
9574
|
const devtools = devtools$1 ;
|
|
@@ -10162,7 +10148,10 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
10162
10148
|
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
10163
10149
|
el.removeAttribute(key);
|
|
10164
10150
|
} else {
|
|
10165
|
-
el.setAttribute(
|
|
10151
|
+
el.setAttribute(
|
|
10152
|
+
key,
|
|
10153
|
+
isBoolean ? "" : isSymbol(value) ? String(value) : value
|
|
10154
|
+
);
|
|
10166
10155
|
}
|
|
10167
10156
|
}
|
|
10168
10157
|
}
|
|
@@ -10323,7 +10312,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
|
|
|
10323
10312
|
parentSuspense,
|
|
10324
10313
|
unmountChildren
|
|
10325
10314
|
);
|
|
10326
|
-
if (key === "value" || key === "checked" || key === "selected") {
|
|
10315
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
10327
10316
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
10328
10317
|
}
|
|
10329
10318
|
} else {
|