aporia 0.1.0 → 0.2.0

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.
@@ -0,0 +1,41 @@
1
+ /** Normalize to #RRGGBB uppercase */
2
+ export declare function normalizeHex(raw: string): string;
3
+ export type Hsl = {
4
+ h: number;
5
+ s: number;
6
+ l: number;
7
+ };
8
+ export type Hsv = {
9
+ h: number;
10
+ s: number;
11
+ v: number;
12
+ };
13
+ export type Rgb = {
14
+ r: number;
15
+ g: number;
16
+ b: number;
17
+ };
18
+ /** H in degrees 0–360; S and L in 0–1 */
19
+ export declare function hslToHex(h: number, s: number, l: number): string;
20
+ export declare function hslToRgbBytes(h: number, s: number, l: number): [number, number, number];
21
+ /** #RRGGBB → HSL with S,L in 0–1 */
22
+ export declare function hexToHsl(hex: string): Hsl;
23
+ /** H in degrees 0–360; S and V in 0–1 */
24
+ export declare function hsvToRgbBytes(h: number, s: number, v: number): [number, number, number];
25
+ export declare function hsvToHex(h: number, s: number, v: number): string;
26
+ /** #RRGGBB → HSV with S,V in 0–1 */
27
+ export declare function hexToHsv(hex: string): Hsv;
28
+ export declare function hexToRgb(hex: string): Rgb;
29
+ export declare function rgbToHex(r: number, g: number, b: number): string;
30
+ /**
31
+ * Parse common CSS color strings to hex.
32
+ * Supports:
33
+ * - #RGB / #RRGGBB
34
+ * - rgb(...) / rgba(...): comma or space-separated, numbers 0-255 or percents
35
+ * - hsl(...) / hsla(...): modern space-separated or legacy commas; S and L must be percents
36
+ * - hsv(...) / hsb(...): non-standard but common in tooling; S and V/B as percents
37
+ *
38
+ * Alpha (if present) is ignored.
39
+ */
40
+ export declare function parseCssColorToHex(raw: string): string | null;
41
+ //# sourceMappingURL=colorSpace.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"colorSpace.d.ts","sourceRoot":"","sources":["../../src/utils/colorSpace.ts"],"names":[],"mappings":"AAAA,qCAAqC;AACrC,wBAAgB,YAAY,CAAC,GAAG,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AAE,MAAM,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,CAIhE;AA0ED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CA4B7D"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "aporia",
3
- "version": "0.1.0",
3
+ "version": "0.2.0",
4
4
  "description": "A collection of production-quality React components for building configurators - sliders, color pickers, gradient editors, toggles, and more.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
@@ -24,7 +24,7 @@
24
24
  "scripts": {
25
25
  "dev": "vite",
26
26
  "build": "vite build",
27
- "build:app": "tsc -b && vite build",
27
+ "build:demo": "vite build --mode demo",
28
28
  "lint": "eslint .",
29
29
  "preview": "vite preview",
30
30
  "prepublishOnly": "npm run build"
@@ -74,5 +74,8 @@
74
74
  "bugs": {
75
75
  "url": "https://github.com/nico-frey/aporia/issues"
76
76
  },
77
- "homepage": "https://github.com/nico-frey/aporia#readme"
77
+ "homepage": "https://github.com/nico-frey/aporia#readme",
78
+ "dependencies": {
79
+ "torph": "^0.0.9"
80
+ }
78
81
  }