@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.
Files changed (160) hide show
  1. package/CHANGELOG.md +175 -6
  2. package/README.md +38 -25
  3. package/annotations/index.d.ts.map +1 -1
  4. package/annotations/index.js +21 -3
  5. package/behaviors/carousel.d.ts.map +1 -1
  6. package/behaviors/carousel.js +91 -32
  7. package/behaviors/combobox.d.ts.map +1 -1
  8. package/behaviors/combobox.js +117 -43
  9. package/behaviors/command.d.ts.map +1 -1
  10. package/behaviors/command.js +74 -14
  11. package/behaviors/connectors.d.ts.map +1 -1
  12. package/behaviors/connectors.js +92 -9
  13. package/behaviors/crosshair.d.ts.map +1 -1
  14. package/behaviors/crosshair.js +47 -1
  15. package/behaviors/dialog.d.ts.map +1 -1
  16. package/behaviors/dialog.js +37 -16
  17. package/behaviors/disclosure.d.ts.map +1 -1
  18. package/behaviors/disclosure.js +33 -3
  19. package/behaviors/dismissible.d.ts.map +1 -1
  20. package/behaviors/dismissible.js +3 -2
  21. package/behaviors/forms.d.ts.map +1 -1
  22. package/behaviors/forms.js +78 -5
  23. package/behaviors/glyph.d.ts.map +1 -1
  24. package/behaviors/glyph.js +17 -2
  25. package/behaviors/index.d.ts +2 -0
  26. package/behaviors/index.d.ts.map +1 -1
  27. package/behaviors/index.js +2 -0
  28. package/behaviors/inert.js +3 -2
  29. package/behaviors/internal.d.ts +2 -1
  30. package/behaviors/internal.d.ts.map +1 -1
  31. package/behaviors/internal.js +25 -4
  32. package/behaviors/legend.d.ts +0 -5
  33. package/behaviors/legend.d.ts.map +1 -1
  34. package/behaviors/legend.js +78 -14
  35. package/behaviors/menu.d.ts.map +1 -1
  36. package/behaviors/menu.js +13 -8
  37. package/behaviors/modal.d.ts.map +1 -1
  38. package/behaviors/modal.js +77 -19
  39. package/behaviors/popover.d.ts +4 -3
  40. package/behaviors/popover.d.ts.map +1 -1
  41. package/behaviors/popover.js +89 -9
  42. package/behaviors/sources.d.ts.map +1 -1
  43. package/behaviors/sources.js +14 -2
  44. package/behaviors/splitter.d.ts +26 -0
  45. package/behaviors/splitter.d.ts.map +1 -0
  46. package/behaviors/splitter.js +239 -0
  47. package/behaviors/spotlight.d.ts.map +1 -1
  48. package/behaviors/spotlight.js +28 -2
  49. package/behaviors/table.d.ts.map +1 -1
  50. package/behaviors/table.js +105 -13
  51. package/behaviors/tabs.d.ts.map +1 -1
  52. package/behaviors/tabs.js +82 -18
  53. package/behaviors/theme.d.ts.map +1 -1
  54. package/behaviors/theme.js +26 -6
  55. package/classes/classes.json +230 -4
  56. package/classes/index.d.ts +64 -3
  57. package/classes/index.js +56 -2
  58. package/classes/vscode.css-custom-data.json +1 -1
  59. package/connectors/index.d.ts +39 -6
  60. package/connectors/index.d.ts.map +1 -1
  61. package/connectors/index.js +67 -9
  62. package/css/analytical.css +3 -1
  63. package/css/annotations.css +12 -0
  64. package/css/app.css +4 -4
  65. package/css/clamp.css +92 -0
  66. package/css/crosshair.css +27 -2
  67. package/css/feedback.css +2 -30
  68. package/css/figure.css +102 -0
  69. package/css/highlights.css +50 -0
  70. package/css/interval.css +90 -0
  71. package/css/navigation.css +12 -0
  72. package/css/primitives.css +2 -3
  73. package/css/report-kit.css +38 -0
  74. package/css/report.css +23 -4
  75. package/css/sidenote.css +12 -2
  76. package/css/site.css +2 -1
  77. package/css/sources.css +5 -0
  78. package/css/state.css +120 -1
  79. package/css/table.css +4 -0
  80. package/css/tokens.css +25 -9
  81. package/css/workbench.css +101 -8
  82. package/dist/bronto.css +1 -1
  83. package/dist/css/analytical.css +1 -1
  84. package/dist/css/annotations.css +1 -1
  85. package/dist/css/app.css +1 -1
  86. package/dist/css/clamp.css +1 -0
  87. package/dist/css/crosshair.css +1 -1
  88. package/dist/css/feedback.css +1 -1
  89. package/dist/css/figure.css +1 -0
  90. package/dist/css/highlights.css +1 -0
  91. package/dist/css/interval.css +1 -0
  92. package/dist/css/navigation.css +1 -1
  93. package/dist/css/primitives.css +1 -1
  94. package/dist/css/report-kit.css +1 -0
  95. package/dist/css/report.css +1 -1
  96. package/dist/css/sidenote.css +1 -1
  97. package/dist/css/site.css +1 -1
  98. package/dist/css/sources.css +1 -1
  99. package/dist/css/state.css +1 -1
  100. package/dist/css/table.css +1 -1
  101. package/dist/css/tokens.css +1 -1
  102. package/dist/css/workbench.css +1 -1
  103. package/docs/adr/0001-color-system.md +3 -2
  104. package/docs/adr/0002-scope-and-2026-baseline.md +1 -1
  105. package/docs/annotations.md +12 -1
  106. package/docs/architecture.md +105 -48
  107. package/docs/clamp.md +49 -0
  108. package/docs/command.md +4 -1
  109. package/docs/connectors.md +16 -0
  110. package/docs/contrast.md +34 -24
  111. package/docs/crosshair.md +1 -1
  112. package/docs/d2.md +37 -0
  113. package/docs/dots.md +4 -1
  114. package/docs/figure.md +71 -0
  115. package/docs/frontier-primitives.md +25 -24
  116. package/docs/glyphs.md +11 -0
  117. package/docs/highlights.md +52 -0
  118. package/docs/interop/tailwind.md +148 -0
  119. package/docs/interval.md +55 -0
  120. package/docs/legends.md +3 -2
  121. package/docs/mermaid.md +6 -0
  122. package/docs/migrations/0.2-to-0.3.md +80 -0
  123. package/docs/migrations/0.3-to-0.4.md +48 -0
  124. package/docs/migrations/0.4-to-0.5.md +96 -0
  125. package/docs/migrations/0.5-to-0.6.md +82 -0
  126. package/docs/package-contract.md +44 -6
  127. package/docs/reference.md +78 -5
  128. package/docs/reporting.md +126 -60
  129. package/docs/sidenote.md +7 -1
  130. package/docs/sources.md +1 -1
  131. package/docs/stability.md +23 -5
  132. package/docs/state.md +67 -10
  133. package/docs/theming.md +12 -4
  134. package/docs/usage.md +47 -13
  135. package/docs/vega.md +4 -4
  136. package/docs/workbench.md +59 -18
  137. package/llms.txt +89 -16
  138. package/package.json +82 -6
  139. package/qwik/index.d.ts +1 -0
  140. package/qwik/index.d.ts.map +1 -1
  141. package/qwik/index.js +26 -21
  142. package/react/index.d.ts +1 -0
  143. package/react/index.d.ts.map +1 -1
  144. package/react/index.js +4 -1
  145. package/schemas/report-claims.v1.schema.json +137 -0
  146. package/solid/index.d.ts +2 -0
  147. package/solid/index.d.ts.map +1 -1
  148. package/solid/index.js +3 -0
  149. package/svelte/index.d.ts +114 -0
  150. package/svelte/index.d.ts.map +1 -0
  151. package/svelte/index.js +193 -0
  152. package/tailwind.css +87 -0
  153. package/tokens/figma.variables.json +2241 -0
  154. package/tokens/index.js +1 -1
  155. package/tokens/index.json +2 -2
  156. package/tokens/resolved.json +3 -3
  157. package/tokens/tokens.dtcg.json +1 -1
  158. package/vue/index.d.ts +116 -0
  159. package/vue/index.d.ts.map +1 -0
  160. package/vue/index.js +228 -0
