@vue/runtime-dom 3.2.45 → 3.2.46
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 +21 -22
- package/dist/runtime-dom.cjs.prod.js +18 -11
- package/dist/runtime-dom.d.ts +20 -3
- package/dist/runtime-dom.esm-browser.js +288 -218
- package/dist/runtime-dom.esm-browser.prod.js +1 -1
- package/dist/runtime-dom.esm-bundler.js +20 -20
- package/dist/runtime-dom.global.js +290 -220
- package/dist/runtime-dom.global.prod.js +1 -1
- package/package.json +3 -3
package/dist/runtime-dom.cjs.js
CHANGED
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var runtimeCore = require('@vue/runtime-core');
|
|
6
4
|
var shared = require('@vue/shared');
|
|
7
5
|
|
|
@@ -107,9 +105,6 @@ function patchStyle(el, prev, next) {
|
|
|
107
105
|
const style = el.style;
|
|
108
106
|
const isCssString = shared.isString(next);
|
|
109
107
|
if (next && !isCssString) {
|
|
110
|
-
for (const key in next) {
|
|
111
|
-
setStyle(style, key, next[key]);
|
|
112
|
-
}
|
|
113
108
|
if (prev && !shared.isString(prev)) {
|
|
114
109
|
for (const key in prev) {
|
|
115
110
|
if (next[key] == null) {
|
|
@@ -117,6 +112,9 @@ function patchStyle(el, prev, next) {
|
|
|
117
112
|
}
|
|
118
113
|
}
|
|
119
114
|
}
|
|
115
|
+
for (const key in next) {
|
|
116
|
+
setStyle(style, key, next[key]);
|
|
117
|
+
}
|
|
120
118
|
}
|
|
121
119
|
else {
|
|
122
120
|
const currentDisplay = style.display;
|
|
@@ -858,18 +856,10 @@ function normalizeDuration(duration) {
|
|
|
858
856
|
}
|
|
859
857
|
function NumberOf(val) {
|
|
860
858
|
const res = shared.toNumber(val);
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
}
|
|
864
|
-
function validateDuration(val) {
|
|
865
|
-
if (typeof val !== 'number') {
|
|
866
|
-
runtimeCore.warn(`<transition> explicit duration is not a valid number - ` +
|
|
867
|
-
`got ${JSON.stringify(val)}.`);
|
|
868
|
-
}
|
|
869
|
-
else if (isNaN(val)) {
|
|
870
|
-
runtimeCore.warn(`<transition> explicit duration is NaN - ` +
|
|
871
|
-
'the duration expression might be incorrect.');
|
|
859
|
+
{
|
|
860
|
+
runtimeCore.assertNumber(res, '<transition> explicit duration');
|
|
872
861
|
}
|
|
862
|
+
return res;
|
|
873
863
|
}
|
|
874
864
|
function addTransitionClass(el, cls) {
|
|
875
865
|
cls.split(/\s+/).forEach(c => c && el.classList.add(c));
|
|
@@ -1066,6 +1056,14 @@ const TransitionGroupImpl = {
|
|
|
1066
1056
|
};
|
|
1067
1057
|
}
|
|
1068
1058
|
};
|
|
1059
|
+
/**
|
|
1060
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
1061
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
1062
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
1063
|
+
* in a function and mark the function's invocation as pure.
|
|
1064
|
+
*/
|
|
1065
|
+
const removeMode = (props) => delete props.mode;
|
|
1066
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
1069
1067
|
const TransitionGroup = TransitionGroupImpl;
|
|
1070
1068
|
function callPendingCbs(c) {
|
|
1071
1069
|
const el = c.el;
|
|
@@ -1141,7 +1139,7 @@ const vModelText = {
|
|
|
1141
1139
|
domValue = domValue.trim();
|
|
1142
1140
|
}
|
|
1143
1141
|
if (castToNumber) {
|
|
1144
|
-
domValue = shared.
|
|
1142
|
+
domValue = shared.looseToNumber(domValue);
|
|
1145
1143
|
}
|
|
1146
1144
|
el._assign(domValue);
|
|
1147
1145
|
});
|
|
@@ -1176,7 +1174,8 @@ const vModelText = {
|
|
|
1176
1174
|
if (trim && el.value.trim() === value) {
|
|
1177
1175
|
return;
|
|
1178
1176
|
}
|
|
1179
|
-
if ((number || el.type === 'number') &&
|
|
1177
|
+
if ((number || el.type === 'number') &&
|
|
1178
|
+
shared.looseToNumber(el.value) === value) {
|
|
1180
1179
|
return;
|
|
1181
1180
|
}
|
|
1182
1181
|
}
|
|
@@ -1265,7 +1264,7 @@ const vModelSelect = {
|
|
|
1265
1264
|
addEventListener(el, 'change', () => {
|
|
1266
1265
|
const selectedVal = Array.prototype.filter
|
|
1267
1266
|
.call(el.options, (o) => o.selected)
|
|
1268
|
-
.map((o) => number ? shared.
|
|
1267
|
+
.map((o) => number ? shared.looseToNumber(getValue(o)) : getValue(o));
|
|
1269
1268
|
el._assign(el.multiple
|
|
1270
1269
|
? isSetModel
|
|
1271
1270
|
? new Set(selectedVal)
|
|
@@ -1638,9 +1637,6 @@ const initDirectivesForSSR = () => {
|
|
|
1638
1637
|
}
|
|
1639
1638
|
;
|
|
1640
1639
|
|
|
1641
|
-
Object.keys(runtimeCore).forEach(function (k) {
|
|
1642
|
-
if (k !== 'default') exports[k] = runtimeCore[k];
|
|
1643
|
-
});
|
|
1644
1640
|
exports.Transition = Transition;
|
|
1645
1641
|
exports.TransitionGroup = TransitionGroup;
|
|
1646
1642
|
exports.VueElement = VueElement;
|
|
@@ -1661,3 +1657,6 @@ exports.vModelText = vModelText;
|
|
|
1661
1657
|
exports.vShow = vShow;
|
|
1662
1658
|
exports.withKeys = withKeys;
|
|
1663
1659
|
exports.withModifiers = withModifiers;
|
|
1660
|
+
Object.keys(runtimeCore).forEach(function(k) {
|
|
1661
|
+
if (k !== 'default') exports[k] = runtimeCore[k];
|
|
1662
|
+
});
|
|
@@ -1,7 +1,5 @@
|
|
|
1
1
|
'use strict';
|
|
2
2
|
|
|
3
|
-
Object.defineProperty(exports, '__esModule', { value: true });
|
|
4
|
-
|
|
5
3
|
var runtimeCore = require('@vue/runtime-core');
|
|
6
4
|
var shared = require('@vue/shared');
|
|
7
5
|
|
|
@@ -107,9 +105,6 @@ function patchStyle(el, prev, next) {
|
|
|
107
105
|
const style = el.style;
|
|
108
106
|
const isCssString = shared.isString(next);
|
|
109
107
|
if (next && !isCssString) {
|
|
110
|
-
for (const key in next) {
|
|
111
|
-
setStyle(style, key, next[key]);
|
|
112
|
-
}
|
|
113
108
|
if (prev && !shared.isString(prev)) {
|
|
114
109
|
for (const key in prev) {
|
|
115
110
|
if (next[key] == null) {
|
|
@@ -117,6 +112,9 @@ function patchStyle(el, prev, next) {
|
|
|
117
112
|
}
|
|
118
113
|
}
|
|
119
114
|
}
|
|
115
|
+
for (const key in next) {
|
|
116
|
+
setStyle(style, key, next[key]);
|
|
117
|
+
}
|
|
120
118
|
}
|
|
121
119
|
else {
|
|
122
120
|
const currentDisplay = style.display;
|
|
@@ -1017,6 +1015,14 @@ const TransitionGroupImpl = {
|
|
|
1017
1015
|
};
|
|
1018
1016
|
}
|
|
1019
1017
|
};
|
|
1018
|
+
/**
|
|
1019
|
+
* TransitionGroup does not support "mode" so we need to remove it from the
|
|
1020
|
+
* props declarations, but direct delete operation is considered a side effect
|
|
1021
|
+
* and will make the entire transition feature non-tree-shakeable, so we do it
|
|
1022
|
+
* in a function and mark the function's invocation as pure.
|
|
1023
|
+
*/
|
|
1024
|
+
const removeMode = (props) => delete props.mode;
|
|
1025
|
+
/*#__PURE__*/ removeMode(TransitionGroupImpl.props);
|
|
1020
1026
|
const TransitionGroup = TransitionGroupImpl;
|
|
1021
1027
|
function callPendingCbs(c) {
|
|
1022
1028
|
const el = c.el;
|
|
@@ -1092,7 +1098,7 @@ const vModelText = {
|
|
|
1092
1098
|
domValue = domValue.trim();
|
|
1093
1099
|
}
|
|
1094
1100
|
if (castToNumber) {
|
|
1095
|
-
domValue = shared.
|
|
1101
|
+
domValue = shared.looseToNumber(domValue);
|
|
1096
1102
|
}
|
|
1097
1103
|
el._assign(domValue);
|
|
1098
1104
|
});
|
|
@@ -1127,7 +1133,8 @@ const vModelText = {
|
|
|
1127
1133
|
if (trim && el.value.trim() === value) {
|
|
1128
1134
|
return;
|
|
1129
1135
|
}
|
|
1130
|
-
if ((number || el.type === 'number') &&
|
|
1136
|
+
if ((number || el.type === 'number') &&
|
|
1137
|
+
shared.looseToNumber(el.value) === value) {
|
|
1131
1138
|
return;
|
|
1132
1139
|
}
|
|
1133
1140
|
}
|
|
@@ -1216,7 +1223,7 @@ const vModelSelect = {
|
|
|
1216
1223
|
addEventListener(el, 'change', () => {
|
|
1217
1224
|
const selectedVal = Array.prototype.filter
|
|
1218
1225
|
.call(el.options, (o) => o.selected)
|
|
1219
|
-
.map((o) => number ? shared.
|
|
1226
|
+
.map((o) => number ? shared.looseToNumber(getValue(o)) : getValue(o));
|
|
1220
1227
|
el._assign(el.multiple
|
|
1221
1228
|
? isSetModel
|
|
1222
1229
|
? new Set(selectedVal)
|
|
@@ -1531,9 +1538,6 @@ const initDirectivesForSSR = () => {
|
|
|
1531
1538
|
}
|
|
1532
1539
|
;
|
|
1533
1540
|
|
|
1534
|
-
Object.keys(runtimeCore).forEach(function (k) {
|
|
1535
|
-
if (k !== 'default') exports[k] = runtimeCore[k];
|
|
1536
|
-
});
|
|
1537
1541
|
exports.Transition = Transition;
|
|
1538
1542
|
exports.TransitionGroup = TransitionGroup;
|
|
1539
1543
|
exports.VueElement = VueElement;
|
|
@@ -1554,3 +1558,6 @@ exports.vModelText = vModelText;
|
|
|
1554
1558
|
exports.vShow = vShow;
|
|
1555
1559
|
exports.withKeys = withKeys;
|
|
1556
1560
|
exports.withModifiers = withModifiers;
|
|
1561
|
+
Object.keys(runtimeCore).forEach(function(k) {
|
|
1562
|
+
if (k !== 'default') exports[k] = runtimeCore[k];
|
|
1563
|
+
});
|
package/dist/runtime-dom.d.ts
CHANGED
|
@@ -481,6 +481,17 @@ export interface HTMLAttributes extends AriaAttributes, EventHandlers<Events> {
|
|
|
481
481
|
is?: string
|
|
482
482
|
}
|
|
483
483
|
|
|
484
|
+
type HTMLAttributeReferrerPolicy =
|
|
485
|
+
| ''
|
|
486
|
+
| 'no-referrer'
|
|
487
|
+
| 'no-referrer-when-downgrade'
|
|
488
|
+
| 'origin'
|
|
489
|
+
| 'origin-when-cross-origin'
|
|
490
|
+
| 'same-origin'
|
|
491
|
+
| 'strict-origin'
|
|
492
|
+
| 'strict-origin-when-cross-origin'
|
|
493
|
+
| 'unsafe-url'
|
|
494
|
+
|
|
484
495
|
export interface AnchorHTMLAttributes extends HTMLAttributes {
|
|
485
496
|
download?: any
|
|
486
497
|
href?: string
|
|
@@ -490,7 +501,7 @@ export interface AnchorHTMLAttributes extends HTMLAttributes {
|
|
|
490
501
|
rel?: string
|
|
491
502
|
target?: string
|
|
492
503
|
type?: string
|
|
493
|
-
referrerpolicy?:
|
|
504
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
494
505
|
}
|
|
495
506
|
|
|
496
507
|
export interface AreaHTMLAttributes extends HTMLAttributes {
|
|
@@ -500,6 +511,7 @@ export interface AreaHTMLAttributes extends HTMLAttributes {
|
|
|
500
511
|
href?: string
|
|
501
512
|
hreflang?: string
|
|
502
513
|
media?: string
|
|
514
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
503
515
|
rel?: string
|
|
504
516
|
shape?: string
|
|
505
517
|
target?: string
|
|
@@ -598,7 +610,7 @@ export interface IframeHTMLAttributes extends HTMLAttributes {
|
|
|
598
610
|
marginheight?: Numberish
|
|
599
611
|
marginwidth?: Numberish
|
|
600
612
|
name?: string
|
|
601
|
-
referrerpolicy?:
|
|
613
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
602
614
|
sandbox?: string
|
|
603
615
|
scrolling?: string
|
|
604
616
|
seamless?: Booleanish
|
|
@@ -612,6 +624,7 @@ export interface ImgHTMLAttributes extends HTMLAttributes {
|
|
|
612
624
|
crossorigin?: 'anonymous' | 'use-credentials' | ''
|
|
613
625
|
decoding?: 'async' | 'auto' | 'sync'
|
|
614
626
|
height?: Numberish
|
|
627
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
615
628
|
sizes?: string
|
|
616
629
|
src?: string
|
|
617
630
|
srcset?: string
|
|
@@ -686,6 +699,7 @@ export interface LinkHTMLAttributes extends HTMLAttributes {
|
|
|
686
699
|
hreflang?: string
|
|
687
700
|
integrity?: string
|
|
688
701
|
media?: string
|
|
702
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
689
703
|
rel?: string
|
|
690
704
|
sizes?: string
|
|
691
705
|
type?: string
|
|
@@ -786,6 +800,7 @@ export interface ScriptHTMLAttributes extends HTMLAttributes {
|
|
|
786
800
|
defer?: Booleanish
|
|
787
801
|
integrity?: string
|
|
788
802
|
nomodule?: Booleanish
|
|
803
|
+
referrerpolicy?: HTMLAttributeReferrerPolicy
|
|
789
804
|
nonce?: string
|
|
790
805
|
src?: string
|
|
791
806
|
type?: string
|
|
@@ -1473,7 +1488,9 @@ export interface Events {
|
|
|
1473
1488
|
}
|
|
1474
1489
|
|
|
1475
1490
|
type EventHandlers<E> = {
|
|
1476
|
-
[K in keyof E]?: E[K] extends (...args: any) => any
|
|
1491
|
+
[K in keyof E]?: E[K] extends (...args: any) => any
|
|
1492
|
+
? E[K]
|
|
1493
|
+
: (payload: E[K]) => void
|
|
1477
1494
|
}
|
|
1478
1495
|
|
|
1479
1496
|
// use namespace import to avoid collision with generated types which use
|