@stigmer/design-tokens 0.1.3 → 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.
- package/package.json +1 -1
- package/src/contract/pairs.ts +31 -2
- package/src/tailwind-theme.css +1 -0
- package/src/tokens.css +5 -1
- package/tailwind-theme.css +1 -0
- package/tokens.css +5 -1
package/package.json
CHANGED
package/src/contract/pairs.ts
CHANGED
|
@@ -181,7 +181,6 @@ const READY_TEXT_SURFACES = [
|
|
|
181
181
|
},
|
|
182
182
|
{ surface: "--stgm-muted-subtle", where: "on a hovered fold (TodoCard toggle)" },
|
|
183
183
|
{ surface: "--stgm-accent-hover", where: "on a hovered icon button (PlanFileCard copied tick)" },
|
|
184
|
-
{ surface: "--stgm-success-subtle", where: "on the selected keep verdict (FileReviewCard)" },
|
|
185
184
|
] as const;
|
|
186
185
|
|
|
187
186
|
const SYNTAX = [
|
|
@@ -208,8 +207,30 @@ export const CONTRAST_PAIRS: readonly ContrastPair[] = [
|
|
|
208
207
|
pair("--stgm-muted-foreground", "--stgm-muted", "text", "supporting text in muted panels (ExecutionErrorNotice interrupted state)"),
|
|
209
208
|
pair("--stgm-muted-foreground", "--stgm-background", "text", "Thinking indicator, timestamps, captions (SetupProgress, ThinkingMessage)"),
|
|
210
209
|
pair("--stgm-muted-foreground", "--stgm-card", "text", "supporting text inside cards"),
|
|
210
|
+
pair(
|
|
211
|
+
"--stgm-muted-foreground",
|
|
212
|
+
"--stgm-popover",
|
|
213
|
+
"text",
|
|
214
|
+
"supporting text in a dialog (ChatLinkDialog notes, ChannelConversationsDialog ages, FederationIssuerWizard pending steps)",
|
|
215
|
+
),
|
|
216
|
+
pair(
|
|
217
|
+
"--stgm-muted-foreground",
|
|
218
|
+
"--stgm-primary-subtle",
|
|
219
|
+
"text",
|
|
220
|
+
"timestamps and secondary lines on a quiet primary fill (ConversationTimelineView business bubble, ConversationListPane selected row)",
|
|
221
|
+
),
|
|
211
222
|
pair("--stgm-foreground", "--stgm-muted-subtle", "text", "user message bubble text (MessageEntry HumanMessage), markdown table headers"),
|
|
212
223
|
pair("--stgm-muted-foreground", "--stgm-muted-subtle", "text", "secondary affordances inside the user bubble"),
|
|
224
|
+
pair("--stgm-muted-foreground", "--stgm-muted-faint", "text", "an opened step's inset box: a read's lines, a search's matches, a command's output (STEP_INSET, ToolCallDetail)"),
|
|
225
|
+
over(
|
|
226
|
+
pair("--stgm-muted-foreground", "--stgm-status-running-band", "text", "a plan's live to-do and a step at work in a card of steps: their second lines on the band (PlanSteps, ToolCallItem)"),
|
|
227
|
+
"--stgm-card",
|
|
228
|
+
),
|
|
229
|
+
over(pair("--stgm-foreground", "--stgm-status-running-band", "text", "a plan's live to-do's and a step at work's words on the band (PlanSteps, ToolCallItem)"), "--stgm-card"),
|
|
230
|
+
// A step at work drawn on its own, outside a card of steps (a helper, a
|
|
231
|
+
// host's lone step): the band over the thread's page.
|
|
232
|
+
over(pair("--stgm-muted-foreground", "--stgm-status-running-band", "text", "a lone step at work's second line on the band (ToolCallItem, SubagentSection)"), "--stgm-background"),
|
|
233
|
+
over(pair("--stgm-foreground", "--stgm-status-running-band", "text", "a lone step at work's words on the band (ToolCallItem, SubagentSection)"), "--stgm-background"),
|
|
213
234
|
|
|
214
235
|
// ── Semantic text ───────────────────────────────────────────────────
|
|
215
236
|
pair("--stgm-destructive-foreground", "--stgm-destructive", "text", "destructive buttons (approval Deny)"),
|
|
@@ -292,7 +313,15 @@ export const CONTRAST_PAIRS: readonly ContrastPair[] = [
|
|
|
292
313
|
|
|
293
314
|
// ── Deliberately de-emphasized text (readability floor, not AA) ─────
|
|
294
315
|
pair("--stgm-muted-foreground-subtle", "--stgm-background", "supporting", "tertiary captions"),
|
|
295
|
-
|
|
316
|
+
// Placeholders and non-text marks only (icons, glyphs, a diff's context
|
|
317
|
+
// marker): never a line a person must read, which is
|
|
318
|
+
// --stgm-muted-foreground's, held to 4.5:1 above.
|
|
319
|
+
pair(
|
|
320
|
+
"--stgm-muted-foreground-faint",
|
|
321
|
+
"--stgm-background",
|
|
322
|
+
"supporting",
|
|
323
|
+
"placeholders and decorative marks (ConversationComposer placeholder, EmptyState icon, DiffViewer context marker)",
|
|
324
|
+
),
|
|
296
325
|
];
|
|
297
326
|
|
|
298
327
|
/**
|
package/src/tailwind-theme.css
CHANGED
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
--color-status-running: var(--stgm-status-running);
|
|
81
81
|
--color-status-running-foreground: var(--stgm-status-running-foreground);
|
|
82
82
|
--color-status-running-subtle: var(--stgm-status-running-subtle);
|
|
83
|
+
--color-status-running-band: var(--stgm-status-running-band);
|
|
83
84
|
--color-status-pending: var(--stgm-status-pending);
|
|
84
85
|
--color-status-pending-foreground: var(--stgm-status-pending-foreground);
|
|
85
86
|
--color-status-pending-subtle: var(--stgm-status-pending-subtle);
|
package/src/tokens.css
CHANGED
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
--stgm-primary-muted: oklch(0.40 0 0);
|
|
190
190
|
/* Desaturated destructive for secondary error indicators. */
|
|
191
191
|
--stgm-destructive-muted: oklch(0.65 0.12 27.325);
|
|
192
|
-
/* Faintest
|
|
192
|
+
/* Faintest foreground, for placeholders and non-text marks (icons, glyphs), never a line a person must read: readable secondary text is --stgm-muted-foreground. Held to a 3:1 floor by the contrast contract. */
|
|
193
193
|
--stgm-muted-foreground-faint: oklch(0.63 0 0);
|
|
194
194
|
/* Modal backdrop overlay behind dialogs. */
|
|
195
195
|
--stgm-backdrop: oklch(0.99 0 0 / 80%);
|
|
@@ -229,6 +229,9 @@
|
|
|
229
229
|
--stgm-status-running-foreground: oklch(0.985 0 0);
|
|
230
230
|
/* Quiet running surface. */
|
|
231
231
|
--stgm-status-running-subtle: oklch(0.95 0.03 230);
|
|
232
|
+
/* The band behind the item a plan works on now and its steps: quieter than
|
|
233
|
+
the pill's fill, so muted step words on it still read. */
|
|
234
|
+
--stgm-status-running-band: oklch(0.95 0.03 230);
|
|
232
235
|
/* Pending/queued status accent. */
|
|
233
236
|
--stgm-status-pending: oklch(0.5 0 0);
|
|
234
237
|
/* Text on a solid pending fill. */
|
|
@@ -378,6 +381,7 @@
|
|
|
378
381
|
--stgm-status-running: oklch(0.7 0.14 230);
|
|
379
382
|
--stgm-status-running-foreground: oklch(0.145 0 0);
|
|
380
383
|
--stgm-status-running-subtle: oklch(0.7 0.14 230 / 15%);
|
|
384
|
+
--stgm-status-running-band: oklch(0.7 0.14 230 / 8%);
|
|
381
385
|
--stgm-status-pending: oklch(0.723 0 0);
|
|
382
386
|
--stgm-status-pending-foreground: oklch(0.145 0 0);
|
|
383
387
|
--stgm-status-pending-subtle: oklch(0.723 0 0 / 15%);
|
package/tailwind-theme.css
CHANGED
|
@@ -80,6 +80,7 @@
|
|
|
80
80
|
--color-status-running: var(--stgm-status-running);
|
|
81
81
|
--color-status-running-foreground: var(--stgm-status-running-foreground);
|
|
82
82
|
--color-status-running-subtle: var(--stgm-status-running-subtle);
|
|
83
|
+
--color-status-running-band: var(--stgm-status-running-band);
|
|
83
84
|
--color-status-pending: var(--stgm-status-pending);
|
|
84
85
|
--color-status-pending-foreground: var(--stgm-status-pending-foreground);
|
|
85
86
|
--color-status-pending-subtle: var(--stgm-status-pending-subtle);
|
package/tokens.css
CHANGED
|
@@ -189,7 +189,7 @@
|
|
|
189
189
|
--stgm-primary-muted: oklch(0.40 0 0);
|
|
190
190
|
/* Desaturated destructive for secondary error indicators. */
|
|
191
191
|
--stgm-destructive-muted: oklch(0.65 0.12 27.325);
|
|
192
|
-
/* Faintest
|
|
192
|
+
/* Faintest foreground, for placeholders and non-text marks (icons, glyphs), never a line a person must read: readable secondary text is --stgm-muted-foreground. Held to a 3:1 floor by the contrast contract. */
|
|
193
193
|
--stgm-muted-foreground-faint: oklch(0.63 0 0);
|
|
194
194
|
/* Modal backdrop overlay behind dialogs. */
|
|
195
195
|
--stgm-backdrop: oklch(0.99 0 0 / 80%);
|
|
@@ -229,6 +229,9 @@
|
|
|
229
229
|
--stgm-status-running-foreground: oklch(0.985 0 0);
|
|
230
230
|
/* Quiet running surface. */
|
|
231
231
|
--stgm-status-running-subtle: oklch(0.95 0.03 230);
|
|
232
|
+
/* The band behind the item a plan works on now and its steps: quieter than
|
|
233
|
+
the pill's fill, so muted step words on it still read. */
|
|
234
|
+
--stgm-status-running-band: oklch(0.95 0.03 230);
|
|
232
235
|
/* Pending/queued status accent. */
|
|
233
236
|
--stgm-status-pending: oklch(0.5 0 0);
|
|
234
237
|
/* Text on a solid pending fill. */
|
|
@@ -378,6 +381,7 @@
|
|
|
378
381
|
--stgm-status-running: oklch(0.7 0.14 230);
|
|
379
382
|
--stgm-status-running-foreground: oklch(0.145 0 0);
|
|
380
383
|
--stgm-status-running-subtle: oklch(0.7 0.14 230 / 15%);
|
|
384
|
+
--stgm-status-running-band: oklch(0.7 0.14 230 / 8%);
|
|
381
385
|
--stgm-status-pending: oklch(0.723 0 0);
|
|
382
386
|
--stgm-status-pending-foreground: oklch(0.145 0 0);
|
|
383
387
|
--stgm-status-pending-subtle: oklch(0.723 0 0 / 15%);
|