@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.
- package/dist/Accordion/index.cjs +2 -2
- package/dist/Accordion/index.d.cts +2 -2
- package/dist/Accordion/index.d.ts +2 -2
- package/dist/Accordion/index.js +2 -2
- package/dist/{Accordion-DxtXK__u.js → Accordion-B8aUlf0q.js} +2 -2
- package/dist/{Accordion-RpyCFs2a.cjs → Accordion-FyCFBOen.cjs} +3 -3
- package/dist/AnimatedChevron/index.cjs +1 -1
- package/dist/AnimatedChevron/index.d.cts +2 -2
- package/dist/AnimatedChevron/index.d.ts +2 -2
- package/dist/AnimatedChevron/index.js +1 -1
- package/dist/AppliedFiltersScrollbar/index.cjs +3 -3
- package/dist/AppliedFiltersScrollbar/index.d.cts +3 -3
- package/dist/AppliedFiltersScrollbar/index.d.ts +3 -3
- package/dist/AppliedFiltersScrollbar/index.js +2 -2
- package/dist/ButtonBase/index.cjs +2 -2
- package/dist/ButtonBase/index.d.cts +3 -3
- package/dist/ButtonBase/index.d.ts +3 -3
- package/dist/ButtonBase/index.js +2 -2
- package/dist/{ButtonBase-AU23oGQr.cjs → ButtonBase-B6vDKbGQ.cjs} +3 -3
- package/dist/{ButtonBase-6wjsZ1tU.js → ButtonBase-Bpc7nOpz.js} +2 -2
- package/dist/DynamicFiltersScrollbar/index.cjs +3 -3
- package/dist/DynamicFiltersScrollbar/index.d.cts +2 -2
- package/dist/DynamicFiltersScrollbar/index.d.ts +2 -2
- package/dist/DynamicFiltersScrollbar/index.js +2 -2
- package/dist/{DynamicFiltersScrollbar-AhyHehrB.js → DynamicFiltersScrollbar-D8OqC4DA.js} +2 -2
- package/dist/{DynamicFiltersScrollbar-50i_InZz.cjs → DynamicFiltersScrollbar-DIwHWq6v.cjs} +3 -3
- package/dist/FilterScrollbar/index.cjs +2 -2
- package/dist/FilterScrollbar/index.d.cts +4 -4
- package/dist/FilterScrollbar/index.d.ts +4 -4
- package/dist/FilterScrollbar/index.js +2 -2
- package/dist/ImageWithFallback/index.cjs +1 -1
- package/dist/ImageWithFallback/index.d.cts +2 -2
- package/dist/ImageWithFallback/index.d.ts +2 -2
- package/dist/ImageWithFallback/index.js +1 -1
- package/dist/{ImageWithFallback-Ckwsmd8P.js → ImageWithFallback-BW57cQw-.js} +1 -1
- package/dist/{ImageWithFallback-1LqhQK1q.cjs → ImageWithFallback-DvaVpR6v.cjs} +2 -2
- package/dist/ModalSheet/index.cjs +2 -2
- package/dist/ModalSheet/index.d.cts +2 -2
- package/dist/ModalSheet/index.d.ts +2 -2
- package/dist/ModalSheet/index.js +2 -2
- package/dist/{ModalSheet-CcthFeMD.cjs → ModalSheet-BvM2PJbH.cjs} +3 -3
- package/dist/{ModalSheet-BSj_g9JF.js → ModalSheet-DFva7krP.js} +2 -2
- package/dist/ProductCard/index.cjs +4 -6
- package/dist/ProductCard/index.d.cts +82 -2
- package/dist/ProductCard/index.d.ts +82 -2
- package/dist/ProductCard/index.js +5 -5
- package/dist/{ProductCard-DRczevG8.js → ProductCard-BiWAcPO4.js} +8 -16
- package/dist/{ProductCard-DksbHI3v.cjs → ProductCard-C2KvH4MN.cjs} +8 -28
- package/dist/ProductGrid/index.cjs +5 -5
- package/dist/ProductGrid/index.d.cts +6 -5
- package/dist/ProductGrid/index.d.ts +6 -5
- package/dist/ProductGrid/index.js +5 -5
- package/dist/{ProductGrid-B36atUp5.js → ProductGrid-B1RtE58G.js} +6 -5
- package/dist/{ProductGrid-CStAsiRj.cjs → ProductGrid-DkOyRAEg.cjs} +7 -6
- package/dist/RadioButton/index.cjs +2 -2
- package/dist/RadioButton/index.d.cts +3 -3
- package/dist/RadioButton/index.d.ts +3 -3
- package/dist/RadioButton/index.js +2 -2
- package/dist/{RadioButton-DoqlQgeW.js → RadioButton-CQ6qOvBl.js} +2 -2
- package/dist/{RadioButton-OqwNhq7S.cjs → RadioButton-DP-qs5cy.cjs} +3 -3
- package/dist/RadioButtonGroup/index.cjs +3 -3
- package/dist/RadioButtonGroup/index.d.cts +1 -1
- package/dist/RadioButtonGroup/index.d.ts +3 -3
- package/dist/RadioButtonGroup/index.js +3 -3
- package/dist/{RadioButtonGroup-DwMWFYga.cjs → RadioButtonGroup-CJPWfAaA.cjs} +3 -3
- package/dist/{RadioButtonGroup-BP4aECu6.js → RadioButtonGroup-Ce8cKqYw.js} +2 -2
- package/dist/SearchAutocomplete/index.cjs +2 -2
- package/dist/SearchAutocomplete/index.d.cts +2 -2
- package/dist/SearchAutocomplete/index.d.ts +2 -2
- package/dist/SearchAutocomplete/index.js +2 -2
- package/dist/{SearchAutocomplete-B690CIZB.js → SearchAutocomplete-CjjL2_lm.js} +2 -2
- package/dist/{SearchAutocomplete-DAEDHeqr.cjs → SearchAutocomplete-bbMvWWjI.cjs} +3 -3
- package/dist/SearchFilter/index.cjs +9 -9
- package/dist/SearchFilter/index.d.cts +6 -43
- package/dist/SearchFilter/index.d.ts +6 -43
- package/dist/SearchFilter/index.js +9 -9
- package/dist/{SearchFilter-Yk01V_VO.cjs → SearchFilter-BLi6E9Wx.cjs} +8 -8
- package/dist/{SearchFilter-X18X1iOO.js → SearchFilter-wHwOym_n.js} +7 -7
- package/dist/SearchInput/index.cjs +4 -4
- package/dist/SearchInput/index.d.cts +3 -4
- package/dist/SearchInput/index.d.ts +3 -4
- package/dist/SearchInput/index.js +4 -4
- package/dist/{SearchInput-Bn6wD39s.cjs → SearchInput-BA6bepV_.cjs} +7 -5
- package/dist/{SearchInput-DFoKyqJV.js → SearchInput-C3nNkmBm.js} +4 -3
- package/dist/SearchInputForm/index.cjs +7 -7
- package/dist/SearchInputForm/index.d.cts +3 -3
- package/dist/SearchInputForm/index.d.ts +3 -3
- package/dist/SearchInputForm/index.js +6 -6
- package/dist/SearchResultsContent/index.cjs +15 -15
- package/dist/SearchResultsContent/index.d.cts +3 -6
- package/dist/SearchResultsContent/index.d.ts +3 -6
- package/dist/SearchResultsContent/index.js +11 -11
- package/dist/SearchResultsFilterSidebar/index.cjs +13 -13
- package/dist/SearchResultsFilterSidebar/index.d.cts +42 -2
- package/dist/SearchResultsFilterSidebar/index.d.ts +42 -2
- package/dist/SearchResultsFilterSidebar/index.js +12 -12
- package/dist/SearchResultsStates/index.cjs +10 -10
- package/dist/SearchResultsStates/index.d.cts +5 -7
- package/dist/SearchResultsStates/index.d.ts +5 -7
- package/dist/SearchResultsStates/index.js +10 -10
- package/dist/{SearchResultsStates-CKoDWkXP.cjs → SearchResultsStates-C-8fh8B9.cjs} +8 -8
- package/dist/{SearchResultsStates-DF65ZU2r.js → SearchResultsStates-D62WbDTD.js} +7 -7
- package/dist/SparkleAnimation/index.cjs +2 -3
- package/dist/SparkleAnimation/index.d.cts +3 -11
- package/dist/SparkleAnimation/index.d.ts +3 -11
- package/dist/SparkleAnimation/index.js +2 -2
- package/dist/{SparkleAnimation-CvGlWUqv.cjs → SparkleAnimation-BFAj73CF.cjs} +7 -16
- package/dist/{SparkleAnimation-paLhSu5E.js → SparkleAnimation-BYDUEqWX.js} +7 -10
- package/dist/Spinner/index.cjs +1 -1
- package/dist/Spinner/index.d.cts +2 -2
- package/dist/Spinner/index.d.ts +2 -2
- package/dist/Spinner/index.js +1 -1
- package/dist/{Spinner-DjK8ts9E.cjs → Spinner-Ccy6VFEp.cjs} +2 -2
- package/dist/{Spinner-BqTt55uu.js → Spinner-D2HbRsuw.js} +1 -1
- package/dist/SuggestionButton/index.cjs +4 -4
- package/dist/SuggestionButton/index.d.cts +3 -3
- package/dist/SuggestionButton/index.d.ts +3 -3
- package/dist/SuggestionButton/index.js +3 -3
- package/dist/TextInput/index.cjs +2 -2
- package/dist/TextInput/index.d.cts +2 -2
- package/dist/TextInput/index.d.ts +2 -2
- package/dist/TextInput/index.js +2 -2
- package/dist/{TextInput-BTTG_drp.cjs → TextInput-CYTko3-n.cjs} +3 -3
- package/dist/{TextInput-BfUhaQUc.js → TextInput-CmxnphaT.js} +2 -2
- package/dist/ToggleButton/index.cjs +2 -2
- package/dist/ToggleButton/index.d.cts +2 -2
- package/dist/ToggleButton/index.d.ts +2 -2
- package/dist/ToggleButton/index.js +2 -2
- package/dist/{ToggleButton-DCiR4sB5.cjs → ToggleButton-CvxNLMe_.cjs} +3 -3
- package/dist/{ToggleButton-8P9eNKy1.js → ToggleButton-V9Qsaks7.js} +2 -2
- package/dist/Typography/index.cjs +1 -1
- package/dist/Typography/index.d.cts +2 -2
- package/dist/Typography/index.d.ts +2 -2
- package/dist/Typography/index.js +1 -1
- package/dist/colorVar-B5CLhSof.cjs +11 -0
- package/dist/colorVar-BJve0Z4_.js +5 -0
- package/dist/{index-Qtr26aUO.d.ts → index-C5iOTsRG.d.ts} +1 -1
- package/dist/{index-BMHF0IWd.d.cts → index-DoTNu3mL.d.cts} +1 -1
- package/dist/{searchFilterSidebarVariants-B1P8YS86.cjs → searchFilterSidebarVariants-BQ7OC862.cjs} +10 -7
- package/dist/{searchFilterSidebarVariants-CN9_kzJ8.js → searchFilterSidebarVariants-C_rWIcxf.js} +2 -1
- package/package.json +2 -1
- package/src/components/AppliedFiltersScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ButtonBase/types.ts +1 -1
- package/src/components/FilterScrollbar/AppliedFiltersScrollbar.tsx +1 -1
- package/src/components/ProductCard/ProductCard.tsx +12 -12
- package/src/components/ProductCard/ProductCardSkeleton.tsx +13 -1
- package/src/components/ProductCard/index.ts +0 -1
- package/src/components/ProductCard/productCardVariants.ts +1 -1
- package/src/components/ProductGrid/ProductGrid.tsx +10 -3
- package/src/components/ProductGrid/productGridVariants.ts +1 -1
- package/src/components/RadioButton/RadioButton.tsx +1 -1
- package/src/components/RadioButtonGroup/RadioButtonGroup.tsx +1 -1
- package/src/components/SearchFilter/SearchFilter.tsx +1 -2
- package/src/components/SearchFilter/SearchFilterFooter.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterHeader.tsx +1 -1
- package/src/components/SearchFilter/SearchFilterItem.tsx +1 -1
- package/src/components/SearchFilter/useHasFilterStateChanged.tsx +1 -1
- package/src/components/SearchFilter/utils.ts +1 -1
- package/src/components/SearchInput/SearchInput.tsx +1 -1
- package/src/components/SearchInput/searchInputVariants.ts +2 -2
- package/src/components/SearchInputForm/SearchInputForm.tsx +4 -7
- package/src/components/SearchResultsContent/SearchResultsContent.tsx +4 -4
- package/src/components/SearchResultsFilterSidebar/SearchResultsFilter.tsx +1 -2
- package/src/components/SearchResultsFilterSidebar/index.ts +0 -1
- package/src/components/SearchResultsFilterSidebar/searchFilterSidebarVariants.ts +2 -2
- package/src/components/SearchResultsStates/SearchResultsGrid.tsx +6 -3
- package/src/components/SearchResultsStates/SearchResultsLoadingGrid.tsx +2 -1
- package/src/components/SparkleAnimation/SparkleAnimation.tsx +7 -1
- package/src/components/SparkleAnimation/index.ts +0 -1
- package/src/components/SuggestionButton/SuggestionButton.tsx +1 -1
- package/src/util/colorVar.ts +3 -0
- package/dist/colorsConfig-BjmNL7s7.cjs +0 -38
- package/dist/colorsConfig-E7w6Ol6W.js +0 -26
- package/dist/index-DL1kptAp.d.ts +0 -46
- package/dist/index-Dfe_lkL2.d.cts +0 -46
- package/dist/index-Dz7MKQfH.d.cts +0 -325
- package/dist/index-Wd_cQHmW.d.ts +0 -325
- package/dist/types-BhGjnuWx.d.cts +0 -4
- package/dist/types-DlqhqT_S.d.ts +0 -4
- package/src/atoms/search/types.ts +0 -1
- package/src/components/ProductCard/types.ts +0 -49
- package/src/components/SearchFilter/types.ts +0 -45
- package/src/components/SearchResultsFilterSidebar/types.ts +0 -2
- package/src/components/SparkleAnimation/types.ts +0 -6
- package/src/config/chatElementDisplayLocation.ts +0 -23
- package/src/models/colorsConfig.ts +0 -28
- package/src/util/camelCase.ts +0 -87
- package/src/util/camelCasedPropertiesDeep.ts +0 -81
- package/src/util/internal.ts +0 -97
- package/src/util/primitive.ts +0 -8
- package/src/util/splitWords.ts +0 -76
- package/src/util/trim.ts +0 -28
- package/src/util/unknownArray.ts +0 -25
- /package/dist/{AnimatedChevron-Bik7GMSe.js → AnimatedChevron-Dee6Pe81.js} +0 -0
- /package/dist/{AnimatedChevron-Q96FneFy.cjs → AnimatedChevron-wpcAHp6d.cjs} +0 -0
- /package/dist/{Typography-D3vDkBMS.js → Typography-C3QmJzFK.js} +0 -0
- /package/dist/{Typography-CFNWgbM5.cjs → Typography-Ds4gfOJz.cjs} +0 -0
- /package/dist/{typographyVariantClasses-B6wiawat.d.ts → typographyVariantClasses-BFRoEloZ.d.cts} +0 -0
- /package/dist/{typographyVariantClasses-DTSltxPN.d.cts → typographyVariantClasses-D7h3ACAj.d.ts} +0 -0
package/src/util/internal.ts
DELETED
|
@@ -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';
|
package/src/util/primitive.ts
DELETED
|
@@ -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;
|
package/src/util/splitWords.ts
DELETED
|
@@ -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>>;
|
package/src/util/unknownArray.ts
DELETED
|
@@ -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[];
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
/package/dist/{typographyVariantClasses-B6wiawat.d.ts → typographyVariantClasses-BFRoEloZ.d.cts}
RENAMED
|
File without changes
|
/package/dist/{typographyVariantClasses-DTSltxPN.d.cts → typographyVariantClasses-D7h3ACAj.d.ts}
RENAMED
|
File without changes
|