@vue/runtime-dom 3.4.29 → 3.4.30
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 +46 -42
- 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 +46 -42
- 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.30
|
|
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.30
|
|
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.30
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -439,8 +439,10 @@ class ReactiveEffect {
|
|
|
439
439
|
for (let i = 0; i < this._depsLength; i++) {
|
|
440
440
|
const dep = this.deps[i];
|
|
441
441
|
if (dep.computed) {
|
|
442
|
-
if (dep.computed.effect._dirtyLevel === 2)
|
|
442
|
+
if (dep.computed.effect._dirtyLevel === 2) {
|
|
443
|
+
resetTracking();
|
|
443
444
|
return true;
|
|
445
|
+
}
|
|
444
446
|
triggerComputed(dep.computed);
|
|
445
447
|
if (this._dirtyLevel >= 5) {
|
|
446
448
|
break;
|
|
@@ -576,13 +578,13 @@ function triggerEffects(dep, dirtyLevel, debuggerEventExtraInfo) {
|
|
|
576
578
|
var _a;
|
|
577
579
|
pauseScheduling();
|
|
578
580
|
for (const effect2 of dep.keys()) {
|
|
581
|
+
let tracking;
|
|
579
582
|
if (!dep.computed && effect2.computed) {
|
|
580
|
-
if (dep.get(effect2) === effect2._trackId
|
|
583
|
+
if (effect2._runnings > 0 && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
581
584
|
effect2._dirtyLevel = 2;
|
|
582
585
|
continue;
|
|
583
586
|
}
|
|
584
587
|
}
|
|
585
|
-
let tracking;
|
|
586
588
|
if (effect2._dirtyLevel < dirtyLevel && (tracking != null ? tracking : tracking = dep.get(effect2) === effect2._trackId)) {
|
|
587
589
|
effect2._shouldSchedule || (effect2._shouldSchedule = effect2._dirtyLevel === 0);
|
|
588
590
|
if (effect2.computed && effect2._dirtyLevel === 2) {
|
|
@@ -1299,8 +1301,11 @@ class ComputedRefImpl {
|
|
|
1299
1301
|
}
|
|
1300
1302
|
get value() {
|
|
1301
1303
|
const self = toRaw(this);
|
|
1304
|
+
const lastDirtyLevel = self.effect._dirtyLevel;
|
|
1302
1305
|
if ((!self._cacheable || self.effect.dirty) && hasChanged(self._value, self._value = self.effect.run())) {
|
|
1303
|
-
|
|
1306
|
+
if (lastDirtyLevel !== 3) {
|
|
1307
|
+
triggerRefValue(self, 5);
|
|
1308
|
+
}
|
|
1304
1309
|
}
|
|
1305
1310
|
trackRefValue(self);
|
|
1306
1311
|
if (self.effect._dirtyLevel >= 2) {
|
|
@@ -2748,7 +2753,6 @@ const SuspenseImpl = {
|
|
|
2748
2753
|
}
|
|
2749
2754
|
},
|
|
2750
2755
|
hydrate: hydrateSuspense,
|
|
2751
|
-
create: createSuspenseBoundary,
|
|
2752
2756
|
normalize: normalizeSuspenseChildren
|
|
2753
2757
|
};
|
|
2754
2758
|
const Suspense = SuspenseImpl ;
|
|
@@ -5306,18 +5310,8 @@ function createHydrationFunctions(rendererInternals) {
|
|
|
5306
5310
|
let domType = node.nodeType;
|
|
5307
5311
|
vnode.el = node;
|
|
5308
5312
|
{
|
|
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
|
-
}
|
|
5313
|
+
def(node, "__vnode", vnode, true);
|
|
5314
|
+
def(node, "__vueParentComponent", parentComponent, true);
|
|
5321
5315
|
}
|
|
5322
5316
|
if (patchFlag === -2) {
|
|
5323
5317
|
optimized = false;
|
|
@@ -5540,7 +5534,9 @@ Server rendered element contains more child nodes than client vdom.`
|
|
|
5540
5534
|
if (props) {
|
|
5541
5535
|
{
|
|
5542
5536
|
for (const key in props) {
|
|
5543
|
-
if (
|
|
5537
|
+
if (// #11189 skip if this node has directives that have created hooks
|
|
5538
|
+
// as it could have mutated the DOM in any possible way
|
|
5539
|
+
!(dirs && dirs.some((d) => d.dir.created)) && propHasMismatch(el, key, props[key], vnode, parentComponent)) {
|
|
5544
5540
|
logMismatchError();
|
|
5545
5541
|
}
|
|
5546
5542
|
if (forcePatch && (key.endsWith("value") || key === "indeterminate") || isOn(key) && !isReservedProp(key) || // force hydrate v-bind with .prop modifiers
|
|
@@ -5715,7 +5711,6 @@ Server rendered element contains fewer child nodes than client vdom.`
|
|
|
5715
5711
|
return [hydrate, hydrateNode];
|
|
5716
5712
|
}
|
|
5717
5713
|
function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
5718
|
-
var _a;
|
|
5719
5714
|
let mismatchType;
|
|
5720
5715
|
let mismatchKey;
|
|
5721
5716
|
let actual;
|
|
@@ -5738,13 +5733,8 @@ function propHasMismatch(el, key, clientValue, vnode, instance) {
|
|
|
5738
5733
|
}
|
|
5739
5734
|
}
|
|
5740
5735
|
}
|
|
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
|
-
}
|
|
5736
|
+
if (instance) {
|
|
5737
|
+
resolveCssVars(instance, vnode, expectedMap);
|
|
5748
5738
|
}
|
|
5749
5739
|
if (!isMapEqual(actualMap, expectedMap)) {
|
|
5750
5740
|
mismatchType = mismatchKey = "style";
|
|
@@ -5804,8 +5794,8 @@ function toStyleMap(str) {
|
|
|
5804
5794
|
const styleMap = /* @__PURE__ */ new Map();
|
|
5805
5795
|
for (const item of str.split(";")) {
|
|
5806
5796
|
let [key, value] = item.split(":");
|
|
5807
|
-
key = key
|
|
5808
|
-
value = value
|
|
5797
|
+
key = key.trim();
|
|
5798
|
+
value = value && value.trim();
|
|
5809
5799
|
if (key && value) {
|
|
5810
5800
|
styleMap.set(key, value);
|
|
5811
5801
|
}
|
|
@@ -5823,6 +5813,18 @@ function isMapEqual(a, b) {
|
|
|
5823
5813
|
}
|
|
5824
5814
|
return true;
|
|
5825
5815
|
}
|
|
5816
|
+
function resolveCssVars(instance, vnode, expectedMap) {
|
|
5817
|
+
const root = instance.subTree;
|
|
5818
|
+
if (instance.getCssVars && (vnode === root || root && root.type === Fragment && root.children.includes(vnode))) {
|
|
5819
|
+
const cssVars = instance.getCssVars();
|
|
5820
|
+
for (const key in cssVars) {
|
|
5821
|
+
expectedMap.set(`--${key}`, String(cssVars[key]));
|
|
5822
|
+
}
|
|
5823
|
+
}
|
|
5824
|
+
if (vnode === root && instance.parent) {
|
|
5825
|
+
resolveCssVars(instance.parent, instance.vnode, expectedMap);
|
|
5826
|
+
}
|
|
5827
|
+
}
|
|
5826
5828
|
|
|
5827
5829
|
let supported;
|
|
5828
5830
|
let perf;
|
|
@@ -6140,14 +6142,8 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6140
6142
|
}
|
|
6141
6143
|
}
|
|
6142
6144
|
{
|
|
6143
|
-
|
|
6144
|
-
|
|
6145
|
-
enumerable: false
|
|
6146
|
-
});
|
|
6147
|
-
Object.defineProperty(el, "__vueParentComponent", {
|
|
6148
|
-
value: parentComponent,
|
|
6149
|
-
enumerable: false
|
|
6150
|
-
});
|
|
6145
|
+
def(el, "__vnode", vnode, true);
|
|
6146
|
+
def(el, "__vueParentComponent", parentComponent, true);
|
|
6151
6147
|
}
|
|
6152
6148
|
if (dirs) {
|
|
6153
6149
|
invokeDirectiveHook(vnode, null, parentComponent, "beforeMount");
|
|
@@ -6209,6 +6205,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
6209
6205
|
};
|
|
6210
6206
|
const patchElement = (n1, n2, parentComponent, parentSuspense, namespace, slotScopeIds, optimized) => {
|
|
6211
6207
|
const el = n2.el = n1.el;
|
|
6208
|
+
{
|
|
6209
|
+
el.__vnode = n2;
|
|
6210
|
+
}
|
|
6212
6211
|
let { patchFlag, dynamicChildren, dirs } = n2;
|
|
6213
6212
|
patchFlag |= n1.patchFlag & 16;
|
|
6214
6213
|
const oldProps = n1.props || EMPTY_OBJ;
|
|
@@ -7103,6 +7102,9 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7103
7102
|
dirs,
|
|
7104
7103
|
memoIndex
|
|
7105
7104
|
} = vnode;
|
|
7105
|
+
if (patchFlag === -2) {
|
|
7106
|
+
optimized = false;
|
|
7107
|
+
}
|
|
7106
7108
|
if (ref != null) {
|
|
7107
7109
|
setRef(ref, null, parentSuspense, vnode, true);
|
|
7108
7110
|
}
|
|
@@ -7134,7 +7136,6 @@ function baseCreateRenderer(options, createHydrationFns) {
|
|
|
7134
7136
|
vnode,
|
|
7135
7137
|
parentComponent,
|
|
7136
7138
|
parentSuspense,
|
|
7137
|
-
optimized,
|
|
7138
7139
|
internals,
|
|
7139
7140
|
doRemove
|
|
7140
7141
|
);
|
|
@@ -8410,7 +8411,7 @@ const TeleportImpl = {
|
|
|
8410
8411
|
}
|
|
8411
8412
|
updateCssVars(n2);
|
|
8412
8413
|
},
|
|
8413
|
-
remove(vnode, parentComponent, parentSuspense,
|
|
8414
|
+
remove(vnode, parentComponent, parentSuspense, { um: unmount, o: { remove: hostRemove } }, doRemove) {
|
|
8414
8415
|
const { shapeFlag, children, anchor, targetAnchor, target, props } = vnode;
|
|
8415
8416
|
if (target) {
|
|
8416
8417
|
hostRemove(targetAnchor);
|
|
@@ -9582,7 +9583,7 @@ function isMemoSame(cached, memo) {
|
|
|
9582
9583
|
return true;
|
|
9583
9584
|
}
|
|
9584
9585
|
|
|
9585
|
-
const version = "3.4.
|
|
9586
|
+
const version = "3.4.30";
|
|
9586
9587
|
const warn = warn$1 ;
|
|
9587
9588
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9588
9589
|
const devtools = devtools$1 ;
|
|
@@ -10162,7 +10163,10 @@ function patchAttr(el, key, value, isSVG, instance, isBoolean = isSpecialBoolean
|
|
|
10162
10163
|
if (value == null || isBoolean && !includeBooleanAttr(value)) {
|
|
10163
10164
|
el.removeAttribute(key);
|
|
10164
10165
|
} else {
|
|
10165
|
-
el.setAttribute(
|
|
10166
|
+
el.setAttribute(
|
|
10167
|
+
key,
|
|
10168
|
+
isBoolean ? "" : isSymbol(value) ? String(value) : value
|
|
10169
|
+
);
|
|
10166
10170
|
}
|
|
10167
10171
|
}
|
|
10168
10172
|
}
|
|
@@ -10323,7 +10327,7 @@ const patchProp = (el, key, prevValue, nextValue, namespace, prevChildren, paren
|
|
|
10323
10327
|
parentSuspense,
|
|
10324
10328
|
unmountChildren
|
|
10325
10329
|
);
|
|
10326
|
-
if (key === "value" || key === "checked" || key === "selected") {
|
|
10330
|
+
if (!el.tagName.includes("-") && (key === "value" || key === "checked" || key === "selected")) {
|
|
10327
10331
|
patchAttr(el, key, nextValue, isSVG, parentComponent, key !== "value");
|
|
10328
10332
|
}
|
|
10329
10333
|
} else {
|