package/docs/figure.md ADDED
@@ -0,0 +1,71 @@
1
+ # Figure
2
+
3
+ `@ponchia/ui/css/figure.css` is an opt-in analytical/report figure stage. It
4
+ does not render charts. It gives charts, diagrams, screenshots, and annotated
5
+ SVGs a stable frame: caption, media stage, optional overlay, optional key, and
6
+ fallback data.
7
+
8
+ ```css
9
+ @import '@ponchia/ui';
10
+ @import '@ponchia/ui/css/figure.css';
11
+ @import '@ponchia/ui/css/legend.css';
12
+ ```
13
+
14
+ Use it with `ui-report__figure` when the figure sits in a report. Use it alone
15
+ when the same stage appears in a dashboard, doc page, or generated artifact.
16
+
17
+ ```html
18
+ <figure class="ui-figure ui-report__figure ui-print-exact" role="group" aria-labelledby="fig-title">
19
+ <figcaption id="fig-title" class="ui-figure__caption ui-report__caption">
20
+ Fig 1 - Weekly focus split
21
+ </figcaption>
22
+ <div class="ui-figure__body ui-figure__body--key-right">
23
+ <div class="ui-figure__stage" style="--figure-max-inline: 30rem; --figure-min-block: 12rem">
24
+ <svg class="ui-figure__media" viewBox="0 0 320 120" role="img" aria-labelledby="svg-title svg-desc">
25
+ <title id="svg-title">Weekly focus split</title>
26
+ <desc id="svg-desc">Research is the largest category.</desc>
27
+ <rect x="80" y="24" width="180" height="20" fill="var(--chart-1)" />
28
+ <rect x="80" y="64" width="110" height="20" fill="var(--chart-2)" />
29
+ </svg>
30
+ <svg class="ui-figure__overlay" viewBox="0 0 320 120" aria-hidden="true">
31
+ <path class="ui-annotation__connector" d="M260,34L292,14" />
32
+ </svg>
33
+ </div>
34
+ <div class="ui-figure__key">
35
+ <ul class="ui-legend" aria-label="Series">...</ul>
36
+ </div>
37
+ </div>
38
+ <div class="ui-figure__data ui-table-wrap">
39
+ <table class="ui-table ui-table--dense">...</table>
40
+ </div>
41
+ </figure>
42
+ ```
43
+
44
+ ## Contract
45
+
46
+ | Class | Role |
47
+ | --- | --- |
48
+ | `.ui-figure` | Figure wrapper. |
49
+ | `.ui-figure__caption` | Caption text; can compose with `ui-report__caption`. |
50
+ | `.ui-figure__body` | Stage/key layout wrapper. |
51
+ | `.ui-figure__body--key-right` | Two-column body: visual stage plus right-side key. |
52
+ | `.ui-figure__stage` | Stable, centered media stage; `position: relative` for overlays. |
53
+ | `.ui-figure__media` | Primary SVG, image, canvas, or rendered figure output. |
54
+ | `.ui-figure__overlay` | Absolute, pointer-transparent overlay for annotations or guides. |
55
+ | `.ui-figure__key` | Legend/key slot. |
56
+ | `.ui-figure__data` | Fallback data slot, usually a `ui-table-wrap`. |
57
+
58
+ | Custom property | On | Meaning |
59
+ | --- | --- | --- |
60
+ | `--figure-max-inline` | `.ui-figure__stage` | Maximum stage width, default `42rem`. |
61
+ | `--figure-min-block` | `.ui-figure__stage` | Reserved stage height for late-rendered media. |
62
+ | `--figure-key-width` | `.ui-figure__body--key-right` | Right key column width before mobile collapse. |
63
+
64
+ ## Boundary
65
+
66
+ - Bronto owns layout, responsive collapse, overlay positioning, print spacing,
67
+ and class names.
68
+ - The host owns scales, data binding, SVG/canvas/chart rendering, fallback table
69
+ rows, annotation text, and accessibility labels.
70
+ - A figure should always have a `<figcaption>`. Data-bearing SVGs still need
71
+ `<title>` and `<desc>`.
@@ -25,7 +25,7 @@ The pattern that worked for annotations should stay the rule:
25
25
  - Prefer CSS and markup first. Add JS only when the browser cannot express the
