@calliopelabs/ui 0.13.0 → 0.14.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 (73) hide show
  1. package/README.md +50 -3
  2. package/dist/agent/AgentChat.d.ts +56 -0
  3. package/dist/agent/AgentChat.js +76 -0
  4. package/dist/agent/AgentLauncher.d.ts +25 -0
  5. package/dist/agent/AgentLauncher.js +25 -0
  6. package/dist/agent/AgentProvider.d.ts +82 -0
  7. package/dist/agent/AgentProvider.js +176 -0
  8. package/dist/agent/CalliopeAgent.d.ts +43 -0
  9. package/dist/agent/CalliopeAgent.js +111 -0
  10. package/dist/agent/controller.d.ts +148 -0
  11. package/dist/agent/controller.js +463 -0
  12. package/dist/agent/copilotkit/CopilotKitAgentProvider.d.ts +41 -0
  13. package/dist/agent/copilotkit/CopilotKitAgentProvider.js +145 -0
  14. package/dist/agent/copilotkit/index.d.ts +6 -0
  15. package/dist/agent/copilotkit/index.js +6 -0
  16. package/dist/agent/engine.d.ts +41 -0
  17. package/dist/agent/engine.js +93 -0
  18. package/dist/agent/index.d.ts +15 -0
  19. package/dist/agent/index.js +15 -0
  20. package/dist/agent/mock.d.ts +34 -0
  21. package/dist/agent/mock.js +112 -0
  22. package/dist/agent/surface.d.ts +30 -0
  23. package/dist/agent/surface.js +90 -0
  24. package/dist/agent/tool.d.ts +98 -0
  25. package/dist/agent/tool.js +81 -0
  26. package/dist/appearance/brands.d.ts +14 -12
  27. package/dist/appearance/brands.js +18 -51
  28. package/dist/chat/AgentProgress.d.ts +19 -0
  29. package/dist/chat/AgentProgress.js +34 -0
  30. package/dist/chat/Composer.d.ts +31 -0
  31. package/dist/chat/Composer.js +44 -0
  32. package/dist/chat/MessageBubble.d.ts +23 -0
  33. package/dist/chat/MessageBubble.js +26 -0
  34. package/dist/chat/MessageList.d.ts +36 -0
  35. package/dist/chat/MessageList.js +68 -0
  36. package/dist/chat/ModelPicker.d.ts +17 -0
  37. package/dist/chat/ModelPicker.js +13 -0
  38. package/dist/chat/ToolCallCard.d.ts +27 -0
  39. package/dist/chat/ToolCallCard.js +52 -0
  40. package/dist/chat/model.d.ts +123 -0
  41. package/dist/chat/model.js +337 -0
  42. package/dist/chat/patch.d.ts +12 -0
  43. package/dist/chat/patch.js +149 -0
  44. package/dist/chat/useAgUiRun.d.ts +52 -0
  45. package/dist/chat/useAgUiRun.js +137 -0
  46. package/dist/index.d.ts +9 -0
  47. package/dist/index.js +10 -0
  48. package/dist/primitives/Button.d.ts +1 -1
  49. package/dist/provider/messages.d.ts +66 -0
  50. package/dist/provider/messages.js +71 -0
  51. package/dist/theme/mappings/palette.d.ts +52 -0
  52. package/dist/theme/mappings/palette.js +208 -0
  53. package/dist/theme/mappings/render.d.ts +9 -0
  54. package/dist/theme/mappings/render.js +520 -0
  55. package/dist/theme/mappings/targets.d.ts +43 -0
  56. package/dist/theme/mappings/targets.js +222 -0
  57. package/dist/theme/tokens.d.ts +10 -9
  58. package/dist/theme/tokens.generated.d.ts +353 -0
  59. package/dist/theme/tokens.generated.js +357 -0
  60. package/dist/theme/tokens.js +20 -264
  61. package/dist/tokens/README.jupyterlab.md +125 -0
  62. package/dist/tokens/README.md +15 -0
  63. package/dist/tokens/README.native.md +29 -0
  64. package/dist/tokens/README.plain.md +84 -0
  65. package/dist/tokens/README.python.md +33 -0
  66. package/dist/tokens/README.vscode.md +114 -0
  67. package/dist/tokens/jupyterlab.css +1710 -0
  68. package/dist/tokens/plain.css +930 -0
  69. package/dist/tokens/tokens.native.d.ts +85 -0
  70. package/dist/tokens/tokens.native.js +773 -0
  71. package/dist/tokens/tokens.py +1043 -0
  72. package/dist/tokens/vscode.css +1138 -0
  73. package/package.json +35 -2
