@vue/shared 3.3.0-alpha.5 → 3.3.0-alpha.7

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.
Files changed (2) hide show
  1. package/dist/shared.d.ts +65 -66
  2. package/package.json +1 -1
package/dist/shared.d.ts CHANGED
@@ -5,75 +5,75 @@
5
5
  * \/\*#\_\_PURE\_\_\*\/
6
6
  * So that rollup can tree-shake them if necessary.
7
7
  */
8
- declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean;
8
+ export declare function makeMap(str: string, expectsLowerCase?: boolean): (key: string) => boolean;
9
9
 
10
- declare const EMPTY_OBJ: {
10
+ export declare const EMPTY_OBJ: {
11
11
  readonly [key: string]: any;
12
12
  };
13
- declare const EMPTY_ARR: readonly never[];
14
- declare const NOOP: () => void;
13
+ export declare const EMPTY_ARR: readonly never[];
14
+ export declare const NOOP: () => void;
15
15
  /**
16
16
  * Always return false.
17
17
  */
18
- declare const NO: () => boolean;
19
- declare const isOn: (key: string) => boolean;
20
- declare const isModelListener: (key: string) => boolean;
21
- declare const extend: {
18
+ export declare const NO: () => boolean;
19
+ export declare const isOn: (key: string) => boolean;
20
+ export declare const isModelListener: (key: string) => boolean;
21
+ export declare const extend: {
22
22
  <T extends {}, U>(target: T, source: U): T & U;
23
23
  <T_1 extends {}, U_1, V>(target: T_1, source1: U_1, source2: V): T_1 & U_1 & V;
24
24
  <T_2 extends {}, U_2, V_1, W>(target: T_2, source1: U_2, source2: V_1, source3: W): T_2 & U_2 & V_1 & W;
25
25
  (target: object, ...sources: any[]): any;
26
26
  };
27
- declare const remove: <T>(arr: T[], el: T) => void;
28
- declare const hasOwn: (val: object, key: string | symbol) => key is never;
29
- declare const isArray: (arg: any) => arg is any[];
30
- declare const isMap: (val: unknown) => val is Map<any, any>;
31
- declare const isSet: (val: unknown) => val is Set<any>;
32
- declare const isDate: (val: unknown) => val is Date;
33
- declare const isRegExp: (val: unknown) => val is RegExp;
34
- declare const isFunction: (val: unknown) => val is Function;
35
- declare const isString: (val: unknown) => val is string;
36
- declare const isSymbol: (val: unknown) => val is symbol;
37
- declare const isObject: (val: unknown) => val is Record<any, any>;
38
- declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
39
- declare const objectToString: () => string;
40
- declare const toTypeString: (value: unknown) => string;
41
- declare const toRawType: (value: unknown) => string;
42
- declare const isPlainObject: (val: unknown) => val is object;
43
- declare const isIntegerKey: (key: unknown) => boolean;
44
- declare const isReservedProp: (key: string) => boolean;
45
- declare const isBuiltInDirective: (key: string) => boolean;
27
+ export declare const remove: <T>(arr: T[], el: T) => void;
28
+ export declare const hasOwn: (val: object, key: string | symbol) => key is never;
29
+ export declare const isArray: (arg: any) => arg is any[];
30
+ export declare const isMap: (val: unknown) => val is Map<any, any>;
31
+ export declare const isSet: (val: unknown) => val is Set<any>;
32
+ export declare const isDate: (val: unknown) => val is Date;
33
+ export declare const isRegExp: (val: unknown) => val is RegExp;
34
+ export declare const isFunction: (val: unknown) => val is Function;
35
+ export declare const isString: (val: unknown) => val is string;
36
+ export declare const isSymbol: (val: unknown) => val is symbol;
37
+ export declare const isObject: (val: unknown) => val is Record<any, any>;
38
+ export declare const isPromise: <T = any>(val: unknown) => val is Promise<T>;
39
+ export declare const objectToString: () => string;
40
+ export declare const toTypeString: (value: unknown) => string;
41
+ export declare const toRawType: (value: unknown) => string;
42
+ export declare const isPlainObject: (val: unknown) => val is object;
43
+ export declare const isIntegerKey: (key: unknown) => boolean;
44
+ export declare const isReservedProp: (key: string) => boolean;
45
+ export declare const isBuiltInDirective: (key: string) => boolean;
46
46
  /**
47
47
  * @private
48
48
  */
49
- declare const camelize: (str: string) => string;
49
+ export declare const camelize: (str: string) => string;
50
50
  /**
51
51
  * @private
52
52
  */
53
- declare const hyphenate: (str: string) => string;
53
+ export declare const hyphenate: (str: string) => string;
54
54
  /**
55
55
  * @private
56
56
  */
57
- declare const capitalize: (str: string) => string;
57
+ export declare const capitalize: (str: string) => string;
58
58
  /**
59
59
  * @private
60
60
  */
61
- declare const toHandlerKey: (str: string) => string;
62
- declare const hasChanged: (value: any, oldValue: any) => boolean;
63
- declare const invokeArrayFns: (fns: Function[], arg?: any) => void;
64
- declare const def: (obj: object, key: string | symbol, value: any) => void;
61
+ export declare const toHandlerKey: (str: string) => string;
62
+ export declare const hasChanged: (value: any, oldValue: any) => boolean;
63
+ export declare const invokeArrayFns: (fns: Function[], arg?: any) => void;
64
+ export declare const def: (obj: object, key: string | symbol, value: any) => void;
65
65
  /**
66
66
  * "123-foo" will be parsed to 123
67
67
  * This is used for the .number modifier in v-model
68
68
  */
69
- declare const looseToNumber: (val: any) => any;
69
+ export declare const looseToNumber: (val: any) => any;
70
70
  /**
71
71
  * Only conerces number-like strings
72
72
  * "123-foo" will be returned as-is
73
73
  */
74
- declare const toNumber: (val: any) => any;
75
- declare const getGlobalThis: () => any;
76
- declare function genPropsAccessExp(name: string): string;
74
+ export declare const toNumber: (val: any) => any;
75
+ export declare const getGlobalThis: () => any;
76
+ export declare function genPropsAccessExp(name: string): string;
77
77
 
78
78
  /**
79
79
  * Patch flags are optimization hints generated by the compiler.
@@ -93,7 +93,7 @@ declare function genPropsAccessExp(name: string): string;
93
93
  * Check the `patchElement` function in '../../runtime-core/src/renderer.ts' to see how the
94
94
  * flags are handled during diff.
95
95
  */
96
- declare const enum PatchFlags {
96
+ export declare const enum PatchFlags {
97
97
  /**
98
98
  * Indicates an element with dynamic textContent (children fast path)
99
99
  */
@@ -188,9 +188,9 @@ declare const enum PatchFlags {
188
188
  /**
189
189
  * dev only flag -> name mapping
190
190
  */
191
- declare const PatchFlagNames: Record<PatchFlags, string>;
191
+ export declare const PatchFlagNames: Record<PatchFlags, string>;
192
192
 
193
- declare const enum ShapeFlags {
193
+ export declare const enum ShapeFlags {
194
194
  ELEMENT = 1,
195
195
  FUNCTIONAL_COMPONENT = 2,
196
196
  STATEFUL_COMPONENT = 4,
@@ -204,7 +204,7 @@ declare const enum ShapeFlags {
204
204
  COMPONENT = 6
205
205
  }
206
206
 
207
- declare const enum SlotFlags {
207
+ export declare const enum SlotFlags {
208
208
  /**
209
209
  * Stable slots that only reference slot props or context state. The slot
210
210
  * can fully capture its own dependencies so when passed down the parent won't
@@ -228,74 +228,74 @@ declare const enum SlotFlags {
228
228
  /**
229
229
  * Dev only
230
230
  */
231
- declare const slotFlagsText: {
231
+ export declare const slotFlagsText: {
232
232
  1: string;
233
233
  2: string;
234
234
  3: string;
235
235
  };
236
236
 
237
- declare const isGloballyWhitelisted: (key: string) => boolean;
237
+ export declare const isGloballyWhitelisted: (key: string) => boolean;
238
238
 
239
- declare function generateCodeFrame(source: string, start?: number, end?: number): string;
239
+ export declare function generateCodeFrame(source: string, start?: number, end?: number): string;
240
240
 
241
241
  export type NormalizedStyle = Record<string, string | number>;
242
- declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined;
243
- declare function parseStringStyle(cssText: string): NormalizedStyle;
244
- declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string;
245
- declare function normalizeClass(value: unknown): string;
246
- declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null;
242
+ export declare function normalizeStyle(value: unknown): NormalizedStyle | string | undefined;
243
+ export declare function parseStringStyle(cssText: string): NormalizedStyle;
244
+ export declare function stringifyStyle(styles: NormalizedStyle | string | undefined): string;
245
+ export declare function normalizeClass(value: unknown): string;
246
+ export declare function normalizeProps(props: Record<string, any> | null): Record<string, any> | null;
247
247
 
248
248
  /**
249
249
  * Compiler only.
250
250
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
251
251
  */
252
- declare const isHTMLTag: (key: string) => boolean;
252
+ export declare const isHTMLTag: (key: string) => boolean;
253
253
  /**
254
254
  * Compiler only.
255
255
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
256
256
  */
257
- declare const isSVGTag: (key: string) => boolean;
257
+ export declare const isSVGTag: (key: string) => boolean;
258
258
  /**
259
259
  * Compiler only.
260
260
  * Do NOT use in runtime code paths unless behind `__DEV__` flag.
261
261
  */
262
- declare const isVoidTag: (key: string) => boolean;
262
+ export declare const isVoidTag: (key: string) => boolean;
263
263
 
264
- declare const isSpecialBooleanAttr: (key: string) => boolean;
264
+ export declare const isSpecialBooleanAttr: (key: string) => boolean;
265
265
  /**
266
266
  * The full list is needed during SSR to produce the correct initial markup.
267
267
  */
268
- declare const isBooleanAttr: (key: string) => boolean;
268
+ export declare const isBooleanAttr: (key: string) => boolean;
269
269
  /**
270
270
  * Boolean attributes should be included if the value is truthy or ''.
271
271
  * e.g. `<select multiple>` compiles to `{ multiple: '' }`
272
272
  */
273
- declare function includeBooleanAttr(value: unknown): boolean;
274
- declare function isSSRSafeAttrName(name: string): boolean;
275
- declare const propsToAttrMap: Record<string, string | undefined>;
273
+ export declare function includeBooleanAttr(value: unknown): boolean;
274
+ export declare function isSSRSafeAttrName(name: string): boolean;
275
+ export declare const propsToAttrMap: Record<string, string | undefined>;
276
276
  /**
277
277
  * Known attributes, this is used for stringification of runtime static nodes
278
278
  * so that we don't stringify bindings that cannot be set from HTML.
279
279
  * Don't also forget to allow `data-*` and `aria-*`!
280
280
  * Generated from https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes
281
281
  */
282
- declare const isKnownHtmlAttr: (key: string) => boolean;
282
+ export declare const isKnownHtmlAttr: (key: string) => boolean;
283
283
  /**
284
284
  * Generated from https://developer.mozilla.org/en-US/docs/Web/SVG/Attribute
285
285
  */
286
- declare const isKnownSvgAttr: (key: string) => boolean;
286
+ export declare const isKnownSvgAttr: (key: string) => boolean;
287
287
 
288
- declare function escapeHtml(string: unknown): string;
289
- declare function escapeHtmlComment(src: string): string;
288
+ export declare function escapeHtml(string: unknown): string;
289
+ export declare function escapeHtmlComment(src: string): string;
290
290
 
291
- declare function looseEqual(a: any, b: any): boolean;
292
- declare function looseIndexOf(arr: any[], val: any): number;
291
+ export declare function looseEqual(a: any, b: any): boolean;
292
+ export declare function looseIndexOf(arr: any[], val: any): number;
293
293
 
294
294
  /**
295
295
  * For converting {{ interpolation }} values to displayed strings.
296
296
  * @private
297
297
  */
298
- declare const toDisplayString: (val: unknown) => string;
298
+ export declare const toDisplayString: (val: unknown) => string;
299
299
 
300
300
  export type Prettify<T> = {
301
301
  [K in keyof T]: T[K];
@@ -306,4 +306,3 @@ export type LooseRequired<T> = {
306
306
  };
307
307
  export type IfAny<T, Y, N> = 0 extends 1 & T ? Y : N;
308
308
 
309
- export { EMPTY_ARR, EMPTY_OBJ, NO, NOOP, PatchFlagNames, PatchFlags, ShapeFlags, SlotFlags, camelize, capitalize, def, escapeHtml, escapeHtmlComment, extend, genPropsAccessExp, generateCodeFrame, getGlobalThis, hasChanged, hasOwn, hyphenate, includeBooleanAttr, invokeArrayFns, isArray, isBooleanAttr, isBuiltInDirective, isDate, isFunction, isGloballyWhitelisted, isHTMLTag, isIntegerKey, isKnownHtmlAttr, isKnownSvgAttr, isMap, isModelListener, isObject, isOn, isPlainObject, isPromise, isRegExp, isReservedProp, isSSRSafeAttrName, isSVGTag, isSet, isSpecialBooleanAttr, isString, isSymbol, isVoidTag, looseEqual, looseIndexOf, looseToNumber, makeMap, normalizeClass, normalizeProps, normalizeStyle, objectToString, parseStringStyle, propsToAttrMap, remove, slotFlagsText, stringifyStyle, toDisplayString, toHandlerKey, toNumber, toRawType, toTypeString };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/shared",
3
- "version": "3.3.0-alpha.5",
3
+ "version": "3.3.0-alpha.7",
4
4
  "description": "internal utils shared across @vue packages",
5
5
  "main": "index.js",
6
6
  "module": "dist/shared.esm-bundler.js",