26
26
  behavior without measuring, filtering, keyboard state, or pointer tracking.
27
27
 
28
- This keeps Bronto useful across Astro, SvelteKit, React, Solid, Qwik, plain
28
+ This keeps Bronto useful across Astro, SvelteKit, Vue, React, Solid, Qwik, plain
29
29
  HTML, and generated static reports without becoming a framework component kit.
30
30
 
31
31
  ## Already aligned in 0.5.0
@@ -164,19 +164,21 @@ and footnotes, but not a trust grammar. The shipped surface and its trust-state
164
164
  vocabulary are documented with the component; richer preview popovers remain
165
165
  host-owned.
166
166
 
167
- ### 2. Lifecycle and system-state UI — 🟡 `ui-state` family shipped in 0.5.0
167
+ ### 2. Lifecycle and system-state UI — 🟡 `ui-state` family shipped in 0.5.0, `ui-job` added for 0.6.7
168
168
 
169
169
  Shipped as `@ponchia/ui/css/state.css` (`ui-state` + the canonical state matrix
170
- + `ui-syncbar`), matching the "good first build" below. `ui-job` (background
171
- progress) and `ui-conflict` (resolution affordances) remain deferred until a
172
- consumer needs them; `ui-review-state` is covered by the reviewed/needs-review
170
+ + `ui-syncbar`), matching the "good first build" below. The 0.6.7 local pass
171
+ adds `ui-job`: a persistent background-job row with determinate progress,
172
+ written status, and action slots, while polling/retry/cancel semantics stay in
173
+ the host. `ui-conflict` (resolution affordances) remains deferred until a
174
+ consumer needs it; `ui-review-state` is covered by the reviewed/needs-review
173
175
  state modifiers.
174
176
 
175
177
  Why it matters: serious apps spend a lot of time in states like saving, saved,
176
178
  queued, offline, stale, retrying, conflicted, locked, reviewed, and background
177
179
  job running. These states are usually improvised per product, so even good apps
178
- feel inconsistent. Still deferred: `ui-job` (background progress) and
179
- `ui-conflict` (resolution affordances), each until a consumer needs it.
180
+ feel inconsistent. Still deferred: `ui-conflict` (resolution affordances), until
181
+ a consumer needs it.
180
182
 
181
183
  ### 3. Command-first UI — ✅ shipped in 0.5.0
182
184
 
@@ -193,20 +195,19 @@ design-system contract: shortcuts, actions, groups, disabled reasons, context,
193
195
  and command result feedback. The host still owns the action registry and
194
196
  execution; global Cmd/Ctrl+K stays opt-in by design.
195
197
 
196
- ### 4. Workbench UI — 🟡 inspector / property / selectionbar shipped in 0.5.0
198
+ ### 4. Workbench UI — 🟡 inspector / property / selectionbar shipped in 0.5.0, splitter added in 0.6.7
197
199
 