@@ -0,0 +1,357 @@
1
+ /*
2
+ * @calliopelabs/ui design tokens, as TypeScript constants.
3
+ * Generated by `npm run theme` from tokens/*.json. Do not edit by hand.
4
+ */
5
+ export const TOKENS = {
6
+ "core": {
7
+ "radius": "2px",
8
+ "motion-fast": "120ms",
9
+ "motion-base": "200ms",
10
+ "motion-slow": "320ms"
11
+ },
12
+ "mode": {
13
+ "dark": {
14
+ "surface": {
15
+ "background": "#000000",
16
+ "card": "#0a0a0a",
17
+ "popover": "#141414",
18
+ "secondary": "#161616",
19
+ "muted": "#111111",
20
+ "accent": "#1b1b1b",
21
+ "mutedForeground": "#848b88",
22
+ "border": "rgba(255, 255, 255, 0.1)",
23
+ "input": "rgba(255, 255, 255, 0.1)",
24
+ "sidebar": "brand",
25
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 16%, transparent)",
26
+ "sidebarBorder": "rgba(255, 255, 255, 0.08)"
27
+ },
28
+ "foreground": "#f0f2f1",
29
+ "destructive": "#ff6b6b",
30
+ "chart": {
31
+ "chart-2": "#8fd82a",
32
+ "chart-3": "#cbf39d",
33
+ "chart-4": "#e0b34a",
34
+ "chart-5": "#0b6644"
35
+ },
36
+ "sidebarForeground": "#f0f2f1",
37
+ "status": {
38
+ "success": {
39
+ "base": "#8fd82a",
40
+ "fg": "#a6e34d",
41
+ "bg": "rgba(143, 216, 42, 0.1)",
42
+ "border": "rgba(143, 216, 42, 0.35)"
43
+ },
44
+ "warning": {
45
+ "base": "#f0c34e",
46
+ "fg": "#f0c34e",
47
+ "bg": "rgba(240, 195, 78, 0.1)",
48
+ "border": "rgba(240, 195, 78, 0.35)"
49
+ },
50
+ "info": {
51
+ "base": "#2f9e52",
52
+ "fg": "#5cbb79",
53
+ "bg": "rgba(47, 158, 82, 0.14)",
54
+ "border": "rgba(47, 158, 82, 0.4)"
55
+ },
56
+ "danger": {
57
+ "base": "#ff6b6b",
58
+ "fg": "#ff8a8a",
59
+ "bg": "rgba(255, 107, 107, 0.1)",
60
+ "border": "rgba(255, 107, 107, 0.35)"
61
+ }
62
+ }
63
+ },
64
+ "light": {
65
+ "surface": {
66
+ "background": "#fafaf9",
67
+ "card": "#ffffff",
68
+ "popover": "#ffffff",
69
+ "secondary": "#f1f1f0",
70
+ "muted": "#f1f1f0",
71
+ "accent": "#f3ebe5",
72
+ "mutedForeground": "#5c5b58",
73
+ "border": "#dfdedc",
74
+ "input": "#dfdedc",
75
+ "sidebar": "#f4f3f1",
76
+ "sidebarAccent": "#f3ebe5",
77
+ "sidebarBorder": "#dfdedc"
78
+ },
79
+ "foreground": "#1e1d1b",
80
+ "destructive": "#d40c1a",
81
+ "chart": {
82
+ "chart-2": "#5c9c1a",
83
+ "chart-3": "#8a7a5c",
84
+ "chart-4": "#b8860b",
85
+ "chart-5": "#26803f"
86
+ },
87
+ "sidebarForeground": "#1e1d1b",
88
+ "status": {
89
+ "success": {
90
+ "base": "#508d23",
91
+ "fg": "#305a12",
92
+ "bg": "#e3f5da",
93
+ "border": "#b4d7a2"
94
+ },
95
+ "warning": {
96
+ "base": "#cb7a00",
97
+ "fg": "#824c12",
98
+ "bg": "#fef0d4",
99
+ "border": "#e8c184"
100
+ },
101
+ "info": {
102
+ "base": "#2f8543",
103
+ "fg": "#1b622d",
104
+ "bg": "#e2f4e3",
105
+ "border": "#acd8b1"
106
+ },
107
+ "danger": {
108
+ "base": "#df2225",
109
+ "fg": "#bb0916",
110
+ "bg": "#ffeae9",
111
+ "border": "#ffb1aa"
112
+ }
113
+ }
114
+ }
115
+ },
116
+ "ground": {
117
+ "black": {
118
+ "background": "#000000",
119
+ "card": "#0a0a0a",
120
+ "popover": "#141414",
121
+ "secondary": "#161616",
122
+ "muted": "#111111",
123
+ "accent": "#1b1b1b",
124
+ "mutedForeground": "#848b88",
125
+ "border": "rgba(255, 255, 255, 0.1)",
126
+ "input": "rgba(255, 255, 255, 0.1)",
127
+ "sidebar": "brand",
128
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 16%, transparent)",
129
+ "sidebarBorder": "rgba(255, 255, 255, 0.08)"
130
+ },
131
+ "charcoal": {
132
+ "background": "#0e0f10",
133
+ "card": "#161819",
134
+ "popover": "#1e2022",
135
+ "secondary": "#202325",
136
+ "muted": "#191b1c",
137
+ "accent": "#232628",
138
+ "mutedForeground": "#8b9194",
139
+ "border": "rgba(255, 255, 255, 0.1)",
140
+ "input": "rgba(255, 255, 255, 0.1)",
141
+ "sidebar": "brand",
142
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 16%, transparent)",
143
+ "sidebarBorder": "rgba(255, 255, 255, 0.08)"
144
+ },
145
+ "graphite": {
146
+ "background": "#111214",
147
+ "card": "#18191b",
148
+ "popover": "#202124",
149
+ "secondary": "#222326",
150
+ "muted": "#1b1c1e",
151
+ "accent": "#26272a",
152
+ "mutedForeground": "#8e9296",
153
+ "border": "rgba(255, 255, 255, 0.09)",
154
+ "input": "rgba(255, 255, 255, 0.1)",
155
+ "sidebar": "#161719",
156
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 14%, transparent)",
157
+ "sidebarBorder": "rgba(255, 255, 255, 0.07)"
158
+ },
159
+ "emerald": {
160
+ "background": "#050b08",
161
+ "card": "#0a1310",
162
+ "popover": "#0d1814",
163
+ "secondary": "#121d18",
164
+ "muted": "#101a15",
165
+ "accent": "#16261f",
166
+ "mutedForeground": "#8ba199",
167
+ "border": "rgba(255, 255, 255, 0.1)",
168
+ "input": "rgba(255, 255, 255, 0.1)",
169
+ "sidebar": "brand",
170
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 16%, transparent)",
171
+ "sidebarBorder": "rgba(255, 255, 255, 0.08)"
172
+ },
173
+ "navy": {
174
+ "background": "#0b1120",
175
+ "card": "#152141",
176
+ "popover": "#1a284a",
177
+ "secondary": "#1d2b50",
178
+ "muted": "#182545",
179
+ "accent": "#213157",
180
+ "mutedForeground": "#97a6c2",
181
+ "border": "rgba(255, 255, 255, 0.1)",
182
+ "input": "rgba(255, 255, 255, 0.1)",
183
+ "sidebar": "brand",
184
+ "sidebarAccent": "color-mix(in oklab, var(--primary) 16%, transparent)",
185
+ "sidebarBorder": "rgba(255, 255, 255, 0.08)"
186
+ },
187
+ "paper": {
188
+ "background": "#faf6ee",
189
+ "card": "#fffdf9",
190
+ "popover": "#fffdf9",
191
+ "secondary": "#f3eee4",
192
+ "muted": "#f3eee4",
193
+ "accent": "#f0e6da",
194
+ "mutedForeground": "#5c5b58",
195
+ "border": "#dedad2",
196
+ "input": "#dedad2",
197
+ "sidebar": "#f5f0e4",
198
+ "sidebarAccent": "#f0e6da",
199
+ "sidebarBorder": "#dedad2"
200
+ },
201
+ "mist": {
202
+ "background": "#f2f7f9",
203
+ "card": "#ffffff",
204
+ "popover": "#ffffff",
205
+ "secondary": "#e9eff2",
206
+ "muted": "#e9eff2",
207
+ "accent": "#dfeaf0",
208
+ "mutedForeground": "#5c5b58",
209
+ "border": "#d6dcdf",
210
+ "input": "#d6dcdf",
211
+ "sidebar": "#e9f1f5",
212
+ "sidebarAccent": "#dfeaf0",
213
+ "sidebarBorder": "#d6dcdf"
214
+ }
215
+ },
216
+ "accent": {
217
+ "green": {
218
+ "dark": "#2f9e52",
219
+ "onDark": "#04241b",
220
+ "light": "#26803f",
221
+ "onLight": "#f3fbf7"
222
+ },
223
+ "copper": {
224
+ "dark": "#c97b4a",
225
+ "onDark": "#140a04",
226
+ "light": "#9c5730",
227
+ "onLight": "#f3fbf7",
228
+ "chart": {
229
+ "dark": {
230
+ "chart-3": "#d9c7a3",
231
+ "chart-5": "#2f9e52"
232
+ }
233
+ }
234
+ },
235
+ "ice": {
236
+ "dark": "#6e9fc4",
237
+ "onDark": "#06131c",
238
+ "light": "#3d6f95",
239
+ "onLight": "#f3fbf7",
240
+ "chart": {
241
+ "dark": {
242
+ "chart-3": "#b9d4e4",
243
+ "chart-5": "#2f9e52"
244
+ }
245
+ }
246
+ },
247
+ "periwinkle": {
248
+ "dark": "#8b8fd9",
249
+ "onDark": "#0b0c1a",
250
+ "light": "#5a5fae",
251
+ "onLight": "#f3fbf7",
252
+ "chart": {
253
+ "dark": {
254
+ "chart-3": "#c3c5ec",
255
+ "chart-5": "#2f9e52"
256
+ }
257
+ }
258
+ },
259
+ "amber": {
260
+ "dark": "#e0b34a",
261
+ "onDark": "#1a1204",
262
+ "light": "#8a6410",
263
+ "onLight": "#f3fbf7",
264
+ "chart": {
265
+ "dark": {
266
+ "chart-4": "#c97b4a"
267
+ }
268
+ }
269
+ }
270
+ },
271
+ "density": {
272
+ "compact": {
273
+ "row-pad-y": "0.5rem",
274
+ "row-pad-x": "0.75rem",
275
+ "stack-gap": "0.75rem",
276
+ "panel-pad": "1rem",
277
+ "list-columns": "minmax(0, 1fr)",
278
+ "list-gap": "0px",
279
+ "list-frame-border": "1px",
280
+ "list-frame-radius": "var(--radius)",
281
+ "list-item-border": "0px",
282
+ "list-item-radius": "0px",
283
+ "list-item-bg": "transparent",
284
+ "list-item-pad": "var(--row-pad-y) var(--row-pad-x)",
285
+ "list-item-direction": "row",
286
+ "list-item-align": "center",
287
+ "list-item-trail": "auto"
288
+ },
289
+ "cards": {
290
+ "row-pad-y": "0.9rem",
291
+ "row-pad-x": "1rem",
292
+ "stack-gap": "1rem",
293
+ "panel-pad": "1.25rem",
294
+ "list-columns": "repeat(auto-fill, minmax(min(100%, 16rem), 1fr))",
295
+ "list-gap": "var(--stack-gap)",
296
+ "list-frame-border": "0px",
297
+ "list-frame-radius": "0px",
298
+ "list-item-border": "1px",
299
+ "list-item-radius": "var(--radius)",
300
+ "list-item-bg": "var(--card)",
301
+ "list-item-pad": "var(--panel-pad)",
302
+ "list-item-direction": "column",
303
+ "list-item-align": "stretch",
304
+ "list-item-trail": "0px"
305
+ }
306
+ },
307
+ "brand": {
308
+ "astrolift": {
309
+ "sidebar": "#04231a"
310
+ },
311
+ "zentinelle": {
312
+ "sidebar": "#0b0b19",
313
+ "accent": {
314
+ "dark": "#37efed",
315
+ "onDark": "#0b0b19",
316
+ "light": "#0d7470",
317
+ "onLight": "#f3fbf7"
318
+ }
319
+ },
320
+ "workbench": {
321
+ "sidebar": "#0e1730",
322
+ "accent": {
323
+ "dark": "#8fb8e8",
324
+ "onDark": "#0b1120",
325
+ "light": "#2f5d94",
326
+ "onLight": "#f3fbf7"
327
+ }
328
+ },
329
+ "chat-studio": {
330
+ "sidebar": "#080808",
331
+ "accent": {
332
+ "dark": "#8ab4f8",
333
+ "onDark": "#0c0c0c",
334
+ "light": "#1d4ed8",
335
+ "onLight": "#ffffff"
336
+ }
337
+ },
338
+ "loadr": {
339
+ "sidebar": "#181825",
340
+ "accent": {
341
+ "dark": "#89b4fa",
342
+ "onDark": "#11111b",
343
+ "light": "#1e66f5",
344
+ "onLight": "#ffffff"
345
+ }
346
+ },
347
+ "cykick": {
348
+ "sidebar": "#07090e",
349
+ "accent": {
350
+ "dark": "#22d3ee",
351
+ "onDark": "#07090e",
352
+ "light": "#0e7490",
353
+ "onLight": "#ffffff"
354
+ }
355
+ }
356
+ }
357
+ };
@@ -1,8 +1,9 @@
1
1
  /**
2
- * The Calliope AI operator palette: one table, and the source of
3
- * `src/styles/theme.css` (`npm run theme`). Every value here is either a
4
- * ground (the surface ramp), a family accent (action colour and the lead
5
- * chart series), a semantic status, or a density step.
2
+ * The Calliope AI operator palette, typed. Every value comes from the design
3
+ * tokens in `tokens/*.json` (through `tokens.generated.ts`, written by
4
+ * `npm run theme`); this file adds the names, labels and order the code needs.
5
+ * Every value is either a ground (the surface ramp), a family accent (action
6
+ * colour and the lead chart series), a semantic status, or a density step.
6
7
  *
7
8
  * Values come from the Astrolift frontend (`app/globals.css`, origin/main
8
9
  * 8edb40d) and the operator-UI amendment of 2026-08-21: grounds are black
@@ -14,6 +15,7 @@
14
15
  * oklch(0.66 0.16 70) to oklch(0.65 0.16 70) so a warning dot clears 3:1 on
15
16
  * paper and mist.
16
17
  */
