@evlop/commons 1.0.334 → 1.0.336
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/cjs/src/helpers/ColorVariants.d.ts +5 -28
- package/dist/cjs/src/helpers/ColorVariants.d.ts.map +1 -1
- package/dist/cjs/src/helpers/ColorVariants.js +30 -27
- package/dist/cjs/src/helpers/ColorVariants.js.map +1 -1
- package/dist/cjs/src/helpers/themeHelpers.d.ts +8 -169
- package/dist/cjs/src/helpers/themeHelpers.d.ts.map +1 -1
- package/dist/cjs/src/helpers/themeHelpers.js +7 -17
- package/dist/cjs/src/helpers/themeHelpers.js.map +1 -1
- package/dist/cjs/types-for-ai.d.ts +9 -0
- package/dist/cjs/types-for-ai.d.ts.map +1 -0
- package/dist/cjs/types-for-ai.js +3 -0
- package/dist/cjs/types-for-ai.js.map +1 -0
- package/dist/esm/src/helpers/ColorVariants.d.ts +5 -28
- package/dist/esm/src/helpers/ColorVariants.d.ts.map +1 -1
- package/dist/esm/src/helpers/ColorVariants.js +30 -27
- package/dist/esm/src/helpers/ColorVariants.js.map +1 -1
- package/dist/esm/src/helpers/themeHelpers.d.ts +8 -169
- package/dist/esm/src/helpers/themeHelpers.d.ts.map +1 -1
- package/dist/esm/src/helpers/themeHelpers.js +4 -14
- package/dist/esm/src/helpers/themeHelpers.js.map +1 -1
- package/dist/esm/types-for-ai.d.ts +9 -0
- package/dist/esm/types-for-ai.d.ts.map +1 -0
- package/dist/esm/types-for-ai.js +2 -0
- package/dist/esm/types-for-ai.js.map +1 -0
- package/dist/types/index.ai.d.ts +32 -0
- package/dist/types/src/helpers/ColorVariants.d.ts +5 -28
- package/dist/types/src/helpers/ColorVariants.d.ts.map +1 -1
- package/dist/types/src/helpers/themeHelpers.d.ts +8 -169
- package/dist/types/src/helpers/themeHelpers.d.ts.map +1 -1
- package/dist/types/types-for-ai.d.ts +9 -0
- package/dist/types/types-for-ai.d.ts.map +1 -0
- package/package.json +5 -3
@@ -1,66 +1,11 @@
|
|
1
|
+
import { Color } from "./ColorVariants";
|
1
2
|
export declare const generateSizeScale: (baseSize: number, variants: {
|
2
3
|
[key: string]: number;
|
3
4
|
}) => {
|
4
5
|
[x: string]: string;
|
5
6
|
};
|
6
|
-
|
7
|
-
|
8
|
-
xxxs: number;
|
9
|
-
xxs: number;
|
10
|
-
xs: number;
|
11
|
-
xxl: number;
|
12
|
-
xxxl: number;
|
13
|
-
xxxxl: number;
|
14
|
-
xxxxxl: number;
|
15
|
-
xxxxxxl: number;
|
16
|
-
xxxxxxxl: number;
|
17
|
-
xxxxxxxxl: number;
|
18
|
-
xxxxxxxxxl: number;
|
19
|
-
};
|
20
|
-
export declare const fontSizes: {
|
21
|
-
xxxxs: number;
|
22
|
-
xxxs: number;
|
23
|
-
xxs: number;
|
24
|
-
xs: number;
|
25
|
-
xxl: number;
|
26
|
-
xxxl: number;
|
27
|
-
xxxxl: number;
|
28
|
-
xxxxxl: number;
|
29
|
-
xxxxxxl: number;
|
30
|
-
xxxxxxxl: number;
|
31
|
-
xxxxxxxxl: number;
|
32
|
-
xxxxxxxxxl: number;
|
33
|
-
'4xs': number;
|
34
|
-
'3xs': number;
|
35
|
-
'2xs': number;
|
36
|
-
sm: number;
|
37
|
-
md: number;
|
38
|
-
lg: number;
|
39
|
-
xl: number;
|
40
|
-
'2xl': number;
|
41
|
-
'3xl': number;
|
42
|
-
'4xl': number;
|
43
|
-
'5xl': number;
|
44
|
-
'6xl': number;
|
45
|
-
'7xl': number;
|
46
|
-
'8xl': number;
|
47
|
-
'9xl': number;
|
48
|
-
};
|
49
|
-
type FontSizes = typeof fontSizes;
|
50
|
-
type FontSize = Exclude<keyof FontSizes, keyof typeof legacyFontSizes>;
|
51
|
-
declare const fontWeights: {
|
52
|
-
Thin: number;
|
53
|
-
UltraLight: number;
|
54
|
-
Light: number;
|
55
|
-
Regular: number;
|
56
|
-
Medium: number;
|
57
|
-
Semibold: number;
|
58
|
-
Bold: number;
|
59
|
-
Heavy: number;
|
60
|
-
Black: number;
|
61
|
-
};
|
62
|
-
type FontWeights = typeof fontWeights;
|
63
|
-
type FontWeight = keyof FontWeights;
|
7
|
+
type FontSize = '4xs' | '3xs' | '2xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
8
|
+
type FontWeight = 'Thin' | 'UltraLight' | 'Light' | 'Regular' | 'Medium' | 'Semibold' | 'Bold' | 'Heavy' | 'Black';
|
64
9
|
export declare const generateFontSizes: (baseFontSize: number) => {
|
65
10
|
[x: string]: string;
|
66
11
|
};
|
@@ -93,25 +38,10 @@ export declare const lineHeightVariants: {
|
|
93
38
|
'8xl': number;
|
94
39
|
'9xl': number;
|
95
40
|
};
|
96
|
-
type
|
97
|
-
type LineHeight = keyof LineHeightVariants;
|
41
|
+
type LineHeight = '4xs' | '3xs' | '2xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl' | '8xl' | '9xl';
|
98
42
|
export declare const generateLineHeights: (baseFontSize: number) => {
|
99
43
|
[x: string]: string;
|
100
44
|
};
|
101
|
-
declare const legacySpacingVariants: {
|
102
|
-
xxxxxxxs: number;
|
103
|
-
xxxxxxs: number;
|
104
|
-
xxxxxs: number;
|
105
|
-
xxxxs: number;
|
106
|
-
xxxs: number;
|
107
|
-
xxs: number;
|
108
|
-
xxl: number;
|
109
|
-
xxxl: number;
|
110
|
-
xxxxl: number;
|
111
|
-
xxxxxl: number;
|
112
|
-
xxxxxxl: number;
|
113
|
-
xxxxxxxl: number;
|
114
|
-
};
|
115
45
|
export declare const spacingVariations: {
|
116
46
|
xxxxxxxs: number;
|
117
47
|
xxxxxxs: number;
|
@@ -144,107 +74,16 @@ export declare const spacingVariations: {
|
|
144
74
|
'6xl': number;
|
145
75
|
'7xl': number;
|
146
76
|
};
|
147
|
-
type
|
148
|
-
type Space = Exclude<keyof SpaceVariants, keyof typeof legacySpacingVariants>;
|
77
|
+
type Space = 'none' | '7xs' | '6xs' | '5xs' | '4xs' | '3xs' | '2xs' | 'xs' | 'sm' | 'md' | 'lg' | 'xl' | '2xl' | '3xl' | '4xl' | '5xl' | '6xl' | '7xl';
|
149
78
|
export declare const generateSpacingSizes: (baseSpacing: number) => {
|
150
79
|
[x: string]: string;
|
151
80
|
};
|
152
|
-
declare const baseColors: {
|
153
|
-
white: string;
|
154
|
-
black: string;
|
155
|
-
gray: string;
|
156
|
-
primary: string;
|
157
|
-
secondary: string;
|
158
|
-
success: string;
|
159
|
-
info: string;
|
160
|
-
warning: string;
|
161
|
-
danger: string;
|
162
|
-
red: string;
|
163
|
-
orange: string;
|
164
|
-
amber: string;
|
165
|
-
yellow: string;
|
166
|
-
lime: string;
|
167
|
-
green: string;
|
168
|
-
emerald: string;
|
169
|
-
teal: string;
|
170
|
-
cyan: string;
|
171
|
-
sky: string;
|
172
|
-
blue: string;
|
173
|
-
indigo: string;
|
174
|
-
violet: string;
|
175
|
-
purple: string;
|
176
|
-
fuchsia: string;
|
177
|
-
pink: string;
|
178
|
-
rose: string;
|
179
|
-
};
|
180
|
-
type BaseColors = typeof baseColors;
|
181
|
-
type BaseColor = keyof BaseColors;
|
182
|
-
declare const lightModeColorShades: {
|
183
|
-
50: number;
|
184
|
-
100: number;
|
185
|
-
200: number;
|
186
|
-
300: number;
|
187
|
-
400: number;
|
188
|
-
500: number;
|
189
|
-
600: number;
|
190
|
-
700: number;
|
191
|
-
800: number;
|
192
|
-
900: number;
|
193
|
-
};
|
194
|
-
declare const lightModeGrayColorShades: {
|
195
|
-
950: number;
|
196
|
-
1000: number;
|
197
|
-
1050: number;
|
198
|
-
1100: number;
|
199
|
-
50: number;
|
200
|
-
100: number;
|
201
|
-
200: number;
|
202
|
-
300: number;
|
203
|
-
400: number;
|
204
|
-
500: number;
|
205
|
-
600: number;
|
206
|
-
700: number;
|
207
|
-
800: number;
|
208
|
-
900: number;
|
209
|
-
0: number;
|
210
|
-
25: number;
|
211
|
-
};
|
212
|
-
declare const colorAlphaShades: {
|
213
|
-
"50": number;
|
214
|
-
"100": number;
|
215
|
-
"150": number;
|
216
|
-
"200": number;
|
217
|
-
"250": number;
|
218
|
-
"300": number;
|
219
|
-
"350": number;
|
220
|
-
"400": number;
|
221
|
-
"450": number;
|
222
|
-
"500": number;
|
223
|
-
"550": number;
|
224
|
-
"600": number;
|
225
|
-
"650": number;
|
226
|
-
"700": number;
|
227
|
-
"750": number;
|
228
|
-
"800": number;
|
229
|
-
"850": number;
|
230
|
-
"900": number;
|
231
|
-
"950": number;
|
232
|
-
};
|
233
|
-
type ColorShades = typeof lightModeColorShades;
|
234
|
-
type GrayColorShades = typeof lightModeGrayColorShades;
|
235
|
-
type ColorAlphaShades = typeof colorAlphaShades;
|
236
|
-
export type ColorShade = keyof ColorShades;
|
237
|
-
export type GrayColorShade = keyof GrayColorShades;
|
238
|
-
export type ColorAlphaShade = keyof ColorAlphaShades;
|
239
|
-
type ShadeableColor = BaseColor;
|
240
|
-
type ShadeableColorWithoutGray = Exclude<ShadeableColor, 'gray'>;
|
241
|
-
type ShadedColorWithoutGray = `${ShadeableColorWithoutGray}-${ColorShade}`;
|
242
|
-
type ShadedGrayColor = `gray-${GrayColorShade}`;
|
243
|
-
type AlphaColor = `${ShadeableColor}-alpha-${ColorAlphaShade}`;
|
244
|
-
export type Color = BaseColor | ShadedColorWithoutGray | ShadedGrayColor | AlphaColor;
|
245
81
|
export declare function getColorShade(color: string, weight: number, dark?: boolean): string;
|
246
82
|
export declare function generateColorLightDarkShades(color: string, colorName: string, dark?: boolean): {};
|
247
83
|
export declare function generateColorAlphaShades(color: any): {};
|
84
|
+
/**
|
85
|
+
* @deprecated In favour of ColorVariants
|
86
|
+
*/
|
248
87
|
export declare function generateColorShadesWithName(colorName: string, color: string, dark?: boolean): {
|
249
88
|
[x: string]: never;
|
250
89
|
};
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"
|
1
|
+
{"version":3,"file":"themeHelpers.d.ts","sourceRoot":"","sources":["../../../../src/helpers/themeHelpers.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAiB,MAAM,iBAAiB,CAAC;AAgCvD,eAAO,MAAM,iBAAiB,GAAI,UAAS,MAAM,EAAE,UAAU;IAAC,CAAC,GAAG,EAAC,MAAM,GAAG,MAAM,CAAA;CAAC;;CAIjF,CAAC;AAqCH,KAAK,QAAQ,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAElI,KAAK,UAAU,GAAG,MAAM,GAAG,YAAY,GAAG,OAAO,GAAG,SAAS,GAAG,QAAQ,GAAG,UAAU,GAAG,MAAM,GAAG,OAAO,GAAG,OAAO,CAAC;AAEnH,eAAO,MAAM,iBAAiB,GAAI,cAAc,MAAM;;CAA+C,CAAC;AAGtG,eAAO,MAAM,kBAAkB;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAAmC,CAAC;AACnE,KAAK,UAAU,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,IAAI,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,CAAC;AAEpI,eAAO,MAAM,mBAAmB,GAAI,cAAc,MAAM;;CAAwD,CAAC;AAmBjH,eAAO,MAAM,iBAAiB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAoB7B,CAAC;AAEF,KAAK,KAAK,GAAG,MAAM,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GAAG,KAAK,GA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
+
* This file only exports selected types targeted for AI engine to understand theme and icons
|
4
|
+
*/
|
5
|
+
type IconLibrary = 'font-awesome-5:brands' | 'font-awesome-5:regular' | 'font-awesome-5:solid' | 'font-awesome-6:brands' | 'font-awesome-6:regular' | 'font-awesome-6:solid' | 'antdesign' | 'entypo' | 'evilicons' | 'feather' | 'font-awesome' | 'fontisto' | 'foundation' | 'ionicons' | 'material-community-icons' | 'material-icons' | 'octicons' | 'simple-line-icons' | 'zocial';
|
6
|
+
type IconName = string;
|
7
|
+
type IconIdentifier = `${IconLibrary}:${IconName}`;
|
8
|
+
export { Theme, IconIdentifier };
|
9
|
+
//# sourceMappingURL=types-for-ai.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"types-for-ai.d.ts","sourceRoot":"","sources":["../../types-for-ai.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAEnD;;GAEG;AAEH,KAAK,WAAW,GAAG,uBAAuB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,uBAAuB,GAAG,wBAAwB,GAAG,sBAAsB,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,GAAG,SAAS,GAAG,cAAc,GAAG,UAAU,GAAG,YAAY,GAAG,UAAU,GAAG,0BAA0B,GAAG,gBAAgB,GAAG,UAAU,GAAG,mBAAmB,GAAG,QAAQ,CAAC;AACxX,KAAK,QAAQ,GAAG,MAAM,CAAC;AACvB,KAAK,cAAc,GAAG,GAAG,WAAW,IAAI,QAAQ,EAAE,CAAC;AAEnD,OAAO,EAAE,KAAK,EAAE,cAAc,EAAE,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@evlop/commons",
|
3
|
-
"version": "1.0.
|
3
|
+
"version": "1.0.336",
|
4
4
|
"description": "",
|
5
5
|
"main": "dist/cjs/main.js",
|
6
6
|
"module": "dist/esm/main.js",
|
@@ -34,12 +34,13 @@
|
|
34
34
|
"dev": "tsc --watch",
|
35
35
|
"test": "mocha -r ts-node/register src/**/*.test.ts",
|
36
36
|
"prebuild": "rm -rf dist && npm run build:icons && npm run build:fonts",
|
37
|
-
"build": "npm run build:esm && npm run build:cjs && npm run build:types",
|
37
|
+
"build": "npm run build:esm && npm run build:cjs && npm run build:types && npm run build:types-for-ai",
|
38
38
|
"build:icons": "ts-node bin/generate-icons-cache.ts",
|
39
39
|
"build:fonts": "ts-node bin/generate-google-fonts-cache.ts",
|
40
40
|
"build:esm": "tsc --module esnext --outDir dist/esm",
|
41
41
|
"build:cjs": "tsc --module commonjs --outDir dist/cjs",
|
42
|
-
"build:types": "tsc --declaration --declarationDir dist/types --emitDeclarationOnly"
|
42
|
+
"build:types": "tsc --declaration --declarationDir dist/types --emitDeclarationOnly",
|
43
|
+
"build:types-for-ai": "dts-bundle-generator -o dist/types/index.ai.d.ts types-for-ai.ts --no-check --no-banner --export-referenced-types=false"
|
43
44
|
},
|
44
45
|
"files": [
|
45
46
|
"dist/*"
|
@@ -59,6 +60,7 @@
|
|
59
60
|
"axios": "^0.27.2",
|
60
61
|
"chai": "^4.3.4",
|
61
62
|
"change-case": "^4.1.2",
|
63
|
+
"dts-bundle-generator": "^9.5.1",
|
62
64
|
"handlebars": "^4.7.7",
|
63
65
|
"i18next": "^21.8.8",
|
64
66
|
"jest": "^26.6.3",
|