198
200
  Shipped as `@ponchia/ui/css/workbench.css` (`ui-inspector`, `ui-property`,
199
- `ui-selectionbar`) — the low-risk CSS core below. Resizable split panes
200
- (`ui-splitter`, an ARIA window-splitter behavior) and drag handles remain
201
- deferred until a consumer needs them.
201
+ `ui-selectionbar`, `ui-splitter`) plus `initSplitter` — the low-risk workbench
202
+ core below. Splitters own the focusable ARIA separator, keyboard/pointer resize,
203
+ `--splitter-pos`, and `aria-valuenow`; the host owns pane contents, persistence,
204
+ collapse policy, and saved layout state.
202
205
 
203
206
  Why it matters: real tools need inspectors, object action bars, split panes,
204
207
  resize handles, property rows, dense trees, and selected-object affordances.
205
208
  Generic UI kits tend to stop at cards/tables/forms, leaving every app to build
206
- its own half-consistent workbench. Still open: a `ui-splitter` ARIA
207
- window-splitter behavior (focusable separator, `aria-valuemin/max/now`,
208
- arrow-key resize) and drag/drop affordances — both deferred, and Bronto should
209
- style drag handles, not become a drag-and-drop framework.
209
+ its own half-consistent workbench. Still open: drag/drop affordances. Bronto
210
+ should style drag handles and drop targets, not become a drag-and-drop framework.
210
211
 
211
212
  ### 5. Generated-content and AI trust primitives — 🟡 shipped in 0.5.0
212
213
 
@@ -235,11 +236,10 @@ consumer since**; their follow-ons are demand-gated, not queued. Active work
235
236
  is therefore consolidation of the report lane (hub routing, print/PDF
236
237
  fidelity, consumer-contract gates), not new surfaces.
237
238
 
238
- ### Report-lane candidates (build only after the routing hub carries them)
239
+ ### Report-lane primitives shipped in 0.6.7
239
240
 
240
- From the 2026-06-09 local scout kept on merit, deliberately NOT started
241
- until the reporting.md routing/adoption pass has landed (shipping more leaves
242
- into an unrouted hub repeats the discoverability gap):
241
+ From the 2026-06-09 local scout. These were kept on merit, then shipped only
242
+ after `docs/reporting.md` carried routing rows so the leaves are discoverable:
243
243
 
244
244
  1. `ui-interval` — honest low–high uncertainty span + ± chip, inline in
245
245
  reports; the error-bar grammar generic kits never ship.
@@ -248,14 +248,15 @@ into an unrouted hub repeats the discoverability gap):
248
248
  3. `ui-highlights` — cited-evidence / search-hit spans painted from host
249
249
  Ranges via the CSS Custom Highlight API (progressive enhancement; clean
250
250
  no-op below the floor).
251
+ 4. `ui-figure` — stable chart/diagram/screenshot stage with overlay/key/fallback
252
+ slots; it composes with report figures but still refuses chart scales.
251
253
 
252
254
  ### Dormant (build with the first real app consumer, not before)
253
255
 
254
- - `ui-job` / `ui-conflict` lifecycle surfaces (candidate 2).
255
- - `ui-splitter` ARIA window-splitter behavior + drag affordances
256
- (candidate 4), which is also the gating consumer for `ui-tree`'s deferred
257
- roving-focus tree kernel.
258
- - Any command/workbench follow-ons beyond the shipped CSS cores.
256
+ - `ui-conflict` lifecycle surface (candidate 2).
257
+ - Drag/drop workbench affordances (candidate 4) and any gating consumer for
258
+ `ui-tree`'s deferred roving-focus tree kernel.
259
+ - Any command/workbench follow-ons beyond the shipped cores.
259
260
 
260
261
  Dormant items stay gated on a real consumer needing them. This posture keeps
261
262
  Bronto differentiated while staying inside its core philosophy: small,
package/docs/glyphs.md CHANGED
@@ -49,6 +49,17 @@ the same as a hot `#` cell (both become opaque mask regions).
49
49
  | `render` | `'mask'` | — | the one-node `.ui-icon` path |
50
50
  | `size` | CSS length | `1em` | with `render: 'mask'`, the icon size (`--icon-size`) |
51
51
 
52
+ ## Registry and lower-level helpers
53
+
54
+ The public registry is intentionally plain data:
55
+
56
+ - `GLYPH_SIZE` is the grid edge length.
57
+ - `GLYPHS` is the frozen name → bitmap registry.
58
+ - `GLYPH_NAMES` is the sorted, frozen name list.
59
+ - `glyph(name)` returns the raw bitmap rows or `undefined`.
60
+ - `glyphCells(name)` returns the 256 row-major cell descriptors.
61
+ - `glyphMask(name)` returns the CSS `url(...)` value used by the mask renderer.
62
+
52
63
  ## Big numeric readout — `renderReadout`
53
64
 
54
65
  Compose digits and punctuation into a row of dot-matrix glyphs — the
