@envive-ai/react-toolkit 0.2.9 → 0.2.11

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 (199) hide show
  1. package/dist/Accordion/index.cjs +2 -2
  2. package/dist/Accordion/index.d.cts +2 -2
  3. package/dist/Accordion/index.d.ts +2 -2
  4. package/dist/Accordion/index.js +2 -2
  5. package/dist/{Accordion-DxtXK__u.js → Accordion-B8aUlf0q.js} +2 -2
  6. package/dist/{Accordion-RpyCFs2a.cjs → Accordion-FyCFBOen.cjs} +3 -3
  7. package/dist/AnimatedChevron/index.cjs +1 -1
  8. package/dist/AnimatedChevron/index.d.cts +2 -2
  9. package/dist/AnimatedChevron/index.d.ts +2 -2
  10. package/dist/AnimatedChevron/index.js +1 -1
  11. package/dist/AppliedFiltersScrollbar/index.cjs +3 -3
  12. package/dist/AppliedFiltersScrollbar/index.d.cts +3 -3
  13. package/dist/AppliedFiltersScrollbar/index.d.ts +3 -3
  14. package/dist/AppliedFiltersScrollbar/index.js +2 -2
  15. package/dist/ButtonBase/index.cjs +2 -2
  16. package/dist/ButtonBase/index.d.cts +3 -3
  17. package/dist/ButtonBase/index.d.ts +3 -3
  18. package/dist/ButtonBase/index.js +2 -2
  19. package/dist/{ButtonBase-AU23oGQr.cjs → ButtonBase-B6vDKbGQ.cjs} +3 -3
  20. package/dist/{ButtonBase-6wjsZ1tU.js → ButtonBase-Bpc7nOpz.js} +2 -2
  21. package/dist/DynamicFiltersScrollbar/index.cjs +3 -3
  22. package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
  23. package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
  24. package/dist/DynamicFiltersScrollbar/index.js +2 -2
  25. package/dist/{DynamicFiltersScrollbar-AhyHehrB.js → DynamicFiltersScrollbar-D8OqC4DA.js} +2 -2
  26. package/dist/{DynamicFiltersScrollbar-50i_InZz.cjs → DynamicFiltersScrollbar-DIwHWq6v.cjs} +3 -3
  27. package/dist/FilterScrollbar/index.cjs +2 -2
  28. package/dist/FilterScrollbar/index.d.cts +4 -4
  29. package/dist/FilterScrollbar/index.d.ts +4 -4
  30. package/dist/FilterScrollbar/index.js +2 -2
  31. package/dist/ImageWithFallback/index.cjs +1 -1
  32. package/dist/ImageWithFallback/index.d.cts +2 -2
  33. package/dist/ImageWithFallback/index.d.ts +2 -2
  34. package/dist/ImageWithFallback/index.js +1 -1
  35. package/dist/{ImageWithFallback-Ckwsmd8P.js → ImageWithFallback-BW57cQw-.js} +1 -1
  36. package/dist/{ImageWithFallback-1LqhQK1q.cjs → ImageWithFallback-DvaVpR6v.cjs} +2 -2
  37. package/dist/ModalSheet/index.cjs +2 -2
  38. package/dist/ModalSheet/index.d.cts +2 -2
  39. package/dist/ModalSheet/index.d.ts +2 -2
  40. package/dist/ModalSheet/index.js +2 -2
  41. package/dist/{ModalSheet-CcthFeMD.cjs → ModalSheet-BvM2PJbH.cjs} +3 -3
  42. package/dist/{ModalSheet-BSj_g9JF.js → ModalSheet-DFva7krP.js} +2 -2
  43. package/dist/ProductCard/index.cjs +4 -6
  44. package/dist/ProductCard/index.d.cts +82 -2
  45. package/dist/ProductCard/index.d.ts +82 -2
  46. package/dist/ProductCard/index.js +5 -5
  47. package/dist/{ProductCard-DRczevG8.js → ProductCard-BiWAcPO4.js} +8 -16
  48. package/dist/{ProductCard-DksbHI3v.cjs → ProductCard-C2KvH4MN.cjs} +8 -28
  49. package/dist/ProductGrid/index.cjs +5 -5
  50. package/dist/ProductGrid/index.d.cts +6 -5
  51. package/dist/ProductGrid/index.d.ts +6 -5
  52. package/dist/ProductGrid/index.js +5 -5
  53. package/dist/{ProductGrid-B36atUp5.js → ProductGrid-B1RtE58G.js} +6 -5
  54. package/dist/{ProductGrid-CStAsiRj.cjs → ProductGrid-DkOyRAEg.cjs} +7 -6
  55. package/dist/RadioButton/index.cjs +2 -2
  56. package/dist/RadioButton/index.d.cts +3 -3
  57. package/dist/RadioButton/index.d.ts +3 -3
  58. package/dist/RadioButton/index.js +2 -2
  59. package/dist/{RadioButton-DoqlQgeW.js → RadioButton-CQ6qOvBl.js} +2 -2
  60. package/dist/{RadioButton-OqwNhq7S.cjs → RadioButton-DP-qs5cy.cjs} +3 -3
  61. package/dist/RadioButtonGroup/index.cjs +3 -3
  62. package/dist/RadioButtonGroup/index.d.cts +1 -1
  63. package/dist/RadioButtonGroup/index.d.ts +3 -3
  64. package/dist/RadioButtonGroup/index.js +3 -3
  65. package/dist/{RadioButtonGroup-DwMWFYga.cjs → RadioButtonGroup-CJPWfAaA.cjs} +3 -3
  66. package/dist/{RadioButtonGroup-BP4aECu6.js → RadioButtonGroup-Ce8cKqYw.js} +2 -2
  67. package/dist/SearchAutocomplete/index.cjs +2 -2
  68. package/dist/SearchAutocomplete/index.d.cts +2 -2
  69. package/dist/SearchAutocomplete/index.d.ts +2 -2
  70. package/dist/SearchAutocomplete/index.js +2 -2
  71. package/dist/{SearchAutocomplete-B690CIZB.js → SearchAutocomplete-CjjL2_lm.js} +2 -2
  72. package/dist/{SearchAutocomplete-DAEDHeqr.cjs → SearchAutocomplete-bbMvWWjI.cjs} +3 -3
  73. package/dist/SearchFilter/index.cjs +9 -9
  74. package/dist/SearchFilter/index.d.cts +6 -43
  75. package/dist/SearchFilter/index.d.ts +6 -43
  76. package/dist/SearchFilter/index.js +9 -9
  77. package/dist/{SearchFilter-Yk01V_VO.cjs → SearchFilter-BLi6E9Wx.cjs} +8 -8
  78. package/dist/{SearchFilter-X18X1iOO.js → SearchFilter-wHwOym_n.js} +7 -7
  79. package/dist/SearchInput/index.cjs +4 -4
  80. package/dist/SearchInput/index.d.cts +3 -4
  81. package/dist/SearchInput/index.d.ts +3 -4
  82. package/dist/SearchInput/index.js +4 -4
  83. package/dist/{SearchInput-Bn6wD39s.cjs → SearchInput-BA6bepV_.cjs} +7 -5
  84. package/dist/{SearchInput-DFoKyqJV.js → SearchInput-C3nNkmBm.js} +4 -3
  85. package/dist/SearchInputForm/index.cjs +7 -7
  86. package/dist/SearchInputForm/index.d.cts +3 -3
  87. package/dist/SearchInputForm/index.d.ts +3 -3
  88. package/dist/SearchInputForm/index.js +6 -6
  89. package/dist/SearchResultsContent/index.cjs +15 -15
  90. package/dist/SearchResultsContent/index.d.cts +3 -6
  91. package/dist/SearchResultsContent/index.d.ts +3 -6
  92. package/dist/SearchResultsContent/index.js +11 -11
  93. package/dist/SearchResultsFilterSidebar/index.cjs +13 -13
  94. package/dist/SearchResultsFilterSidebar/index.d.cts +42 -2
  95. package/dist/SearchResultsFilterSidebar/index.d.ts +42 -2
  96. package/dist/SearchResultsFilterSidebar/index.js +12 -12
  97. package/dist/SearchResultsStates/index.cjs +10 -10
  98. package/dist/SearchResultsStates/index.d.cts +5 -7
  99. package/dist/SearchResultsStates/index.d.ts +5 -7
  100. package/dist/SearchResultsStates/index.js +10 -10
  101. package/dist/{SearchResultsStates-CKoDWkXP.cjs → SearchResultsStates-C-8fh8B9.cjs} +8 -8
  102. package/dist/{SearchResultsStates-DF65ZU2r.js → SearchResultsStates-D62WbDTD.js} +7 -7
  103. package/dist/SparkleAnimation/index.cjs +2 -3
  104. package/dist/SparkleAnimation/index.d.cts +3 -11
  105. package/dist/SparkleAnimation/index.d.ts +3 -11
  106. package/dist/SparkleAnimation/index.js +2 -2
  107. package/dist/{SparkleAnimation-CvGlWUqv.cjs → SparkleAnimation-BFAj73CF.cjs} +7 -16
  108. package/dist/{SparkleAnimation-paLhSu5E.js → SparkleAnimation-BYDUEqWX.js} +7 -10
  109. package/dist/Spinner/index.cjs +1 -1
  110. package/dist/Spinner/index.d.cts +2 -2
  111. package/dist/Spinner/index.d.ts +2 -2
  112. package/dist/Spinner/index.js +1 -1
  113. package/dist/{Spinner-DjK8ts9E.cjs → Spinner-Ccy6VFEp.cjs} +2 -2
  114. package/dist/{Spinner-BqTt55uu.js → Spinner-D2HbRsuw.js} +1 -1
  115. package/dist/SuggestionButton/index.cjs +4 -4
  116. package/dist/SuggestionButton/index.d.cts +3 -3
  117. package/dist/SuggestionButton/index.d.ts +3 -3
  118. package/dist/SuggestionButton/index.js +3 -3
  119. package/dist/TextInput/index.cjs +2 -2
  120. package/dist/TextInput/index.d.cts +2 -2
  121. package/dist/TextInput/index.d.ts +2 -2
  122. package/dist/TextInput/index.js +2 -2
  123. package/dist/{TextInput-BTTG_drp.cjs → TextInput-CYTko3-n.cjs} +3 -3
  124. package/dist/{TextInput-BfUhaQUc.js → TextInput-CmxnphaT.js} +2 -2
  125. package/dist/ToggleButton/index.cjs +2 -2
  126. package/dist/ToggleButton/index.d.cts +2 -2
  127. package/dist/ToggleButton/index.d.ts +2 -2
  128. package/dist/ToggleButton/index.js +2 -2
  129. package/dist/{ToggleButton-DCiR4sB5.cjs → ToggleButton-CvxNLMe_.cjs} +3 -3
  130. package/dist/{ToggleButton-8P9eNKy1.js → ToggleButton-V9Qsaks7.js} +2 -2
  131. package/dist/Typography/index.cjs +1 -1
  132. package/dist/Typography/index.d.cts +2 -2
  133. package/dist/Typography/index.d.ts +2 -2
  134. package/dist/Typography/index.js +1 -1
  135. package/dist/colorVar-B5CLhSof.cjs +11 -0
  136. package/dist/colorVar-BJve0Z4_.js +5 -0
  137. package/dist/{index-Qtr26aUO.d.ts → index-C5iOTsRG.d.ts} +1 -1
  138. package/dist/{index-BMHF0IWd.d.cts → index-DoTNu3mL.d.cts} +1 -1
  139. package/dist/{searchFilterSidebarVariants-B1P8YS86.cjs → searchFilterSidebarVariants-BQ7OC862.cjs} +10 -7
  140. package/dist/{searchFilterSidebarVariants-CN9_kzJ8.js → searchFilterSidebarVariants-C_rWIcxf.js} +2 -1
  141. package/package.json +2 -1
  142. package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +1 -1
  143. package/src/components/ButtonBase/types.ts +1 -1
  144. package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +1 -1
  145. package/src/components/ProductCard/ProductCard.tsx +12 -12
  146. package/src/components/ProductCard/ProductCardSkeleton.tsx +13 -1
  147. package/src/components/ProductCard/index.ts +0 -1
  148. package/src/components/ProductCard/productCardVariants.ts +1 -1
  149. package/src/components/ProductGrid/ProductGrid.tsx +10 -3
  150. package/src/components/ProductGrid/productGridVariants.ts +1 -1
  151. package/src/components/RadioButton/RadioButton.tsx +1 -1
  152. package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
  153. package/src/components/SearchFilter/SearchFilter.tsx +1 -2
  154. package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
  155. package/src/components/SearchFilter/SearchFilterHeader.tsx +1 -1
  156. package/src/components/SearchFilter/SearchFilterItem.tsx +1 -1
  157. package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -1
  158. package/src/components/SearchFilter/utils.ts +1 -1
  159. package/src/components/SearchInput/SearchInput.tsx +1 -1
  160. package/src/components/SearchInput/searchInputVariants.ts +2 -2
  161. package/src/components/SearchInputForm/SearchInputForm.tsx +4 -7
  162. package/src/components/SearchResultsContent/SearchResultsContent.tsx +4 -4
  163. package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +1 -2
  164. package/src/components/SearchResultsFilterSidebar/index.ts +0 -1
  165. package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +2 -2
  166. package/src/components/SearchResultsStates/SearchResultsGrid.tsx +6 -3
  167. package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -1
  168. package/src/components/SparkleAnimation/SparkleAnimation.tsx +7 -1
  169. package/src/components/SparkleAnimation/index.ts +0 -1
  170. package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
  171. package/src/util/colorVar.ts +3 -0
  172. package/dist/colorsConfig-BjmNL7s7.cjs +0 -38
  173. package/dist/colorsConfig-E7w6Ol6W.js +0 -26
  174. package/dist/index-DL1kptAp.d.ts +0 -46
  175. package/dist/index-Dfe_lkL2.d.cts +0 -46
  176. package/dist/index-Dz7MKQfH.d.cts +0 -325
  177. package/dist/index-Wd_cQHmW.d.ts +0 -325
  178. package/dist/types-BhGjnuWx.d.cts +0 -4
  179. package/dist/types-DlqhqT_S.d.ts +0 -4
  180. package/src/atoms/search/types.ts +0 -1
  181. package/src/components/ProductCard/types.ts +0 -49
  182. package/src/components/SearchFilter/types.ts +0 -45
  183. package/src/components/SearchResultsFilterSidebar/types.ts +0 -2
  184. package/src/components/SparkleAnimation/types.ts +0 -6
  185. package/src/config/chatElementDisplayLocation.ts +0 -23
  186. package/src/models/colorsConfig.ts +0 -28
  187. package/src/util/camelCase.ts +0 -87
  188. package/src/util/camelCasedPropertiesDeep.ts +0 -81
  189. package/src/util/internal.ts +0 -97
  190. package/src/util/primitive.ts +0 -8
  191. package/src/util/splitWords.ts +0 -76
  192. package/src/util/trim.ts +0 -28
  193. package/src/util/unknownArray.ts +0 -25
  194. /package/dist/{AnimatedChevron-Bik7GMSe.js → AnimatedChevron-Dee6Pe81.js} +0 -0
  195. /package/dist/{AnimatedChevron-Q96FneFy.cjs → AnimatedChevron-wpcAHp6d.cjs} +0 -0
  196. /package/dist/{Typography-D3vDkBMS.js → Typography-C3QmJzFK.js} +0 -0
  197. /package/dist/{Typography-CFNWgbM5.cjs → Typography-Ds4gfOJz.cjs} +0 -0
  198. /package/dist/{typographyVariantClasses-B6wiawat.d.ts → typographyVariantClasses-BFRoEloZ.d.cts} +0 -0
  199. /package/dist/{typographyVariantClasses-DTSltxPN.d.cts → typographyVariantClasses-D7h3ACAj.d.ts} +0 -0
