@vue/shared 3.2.23 → 3.2.27

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.
@@ -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. <select multiple> compiles to { multiple: '' }
121
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
122
122
  */
123
123
  function includeBooleanAttr(value) {
124
124
  return !!value || value === '';
@@ -506,7 +506,7 @@ const isIntegerKey = (key) => isString(key) &&
506
506
  '' + parseInt(key, 10) === key;
507
507
  const isReservedProp = /*#__PURE__*/ makeMap(
508
508
  // the leading comma is intentional so empty string "" is also included
509
- ',key,ref,' +
509
+ ',key,ref,ref_for,ref_key,' +
510
510
  'onVnodeBeforeMount,onVnodeMounted,' +
511
511
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
512
512
  'onVnodeBeforeUnmount,onVnodeUnmounted');
@@ -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. <select multiple> compiles to { multiple: '' }
121
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
122
122
  */
123
123
  function includeBooleanAttr(value) {
124
124
  return !!value || value === '';
@@ -505,7 +505,7 @@ const isIntegerKey = (key) => isString(key) &&
505
505
  '' + parseInt(key, 10) === key;
506
506
  const isReservedProp = /*#__PURE__*/ makeMap(
507
507
  // the leading comma is intentional so empty string "" is also included
508
- ',key,ref,' +
508
+ ',key,ref,ref_for,ref_key,' +
509
509
  'onVnodeBeforeMount,onVnodeMounted,' +
510
510
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
511
511
  '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. <select multiple> compiles to { multiple: '' }
47
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
46
48
  */
47
49
  export declare function includeBooleanAttr(value: unknown): boolean;
48
50
 
@@ -115,6 +117,10 @@ export declare function looseEqual(a: any, b: any): boolean;
115
117
 
116
118
  export declare function looseIndexOf(arr: any[], val: any): number;
117
119
 
120
+ export declare type LooseRequired<T> = {
121
+ [P in string & keyof T]: T[P];
122
+ };
123
+
118
124
  /**
119
125
  * Make a map and return a function for checking if a key
120
126
  * is in that map.
@@ -181,9 +187,12 @@ export declare const enum PatchFlags {
181
187
  * Indicates an element with dynamic style
182
188
  * The compiler pre-compiles static string styles into static objects
183
189
  * + detects and hoists inline static objects
184
- * e.g. style="color: red" and :style="{ color: 'red' }" both get hoisted as
185
- * const style = { color: 'red' }
186
- * render() { return e('div', { style }) }
190
+ * e.g. `style="color: red"` and `:style="{ color: 'red' }"` both get hoisted
191
+ * as:
192
+ * ```js
193
+ * const style = { color: 'red' }
194
+ * render() { return e('div', { style }) }
195
+ * ```
187
196
  */
188
197
  STYLE = 4,
189
198
  /**
@@ -326,4 +335,6 @@ export declare const toRawType: (value: unknown) => string;
326
335
 
327
336
  export declare const toTypeString: (value: unknown) => string;
328
337
 
338
+ export declare type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
339
+
329
340
  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. <select multiple> compiles to { multiple: '' }
117
+ * e.g. `<select multiple>` compiles to `{ multiple: '' }`
118
118
  */
119
119
  function includeBooleanAttr(value) {
120
120
  return !!value || value === '';
@@ -503,7 +503,7 @@ const isIntegerKey = (key) => isString(key) &&
503
503
  '' + parseInt(key, 10) === key;
504
504
  const isReservedProp = /*#__PURE__*/ makeMap(
505
505
  // the leading comma is intentional so empty string "" is also included
506
- ',key,ref,' +
506
+ ',key,ref,ref_for,ref_key,' +
507
507
  'onVnodeBeforeMount,onVnodeMounted,' +
508
508
  'onVnodeBeforeUpdate,onVnodeUpdated,' +
509
509
  'onVnodeBeforeUnmount,onVnodeUnmounted');
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.2.23",
3
+ "version": "3.2.27",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",