@@ -0,0 +1,52 @@
1
+ # Highlights
2
+
3
+ `@ponchia/ui/css/highlights.css` is an opt-in paint layer for the CSS Custom
4
+ Highlight API. It styles named `Range` sets without adding wrapper spans to the
5
+ DOM.
6
+
7
+ ```css
8
+ @import '@ponchia/ui';
9
+ @import '@ponchia/ui/css/highlights.css';
10
+ ```
11
+
12
+ Bronto only paints the names below. The host owns range discovery, search,
13
+ source mapping, current-match state, and cleanup.
14
+
15
+ | Highlight name | Use |
16
+ | --- | --- |
17
+ | `bronto-evidence` | Cited evidence or selected proof text. |
18
+ | `bronto-search` | Search result matches. |
19
+ | `bronto-current` | The active/current match. |
20
+
21
+ ```html
22
+ <article class="ui-highlights" id="review">
23
+ <p id="evidence">Latency improved after the migration, but the window is short.</p>
24
+ </article>
25
+ ```
26
+
27
+ ```js
28
+ const text = document.querySelector('#evidence').firstChild;
29
+ if (CSS.highlights) {
30
+ const range = new Range();
31
+ range.setStart(text, 0);
32
+ range.setEnd(text, 16);
33
+ CSS.highlights.set('bronto-evidence', new Highlight(range));
34
+ }
35
+ ```
36
+
37
+ ## Contract
38
+
39
+ | Class | Role |
40
+ | --- | --- |
41
+ | `.ui-highlights` | Scope for Bronto's named highlight paints. |
42
+
43
+ | Custom property | On | Meaning |
44
+ | --- | --- | --- |
45
+ | `--highlight-evidence` | `.ui-highlights` | Wash for `bronto-evidence`. |
46
+ | `--highlight-search` | `.ui-highlights` | Wash for `bronto-search`. |
47
+ | `--highlight-current` | `.ui-highlights` | Wash for `bronto-current`. |
48
+
49
+ ## Robustness
50
+
51
+ Check `CSS.highlights` before registering ranges. Without support, the page
52
+ falls back to plain text; no wrapper spans or extra cleanup are required.
@@ -0,0 +1,148 @@
1
+ # Tailwind v4 bridge and cascade-layer interop
2
+
3
+ Everything `@ponchia/ui` ships lives inside a single named cascade layer,
4
+ `@layer bronto`. This makes coexistence with Tailwind (or any layer-based CSS)
5
+ deterministic, but only if you control **layer order**.
6
+
7
+ Bronto also ships a Tailwind v4 bridge at `@ponchia/ui/tailwind`. It maps
8
+ Bronto's CSS custom properties into Tailwind's CSS-first `@theme` namespaces and
9
+ defines Bronto-aware variants. The bridge does **not** import the Bronto
10
+ component CSS for you; import both when you want both systems.
11
+
12
+ ## The one rule
13
+
14
+ In CSS, an explicit `@layer` declaration's order beats specificity: later layers
15
+ win over earlier layers, and **un-layered styles beat all layered styles**. So:
16
+
17
+ - Un-layered Tailwind utilities already override `@ponchia/ui` with no
18
+ `!important` and no specificity fight.
19
+ - If Tailwind is itself layered (Tailwind v4 default), you must place its layers
20
+ **after** `bronto`.
21
+
22
+ ## Tailwind v4
23
+
24
+ v4 emits `@layer theme, base, components, utilities;`. Declare `bronto`
25
+ **before** Tailwind's utilities so utilities can override components, then import
26
+ Tailwind and the Bronto bridge:
27
+
28
+ ```css
29
+ /* app.css — order line first, before any @import */
30
+ @layer bronto, theme, base, components, utilities;
31
+
32
+ @import '@ponchia/ui'; /* fills @layer bronto */
33
+ @import 'tailwindcss'; /* fills theme/base/components/utilities */
34
+ @import '@ponchia/ui/tailwind'; /* adds @theme + @custom-variant bridge */
35
+ ```
36
+
37
+ Because the `@layer` statement above fixes the order up front, it does not
38
+ matter that `@ponchia/ui` is imported first — `utilities` is declared after
39
+ `bronto`, so `class="ui-button px-8"` gives Tailwind's `px-8` the final word.
40
+
41
+ If you'd rather Tailwind's **Preflight reset not touch** `@ponchia/ui` elements,
42
+ keep Preflight (in `base`) before `bronto` instead:
43
+
44
+ ```css
45
+ @layer theme, base, bronto, components, utilities;
46
+ ```
47
+
48
+ Pick based on which reset you want to win; `@ponchia/ui`'s own reset is inside
49
+ `bronto`, so whichever layer is later wins the reset too.
50
+
51
+ ### Theme utilities
52
+
53
+ The bridge uses Tailwind v4's CSS-first `@theme inline` form, so Bronto tokens
54
+ become ordinary Tailwind utilities while still reading the live CSS variables
55
+ from the active theme:
56
+
57
+ ```html
58
+ <section
59
+ class="bg-bronto-surface text-bronto-text border border-bronto-border p-bronto-lg rounded-bronto-lg"
60
+ >
61
+ <button class="bg-bronto-action text-bronto-on-action ring-bronto-focus">Save</button>
62
+ </section>
63
+ ```
64
+
65
+ Useful namespaces:
66
+
67
+ | Bronto token family | Tailwind utility examples |
68
+ | --- | --- |
69
+ | Surface/text/action colours | `bg-bronto-surface`, `text-bronto-text`, `border-bronto-border`, `ring-bronto-focus` |
70
+ | Accent ramps | `bg-bronto-accent-1` … `bg-bronto-accent-6` |
71
+ | Status colours | `text-bronto-success`, `bg-bronto-warning`, `border-bronto-danger`, `text-bronto-info` |
72
+ | Typography | `font-bronto-sans`, `font-bronto-mono`, `font-bronto-display`, `text-bronto-sm` |
73
+ | Spacing/radius/shadow/easing | `p-bronto-md`, `gap-bronto-sm`, `rounded-bronto-xl`, `shadow-bronto-raised`, `ease-bronto-standard` |
74
+
75
+ ### Bronto variants
76
+
77
+ The bridge defines root/theme variants and common Bronto state variants:
78
+
79
+ ```html
80
+ <article
81
+ class="bg-bronto-surface bronto-dark:bg-bronto-surface-raised bronto-contrast-more:border-bronto-border-strong"
82
+ >
83
+ ...
84
+ </article>
85
+
86
+ <button class="bronto-active:text-bronto-action bronto-busy:opacity-70">Run</button>
87
+ ```
88
+
89
+ Available variants:
90
+
91
+ | Variant | Selector intent |
92
+ | --- | --- |
93
+ | `bronto-light:*` / `bronto-dark:*` | Descendants under `html[data-theme="light|dark"]` |
94
+ | `bronto-oled:*` | Descendants under `[data-surface="oled"]` |
95
+ | `bronto-contrast-more:*` | Descendants under `[data-contrast="more"]` |
96
+ | `bronto-compact:*` / `bronto-comfortable:*` | Descendants under density presets |
97
+ | `bronto-active:*` | `.is-active`, current page, or selected tab state |
98
+ | `bronto-open:*` | Native/dialog/popover/open disclosure state |
99
+ | `bronto-selected:*` | selected/pressed state |
100
+ | `bronto-invalid:*` | invalid field state |
101
+ | `bronto-busy:*` | busy/loading state |
102
+
103
+ ### Svelte/Vue component styles
104
+
105
+ When using `@apply` or `@variant` inside Vue or Svelte component style blocks,
106
+ import your app stylesheet with Tailwind's `@reference` directive so Tailwind
107
+ can see the Bronto theme variables and custom variants without duplicating CSS
108
+ output:
109
+
110
+ ```css
111
+ @reference '../app.css';
112
+
113
+ .panel {
114
+ @apply bg-bronto-surface text-bronto-text bronto-dark:bg-bronto-surface-raised;
115
+ }
116
+ ```
117
+
118
+ ### Package source detection
119
+
120
+ `@ponchia/ui` components are normal `.ui-*` classes and do not need Tailwind to
121
+ scan the package. If your own app builds Tailwind class names inside ignored
122
+ generated files or an external package, register those sources with Tailwind's
123
+ `@source` directive in your app stylesheet.
124
+
125
+ ## Tailwind v3
126
+
127
+ v3 (`@tailwind base/components/utilities`) is un-layered by default, so its
128
+ utilities **already** beat `@layer bronto` with zero config — just
129
+ `@import '@ponchia/ui';` first. If you opt into v3's experimental `cssLayers`,
130
+ apply the v4 rule above.
131
+
132
+ ## Override matrix
133
+
134
+ | You want… | Use |
135
+ | ---------------------------------------------------- | ------------------------------------------------------------------- |
136
+ | Tailwind utilities to win (normal case) | Nothing — un-layered utilities already beat `@layer bronto` |
137
+ | A full-specificity, layer-free `@ponchia/ui` build | Import the `@ponchia/ui/css/unlayered/<leaf>.css` escape-hatch paths |
138
+ | Per-route CSS splitting + the bundle, no inversion | Mix freely — every leaf export self-wraps in `@layer bronto` |
139
+ | Tailwind's Preflight to NOT reset `ui-*` elements | `@layer theme, base, bronto, components, utilities;` |
140
+ | Bronto tokens as Tailwind utilities | `@import '@ponchia/ui/tailwind';` after Tailwind v4 |
141
+ | Vue/Svelte style blocks using Bronto utilities | `@reference '../app.css';` from the component style block |
142
+
143
+ ## Gotcha
144
+
145
+ Do **not** mix `@ponchia/ui` (layered) with `@ponchia/ui/css/unlayered/*` for
146
+ the _same_ leaf — the unlayered copy will unconditionally win and you lose the
147
+ ordering guarantees. The `unlayered/*` paths are a deliberate, surgical escape
148
+ hatch, not a default.
@@ -0,0 +1,55 @@
1
+ # Interval
2
+
3
+ `@ponchia/ui/css/interval.css` is an opt-in low/high uncertainty primitive for
4
+ reports: confidence intervals, estimates, measurement ranges, target windows,
5
+ and caveated values.
6
+
7
+ ```css
8
+ @import '@ponchia/ui';
9
+ @import '@ponchia/ui/css/interval.css';
10
+ ```
11
+
12
+ The host normalises every value to `0..1`. Bronto paints only the track, range,
13
+ and optional point estimate.
14
+
15
+ ```html
16
+ <div
17
+ class="ui-interval"
18
+ style="--lo: 0.22; --hi: 0.68"
19
+ role="img"
20
+ aria-label="Estimated completion between 22 and 68 percent, point estimate 52 percent"
21
+ >
22
+ <span class="ui-interval__label">Estimate window</span>
23
+ <span class="ui-interval__track" aria-hidden="true">
24
+ <span class="ui-interval__range"></span>
25
+ <span class="ui-interval__point" style="--v: 0.52"></span>
26
+ </span>
27
+ <span class="ui-interval__bounds" aria-hidden="true">
28
+ <span>22%</span>
29
+ <span>68%</span>
30
+ </span>
31
+ </div>
32
+ ```
33
+
34
+ ## Contract
35
+
36
+ | Class | Role |
37
+ | --- | --- |
38
+ | `.ui-interval` | Wrapper and custom-property host. |
39
+ | `.ui-interval__track` | Neutral track. |
40
+ | `.ui-interval__range` | Low-high range span. |
41
+ | `.ui-interval__point` | Optional point estimate. Omit the element when none exists. |
42
+ | `.ui-interval__label` | Written label. |
43
+ | `.ui-interval__bounds` | Visible low/high labels. |
44
+
45
+ | Custom property | On | Meaning |
46
+ | --- | --- | --- |
47
+ | `--lo` | `.ui-interval` | Required normalised lower bound, `0..1`. |
48
+ | `--hi` | `.ui-interval` | Required normalised upper bound, `0..1`. |
49
+ | `--v` | `.ui-interval__point` | Optional normalised point estimate, `0..1`. |
50
+
51
+ ## Accessibility
52
+
53
+ Pair each interval with a written label or `role="img"` plus `aria-label`. The
54
+ range is not the data of record: under forced-colors or print, the readable
55
+ label and bounds must still explain the value.
package/docs/legends.md CHANGED
@@ -184,5 +184,6 @@ document.addEventListener('bronto:legend:toggle', (e) => {
184
184
  Convention: `aria-pressed="true"` means the series is **shown** (the default).
185
185
  The entry's label never changes on toggle — only `aria-pressed` and
186
186
  `.is-inactive` flip, so a screen reader reads a stable name with a clear
187
- pressed state. React/Solid/Qwik consumers can use `useLegend()` instead of
188
- calling `initLegend` directly.
187
+ pressed state. React/Solid/Qwik/Svelte consumers can use `useLegend()` (or the
188
+ `legend` Svelte action) instead of calling `initLegend` directly; Vue consumers
189
+ can use `vLegend`.
package/docs/mermaid.md CHANGED
@@ -54,6 +54,12 @@ below):
54
54
  </script>
55
55
  ```
56
56
 
57
+ > **There is no classic-script path.** Mermaid v11 ships **no UMD bundle** —
58
+ > its `dist/` is ESM-chunked, so vendoring a `mermaid.min.js` for a plain
59
+ > `<script src>` is a dead end. In the browser it is the ES-module import
60
+ > above (over a real `http(s)` origin); for everything else, pre-render to a
61
+ > frozen SVG with `mmdc` (below) so there is no runtime at all.
62
+
57
63
  > **file:// portability.** A report opened straight from disk (`file://`) cannot
58
64
  > `import` the `@ponchia/ui/mermaid` module **nor** `fetch('…/mermaid.json')` —
59
65
  > the browser blocks both across the `null`/file origin (CORS), exactly as with
@@ -0,0 +1,80 @@
1
+ # Migrating 0.2 → 0.3
2
+
3
+ 0.3.0 removed the entire pre-`ui-*` vocabulary. Everything shipped is now
4
+ under the `.ui-*` contract and the `check-classes` drift gate. This page
5
+ turns the CHANGELOG's BREAKING notes into a runnable recipe. The
6
+ machine-readable source of truth is [`MIGRATIONS.json`](../../MIGRATIONS.json).
7
+
8
+ ## 1. Mechanical renames (safe to automate)
9
+
10
+ These are whole-class-token renames with no semantic change. Run from
11
+ your **consuming app's** repo root (adjust the glob to your templates —
12
+ `.astro`, `.svelte`, `.jsx`, `.tsx`, `.html`):
13
+
14
+ ```bash
15
+ # Preview first — list every file/line that will change:
16
+ rg -l --glob '*.{astro,svelte,jsx,tsx,vue,html}' \
17
+ -e 'skip-link' -e 'site-nav' -e 'site-menu' -e 'theme-toggle' -e '\bapp-' .
18
+
19
+ # Apply (BSD/macOS sed shown; GNU sed: drop the '' after -i):
20
+ fd -e astro -e svelte -e jsx -e tsx -e vue -e html -x sed -i '' \
21
+ -e 's/\bskip-link\b/ui-skiplink/g' \
22
+ -e 's/\bsite-nav\b/ui-sitenav/g' \
23
+ -e 's/\bsite-menu\b/ui-sitemenu/g' \
24
+ -e 's/\btheme-toggle\b/ui-themetoggle/g' \
25
+ -e 's/\bapp-\(shell\|rail\|topbar\|toolbar\|nav\|panel\|content\|main\|metrics\|metric\|empty-state\)/ui-app-\1/g' {}
26
+ ```
27
+
28
+ The `\b` word boundaries keep `app-` from clobbering unrelated tokens,
29
+ but **review the diff** — a codemod cannot know your markup.
30
+
31
+ If you import the typed class registry, switch to the new entries
32
+ instead and let the compiler find the rest:
33
+
34
+ ```js
35
+ import { cls } from '@ponchia/ui/classes';
36
+ // cls.appShell, cls.appRail, …, cls.themetoggleTrack, cls.menuHost
37
+ ```
38
+
39
+ ## 2. Concept moves (manual — no 1:1 rename)
40
+
41
+ | Old | Now |
42
+ | ------------------------------------------------ | --------------------------------------------------------------------------- |
43
+ | `.hero`, `.project-*`, `.post-card`, `.essay-*`, `.page-*`, `.home-*`, `.signal-panel`, `.worklog-summary` | Re-compose with the content layer: `.ui-prose` / `.ui-quote`, `.ui-card`, `.ui-grid` / `.ui-stack`, the `ui-site*` shell |
44
+ | `.callout` | `.ui-alert` (pick a tone: `--info` / `--success` / `--warning` / `--danger`) |
45
+ | `.metric-tile` | `.ui-app-metric` inside `.ui-app-metrics` |
46
+ | `.tag-list` / `.tag` | `.ui-tags` / `.ui-tag` (verify accent-on-accent contrast) |
47
+
48
+ ## 3. Import and token checks
49
+
50
+ The bundle collapsed in 0.3.0. Use the package root (`@ponchia/ui`) or
51
+ `@ponchia/ui/css`; removed paths such as `./css/index.css`,
52
+ `./css/responsive.css`, `./dist/bronto-core.css`, and
53
+ `./css/{layout,typography,cards}.css` should be deleted.
54
+
55
+ Direct leaf imports changed meaning too: `@ponchia/ui/css/<leaf>.css` now
56
+ resolves to the safe layered build. If you intentionally depended on a raw
57
+ unlayered leaf overriding your app by specificity, switch that import to
58
+ `@ponchia/ui/css/unlayered/<leaf>.css`.
59
+
60
+ If you re-brand with a pale `--accent`, set `--accent-text` as well; 0.3.0
61
+ routes small accent-coloured text through that AA-safe token. TypeScript users
62
+ should also expect `cls` and token helpers to reject typos now that the
63
+ declarations are literal unions.
64
+
65
+ ## 4. Verify
66
+
67
+ - `rg -n 'class(Name)?=.*"[^"]*\b(hero|callout|metric-tile|post-card|skip-link)\b'`
68
+ should return nothing after the pass.
69
+ - `rg -n '@ponchia/ui/(css/(index|responsive|layout|typography|cards)\\.css|dist/bronto-core\\.css)'`
70
+ should return nothing.
71
+ - Visual-diff your app: token **values** can change in any release
72
+ without a major bump, so eyeball the result, don't just diff classes.
73
+
74
+ ## Deprecation policy
75
+
76
+ From 0.3.1 onward, removals follow the policy in
77
+ [stability.md](../stability.md#deprecation-policy): a class is
78
+ deprecated for **one minor** (kept working, marked in CHANGELOG +
79
+ `MIGRATIONS.json`) before it is removed. 0.2 → 0.3 predates this policy,
80
+ which is why it was a hard cut.
@@ -0,0 +1,48 @@
1
+ # Migrating 0.3 → 0.4
2
+
3
+ 0.4.0 is the **colour-system** release (see
4
+ [ADR-0001](../adr/0001-color-system.md)). It is **additive for almost
5
+ everyone** — the default `dist/bronto.css` renders identically. There is a
6
+ single breaking change, and it only bites if you used an undocumented token.
7
+ The machine-readable map is [`MIGRATIONS.json`](../../MIGRATIONS.json).
8
+
9
+ ## The one breaking change
10
+
11
+ **`--orange` / `--orange-soft` were removed.** They were defined in the token
12
+ mirrors but referenced by no component and documented nowhere — an orphan that
13
+ contradicted the tier model. Removed under the CONTRIBUTING "provably-
14
+ unreferenced surface" exception.
15
+
16
+ **Migration:** if you referenced `--orange` / `--orange-soft` anywhere, define
17
+ it yourself in a consumer override:
18
+
19
+ ```css
20
+ :root {
21
+ --orange: #a85f32;
22
+ --orange-soft: rgb(168 95 50 / 0.13);
23
+ }
24
+ ```
25
+
26
+ Most apps need to do nothing. Verify with:
27
+
28
+ ```bash
29
+ rg -- '--orange' .
30
+ ```
31
+
32
+ ## What's new (all opt-in, nothing to change)
33
+
34
+ - **Colorways** — `@ponchia/ui/css/skins.css` + `data-bronto-skin="amber-crt |
35
+ phosphor-green | e-ink"` on `<html>`. Not loaded → no effect.
36
+ - **Data-viz palette** — `@ponchia/ui/css/dataviz.css` + `@ponchia/ui/charts.json`
37
+ (`--chart-*` + dot-matrix pattern fills). Charts only.
38
+ - **Tier-3 dot-matrix display tokens** (`--dotmatrix-glow`, `--dotmatrix-pulse-min`)
39
+ — default to a no-op.
40
+ - **APCA** advisory contrast column in `docs/contrast.md`; WCAG 2.1 AA stays the
41
+ gate.
42
+
43
+ ## Re-pin
44
+
45
+ ```jsonc
46
+ // package.json — 0.4 is a breaking minor under the pre-1.0 policy
47
+ "@ponchia/ui": "~0.4.0"
48
+ ```