18
+ import { TOKENS } from "./tokens.generated.js";
17
19
  export const GROUNDS = {
18
20
  black: { label: "Black", mode: "dark" },
19
21
  charcoal: { label: "Charcoal", mode: "dark" },
@@ -24,234 +26,25 @@ export const GROUNDS = {
24
26
  mist: { label: "Mist", mode: "light" },
25
27
  };
26
28
  export const GROUND_KEYS = Object.keys(GROUNDS);
27
- const PRIMARY_TINT_16 = "color-mix(in oklab, var(--primary) 16%, transparent)";
28
- const PRIMARY_TINT_14 = "color-mix(in oklab, var(--primary) 14%, transparent)";
29
- export const SURFACES = {
30
- black: {
31
- background: "#000000",
32
- card: "#0a0a0a",
33
- popover: "#141414",
34
- secondary: "#161616",
35
- muted: "#111111",
36
- accent: "#1b1b1b",
37
- mutedForeground: "#848b88",
38
- border: "rgba(255, 255, 255, 0.1)",
39
- input: "rgba(255, 255, 255, 0.1)",
40
- sidebar: "brand",
41
- sidebarAccent: PRIMARY_TINT_16,
42
- sidebarBorder: "rgba(255, 255, 255, 0.08)",
43
- },
44
- charcoal: {
45
- background: "#0e0f10",
46
- card: "#161819",
47
- popover: "#1e2022",
48
- secondary: "#202325",
49
- muted: "#191b1c",
50
- accent: "#232628",
51
- mutedForeground: "#8b9194",
52
- border: "rgba(255, 255, 255, 0.1)",
53
- input: "rgba(255, 255, 255, 0.1)",
54
- sidebar: "brand",
55
- sidebarAccent: PRIMARY_TINT_16,
56
- sidebarBorder: "rgba(255, 255, 255, 0.08)",
57
- },
58
- graphite: {
59
- background: "#111214",
60
- card: "#18191b",
61
- popover: "#202124",
62
- secondary: "#222326",
63
- muted: "#1b1c1e",
64
- accent: "#26272a",
65
- mutedForeground: "#8e9296",
66
- border: "rgba(255, 255, 255, 0.09)",
67
- input: "rgba(255, 255, 255, 0.1)",
68
- sidebar: "#161719",
69
- sidebarAccent: PRIMARY_TINT_14,
70
- sidebarBorder: "rgba(255, 255, 255, 0.07)",
71
- },
72
- emerald: {
73
- background: "#050b08",
74
- card: "#0a1310",
75
- popover: "#0d1814",
76
- secondary: "#121d18",
77
- muted: "#101a15",
78
- accent: "#16261f",
79
- mutedForeground: "#8ba199",
80
- border: "rgba(255, 255, 255, 0.1)",
81
- input: "rgba(255, 255, 255, 0.1)",
82
- sidebar: "brand",
83
- sidebarAccent: PRIMARY_TINT_16,
84
- sidebarBorder: "rgba(255, 255, 255, 0.08)",
85
- },
86
- /*
87
- * Workbench's navy, from JunoHub's palette: page #0b1120 and card
88
- * rgba(22, 35, 69, 0.9) composited on the page, with the neutral hairlines
89
- * every other dark ground uses. Its text colours are not carried over: foreground is per mode,
90
- * and the hub's muted text (#e6e9ee) is not muted, so muted text is a
91
- * navy-tinted grey that reads on every panel.
92
- */
93
- navy: {
94
- background: "#0b1120",
95
- card: "#152141",
96
- popover: "#1a284a",
97
- secondary: "#1d2b50",
98
- muted: "#182545",
99
- accent: "#213157",
100
- mutedForeground: "#97a6c2",
101
- border: "rgba(255, 255, 255, 0.1)",
102
- input: "rgba(255, 255, 255, 0.1)",
103
- sidebar: "brand",
104
- sidebarAccent: PRIMARY_TINT_16,
105
- sidebarBorder: "rgba(255, 255, 255, 0.08)",
106
- },
107
- paper: {
108
- background: "#faf6ee",
109
- card: "#fffdf9",
110
- popover: "#fffdf9",
111
- secondary: "#f3eee4",
112
- muted: "#f3eee4",
113
- accent: "#f0e6da",
114
- mutedForeground: "#5c5b58",
115
- border: "#dedad2",
116
- input: "#dedad2",
117
- sidebar: "#f5f0e4",
118
- sidebarAccent: "#f0e6da",
119
- sidebarBorder: "#dedad2",
120
- },
121
- mist: {
122
- background: "#f2f7f9",
123
- card: "#ffffff",
124
- popover: "#ffffff",
125
- secondary: "#e9eff2",
126
- muted: "#e9eff2",
127
- accent: "#dfeaf0",
128
- mutedForeground: "#5c5b58",
129
- border: "#d6dcdf",
130
- input: "#d6dcdf",
131
- sidebar: "#e9f1f5",
132
- sidebarAccent: "#dfeaf0",
133
- sidebarBorder: "#d6dcdf",
134
- },
135
- };
29
+ export const SURFACES = TOKENS.ground;
136
30
  /**
137
31
  * What a mode paints before a ground refines it: dark starts on black, light
138
32
  * on a neutral white. Every shipped ground overrides these surfaces, so the
139
33
  * light set only shows when no ground is set.
140
34
  */
141
35
  export const BASE_SURFACES = {
142
- dark: SURFACES.black,
143
- light: {
144
- background: "#fafaf9",
145
- card: "#ffffff",
146
- popover: "#ffffff",
147
- secondary: "#f1f1f0",
148
- muted: "#f1f1f0",
149
- accent: "#f3ebe5",
150
- mutedForeground: "#5c5b58",
151
- border: "#dfdedc",
152
- input: "#dfdedc",
153
- sidebar: "#f4f3f1",
154
- sidebarAccent: "#f3ebe5",
155
- sidebarBorder: "#dfdedc",
156
- },
157
- };
158
- export const MODE_TOKENS = {
159
- dark: {
160
- foreground: "#f0f2f1",
161
- destructive: "#ff6b6b",
162
- chart: {
163
- "chart-2": "#8fd82a",
164
- "chart-3": "#cbf39d",
165
- "chart-4": "#e0b34a",
166
- "chart-5": "#0b6644",
167
- },
168
- sidebarForeground: "#f0f2f1",
169
- status: {
170
- success: {
171
- base: "#8fd82a",
172
- fg: "#a6e34d",
173
- bg: "rgba(143, 216, 42, 0.1)",
174
- border: "rgba(143, 216, 42, 0.35)",
175
- },
176
- warning: {
177
- base: "#f0c34e",
178
- fg: "#f0c34e",
179
- bg: "rgba(240, 195, 78, 0.1)",
180
- border: "rgba(240, 195, 78, 0.35)",
181
- },
182
- info: {
183
- base: "#2f9e52",
184
- fg: "#5cbb79",
185
- bg: "rgba(47, 158, 82, 0.14)",
186
- border: "rgba(47, 158, 82, 0.4)",
187
- },
188
- danger: {
189
- base: "#ff6b6b",
190
- fg: "#ff8a8a",
191
- bg: "rgba(255, 107, 107, 0.1)",
192
- border: "rgba(255, 107, 107, 0.35)",
193
- },
194
- },
195
- },
196
- light: {
197
- foreground: "#1e1d1b",
198
- destructive: "#d40c1a",
199
- chart: {
200
- "chart-2": "#5c9c1a",
201
- "chart-3": "#8a7a5c",
202
- "chart-4": "#b8860b",
203
- "chart-5": "#26803f",
204
- },
205
- sidebarForeground: "#1e1d1b",
206
- status: {
207
- success: { base: "#508d23", fg: "#305a12", bg: "#e3f5da", border: "#b4d7a2" },
208
- warning: { base: "#cb7a00", fg: "#824c12", bg: "#fef0d4", border: "#e8c184" },
209
- info: { base: "#2f8543", fg: "#1b622d", bg: "#e2f4e3", border: "#acd8b1" },
210
- danger: { base: "#df2225", fg: "#bb0916", bg: "#ffeae9", border: "#ffb1aa" },
211
- },
212
- },
36
+ dark: TOKENS.mode.dark.surface,
37
+ light: TOKENS.mode.light.surface,
213
38
  };
39
+ const { surface: _dark, ...DARK } = TOKENS.mode.dark;
40
+ const { surface: _light, ...LIGHT } = TOKENS.mode.light;
41
+ export const MODE_TOKENS = { dark: DARK, light: LIGHT };
214
42
  export const ACCENTS = {
215
- green: {
216
- label: "Green",
217
- dark: "#2f9e52",
218
- onDark: "#04241b",
219
- light: "#26803f",
220
- onLight: "#f3fbf7",
221
- },
222
- copper: {
223
- label: "Copper",
224
- dark: "#c97b4a",
225
- onDark: "#140a04",
226
- light: "#9c5730",
227
- onLight: "#f3fbf7",
228
- chart: { dark: { "chart-3": "#d9c7a3", "chart-5": "#2f9e52" } },
229
- },
230
- ice: {
231
- label: "Ice",
232
- dark: "#6e9fc4",
233
- onDark: "#06131c",
234
- light: "#3d6f95",
235
- onLight: "#f3fbf7",
236
- chart: { dark: { "chart-3": "#b9d4e4", "chart-5": "#2f9e52" } },
237
- },
238
- periwinkle: {
239
- label: "Periwinkle",
240
- dark: "#8b8fd9",
241
- onDark: "#0b0c1a",
242
- light: "#5a5fae",
243
- onLight: "#f3fbf7",
244
- chart: { dark: { "chart-3": "#c3c5ec", "chart-5": "#2f9e52" } },
245
- },
246
- amber: {
247
- label: "Amber",
248
- dark: "#e0b34a",
249
- onDark: "#1a1204",
250
- light: "#8a6410",
251
- onLight: "#f3fbf7",
252
- // Amber is the accent here, so the amber series moves to copper.
253
- chart: { dark: { "chart-4": "#c97b4a" } },
254
- },
43
+ green: { label: "Green", ...TOKENS.accent.green },
44
+ copper: { label: "Copper", ...TOKENS.accent.copper },
45
+ ice: { label: "Ice", ...TOKENS.accent.ice },
46
+ periwinkle: { label: "Periwinkle", ...TOKENS.accent.periwinkle },
47
+ amber: { label: "Amber", ...TOKENS.accent.amber },
255
48
  };
256
49
  export const ACCENT_KEYS = Object.keys(ACCENTS);
257
50
  /** The accent a mode paints when nothing chooses one. */
@@ -266,51 +59,14 @@ export const DENSITIES = {
266
59
  compact: {
267
60
  label: "Compact",
268
61
  hint: "Dense rows with hairline dividers",
269
- tokens: {
270
- "row-pad-y": "0.5rem",
271
- "row-pad-x": "0.75rem",
272
- "stack-gap": "0.75rem",
273
- "panel-pad": "1rem",
274
- "list-columns": "minmax(0, 1fr)",
275
- "list-gap": "0px",
276
- "list-frame-border": "1px",
277
- "list-frame-radius": "var(--radius)",
278
- "list-item-border": "0px",
279
- "list-item-radius": "0px",
280
- "list-item-bg": "transparent",
281
- "list-item-pad": "var(--row-pad-y) var(--row-pad-x)",
282
- "list-item-direction": "row",
283
- "list-item-align": "center",
284
- "list-item-trail": "auto",
285
- },
62
+ tokens: TOKENS.density.compact,
286
63
  },
287
64
  cards: {
288
65
  label: "Cards",
289
66
  hint: "Boxed items that flow into columns",
290
- tokens: {
291
- "row-pad-y": "0.9rem",
292
- "row-pad-x": "1rem",
293
- "stack-gap": "1rem",
294
- "panel-pad": "1.25rem",
295
- "list-columns": "repeat(auto-fill, minmax(min(100%, 16rem), 1fr))",
296
- "list-gap": "var(--stack-gap)",
297
- "list-frame-border": "0px",
298
- "list-frame-radius": "0px",
299
- "list-item-border": "1px",
300
- "list-item-radius": "var(--radius)",
301
- "list-item-bg": "var(--card)",
302
- "list-item-pad": "var(--panel-pad)",
303
- "list-item-direction": "column",
304
- "list-item-align": "stretch",
305
- "list-item-trail": "0px",
306
- },
67
+ tokens: TOKENS.density.cards,
307
68
  },
308
69
  };
309
70
  export const DENSITY_KEYS = Object.keys(DENSITIES);
310
71
  /** Mode-independent tokens. `--radius` is the corners setting (2px shipped). */
311
- export const STATIC_TOKENS = {
312
- radius: "2px",
313
- "motion-fast": "120ms",
314
- "motion-base": "200ms",
315
- "motion-slow": "320ms",
316
- };
72
+ export const STATIC_TOKENS = TOKENS.core;