@@ -1,97 +0,0 @@
1
- /* eslint-disable @typescript-eslint/no-explicit-any */
2
- // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/internal.d.ts
3
-
4
- import type { Primitive } from './primitive';
5
- import type { Trim } from './trim';
6
-
7
- /**
8
- * Matches any primitive, `void`, `Date`, or `RegExp` value.
9
- */
10
- export type BuiltIns = Primitive | void | Date | RegExp;
11
-
12
- /**
13
- * Matches non-recursive types.
14
- */
15
- export type NonRecursiveType =
16
- | BuiltIns
17
- | ((...arguments_: any[]) => unknown)
18
- | (new (...arguments_: any[]) => unknown);
19
-
20
- /**
21
- * Returns a boolean for whether the string is numeric.
22
- *
23
- * This type is a workaround for [Microsoft/TypeScript#46109](https://github.com/microsoft/TypeScript/issues/46109#issuecomment-930307987).
24
- */
25
- export type IsNumeric<T extends string> = T extends `${number}`
26
- ? Trim<T> extends T
27
- ? true
28
- : false
29
- : false;
30
-
31
- /**
32
- * Returns a boolean for whether the string is lowercased.
33
- */
34
- export type IsLowerCase<T extends string> = T extends Lowercase<T> ? true : false;
35
-
36
- /**
37
- * Returns a boolean for whether the string is upper-cased.
38
- */
39
- export type IsUpperCase<T extends string> = T extends Uppercase<T> ? true : false;
40
-
41
- export type WordSeparators = '-' | '_' | Whitespace;
42
-
43
- export type Whitespace =
44
- | '\u{9}' // '\t'
45
- | '\u{A}' // '\n'
46
- | '\u{B}' // '\v'
47
- | '\u{C}' // '\f'
48
- | '\u{D}' // '\r'
49
- | '\u{20}' // ' '
50
- | '\u{85}'
51
- | '\u{A0}'
52
- | '\u{1680}'
53
- | '\u{2000}'
54
- | '\u{2001}'
55
- | '\u{2002}'
56
- | '\u{2003}'
57
- | '\u{2004}'
58
- | '\u{2005}'
59
- | '\u{2006}'
60
- | '\u{2007}'
61
- | '\u{2008}'
62
- | '\u{2009}'
63
- | '\u{200A}'
64
- | '\u{2028}'
65
- | '\u{2029}'
66
- | '\u{202F}'
67
- | '\u{205F}'
68
- | '\u{3000}'
69
- | '\u{FEFF}';
70
-
71
- export type UpperCaseCharacters =
72
- | 'A'
73
- | 'B'
74
- | 'C'
75
- | 'D'
76
- | 'E'
77
- | 'F'
78
- | 'G'
79
- | 'H'
80
- | 'I'
81
- | 'J'
82
- | 'K'
83
- | 'L'
84
- | 'M'
85
- | 'N'
86
- | 'O'
87
- | 'P'
88
- | 'Q'
89
- | 'R'
90
- | 'S'
91
- | 'T'
92
- | 'U'
93
- | 'V'
94
- | 'W'
95
- | 'X'
96
- | 'Y'
97
- | 'Z';
@@ -1,8 +0,0 @@
1
- // this type comes from https://github.com/sindresorhus/type-fest/blob/main/source/primitive.d.ts
2
-
3
- /**
4
- * Matches any [primitive value](https://developer.mozilla.org/en-US/docs/Glossary/Primitive).
5
- *
6
- * @category Type
7
- */
8
- export type Primitive = null | undefined | string | number | boolean | symbol | bigint;
@@ -1,76 +0,0 @@
1
- // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/split-words.d.ts
2
-
3
- import type { IsLowerCase, IsNumeric, IsUpperCase, WordSeparators } from './internal';
4
-
5
- type SkipEmptyWord<Word extends string> = Word extends '' ? [] : [Word];
6
-
7
- type RemoveLastCharacter<
8
- Sentence extends string,
9
- Character extends string,
10
- > = Sentence extends `${infer LeftSide}${Character}` ? SkipEmptyWord<LeftSide> : never;
11
-
12
- /**
13
- * Split a string (almost) like Lodash's `_.words()` function.
14
- *
15
- * - Split on each word that begins with a capital letter.
16
- * - Split on each {@link WordSeparators}.
17
- * - Split on numeric sequence.
18
- *
19
- * @example
20
- * ```
21
- * type Words0 = SplitWords<'helloWorld'>; // ['hello', 'World']
22
- * type Words1 = SplitWords<'helloWORLD'>; // ['hello', 'WORLD']
23
- * type Words2 = SplitWords<'hello-world'>; // ['hello', 'world']
24
- * type Words3 = SplitWords<'--hello the_world'>; // ['hello', 'the', 'world']
25
- * type Words4 = SplitWords<'lifeIs42'>; // ['life', 'Is', '42']
26
- * ```
27
- *
28
- * @internal
29
- * @category Change case
30
- * @category Template literal
31
- */
32
- export type SplitWords<
33
- Sentence extends string,
34
- LastCharacter extends string = '',
35
- CurrentWord extends string = '',
36
- > = Sentence extends `${infer FirstCharacter}${infer RemainingCharacters}`
37
- ? FirstCharacter extends WordSeparators
38
- ? // Skip word separator
39
- [...SkipEmptyWord<CurrentWord>, ...SplitWords<RemainingCharacters>]
40
- : LastCharacter extends ''
41
- ? // Fist char of word
42
- SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>
43
- : // Case change: non-numeric to numeric, push word
44
- [false, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
45
- ? [
46
- ...SkipEmptyWord<CurrentWord>,
47
- ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
48
- ]
49
- : // Case change: numeric to non-numeric, push word
50
- [true, false] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
51
- ? [
52
- ...SkipEmptyWord<CurrentWord>,
53
- ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
54
- ]
55
- : // No case change: concat word
56
- [true, true] extends [IsNumeric<LastCharacter>, IsNumeric<FirstCharacter>]
57
- ? SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
58
- : // Case change: lower to upper, push word
59
- [true, true] extends [IsLowerCase<LastCharacter>, IsUpperCase<FirstCharacter>]
60
- ? [
61
- ...SkipEmptyWord<CurrentWord>,
62
- ...SplitWords<RemainingCharacters, FirstCharacter, FirstCharacter>,
63
- ]
64
- : // Case change: upper to lower, brings back the last character, push word
65
- [true, true] extends [IsUpperCase<LastCharacter>, IsLowerCase<FirstCharacter>]
66
- ? [
67
- ...RemoveLastCharacter<CurrentWord, LastCharacter>,
68
- ...SplitWords<
69
- RemainingCharacters,
70
- FirstCharacter,
71
- `${LastCharacter}${FirstCharacter}`
72
- >,
73
- ]
74
- : // No case change: concat word
75
- SplitWords<RemainingCharacters, FirstCharacter, `${CurrentWord}${FirstCharacter}`>
76
- : [...SkipEmptyWord<CurrentWord>];
package/src/util/trim.ts DELETED
@@ -1,28 +0,0 @@
1
- // these types come from https://github.com/sindresorhus/type-fest/blob/main/source/trim.d.ts
2
-
3
- import type { Whitespace } from './internal';
4
-
5
- /**
6
- * Remove spaces from the left side.
7
- */
8
- type TrimLeft<V extends string> = V extends `${Whitespace}${infer R}` ? TrimLeft<R> : V;
9
-
10
- /**
11
- * Remove spaces from the right side.
12
- */
13
- type TrimRight<V extends string> = V extends `${infer R}${Whitespace}` ? TrimRight<R> : V;
14
-
15
- /**
16
- * Remove leading and trailing spaces from a string.
17
- * @example
18
- * ```
19
- * import type {Trim} from 'type-fest';
20
- *
21
- * Trim<' foo '>
22
- * //=> 'foo'
23
- * ```
24
- *
25
- * @category String
26
- * @category Template literal
27
- */
28
- export type Trim<V extends string> = TrimLeft<TrimRight<V>>;
@@ -1,25 +0,0 @@
1
- /**
2
- * Represents an array with `unknown` value.
3
- *
4
- * Use case: You want a type that all arrays can be assigned to, but you don't care about the value.
5
- *
6
- * @example
7
- * ```
8
- * import type {UnknownArray} from 'type-fest';
9
- *
10
- * type IsArray<T> = T extends UnknownArray ? true : false;
11
- *
12
- * type A = IsArray<['foo']>;
13
- * //=> true
14
- *
15
- * type B = IsArray<readonly number[]>;
16
- * //=> true
17
- *
18
- * type C = IsArray<string>;
19
- * //=> false
20
- * ```
21
- *
22
- * @category Type
23
- * @category Array
24
- */
25
- export type UnknownArray = readonly unknown[];