@vue/runtime-dom 3.4.8 → 3.4.10
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 -5
- package/dist/runtime-dom.cjs.prod.js +5 -5
- package/dist/runtime-dom.esm-browser.js +76 -66
- package/dist/runtime-dom.esm-browser.prod.js +4 -4
- package/dist/runtime-dom.esm-bundler.js +5 -5
- package/dist/runtime-dom.global.js +76 -66
- package/dist/runtime-dom.global.prod.js +5 -5
- package/package.json +17 -3
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.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -418,6 +418,7 @@ function useCssVars(getter) {
|
|
|
418
418
|
|
|
419
419
|
function patchStyle(el, prev, next) {
|
|
420
420
|
const style = el.style;
|
|
421
|
+
const currentDisplay = style.display;
|
|
421
422
|
const isCssString = shared.isString(next);
|
|
422
423
|
if (next && !isCssString) {
|
|
423
424
|
if (prev && !shared.isString(prev)) {
|
|
@@ -431,7 +432,6 @@ function patchStyle(el, prev, next) {
|
|
|
431
432
|
setStyle(style, key, next[key]);
|
|
432
433
|
}
|
|
433
434
|
} else {
|
|
434
|
-
const currentDisplay = style.display;
|
|
435
435
|
if (isCssString) {
|
|
436
436
|
if (prev !== next) {
|
|
437
437
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -443,9 +443,9 @@ function patchStyle(el, prev, next) {
|
|
|
443
443
|
} else if (prev) {
|
|
444
444
|
el.removeAttribute("style");
|
|
445
445
|
}
|
|
446
|
-
|
|
447
|
-
|
|
448
|
-
|
|
446
|
+
}
|
|
447
|
+
if (vShowOldKey in el) {
|
|
448
|
+
style.display = currentDisplay;
|
|
449
449
|
}
|
|
450
450
|
}
|
|
451
451
|
const semicolonRE = /[^\\];\s*$/;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -412,6 +412,7 @@ function useCssVars(getter) {
|
|
|
412
412
|
|
|
413
413
|
function patchStyle(el, prev, next) {
|
|
414
414
|
const style = el.style;
|
|
415
|
+
const currentDisplay = style.display;
|
|
415
416
|
const isCssString = shared.isString(next);
|
|
416
417
|
if (next && !isCssString) {
|
|
417
418
|
if (prev && !shared.isString(prev)) {
|
|
@@ -425,7 +426,6 @@ function patchStyle(el, prev, next) {
|
|
|
425
426
|
setStyle(style, key, next[key]);
|
|
426
427
|
}
|
|
427
428
|
} else {
|
|
428
|
-
const currentDisplay = style.display;
|
|
429
429
|
if (isCssString) {
|
|
430
430
|
if (prev !== next) {
|
|
431
431
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -437,9 +437,9 @@ function patchStyle(el, prev, next) {
|
|
|
437
437
|
} else if (prev) {
|
|
438
438
|
el.removeAttribute("style");
|
|
439
439
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
440
|
+
}
|
|
441
|
+
if (vShowOldKey in el) {
|
|
442
|
+
style.display = currentDisplay;
|
|
443
443
|
}
|
|
444
444
|
}
|
|
445
445
|
const importantRE = /\s*!important$/;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* @vue/runtime-dom v3.4.
|
|
2
|
+
* @vue/runtime-dom v3.4.10
|
|
3
3
|
* (c) 2018-present Yuxi (Evan) You and Vue contributors
|
|
4
4
|
* @license MIT
|
|
5
5
|
**/
|
|
@@ -2673,6 +2673,10 @@ const SuspenseImpl = {
|
|
|
2673
2673
|
rendererInternals
|
|
2674
2674
|
);
|
|
2675
2675
|
} else {
|
|
2676
|
+
if (parentSuspense && parentSuspense.deps > 0) {
|
|
2677
|
+
n2.suspense = n1.suspense;
|
|
2678
|
+
return;
|
|
2679
|
+
}
|
|
2676
2680
|
patchSuspense(
|
|
2677
2681
|
n1,
|
|
2678
2682
|
n2,
|
|
@@ -4746,58 +4750,6 @@ function useSlots() {
|
|
|
4746
4750
|
function useAttrs() {
|
|
4747
4751
|
return getContext().attrs;
|
|
4748
4752
|
}
|
|
4749
|
-
function useModel(props, name, options = EMPTY_OBJ) {
|
|
4750
|
-
const i = getCurrentInstance();
|
|
4751
|
-
if (!i) {
|
|
4752
|
-
warn$1(`useModel() called without active instance.`);
|
|
4753
|
-
return ref();
|
|
4754
|
-
}
|
|
4755
|
-
if (!i.propsOptions[0][name]) {
|
|
4756
|
-
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
4757
|
-
return ref();
|
|
4758
|
-
}
|
|
4759
|
-
const camelizedName = camelize(name);
|
|
4760
|
-
const hyphenatedName = hyphenate(name);
|
|
4761
|
-
const res = customRef((track, trigger) => {
|
|
4762
|
-
let localValue;
|
|
4763
|
-
watchSyncEffect(() => {
|
|
4764
|
-
const propValue = props[name];
|
|
4765
|
-
if (hasChanged(localValue, propValue)) {
|
|
4766
|
-
localValue = propValue;
|
|
4767
|
-
trigger();
|
|
4768
|
-
}
|
|
4769
|
-
});
|
|
4770
|
-
return {
|
|
4771
|
-
get() {
|
|
4772
|
-
track();
|
|
4773
|
-
return options.get ? options.get(localValue) : localValue;
|
|
4774
|
-
},
|
|
4775
|
-
set(value) {
|
|
4776
|
-
const rawProps = i.vnode.props;
|
|
4777
|
-
if (!(rawProps && // check if parent has passed v-model
|
|
4778
|
-
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
4779
|
-
localValue = value;
|
|
4780
|
-
trigger();
|
|
4781
|
-
}
|
|
4782
|
-
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
4783
|
-
}
|
|
4784
|
-
};
|
|
4785
|
-
});
|
|
4786
|
-
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
4787
|
-
res[Symbol.iterator] = () => {
|
|
4788
|
-
let i2 = 0;
|
|
4789
|
-
return {
|
|
4790
|
-
next() {
|
|
4791
|
-
if (i2 < 2) {
|
|
4792
|
-
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
4793
|
-
} else {
|
|
4794
|
-
return { done: true };
|
|
4795
|
-
}
|
|
4796
|
-
}
|
|
4797
|
-
};
|
|
4798
|
-
};
|
|
4799
|
-
return res;
|
|
4800
|
-
}
|
|
4801
4753
|
function getContext() {
|
|
4802
4754
|
const i = getCurrentInstance();
|
|
4803
4755
|
if (!i) {
|
|
@@ -6584,8 +6536,13 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6584
6536
|
actual = el.hasAttribute(key);
|
|
6585
6537
|
expected = includeBooleanAttr(clientValue);
|
|
6586
6538
|
} else {
|
|
6587
|
-
|
|
6588
|
-
|
|
6539
|
+
if (el.hasAttribute(key)) {
|
|
6540
|
+
actual = el.getAttribute(key);
|
|
6541
|
+
} else {
|
|
6542
|
+
const serverValue = el[key];
|
|
6543
|
+
actual = isObject(serverValue) || serverValue == null ? "" : String(serverValue);
|
|
6544
|
+
}
|
|
6545
|
+
expected = isObject(clientValue) || clientValue == null ? "" : String(clientValue);
|
|
6589
6546
|
}
|
|
6590
6547
|
if (actual !== expected) {
|
|
6591
6548
|
mismatchType = `attribute`;
|
|
@@ -6594,15 +6551,15 @@ function propHasMismatch(el, key, clientValue, vnode) {
|
|
|
6594
6551
|
}
|
|
6595
6552
|
if (mismatchType) {
|
|
6596
6553
|
const format = (v) => v === false ? `(not rendered)` : `${mismatchKey}="${v}"`;
|
|
6597
|
-
|
|
6598
|
-
|
|
6599
|
-
el,
|
|
6600
|
-
`
|
|
6554
|
+
const preSegment = `Hydration ${mismatchType} mismatch on`;
|
|
6555
|
+
const postSegment = `
|
|
6601
6556
|
- rendered on server: ${format(actual)}
|
|
6602
6557
|
- expected on client: ${format(expected)}
|
|
6603
6558
|
Note: this mismatch is check-only. The DOM will not be rectified in production due to performance overhead.
|
|
6604
|
-
You should fix the source of the mismatch
|
|
6605
|
-
|
|
6559
|
+
You should fix the source of the mismatch.`;
|
|
6560
|
+
{
|
|
6561
|
+
warn$1(preSegment, el, postSegment);
|
|
6562
|
+
}
|
|
6606
6563
|
return true;
|
|
6607
6564
|
}
|
|
6608
6565
|
return false;
|
|
@@ -9258,6 +9215,59 @@ const computed = (getterOrOptions, debugOptions) => {
|
|
|
9258
9215
|
return computed$1(getterOrOptions, debugOptions, isInSSRComponentSetup);
|
|
9259
9216
|
};
|
|
9260
9217
|
|
|
9218
|
+
function useModel(props, name, options = EMPTY_OBJ) {
|
|
9219
|
+
const i = getCurrentInstance();
|
|
9220
|
+
if (!i) {
|
|
9221
|
+
warn$1(`useModel() called without active instance.`);
|
|
9222
|
+
return ref();
|
|
9223
|
+
}
|
|
9224
|
+
if (!i.propsOptions[0][name]) {
|
|
9225
|
+
warn$1(`useModel() called with prop "${name}" which is not declared.`);
|
|
9226
|
+
return ref();
|
|
9227
|
+
}
|
|
9228
|
+
const camelizedName = camelize(name);
|
|
9229
|
+
const hyphenatedName = hyphenate(name);
|
|
9230
|
+
const res = customRef((track, trigger) => {
|
|
9231
|
+
let localValue;
|
|
9232
|
+
watchSyncEffect(() => {
|
|
9233
|
+
const propValue = props[name];
|
|
9234
|
+
if (hasChanged(localValue, propValue)) {
|
|
9235
|
+
localValue = propValue;
|
|
9236
|
+
trigger();
|
|
9237
|
+
}
|
|
9238
|
+
});
|
|
9239
|
+
return {
|
|
9240
|
+
get() {
|
|
9241
|
+
track();
|
|
9242
|
+
return options.get ? options.get(localValue) : localValue;
|
|
9243
|
+
},
|
|
9244
|
+
set(value) {
|
|
9245
|
+
const rawProps = i.vnode.props;
|
|
9246
|
+
if (!(rawProps && // check if parent has passed v-model
|
|
9247
|
+
(name in rawProps || camelizedName in rawProps || hyphenatedName in rawProps) && (`onUpdate:${name}` in rawProps || `onUpdate:${camelizedName}` in rawProps || `onUpdate:${hyphenatedName}` in rawProps)) && hasChanged(value, localValue)) {
|
|
9248
|
+
localValue = value;
|
|
9249
|
+
trigger();
|
|
9250
|
+
}
|
|
9251
|
+
i.emit(`update:${name}`, options.set ? options.set(value) : value);
|
|
9252
|
+
}
|
|
9253
|
+
};
|
|
9254
|
+
});
|
|
9255
|
+
const modifierKey = name === "modelValue" ? "modelModifiers" : `${name}Modifiers`;
|
|
9256
|
+
res[Symbol.iterator] = () => {
|
|
9257
|
+
let i2 = 0;
|
|
9258
|
+
return {
|
|
9259
|
+
next() {
|
|
9260
|
+
if (i2 < 2) {
|
|
9261
|
+
return { value: i2++ ? props[modifierKey] || {} : res, done: false };
|
|
9262
|
+
} else {
|
|
9263
|
+
return { done: true };
|
|
9264
|
+
}
|
|
9265
|
+
}
|
|
9266
|
+
};
|
|
9267
|
+
};
|
|
9268
|
+
return res;
|
|
9269
|
+
}
|
|
9270
|
+
|
|
9261
9271
|
function h(type, propsOrChildren, children) {
|
|
9262
9272
|
const l = arguments.length;
|
|
9263
9273
|
if (l === 2) {
|
|
@@ -9480,7 +9490,7 @@ function isMemoSame(cached, memo) {
|
|
|
9480
9490
|
return true;
|
|
9481
9491
|
}
|
|
9482
9492
|
|
|
9483
|
-
const version = "3.4.
|
|
9493
|
+
const version = "3.4.10";
|
|
9484
9494
|
const warn = warn$1 ;
|
|
9485
9495
|
const ErrorTypeStrings = ErrorTypeStrings$1 ;
|
|
9486
9496
|
const devtools = devtools$1 ;
|
|
@@ -9949,6 +9959,7 @@ function setVarsOnNode(el, vars) {
|
|
|
9949
9959
|
|
|
9950
9960
|
function patchStyle(el, prev, next) {
|
|
9951
9961
|
const style = el.style;
|
|
9962
|
+
const currentDisplay = style.display;
|
|
9952
9963
|
const isCssString = isString(next);
|
|
9953
9964
|
if (next && !isCssString) {
|
|
9954
9965
|
if (prev && !isString(prev)) {
|
|
@@ -9962,7 +9973,6 @@ function patchStyle(el, prev, next) {
|
|
|
9962
9973
|
setStyle(style, key, next[key]);
|
|
9963
9974
|
}
|
|
9964
9975
|
} else {
|
|
9965
|
-
const currentDisplay = style.display;
|
|
9966
9976
|
if (isCssString) {
|
|
9967
9977
|
if (prev !== next) {
|
|
9968
9978
|
const cssVarText = style[CSS_VAR_TEXT];
|
|
@@ -9974,9 +9984,9 @@ function patchStyle(el, prev, next) {
|
|
|
9974
9984
|
} else if (prev) {
|
|
9975
9985
|
el.removeAttribute("style");
|
|
9976
9986
|
}
|
|
9977
|
-
|
|
9978
|
-
|
|
9979
|
-
|
|
9987
|
+
}
|
|
9988
|
+
if (vShowOldKey in el) {
|
|
9989
|
+
style.display = currentDisplay;
|
|
9980
9990
|
}
|
|
9981
9991
|
}
|
|
9982
9992
|
const semicolonRE = /[^\\];\s*$/;
|