tweakit 0.1.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.
- package/LICENSE +21 -0
- package/README.md +44 -0
- package/THIRD-PARTY-NOTICES.md +75 -0
- package/dist/tweaks/bezier-ZSQNFANZ.js +1 -0
- package/dist/tweaks/chunk-EVLD7DUH.js +1 -0
- package/dist/tweaks/chunk-GJESM23Q.js +1 -0
- package/dist/tweaks/colour-W46T6NIC.js +1 -0
- package/dist/tweaks/core.js +1 -0
- package/dist/tweaks/gradient-YEKTFEP4.js +1 -0
- package/dist/tweaks/image-VKNBVMVK.js +1 -0
- package/dist/tweaks/interval-7OUK7M7J.js +1 -0
- package/dist/tweaks/monitor-CY7CABK6.js +2 -0
- package/dist/tweaks/plot-X5IZM3QU.js +2 -0
- package/dist/tweaks/point-23BHLSGI.js +1 -0
- package/dist/tweaks/spring-Z2SKXUVV.js +1 -0
- package/dist/tweaks/tabs-CGHJ2VS2.js +1 -0
- package/dist/tweaks.css +1 -0
- package/dist/tweaks.js +3 -0
- package/dist/types/tweaks/controls/bezier.d.ts +1 -0
- package/dist/types/tweaks/controls/colour.d.ts +14 -0
- package/dist/types/tweaks/controls/gradient.d.ts +1 -0
- package/dist/types/tweaks/controls/image.d.ts +1 -0
- package/dist/types/tweaks/controls/interval.d.ts +1 -0
- package/dist/types/tweaks/controls/monitor.d.ts +1 -0
- package/dist/types/tweaks/controls/plot.d.ts +1 -0
- package/dist/types/tweaks/controls/point.d.ts +1 -0
- package/dist/types/tweaks/controls/spring.d.ts +1 -0
- package/dist/types/tweaks/controls/tabs.d.ts +1 -0
- package/dist/types/tweaks/core.d.ts +4 -0
- package/dist/types/tweaks/shared.d.ts +77 -0
- package/dist/types/tweaks/single.d.ts +12 -0
- package/dist/types/tweaks/types.d.ts +264 -0
- package/dist/types/wide-gamut.d.ts +121 -0
- package/package.json +57 -0
|
@@ -0,0 +1,264 @@
|
|
|
1
|
+
/** An option for a select / radio grid: a bare string, or `{ value, label }`. */
|
|
2
|
+
export type Option = string | {
|
|
3
|
+
value: string;
|
|
4
|
+
label?: string;
|
|
5
|
+
};
|
|
6
|
+
/** A colour stop in a gradient. */
|
|
7
|
+
export type GradientStop = {
|
|
8
|
+
color: string;
|
|
9
|
+
pos: number;
|
|
10
|
+
};
|
|
11
|
+
/** The CSS `<color-interpolation-method>` a gradient blends through — the space of the
|
|
12
|
+
* mode the stops were authored in. Template it as `linear-gradient(in <interpolation> …)`
|
|
13
|
+
* so your CSS ramp matches the editor's preview exactly. */
|
|
14
|
+
export type GradientInterpolation = "srgb" | "hsl" | "hwb" | "oklch" | "oklab" | "lch" | "lab" | "display-p3" | "rec2020";
|
|
15
|
+
/** Reader passed to a conditional `render` / `disabled` predicate — `get("siblingKey")`. */
|
|
16
|
+
export type Get = (key: string) => unknown;
|
|
17
|
+
/** Per-control extras that can ride on any object-form value. */
|
|
18
|
+
export interface ControlOptions {
|
|
19
|
+
/** Show/hide this control based on other values. */
|
|
20
|
+
render?: (get: Get) => boolean;
|
|
21
|
+
/** Grey-out + lock this control (static, or derived from other values). */
|
|
22
|
+
disabled?: boolean | ((get: Get) => boolean);
|
|
23
|
+
/** A tooltip revealed by an ⓘ marker beside the label. */
|
|
24
|
+
hint?: string;
|
|
25
|
+
}
|
|
26
|
+
/** The verbose object forms a schema value can take: `{ type: "…", … }`. */
|
|
27
|
+
export type SchemaObject = {
|
|
28
|
+
type: "slider";
|
|
29
|
+
value?: number;
|
|
30
|
+
min?: number;
|
|
31
|
+
max?: number;
|
|
32
|
+
step?: number;
|
|
33
|
+
soft?: boolean;
|
|
34
|
+
} | {
|
|
35
|
+
type: "number";
|
|
36
|
+
value?: number;
|
|
37
|
+
min?: number;
|
|
38
|
+
max?: number;
|
|
39
|
+
step?: number;
|
|
40
|
+
soft?: boolean;
|
|
41
|
+
} | {
|
|
42
|
+
type: "checkbox";
|
|
43
|
+
value?: boolean;
|
|
44
|
+
} | {
|
|
45
|
+
type: "list";
|
|
46
|
+
options: Option[];
|
|
47
|
+
value?: string;
|
|
48
|
+
} | {
|
|
49
|
+
type: "radiogrid" | "segmented";
|
|
50
|
+
options: Option[];
|
|
51
|
+
value?: string;
|
|
52
|
+
cols?: number;
|
|
53
|
+
} | {
|
|
54
|
+
type: "color";
|
|
55
|
+
value?: string;
|
|
56
|
+
label?: string;
|
|
57
|
+
} | {
|
|
58
|
+
type: "text";
|
|
59
|
+
value?: string;
|
|
60
|
+
rows?: number;
|
|
61
|
+
placeholder?: string;
|
|
62
|
+
} | {
|
|
63
|
+
type: "interval";
|
|
64
|
+
value?: [number, number];
|
|
65
|
+
min?: number;
|
|
66
|
+
max?: number;
|
|
67
|
+
step?: number;
|
|
68
|
+
} | {
|
|
69
|
+
type: "spring";
|
|
70
|
+
stiffness?: number;
|
|
71
|
+
damping?: number;
|
|
72
|
+
mass?: number;
|
|
73
|
+
value?: {
|
|
74
|
+
stiffness?: number;
|
|
75
|
+
damping?: number;
|
|
76
|
+
mass?: number;
|
|
77
|
+
};
|
|
78
|
+
} | {
|
|
79
|
+
type: "cubicbezier";
|
|
80
|
+
value?: [number, number, number, number];
|
|
81
|
+
} | {
|
|
82
|
+
type: "point";
|
|
83
|
+
components: Array<{
|
|
84
|
+
key: string;
|
|
85
|
+
label?: string;
|
|
86
|
+
value?: number;
|
|
87
|
+
min?: number;
|
|
88
|
+
max?: number;
|
|
89
|
+
step?: number;
|
|
90
|
+
}>;
|
|
91
|
+
pad?: boolean;
|
|
92
|
+
invertY?: boolean;
|
|
93
|
+
} | {
|
|
94
|
+
type: "gradient";
|
|
95
|
+
value?: {
|
|
96
|
+
stops: GradientStop[];
|
|
97
|
+
interpolation?: GradientInterpolation;
|
|
98
|
+
} | Array<GradientStop | [string, number]>;
|
|
99
|
+
} | {
|
|
100
|
+
type: "plot";
|
|
101
|
+
expr?: string;
|
|
102
|
+
fn?: (x: number) => number;
|
|
103
|
+
xMin?: number;
|
|
104
|
+
xMax?: number;
|
|
105
|
+
yMin?: number;
|
|
106
|
+
yMax?: number;
|
|
107
|
+
samples?: number;
|
|
108
|
+
editable?: boolean;
|
|
109
|
+
} | {
|
|
110
|
+
type: "fpsgraph";
|
|
111
|
+
label?: string;
|
|
112
|
+
} | {
|
|
113
|
+
type: "monitor";
|
|
114
|
+
get?: () => number | string;
|
|
115
|
+
value?: number | string;
|
|
116
|
+
graph?: boolean;
|
|
117
|
+
view?: "graph" | "text";
|
|
118
|
+
min?: number;
|
|
119
|
+
max?: number;
|
|
120
|
+
interval?: number;
|
|
121
|
+
rows?: number;
|
|
122
|
+
decimals?: number;
|
|
123
|
+
} | {
|
|
124
|
+
type: "image";
|
|
125
|
+
value?: string;
|
|
126
|
+
} | {
|
|
127
|
+
type: "button";
|
|
128
|
+
action: () => void;
|
|
129
|
+
label?: string;
|
|
130
|
+
} | {
|
|
131
|
+
type: "buttongroup";
|
|
132
|
+
buttons: Record<string, () => void> | Array<{
|
|
133
|
+
label: string;
|
|
134
|
+
action: () => void;
|
|
135
|
+
}>;
|
|
136
|
+
} | {
|
|
137
|
+
type: "separator";
|
|
138
|
+
} | {
|
|
139
|
+
type: "tabs";
|
|
140
|
+
pages: Record<string, Schema>;
|
|
141
|
+
};
|
|
142
|
+
/** A schema value — a shorthand, a verbose `{ type }` object, or a nested folder. */
|
|
143
|
+
export type SchemaValue = number | boolean | string | [number] | [number, number] | [number, number, number] | [number, number, number, number] | [[number, number], number, number] | [[number, number], number, number, number] | Option[] | (SchemaObject & ControlOptions) | Schema;
|
|
144
|
+
/** The object you hand to `tweaks(name, schema, opts?)`. */
|
|
145
|
+
export interface Schema {
|
|
146
|
+
[key: string]: SchemaValue;
|
|
147
|
+
}
|
|
148
|
+
/** A theme — token overrides applied over the default monochrome look. Every key is
|
|
149
|
+
* optional, so a partial theme only moves what it names; unset tokens keep their default.
|
|
150
|
+
* Use the friendly names here, or any raw `--tw-*` custom property. Apply at build via
|
|
151
|
+
* `tweaks(name, schema, { theme })`, or live via `panel.setTheme(theme)`. The kit's whole
|
|
152
|
+
* appearance runs on these custom properties — this is the public theming surface. */
|
|
153
|
+
export interface Theme {
|
|
154
|
+
/** Brand accent — slider fills, focus rings, active highlights (default: neutral, no accent). */
|
|
155
|
+
accent?: string;
|
|
156
|
+
/** Text drawn on the accent (active segment / radio label). Auto-derived from the accent's luminance if unset. */
|
|
157
|
+
onAccent?: string;
|
|
158
|
+
/** Panel background, reused for recessed wells. */
|
|
159
|
+
base?: string;
|
|
160
|
+
/** Popover / dropdown background. */
|
|
161
|
+
dropdownBg?: string;
|
|
162
|
+
/** Control surface and its hover / active steps. */
|
|
163
|
+
surface?: string;
|
|
164
|
+
surfaceHover?: string;
|
|
165
|
+
surfaceActive?: string;
|
|
166
|
+
/** Hairline border and its hover step. */
|
|
167
|
+
border?: string;
|
|
168
|
+
borderHover?: string;
|
|
169
|
+
/** Text-selection highlight wash. */
|
|
170
|
+
selection?: string;
|
|
171
|
+
/** Text tones — panel title, section heading, primary value text, control label, and the muted / faint / focus tones. */
|
|
172
|
+
title?: string;
|
|
173
|
+
section?: string;
|
|
174
|
+
text?: string;
|
|
175
|
+
label?: string;
|
|
176
|
+
textMuted?: string;
|
|
177
|
+
textFaint?: string;
|
|
178
|
+
focus?: string;
|
|
179
|
+
/** Copy-confirmation accent. */
|
|
180
|
+
success?: string;
|
|
181
|
+
/** Invalid-state accent (the plot's bad-expression cue). */
|
|
182
|
+
danger?: string;
|
|
183
|
+
/** Popover shadow, the panel's container elevation, and its lifted (floating / dragging) variant. */
|
|
184
|
+
shadow?: string;
|
|
185
|
+
shadowPanel?: string;
|
|
186
|
+
shadowPanelLifted?: string;
|
|
187
|
+
/** Font stack, and the monospace stack (the plot's expression field). */
|
|
188
|
+
font?: string;
|
|
189
|
+
fontMono?: string;
|
|
190
|
+
/** Control corner radius and row height — a bare number is treated as px. */
|
|
191
|
+
radius?: number | string;
|
|
192
|
+
density?: number | string;
|
|
193
|
+
/** Escape hatch — any raw token, e.g. `"--tw-accent": "#6c8cff"`. */
|
|
194
|
+
[token: string]: string | number | undefined;
|
|
195
|
+
}
|
|
196
|
+
/** Panel options (third arg to `tweaks()`). */
|
|
197
|
+
export interface TweaksOptions {
|
|
198
|
+
/** Theme overrides (friendly names or raw `--tw-*`); `null` / omitted = default monochrome. */
|
|
199
|
+
theme?: Theme | null;
|
|
200
|
+
/** Persist values to localStorage + enable presets — a key, or `true` to key by name. */
|
|
201
|
+
persist?: string | boolean;
|
|
202
|
+
/** Add a filter/search field to the toolbar. */
|
|
203
|
+
filter?: boolean;
|
|
204
|
+
/** Start the panel already floated (fixed-positioned): `true` → top-left, or an explicit `{x,y}`. */
|
|
205
|
+
floating?: boolean | {
|
|
206
|
+
x: number;
|
|
207
|
+
y: number;
|
|
208
|
+
};
|
|
209
|
+
/** Drag the header to reposition the panel — on by default. An inline panel lifts into a
|
|
210
|
+
* floating layer on first drag; set `false` to pin it in place. */
|
|
211
|
+
draggable?: boolean;
|
|
212
|
+
/** Set `false` for a bare panel (no copy/reset/presets toolbar). */
|
|
213
|
+
toolbar?: boolean;
|
|
214
|
+
/** Enable debounced undo/redo (⌘Z / ⇧⌘Z while the panel is hovered/focused). */
|
|
215
|
+
undo?: boolean;
|
|
216
|
+
/** Custom reset handler (e.g. restore real app defaults + rebuild). */
|
|
217
|
+
onReset?: () => void;
|
|
218
|
+
/** Fired when a drag/scrub on any control begins. */
|
|
219
|
+
onEditStart?: () => void;
|
|
220
|
+
/** Fired when a drag/scrub ends. */
|
|
221
|
+
onEditEnd?: () => void;
|
|
222
|
+
}
|
|
223
|
+
/** The live values bag — `params[key]` for each control; `_last` is the last-changed key. */
|
|
224
|
+
export type Params = Record<string, any> & {
|
|
225
|
+
_last?: string;
|
|
226
|
+
};
|
|
227
|
+
/** The panel object `tweaks()` returns. */
|
|
228
|
+
export interface Panel {
|
|
229
|
+
/** The panel root element — append it to the DOM. */
|
|
230
|
+
el: HTMLElement;
|
|
231
|
+
/** Live values, updated in place as controls change. */
|
|
232
|
+
params: Params;
|
|
233
|
+
/** Resolves once any lazily-loaded controls have hydrated (resolves immediately when none). */
|
|
234
|
+
ready: Promise<Panel>;
|
|
235
|
+
/** Subscribe to changes; returns an unsubscribe fn. */
|
|
236
|
+
on(fn: (params: Params, last?: string) => void): () => void;
|
|
237
|
+
/** Set a control's value programmatically. Nested controls take a dotted path
|
|
238
|
+
* ("folder.child", "tabs.page.child"); a bare key also reaches a nested control
|
|
239
|
+
* when it's unambiguous. A key matching no control is stored on `params` as-is. */
|
|
240
|
+
set(key: string, value: unknown): void;
|
|
241
|
+
/** Reset every control to its default (or run `opts.onReset`). */
|
|
242
|
+
reset(): void;
|
|
243
|
+
/** Re-theme the panel live; `null` reverts to the default. */
|
|
244
|
+
setTheme(theme?: Theme | null): void;
|
|
245
|
+
/** Save the current values as a named preset (needs `opts.persist`). */
|
|
246
|
+
savePreset(name: string): boolean;
|
|
247
|
+
/** Load a named preset. */
|
|
248
|
+
loadPreset(name: string): boolean;
|
|
249
|
+
/** Delete a named preset. */
|
|
250
|
+
deletePreset(name: string): void;
|
|
251
|
+
/** List saved preset names. */
|
|
252
|
+
presets(): string[];
|
|
253
|
+
/** Undo / redo (need `opts.undo`). */
|
|
254
|
+
undo(): void;
|
|
255
|
+
redo(): void;
|
|
256
|
+
/** Tear the panel down — remove it from the DOM, release every global listener, close any open popover; the API goes inert. */
|
|
257
|
+
destroy(): void;
|
|
258
|
+
}
|
|
259
|
+
/** A built control's handle (internal-ish, but used across modules). */
|
|
260
|
+
export interface Control {
|
|
261
|
+
el: HTMLElement;
|
|
262
|
+
set(value: unknown): void;
|
|
263
|
+
get(): unknown;
|
|
264
|
+
}
|
|
@@ -0,0 +1,121 @@
|
|
|
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;
|
package/package.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "tweakit",
|
|
3
|
+
"version": "0.1.0",
|
|
4
|
+
"type": "module",
|
|
5
|
+
"description": "A dependency-free, code-split real-time parameter panel — sliders, toggles, a wide-gamut OKLCH colour picker, curve editors and more, from a plain schema.",
|
|
6
|
+
"license": "MIT",
|
|
7
|
+
"author": "Ryan Kiley",
|
|
8
|
+
"repository": {
|
|
9
|
+
"type": "git",
|
|
10
|
+
"url": "git+https://github.com/ryankiley/tweakit.git"
|
|
11
|
+
},
|
|
12
|
+
"homepage": "https://ryankiley.github.io/tweakit/",
|
|
13
|
+
"bugs": "https://github.com/ryankiley/tweakit/issues",
|
|
14
|
+
"keywords": [
|
|
15
|
+
"gui",
|
|
16
|
+
"panel",
|
|
17
|
+
"controls",
|
|
18
|
+
"parameters",
|
|
19
|
+
"debug",
|
|
20
|
+
"tweakpane",
|
|
21
|
+
"dat.gui",
|
|
22
|
+
"leva",
|
|
23
|
+
"oklch",
|
|
24
|
+
"color-picker",
|
|
25
|
+
"wide-gamut"
|
|
26
|
+
],
|
|
27
|
+
"scripts": {
|
|
28
|
+
"build": "node build.mjs",
|
|
29
|
+
"test": "node build.mjs && node --test \"test/*.test.mjs\"",
|
|
30
|
+
"prepublishOnly": "node build.mjs && node --test \"test/*.test.mjs\"",
|
|
31
|
+
"serve": "node build.mjs && python3 -m http.server 4330 --directory dist"
|
|
32
|
+
},
|
|
33
|
+
"types": "./dist/types/tweaks/single.d.ts",
|
|
34
|
+
"exports": {
|
|
35
|
+
".": {
|
|
36
|
+
"types": "./dist/types/tweaks/single.d.ts",
|
|
37
|
+
"import": "./dist/tweaks.js"
|
|
38
|
+
},
|
|
39
|
+
"./core": {
|
|
40
|
+
"types": "./dist/types/tweaks/core.d.ts",
|
|
41
|
+
"import": "./dist/tweaks/core.js"
|
|
42
|
+
},
|
|
43
|
+
"./css": "./dist/tweaks.css"
|
|
44
|
+
},
|
|
45
|
+
"files": [
|
|
46
|
+
"dist/tweaks",
|
|
47
|
+
"dist/tweaks.js",
|
|
48
|
+
"dist/tweaks.css",
|
|
49
|
+
"dist/types",
|
|
50
|
+
"THIRD-PARTY-NOTICES.md"
|
|
51
|
+
],
|
|
52
|
+
"devDependencies": {
|
|
53
|
+
"esbuild": "^0.28.0",
|
|
54
|
+
"jsdom": "^29.1.1",
|
|
55
|
+
"typescript": "^6.0.3"
|
|
56
|
+
}
|
|
57
|
+
}
|