@ponchia/ui 0.4.0 → 0.4.1

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 (44) hide show
  1. package/CHANGELOG.md +128 -10
  2. package/README.md +20 -13
  3. package/behaviors/index.d.ts +3 -1
  4. package/behaviors/index.js +179 -106
  5. package/classes/index.d.ts +40 -0
  6. package/classes/index.js +41 -0
  7. package/classes/vscode.css-custom-data.json +18 -14
  8. package/css/disclosure.css +29 -0
  9. package/css/dots.css +2 -0
  10. package/css/feedback.css +53 -0
  11. package/css/motion.css +88 -0
  12. package/css/overlay.css +52 -1
  13. package/css/report.css +382 -0
  14. package/css/tokens.css +56 -26
  15. package/dist/bronto.css +1 -1
  16. package/dist/css/disclosure.css +1 -1
  17. package/dist/css/dots.css +1 -1
  18. package/dist/css/feedback.css +1 -1
  19. package/dist/css/motion.css +1 -1
  20. package/dist/css/overlay.css +1 -1
  21. package/dist/css/report.css +1 -0
  22. package/dist/css/tokens.css +1 -1
  23. package/docs/adr/0001-color-system.md +26 -27
  24. package/docs/adr/0002-scope-and-2026-baseline.md +104 -0
  25. package/docs/adr/0003-theme-model.md +94 -0
  26. package/docs/contrast.md +42 -42
  27. package/docs/reference.md +112 -15
  28. package/docs/reporting.md +270 -0
  29. package/docs/stability.md +37 -0
  30. package/docs/theming.md +18 -6
  31. package/docs/usage.md +21 -3
  32. package/llms.txt +61 -4
  33. package/package.json +28 -3
  34. package/qwik/index.d.ts +55 -0
  35. package/qwik/index.js +129 -0
  36. package/react/index.d.ts +35 -14
  37. package/react/index.js +22 -5
  38. package/solid/index.d.ts +35 -14
  39. package/solid/index.js +21 -3
  40. package/tokens/index.d.ts +3 -3
  41. package/tokens/index.js +16 -14
  42. package/tokens/index.json +32 -28
  43. package/tokens/resolved.json +34 -32
  44. package/tokens/tokens.dtcg.json +22 -14
package/CHANGELOG.md CHANGED
@@ -4,9 +4,128 @@
4
4
  > `~0.x`; `^0.x` does **not** protect you. See README → Versioning, and
5
5
  > the deprecation policy in CONTRIBUTING.md.
6
6
 
