@vue/shared 3.2.24 → 3.2.28
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/shared.cjs.js +14 -2
- package/dist/shared.cjs.prod.js +14 -2
- package/dist/shared.d.ts +27 -4
- package/dist/shared.esm-bundler.js +14 -2
- package/package.json +4 -4
package/dist/shared.cjs.js
CHANGED
|
@@ -118,7 +118,7 @@ const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
|
|
|
118
118
|
`checked,muted,multiple,selected`);
|
|
119
119
|
/**
|
|
120
120
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
121
|
-
* e.g.
|
|
121
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
122
122
|
*/
|
|
123
123
|
function includeBooleanAttr(value) {
|
|
124
124
|
return !!value || value === '';
|
|
@@ -326,8 +326,20 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
|
|
|
326
326
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
327
327
|
'text,textPath,title,tspan,unknown,use,view';
|
|
328
328
|
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
329
|
+
/**
|
|
330
|
+
* Compiler only.
|
|
331
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
332
|
+
*/
|
|
329
333
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
334
|
+
/**
|
|
335
|
+
* Compiler only.
|
|
336
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
337
|
+
*/
|
|
330
338
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
339
|
+
/**
|
|
340
|
+
* Compiler only.
|
|
341
|
+
* Do NOT use in runtime code paths unless behind `true` flag.
|
|
342
|
+
*/
|
|
331
343
|
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
|
|
332
344
|
|
|
333
345
|
const escapeRE = /["'&<>]/;
|
|
@@ -506,7 +518,7 @@ const isIntegerKey = (key) => isString(key) &&
|
|
|
506
518
|
'' + parseInt(key, 10) === key;
|
|
507
519
|
const isReservedProp = /*#__PURE__*/ makeMap(
|
|
508
520
|
// the leading comma is intentional so empty string "" is also included
|
|
509
|
-
',key,ref,' +
|
|
521
|
+
',key,ref,ref_for,ref_key,' +
|
|
510
522
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
511
523
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
512
524
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
package/dist/shared.cjs.prod.js
CHANGED
|
@@ -118,7 +118,7 @@ const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
|
|
|
118
118
|
`checked,muted,multiple,selected`);
|
|
119
119
|
/**
|
|
120
120
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
121
|
-
* e.g.
|
|
121
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
122
122
|
*/
|
|
123
123
|
function includeBooleanAttr(value) {
|
|
124
124
|
return !!value || value === '';
|
|
@@ -326,8 +326,20 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
|
|
|
326
326
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
327
327
|
'text,textPath,title,tspan,unknown,use,view';
|
|
328
328
|
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
329
|
+
/**
|
|
330
|
+
* Compiler only.
|
|
331
|
+
* Do NOT use in runtime code paths unless behind `false` flag.
|
|
332
|
+
*/
|
|
329
333
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
334
|
+
/**
|
|
335
|
+
* Compiler only.
|
|
336
|
+
* Do NOT use in runtime code paths unless behind `false` flag.
|
|
337
|
+
*/
|
|
330
338
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
339
|
+
/**
|
|
340
|
+
* Compiler only.
|
|
341
|
+
* Do NOT use in runtime code paths unless behind `false` flag.
|
|
342
|
+
*/
|
|
331
343
|
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
|
|
332
344
|
|
|
333
345
|
const escapeRE = /["'&<>]/;
|
|
@@ -505,7 +517,7 @@ const isIntegerKey = (key) => isString(key) &&
|
|
|
505
517
|
'' + parseInt(key, 10) === key;
|
|
506
518
|
const isReservedProp = /*#__PURE__*/ makeMap(
|
|
507
519
|
// the leading comma is intentional so empty string "" is also included
|
|
508
|
-
',key,ref,' +
|
|
520
|
+
',key,ref,ref_for,ref_key,' +
|
|
509
521
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
510
522
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
511
523
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
package/dist/shared.d.ts
CHANGED
|
@@ -40,9 +40,11 @@ export declare const hasOwn: (val: object, key: string | symbol) => key is never
|
|
|
40
40
|
*/
|
|
41
41
|
export declare const hyphenate: (str: string) => string;
|
|
42
42
|
|
|
43
|
+
export declare type IfAny<T, Y, N> = 0 extends (1 & T) ? Y : N;
|
|
44
|
+
|
|
43
45
|
/**
|
|
44
46
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
45
|
-
* e.g.
|
|
47
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
46
48
|
*/
|
|
47
49
|
export declare function includeBooleanAttr(value: unknown): boolean;
|
|
48
50
|
|
|
@@ -61,6 +63,10 @@ export declare const isFunction: (val: unknown) => val is Function;
|
|
|
61
63
|
|
|
62
64
|
export declare const isGloballyWhitelisted: (key: string) => boolean;
|
|
63
65
|
|
|
66
|
+
/**
|
|
67
|
+
* Compiler only.
|
|
68
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
69
|
+
*/
|
|
64
70
|
export declare const isHTMLTag: (key: string) => boolean;
|
|
65
71
|
|
|
66
72
|
export declare const isIntegerKey: (key: unknown) => boolean;
|
|
@@ -105,16 +111,28 @@ export declare function isSSRSafeAttrName(name: string): boolean;
|
|
|
105
111
|
|
|
106
112
|
export declare const isString: (val: unknown) => val is string;
|
|
107
113
|
|
|
114
|
+
/**
|
|
115
|
+
* Compiler only.
|
|
116
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
117
|
+
*/
|
|
108
118
|
export declare const isSVGTag: (key: string) => boolean;
|
|
109
119
|
|
|
110
120
|
export declare const isSymbol: (val: unknown) => val is symbol;
|
|
111
121
|
|
|
122
|
+
/**
|
|
123
|
+
* Compiler only.
|
|
124
|
+
* Do NOT use in runtime code paths unless behind `__DEV__` flag.
|
|
125
|
+
*/
|
|
112
126
|
export declare const isVoidTag: (key: string) => boolean;
|
|
113
127
|
|
|
114
128
|
export declare function looseEqual(a: any, b: any): boolean;
|
|
115
129
|
|
|
116
130
|
export declare function looseIndexOf(arr: any[], val: any): number;
|
|
117
131
|
|
|
132
|
+
export declare type LooseRequired<T> = {
|
|
133
|
+
[P in string & keyof T]: T[P];
|
|
134
|
+
};
|
|
135
|
+
|
|
118
136
|
/**
|
|
119
137
|
* Make a map and return a function for checking if a key
|
|
120
138
|
* is in that map.
|
|
@@ -181,9 +199,12 @@ export declare const enum PatchFlags {
|
|
|
181
199
|
* Indicates an element with dynamic style
|
|
182
200
|
* The compiler pre-compiles static string styles into static objects
|
|
183
201
|
* + detects and hoists inline static objects
|
|
184
|
-
* e.g. style="color: red" and
|
|
185
|
-
*
|
|
186
|
-
*
|
|
202
|
+
* e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted
|
|
203
|
+
* as:
|
|
204
|
+
* ```js
|
|
205
|
+
* const style = { color: 'red' }
|
|
206
|
+
* render() { return e('div', { style }) }
|
|
207
|
+
* ```
|
|
187
208
|
*/
|
|
188
209
|
STYLE = 4,
|
|
189
210
|
/**
|
|
@@ -326,4 +347,6 @@ export declare const toRawType: (value: unknown) => string;
|
|
|
326
347
|
|
|
327
348
|
export declare const toTypeString: (value: unknown) => string;
|
|
328
349
|
|
|
350
|
+
export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
|
|
351
|
+
|
|
329
352
|
export { }
|
|
@@ -114,7 +114,7 @@ const isBooleanAttr = /*#__PURE__*/ makeMap(specialBooleanAttrs +
|
|
|
114
114
|
`checked,muted,multiple,selected`);
|
|
115
115
|
/**
|
|
116
116
|
* Boolean attributes should be included if the value is truthy or ''.
|
|
117
|
-
* e.g.
|
|
117
|
+
* e.g. `<select multiple>` compiles to `{ multiple: '' }`
|
|
118
118
|
*/
|
|
119
119
|
function includeBooleanAttr(value) {
|
|
120
120
|
return !!value || value === '';
|
|
@@ -322,8 +322,20 @@ const SVG_TAGS = 'svg,animate,animateMotion,animateTransform,circle,clipPath,col
|
|
|
322
322
|
'polygon,polyline,radialGradient,rect,set,solidcolor,stop,switch,symbol,' +
|
|
323
323
|
'text,textPath,title,tspan,unknown,use,view';
|
|
324
324
|
const VOID_TAGS = 'area,base,br,col,embed,hr,img,input,link,meta,param,source,track,wbr';
|
|
325
|
+
/**
|
|
326
|
+
* Compiler only.
|
|
327
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
328
|
+
*/
|
|
325
329
|
const isHTMLTag = /*#__PURE__*/ makeMap(HTML_TAGS);
|
|
330
|
+
/**
|
|
331
|
+
* Compiler only.
|
|
332
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
333
|
+
*/
|
|
326
334
|
const isSVGTag = /*#__PURE__*/ makeMap(SVG_TAGS);
|
|
335
|
+
/**
|
|
336
|
+
* Compiler only.
|
|
337
|
+
* Do NOT use in runtime code paths unless behind `(process.env.NODE_ENV !== 'production')` flag.
|
|
338
|
+
*/
|
|
327
339
|
const isVoidTag = /*#__PURE__*/ makeMap(VOID_TAGS);
|
|
328
340
|
|
|
329
341
|
const escapeRE = /["'&<>]/;
|
|
@@ -503,7 +515,7 @@ const isIntegerKey = (key) => isString(key) &&
|
|
|
503
515
|
'' + parseInt(key, 10) === key;
|
|
504
516
|
const isReservedProp = /*#__PURE__*/ makeMap(
|
|
505
517
|
// the leading comma is intentional so empty string "" is also included
|
|
506
|
-
',key,ref,' +
|
|
518
|
+
',key,ref,ref_for,ref_key,' +
|
|
507
519
|
'onVnodeBeforeMount,onVnodeMounted,' +
|
|
508
520
|
'onVnodeBeforeUpdate,onVnodeUpdated,' +
|
|
509
521
|
'onVnodeBeforeUnmount,onVnodeUnmounted');
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/shared",
|
|
3
|
-
"version": "3.2.
|
|
3
|
+
"version": "3.2.28",
|
|
4
4
|
"description": "internal utils shared across @vue packages",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"module": "dist/shared.esm-bundler.js",
|
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
},
|
|
18
18
|
"repository": {
|
|
19
19
|
"type": "git",
|
|
20
|
-
"url": "git+https://github.com/vuejs/
|
|
20
|
+
"url": "git+https://github.com/vuejs/core.git",
|
|
21
21
|
"directory": "packages/shared"
|
|
22
22
|
},
|
|
23
23
|
"keywords": [
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"author": "Evan You",
|
|
27
27
|
"license": "MIT",
|
|
28
28
|
"bugs": {
|
|
29
|
-
"url": "https://github.com/vuejs/
|
|
29
|
+
"url": "https://github.com/vuejs/core/issues"
|
|
30
30
|
},
|
|
31
|
-
"homepage": "https://github.com/vuejs/
|
|
31
|
+
"homepage": "https://github.com/vuejs/core/tree/main/packages/shared#readme"
|
|
32
32
|
}
|