phaser-wind 0.5.0 → 0.5.1
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/scene/scene-with-phaser-wind.d.ts +1 -1
- package/dist/scene/scene-with-phaser-wind.d.ts.map +1 -1
- package/package.json +2 -2
- package/dist/components/column.js +0 -2
- package/dist/components/column.js.map +0 -1
- package/dist/core/color.js +0 -205
- package/dist/core/color.js.map +0 -1
- package/dist/core/color.spec.js +0 -243
- package/dist/core/color.spec.js.map +0 -1
- package/dist/core/font-size.js +0 -63
- package/dist/core/font-size.js.map +0 -1
- package/dist/core/font-size.spec.js +0 -85
- package/dist/core/font-size.spec.js.map +0 -1
- package/dist/core/font.js +0 -37
- package/dist/core/font.js.map +0 -1
- package/dist/core/font.spec.js +0 -80
- package/dist/core/font.spec.js.map +0 -1
- package/dist/core/index.js +0 -8
- package/dist/core/index.js.map +0 -1
- package/dist/core/palette.js +0 -292
- package/dist/core/palette.js.map +0 -1
- package/dist/core/radius.js +0 -38
- package/dist/core/radius.js.map +0 -1
- package/dist/core/radius.spec.js +0 -56
- package/dist/core/radius.spec.js.map +0 -1
- package/dist/core/shadow.js +0 -33
- package/dist/core/shadow.js.map +0 -1
- package/dist/core/shadow.spec.js +0 -21
- package/dist/core/shadow.spec.js.map +0 -1
- package/dist/core/spacing.js +0 -70
- package/dist/core/spacing.js.map +0 -1
- package/dist/core/spacing.spec.js +0 -38
- package/dist/core/spacing.spec.js.map +0 -1
- package/dist/exceptions.js +0 -2
- package/dist/exceptions.js.map +0 -1
- package/dist/font/index.js +0 -3
- package/dist/font/index.js.map +0 -1
- package/dist/index.js +0 -7
- package/dist/index.js.map +0 -1
- package/dist/plugin/index.js +0 -2
- package/dist/plugin/index.js.map +0 -1
- package/dist/plugin/plugin.js +0 -91
- package/dist/plugin/plugin.js.map +0 -1
- package/dist/scene/index.js +0 -2
- package/dist/scene/index.js.map +0 -1
- package/dist/scene/scene-with-phaser-wind.js +0 -11
- package/dist/scene/scene-with-phaser-wind.js.map +0 -1
- package/dist/theme/index.js +0 -3
- package/dist/theme/index.js.map +0 -1
- package/dist/theme/theme-config.js +0 -159
- package/dist/theme/theme-config.js.map +0 -1
- package/dist/theme/theme-manager.js +0 -4
- package/dist/theme/theme-manager.js.map +0 -1
- package/dist/theme/type.js +0 -2
- package/dist/theme/type.js.map +0 -1
- package/dist/utils/index.js +0 -2
- package/dist/utils/index.js.map +0 -1
- package/dist/utils/is-valid-color.js +0 -32
- package/dist/utils/is-valid-color.js.map +0 -1
- package/dist/utils/is-valid-color.spec.js +0 -82
- package/dist/utils/is-valid-color.spec.js.map +0 -1
|
@@ -6,6 +6,6 @@ export declare abstract class SceneWithPhaserWind<T extends BaseThemeConfig = Ba
|
|
|
6
6
|
* @param config The scene key or scene specific configuration settings.
|
|
7
7
|
*/
|
|
8
8
|
constructor(config?: string | Phaser.Types.Scenes.SettingsConfig);
|
|
9
|
-
|
|
9
|
+
pw: PhaserWindPlugin<T>;
|
|
10
10
|
}
|
|
11
11
|
//# sourceMappingURL=scene-with-phaser-wind.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scene-with-phaser-wind.d.ts","sourceRoot":"","sources":["../../src/scene/scene-with-phaser-wind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,8BAAsB,mBAAmB,
|
|
1
|
+
{"version":3,"file":"scene-with-phaser-wind.d.ts","sourceRoot":"","sources":["../../src/scene/scene-with-phaser-wind.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AACpD,OAAO,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAE3C,8BAAsB,mBAAmB,CACvC,CAAC,SAAS,eAAe,GAAG,eAAe,CAC3C,SAAQ,MAAM,CAAC,KAAK;IACpB;;;OAGG;gBACS,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,cAAc;IAIzD,EAAE,EAAG,gBAAgB,CAAC,CAAC,CAAC,CAAC;CACjC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "phaser-wind",
|
|
3
|
-
"version": "0.5.
|
|
3
|
+
"version": "0.5.1",
|
|
4
4
|
"description": "Wind theme like Tailwind CSS for Phaser games",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"access": "public"
|
|
59
59
|
},
|
|
60
60
|
"scripts": {
|
|
61
|
-
"build": "tsc --build",
|
|
61
|
+
"build": "tsc --build --force",
|
|
62
62
|
"dev": "tsc --build --watch",
|
|
63
63
|
"clean": "rm -rf dist",
|
|
64
64
|
"test": "vitest run",
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"column.js","sourceRoot":"","sources":["../../src/components/column.ts"],"names":[],"mappings":""}
|
package/dist/core/color.js
DELETED
|
@@ -1,205 +0,0 @@
|
|
|
1
|
-
import { isValidColor } from '../utils';
|
|
2
|
-
import { palette } from './palette';
|
|
3
|
-
/** Regular expression to match RGB color format */
|
|
4
|
-
const RGB_REGEX = /rgb\((\d+),\s*(\d+),\s*(\d+)\)/;
|
|
5
|
-
/**
|
|
6
|
-
* Convert hex color value to number
|
|
7
|
-
* @param hexValue - Hex color value (e.g., '#ff0000')
|
|
8
|
-
* @returns Number representation of hex color
|
|
9
|
-
*/
|
|
10
|
-
const convertHexToNumber = (hexValue) => {
|
|
11
|
-
const hex = hexValue.slice(1);
|
|
12
|
-
if (hex.length === 3) {
|
|
13
|
-
const r = parseInt(hex[0] + hex[0], 16);
|
|
14
|
-
const g = parseInt(hex[1] + hex[1], 16);
|
|
15
|
-
const b = parseInt(hex[2] + hex[2], 16);
|
|
16
|
-
return (r << 16) + (g << 8) + b;
|
|
17
|
-
}
|
|
18
|
-
return parseInt(hex, 16);
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Convert RGB color value to number
|
|
22
|
-
* @param rgbValue - RGB color value (e.g., 'rgb(255, 0, 0)')
|
|
23
|
-
* @returns Number representation of RGB color
|
|
24
|
-
* @throws {Error} If RGB format is invalid
|
|
25
|
-
*/
|
|
26
|
-
const convertRgbToNumber = (rgbValue) => {
|
|
27
|
-
const matches = rgbValue.match(RGB_REGEX);
|
|
28
|
-
if (!matches) {
|
|
29
|
-
throw new Error(`Invalid RGB format: ${rgbValue}`);
|
|
30
|
-
}
|
|
31
|
-
const r = parseInt(matches[1]);
|
|
32
|
-
const g = parseInt(matches[2]);
|
|
33
|
-
const b = parseInt(matches[3]);
|
|
34
|
-
return (r << 16) + (g << 8) + b;
|
|
35
|
-
};
|
|
36
|
-
/**
|
|
37
|
-
* Convert color value to number
|
|
38
|
-
* @param colorValue - Color value (e.g., '#ff0000' or 'rgb(255, 0, 0)')
|
|
39
|
-
* @returns Number representation of color
|
|
40
|
-
*/
|
|
41
|
-
const convertColorValueToNumber = (colorValue) => {
|
|
42
|
-
if (colorValue.startsWith('#')) {
|
|
43
|
-
return convertHexToNumber(colorValue);
|
|
44
|
-
}
|
|
45
|
-
return convertRgbToNumber(colorValue);
|
|
46
|
-
};
|
|
47
|
-
/**
|
|
48
|
-
* Factory that creates a color utility API based on the provided theme colors
|
|
49
|
-
* @param themeColors - Theme colors configuration
|
|
50
|
-
* @returns Color utility API instance
|
|
51
|
-
*/
|
|
52
|
-
/**
|
|
53
|
-
* Create a color API bound to an optional theme colors map.
|
|
54
|
-
* If a key exists in `themeColors`, it will be resolved to a palette token and then to RGB/Hex.
|
|
55
|
-
*
|
|
56
|
-
* @typeParam T - Theme colors map
|
|
57
|
-
* @param themeColors - Optional map of theme color tokens
|
|
58
|
-
* @example
|
|
59
|
-
* const c = createColor({ primary: 'blue-500' });
|
|
60
|
-
* c.rgb('primary'); // rgb(59, 130, 246)
|
|
61
|
-
*/
|
|
62
|
-
export const createColor = (themeColors) => {
|
|
63
|
-
/**
|
|
64
|
-
* Get color value from theme configuration
|
|
65
|
-
* @param key - Color token or theme color key
|
|
66
|
-
* @returns Color value from theme or null if not found
|
|
67
|
-
*/
|
|
68
|
-
const getValueFromTheme = (key) => {
|
|
69
|
-
if (themeColors && key in themeColors) {
|
|
70
|
-
return themeColors[key];
|
|
71
|
-
}
|
|
72
|
-
return null;
|
|
73
|
-
};
|
|
74
|
-
/**
|
|
75
|
-
* Get RGB string representation of a color
|
|
76
|
-
* @param color - Color token, theme color key or valid color string
|
|
77
|
-
* @returns RGB color string
|
|
78
|
-
* @throws {Error} If color token is not found
|
|
79
|
-
*/
|
|
80
|
-
const rgb = (color) => {
|
|
81
|
-
// Runtime supports direct CSS strings for flexibility, but
|
|
82
|
-
// the public type restricts to palette tokens or theme keys.
|
|
83
|
-
if (typeof color === 'string' && isValidColor(color)) {
|
|
84
|
-
return color;
|
|
85
|
-
}
|
|
86
|
-
const colorFromTheme = getValueFromTheme(color);
|
|
87
|
-
if (colorFromTheme) {
|
|
88
|
-
return rgb(colorFromTheme);
|
|
89
|
-
}
|
|
90
|
-
const parts = color.split('-');
|
|
91
|
-
if (parts.length === 2) {
|
|
92
|
-
const colorKey = parts[0];
|
|
93
|
-
const shade = parts[1];
|
|
94
|
-
const colorValue = palette[colorKey]?.[shade];
|
|
95
|
-
if (!colorValue) {
|
|
96
|
-
if (isValidColor(color)) {
|
|
97
|
-
return color;
|
|
98
|
-
}
|
|
99
|
-
throw new Error(`Color token "${colorKey}-${shade}" not found`);
|
|
100
|
-
}
|
|
101
|
-
return colorValue;
|
|
102
|
-
}
|
|
103
|
-
const colorValue = palette[color];
|
|
104
|
-
if (!colorValue) {
|
|
105
|
-
if (isValidColor(color)) {
|
|
106
|
-
return color;
|
|
107
|
-
}
|
|
108
|
-
throw new Error(`Color token "${color}" not found`);
|
|
109
|
-
}
|
|
110
|
-
return colorValue;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Get hex number representation of a color
|
|
114
|
-
* @param color - Color token, theme color key or valid color string
|
|
115
|
-
* @returns Hex color number
|
|
116
|
-
* @throws {Error} If color token is not found
|
|
117
|
-
*/
|
|
118
|
-
const hex = (color) => {
|
|
119
|
-
// See note in rgb()
|
|
120
|
-
if (typeof color === 'string' && isValidColor(color)) {
|
|
121
|
-
return convertColorValueToNumber(color);
|
|
122
|
-
}
|
|
123
|
-
const colorFromTheme = getValueFromTheme(color);
|
|
124
|
-
if (colorFromTheme) {
|
|
125
|
-
return hex(colorFromTheme);
|
|
126
|
-
}
|
|
127
|
-
const parts = color.split('-');
|
|
128
|
-
if (parts.length === 2) {
|
|
129
|
-
const colorKey = parts[0];
|
|
130
|
-
const shade = parts[1];
|
|
131
|
-
const colorValue = palette[colorKey]?.[shade];
|
|
132
|
-
if (!colorValue) {
|
|
133
|
-
if (isValidColor(color)) {
|
|
134
|
-
return convertColorValueToNumber(color);
|
|
135
|
-
}
|
|
136
|
-
throw new Error(`Color token "${colorKey}-${shade}" not found`);
|
|
137
|
-
}
|
|
138
|
-
return convertColorValueToNumber(colorValue);
|
|
139
|
-
}
|
|
140
|
-
const colorToConvert = palette[color];
|
|
141
|
-
if (isValidColor(colorToConvert)) {
|
|
142
|
-
return convertColorValueToNumber(colorToConvert);
|
|
143
|
-
}
|
|
144
|
-
throw new Error(`Color token "${color}" not found`);
|
|
145
|
-
};
|
|
146
|
-
const api = {
|
|
147
|
-
rgb,
|
|
148
|
-
hex,
|
|
149
|
-
slate: (shade) => rgb(`slate-${shade}`),
|
|
150
|
-
gray: (shade) => rgb(`gray-${shade}`),
|
|
151
|
-
zinc: (shade) => rgb(`zinc-${shade}`),
|
|
152
|
-
neutral: (shade) => rgb(`neutral-${shade}`),
|
|
153
|
-
stone: (shade) => rgb(`stone-${shade}`),
|
|
154
|
-
red: (shade) => rgb(`red-${shade}`),
|
|
155
|
-
orange: (shade) => rgb(`orange-${shade}`),
|
|
156
|
-
amber: (shade) => rgb(`amber-${shade}`),
|
|
157
|
-
yellow: (shade) => rgb(`yellow-${shade}`),
|
|
158
|
-
lime: (shade) => rgb(`lime-${shade}`),
|
|
159
|
-
green: (shade) => rgb(`green-${shade}`),
|
|
160
|
-
emerald: (shade) => rgb(`emerald-${shade}`),
|
|
161
|
-
teal: (shade) => rgb(`teal-${shade}`),
|
|
162
|
-
cyan: (shade) => rgb(`cyan-${shade}`),
|
|
163
|
-
sky: (shade) => rgb(`sky-${shade}`),
|
|
164
|
-
blue: (shade) => rgb(`blue-${shade}`),
|
|
165
|
-
indigo: (shade) => rgb(`indigo-${shade}`),
|
|
166
|
-
violet: (shade) => rgb(`violet-${shade}`),
|
|
167
|
-
purple: (shade) => rgb(`purple-${shade}`),
|
|
168
|
-
fuchsia: (shade) => rgb(`fuchsia-${shade}`),
|
|
169
|
-
pink: (shade) => rgb(`pink-${shade}`),
|
|
170
|
-
rose: (shade) => rgb(`rose-${shade}`),
|
|
171
|
-
slateHex: (shade) => hex(`slate-${shade}`),
|
|
172
|
-
grayHex: (shade) => hex(`gray-${shade}`),
|
|
173
|
-
zincHex: (shade) => hex(`zinc-${shade}`),
|
|
174
|
-
neutralHex: (shade) => hex(`neutral-${shade}`),
|
|
175
|
-
stoneHex: (shade) => hex(`stone-${shade}`),
|
|
176
|
-
redHex: (shade) => hex(`red-${shade}`),
|
|
177
|
-
orangeHex: (shade) => hex(`orange-${shade}`),
|
|
178
|
-
amberHex: (shade) => hex(`amber-${shade}`),
|
|
179
|
-
yellowHex: (shade) => hex(`yellow-${shade}`),
|
|
180
|
-
limeHex: (shade) => hex(`lime-${shade}`),
|
|
181
|
-
greenHex: (shade) => hex(`green-${shade}`),
|
|
182
|
-
emeraldHex: (shade) => hex(`emerald-${shade}`),
|
|
183
|
-
tealHex: (shade) => hex(`teal-${shade}`),
|
|
184
|
-
cyanHex: (shade) => hex(`cyan-${shade}`),
|
|
185
|
-
skyHex: (shade) => hex(`sky-${shade}`),
|
|
186
|
-
blueHex: (shade) => hex(`blue-${shade}`),
|
|
187
|
-
indigoHex: (shade) => hex(`indigo-${shade}`),
|
|
188
|
-
violetHex: (shade) => hex(`violet-${shade}`),
|
|
189
|
-
purpleHex: (shade) => hex(`purple-${shade}`),
|
|
190
|
-
fuchsiaHex: (shade) => hex(`fuchsia-${shade}`),
|
|
191
|
-
pinkHex: (shade) => hex(`pink-${shade}`),
|
|
192
|
-
roseHex: (shade) => hex(`rose-${shade}`),
|
|
193
|
-
};
|
|
194
|
-
return api;
|
|
195
|
-
};
|
|
196
|
-
/**
|
|
197
|
-
* Convenience instance using only the default palette tokens (no theme).
|
|
198
|
-
*
|
|
199
|
-
* @example
|
|
200
|
-
* Color.rgb('emerald-400')
|
|
201
|
-
* Color.hex('black')
|
|
202
|
-
*/
|
|
203
|
-
// eslint-disable-next-line no-redeclare
|
|
204
|
-
export const Color = createColor({});
|
|
205
|
-
//# sourceMappingURL=color.js.map
|
package/dist/core/color.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/core/color.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,YAAY,EAAE,MAAM,UAAU,CAAC;AAExC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAEpC,mDAAmD;AACnD,MAAM,SAAS,GAAG,gCAAgC,CAAC;AA8CnD;;;;GAIG;AACH,MAAM,kBAAkB,GAAG,CAAC,QAAgB,EAAU,EAAE;IACtD,MAAM,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;IAC9B,IAAI,GAAG,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QACrB,MAAM,CAAC,GAAG,QAAQ,CAAC,GAAG,CAAC,CAAC,CAAE,GAAG,GAAG,CAAC,CAAC,CAAE,EAAE,EAAE,CAAC,CAAC;QAC1C,MAAM,CAAC,GAAG,QAAQ,CAAC,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AAe,EAAE,EAAE,CAAC,GAAG,CAAC,UAAU,KAAK,EAAE,CAAC;QACtD,UAAU,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,GAAG,CAAC,WAAW,KAAK,EAAE,CAAC;QACxD,OAAO,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,EAAE,CAAC;QAClD,OAAO,EAAE,CAAC,KAAe,EAAE,EAAE,CAAC,GAAG,CAAC,QAAQ,KAAK,EAAE,CAAC;KACnD,CAAC;IAEF,OAAO,GAAG,CAAC;AACb,CAAC,CAAC;AAEF;;;;;;GAMG;AACH,wCAAwC;AACxC,MAAM,CAAC,MAAM,KAAK,GAAiC,WAAW,CAE5D,EAA2B,CAAC,CAAC"}
|
package/dist/core/color.spec.js
DELETED
|
@@ -1,243 +0,0 @@
|
|
|
1
|
-
/* eslint-disable no-magic-numbers */
|
|
2
|
-
/* eslint-disable max-lines-per-function */
|
|
3
|
-
import { beforeEach, describe, expect, it } from 'vitest';
|
|
4
|
-
import { createTheme } from '../theme';
|
|
5
|
-
import { createColor, Color as ColorDefault, } from './color';
|
|
6
|
-
const RED_500_RGB = 'rgb(239, 68, 68)';
|
|
7
|
-
const SLATE_50_RGB = 'rgb(248, 250, 252)';
|
|
8
|
-
const RED_500_TOKEN = 'red-500';
|
|
9
|
-
const SLATE_50_TOKEN = '50';
|
|
10
|
-
const BLUE_500_TOKEN = '500';
|
|
11
|
-
describe('ColorPicker', () => {
|
|
12
|
-
let color;
|
|
13
|
-
beforeEach(() => {
|
|
14
|
-
const fakeTheme = createTheme({
|
|
15
|
-
colors: {
|
|
16
|
-
primary: 'red-500',
|
|
17
|
-
secondary: 'slate-50',
|
|
18
|
-
another: '#ff9887',
|
|
19
|
-
},
|
|
20
|
-
});
|
|
21
|
-
color = createColor(fakeTheme);
|
|
22
|
-
});
|
|
23
|
-
describe('rgb method', () => {
|
|
24
|
-
it.each([
|
|
25
|
-
// slate
|
|
26
|
-
['slate-50', SLATE_50_RGB],
|
|
27
|
-
['slate-100', 'rgb(241, 245, 249)'],
|
|
28
|
-
['slate-200', 'rgb(226, 232, 240)'],
|
|
29
|
-
['slate-300', 'rgb(203, 213, 225)'],
|
|
30
|
-
['slate-400', 'rgb(148, 163, 184)'],
|
|
31
|
-
['slate-500', 'rgb(100, 116, 139)'],
|
|
32
|
-
['slate-600', 'rgb(71, 85, 105)'],
|
|
33
|
-
['slate-700', 'rgb(51, 65, 85)'],
|
|
34
|
-
['slate-800', 'rgb(30, 41, 59)'],
|
|
35
|
-
['slate-900', 'rgb(15, 23, 42)'],
|
|
36
|
-
['slate-950', 'rgb(2, 6, 23)'],
|
|
37
|
-
// gray
|
|
38
|
-
['gray-50', 'rgb(249, 250, 251)'],
|
|
39
|
-
['gray-100', 'rgb(243, 244, 246)'],
|
|
40
|
-
['gray-200', 'rgb(229, 231, 235)'],
|
|
41
|
-
['gray-300', 'rgb(209, 213, 219)'],
|
|
42
|
-
['gray-400', 'rgb(156, 163, 175)'],
|
|
43
|
-
['gray-500', 'rgb(107, 114, 128)'],
|
|
44
|
-
['gray-600', 'rgb(75, 85, 99)'],
|
|
45
|
-
['gray-700', 'rgb(55, 65, 81)'],
|
|
46
|
-
['gray-800', 'rgb(31, 41, 55)'],
|
|
47
|
-
['gray-900', 'rgb(17, 24, 39)'],
|
|
48
|
-
['gray-950', 'rgb(3, 7, 18)'],
|
|
49
|
-
// zinc
|
|
50
|
-
['zinc-50', 'rgb(250, 250, 250)'],
|
|
51
|
-
['zinc-100', 'rgb(244, 244, 245)'],
|
|
52
|
-
['zinc-200', 'rgb(228, 228, 231)'],
|
|
53
|
-
['zinc-300', 'rgb(212, 212, 216)'],
|
|
54
|
-
['zinc-400', 'rgb(161, 161, 170)'],
|
|
55
|
-
['zinc-500', 'rgb(113, 113, 122)'],
|
|
56
|
-
['zinc-600', 'rgb(82, 82, 91)'],
|
|
57
|
-
['zinc-700', 'rgb(63, 63, 70)'],
|
|
58
|
-
['zinc-800', 'rgb(39, 39, 42)'],
|
|
59
|
-
['zinc-900', 'rgb(24, 24, 27)'],
|
|
60
|
-
['zinc-950', 'rgb(9, 9, 11)'],
|
|
61
|
-
// red
|
|
62
|
-
['red-50', 'rgb(254, 242, 242)'],
|
|
63
|
-
['red-100', 'rgb(254, 226, 226)'],
|
|
64
|
-
['red-200', 'rgb(254, 202, 202)'],
|
|
65
|
-
['red-300', 'rgb(252, 165, 165)'],
|
|
66
|
-
['red-400', 'rgb(248, 113, 113)'],
|
|
67
|
-
['red-500', RED_500_RGB],
|
|
68
|
-
['red-600', 'rgb(220, 38, 38)'],
|
|
69
|
-
['red-700', 'rgb(185, 28, 28)'],
|
|
70
|
-
['red-800', 'rgb(153, 27, 27)'],
|
|
71
|
-
['red-900', 'rgb(127, 29, 29)'],
|
|
72
|
-
['red-950', 'rgb(69, 10, 10)'],
|
|
73
|
-
// blue
|
|
74
|
-
['blue-50', 'rgb(239, 246, 255)'],
|
|
75
|
-
['blue-100', 'rgb(219, 234, 254)'],
|
|
76
|
-
['blue-200', 'rgb(191, 219, 254)'],
|
|
77
|
-
['blue-300', 'rgb(147, 197, 253)'],
|
|
78
|
-
['blue-400', 'rgb(96, 165, 250)'],
|
|
79
|
-
['blue-500', 'rgb(59, 130, 246)'],
|
|
80
|
-
['blue-600', 'rgb(37, 99, 235)'],
|
|
81
|
-
['blue-700', 'rgb(29, 78, 216)'],
|
|
82
|
-
['blue-800', 'rgb(30, 64, 175)'],
|
|
83
|
-
['blue-900', 'rgb(30, 58, 138)'],
|
|
84
|
-
['blue-950', 'rgb(23, 37, 84)'],
|
|
85
|
-
// green
|
|
86
|
-
['green-50', 'rgb(240, 253, 244)'],
|
|
87
|
-
['green-100', 'rgb(220, 252, 231)'],
|
|
88
|
-
['green-200', 'rgb(187, 247, 208)'],
|
|
89
|
-
['green-300', 'rgb(134, 239, 172)'],
|
|
90
|
-
['green-400', 'rgb(74, 222, 128)'],
|
|
91
|
-
['green-500', 'rgb(34, 197, 94)'],
|
|
92
|
-
['green-600', 'rgb(22, 163, 74)'],
|
|
93
|
-
['green-700', 'rgb(21, 128, 61)'],
|
|
94
|
-
['green-800', 'rgb(22, 101, 52)'],
|
|
95
|
-
['green-900', 'rgb(20, 83, 45)'],
|
|
96
|
-
['green-950', 'rgb(5, 46, 22)'],
|
|
97
|
-
// special colors
|
|
98
|
-
['black', '#000'],
|
|
99
|
-
['white', '#fff'],
|
|
100
|
-
])('should convert %s to rgb %s', (colorToken, expected) => {
|
|
101
|
-
expect(color.rgb(colorToken)).toBe(expected);
|
|
102
|
-
});
|
|
103
|
-
// With stronger typing, direct CSS strings are not allowed by the type system.
|
|
104
|
-
// Runtime still supports them when needed, but they are intentionally not tested here.
|
|
105
|
-
it('should return the theme color when pass a token', () => {
|
|
106
|
-
const color = createColor({
|
|
107
|
-
primary: 'red-500',
|
|
108
|
-
secondary: 'slate-50',
|
|
109
|
-
});
|
|
110
|
-
expect(color.rgb('primary')).toBe('rgb(239, 68, 68)');
|
|
111
|
-
expect(color.rgb('secondary')).toBe('rgb(248, 250, 252)');
|
|
112
|
-
});
|
|
113
|
-
});
|
|
114
|
-
describe('default Color constant (no theme)', () => {
|
|
115
|
-
it('should resolve palette tokens via Color constant', () => {
|
|
116
|
-
expect(ColorDefault.rgb(RED_500_TOKEN)).toBe(RED_500_RGB);
|
|
117
|
-
expect(ColorDefault.slate(SLATE_50_TOKEN)).toBe(SLATE_50_RGB);
|
|
118
|
-
expect(ColorDefault.blueHex(BLUE_500_TOKEN)).toBe(0x3b82f6);
|
|
119
|
-
});
|
|
120
|
-
it('should throw for unknown tokens', () => {
|
|
121
|
-
expect(() => ColorDefault.rgb('unknown-123')).toThrow();
|
|
122
|
-
});
|
|
123
|
-
});
|
|
124
|
-
describe('hex method', () => {
|
|
125
|
-
it.each([
|
|
126
|
-
// slate
|
|
127
|
-
['slate-50', 0xf8fafc],
|
|
128
|
-
['slate-100', 0xf1f5f9],
|
|
129
|
-
['slate-200', 0xe2e8f0],
|
|
130
|
-
['slate-300', 0xcbd5e1],
|
|
131
|
-
['slate-400', 0x94a3b8],
|
|
132
|
-
['slate-500', 0x64748b],
|
|
133
|
-
['slate-600', 0x475569],
|
|
134
|
-
['slate-700', 0x334155],
|
|
135
|
-
['slate-800', 0x1e293b],
|
|
136
|
-
['slate-900', 0x0f172a],
|
|
137
|
-
['slate-950', 0x020617],
|
|
138
|
-
// gray
|
|
139
|
-
['gray-50', 0xf9fafb],
|
|
140
|
-
['gray-100', 0xf3f4f6],
|
|
141
|
-
['gray-200', 0xe5e7eb],
|
|
142
|
-
['gray-300', 0xd1d5db],
|
|
143
|
-
['gray-400', 0x9ca3af],
|
|
144
|
-
['gray-500', 0x6b7280],
|
|
145
|
-
['gray-600', 0x4b5563],
|
|
146
|
-
['gray-700', 0x374151],
|
|
147
|
-
['gray-800', 0x1f2937],
|
|
148
|
-
['gray-900', 0x111827],
|
|
149
|
-
['gray-950', 0x030712],
|
|
150
|
-
// zinc
|
|
151
|
-
['zinc-50', 0xfafafa],
|
|
152
|
-
['zinc-100', 0xf4f4f5],
|
|
153
|
-
['zinc-200', 0xe4e4e7],
|
|
154
|
-
['zinc-300', 0xd4d4d8],
|
|
155
|
-
['zinc-400', 0xa1a1aa],
|
|
156
|
-
['zinc-500', 0x71717a],
|
|
157
|
-
['zinc-600', 0x52525b],
|
|
158
|
-
['zinc-700', 0x3f3f46],
|
|
159
|
-
['zinc-800', 0x27272a],
|
|
160
|
-
['zinc-900', 0x18181b],
|
|
161
|
-
['zinc-950', 0x09090b],
|
|
162
|
-
// red
|
|
163
|
-
['red-50', 0xfef2f2],
|
|
164
|
-
['red-100', 0xfee2e2],
|
|
165
|
-
['red-200', 0xfecaca],
|
|
166
|
-
['red-300', 0xfca5a5],
|
|
167
|
-
['red-400', 0xf87171],
|
|
168
|
-
['red-500', 0xef4444],
|
|
169
|
-
['red-600', 0xdc2626],
|
|
170
|
-
['red-700', 0xb91c1c],
|
|
171
|
-
['red-800', 0x991b1b],
|
|
172
|
-
['red-900', 0x7f1d1d],
|
|
173
|
-
['red-950', 0x450a0a],
|
|
174
|
-
// blue
|
|
175
|
-
['blue-50', 0xeff6ff],
|
|
176
|
-
['blue-100', 0xdbeafe],
|
|
177
|
-
['blue-200', 0xbfdbfe],
|
|
178
|
-
['blue-300', 0x93c5fd],
|
|
179
|
-
['blue-400', 0x60a5fa],
|
|
180
|
-
['blue-500', 0x3b82f6],
|
|
181
|
-
['blue-600', 0x2563eb],
|
|
182
|
-
['blue-700', 0x1d4ed8],
|
|
183
|
-
['blue-800', 0x1e40af],
|
|
184
|
-
['blue-900', 0x1e3a8a],
|
|
185
|
-
['blue-950', 0x172554],
|
|
186
|
-
// green
|
|
187
|
-
['green-50', 0xf0fdf4],
|
|
188
|
-
['green-100', 0xdcfce7],
|
|
189
|
-
['green-200', 0xbbf7d0],
|
|
190
|
-
['green-300', 0x86efac],
|
|
191
|
-
['green-400', 0x4ade80],
|
|
192
|
-
['green-500', 0x22c55e],
|
|
193
|
-
['green-600', 0x16a34a],
|
|
194
|
-
['green-700', 0x15803d],
|
|
195
|
-
['green-800', 0x166534],
|
|
196
|
-
['green-900', 0x14532d],
|
|
197
|
-
['green-950', 0x052e16],
|
|
198
|
-
// special colors
|
|
199
|
-
['black', 0x000000],
|
|
200
|
-
['white', 0xffffff],
|
|
201
|
-
])('should convert %s to hex 0x%s', (colorToken, expected) => {
|
|
202
|
-
expect(color.hex(colorToken)).toBe(expected);
|
|
203
|
-
});
|
|
204
|
-
});
|
|
205
|
-
describe('error handling', () => {
|
|
206
|
-
it('should throw an error for invalid color token', () => {
|
|
207
|
-
expect(() => color.rgb('invalid-color')).toThrow('Color token "invalid-color" not found');
|
|
208
|
-
});
|
|
209
|
-
it('should throw an error for invalid shade', () => {
|
|
210
|
-
expect(() => color.rgb('red-999')).toThrow('Color token "red-999" not found');
|
|
211
|
-
});
|
|
212
|
-
it('should throw an error for invalid color key', () => {
|
|
213
|
-
expect(() => color.hex('purples-500')).toThrow('Color token "purples-500" not found');
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
describe('theme integration', () => {
|
|
217
|
-
const fakeTheme = createTheme({
|
|
218
|
-
colors: {
|
|
219
|
-
primary: 'red-500',
|
|
220
|
-
secondary: 'slate-50',
|
|
221
|
-
another: '#ff9887',
|
|
222
|
-
},
|
|
223
|
-
});
|
|
224
|
-
const color = createColor(fakeTheme.colors);
|
|
225
|
-
it('should resolve theme token with colors. prefix', () => {
|
|
226
|
-
expect(color.rgb('primary')).toBe(RED_500_RGB);
|
|
227
|
-
expect(color.rgb('secondary')).toBe(SLATE_50_RGB);
|
|
228
|
-
expect(color.rgb('another')).toBe('#ff9887');
|
|
229
|
-
});
|
|
230
|
-
it('should resolve theme token without colors. prefix', () => {
|
|
231
|
-
expect(color.rgb('primary')).toBe(RED_500_RGB);
|
|
232
|
-
expect(color.rgb('secondary')).toBe(SLATE_50_RGB);
|
|
233
|
-
});
|
|
234
|
-
it('should convert theme tokens to hex', () => {
|
|
235
|
-
expect(color.hex('primary')).toBe(0xef4444);
|
|
236
|
-
expect(color.hex('secondary')).toBe(0xf8fafc);
|
|
237
|
-
});
|
|
238
|
-
it('should throw an error if theme token is not found', () => {
|
|
239
|
-
expect(() => color.rgb('colors.not-found')).toThrow('Color token "colors.not-found" not found');
|
|
240
|
-
});
|
|
241
|
-
});
|
|
242
|
-
});
|
|
243
|
-
//# sourceMappingURL=color.spec.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"color.spec.js","sourceRoot":"","sources":["../../src/core/color.spec.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,2CAA2C;AAC3C,OAAO,EAAE,UAAU,EAAE,QAAQ,EAAE,MAAM,EAAE,EAAE,EAAE,MAAM,QAAQ,CAAC;AAE1D,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAEvC,OAAO,EACL,WAAW,EACX,KAAK,IAAI,YAAY,GAGtB,MAAM,SAAS,CAAC;AAEjB,MAA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AAI,CAAC,SAAS,CAAC,CAAC;QAC/C,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,WAAW,CAAC,CAAC;YAC/C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC;QACpD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,oCAAoC,EAAE,GAAG,EAAE;YAC5C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;YAC5C,MAAM,CAAC,KAAK,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;QAChD,CAAC,CAAC,CAAC;QAEH,EAAE,CAAC,mDAAmD,EAAE,GAAG,EAAE;YAC3D,MAAM,CAAC,GAAG,EAAE,CAAC,KAAK,CAAC,GAAG,CAAC,kBAAgC,CAAC,CAAC,CAAC,OAAO,CAC/D,0CAA0C,CAC3C,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
|
package/dist/core/font-size.js
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Default mapping of font size keys to their pixel values in pixels
|
|
3
|
-
*/
|
|
4
|
-
/** Default font-size scale mapping (in pixels). */
|
|
5
|
-
export const fontSizeMap = {
|
|
6
|
-
xs: 12,
|
|
7
|
-
sm: 14,
|
|
8
|
-
base: 16,
|
|
9
|
-
lg: 18,
|
|
10
|
-
xl: 20,
|
|
11
|
-
'2xl': 24,
|
|
12
|
-
'3xl': 30,
|
|
13
|
-
'4xl': 36,
|
|
14
|
-
'5xl': 48,
|
|
15
|
-
'6xl': 60,
|
|
16
|
-
'7xl': 72,
|
|
17
|
-
'8xl': 96,
|
|
18
|
-
'9xl': 128,
|
|
19
|
-
};
|
|
20
|
-
/**
|
|
21
|
-
* Creates a font size conversion API with optional custom font sizes
|
|
22
|
-
* @template T - Optional custom font size map type
|
|
23
|
-
* @param themeFontSizes - Optional custom font size mappings to extend defaults
|
|
24
|
-
* @returns Font size conversion API
|
|
25
|
-
*/
|
|
26
|
-
/**
|
|
27
|
-
* Create a font-size API bound to an optional custom map.
|
|
28
|
-
* @example
|
|
29
|
-
* const f = createFontSize({ xxl: 28 });
|
|
30
|
-
* f.css('xxl'); // '28px'
|
|
31
|
-
*/
|
|
32
|
-
export const createFontSize = (themeFontSizes) => {
|
|
33
|
-
const fontmap = {
|
|
34
|
-
...fontSizeMap,
|
|
35
|
-
...themeFontSizes,
|
|
36
|
-
};
|
|
37
|
-
return {
|
|
38
|
-
px: (key) => {
|
|
39
|
-
const value = fontmap[key];
|
|
40
|
-
if (typeof value === 'number') {
|
|
41
|
-
return value;
|
|
42
|
-
}
|
|
43
|
-
return 0;
|
|
44
|
-
},
|
|
45
|
-
rem: (key) => {
|
|
46
|
-
const value = fontmap[key];
|
|
47
|
-
if (typeof value === 'number') {
|
|
48
|
-
return value / 16;
|
|
49
|
-
}
|
|
50
|
-
return 0;
|
|
51
|
-
},
|
|
52
|
-
css: (key) => {
|
|
53
|
-
const value = fontmap[key];
|
|
54
|
-
if (typeof value === 'number') {
|
|
55
|
-
return `${value}px`;
|
|
56
|
-
}
|
|
57
|
-
return '0px';
|
|
58
|
-
},
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
// Convenience instance using default font sizes (no theme)
|
|
62
|
-
export const FontSize = createFontSize(undefined);
|
|
63
|
-
//# sourceMappingURL=font-size.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"font-size.js","sourceRoot":"","sources":["../../src/core/font-size.ts"],"names":[],"mappings":"AA0BA;;GAEG;AACH,mDAAmD;AACnD,MAAM,CAAC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