@ponchia/ui 0.6.6 → 0.6.8
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/CHANGELOG.md +175 -6
- package/README.md +38 -25
- package/annotations/index.d.ts.map +1 -1
- package/annotations/index.js +21 -3
- package/behaviors/carousel.d.ts.map +1 -1
- package/behaviors/carousel.js +91 -32
- package/behaviors/combobox.d.ts.map +1 -1
- package/behaviors/combobox.js +117 -43
- package/behaviors/command.d.ts.map +1 -1
- package/behaviors/command.js +74 -14
- package/behaviors/connectors.d.ts.map +1 -1
- package/behaviors/connectors.js +92 -9
- package/behaviors/crosshair.d.ts.map +1 -1
- package/behaviors/crosshair.js +47 -1
- package/behaviors/dialog.d.ts.map +1 -1
- package/behaviors/dialog.js +37 -16
- package/behaviors/disclosure.d.ts.map +1 -1
- package/behaviors/disclosure.js +33 -3
- package/behaviors/dismissible.d.ts.map +1 -1
- package/behaviors/dismissible.js +3 -2
- package/behaviors/forms.d.ts.map +1 -1
- package/behaviors/forms.js +78 -5
- package/behaviors/glyph.d.ts.map +1 -1
- package/behaviors/glyph.js +17 -2
- package/behaviors/index.d.ts +2 -0
- package/behaviors/index.d.ts.map +1 -1
- package/behaviors/index.js +2 -0
- package/behaviors/inert.js +3 -2
- package/behaviors/internal.d.ts +2 -1
- package/behaviors/internal.d.ts.map +1 -1
- package/behaviors/internal.js +25 -4
- package/behaviors/legend.d.ts +0 -5
- package/behaviors/legend.d.ts.map +1 -1
- package/behaviors/legend.js +78 -14
- package/behaviors/menu.d.ts.map +1 -1
- package/behaviors/menu.js +13 -8
- package/behaviors/modal.d.ts.map +1 -1
- package/behaviors/modal.js +77 -19
- package/behaviors/popover.d.ts +4 -3
- package/behaviors/popover.d.ts.map +1 -1
- package/behaviors/popover.js +89 -9
- package/behaviors/sources.d.ts.map +1 -1
- package/behaviors/sources.js +14 -2
- package/behaviors/splitter.d.ts +26 -0
- package/behaviors/splitter.d.ts.map +1 -0
- package/behaviors/splitter.js +239 -0
- package/behaviors/spotlight.d.ts.map +1 -1
- package/behaviors/spotlight.js +28 -2
- package/behaviors/table.d.ts.map +1 -1
- package/behaviors/table.js +105 -13
- package/behaviors/tabs.d.ts.map +1 -1
- package/behaviors/tabs.js +82 -18
- package/behaviors/theme.d.ts.map +1 -1
- package/behaviors/theme.js +26 -6
- package/classes/classes.json +230 -4
- package/classes/index.d.ts +64 -3
- package/classes/index.js +56 -2
- package/classes/vscode.css-custom-data.json +1 -1
- package/connectors/index.d.ts +39 -6
- package/connectors/index.d.ts.map +1 -1
- package/connectors/index.js +67 -9
- package/css/analytical.css +3 -1
- package/css/annotations.css +12 -0
- package/css/app.css +4 -4
- package/css/clamp.css +92 -0
- package/css/crosshair.css +27 -2
- package/css/feedback.css +2 -30
- package/css/figure.css +102 -0
- package/css/highlights.css +50 -0
- package/css/interval.css +90 -0
- package/css/navigation.css +12 -0
- package/css/primitives.css +2 -3
- package/css/report-kit.css +38 -0
- package/css/report.css +23 -4
- package/css/sidenote.css +12 -2
- package/css/site.css +2 -1
- package/css/sources.css +5 -0
- package/css/state.css +120 -1
- package/css/table.css +4 -0
- package/css/tokens.css +25 -9
- package/css/workbench.css +101 -8
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -1
- package/dist/css/annotations.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/clamp.css +1 -0
- package/dist/css/crosshair.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/figure.css +1 -0
- package/dist/css/highlights.css +1 -0
- package/dist/css/interval.css +1 -0
- package/dist/css/navigation.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -0
- package/dist/css/report.css +1 -1
- package/dist/css/sidenote.css +1 -1
- package/dist/css/site.css +1 -1
- package/dist/css/sources.css +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0001-color-system.md +3 -2
- package/docs/adr/0002-scope-and-2026-baseline.md +1 -1
- package/docs/annotations.md +12 -1
- package/docs/architecture.md +105 -48
- package/docs/clamp.md +49 -0
- package/docs/command.md +4 -1
- package/docs/connectors.md +16 -0
- package/docs/contrast.md +34 -24
- package/docs/crosshair.md +1 -1
- package/docs/d2.md +37 -0
- package/docs/dots.md +4 -1
- package/docs/figure.md +71 -0
- package/docs/frontier-primitives.md +25 -24
- package/docs/glyphs.md +11 -0
- package/docs/highlights.md +52 -0
- package/docs/interop/tailwind.md +148 -0
- package/docs/interval.md +55 -0
- package/docs/legends.md +3 -2
- package/docs/mermaid.md +6 -0
- package/docs/migrations/0.2-to-0.3.md +80 -0
- package/docs/migrations/0.3-to-0.4.md +48 -0
- package/docs/migrations/0.4-to-0.5.md +96 -0
- package/docs/migrations/0.5-to-0.6.md +82 -0
- package/docs/package-contract.md +44 -6
- package/docs/reference.md +78 -5
- package/docs/reporting.md +126 -60
- package/docs/sidenote.md +7 -1
- package/docs/sources.md +1 -1
- package/docs/stability.md +23 -5
- package/docs/state.md +67 -10
- package/docs/theming.md +12 -4
- package/docs/usage.md +47 -13
- package/docs/vega.md +4 -4
- package/docs/workbench.md +59 -18
- package/llms.txt +89 -16
- package/package.json +82 -6
- package/qwik/index.d.ts +1 -0
- package/qwik/index.d.ts.map +1 -1
- package/qwik/index.js +26 -21
- package/react/index.d.ts +1 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +4 -1
- package/schemas/report-claims.v1.schema.json +137 -0
- package/solid/index.d.ts +2 -0
- package/solid/index.d.ts.map +1 -1
- package/solid/index.js +3 -0
- package/svelte/index.d.ts +114 -0
- package/svelte/index.d.ts.map +1 -0
- package/svelte/index.js +193 -0
- package/tailwind.css +87 -0
- package/tokens/figma.variables.json +2241 -0
- package/tokens/index.js +1 -1
- package/tokens/index.json +2 -2
- package/tokens/resolved.json +3 -3
- package/tokens/tokens.dtcg.json +1 -1
- package/vue/index.d.ts +116 -0
- package/vue/index.d.ts.map +1 -0
- package/vue/index.js +228 -0
package/docs/reporting.md
CHANGED
|
@@ -1,12 +1,19 @@
|
|
|
1
1
|
# Static reports
|
|
2
2
|
|
|
3
3
|
`@ponchia/ui` can dress static, LLM-authored HTML reports without a component
|
|
4
|
-
runtime. Load the normal bundle, then opt in to the report
|
|
5
|
-
|
|
4
|
+
runtime. Load the normal bundle, then either opt in to the complete report kit
|
|
5
|
+
or import only the leaves a narrow report actually uses.
|
|
6
6
|
|
|
7
7
|
In a bundled app, package specifiers are fine because Vite or another bundler
|
|
8
8
|
rewrites them:
|
|
9
9
|
|
|
10
|
+
```css
|
|
11
|
+
@import '@ponchia/ui';
|
|
12
|
+
@import '@ponchia/ui/css/report-kit.css';
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
For tighter payload control, import leaves one by one:
|
|
16
|
+
|
|
10
17
|
```css
|
|
11
18
|
@import '@ponchia/ui';
|
|
12
19
|
@import '@ponchia/ui/css/report.css';
|
|
@@ -16,9 +23,11 @@ rewrites them:
|
|
|
16
23
|
```
|
|
17
24
|
|
|
18
25
|
**`dist/bronto.css` is the standard component set only — it does NOT contain
|
|
19
|
-
the report, chart, annotation, or
|
|
20
|
-
|
|
21
|
-
|
|
26
|
+
the report, chart, annotation, source, trust, or code/diff layers.**
|
|
27
|
+
`report-kit.css` is the one-file opt-in path for complete static reports; the
|
|
28
|
+
individual leaves remain available under `dist/css/` when a report uses only a
|
|
29
|
+
small subset. Forgetting the opt-in CSS is the most common way an LLM-emitted
|
|
30
|
+
report renders unstyled.
|
|
22
31
|
|
|
23
32
|
For standalone browser HTML, use real stylesheet URLs. Package specifiers like
|
|
24
33
|
`@ponchia/ui/css/report.css` do not resolve in a saved `.html` file — and note
|
|
@@ -27,6 +36,14 @@ the path is `dist/css/`, the built leaf, not the source `css/`:
|
|
|
27
36
|
```html
|
|
28
37
|
<!-- installed locally -->
|
|
29
38
|
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/bronto.css" />
|
|
39
|
+
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/report-kit.css" />
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Or, if you are intentionally keeping a report minimal, link only the leaves it
|
|
43
|
+
uses:
|
|
44
|
+
|
|
45
|
+
```html
|
|
46
|
+
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/bronto.css" />
|
|
30
47
|
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/report.css" />
|
|
31
48
|
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/dataviz.css" />
|
|
32
49
|
<link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/annotations.css" />
|
|
@@ -37,11 +54,18 @@ No install? Link the same files from a CDN. Pin the version — pre-1.0, breakin
|
|
|
37
54
|
changes ship in the minor (see [stability.md](./stability.md)):
|
|
38
55
|
|
|
39
56
|
```html
|
|
40
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
41
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
57
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/bronto.css" />
|
|
58
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/report-kit.css" />
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
Leaf-by-leaf CDN imports use the same `dist/css/` paths:
|
|
62
|
+
|
|
63
|
+
```html
|
|
64
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/bronto.css" />
|
|
65
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/report.css" />
|
|
66
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/dataviz.css" />
|
|
67
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/annotations.css" />
|
|
68
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/legend.css" />
|
|
45
69
|
```
|
|
46
70
|
|
|
47
71
|
The CDN serves the package's own `fonts/` next to the CSS, so font URLs resolve
|
|
@@ -60,21 +84,34 @@ sanitize that content before rendering it and do not initialize
|
|
|
60
84
|
evidence). The _content_ inside those sections is where the rest of the
|
|
61
85
|
analytical layer earns its place. Each one is an opt-in import that stays out of
|
|
62
86
|
the default bundle — add the leaves a given report actually needs.
|
|
63
|
-
`@ponchia/ui/css/analytical.css` is a convenience roll-up of the **
|
|
64
|
-
figure-layer leaves only** (annotations, legends, marks,
|
|
65
|
-
crosshair, selection) — sources, generated,
|
|
66
|
-
|
|
87
|
+
`@ponchia/ui/css/analytical.css` is a convenience roll-up of the **nine
|
|
88
|
+
figure/evidence-layer leaves only** (figure, annotations, legends, marks,
|
|
89
|
+
connectors, spotlight, crosshair, selection, highlights) — sources, generated,
|
|
90
|
+
state, interval, clamp, workbench, command, and the prose/evidence leaves below
|
|
91
|
+
are NOT in it and must be linked individually. Reach for:
|
|
67
92
|
|
|
68
93
|
| Layer | Import | Reach for it when… |
|
|
69
94
|
| --- | --- | --- |
|
|
95
|
+
| **Figure stage** (`.ui-figure*`) | `css/figure.css` | A chart, diagram, screenshot, or annotated SVG needs a stable media box, overlay slot, right-side key, and fallback-data slot. It composes with `ui-report__figure`; it does not render charts or own scales. See [figure.md](./figure.md). |
|
|
70
96
|
| **Marks** (`.ui-mark`, `.ui-bracket-note`) | `css/marks.css` | You want to emphasise a phrase _in prose_ — a highlight on the finding, an underline on a risk, or a bracket around an evidence/caveat passage. The inline counterpart to annotations. See [marks.md](./marks.md). |
|
|
71
97
|
| **Sources / provenance** (`.ui-citation`, `.ui-source-card`, `.ui-source-list`, `.ui-provenance`) | `css/sources.css` | The report makes claims a reader will question — "where did this come from?". A CSS-only trust layer whose cross-cutting state modifier (`.ui-src--verified`, plus reviewed / generated / unverified / stale / conflict) sets a rationed tone, always paired with a written label, never colour alone. See [sources.md](./sources.md). |
|
|
98
|
+
| **Interval** (`.ui-interval*`) | `css/interval.css` | Evidence is a low/high estimate, confidence window, target band, or uncertain reading. The host normalises `--lo`, `--hi`, and optional `--v`; Bronto only paints the range and point. See [interval.md](./interval.md). |
|
|
99
|
+
| **Clamp** (`.ui-clamp*`) | `css/clamp.css` | A source excerpt, claim basis, or caveat should scan as a bounded text block but remain reachable through explicit "Show more" / "Show less" labels and print expansion. See [clamp.md](./clamp.md). |
|
|
100
|
+
| **Highlights** (`.ui-highlights`) | `css/highlights.css` | The host registers CSS Custom Highlight API ranges for cited evidence, search hits, or the current match without wrapping DOM text nodes. See [highlights.md](./highlights.md). |
|
|
101
|
+
| **Chart palette** (`--chart-*`) | `css/dataviz.css` | A figure needs categorical, sequential, or diverging chart colours. The palette is opt-in, CVD-gated, and never UI chrome. See [theming.md](./theming.md#data-viz-palette). |
|
|
72
102
|
| **Annotations** (`.ui-annotation*`) | `css/annotations.css` | A figure needs an explicit callout — a peak, a limit, a watched region — or a small decorative margin mark. SVG only. See [annotations.md](./annotations.md) and the [off-chart + scaling notes](./annotations.md#using-annotations-off-chart) before you size one. |
|
|
103
|
+
| **Connectors** (`.ui-connector*`) | `css/connectors.css` | A note, card, or region needs a leader line to another DOM element. Bronto supplies overlay styling plus pure SVG path geometry; the host owns layout and meaning. See [connectors.md](./connectors.md). |
|
|
73
104
|
| **Legends / data keys** (`.ui-legend*`) | `css/legend.css` | A chart figure needs a colour key. WCAG 1.4.1 by construction. See [legends.md](./legends.md). |
|
|
105
|
+
| **Spotlight** (`.ui-spotlight*`, `.ui-tour-note*`) | `css/spotlight.css` | A screen report or guided workflow needs a visual focus cutout and callout note. It is not a tour engine; the host owns step order, persistence, and focus movement. See [spotlight.md](./spotlight.md). |
|
|
106
|
+
| **Crosshair / readout** (`.ui-crosshair*`, `.ui-readout`) | `css/crosshair.css` | A plot needs pointer-tracking ruler lines and a readout chip. Bronto reports pixels/fractions; the host maps those to data values with its own scales. See [crosshair.md](./crosshair.md). |
|
|
107
|
+
| **Selection emphasis** (`.ui-sel*`) | `css/selection.css` | Host-owned brush, filter, or selection logic needs a shared visual state vocabulary for selected / excluded / candidate items. See [selection.md](./selection.md). |
|
|
74
108
|
| **Mermaid theme** (`@ponchia/ui/mermaid`) | _(JS/JSON, no CSS)_ | The report embeds a [Mermaid](https://mermaid.js.org) diagram (flowchart, sequence, pie…) and you want it on-brand instead of generic. A resolved `base` theme projected from the same tokens as `charts.json`; annotate the rendered SVG with the annotation layer. See [mermaid.md](./mermaid.md). |
|
|
75
109
|
| **D2 theme** (`@ponchia/ui/d2`) | _(JS/JSON, no CSS)_ | The report embeds a [D2](https://d2lang.com) diagram and you want it on-brand. Resolved theme-override slots (monochrome base + one rationed accent) projected from the same tokens; annotate the rendered SVG. See [d2.md](./d2.md). |
|
|
110
|
+
| **Vega theme** (`@ponchia/ui/vega`) | _(JS/JSON, no CSS)_ | The report embeds a live or generated Vega-Lite chart and you want token-matched axes, text, legends, and ramps. See [vega.md](./vega.md). |
|
|
76
111
|
| **Generated-content trust** (`.ui-generated`, `.ui-origin-label`, `.ui-reasoning`, `.ui-tool-log`) | `css/generated.css` | The report (or a section of it) is AI/system-authored and should _say so_ — an origin label plus quiet, collapsible reasoning / tool-call logs. Pairs with the sources layer. See [generated.md](./generated.md). |
|
|
77
112
|
| **Lifecycle / system state** (`.ui-state`, `.ui-syncbar`) | `css/state.css` | A status report needs to show the state a thing is in — saving / queued / stale / conflict / reviewed — as a labelled object, not a bare coloured dot. See [state.md](./state.md). |
|
|
113
|
+
| **Workbench surfaces** (`.ui-inspector`, `.ui-property`, `.ui-selectionbar`, `.ui-splitter`) | `css/workbench.css` | A screen report or analytical tool needs an inspector, property rows, selected-item actions, or resizable panes. Not in `report-kit.css`; pair splitters with `initSplitter`. See [workbench.md](./workbench.md). |
|
|
114
|
+
| **Command palette** (`.ui-command*`) | `css/command.css` | A screen report or analytical tool needs a searchable command shell. Not in `report-kit.css`; pair with `initCommand` and a host-owned opener/action registry. See [command.md](./command.md). |
|
|
78
115
|
| **Spark** (`.ui-spark*`) | `css/spark.css` | A trend belongs _inside a sentence or table cell_ — a word-sized inline microchart, the inline counterpart to `ui-delta`/`ui-num`/`ui-stat`. See [spark.md](./spark.md). |
|
|
79
116
|
| **Bullet graph** (`.ui-bullet*`) | `css/bullet.css` | A measure needs "inside budget? vs target?" at a glance — the canonical SLO / error-budget figure that `ui-meter` structurally cannot express. See [bullet.md](./bullet.md). |
|
|
80
117
|
| **Diff** (`.ui-diff*`) | `css/diff.css` | The report shows what _changed_ — code review, changelogs, version history, config diffs. Marks call out a sentence; diff calls out a line. See [diff.md](./diff.md). |
|
|
@@ -88,8 +125,11 @@ leaves below are NOT in it and must be linked individually. Reach for:
|
|
|
88
125
|
|
|
89
126
|
These compose with the report-native primitives already called out in
|
|
90
127
|
[Composition rules](#composition-rules): `ui-statgrid`, `ui-alert`, `ui-table`,
|
|
91
|
-
`ui-timeline`, `ui-meter`, and `ui-num`.
|
|
92
|
-
they are
|
|
128
|
+
`ui-timeline`, `ui-meter`, and `ui-num`. The static leaves do not require
|
|
129
|
+
behavior JS, so they are safe in the PDF-first report path. `workbench.css` and
|
|
130
|
+
`command.css` are deliberately screen-tool leaves: they stay out of
|
|
131
|
+
`report-kit.css` and only become interactive when the host imports the matching
|
|
132
|
+
behavior JS.
|
|
93
133
|
|
|
94
134
|
## Canonical skeleton
|
|
95
135
|
|
|
@@ -200,7 +240,8 @@ fetching, and claim wording.
|
|
|
200
240
|
audit reports. Add `ui-report__action-title`, `__action-owner`,
|
|
201
241
|
`__action-due`, `__action-priority`, `__action-criteria`, and
|
|
202
242
|
`__action-source` when the action is a real workflow item. The status text
|
|
203
|
-
must be written out; do not rely on tone alone.
|
|
243
|
+
must be written out; do not rely on tone alone. The status occupies the side
|
|
244
|
+
rail on wide screens; the other action fields stay in the main text column.
|
|
204
245
|
|
|
205
246
|
Decision brief pattern:
|
|
206
247
|
|
|
@@ -348,11 +389,11 @@ Evidence ledger pattern:
|
|
|
348
389
|
deltas — they are not free-standing utilities.) Keep raw Markdown tables
|
|
349
390
|
inside `ui-prose`; use `.ui-table` for curated evidence tables. If a
|
|
350
391
|
`ui-report__evidence` block contains only a `ui-table-wrap`, the report layer
|
|
351
|
-
removes the inner frame so evidence tables do not look double-boxed.
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
preserving words.
|
|
392
|
+
removes the inner frame so evidence tables do not look double-boxed. Report
|
|
393
|
+
tables preserve words by default so identifiers and headings do not split into
|
|
394
|
+
unreadable fragments in PDF. Add `ui-table--break-anywhere` only for
|
|
395
|
+
machine-token tables where fixed, shrink-to-fit columns and forced wrapping
|
|
396
|
+
matter more than preserving words.
|
|
356
397
|
- Every `<figure>` should include a `figcaption` using `ui-report__caption`.
|
|
357
398
|
- Do not use raw color values. Theme with `--accent`; use status tones for
|
|
358
399
|
status; use chart tokens only in chart figures.
|
|
@@ -473,12 +514,14 @@ from one of two routes:
|
|
|
473
514
|
painting marks from the `--chart-N` palette so the figure prints exactly and
|
|
474
515
|
carries no runtime.
|
|
475
516
|
|
|
476
|
-
Whichever route, the figure frame is the same: wrap it in
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
colour-
|
|
517
|
+
Whichever route, the figure frame is the same: wrap it in
|
|
518
|
+
`ui-report__figure ui-figure`, caption it with
|
|
519
|
+
`ui-report__caption ui-figure__caption`, put the rendered chart in
|
|
520
|
+
`ui-figure__stage`, give it the standalone, portable `.ui-legend` data key
|
|
521
|
+
(`@ponchia/ui/css/legend.css` — see [legends.md](./legends.md)), and pair every
|
|
522
|
+
colour with a direct label, a pattern, **and** a fallback `ui-table` in
|
|
523
|
+
`ui-figure__data` so the figure survives mono print and colour-vision
|
|
524
|
+
deficiency.
|
|
482
525
|
|
|
483
526
|
A Vega-Lite figure. The live mount is **`ui-screen-only`** and the fallback
|
|
484
527
|
`ui-table` carries the data into print — a live chart bakes the on-screen theme
|
|
@@ -486,14 +529,16 @@ into its SVG/canvas at render time, so printing it would emit a dark-baked chart
|
|
|
486
529
|
on white paper. Print the table; keep the chart for screen:
|
|
487
530
|
|
|
488
531
|
```html
|
|
489
|
-
<figure class="ui-report__figure" role="group" aria-labelledby="chart-title">
|
|
490
|
-
<figcaption id="chart-title" class="ui-report__caption">
|
|
532
|
+
<figure class="ui-report__figure ui-figure" role="group" aria-labelledby="chart-title">
|
|
533
|
+
<figcaption id="chart-title" class="ui-report__caption ui-figure__caption">
|
|
491
534
|
Fig 1 - Weekly focus split
|
|
492
535
|
</figcaption>
|
|
493
|
-
<div
|
|
494
|
-
<
|
|
536
|
+
<div class="ui-figure__stage ui-screen-only" style="--figure-min-block: 240px">
|
|
537
|
+
<div id="focus-chart" class="ui-figure__media">
|
|
538
|
+
<noscript>Chart needs JavaScript — the data is in the table below.</noscript>
|
|
539
|
+
</div>
|
|
495
540
|
</div>
|
|
496
|
-
<div class="ui-table-wrap">
|
|
541
|
+
<div class="ui-figure__data ui-table-wrap">
|
|
497
542
|
<table class="ui-table ui-table--dense">
|
|
498
543
|
<caption>Chart source data</caption>
|
|
499
544
|
<thead>
|
|
@@ -543,35 +588,42 @@ A frozen, token-themed inline `<svg>` for the same data — no runtime, prints
|
|
|
543
588
|
exactly, with a `.ui-legend` key and the fallback table:
|
|
544
589
|
|
|
545
590
|
```html
|
|
546
|
-
<figure class="ui-report__figure ui-print-exact" role="group" aria-labelledby="chart-title">
|
|
547
|
-
<figcaption id="chart-title" class="ui-report__caption">
|
|
591
|
+
<figure class="ui-report__figure ui-figure ui-print-exact" role="group" aria-labelledby="chart-title">
|
|
592
|
+
<figcaption id="chart-title" class="ui-report__caption ui-figure__caption">
|
|
548
593
|
Fig 1 - Weekly focus split
|
|
549
594
|
</figcaption>
|
|
550
|
-
<
|
|
551
|
-
<
|
|
552
|
-
<
|
|
553
|
-
|
|
554
|
-
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
564
|
-
|
|
565
|
-
|
|
566
|
-
|
|
567
|
-
|
|
568
|
-
|
|
569
|
-
|
|
570
|
-
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
595
|
+
<div class="ui-figure__body ui-figure__body--key-right">
|
|
596
|
+
<div class="ui-figure__stage">
|
|
597
|
+
<svg class="ui-figure__media" viewBox="0 0 360 160" role="img" aria-labelledby="focus-svg-title focus-svg-desc">
|
|
598
|
+
<title id="focus-svg-title">Weekly focus split</title>
|
|
599
|
+
<desc id="focus-svg-desc">Research is 18 hours and delivery is 11 hours.</desc>
|
|
600
|
+
<line x1="36" y1="132" x2="324" y2="132" stroke="var(--line)" />
|
|
601
|
+
<rect x="72" y="42" width="96" height="90" fill="var(--chart-1)" />
|
|
602
|
+
<rect x="200" y="77" width="96" height="55" fill="var(--chart-2)" />
|
|
603
|
+
</svg>
|
|
604
|
+
</div>
|
|
605
|
+
<div class="ui-figure__key">
|
|
606
|
+
<ul class="ui-legend" aria-label="Series">
|
|
607
|
+
<li class="ui-legend__item">
|
|
608
|
+
<span
|
|
609
|
+
class="ui-legend__swatch"
|
|
610
|
+
style="--chart-color: var(--chart-1); --chart-pattern: var(--chart-pattern-1)"
|
|
611
|
+
aria-hidden="true"
|
|
612
|
+
></span>
|
|
613
|
+
<span class="ui-legend__label">Research</span>
|
|
614
|
+
</li>
|
|
615
|
+
<li class="ui-legend__item">
|
|
616
|
+
<span
|
|
617
|
+
class="ui-legend__swatch"
|
|
618
|
+
style="--chart-color: var(--chart-2); --chart-pattern: var(--chart-pattern-2)"
|
|
619
|
+
aria-hidden="true"
|
|
620
|
+
></span>
|
|
621
|
+
<span class="ui-legend__label">Delivery</span>
|
|
622
|
+
</li>
|
|
623
|
+
</ul>
|
|
624
|
+
</div>
|
|
625
|
+
</div>
|
|
626
|
+
<div class="ui-figure__data ui-table-wrap">
|
|
575
627
|
<table class="ui-table ui-table--dense">
|
|
576
628
|
<caption>Chart source data</caption>
|
|
577
629
|
<thead>
|
|
@@ -820,8 +872,14 @@ important reports. The HTML stays the readable artifact; the sidecar lets a
|
|
|
820
872
|
checker prove that claim IDs, source IDs, trust states, retrieval dates and
|
|
821
873
|
high-risk decisions still line up after editing.
|
|
822
874
|
|
|
875
|
+
The declarative contract ships as
|
|
876
|
+
`@ponchia/ui/schemas/report-claims.v1.schema.json` for validators in any
|
|
877
|
+
language. It is a schema only — `@ponchia/ui` does not ship a report generator
|
|
878
|
+
or validation runtime.
|
|
879
|
+
|
|
823
880
|
```json
|
|
824
881
|
{
|
|
882
|
+
"$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/schemas/report-claims.v1.schema.json",
|
|
825
883
|
"schemaVersion": "bronto-report-claims.v1",
|
|
826
884
|
"report": { "title": "Decision readiness", "type": "decision" },
|
|
827
885
|
"claims": [
|
|
@@ -843,6 +901,14 @@ high-risk decisions still line up after editing.
|
|
|
843
901
|
"retrievedAt": "2026-06-08T10:00:00Z",
|
|
844
902
|
"supports": ["claim-primary"]
|
|
845
903
|
}
|
|
904
|
+
],
|
|
905
|
+
"relations": [
|
|
906
|
+
{
|
|
907
|
+
"claimId": "claim-primary",
|
|
908
|
+
"sourceId": "source-primary",
|
|
909
|
+
"kind": "supports",
|
|
910
|
+
"note": "The metrics export supports the operational-risk conclusion."
|
|
911
|
+
}
|
|
846
912
|
]
|
|
847
913
|
}
|
|
848
914
|
```
|
package/docs/sidenote.md
CHANGED
|
@@ -23,7 +23,13 @@ tradition — the channel for evidence, caveats, and provenance asides that belo
|
|
|
23
23
|
(or a section) so the count starts at 1 there.
|
|
24
24
|
2. **The margin gutter.** At the same breakpoint, give that container
|
|
25
25
|
`padding-inline-end: calc(var(--sidenote-width) + var(--sidenote-gap))` so the
|
|
26
|
-
floated note has room.
|
|
26
|
+
floated note has room. The two knobs are **root-scoped** (defaults `12rem` /
|
|
27
|
+
`2rem`) precisely so this calc resolves on any container — and overriding
|
|
28
|
+
either one on the container re-sizes the notes and the gutter together.
|
|
29
|
+
**This is load-bearing, not cosmetic:** without the gutter the floated note
|
|
30
|
+
spills past the page edge — a horizontal-overflow defect any visual QA pass
|
|
31
|
+
will flag. In a constrained shell that cannot spare a gutter, use the
|
|
32
|
+
in-flow `ui-sidenote` (which collapses inline) rather than `ui-marginnote`.
|
|
27
33
|
|
|
28
34
|
```html
|
|
29
35
|
<article style="counter-reset: ui-sidenote">
|
package/docs/sources.md
CHANGED
|
@@ -44,7 +44,7 @@ host and add a tone. It draws a small pill with a leading trust dot:
|
|
|
44
44
|
|
|
45
45
|
```html
|
|
46
46
|
<span class="ui-src ui-src--verified">Verified</span>
|
|
47
|
-
<span class="ui-src ui-src--generated">
|
|
47
|
+
<span class="ui-src ui-src--generated">Machine-generated</span>
|
|
48
48
|
<span class="ui-src ui-src--stale">Stale · 14d</span>
|
|
49
49
|
```
|
|
50
50
|
|
package/docs/stability.md
CHANGED
|
@@ -16,20 +16,22 @@ shipped `files` entry, and the generated artifact provenance map — see
|
|
|
16
16
|
| CSS package root (`@ponchia/ui`) | Stable | CSS-only entrypoint. CSS side-effect imports are supported in CSS-aware bundlers; Node/runtime JS root imports are not. |
|
|
17
17
|
| JS module format | Stable | JS subpaths are ESM-only. CommonJS consumers use dynamic `import()`. |
|
|
18
18
|
| CSS class names (`.ui-*`) | Stable | Names and documented modifier semantics are public. Internal selector structure and leaf-file boundaries may change. |
|
|
19
|
-
| Class recipes (`@ponchia/ui/classes`) | Stable | Exported `cls`, `ui`, `cx`, recipe names, and option unions are public. |
|
|
19
|
+
| Class recipes (`@ponchia/ui/classes`) | Stable | Exported `cls`, `ui`, `cx`, `attrs`, recipe names, ARIA attribute helper names, and option unions are public. |
|
|
20
20
|
| Class vocabulary as data (`@ponchia/ui/classes.json`) | Stable additive | The JSON shape (`groups`/`classes`/`states`/`customProperties`) and its entries are public — for validating markup from a non-JS/non-TS host. Generated from `cls` (the `classes` list cannot drift from the CSS); `states`/`customProperties` are gated against the stylesheet. New classes/hooks are additive. |
|
|
21
21
|
| Design tokens | Stable names/roles | Token names and documented roles are public. Exact values and generated colour math outputs may change for visual tuning before 1.0. |
|
|
22
22
|
| `--accent-1..6` | Stable names/roles | A subtle-to-bold accent ramp derived from `--accent`. Exact resolved values are visual tuning; algorithm changes require release-note visibility and resolver/browser checks. |
|
|
23
23
|
| Tokens as data (`tokens.json`, `tokens.dtcg.json`, `tokens/resolved.json`) | Stable additive | The JSON shapes are public for non-CSS/non-JS consumers. `resolved.json` exposes `light`/`dark` (resolved colours) and `scale` (resolved non-colour scales). Token names/roles are stable; exact resolved values are visual tuning (pin `~0.x`). |
|
|
24
|
+
| Schemas (`schemas/*.schema.json`) | Stable additive | Declarative JSON Schema contracts for package-adjacent tooling data. Existing schema files and enum values are public within a compatible minor; new optional properties and new schema files are additive. No validator runtime ships. |
|
|
24
25
|
| Theme axes | Mixed | `data-theme` (light/dark) is the **contractual** base. `data-surface="oled"`, `data-density`, and `data-contrast` are **convenience presets** — best-effort visual variants, **not** part of the stability contract; their presence and exact values may change for tuning. Computed-style smoke tests guard that the presets apply to their intended token families. |
|
|
25
26
|
| Behavior attributes (`data-bronto-*`) | Stable | Attribute names and documented markup relationships are public. Behavior internals are not. |
|
|
26
27
|
| Behavior functions (`@ponchia/ui/behaviors`) | Stable | Exported function names, option names, custom events, SSR no-op behavior, idempotency, and cleanup-returning contract are public. |
|
|
27
28
|
| Glyph registry/renderers (`@ponchia/ui/glyphs`) | Stable additive | Existing glyph names stay valid. New glyphs are additive. Renderer option names and accessibility defaults are public. |
|
|
28
29
|
| `.ui-icon` mask renderer | Stable | Class name, `--icon-size`, currentColor inheritance, and `--icon-mask` contract are public. The internal data URL encoding is not. |
|
|
29
|
-
|
|
|
30
|
+
| Framework lifecycle adapters (`react`/`solid`/`qwik`/`svelte`/`vue`) | Stable thin adapters | Hook/action/directive names, optional peer behavior where applicable, root ref/signal/resolver support, and cleanup lifecycle are public. They remain wrappers over vanilla behaviors, not component APIs. |
|
|
30
31
|
| Skins (`@ponchia/ui/skins`, `css/skins.css`) | Stable additive | Existing skin names stay valid. New skins are additive. Skins are root-level choices. |
|
|
31
32
|
| Charts (`@ponchia/ui/charts`, `charts.json`, `css/dataviz.css`) | Stable additive | Token names, JSON shape, and 8 categorical slots are public. Exact palette values may tune if gates and release notes justify it. |
|
|
32
33
|
| Reports (`css/report.css`, `.ui-report*`, print utilities) | Stable additive | Report class names, BEM part names, and print utility names are public. Report CSS is opt-in and not imported by the default bundle. The data key now lives in the standalone Legends layer (below), not `css/report.css`; charting is via the Vega theme target (`@ponchia/ui/vega`, see [vega](./vega.md)) or a token-themed inline SVG, not a shipped renderer. |
|
|
34
|
+
| Report kit roll-up (`css/report-kit.css`) | Stable additive | A convenience `@import` of the complete static-report vocabulary. The set of leaves it bundles may grow additively; each leaf also stays individually exported. Opt-in, not in the default bundle. |
|
|
33
35
|
| Annotations (`@ponchia/ui/annotations`, `css/annotations.css`, `.ui-annotation*`) | Stable additive | SVG annotation class names, recipe option names, and helper function names are public. Helper internals and exact path-control heuristics may tune before 1.0. |
|
|
34
36
|
| Legends (`css/legend.css`, `.ui-legend*`, `@ponchia/ui/behaviors` `initLegend`) | Stable additive | Legend class names, recipe option names, and the `bronto:legend:toggle` event contract (`aria-pressed="true"` ⇒ shown) are public. Opt-in, not in the default bundle; swatch colours are gated to the `--chart-*` palette. |
|
|
35
37
|
| Marks (`css/marks.css`, `.ui-mark*`, `.ui-bracket-note*`) | Stable additive | Text-mark and bracket-note class names and recipe option names are public. Opt-in, not in the default bundle. Uses semantic tones only. |
|
|
@@ -37,17 +39,33 @@ shipped `files` entry, and the generated artifact provenance map — see
|
|
|
37
39
|
| Spotlight (`css/spotlight.css`, `.ui-spotlight*`, `.ui-tour-note*`, `initSpotlight`) | Stable additive | Spotlight/tour-note class names, the `--spot-*` custom-property contract, and the `data-bronto-spotlight`/`data-target` attributes are public. Opt-in, not in the default bundle. Not a tour engine. |
|
|
38
40
|
| Crosshair (`css/crosshair.css`, `.ui-crosshair*`, `.ui-readout`, `initCrosshair`) | Stable additive | Crosshair/readout class names, the `--crosshair-x/y` properties, the `data-bronto-crosshair` attribute, and the `bronto:crosshair:move`/`:leave` event contract are public. Opt-in. Reports pointer position only — no data mapping. |
|
|
39
41
|
| Selection states (`css/selection.css`, `.ui-sel*`) | Stable additive | The `.ui-sel`/`--on`/`--off`/`--maybe` emphasis classes and recipe options are public. Opt-in, cross-cutting. The host owns selection logic; Bronto only styles the states. |
|
|
40
|
-
| Analytical roll-up (`css/analytical.css`) | Stable additive | A convenience `@import` of the
|
|
42
|
+
| Analytical roll-up (`css/analytical.css`) | Stable additive | A convenience `@import` of the nine analytical leaves (figure, annotations, legend, marks, connectors, spotlight, crosshair, selection, highlights). The set of leaves it bundles may grow additively; each leaf also stays individually exported. Opt-in, not in the default bundle. |
|
|
41
43
|
| Sources / provenance (`css/sources.css`, `.ui-citation*`, `.ui-source-card*`, `.ui-source-list*`, `.ui-provenance*`, `.ui-src--*`, `initSources`) | Stable additive | Citation/source/provenance class names, the cross-cutting `.ui-src--*` trust-state modifiers (always paired with an author label), the optional `data-bronto-sources` / `data-bronto-source-ref` behavior contract, `bronto:source:focus`, and the `ui.citation`/`ui.source`/`ui.provenance` recipes + `cls.sourceList` are public. Opt-in, not in the default bundle. |
|
|
42
44
|
| Lifecycle state (`css/state.css`, `.ui-state*`, `.ui-syncbar`) | Stable additive | The `.ui-state`/`__label`/`__detail`/`--busy` classes, the canonical lifecycle state modifiers, `.ui-syncbar`, and the `ui.state` recipe are public. Opt-in, not in the default bundle. |
|
|
43
45
|
| Generated / AI-trust (`css/generated.css`, `.ui-generated*`, `.ui-origin-label*`, `.ui-reasoning*`, `.ui-tool-log`, `.ui-tool-call*`) | Stable additive | The generated-content, origin-label (incl. `--ai`), reasoning-trace and tool-log/tool-call class names and the `ui.originLabel` recipe are public. Opt-in, not in the default bundle. Not a chat kit; no confidence widget. |
|
|
44
|
-
| Workbench (`css/workbench.css`, `.ui-inspector*`, `.ui-property*`, `.ui-selectionbar
|
|
45
|
-
| Command palette (`css/command.css`, `.ui-command*`, `initCommand`, `useCommand`) | Stable additive | Command class/part names, the `data-bronto-command` attribute, and the event contract — `bronto:command:select` (`detail: { value, label }`) and `bronto:command:close` — are public, plus the
|
|
46
|
+
| Workbench (`css/workbench.css`, `.ui-splitter*`, `.ui-inspector*`, `.ui-property*`, `.ui-selectionbar*`, `initSplitter`) | Stable additive | Splitter, inspector, property-row and selection-bar class + BEM part names are public (no recipe). `data-bronto-splitter`, `--splitter-pos`, `bronto:splitter:resize`, and the `initSplitter` cleanup contract are public. Opt-in, not in the default bundle. The host owns pane content, persistence, collapse policy, and selection state. |
|
|
47
|
+
| Command palette (`css/command.css`, `.ui-command*`, `initCommand`, `useCommand` / `command` / `vCommand`) | Stable additive | Command class/part names, the `data-bronto-command` attribute, and the event contract — `bronto:command:select` (`detail: { value, label }`) and `bronto:command:close` — are public, plus the framework binding adapters. Bronto filters + navigates (APG combobox/listbox); the host owns the action registry/execution. Opt-in, not in the default bundle, no global hotkey. |
|
|
46
48
|
| Controlled-modal focus trap (`initModal`, `useModal`, `data-bronto-modal`) | Stable additive | For the `.ui-modal.is-open` (non-`<dialog>`) path: the `data-bronto-modal` opt-in marker, the `inert`-based focus trap + focus-return, and the cancelable `bronto:modal:close` (`detail: { reason }`) event are public. The consumer still owns the `is-open` class; the behavior never changes visibility. The native `<dialog>` path (`initDialog`) is the default and gets the trap for free. |
|
|
47
49
|
| Keyboard-shortcut hint (`.ui-shortcut`, `.ui-shortcut__sep`) | Stable additive | Class names for the chord/sequence hint over `.ui-kbd` are public. Ships in the core layer (class-only, no recipe). |
|
|
48
50
|
| Generated docs shipped in npm | Stable paths | `llms.txt` and exported docs paths stay shipped and resolvable within a compatible minor. Markdown/text assets are for reading unless your runtime has a loader. Generated content may change with the source contract. |
|
|
49
51
|
| Demo, examples, tests, scripts | Internal | Useful for learning and verification, but not shipped runtime API unless a path is explicitly exported in `package.json`. |
|
|
50
52
|
|
|
53
|
+
## Deprecation Policy
|
|
54
|
+
|
|
55
|
+
Public surface (`.ui-*` classes, `data-bronto-*` attributes, `cls`/token keys,
|
|
56
|
+
behavior signatures, and exported schema values) is removed on a
|
|
57
|
+
**deprecate-one-minor** cycle:
|
|
58
|
+
|
|
59
|
+
1. **Deprecate** in minor _N_: the surface keeps working unchanged, is marked
|
|
60
|
+
deprecated in `CHANGELOG.md`, and, for renames, gets an entry in
|
|
61
|
+
[`MIGRATIONS.json`](../MIGRATIONS.json).
|
|
62
|
+
2. **Remove** no earlier than minor _N+1_, with a **BREAKING** changelog entry
|
|
63
|
+
and migration note.
|
|
64
|
+
|
|
65
|
+
A token/class/attribute that is provably referenced by no shipped CSS,
|
|
66
|
+
component, behavior, or doc may skip that window and be removed with a BREAKING
|
|
67
|
+
entry plus migration note; there is no working call-site to keep alive.
|
|
68
|
+
|
|
51
69
|
## Trust Boundary
|
|
52
70
|
|
|
53
71
|
Behaviors assume trusted application markup. If a delegated root includes
|
package/docs/state.md
CHANGED
|
@@ -2,9 +2,10 @@
|
|
|
2
2
|
|
|
3
3
|
`@ponchia/ui/css/state.css` is an opt-in vocabulary for the states real apps
|
|
4
4
|
spend their time in — saving, saved, queued, offline, stale, conflicted, locked,
|
|
5
|
-
reviewed
|
|
5
|
+
reviewed, and background work still running after the initiating interaction is
|
|
6
|
+
gone. These are usually improvised per product, so even good apps feel
|
|
6
7
|
inconsistent. This is the canonical set: a labelled state object with a rationed
|
|
7
|
-
tone,
|
|
8
|
+
tone, a page/document sync bar, and a persistent background-job row.
|
|
8
9
|
|
|
9
10
|
```css
|
|
10
11
|
@import '@ponchia/ui';
|
|
@@ -12,10 +13,10 @@ tone, plus a page/document sync bar.
|
|
|
12
13
|
```
|
|
13
14
|
|
|
14
15
|
Bronto ships the visual states and the canonical wording. The host owns the
|
|
15
|
-
state machine, retry policy, persistence, and announcements.
|
|
16
|
-
deserves persistent UI** — a toast is secondary, not the
|
|
17
|
-
second channel; the **label is the state**, so it
|
|
18
|
-
screen readers (WCAG 1.4.1).
|
|
16
|
+
state machine, retry policy, persistence, cancellation, and announcements.
|
|
17
|
+
**Persistent state deserves persistent UI** — a toast is secondary, not the
|
|
18
|
+
answer. The tone is a second channel; the **label is the state**, so it
|
|
19
|
+
survives forced-colors and screen readers (WCAG 1.4.1).
|
|
19
20
|
|
|
20
21
|
## `.ui-state`
|
|
21
22
|
|
|
@@ -68,6 +69,61 @@ the other.
|
|
|
68
69
|
</div>
|
|
69
70
|
```
|
|
70
71
|
|
|
72
|
+
## `.ui-job`
|
|
73
|
+
|
|
74
|
+
A durable row for background jobs, imports, exports, sync runs, and pipelines.
|
|
75
|
+
It is deliberately not a task runner: the host owns polling, retry/cancel
|
|
76
|
+
semantics, queue position, partial failures, and completion messages. Bronto
|
|
77
|
+
paints a persistent status/progress object so long-running work is not hidden in
|
|
78
|
+
a transient toast.
|
|
79
|
+
|
|
80
|
+
```html
|
|
81
|
+
<article
|
|
82
|
+
class="ui-job ui-job--running"
|
|
83
|
+
style="--job-progress: 64%"
|
|
84
|
+
aria-labelledby="job-title"
|
|
85
|
+
>
|
|
86
|
+
<div class="ui-job__head">
|
|
87
|
+
<h3 class="ui-job__title" id="job-title">Importing listings</h3>
|
|
88
|
+
<span class="ui-state ui-state--saving ui-state--busy">
|
|
89
|
+
<span class="ui-state__label">Running</span>
|
|
90
|
+
<span class="ui-state__detail">64%</span>
|
|
91
|
+
</span>
|
|
92
|
+
</div>
|
|
93
|
+
<p class="ui-job__body">124 of 194 records processed. Latest checkpoint saved.</p>
|
|
94
|
+
<div
|
|
95
|
+
class="ui-job__progress"
|
|
96
|
+
role="progressbar"
|
|
97
|
+
aria-label="Import progress"
|
|
98
|
+
aria-valuemin="0"
|
|
99
|
+
aria-valuemax="100"
|
|
100
|
+
aria-valuenow="64"
|
|
101
|
+
>
|
|
102
|
+
<span class="ui-job__bar"></span>
|
|
103
|
+
</div>
|
|
104
|
+
<div class="ui-job__actions">
|
|
105
|
+
<button class="ui-button ui-button--subtle ui-button--sm" type="button">View log</button>
|
|
106
|
+
<button class="ui-button ui-button--ghost ui-button--sm" type="button">Cancel</button>
|
|
107
|
+
</div>
|
|
108
|
+
</article>
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Use the written state as the source of truth:
|
|
112
|
+
|
|
113
|
+
| State | Class | Typical label | Use when… |
|
|
114
|
+
| --- | --- | --- | --- |
|
|
115
|
+
| Queued | `ui-job--queued` | "Queued" | The job is accepted but not running yet. |
|
|
116
|
+
| Running | `ui-job--running` | "Running" / "Syncing" | Work is actively progressing. |
|
|
117
|
+
| Blocked | `ui-job--blocked` | "Blocked" / "Waiting" | Work cannot proceed without another system or user action. |
|
|
118
|
+
| Failed | `ui-job--failed` | "Failed" | The job stopped and needs retry, inspection, or acknowledgement. |
|
|
119
|
+
| Complete | `ui-job--complete` | "Complete" | Work finished and the result is available. |
|
|
120
|
+
|
|
121
|
+
For determinate jobs, set `--job-progress` as a percentage on `.ui-job` and
|
|
122
|
+
put `role="progressbar"` plus `aria-valuenow/min/max` on `.ui-job__progress`.
|
|
123
|
+
For indeterminate jobs, omit the progress block or omit `aria-valuenow`, and
|
|
124
|
+
make the written state clear ("Running", "Waiting for worker", "Retrying").
|
|
125
|
+
Use `ui-job--compact` for dense queues.
|
|
126
|
+
|
|
71
127
|
## Recipe
|
|
72
128
|
|
|
73
129
|
```js
|
|
@@ -75,11 +131,12 @@ import { ui } from '@ponchia/ui/classes';
|
|
|
75
131
|
|
|
76
132
|
ui.state({ state: 'saving', busy: true }); // "ui-state ui-state--saving ui-state--busy"
|
|
77
133
|
ui.state({ state: 'conflict' }); // "ui-state ui-state--conflict"
|
|
134
|
+
ui.job({ state: 'running' }); // "ui-job ui-job--running"
|
|
78
135
|
```
|
|
79
136
|
|
|
80
137
|
## Scope
|
|
81
138
|
|
|
82
|
-
CSS only — there is no JS yet. Auto-updating elapsed time ("2m ago")
|
|
83
|
-
progress text
|
|
84
|
-
|
|
85
|
-
|
|
139
|
+
CSS only — there is no JS yet. Auto-updating elapsed time ("2m ago"), live
|
|
140
|
+
progress text, polling, cancellation, retry, and conflict-resolution affordances
|
|
141
|
+
are the host's job. A small optional behavior may come later if a real consumer
|
|
142
|
+
needs it.
|
package/docs/theming.md
CHANGED
|
@@ -11,7 +11,7 @@ theme-owned neutral ramp endpoint:
|
|
|
11
11
|
|
|
12
12
|
| Token | Derivation (light / dark) | Role |
|
|
13
13
|
| --------------------- | -------------------------------------------- | ---- |
|
|
14
|
-
| `--accent-strong` | `--accent` mixed 83% with black /
|
|
14
|
+
| `--accent-strong` | `--accent` mixed 83% with black / 80% white | darker/lighter accent for hover, emphasis |
|
|
15
15
|
| `--accent-ramp-end` | white / black | neutral endpoint for the low-chroma OKLCH ramp |
|
|
16
16
|
| `--accent-text` | `var(--accent-strong)` (alias) | **accent used as foreground text** — the on-surface, AA-safe one |
|
|
17
17
|
| `--accent-soft` | `--accent` at 10% / 14% over transparent | tinted fills |
|
|
@@ -63,7 +63,7 @@ fills — follows automatically, in both light and dark.
|
|
|
63
63
|
> defaults to `--accent-strong` (a darkened/lightened accent). If you
|
|
64
64
|
> re-brand to a pale hue, raw `--accent` would fail as text — override
|
|
65
65
|
> `--accent-text` to a sufficiently dark/light value rather than
|
|
66
|
-
> relying on the 83%/
|
|
66
|
+
> relying on the 83%/80% mix.
|
|
67
67
|
>
|
|
68
68
|
> The defaults are tuned for both; verify if you deviate hard. The focus
|
|
69
69
|
> ring is solid `--accent` (≥ 3:1 non-text) — re-brand to a near-`--bg`
|
|
@@ -223,7 +223,7 @@ you have, so the one-accent discipline holds.
|
|
|
223
223
|
colorways". (Your _own_ `--accent` re-brand is still your obligation; the
|
|
224
224
|
guarantee covers the shipped palettes and skins.)
|
|
225
225
|
|
|
226
|
-
## Data-viz palette
|
|
226
|
+
## Data-viz palette
|
|
227
227
|
|
|
228
228
|
Opt-in Tier-4 chart colours for dashboards — **charts only, never UI chrome**
|
|
229
229
|
(a build gate fails on `var(--chart-*)` in component CSS), and never in the
|
|
@@ -275,7 +275,7 @@ semantics — the CSS can't add ARIA for you:
|
|
|
275
275
|
content use `.ui-popover` + `initPopover()` (collision-aware).
|
|
276
276
|
|
|
277
277
|
> **Verify a rebrand:** open
|
|
278
|
-
> [
|
|
278
|
+
> [the theme playground](https://ponchia.github.io/bronto-ui/demo/theme-playground.html) — paste
|
|
279
279
|
> your `--accent`, see the derived family and the computed WCAG ratios
|
|
280
280
|
> for `--accent-text` / `--accent` against the surface, and copy the CSS
|
|
281
281
|
> + DTCG override. This is the instrument for the "verify your hue"
|
|
@@ -303,6 +303,14 @@ palette) carry real `$value`s; the CSS-runtime-derived family
|
|
|
303
303
|
`$value: null` + the CSS in `$extensions["com.ponchia.css"]` rather than
|
|
304
304
|
fabricating a number — the resolvable knob is `color.<theme>.accent`.
|
|
305
305
|
|
|
306
|
+
`@ponchia/ui/tokens/figma.variables.json` is the resolved local handoff for
|
|
307
|
+
Figma Variables import/sync scripts. It is generated from `tokens/resolved.json`
|
|
308
|
+
and keeps a `Bronto / Color` collection with `Light` and `Dark` modes plus a
|
|
309
|
+
`Bronto / Scale` collection for spacing, radius, type, z-index and motion.
|
|
310
|
+
Colour values are exported as Figma-style RGBA objects; non-colour values keep
|
|
311
|
+
their original CSS value under `$extensions["com.ponchia.css"]` so importer
|
|
312
|
+
scripts do not lose units.
|
|
313
|
+
|
|
306
314
|
## Reading tokens from JS
|
|
307
315
|
|
|
308
316
|
`@ponchia/ui/tokens` exposes the model as data. The ergonomic view only
|