@filipgutica/design-system 1.0.27 → 1.0.28

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.
@@ -16,6 +16,7 @@ Each entry records a choice this language made, the options it rejected, and why
16
16
  | Minimal by default | Core | Every interface starts minimal: the subtraction rules in [Minimal by default](DESIGN.md#minimal-by-default) for status, meta lines, rows, marks, actions, forms, boxes, and explanations, with a never-cut list, and words, boxes, and controls counted before and after each change. Prose keeps the copy rules. Taken from the PluginBench redesign, where cutting to these rules took Results from 412 to 306 words and 12 to 7 boxes, Queue from 34 to 28 controls, and New eval from 221 to 148 words (whole-page counts at 1280px). | A minimal pass per project: PluginBench needed two rounds of "less" before it got there. A fixed word or box budget: the right count depends on the task, and a budget would punish real data. Counting screen-reader-only text: it would reward cutting accessible names. The same rules for lessons and product prose: they need their explanation. | No test yet |
17
17
  | Status in one sentence | Core | A view's summary sentence carries the status, its numbers, and a status icon. An alert holds only a caveat or action the summary cannot carry, one per view at most. | A banner above the summary that repeats it: PluginBench's Results had both, and the banner added a box and a second reading of the same fact. | No test yet |
18
18
  | Overflow menu | Core | Two or more secondary actions sit behind an icon-only quiet action with an SVG "more" icon, in a floating menu with concentric rows: the WAI-ARIA menu button pattern, which reka-ui's DropdownMenu and ui-sdk's Menu both follow. A destructive item comes last, after a separator, and confirms in a dialog. The primary action and a recovery action stay visible. | A `<details>` disclosure, as the project menu uses for links: an action menu built that way would behave differently from both headless libraries an implementation builds on. A `⋯` text glyph, as the PluginBench mockup used: a font draws its ink off the centre of its box (see Quiet actions). A menu for a single secondary action: it hides one action behind two presses. | keyboard path: `tests/catalogue/catalogue.spec.ts` "the overflow menu follows the menu button pattern"; corners: "each component renders the corner radius of its role, and no other part has one"; danger item contrast: "contrast: every danger menu item reaches 4.5:1" |
19
+ | Faint uncertainty | Core | In a chart, every point, line, and label stays at full strength; the intervals of the points that are not selected fade to about 20% opacity, and the selected point keeps strong intervals and an accent ring. Matrix cells show a value and an icon, with the verdict word only on cells with a clear result and the full words in every accessible name, and one key line under the chart. Taken from the PluginBench Results scatter and overview grid. | Strong intervals on every point: with three efforts and two packages, six pairs of intervals crossed and hid the selected one. Fading whole points: the data the reader compares would drop below non-text contrast. Hiding unselected intervals: it removes the uncertainty a reader needs to judge any point. A verdict word and a border on every cell: six boxes and six repeated words where only the clear results needed a word. | No test yet |
19
20
  | Section mark | Identity | The `##` mark goes only on the page-level section headings (h2) of documentation, CLI tool, article, and product pages, which are mono with a `--color-border-subtle` rule above. Application and inline-visualization section headings are plain `--font-ui` semibold at `--text-xl` or smaller, with no mark and no rule. h3 and lower never take it. | The mark on every section heading: on a dense screen, such as a metrics dashboard with six sections, it repeated down the page and competed with the data. The mark on h2 and h3: deeper levels repeat more often. A per-page opt-out class: every application page would need to remember it. Dropping the mark: reading pages lose the folio identity that ties them to the `~/name` header. Mono application section headings without the mark: the mono face alone still reads as a document heading among compact sans rows. | No test yet |
20
21
  | Command plate | Identity | Owner decision, 2026-11-15: a shell command uses the normal code block and its source well in light and dark, with a CSS-drawn `$ ` prompt in `--color-accent`. Header, Copy, compact layout, and focus follow the code block. Keep `--color-command-bg` and `--color-command-border` as compatibility aliases for `--color-code` and `--color-border-subtle`. Terminal captures stay unchanged. | A: the dark, hue-tinted plate in both modes. On a light page it was the darkest element and looked mismatched beside light source blocks; the owner noticed it on every site. B: a pale hue-tinted plate in light mode. It followed the mode but added a second tinted surface and still differed from source code; the owner preferred one consistent code surface (option C). | `tests/catalogue/catalogue.spec.ts`: "contrast: shell command text on the code well reaches 4.5:1", "contrast: the accent shell prompt on the code well reaches 3:1"; compatibility aliases and DS-1 exceptions: `tests/token-values.test.mjs`; shared code recipes: `tests/design-foundations.test.mjs`; imported-theme failures: `tests/theme-mapper.test.mjs` |
21
22
  | Terminal colours | Identity | Owner decision, 2026-11-14: the 16 ANSI colours that terminal captures use are design-system tokens, `--color-terminal-ansi-0` to `-15`, plus `--color-terminal-ansi-4-bg` for a blue background that terminal text reads on. They keep the values `@filipgutica/ui` drew before, so no capture changes. Colours 1 to 15 reach 4.5:1 on `--color-terminal`; black (colour 0) is a background only, and dim text reads colour 8. | Literal defaults in `@filipgutica/ui`: colour data outside the design system, which breaks the rule that the design system owns colours and component libraries only apply them. One token per colour role, such as a success green: terminal programs choose the slot, so the palette must name slots. | contrast: the core `ansi` check in `theme-mapper/engine.js`, which `tests/site/site.spec.ts` "Themes: every contrast check passes" runs for every theme; parity with the 1.x token set: `tests/token-values.test.mjs` |
@@ -146,7 +146,7 @@ export async function renderReport(snapshot, { mode = 'inline', tokens = '' } =
146
146
  const other = snapshot.categories.some((c) => c.key === 'other') ? `<p class="ov-muted">Other = categories outside ${snapshot.categories.filter((c) => c.key !== 'other').map((c) => escapeHtml(c.label)).join(', ')}.</p>` : ''
147
147
  return `<!doctype html><html><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>${escapeHtml(snapshot.title)}</title><style>${standalone}\n${css}\n${standaloneFields}</style></head><body><main id="ov-report" class="ov-report">
148
148
  <header><h1>${escapeHtml(snapshot.title)}</h1><div class="ov-controls"><label for="ov-region">${escapeHtml(snapshot.filterLabel || 'Group')}</label><select id="ov-region">${options([['', 'All'], ...regions.map((r) => [r, r])])}</select><label for="ov-window">Time</label><select id="ov-window">${snapshot.windows.map((w) => `<option value="${escapeHtml(w.key)}"${w.key === snapshot.defaultWindow ? ' selected' : ''}>${escapeHtml(w.label)}</option>`).join('')}</select></div></header>
149
- <p id="ov-caption" class="ov-muted">${escapeHtml(view.caption)}</p><p class="ov-muted">${escapeHtml(snapshot.source.provider)} · ${escapeHtml(snapshot.source.basis)} · ${escapeHtml(snapshot.source.sampling)}</p>
149
+ <p class="ov-muted"><span id="ov-caption">${escapeHtml(view.caption)}</span> · ${escapeHtml(snapshot.source.provider)} · ${escapeHtml(snapshot.source.basis)} · ${escapeHtml(snapshot.source.sampling)}</p>
150
150
  <div id="ov-summary" class="ov-summary" role="group" aria-label="Overall counts and percentages">${view.summary}</div><svg id="ov-bars" viewBox="0 0 100 6" preserveAspectRatio="none" role="img" aria-label="Category shares; exact counts and percentages are listed above">${view.bars}</svg>
151
151
  <div class="ov-table-heading"><h2>By ${escapeHtml((snapshot.dimensionLabel || 'Item').toLowerCase())}</h2><span class="ov-muted">Count (% of row total)</span></div><div class="ov-scroll"><table><thead><tr><th>${escapeHtml(snapshot.dimensionLabel || 'Item')}</th><th>Total</th>${headers}</tr></thead><tbody id="ov-rows">${view.table}</tbody></table></div><section id="ov-mobile" class="ov-mobile" aria-label="${escapeHtml(snapshot.dimensionLabel || 'Item')} breakdown">${view.mobile}</section>
152
152
  ${other}<p id="ov-announcement" class="ov-sr-only" aria-live="polite">${escapeHtml(view.announcement)}</p><footer class="ov-muted"><p>${link}All percentages use ${escapeHtml(snapshot.source.unit)} in the selected population. No auto-refresh.</p><p id="ov-reference">${view.reference}</p><details><summary>Measurement and scope</summary><p>${escapeHtml(snapshot.source.dataset)} · ${escapeHtml(snapshot.source.scope)}</p><pre>${escapeHtml(snapshot.source.query)}</pre><p>Captured ${escapeHtml(snapshot.capturedAt)}. Each item in this view is counted once. The category counts add up to Total.</p></details></footer>
@@ -26,6 +26,17 @@ node <language>/visualizations/build-count-report.mjs snapshot.json report.html
26
26
 
27
27
  Choose readable density for the actual number of items. Keep the overview and requested detail together without hiding important categories on narrow screens. The count-table layout and responsive behavior are described in the snapshot contract. Exact codes and category classes must have different labels.
28
28
 
29
+ ## Keep the view minimal
30
+
31
+ Charts follow [Minimal by default](DESIGN.md#minimal-by-default): the data carries the view, and every mark, label, and line of text earns its place.
32
+
33
+ - **Emphasise the selection.** Every point, line, and label stays at full strength. Only the intervals of the points that are not selected fade, to about 20% opacity; the selected point keeps strong intervals and an accent ring, so colour is not its only cue. Never remove an interval, a provisional mark, or a sample size to quiet the view.
34
+ - **Cells carry a value and an icon.** In a matrix or heatmap, each cell shows its value and a direction or status icon, on a fill or nothing, not a border of its own. The verdict word, such as Better or Worse, shows only on cells with a clear result, the ones that take a status fill; an unclear cell shows the icon alone. Every cell's accessible name holds the full words: the row, the column, the value, and the verdict.
35
+ - **One key line.** Name the icons, line styles, and states on one line under the chart, not in a legend box, as [Mark the exceptions](DESIGN.md#minimal-by-default) asks.
36
+ - **Short captions.** Start with how to read the chart, such as "Up and left is better", in one or two sentences. Method notes and multiple-comparison caveats go in a closed disclosure beside the chart.
37
+ - **Direct labels.** Label points and series beside their marks, and move a label that would overlap another.
38
+ - **Bigger, not busier.** Give the space these cuts free to the chart and its key values.
39
+
29
40
  ## Verify and deliver
30
41
 
31
42
  Read [delivery guidance](visualizations/delivery.md) for inline rendering, portable export, and the Claude UX brief.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@filipgutica/design-system",
3
- "version": "1.0.27",
3
+ "version": "1.0.28",
4
4
  "description": "Filip's design language, tokens, and component catalogue for any framework",
5
5
  "type": "module",
6
6
  "sideEffects": [