tweakit 0.1.0 → 0.3.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.
Files changed (48) hide show
  1. package/README.md +11 -0
  2. package/dist/tweaks/bezier-WUBSS72H.js +1 -0
  3. package/dist/tweaks/chunk-DPJ7YRTN.js +1 -0
  4. package/dist/tweaks/chunk-GC5PWSSX.js +1 -0
  5. package/dist/tweaks/colour-ZTCDZ2NN.js +1 -0
  6. package/dist/tweaks/core.js +1 -1
  7. package/dist/tweaks/gradient-54DF4XNE.js +1 -0
  8. package/dist/tweaks/image-IR5QKXT4.js +1 -0
  9. package/dist/tweaks/interval-KXOP2WEL.js +1 -0
  10. package/dist/tweaks/monitor-5K5VMRAL.js +2 -0
  11. package/dist/tweaks/plot-3WWIZG7H.js +2 -0
  12. package/dist/tweaks/point-RPJKP5YR.js +1 -0
  13. package/dist/tweaks/spring-TPWZKO7B.js +1 -0
  14. package/dist/tweaks/tabs-AVAHPF5A.js +1 -0
  15. package/dist/tweaks.css +1 -1
  16. package/dist/tweaks.css.d.ts +3 -0
  17. package/dist/tweaks.js +4 -3
  18. package/dist/types/tweaks/core.d.ts +4 -4
  19. package/dist/types/tweaks/enhance.d.ts +1 -0
  20. package/dist/types/tweaks/panel.d.ts +2 -0
  21. package/dist/types/tweaks/standalone.d.ts +3 -0
  22. package/dist/types/tweaks/types.d.ts +126 -2
  23. package/package.json +16 -8
  24. package/dist/tweaks/bezier-ZSQNFANZ.js +0 -1
  25. package/dist/tweaks/chunk-EVLD7DUH.js +0 -1
  26. package/dist/tweaks/chunk-GJESM23Q.js +0 -1
  27. package/dist/tweaks/colour-W46T6NIC.js +0 -1
  28. package/dist/tweaks/gradient-YEKTFEP4.js +0 -1
  29. package/dist/tweaks/image-VKNBVMVK.js +0 -1
  30. package/dist/tweaks/interval-7OUK7M7J.js +0 -1
  31. package/dist/tweaks/monitor-CY7CABK6.js +0 -2
  32. package/dist/tweaks/plot-X5IZM3QU.js +0 -2
  33. package/dist/tweaks/point-23BHLSGI.js +0 -1
  34. package/dist/tweaks/spring-Z2SKXUVV.js +0 -1
  35. package/dist/tweaks/tabs-CGHJ2VS2.js +0 -1
  36. package/dist/types/tweaks/controls/bezier.d.ts +0 -1
  37. package/dist/types/tweaks/controls/colour.d.ts +0 -14
  38. package/dist/types/tweaks/controls/gradient.d.ts +0 -1
  39. package/dist/types/tweaks/controls/image.d.ts +0 -1
  40. package/dist/types/tweaks/controls/interval.d.ts +0 -1
  41. package/dist/types/tweaks/controls/monitor.d.ts +0 -1
  42. package/dist/types/tweaks/controls/plot.d.ts +0 -1
  43. package/dist/types/tweaks/controls/point.d.ts +0 -1
  44. package/dist/types/tweaks/controls/spring.d.ts +0 -1
  45. package/dist/types/tweaks/controls/tabs.d.ts +0 -1
  46. package/dist/types/tweaks/shared.d.ts +0 -77
  47. package/dist/types/tweaks/single.d.ts +0 -12
  48. package/dist/types/wide-gamut.d.ts +0 -121