7
+ ## 0.4.1 — 2026-06-01
8
+
9
+ Patch hardening for the public framework surface, plus the first step of the
10
+ modern-platform motion direction (see [ADR-0002](docs/adr/0002-scope-and-2026-baseline.md)).
11
+
12
+ ### Added
13
+
14
+ - **Static report kit — `@ponchia/ui/css/report.css` + `docs/reporting.md`.**
15
+ An opt-in, PDF-first report layer for LLM-authored and hand-authored HTML:
16
+ report covers, headers, section numbering, summaries, findings, evidence
17
+ blocks, source/appendix/footnote blocks, chart wrappers/legends/fallback
18
+ tables, and print utilities (`ui-print-only`, `ui-screen-only`,
19
+ `ui-break-before`, `ui-break-after`, `ui-keep`, `ui-print-exact`). It stays
20
+ out of the default bundle, ships with the offline LLM docs, and is covered by
21
+ a report fixture, package/export checks, and class-contract validation.
22
+ The layer also includes compact covers, unnumbered report sections, simple
23
+ static chart-bar primitives, and evidence-table framing rules so generated
24
+ reports need less private CSS.
25
+ - **Zero-JS enter _and_ exit motion for native-`<dialog>` overlays.** Modal and
26
+ drawer (and their backdrop) now fade/scale **both ways** via `@starting-style`
27
+ + `transition-behavior: allow-discrete` — previously they only animated in and
28
+ vanished on close. Pure CSS, reduced-motion-aware (snaps with no flash), scoped
29
+ to `dialog.ui-modal` so the controlled `.is-open` path is unchanged.
30
+ - **Enter/exit motion extended to popover, toast, and accordion** (ADR-0002
31
+ "next, same approach"):
32
+ - **Popover** (`.ui-popover`) fades + slides both ways via the same
33
+ `@starting-style` + `allow-discrete` recipe, covering both the native
34
+ `[popover]` top-layer path and the `.is-open` fallback. Zero JS,
35
+ reduced-motion-aware.
36
+ - **Toast** (`.ui-toast`) now plays a CSS fade-out on dismiss instead of being
37
+ yanked from the DOM. The `toast()` behavior adds `.is-leaving` and removes
38
+ the node on `transitionend` (with a timeout fallback); it falls back to
39
+ instant removal under reduced-motion or where no transition is computed, so
40
+ the persistent `aria-live` region is undisturbed.
41
+ - **Accordion** (`.ui-accordion`, native `<details>`) animates auto-height
42
+ open/close via `::details-content` + `interpolate-size: allow-keywords` +
43
+ `content-visibility … allow-discrete`. Strict progressive enhancement —
44
+ gated on `@supports selector(::details-content)`; engines without it (today,
45
+ Firefox/Safari) simply snap, exactly as before.
46
+ - **Scroll-driven motion (progressive enhancement).** `.ui-scroll-progress` (a
47
+ reading-progress bar on a `scroll(root block)` timeline, RTL-aware) and
48
+ `.ui-scroll-reveal` (a JS-free, IntersectionObserver-free reveal on a `view()`
49
+ timeline). Both are gated on `@supports (animation-timeline: …)` and
50
+ `prefers-reduced-motion: no-preference`, so engines without scroll timelines
51
+ (today, Firefox/Safari) keep a static end-state and reduced-motion users get
52
+ no movement.
53
+ - **View Transitions (progressive enhancement).** A `.ui-vt` helper
54
+ (`view-transition-name: var(--ui-vt-name)`) to morph an element across a
55
+ same-document `startViewTransition()` or a cross-document navigation, an
56
+ on-brand default for the `::view-transition-*(root)` cross-fade, and a
57
+ **reduced-motion kill-switch** for the `::view-transition-*` pseudo-tree
58
+ (which the platform does *not* quiet automatically). Cross-document nav stays
59
+ a documented one-liner you add yourself (`@view-transition { navigation: auto }`
60
+ is document-global, so it can't be layered or scoped by the framework).
61
+ - **Optional Qwik bindings — `@ponchia/ui/qwik`.** Same thin-adapter shape as
62
+ the React/Solid bindings (`useDialog`, `useToast`, … `useBrontoBehavior`, plus
63
+ the `cls`/`ui`/`cx` + `applyStoredTheme` re-exports), wrapping the SSR-safe
64
+ behaviors in Qwik's `useVisibleTask$` (run on visible, cleanup on dispose) so a
65
+ resumable page stays zero-JS until interaction. Scope a behavior with a Qwik
66
+ signal: `useDialog({ root: useSignal() })`. `@builder.io/qwik` is an **optional**
67
+ peer dependency, so the core stays zero-dependency. New `examples/qwik-vite`
68
+ builds it through the real Qwik optimizer.
69
+ - **OLED true-black surface variant — `data-surface="oled"`.** The dark base is
70
+ now a readable elevated near-black (see Changed); this opt-in root attribute
71
+ restores pure black for OLED power-saving and the original "Nothing" look.
72
+ CSS-only preset (like `data-density`/`data-contrast`), scoped to the dark
73
+ theme. Documented in `docs/theming.md`.
74
+ - **APCA advisory for dark text.** `check:contrast` now emits a non-failing
75
+ warning when a dark text pairing falls below its perceptual APCA target (WCAG
76
+ stays the hard gate) — the early-warning that would have caught the illegible
77
+ dim text. The kitchen-sink demo gains a unified theme picker (theme × colorway
78
+ × surface, all persisted).
79
+ - **[ADR-0003](docs/adr/0003-theme-model.md)** records the theme model: a binary
80
+ light/dark base × one-knob derivation × orthogonal axes (colorway, surface,
81
+ contrast, density), and why a flat named-theme catalog is rejected.
82
+
83
+ ### Changed
84
+
85
+ - **Dark theme re-tuned for readability.** The dark base moved off pure `#000`
86
+ to an elevated near-black (`--bg #121212`, panels `#1c1c1c`/`#222`/`#242424`,
87
+ lines `#383838`/`#555`); body text eased `#f2f2f2 → #e6e6e6` (APCA Lc 99 → ~91,
88
+ removing halation) and **dim/meta text raised `#858585 → #a0a0a0`** (APCA
89
+ Lc ~36 → ~49 — the actual "hard to read" fix). WCAG 2.x over-rates contrast on
90
+ pure black, so pairings "passed" while reading poorly; the re-tune clears WCAG
91
+ AA on every pairing and lifts perceptual (APCA) contrast. Accent and status
92
+ colours are unchanged; true black stays available via `data-surface="oled"`.
93
+ - **Browser floor raised to Chrome/Edge 125+, Safari 18+, Firefox 129+**
94
+ (early–mid 2025). A deliberate greenfield stance (ADR-0002) so the framework
95
+ can build natively on `@starting-style`, `transition-behavior: allow-discrete`,
96
+ `oklch()`/relative color, and `light-dark()`. No fallbacks ship below the
97
+ floor; not-yet-cross-engine features (View Transitions, scroll-driven
98
+ animations) are enhancement-only and degrade to a static end-state.
99
+ - Bundle budget nudged for the new motion: gzip 13.0 → 13.5 kB (for the dialog
100
+ enter/exit work) and raw 76 → 77 kB (for the popover/toast/accordion motion
101
+ plus the scroll-driven + view-transition CSS). Gzip held at ~13.1 kB — it
102
+ compresses well — so the compressed payload still has headroom.
103
+
104
+ ### Fixed
105
+
106
+ - React and Solid bindings now resolve scoped roots on mount, so `{ root: ref }`
107
+ and resolver callbacks work after framework refs are assigned. Nullish resolver
108
+ results normalize to default behavior instead of crashing destructuring
109
+ behavior initializers.
110
+ - Scoped behavior roots now resolve controlled ids root-first, then
111
+ document-wide. This keeps existing body/portal-mounted dialogs, popovers, and
112
+ disclosure panels working while preventing earlier duplicate ids outside an
113
+ island from shadowing the in-root target.
114
+ - `data-bronto-dismiss="<selector>"` ignores malformed selectors instead of
115
+ throwing during event handling.
116
+ - The one-node glyph mask path now includes a WebKit-prefixed mask declaration,
117
+ and the OKLCH accent ramp uses an explicit white/black neutral endpoint for
118
+ cross-engine browser parity.
119
+
120
+ ### Added
121
+
122
+ - React and Solid Vite examples, CI/release matrix coverage for those examples,
123
+ runtime binding tests, public API stability docs, a release runbook, and
124
+ `npm run size:report`.
125
+
7
126
  ## 0.4.0 — 2026-05-31
8
127
 
9
- The color-system release — [ADR-0001](docs/adr/0001-color-system.md) steps 1–7.
128
+ The color-system release — [ADR-0001](docs/adr/0001-color-system.md) steps 1–8.
10
129
  A governed evolution beyond pure monochrome: the tier model is written down and
11
130
  **enforced** (`check:color-policy`), and the "Nothing" look is proven to be a
12
131
  _skin, not the architecture_ — opt-in **colorways** (amber CRT · phosphor green ·
@@ -34,11 +153,11 @@ categorical color lands later it ships as a governed, opt-in data-viz module
34
153
  ### Added
35
154
 
36
155
  - **The `--accent-1..6` ramp is now perceptually even (OKLCH).** Steps 1–4 mix
37
- the accent toward the background `in oklch` instead of `in srgb` (ADR-0001
38
- step 8), so the ramp reads as evenly-spaced better for charts / multi-state
39
- surfaces. `scripts/gen-resolved.mjs` learned to resolve `color-mix(in oklch,…)`
40
- hex (bit-for-bit matching browser `color-mix`), so `tokens/resolved.json`,
41
- the DTCG export, and `docs/reference.md` all carry the new values. These are
156
+ the accent `in oklch` instead of using the old sRGB ramp (ADR-0001 step 8), so
157
+ the ramp reads as evenly-spaced. `scripts/gen-resolved.mjs` learned to resolve
158
+ `color-mix(in oklch,…)` → hex with the same one-channel tolerance browsers
159
+ show, so `tokens/resolved.json`, the DTCG export, and `docs/reference.md` all
160
+ carry the new values. These are
42
161
  token **values** (non-contractual under the 0.x policy) and the ramp is not
43
162
  consumed by any shipped component, so there is **no change to any component's
44
163
  rendering** — only consumers using `var(--accent-1..4)` directly see the
@@ -102,10 +221,9 @@ categorical color lands later it ships as a governed, opt-in data-viz module
102
221
  - **`check:skins` gate** — `css/skins.css` can't drift from `tokens/skins.js`,
103
222
  every skin defines `--accent`, and colorways stay out of the default bundle.
104
223
  - **[ADR-0001 — Color system](docs/adr/0001-color-system.md)** — the five-tier
105
- color constitution and the backward-compatible roadmap. Steps 1–6 are
106
- implemented in this release (gate + colorways + Tier-3 tokens + OKLCH for new
107
- work + APCA advisory); the data-viz categorical module and any core-ramp
108
- OKLCH migration are deliberately deferred.
224
+ color constitution and the backward-compatible roadmap. Steps 1–8 are
225
+ implemented in this release: gate + colorways + Tier-3 tokens + OKLCH for new
226
+ work + APCA advisory + data-viz + OKLCH core accent ramp.
109
227
 
110
228
  ## 0.3.6 — 2026-05-31
111
229
 
package/README.md CHANGED
@@ -3,7 +3,7 @@
3
3
  [![npm](https://img.shields.io/npm/v/@ponchia/ui?logo=npm)](https://www.npmjs.com/package/@ponchia/ui)
4
4
  [![npm provenance](https://img.shields.io/badge/npm-provenance-blue?logo=npm)](https://www.npmjs.com/package/@ponchia/ui#provenance)
5
5
  [![runtime deps](https://img.shields.io/badge/runtime%20deps-0-brightgreen)](https://github.com/Ponchia/bronto-ui/blob/main/package.json)
6
- [![dist](https://img.shields.io/badge/dist-~73kB%20%2F%20~13kB%20gzip-informational)](https://github.com/Ponchia/bronto-ui/blob/main/scripts/check-dist.mjs)
6
+ [![dist](https://img.shields.io/badge/dist-~75kB%20%2F%20~13kB%20gzip-informational)](https://github.com/Ponchia/bronto-ui/blob/main/scripts/check-dist.mjs)
7
7
  [![CI](https://github.com/Ponchia/bronto-ui/actions/workflows/ci.yml/badge.svg)](https://github.com/Ponchia/bronto-ui/actions/workflows/ci.yml)
8
8
  [![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Ponchia/bronto-ui/badge)](https://scorecard.dev/viewer/?uri=github.com/Ponchia/bronto-ui)
9
9
  [![license: MIT](https://img.shields.io/badge/license-MIT-blue)](https://github.com/Ponchia/bronto-ui/blob/main/LICENSE)
@@ -34,7 +34,7 @@ Or drop it in with no build step, straight from a CDN:
34
34
 
35
35
  ## Quick start
36
36
 
37
- **1. Load the CSS.** One flattened, minified bundle — the whole framework, one request (~73 kB raw / ~13 kB gzip):
37
+ **1. Load the CSS.** One flattened, minified bundle — the whole framework, one request (~75 kB raw / ~13 kB gzip):
38
38
 
39
39
  ```css
40
40
  @import '@ponchia/ui'; /* via a bundler */
@@ -79,7 +79,7 @@ toast('Saved', { tone: 'success' }); // body-anchored stack, no markup needed
79
79
 
80
80
  Behaviors cover theme persistence, disclosure, dropdown menus, native-`<dialog>` modals/drawers, tabs, combobox, form validation, table sort, carousel and toasts — wired by `data-bronto-*` attributes.
81
81
 
82
- **5. (Optional) display glyphs — a 43-glyph dot-matrix icon set:**
82
+ **5. (Optional) display glyphs — a 48-glyph dot-matrix icon set:**
83
83
 
84
84
  ```js
85
85
  import { renderGlyph } from '@ponchia/ui/glyphs';
@@ -89,7 +89,7 @@ el.innerHTML = renderGlyph('search', { label: 'Search' }); // role="img"
89
89
  // import { initDotGlyph } from '@ponchia/ui/behaviors'; initDotGlyph();
90
90
  ```
91
91
 
92
- Arrows, chevrons, check/close/plus/minus, search/menu/gear, info/warning/bell/lock, home/user/heart/star/spark rendered on the same `.ui-dotmatrix` primitive and re-skinned by the `--field-dot*` tokens (no SVG, no font). Default dot look is for **display** sizes; pass **`{ solid: true }`** to fuse the cells into a crisp pixel glyph that works as an **inline icon down to ~16px**.
92
+ Arrows, chevrons, check/close/plus/minus, search/menu/gear, info/warning/bell/lock, home/user/heart/star/spark and circle-family marks are rendered on the same `.ui-dotmatrix` primitive and re-skinned by the `--field-dot*` tokens. Default dot look is for **display** sizes; pass **`{ solid: true }`** to fuse the cells into a crisp pixel glyph that works as an **inline icon down to ~16px**. For dense lists/tables, `renderGlyph(name, { render: 'mask' })` emits one `.ui-icon` element backed by an internal CSS mask.
93
93
 
94
94
  ## What's in the box
95
95
 
@@ -100,8 +100,9 @@ Arrows, chevrons, check/close/plus/minus, search/menu/gear, info/warning/bell/lo
100
100
  - **Disclosure & nav** — tabs, accordion, segmented, breadcrumb, pagination, `ui-steps`, `ui-timeline`, `ui-pagehead`, `ui-kbd`.
101
101
  - **Shells** — an admin dashboard shell (`ui-app-*`) and a content/marketing site shell (`ui-site*`, `ui-container`).
102
102
  - **Prose** — `.ui-prose` styles raw, unclassed semantic HTML (Markdown / CMS / LLM output) with zero classes.
103
+ - **Reports** _(opt-in)_ — `@ponchia/ui/css/report.css`, a static/PDF-first report grammar for LLM-authored HTML: covers, sections, findings, evidence, figures, chart wrappers and print utilities.
103
104
  - **Motion & dots** — the dot-matrix motif kit: dot grid, status dots, dot loaders, the orbital spinner, matrix reveal — all reduced-motion aware.
104
- - **Glyphs** — `@ponchia/ui/glyphs`, a 43-glyph dot-matrix icon set on the `.ui-dotmatrix` primitive (display marks + crisp `solid` inline icons), no SVG/font.
105
+ - **Glyphs** — `@ponchia/ui/glyphs`, a 48-glyph dot-matrix icon set on the `.ui-dotmatrix` primitive (display marks + crisp `solid` inline icons + one-node `.ui-icon` mask rendering).
105
106
  - **Colorways** _(opt-in)_ — `data-bronto-skin="amber-crt | phosphor-green | e-ink"`: a root-level recolour of the one accent (OKLCH, per-theme, contrast-gated), never in the default bundle.
106
107
  - **Data-viz** _(opt-in)_ — a colourblind-safe chart palette (`--chart-*` + dot-matrix pattern fills, resolved hex in `charts.json`), gated under simulated protan/deutan/tritan vision. Charts only, never UI chrome.
107
108
 
@@ -128,7 +129,7 @@ Not an afterthought — a gate. Every contractual token pairing has a declared W
128
129
 
129
130
  ## Works with anything
130
131
 
131
- The CSS is the framework, so it works with React, Svelte/SvelteKit, Astro, Vue, Solid or plain HTML — there's no component runtime to adopt. The optional `classes` and `behaviors` entrypoints pull in **no** UI framework and are SSR-safe. For React and Solid there are also **optional thin bindings** — `@ponchia/ui/react` and `@ponchia/ui/solid` wrap the behaviors as hooks (`useDialog`, `useToast`, …); `react`/`solid-js` are optional peer deps, so the core stays zero-dependency.
132
+ The CSS is the framework, so it works with React, Svelte/SvelteKit, Astro, Vue, Solid, Qwik or plain HTML — there's no component runtime to adopt. The optional `classes` and `behaviors` entrypoints pull in **no** UI framework and are SSR-safe. For React, Solid and Qwik there are also **optional thin bindings** — `@ponchia/ui/react`, `@ponchia/ui/solid` and `@ponchia/ui/qwik` wrap the behaviors as hooks (`useDialog`, `useToast`, …); `react`/`solid-js`/`@builder.io/qwik` are optional peer deps, so the core stays zero-dependency.
132
133
 
133
134
  Per-framework getting-started guides + runnable example apps live in the repo:
134
135
 
@@ -137,37 +138,43 @@ Per-framework getting-started guides + runnable example apps live in the repo:
137
138
  | Vanilla / Vite / plain HTML | [vanilla.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/vanilla.md) | [`examples/vanilla-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/vanilla-vite) |
138
139
  | Astro | [astro.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/astro.md) | [`examples/astro`](https://github.com/Ponchia/bronto-ui/tree/main/examples/astro) |
139
140
  | SvelteKit | [sveltekit.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/sveltekit.md) | [`examples/sveltekit`](https://github.com/Ponchia/bronto-ui/tree/main/examples/sveltekit) |
140
- | React / Solid (snippet) | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | |
141
+ | React | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/react-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/react-vite) |
142
+ | Solid | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/solid-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/solid-vite) |
143
+ | Qwik | [react-solid.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/getting-started/react-solid.md) | [`examples/qwik-vite`](https://github.com/Ponchia/bronto-ui/tree/main/examples/qwik-vite) |
141
144
  | Tailwind / cascade-layer interop | [tailwind.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/interop/tailwind.md) | — |
142
145
 
143
146
  ## Extras
144
147
 
145
148
  - **Tokens as data** — `import tokens, { themeColor, cssVars } from '@ponchia/ui/tokens'` (plus `tokens.json`, W3C DTCG `tokens.dtcg.json`, and `tokens/resolved.json` — concrete hex per theme for canvas/SVG/MapLibre).
146
- - **Chart colours for dashboards** — `import charts from '@ponchia/ui/charts.json'` (resolved hex per theme; series 1 = your accent) and the opt-in `@ponchia/ui/css/dataviz.css`.
149
+ - **Chart colours for dashboards** — `import charts from '@ponchia/ui/charts.json' with { type: 'json' }` in Node ESM, or the same path through a bundler JSON import (resolved hex per theme; series 1 = your accent) plus the opt-in `@ponchia/ui/css/dataviz.css`.
150
+ - **Static reports for LLMs** — add `@ponchia/ui/css/report.css` for report structure and print utilities; pair with `@ponchia/ui/css/dataviz.css` only when the report contains charts. Full cookbook: `docs/reporting.md`.
151
+ - **Modern-platform motion** — overlays (modal/drawer/popover), toasts and the `<details>` accordion animate **in and out** with zero JS (`@starting-style` + `allow-discrete`, `::details-content` + `interpolate-size`). Progressive-enhancement extras: `.ui-scroll-progress` / `.ui-scroll-reveal` (scroll-driven, no JS) and `.ui-vt` for View Transitions. All degrade to a static end-state and respect `prefers-reduced-motion`. For smooth **cross-document** navigations, add the document-global one-liner to your own top-level (unlayered) CSS: `@view-transition { navigation: auto; }`.
147
152
  - **Editor IntelliSense** — point VS Code at the shipped custom-data file so every token autocompletes in `var(--…)`:
148
153
  ```json
149
154
  { "css.customData": ["node_modules/@ponchia/ui/classes/vscode.css-custom-data.json"] }
150
155
  ```
151
- - **For AI coding agents** — the package ships `llms.txt` at its root plus `docs/reference.md`, `docs/usage.md`, `docs/theming.md`, `docs/contrast.md`, the color constitution `docs/adr/0001-color-system.md` and the `CHANGELOG` inside the tarball, so an offline agent has the full API and rationale without guessing.
156
+ - **For AI coding agents** — the package ships `llms.txt` at its root plus `docs/reference.md`, `docs/usage.md`, `docs/reporting.md`, `docs/theming.md`, `docs/contrast.md`, `docs/stability.md`, the color constitution `docs/adr/0001-color-system.md` and the `CHANGELOG` inside the tarball, so an offline agent has the full API and rationale without guessing.
152
157
 
153
- > The package root is **CSS-only**: `@import '@ponchia/ui'` in CSS, never `import '@ponchia/ui'` in JS. The JS entrypoints are the explicit subpaths `/tokens`, `/classes`, `/behaviors`, `/glyphs`.
158
+ > The package root is **CSS-only**. Use `@import '@ponchia/ui'` in CSS, or `import '@ponchia/ui'` only as a CSS side-effect import in a CSS-aware bundler (Vite, Astro, SvelteKit, webpack). Do not import the package root from Node/runtime JS. JS entrypoints are explicit subpaths: `/tokens`, `/classes`, `/behaviors`, `/glyphs`, `/react`, `/solid`, `/qwik`, `/skins`, and `/charts`.
159
+ > JS subpaths are **ESM-only**. CommonJS consumers should use dynamic
160
+ > `import('@ponchia/ui/behaviors')`.
154
161
 
155
162
  ## Browser support
156
163
 
157
- Evergreen only. The framework relies on cascade layers, `:has()`, `color-mix()`, CSS logical properties and native `<dialog>`. Floor: **Chrome/Edge 111+, Safari 16.4+, Firefox 121+** (early 2023 onward). No build-time fallback ships; pin an older tag if you need below this.
164
+ Recent-evergreen, by design. The framework targets the modern web platform — cascade layers, `:has()`, `color-mix()`/`oklch()`, logical properties, native `<dialog>`, and the 2026 interaction primitives (`@starting-style`, `transition-behavior: allow-discrete`, `light-dark()`). Floor: **Chrome/Edge 125+, Safari 18+, Firefox 129+** (early–mid 2025). No fallback ships below this — pin an older tag if you need it. See [ADR-0002](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0002-scope-and-2026-baseline.md) for the scope/greenfield rationale.
158
165
 
159
166
  ## Versioning
160
167
 
161
168
  Pre-1.0 and deliberately so. **Until `1.0.0`, breaking changes ship in the _minor_** (`0.x.0`); patches (`0.x.y`) are always non-breaking. Pin with the patch range — at `0.x`, `~0.4.0` (and equivalently `^0.4.0`) resolves to `>=0.4.0 <0.5.0`, giving you safe patches while holding back the next breaking minor. Every breaking change is called out under a **BREAKING** heading in the **[CHANGELOG](https://github.com/Ponchia/bronto-ui/blob/main/CHANGELOG.md)** with a migration note.
162
169
 
163
- Contractual (changes are breaking): the `--accent` derivation and token **names**, the `.ui-*` class and recipe names, the `data-bronto-*` attributes, and each behavior's cleanup contract. Not contractual (may change any release): token **values** (visual tuning) and internal leaf-file / `@layer` boundaries.
170
+ Contractual (changes are breaking): token **names** and documented token roles, `.ui-*` class and recipe names, `data-bronto-*` attributes, exported behavior/glyph/binding function names and each behavior's cleanup contract. Not contractual (may change any release): exact token **values** and generated colour math outputs (visual tuning) unless a doc explicitly says the value is stable, plus internal leaf-file / `@layer` boundaries. See **[docs/stability.md](https://github.com/Ponchia/bronto-ui/blob/main/docs/stability.md)** for the full public-surface matrix.
164
171
 
165
172
  Release candidates publish to the `next` dist-tag, never to `latest` — opt in with `npm i @ponchia/ui@next` to try an upcoming version early. A plain `npm i @ponchia/ui` only ever resolves a stable release.
166
173
 
167
174
  ## Links
168
175
 
169
176
  - **[Live demo](https://ponchia.github.io/bronto-ui/)** · **[Theme playground](https://ponchia.github.io/bronto-ui/demo/theme-playground.html)**
170
- - **[Class reference](https://github.com/Ponchia/bronto-ui/blob/main/docs/reference.md)** · **[Usage guide](https://github.com/Ponchia/bronto-ui/blob/main/docs/usage.md)** · **[Theming](https://github.com/Ponchia/bronto-ui/blob/main/docs/theming.md)** · **[Contrast](https://github.com/Ponchia/bronto-ui/blob/main/docs/contrast.md)** · **[Color system (ADR-0001)](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0001-color-system.md)**
177
+ - **[Class reference](https://github.com/Ponchia/bronto-ui/blob/main/docs/reference.md)** · **[Usage guide](https://github.com/Ponchia/bronto-ui/blob/main/docs/usage.md)** · **[Theming](https://github.com/Ponchia/bronto-ui/blob/main/docs/theming.md)** · **[Contrast](https://github.com/Ponchia/bronto-ui/blob/main/docs/contrast.md)** · **[Color system (ADR-0001)](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0001-color-system.md)** · **[Scope & 2026 baseline (ADR-0002)](https://github.com/Ponchia/bronto-ui/blob/main/docs/adr/0002-scope-and-2026-baseline.md)**
171
178
  - **[CHANGELOG](https://github.com/Ponchia/bronto-ui/blob/main/CHANGELOG.md)** · **[Roadmap](https://github.com/Ponchia/bronto-ui/blob/main/ROADMAP.md)** · **[Contributing](https://github.com/Ponchia/bronto-ui/blob/main/CONTRIBUTING.md)**
172
179
 
173
180
  ## License
@@ -102,7 +102,9 @@ export declare function initTabs(opts?: DelegateOpts): Cleanup;
102
102
  /**
103
103
  * Wire native <dialog> open/close glue: `[data-bronto-open="id"]`,
104
104
  * `[data-bronto-close]`, and backdrop light-dismiss for dialogs marked
105
- * `[data-bronto-dialog-light]`. Returns a cleanup function.
105
+ * `[data-bronto-dialog-light]`. `root` scopes delegated controls; dialog ids
106
+ * resolve root-first, then document-wide for body/portal-mounted overlays.
107
+ * Returns a cleanup function.
106
108
  */
107
109
  export declare function initDialog(opts?: DelegateOpts): Cleanup;
108
110