@removify/tailwind-preset 0.1.2 → 0.1.3
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/index.d.cts +50 -48
- package/dist/index.d.ts +50 -48
- package/package.json +2 -2
package/dist/index.d.cts
CHANGED
|
@@ -1,52 +1,6 @@
|
|
|
1
1
|
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
2
|
import { Config } from 'tailwindcss';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Converts the given string from camel-case to kebab-case.
|
|
6
|
-
* @template T The string to convert the case.
|
|
7
|
-
* @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
|
|
8
|
-
* @example
|
|
9
|
-
* type Kebab = CamelToKebab<'exampleVarName'>;
|
|
10
|
-
* // 'example-var-name'
|
|
11
|
-
*/
|
|
12
|
-
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
13
|
-
type CamelToKebabKeys<T> = {
|
|
14
|
-
[K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* tailwindcss font-size configuration
|
|
19
|
-
* @see https://tailwindcss.com/docs/font-size
|
|
20
|
-
*
|
|
21
|
-
* @note For unocss, the keys are kebab-case
|
|
22
|
-
* @see https://github.com/unocss/unocss/issues/3663#issuecomment-2024909371
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
interface FontSizeDetail {
|
|
26
|
-
lineHeight?: string;
|
|
27
|
-
letterSpacing?: string;
|
|
28
|
-
fontWeight?: number;
|
|
29
|
-
}
|
|
30
|
-
type FontValue = `${number}px` | `${number}rem`;
|
|
31
|
-
type FontAndLineHeight = [FontValue, FontValue];
|
|
32
|
-
type DetailFont = [
|
|
33
|
-
FontValue,
|
|
34
|
-
FontSizeDetail
|
|
35
|
-
];
|
|
36
|
-
type UnocssDetailFont = [FontValue, CamelToKebabKeys<FontSizeDetail>];
|
|
37
|
-
type FontSize = FontAndLineHeight | FontValue | DetailFont;
|
|
38
|
-
type UnocssFontSize = FontValue | FontAndLineHeight | UnocssDetailFont;
|
|
39
|
-
type SizeKeys = `${number}xs` | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | `${number}xl`;
|
|
40
|
-
type HeadingKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
41
|
-
type DisplayKeys = 'display1' | 'display2' | 'display3' | 'display4';
|
|
42
|
-
type FontSizeKeys = SizeKeys | HeadingKeys | DisplayKeys;
|
|
43
|
-
type FontSizes = {
|
|
44
|
-
[K in FontSizeKeys]?: FontSize;
|
|
45
|
-
};
|
|
46
|
-
type UnocssFontSizes = {
|
|
47
|
-
[K in FontSizeKeys]?: UnocssFontSize;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
4
|
declare const colors: {
|
|
51
5
|
primary: {
|
|
52
6
|
50: string;
|
|
@@ -216,6 +170,53 @@ declare const colors: {
|
|
|
216
170
|
};
|
|
217
171
|
};
|
|
218
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Converts the given string from camel-case to kebab-case.
|
|
175
|
+
* @template T The string to convert the case.
|
|
176
|
+
* @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
|
|
177
|
+
* @example
|
|
178
|
+
* type Kebab = CamelToKebab<'exampleVarName'>;
|
|
179
|
+
* // 'example-var-name'
|
|
180
|
+
*/
|
|
181
|
+
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
182
|
+
type CamelToKebabKeys<T> = {
|
|
183
|
+
[K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K];
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* tailwindcss font-size configuration
|
|
188
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
189
|
+
*
|
|
190
|
+
* @note For unocss, the keys are kebab-case
|
|
191
|
+
* @see https://github.com/unocss/unocss/issues/3663#issuecomment-2024909371
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
interface FontSizeDetail {
|
|
195
|
+
lineHeight?: string;
|
|
196
|
+
letterSpacing?: string;
|
|
197
|
+
fontWeight?: number;
|
|
198
|
+
}
|
|
199
|
+
type FontValue = `${number}px` | `${number}rem`;
|
|
200
|
+
type FontAndLineHeight = [FontValue, FontValue];
|
|
201
|
+
type DetailFont = [
|
|
202
|
+
FontValue,
|
|
203
|
+
FontSizeDetail
|
|
204
|
+
];
|
|
205
|
+
type UnocssDetailFont = [FontValue, CamelToKebabKeys<FontSizeDetail>];
|
|
206
|
+
type FontSize = FontAndLineHeight | FontValue | DetailFont;
|
|
207
|
+
type UnocssFontSize = FontValue | FontAndLineHeight | UnocssDetailFont;
|
|
208
|
+
type SizeKeys = `${number}xs` | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | `${number}xl`;
|
|
209
|
+
type HeadingKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
210
|
+
type DisplayKeys = 'display1' | 'display2' | 'display3' | 'display4';
|
|
211
|
+
type FontSizeKeys = SizeKeys | HeadingKeys | DisplayKeys;
|
|
212
|
+
declare function isDetailFont(value: FontSize): value is DetailFont;
|
|
213
|
+
type FontSizes = {
|
|
214
|
+
[K in FontSizeKeys]?: FontSize;
|
|
215
|
+
};
|
|
216
|
+
type UnocssFontSizes = {
|
|
217
|
+
[K in FontSizeKeys]?: UnocssFontSize;
|
|
218
|
+
};
|
|
219
|
+
|
|
219
220
|
declare const fontSizes: {
|
|
220
221
|
'2xs': ["0.6875rem", "1rem"];
|
|
221
222
|
xs: ["0.75rem", "1rem"];
|
|
@@ -463,7 +464,8 @@ declare const unocssTheme: {
|
|
|
463
464
|
fontSize: UnocssFontSizes;
|
|
464
465
|
};
|
|
465
466
|
|
|
466
|
-
|
|
467
|
+
declare const colorsNames: readonly ["primary", "bateau", "secondary", "pompelmo", "green", "fuchsia", "indigo", "neutral", "orange", "red", "amber", "seafoam"];
|
|
468
|
+
type ColorsNames = typeof colorsNames[number];
|
|
467
469
|
type ColorsVariations = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
468
470
|
interface MainColors {
|
|
469
471
|
black: string;
|
|
@@ -495,4 +497,4 @@ type Shadows = {
|
|
|
495
497
|
declare function config(extend?: boolean): Partial<Config>;
|
|
496
498
|
declare const _default: Partial<tailwindcss_types_config.Config>;
|
|
497
499
|
|
|
498
|
-
export { type ColorString, type Colors, type ColorsNames, type FontSizes, type Shadows, colors, config, _default as default, customFontFamily as fontFamily, fontSizes, shadows, theme, unocssTheme };
|
|
500
|
+
export { type ColorString, type Colors, type ColorsNames, type FontSizes, type Shadows, type UnocssFontSizes, colors, colorsNames, config, _default as default, customFontFamily as fontFamily, fontSizes, isDetailFont, shadows, theme, unocssTheme };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,52 +1,6 @@
|
|
|
1
1
|
import * as tailwindcss_types_config from 'tailwindcss/types/config';
|
|
2
2
|
import { Config } from 'tailwindcss';
|
|
3
3
|
|
|
4
|
-
/**
|
|
5
|
-
* Converts the given string from camel-case to kebab-case.
|
|
6
|
-
* @template T The string to convert the case.
|
|
7
|
-
* @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
|
|
8
|
-
* @example
|
|
9
|
-
* type Kebab = CamelToKebab<'exampleVarName'>;
|
|
10
|
-
* // 'example-var-name'
|
|
11
|
-
*/
|
|
12
|
-
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
13
|
-
type CamelToKebabKeys<T> = {
|
|
14
|
-
[K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K];
|
|
15
|
-
};
|
|
16
|
-
|
|
17
|
-
/**
|
|
18
|
-
* tailwindcss font-size configuration
|
|
19
|
-
* @see https://tailwindcss.com/docs/font-size
|
|
20
|
-
*
|
|
21
|
-
* @note For unocss, the keys are kebab-case
|
|
22
|
-
* @see https://github.com/unocss/unocss/issues/3663#issuecomment-2024909371
|
|
23
|
-
*/
|
|
24
|
-
|
|
25
|
-
interface FontSizeDetail {
|
|
26
|
-
lineHeight?: string;
|
|
27
|
-
letterSpacing?: string;
|
|
28
|
-
fontWeight?: number;
|
|
29
|
-
}
|
|
30
|
-
type FontValue = `${number}px` | `${number}rem`;
|
|
31
|
-
type FontAndLineHeight = [FontValue, FontValue];
|
|
32
|
-
type DetailFont = [
|
|
33
|
-
FontValue,
|
|
34
|
-
FontSizeDetail
|
|
35
|
-
];
|
|
36
|
-
type UnocssDetailFont = [FontValue, CamelToKebabKeys<FontSizeDetail>];
|
|
37
|
-
type FontSize = FontAndLineHeight | FontValue | DetailFont;
|
|
38
|
-
type UnocssFontSize = FontValue | FontAndLineHeight | UnocssDetailFont;
|
|
39
|
-
type SizeKeys = `${number}xs` | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | `${number}xl`;
|
|
40
|
-
type HeadingKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
41
|
-
type DisplayKeys = 'display1' | 'display2' | 'display3' | 'display4';
|
|
42
|
-
type FontSizeKeys = SizeKeys | HeadingKeys | DisplayKeys;
|
|
43
|
-
type FontSizes = {
|
|
44
|
-
[K in FontSizeKeys]?: FontSize;
|
|
45
|
-
};
|
|
46
|
-
type UnocssFontSizes = {
|
|
47
|
-
[K in FontSizeKeys]?: UnocssFontSize;
|
|
48
|
-
};
|
|
49
|
-
|
|
50
4
|
declare const colors: {
|
|
51
5
|
primary: {
|
|
52
6
|
50: string;
|
|
@@ -216,6 +170,53 @@ declare const colors: {
|
|
|
216
170
|
};
|
|
217
171
|
};
|
|
218
172
|
|
|
173
|
+
/**
|
|
174
|
+
* Converts the given string from camel-case to kebab-case.
|
|
175
|
+
* @template T The string to convert the case.
|
|
176
|
+
* @see https://gist.github.com/albertms10/09f14ef7ebdc3ce0e95683c728616253
|
|
177
|
+
* @example
|
|
178
|
+
* type Kebab = CamelToKebab<'exampleVarName'>;
|
|
179
|
+
* // 'example-var-name'
|
|
180
|
+
*/
|
|
181
|
+
type CamelToKebab<S extends string> = S extends `${infer T}${infer U}` ? U extends Uncapitalize<U> ? `${Uncapitalize<T>}${CamelToKebab<U>}` : `${Uncapitalize<T>}-${CamelToKebab<U>}` : '';
|
|
182
|
+
type CamelToKebabKeys<T> = {
|
|
183
|
+
[K in keyof T as K extends string ? CamelToKebab<K> : K]: T[K];
|
|
184
|
+
};
|
|
185
|
+
|
|
186
|
+
/**
|
|
187
|
+
* tailwindcss font-size configuration
|
|
188
|
+
* @see https://tailwindcss.com/docs/font-size
|
|
189
|
+
*
|
|
190
|
+
* @note For unocss, the keys are kebab-case
|
|
191
|
+
* @see https://github.com/unocss/unocss/issues/3663#issuecomment-2024909371
|
|
192
|
+
*/
|
|
193
|
+
|
|
194
|
+
interface FontSizeDetail {
|
|
195
|
+
lineHeight?: string;
|
|
196
|
+
letterSpacing?: string;
|
|
197
|
+
fontWeight?: number;
|
|
198
|
+
}
|
|
199
|
+
type FontValue = `${number}px` | `${number}rem`;
|
|
200
|
+
type FontAndLineHeight = [FontValue, FontValue];
|
|
201
|
+
type DetailFont = [
|
|
202
|
+
FontValue,
|
|
203
|
+
FontSizeDetail
|
|
204
|
+
];
|
|
205
|
+
type UnocssDetailFont = [FontValue, CamelToKebabKeys<FontSizeDetail>];
|
|
206
|
+
type FontSize = FontAndLineHeight | FontValue | DetailFont;
|
|
207
|
+
type UnocssFontSize = FontValue | FontAndLineHeight | UnocssDetailFont;
|
|
208
|
+
type SizeKeys = `${number}xs` | 'xs' | 'sm' | 'base' | 'lg' | 'xl' | `${number}xl`;
|
|
209
|
+
type HeadingKeys = 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6';
|
|
210
|
+
type DisplayKeys = 'display1' | 'display2' | 'display3' | 'display4';
|
|
211
|
+
type FontSizeKeys = SizeKeys | HeadingKeys | DisplayKeys;
|
|
212
|
+
declare function isDetailFont(value: FontSize): value is DetailFont;
|
|
213
|
+
type FontSizes = {
|
|
214
|
+
[K in FontSizeKeys]?: FontSize;
|
|
215
|
+
};
|
|
216
|
+
type UnocssFontSizes = {
|
|
217
|
+
[K in FontSizeKeys]?: UnocssFontSize;
|
|
218
|
+
};
|
|
219
|
+
|
|
219
220
|
declare const fontSizes: {
|
|
220
221
|
'2xs': ["0.6875rem", "1rem"];
|
|
221
222
|
xs: ["0.75rem", "1rem"];
|
|
@@ -463,7 +464,8 @@ declare const unocssTheme: {
|
|
|
463
464
|
fontSize: UnocssFontSizes;
|
|
464
465
|
};
|
|
465
466
|
|
|
466
|
-
|
|
467
|
+
declare const colorsNames: readonly ["primary", "bateau", "secondary", "pompelmo", "green", "fuchsia", "indigo", "neutral", "orange", "red", "amber", "seafoam"];
|
|
468
|
+
type ColorsNames = typeof colorsNames[number];
|
|
467
469
|
type ColorsVariations = 50 | 100 | 200 | 300 | 400 | 500 | 600 | 700 | 800 | 900 | 950;
|
|
468
470
|
interface MainColors {
|
|
469
471
|
black: string;
|
|
@@ -495,4 +497,4 @@ type Shadows = {
|
|
|
495
497
|
declare function config(extend?: boolean): Partial<Config>;
|
|
496
498
|
declare const _default: Partial<tailwindcss_types_config.Config>;
|
|
497
499
|
|
|
498
|
-
export { type ColorString, type Colors, type ColorsNames, type FontSizes, type Shadows, colors, config, _default as default, customFontFamily as fontFamily, fontSizes, shadows, theme, unocssTheme };
|
|
500
|
+
export { type ColorString, type Colors, type ColorsNames, type FontSizes, type Shadows, type UnocssFontSizes, colors, colorsNames, config, _default as default, customFontFamily as fontFamily, fontSizes, isDetailFont, shadows, theme, unocssTheme };
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@removify/tailwind-preset",
|
|
3
3
|
"type": "module",
|
|
4
|
-
"version": "0.1.
|
|
4
|
+
"version": "0.1.3",
|
|
5
5
|
"description": "Tailwind CSS preset for Removify",
|
|
6
6
|
"keywords": [
|
|
7
7
|
"tailwind"
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"tsx": "^4.7.3",
|
|
47
47
|
"typescript": "^5.4.5",
|
|
48
48
|
"vitest": "^1.5.2",
|
|
49
|
-
"@removify/tailwind-preset": "0.1.
|
|
49
|
+
"@removify/tailwind-preset": "0.1.3"
|
|
50
50
|
},
|
|
51
51
|
"lint-staged": {
|
|
52
52
|
"**/*.{js,ts,vue,html}": [
|