@@ -1,121 +0,0 @@
1
- export declare const num: (x: any) => any;
2
- export declare function convert(coords: any, from: any, to: any): any[];
3
- /** Map OKLCH into an RGB gamut (CSS Color 4 chroma reduction + local clip). */
4
- export declare function toGamut(oklch: any, dest: any): any;
5
- /** Fast in-gamut probe at a fixed hue — `(L,C)=>inside?` (his chroma-boundary loop). */
6
- export declare function oklchGamutProbe(hue: any, gamut: any): (L: any, C: any) => boolean;
7
- /** OKLCH→RGB at a fixed hue, folded for per-pixel rasterising: hoists cos/sin(hue) and
8
- * collapses LMS→XYZ→RGB into one matrix once, then `(L, C, out)` writes the RGB straight
9
- * into `out` (no per-pixel array alloc, no per-pixel trig). Algebraically identical to
10
- * `convert([L,C,hue], "oklch", gamut)` — OKLAB_TO_LMS[i][0] is 1, so p_i = L + C·d_i, the
11
- * same fold `oklchGamutProbe` ships. The picker's plane raster calls it once per repaint. */
12
- export declare function oklchToRgbFn(hue: any, gamut: any): (L: any, C: any, out: any) => void;
13
- /** Bisect the chroma ceiling at lightness L for an `oklchGamutProbe` — the highest
14
- * in-gamut C. The picker traces its plane gamut, boundary lines, and hue strip with it. */
15
- export declare function chromaCeil(probe: any, L: any, hi?: number): number;
16
- /** One 0–1 channel → a 2-digit hex byte (also the alpha suffix for #RRGGBBAA). */
17
- export declare const hexByte: (n: any) => string;
18
- export declare const oklchToHex: (L: any, C: any, H: any) => string;
19
- export declare function hexToOklch(hex: any): any[];
20
- export declare const EDIT_MODES: string[];
21
- export declare const MODE_LABELS: {
22
- hex: string;
23
- srgb: string;
24
- css: string;
25
- hsl: string;
26
- hwb: string;
27
- oklch: string;
28
- oklab: string;
29
- lch: string;
30
- lab: string;
31
- p3: string;
32
- rec2020: string;
33
- };
34
- export declare const showsGamutBoundary: (mode: any) => boolean;
35
- export declare const modeInterpolation: (mode: any) => any;
36
- export declare const interpolationMode: (interp: any) => any;
37
- export declare const MODE_CHANNELS: {
38
- oklch: {
39
- k: string;
40
- min: number;
41
- max: number;
42
- step: number;
43
- scale: number;
44
- }[];
45
- oklab: {
46
- k: string;
47
- min: number;
48
- max: number;
49
- step: number;
50
- scale: number;
51
- }[];
52
- lch: {
53
- k: string;
54
- min: number;
55
- max: number;
56
- step: number;
57
- scale: number;
58
- }[];
59
- lab: {
60
- k: string;
61
- min: number;
62
- max: number;
63
- step: number;
64
- scale: number;
65
- }[];
66
- srgb: {
67
- k: string;
68
- min: number;
69
- max: number;
70
- step: number;
71
- scale: number;
72
- }[];
73
- css: {
74
- k: string;
75
- min: number;
76
- max: number;
77
- step: number;
78
- scale: number;
79
- }[];
80
- hsl: {
81
- k: string;
82
- min: number;
83
- max: number;
84
- step: number;
85
- scale: number;
86
- }[];
87
- hwb: {
88
- k: string;
89
- min: number;
90
- max: number;
91
- step: number;
92
- scale: number;
93
- }[];
94
- p3: {
95
- k: string;
96
- min: number;
97
- max: number;
98
- step: number;
99
- scale: number;
100
- }[];
101
- rec2020: {
102
- k: string;
103
- min: number;
104
- max: number;
105
- step: number;
106
- scale: number;
107
- }[];
108
- };
109
- /** Display-unit channel values for `mode` from canonical OKLCH. */
110
- export declare function channelValues(oklch: any, mode: any): any;
111
- /** New OKLCH with channel `index` of `mode` set to `displayValue`. */
112
- export declare function withChannel(oklch: any, mode: any, index: any, displayValue: any): any[];
113
- /** Plain-text gamut label: sRGB / P3 / wide. */
114
- export declare function gamutLabel(oklch: any, mode: any): "P3" | "sRGB" | "wide";
115
- /** The collapsed-row value string for `mode` (bare channels w/ units, or hex). */
116
- export declare function readout(oklch: any, mode: any): string;
117
- /** The colour control's emitted CSS value — `mode`-faithful at the mode's display
118
- * precision, alpha appended in that mode's own syntax. One form for opaque and
119
- * translucent: a translucent rgb stays `rgb(… / a)` (it used to jump to `oklch()` at
120
- * a different precision), and an opaque value reads back identically through parse. */
121
- export declare function serialize(oklch: any, mode: any, alpha: any): any;