@ponchia/ui 0.6.10 → 0.6.11

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 (140) hide show
  1. package/CHANGELOG.md +72 -0
  2. package/README.md +38 -25
  3. package/annotations/index.d.ts +15 -15
  4. package/annotations/index.d.ts.map +1 -1
  5. package/annotations/index.js +52 -34
  6. package/behaviors/carousel.d.ts +7 -3
  7. package/behaviors/carousel.d.ts.map +1 -1
  8. package/behaviors/carousel.js +157 -27
  9. package/behaviors/combobox.d.ts +1 -1
  10. package/behaviors/combobox.d.ts.map +1 -1
  11. package/behaviors/combobox.js +46 -23
  12. package/behaviors/command.d.ts +1 -1
  13. package/behaviors/command.d.ts.map +1 -1
  14. package/behaviors/command.js +63 -23
  15. package/behaviors/connectors.d.ts.map +1 -1
  16. package/behaviors/connectors.js +126 -19
  17. package/behaviors/crosshair.d.ts.map +1 -1
  18. package/behaviors/crosshair.js +71 -8
  19. package/behaviors/dialog.d.ts.map +1 -1
  20. package/behaviors/dialog.js +20 -3
  21. package/behaviors/disclosure.d.ts.map +1 -1
  22. package/behaviors/disclosure.js +35 -6
  23. package/behaviors/dismissible.js +1 -1
  24. package/behaviors/forms.d.ts +23 -2
  25. package/behaviors/forms.d.ts.map +1 -1
  26. package/behaviors/forms.js +97 -9
  27. package/behaviors/glyph.d.ts.map +1 -1
  28. package/behaviors/glyph.js +56 -5
  29. package/behaviors/internal.d.ts.map +1 -1
  30. package/behaviors/internal.js +52 -5
  31. package/behaviors/menu.d.ts.map +1 -1
  32. package/behaviors/menu.js +2 -1
  33. package/behaviors/modal.d.ts.map +1 -1
  34. package/behaviors/modal.js +25 -9
  35. package/behaviors/popover.d.ts.map +1 -1
  36. package/behaviors/popover.js +8 -6
  37. package/behaviors/sources.d.ts.map +1 -1
  38. package/behaviors/sources.js +24 -3
  39. package/behaviors/splitter.d.ts.map +1 -1
  40. package/behaviors/splitter.js +27 -6
  41. package/behaviors/table.d.ts.map +1 -1
  42. package/behaviors/table.js +44 -7
  43. package/behaviors/tabs.d.ts.map +1 -1
  44. package/behaviors/tabs.js +51 -14
  45. package/behaviors/theme.d.ts.map +1 -1
  46. package/behaviors/theme.js +64 -4
  47. package/behaviors/toast.d.ts +6 -1
  48. package/behaviors/toast.d.ts.map +1 -1
  49. package/behaviors/toast.js +48 -12
  50. package/classes/classes.json +24 -0
  51. package/classes/index.d.ts +3 -2
  52. package/classes/index.js +77 -39
  53. package/connectors/index.d.ts +4 -4
  54. package/connectors/index.d.ts.map +1 -1
  55. package/connectors/index.js +14 -12
  56. package/css/annotations.css +1 -0
  57. package/css/app.css +7 -0
  58. package/css/base.css +3 -0
  59. package/css/bullet.css +41 -7
  60. package/css/code.css +14 -0
  61. package/css/command.css +10 -0
  62. package/css/dataviz.css +27 -0
  63. package/css/diff.css +2 -0
  64. package/css/disclosure.css +8 -0
  65. package/css/dots.css +1 -1
  66. package/css/feedback.css +9 -0
  67. package/css/interval.css +20 -2
  68. package/css/legend.css +10 -9
  69. package/css/marks.css +1 -0
  70. package/css/motion.css +2 -0
  71. package/css/overlay.css +14 -2
  72. package/css/primitives.css +1 -1
  73. package/css/report.css +3 -0
  74. package/css/sources.css +4 -4
  75. package/css/spotlight.css +6 -0
  76. package/css/table.css +19 -0
  77. package/css/term.css +4 -1
  78. package/css/tokens.css +8 -13
  79. package/dist/bronto.css +1 -1
  80. package/dist/css/analytical.css +1 -1
  81. package/dist/css/app.css +1 -1
  82. package/dist/css/bullet.css +1 -1
  83. package/dist/css/code.css +1 -1
  84. package/dist/css/command.css +1 -1
  85. package/dist/css/dataviz.css +1 -1
  86. package/dist/css/diff.css +1 -1
  87. package/dist/css/disclosure.css +1 -1
  88. package/dist/css/dots.css +1 -1
  89. package/dist/css/feedback.css +1 -1
  90. package/dist/css/interval.css +1 -1
  91. package/dist/css/legend.css +1 -1
  92. package/dist/css/marks.css +1 -1
  93. package/dist/css/overlay.css +1 -1
  94. package/dist/css/primitives.css +1 -1
  95. package/dist/css/report-kit.css +1 -1
  96. package/dist/css/sources.css +1 -1
  97. package/dist/css/spotlight.css +1 -1
  98. package/dist/css/table.css +1 -1
  99. package/dist/css/term.css +1 -1
  100. package/dist/css/tokens.css +1 -1
  101. package/docs/architecture.md +5 -3
  102. package/docs/bullet.md +6 -1
  103. package/docs/clamp.md +5 -0
  104. package/docs/command.md +3 -2
  105. package/docs/contrast.md +3 -3
  106. package/docs/crosshair.md +6 -0
  107. package/docs/dots.md +10 -3
  108. package/docs/figure.md +7 -0
  109. package/docs/glyphs.md +14 -2
  110. package/docs/highlights.md +9 -0
  111. package/docs/interval.md +6 -0
  112. package/docs/mermaid.md +5 -3
  113. package/docs/package-contract.md +24 -1
  114. package/docs/reporting.md +8 -8
  115. package/docs/selection.md +9 -0
  116. package/docs/sources.md +5 -0
  117. package/docs/state.md +6 -0
  118. package/docs/textref.md +18 -13
  119. package/docs/theming.md +18 -8
  120. package/docs/toc.md +6 -0
  121. package/docs/tree.md +9 -2
  122. package/docs/usage.md +2 -2
  123. package/docs/vega.md +5 -3
  124. package/glyphs/glyphs.js +62 -8
  125. package/index.d.ts +1 -0
  126. package/llms.txt +18 -14
  127. package/package.json +98 -6
  128. package/qwik/index.d.ts +4 -3
  129. package/qwik/index.d.ts.map +1 -1
  130. package/qwik/index.js +7 -5
  131. package/react/index.d.ts +4 -3
  132. package/react/index.d.ts.map +1 -1
  133. package/react/index.js +3 -2
  134. package/solid/index.d.ts +7 -5
  135. package/solid/index.d.ts.map +1 -1
  136. package/solid/index.js +11 -7
  137. package/tokens/vega.d.ts +1 -1
  138. package/tokens/vega.js +3 -2
  139. package/vue/index.d.ts.map +1 -1
  140. package/vue/index.js +37 -3
@@ -25,7 +25,7 @@ semantic versioning contract for the surfaces listed here.
25
25
 
26
26
  | Export | Target | Group | Stability | Contract |
27
27
  | --- | --- | --- | --- | --- |
28
- | `.` | style: `./dist/bronto.css`<br>default: `./dist/bronto.css` | CSS root bundle | Stable | CSS-only package root. Supported as a CSS side-effect import in CSS-aware bundlers; not a Node/runtime JS entrypoint. |
28
+ | `.` | types: `./index.d.ts`<br>style: `./dist/bronto.css`<br>default: `./dist/bronto.css` | CSS root bundle | Stable | CSS-only package root. Supported as a CSS side-effect import in CSS-aware bundlers; not a Node/runtime JS entrypoint. |
29
29
  | `./dist/bronto.css` | `./dist/bronto.css` | Flattened CSS bundle | Stable path | The prebuilt default stylesheet. Generated from css/core.css and byte-checked by check:dist. |
30
30
  | `./tailwind` | `./tailwind.css` | Tailwind CSS bridge | Stable additive | CSS-only Tailwind v4 theme/variant bridge. It maps Bronto tokens into Tailwind namespaces; it does not import component CSS. |
31
31
  | `./tailwind.css` | `./tailwind.css` | Tailwind CSS bridge | Stable additive | CSS-only Tailwind v4 theme/variant bridge. It maps Bronto tokens into Tailwind namespaces; it does not import component CSS. |
@@ -180,6 +180,28 @@ semantic versioning contract for the surfaces listed here.
180
180
  | `./classes` | types: `./classes/index.d.ts`<br>default: `./classes/index.js` | Class recipes JS | Stable | ESM class registry, recipes, attrs helpers, and cx joiner. The emitted class vocabulary is public. |
181
181
  | `./classes.json` | `./classes/classes.json` | Machine-readable data | Stable additive | JSON package data for non-JS/tooling consumers. Shape is public unless the paired doc marks a field internal. |
182
182
  | `./behaviors` | types: `./behaviors/index.d.ts`<br>default: `./behaviors/index.js` | Vanilla behavior JS | Stable | ESM, SSR-safe, cleanup-returning behavior initializers. Behavior internals are not public. |
183
+ | `./behaviors/carousel` | types: `./behaviors/carousel.d.ts`<br>default: `./behaviors/carousel.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
184
+ | `./behaviors/combobox` | types: `./behaviors/combobox.d.ts`<br>default: `./behaviors/combobox.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
185
+ | `./behaviors/command` | types: `./behaviors/command.d.ts`<br>default: `./behaviors/command.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
186
+ | `./behaviors/connectors` | types: `./behaviors/connectors.d.ts`<br>default: `./behaviors/connectors.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
187
+ | `./behaviors/crosshair` | types: `./behaviors/crosshair.d.ts`<br>default: `./behaviors/crosshair.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
188
+ | `./behaviors/dialog` | types: `./behaviors/dialog.d.ts`<br>default: `./behaviors/dialog.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
189
+ | `./behaviors/disclosure` | types: `./behaviors/disclosure.d.ts`<br>default: `./behaviors/disclosure.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
190
+ | `./behaviors/dismissible` | types: `./behaviors/dismissible.d.ts`<br>default: `./behaviors/dismissible.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
191
+ | `./behaviors/forms` | types: `./behaviors/forms.d.ts`<br>default: `./behaviors/forms.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
192
+ | `./behaviors/glyph` | types: `./behaviors/glyph.d.ts`<br>default: `./behaviors/glyph.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
193
+ | `./behaviors/inert` | types: `./behaviors/inert.d.ts`<br>default: `./behaviors/inert.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
194
+ | `./behaviors/legend` | types: `./behaviors/legend.d.ts`<br>default: `./behaviors/legend.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
195
+ | `./behaviors/menu` | types: `./behaviors/menu.d.ts`<br>default: `./behaviors/menu.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
196
+ | `./behaviors/modal` | types: `./behaviors/modal.d.ts`<br>default: `./behaviors/modal.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
197
+ | `./behaviors/popover` | types: `./behaviors/popover.d.ts`<br>default: `./behaviors/popover.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
198
+ | `./behaviors/sources` | types: `./behaviors/sources.d.ts`<br>default: `./behaviors/sources.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
199
+ | `./behaviors/splitter` | types: `./behaviors/splitter.d.ts`<br>default: `./behaviors/splitter.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
200
+ | `./behaviors/spotlight` | types: `./behaviors/spotlight.d.ts`<br>default: `./behaviors/spotlight.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
201
+ | `./behaviors/table` | types: `./behaviors/table.d.ts`<br>default: `./behaviors/table.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
202
+ | `./behaviors/tabs` | types: `./behaviors/tabs.d.ts`<br>default: `./behaviors/tabs.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
203
+ | `./behaviors/theme` | types: `./behaviors/theme.d.ts`<br>default: `./behaviors/theme.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
204
+ | `./behaviors/toast` | types: `./behaviors/toast.d.ts`<br>default: `./behaviors/toast.js` | Package subpath | Public | Exported package subpath. See docs/stability.md for semantic stability. |
183
205
  | `./glyphs` | types: `./glyphs/glyphs.d.ts`<br>default: `./glyphs/glyphs.js` | Geometry/render helper JS | Stable additive | ESM helper surface. Function names, options, and data shapes are public; rendering heuristics may tune. |
184
206
  | `./annotations` | types: `./annotations/index.d.ts`<br>default: `./annotations/index.js` | Geometry/render helper JS | Stable additive | ESM helper surface. Function names, options, and data shapes are public; rendering heuristics may tune. |
185
207
  | `./connectors` | types: `./connectors/index.d.ts`<br>default: `./connectors/index.js` | Geometry/render helper JS | Stable additive | ESM helper surface. Function names, options, and data shapes are public; rendering heuristics may tune. |
@@ -210,6 +232,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
210
232
  | `css` | Source CSS directory | Public source leaves. Mostly hand-authored; generated exceptions are called out in the provenance table. |
211
233
  | `dist` | Generated CSS directory | Prebuilt layered bundle and leaves. Never hand-edit. |
212
234
  | `tailwind.css` | Tailwind CSS bridge | CSS-only Tailwind v4 theme/variant bridge; hand-authored and not part of the default Bronto bundle. |
235
+ | `index.d.ts` | Package file | Included in the npm files allowlist. |
213
236
  | `fonts` | Vendored assets | Doto woff2 files plus OFL license. |
214
237
  | `tokens` | Mixed source/generated data | Token source plus generated JSON, declarations, and renderer theme data. |
215
238
  | `classes` | Mixed source/generated data | Class recipe source plus generated JSON/declarations/custom-data. |
package/docs/reporting.md CHANGED
@@ -54,18 +54,18 @@ No install? Link the same files from a CDN. Pin the version — pre-1.0, breakin
54
54
  changes ship in the minor (see [stability.md](./stability.md)):
55
55
 
56
56
  ```html
57
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/bronto.css" />
58
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/report-kit.css" />
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/bronto.css" />
58
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/report-kit.css" />
59
59
  ```
60
60
 
61
61
  Leaf-by-leaf CDN imports use the same `dist/css/` paths:
62
62
 
63
63
  ```html
64
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/bronto.css" />
65
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/report.css" />
66
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/dataviz.css" />
67
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/annotations.css" />
68
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/legend.css" />
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/bronto.css" />
65
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/report.css" />
66
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/dataviz.css" />
67
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/annotations.css" />
68
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/legend.css" />
69
69
  ```
70
70
 
71
71
  The CDN serves the package's own `fonts/` next to the CSS, so font URLs resolve
@@ -879,7 +879,7 @@ or validation runtime.
879
879
 
880
880
  ```json
881
881
  {
882
- "$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/schemas/report-claims.v1.schema.json",
882
+ "$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/schemas/report-claims.v1.schema.json",
883
883
  "schemaVersion": "bronto-report-claims.v1",
884
884
  "report": { "title": "Decision readiness", "type": "decision" },
885
885
  "claims": [
package/docs/selection.md CHANGED
@@ -34,7 +34,16 @@ logic — Bronto only styles them. `--off` uses `opacity` (which survives
34
34
  forced-colors), and `--on` falls back to the system `Highlight` color in
35
35
  forced-colors so the selection stays visible.
36
36
 
37
+ Pair the visual classes with host-owned selection semantics, such as
38
+ `aria-selected`, native checked state, or a visible selected-count label.
39
+
37
40
  > **Why no brush behavior?** A rectangular brush or lasso must translate a
38
41
  > dragged region into a data domain (or test points against a polygon), which
39
42
  > requires owning the chart's scales/geometry — across Bronto's line. Bring your
40
43
  > own selection logic; use these classes to render the result.
44
+
45
+ ## Related
46
+
47
+ `selection.css` is part of
48
+ [`analytical.css`](./reporting.md#the-analytical-toolbox-in-a-report). Use
49
+ [reference.md](./reference.md) for the generated class catalog.
package/docs/sources.md CHANGED
@@ -167,3 +167,8 @@ ui.provenance({ state: 'reviewed' }); // "ui-provenance ui-src--reviewed"
167
167
  `CanvasText`, so the label remains the channel.
168
168
  - Tone dots and the card's tone border carry `print-color-adjust: exact`, so
169
169
  they survive printing; expand citation URLs in print where it helps the reader.
170
+
171
+ ## Related
172
+
173
+ - [Usage](usage.md#static-reports) shows where citations fit in reports.
174
+ - [Reference](reference.md) lists the generated source and citation classes.
package/docs/state.md CHANGED
@@ -140,3 +140,9 @@ CSS only — there is no JS yet. Auto-updating elapsed time ("2m ago"), live
140
140
  progress text, polling, cancellation, retry, and conflict-resolution affordances
141
141
  are the host's job. A small optional behavior may come later if a real consumer
142
142
  needs it.
143
+
144
+ ## Related
145
+
146
+ Use the [reporting toolbox](./reporting.md#the-analytical-toolbox-in-a-report)
147
+ to place `state.css` in report surfaces, and use
148
+ [reference.md](./reference.md) for the generated class catalog.
package/docs/textref.md CHANGED
@@ -3,10 +3,11 @@
3
3
  `@ponchia/ui/css/textref.css` is an opt-in **deep-link-to-the-cited-sentence**
4
4
  provenance primitive. A citation whose `href` is a URL [Text
5
5
  Fragment](https://developer.mozilla.org/en-US/docs/Web/Text_fragments)
6
- (`#…:~:text=`): the browser scrolls to the exact quoted text and highlights it,
7
- and Bronto owns the on-brand `::target-text` paint. It is the inline counterpart
8
- to the static `ui-src` / `ui-citation` trust layer (`sources.css`), which can
9
- label a source but cannot point *inside* it.
6
+ (`#section:~:text=`): supporting browsers scroll to the exact quoted text and
7
+ highlight it, while the leading `#section` gives older engines a stable landing.
8
+ Bronto owns the on-brand `::target-text` paint. It is the inline counterpart to
9
+ the static `ui-src` / `ui-citation` trust layer (`sources.css`), which can label
10
+ a source but cannot point *inside* it.
10
11
 
11
12
  ```css
12
13
  @import '@ponchia/ui';
@@ -15,12 +16,13 @@ label a source but cannot point *inside* it.
15
16
 
16
17
  ## How it behaves
17
18
 
18
- - The link navigates to the document and the browser scrolls to + highlights the
19
- first match of the quoted text — no script, no anchors to pre-place.
19
+ - In Chrome/Edge 80+, Safari 16.1+, and Firefox 131+, the browser scrolls to
20
+ and highlights the first match of the quoted text — no script.
20
21
  - Bronto repaints that browser highlight (`::target-text`) in the rationed
21
22
  accent wash so it matches the rest of the trust layer.
22
- - On engines without Text Fragments the link still navigates to the page (or its
23
- `#section` anchor); the highlight is purely additive, so nothing breaks.
23
+ - On engines without Text Fragments, the `:~:text=` directive is ignored. Use a
24
+ real `#section:~:text=...` URL when you own the target page; a bare `#section`
25
+ can land only at the section, not at the quoted sentence.
24
26
 
25
27
  ## Wiring — the host builds the fragment URL
26
28
 
@@ -30,11 +32,12 @@ runtime for it. Build the `href` with a three-line pure helper and drop it on th
30
32
 
31
33
  ```js
32
34
  // Encode a quote as a URL Text Fragment directive.
33
- // encodeTextFragment('p95 latency fell 38%') -> '#:~:text=p95%20latency%20fell%2038%25'
34
- export function encodeTextFragment(quote, { prefix } = {}) {
35
+ // encodeTextFragment('p95 latency fell 38%', { section: 'incident-summary' })
36
+ // -> '#incident-summary:~:text=p95%20latency%20fell%2038%25'
37
+ export function encodeTextFragment(quote, { prefix, section } = {}) {
35
38
  const enc = (s) => encodeURIComponent(s).replace(/-/g, '%2D');
36
39
  const text = prefix ? `${enc(prefix)}-,${enc(quote)}` : enc(quote);
37
- return `#:~:text=${text}`;
40
+ return `${section ? `#${encodeURIComponent(section)}` : '#'}:~:text=${text}`;
38
41
  }
39
42
  ```
40
43
 
@@ -43,7 +46,7 @@ export function encodeTextFragment(quote, { prefix } = {}) {
43
46
  The migration cut p95 latency by 38%
44
47
  <a
45
48
  class="ui-textref"
46
- href="https://example.com/incident-review#:~:text=p95%20latency%20fell%2038%25"
49
+ href="https://example.com/incident-review#incident-summary:~:text=p95%20latency%20fell%2038%25"
47
50
  >jump to the source</a
48
51
  >.
49
52
  </p>
@@ -56,12 +59,14 @@ Notes for an autonomous author:
56
59
  - Keep the quote short and verbatim; a fuzzy or paraphrased quote won't match.
57
60
  - Use the optional `prefix` (a `prefix-,` directive) to disambiguate a quote that
58
61
  appears more than once on the target page.
62
+ - Firefox support starts at 131. The project floor includes Firefox 129, so make
63
+ the leading section fallback meaningful when exact quote landing matters.
59
64
 
60
65
  ## Class reference
61
66
 
62
67
  | Class | Role |
63
68
  | ------------- | ------------------------------------------------------------------- |
64
- | `.ui-textref` | A citation link whose `href` is a `#:~:text=` fragment; dotted underline + quote-jump cue. |
69
+ | `.ui-textref` | A citation link whose `href` is a `#section:~:text=` fragment; dotted underline + quote-jump cue. |
65
70
 
66
71
  | Custom property | On | Meaning |
67
72
  | ---------------------- | ------------- | ------------------------------------------------------------------------- |
package/docs/theming.md CHANGED
@@ -26,8 +26,15 @@ So a full re-brand is one declaration **at `:root` (or a theme root)**:
26
26
  :root[data-theme='dark'] { --accent: #6ea8ff; } /* per-theme tuning */
27
27
  ```
28
28
 
29
- Everything — buttons, focus rings, dot motifs, accent borders, soft
30
- fills — follows automatically, in both light and dark.
29
+ Core DOM accent surfaces — buttons, focus rings, dot motifs, accent borders,
30
+ soft fills — follow automatically, in both light and dark.
31
+
32
+ That scope matters. `--accent` is the core action/emphasis hue, not the whole
33
+ color system. Status colors (`--success`, `--warning`, `--danger`, `--info`),
34
+ neutral surface tiers, display-expression tokens, and the opt-in data-viz
35
+ palette stay separate governed tiers. Mermaid, D2, and Vega bridges emit
36
+ resolved renderer theme data; a rendered SVG or canvas does not live-reskin when
37
+ you change CSS `--accent` later.
31
38
 
32
39
  > **Re-branding a subtree (not `:root`) is only a *partial* re-brand.**
33
40
  > The derived family (`--accent-soft`, `--accent-strong`, `--accent-text`,
@@ -53,6 +60,8 @@ fills — follows automatically, in both light and dark.
53
60
  > When in doubt, re-brand at `:root`/`[data-theme]` — that path re-derives
54
61
  > the whole family for you.
55
62
 
63
+ ### Re-brand obligations
64
+
56
65
  > **Two contrast obligations when you change `--accent`:**
57
66
  >
58
67
  > 1. **Buttons** — pick an `--accent` with ≥ 4.5:1 against `--button-text`
@@ -106,7 +115,7 @@ fills — follows automatically, in both light and dark.
106
115
  set `accent-color` yourself on them — this is the one accent surface
107
116
  the framework can't tune for you.
108
117
 
109
- ## Beyond accent: a full re-skin (the knob really works)
118
+ ## Beyond accent: full re-skins
110
119
 
111
120
  The "Nothing" look is the **default skin, not the architecture**. It is
112
121
  a handful of token declarations deep — no selector hardcodes the
@@ -142,11 +151,12 @@ no fork:
142
151
  ```
143
152
 
144
153
  That changes buttons, cards, inputs, badges, focus rings, the display
145
- type and the dot motif together, because every component consumes those
146
- tokens — not because there is a per-component theme file. This is the
147
- difference between a *system* and a *skin*: the skin is swappable, the
148
- system (rationed colour, density, classless prose, minimal JS) is what
149
- you are actually adopting.
154
+ type and the dot motif together, because those surfaces consume the token
155
+ contract — not because there is a per-component theme file. It does not
156
+ rewrite status semantics or chart palettes; those are governed by their own
157
+ tiers. This is the difference between a *system* and a *skin*: the skin is
158
+ swappable, the system (rationed colour, density, classless prose, minimal JS)
159
+ is what you are actually adopting.
150
160
 
151
161
  Caveat, restated: a custom `--accent` is **your** contrast obligation —
152
162
  the shipped palettes are CI-gated ([contrast.md](contrast.md)), a re-skin
package/docs/toc.md CHANGED
@@ -81,3 +81,9 @@ for (const id of links.keys()) {
81
81
  navigation landmark.
82
82
  - Without the optional observer the rail is a normal anchored list — every link
83
83
  still jumps to its section.
84
+
85
+ ## Related
86
+
87
+ Use the [reporting toolbox](./reporting.md#the-analytical-toolbox-in-a-report)
88
+ to place `toc.css` in report surfaces, and use
89
+ [reference.md](./reference.md) for the generated class catalog.
package/docs/tree.md CHANGED
@@ -38,8 +38,9 @@ open/close animation come from the platform. This leaf is the hierarchy *layer*
38
38
  ```
39
39
 
40
40
  Add `name="…"` to sibling `<details class="ui-tree__branch">` to make them an
41
- exclusive-accordion group (only one open at a time) — a platform behaviour, no
42
- script.
41
+ exclusive-accordion group (only one open at a time) — a platform behaviour in
42
+ Chrome 120+, Safari 17.2+, and Firefox 130+. If Firefox 129 must enforce
43
+ exclusivity, add a host-owned JS fallback or leave the branches independent.
43
44
 
44
45
  ## A11y honesty — disclosure group, not an ARIA tree
45
46
 
@@ -72,3 +73,9 @@ honest as-is.
72
73
  open-branch accent cue is re-asserted with the system highlight.
73
74
  - The chevron spin and the auto-height animation both respect
74
75
  `prefers-reduced-motion`.
76
+
77
+ ## Related
78
+
79
+ Use the [reporting toolbox](./reporting.md#the-analytical-toolbox-in-a-report)
80
+ to place `tree.css` in report surfaces, and use
81
+ [reference.md](./reference.md) for the generated class catalog.
package/docs/usage.md CHANGED
@@ -404,7 +404,7 @@ infinite-clone track). It's a gallery: the user drives it.
404
404
 
405
405
  ## Display glyphs: when (and when not)
406
406
 
407
- `@ponchia/ui/glyphs` is a 48-glyph dot-matrix icon set — navigation
407
+ `@ponchia/ui/glyphs` is a 71-glyph dot-matrix icon set — navigation
408
408
  (`arrow-*`, `chevron-*`), actions (`check`, `close`, `plus`, `minus`,
409
409
  `search`, `menu`, `gear`), status (`info`, `warning`, `bell`, `lock`) and
410
410
  common marks (`home`, `user`, `heart`, `star`, `spark`, circle-family marks) — rendered on the
@@ -624,7 +624,6 @@ HTML, print/PDF, and before any hydration:
624
624
  | Accordion | native `<details>` / `<summary>` |
625
625
  | Segmented control (`ui-segmented`) | `:has(input:checked)` over a radio group |
626
626
  | Scroll-reveal (`ui-scroll-reveal`) | scroll-driven animation, zero JS |
627
- | Modal via native `<dialog>` | the element brings focus-trap + Escape; `initDialog` only adds open-triggers + focus-return |
628
627
 
629
628
  **Behavior-required — a CSS skin that needs its `init*` to be interactive.**
630
629
  These are JS widgets wearing the Bronto look; without the behavior they are inert
@@ -640,6 +639,7 @@ These are JS widgets wearing the Bronto look; without the behavior they are iner
640
639
  | Table sort/select (`[data-bronto-sortable]`) | `initTableSort` | a static table (still readable) |
641
640
  | Popover (`ui-popover`) | `initPopover` | no placement/ARIA — prefer the native `popover` attribute |
642
641
  | Carousel (`ui-carousel`) | `initCarousel` | a native scroll-snap track (usable, no controls) |
642
+ | Native dialog/lightbox (`<dialog>`, `ui-lightbox`) | `initDialog` | closed markup stays closed; `data-bronto-open`/close buttons do nothing. Do not use `open` as a modal fallback: it is non-modal and has no trigger/focus-return path |
643
643
  | Controlled modal (`ui-modal.is-open`) | `initModal` | open skin only — no inert trap, focus-return, or Escape close signal |
644
644
  | Menu (`data-bronto-menu`) | `initMenu` | a button next to a list with no open/close, outside-click, or Escape |
645
645
  | Dismissible alert/callout (`data-bronto-dismissible`) | `dismissible` | the close affordance is just a button; nothing is removed |
package/docs/vega.md CHANGED
@@ -143,8 +143,10 @@ series needs the redundant second channel, drive the mark's fill from the
143
143
 
144
144
  ### Spending the accent
145
145
 
146
- Series 1 of `range.category` **is** the live accent, so a single-series chart and
147
- the first category re-skin for free with `--accent`. To emphasise one mark in a
146
+ Series 1 of `range.category` resolves to the accent (per theme), so a single-series
147
+ chart and the first category carry the accent automatically baked into the
148
+ generated `config`, so regenerate the config and re-render to change it (Vega output
149
+ does not live-reskin from `--accent`). To emphasise one mark in a
148
150
  multi-series chart, paint just that mark with the accent and leave the rest
149
151
  neutral — the same "reserve the accent for the one thing a reader must not miss"
150
152
  rule the rest of the system follows. Two small helpers hand you the exact
@@ -169,7 +171,7 @@ const spec = {
169
171
  };
170
172
  ```
171
173
 
172
- `brontoVegaAccent(theme)` is `range.category[0]` (the live accent) and
174
+ `brontoVegaAccent(theme)` is `range.category[0]` (the resolved accent) and
173
175
  `brontoVegaNeutral(theme)` is the last category (the quiet neutral); re-read both
174
176
  when the theme toggles. Prefer them over digging the hex out of
175
177
  `tokens/resolved.json` — they are guaranteed to match the palette the config
package/glyphs/glyphs.js CHANGED
@@ -1396,14 +1396,18 @@ export function findGlyphs(query) {
1396
1396
 
1397
1397
  const TONE = { '#': 'hot', '*': 'accent' };
1398
1398
 
1399
+ function glyphRows(name) {
1400
+ return Object.hasOwn(GLYPHS, name) ? GLYPHS[name] : undefined;
1401
+ }
1402
+
1399
1403
  /** The raw bitmap rows for a glyph, or `undefined` if the name is unknown. */
1400
1404
  export function glyph(name) {
1401
- return GLYPHS[name];
1405
+ return glyphRows(name);
1402
1406
  }
1403
1407
 
1404
1408
  /** GLYPH_SIZE² cell descriptors (row-major), or `[]` if the name is unknown. */
1405
1409
  export function glyphCells(name) {
1406
- const rows = GLYPHS[name];
1410
+ const rows = glyphRows(name);
1407
1411
  if (!rows) return [];
1408
1412
  const cells = [];
1409
1413
  for (const row of rows) {
@@ -1425,7 +1429,7 @@ export function glyphCells(name) {
1425
1429
  * @returns {string}
1426
1430
  */
1427
1431
  export function glyphMask(name) {
1428
- const rows = GLYPHS[name];
1432
+ const rows = glyphRows(name);
1429
1433
  return rows ? maskUrl(rows) : '';
1430
1434
  }
1431
1435
 
@@ -1446,13 +1450,63 @@ function esc(s) {
1446
1450
  .replace(/"/g, '&quot;');
1447
1451
  }
1448
1452
 
1453
+ const CSS_LENGTH_UNITS =
1454
+ '(?:px|r?em|ch|ex|cap|ic|lh|rlh|vw|vh|vi|vb|vmin|vmax|' +
1455
+ 'svw|svh|svi|svb|svmin|svmax|lvw|lvh|lvi|lvb|lvmin|lvmax|' +
1456
+ 'dvw|dvh|dvi|dvb|dvmin|dvmax|cm|mm|q|in|pc|pt|%)';
1457
+ const CSS_NUMBER = '[-+]?(?:\\d*\\.\\d+|\\d+)';
1458
+ const CSS_LENGTH_RE = new RegExp(`^(?:0|${CSS_NUMBER}${CSS_LENGTH_UNITS})$`, 'i');
1459
+ const CSS_CALC_VALUE_RE = new RegExp(`^${CSS_NUMBER}(?:${CSS_LENGTH_UNITS})?`, 'i');
1460
+
1461
+ function isCalcLength(expr) {
1462
+ let rest = expr.trim();
1463
+ let depth = 0;
1464
+ let sawLength = false;
1465
+ let expectValue = true;
1466
+
1467
+ while (rest) {
1468
+ if (expectValue) {
1469
+ if (rest[0] === '(') {
1470
+ depth += 1;
1471
+ rest = rest.slice(1).trim();
1472
+ continue;
1473
+ }
1474
+ const token = rest.match(CSS_CALC_VALUE_RE)?.[0];
1475
+ if (!token) return false;
1476
+ if (CSS_LENGTH_RE.test(token)) sawLength = true;
1477
+ rest = rest.slice(token.length).trim();
1478
+ expectValue = false;
1479
+ continue;
1480
+ }
1481
+
1482
+ if (rest[0] === ')') {
1483
+ depth -= 1;
1484
+ if (depth < 0) return false;
1485
+ rest = rest.slice(1).trim();
1486
+ continue;
1487
+ }
1488
+
1489
+ const op = rest.match(/^[+\-*/]/)?.[0];
1490
+ if (!op) return false;
1491
+ rest = rest.slice(op.length).trim();
1492
+ expectValue = true;
1493
+ }
1494
+
1495
+ if (!sawLength) return false;
1496
+ if (expectValue) return false;
1497
+ return depth === 0;
1498
+ }
1499
+
1449
1500
  // `dot`, `gap`, and `size` land in an inline-CSS context (`style="…"`), where
1450
1501
  // HTML-escaping a `"` stops attribute breakout but a `;` would still open a
1451
- // second CSS declaration (overlay/clickjacking, selector exfil). So restrict
1452
- // them to length/calc syntax — digits, units, %, whitespace and `()+-*/.,` for
1453
- // calc()/clamp()/var() — and drop anything else rather than emit it.
1502
+ // second CSS declaration. Accept only concrete CSS lengths or calc() expressions.
1454
1503
  function cssLen(v) {
1455
- return /^[\w.%+\-*/()\s,]+$/.test(v) ? v : '';
1504
+ const value = String(v ?? '').trim();
1505
+ if (CSS_LENGTH_RE.test(value)) return value;
1506
+ if (value.toLowerCase().startsWith('calc(') && value.endsWith(')')) {
1507
+ return isCalcLength(value.slice(5, -1)) ? value : '';
1508
+ }
1509
+ return '';
1456
1510
  }
1457
1511
 
1458
1512
  /**
@@ -1514,7 +1568,7 @@ function maskUrl(rows) {
1514
1568
  * Needs `@ponchia/ui/css` (the `.ui-icon` rule).
1515
1569
  */
1516
1570
  export function renderGlyph(name, options = {}) {
1517
- const rows = GLYPHS[name];
1571
+ const rows = glyphRows(name);
1518
1572
  if (!rows) return '';
1519
1573
  const { grid = true, solid = false, anim, label, dot, gap, render, size } = options;
1520
1574
 
package/index.d.ts ADDED
@@ -0,0 +1 @@
1
+ export {};
package/llms.txt CHANGED
@@ -3,8 +3,8 @@
3
3
  > CSS-first, framework-agnostic UI framework. Zero runtime dependencies.
4
4
  > One `@layer bronto` cascade, a typed class vocabulary, design tokens as
5
5
  > data, and optional SSR-safe vanilla behaviors. Token-driven restraint:
6
- > monochrome by default, one rationed accent, dot-matrix display type, with
7
- > opt-in colorways + a colourblind-safe data-viz palette layered on top.
6
+ > neutral by default, one core accent for UI emphasis, dot-matrix display type,
7
+ > plus separate governed tiers for status, display colorways, and data-viz.
8
8
  >
9
9
  > This file orients an LLM/agent. The authoritative, always-correct API
10
10
  > is the TypeScript declarations shipped in this package (paths below):
@@ -29,9 +29,10 @@ explicit JS subpaths below.
29
29
  JS subpaths are ESM-only. In CommonJS, use dynamic `import()`.
30
30
 
31
31
  Everything lands in `@layer bronto`. Consumer styles in no layer (or a
32
- later layer) always win over framework styles regardless of selector
33
- specificity — this is the intended override mechanism; do not fight it
34
- with `!important`.
32
+ later layer) win ordinary framework styles regardless of selector specificity —
33
+ this is the intended override mechanism. Do not fight normal component styling
34
+ with `!important`; the framework reserves `!important` for print and
35
+ reduced-motion safeguards.
35
36
 
36
37
  Loading a stylesheet — read before copying a `<link>` below. The opt-in
37
38
  leaves are written as `@ponchia/ui/css/<leaf>.css` for brevity. That
@@ -44,7 +45,7 @@ the path changes from source `css/` to built `dist/css/`:
44
45
  <!-- installed locally -->
45
46
  <link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/<leaf>.css" />
46
47
  <!-- or from a CDN; pin the version (pre-1.0, breaking changes ship in the minor) -->
47
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/<leaf>.css" />
48
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.11/dist/css/<leaf>.css" />
48
49
  ```
49
50
 
50
51
  The flattened default bundle is `dist/bronto.css` (bundler shorthand
@@ -466,9 +467,10 @@ It NEVER parses or tokenizes — the host (or Shiki, via the shipped
466
467
  `shiki/nothing.json` token theme) supplies the coloured spans; Bronto owns only
467
468
  the chrome. `ui-code` (+`__head` filename bar, `__body` the `<pre>`); wrap each
468
469
  line in `ui-code__line` to opt into the `ui-code--numbered` gutter (CSS
469
- counters) and the `ui-code__line--add`/`--del`/`--hl` line states (forced-colors
470
- + print safe via an inline-start border). Long lines wrap. `ui.code({ numbered })`
471
- / `ui.codeLine({ change })`. Details: `docs/code.md`.
470
+ counters) and the `ui-code__line--add`/`--remove`/`--hl` line states
471
+ (forced-colors + print safe via an inline-start border). Long lines wrap.
472
+ `ui.code({ numbered })` / `ui.codeLine({ change: 'add'|'remove'|'hl' })`.
473
+ Details: `docs/code.md`.
472
474
 
473
475
  Optional inline datawords — opt-in, CSS only, never in the default bundle. A
474
476
  word-sized microchart (trend-in-a-sentence) for reports and dense tables, the
@@ -606,12 +608,12 @@ default bundle:
606
608
  <link rel="stylesheet" href="@ponchia/ui/css/workbench.css" />
607
609
  ```
608
610
 
609
- `ui-inspector` (+`__header`/`__body`) is a selected-object detail panel;
611
+ `ui-inspector` (+`__head`/`__body`) is a selected-object detail panel;
610
612
  `ui-property` (+`__label`/`__value`) is a denser key/value row for it;
611
613
  `ui-selectionbar` (+`__count`/`__actions`) is a raised action bar for the current
612
614
  selection (pair with `ui-sel` states on the items). Layout/affordances only —
613
- resizable split panes and drag handles are deferred. Class-only. Details:
614
- `docs/workbench.md`.
615
+ `ui-splitter` (+`--vertical`/`--horizontal`, `__pane`/`__handle`) ships with
616
+ optional `initSplitter()` for ARIA resize sync. Details: `docs/workbench.md`.
615
617
 
616
618
  Optional command palette — opt-in CSS shell (`css/command.css`) + `initCommand`
617
619
  behavior. Filter + keyboard-navigate a DOM-authored command list:
@@ -815,8 +817,10 @@ Read these from `node_modules/@ponchia/ui/` — no network needed:
815
817
  `dist/bronto.css` carries the report/chart/legend/annotation layers — it
816
818
  does not. Link each opt-in leaf from `dist/css/` via a real URL
817
819
  (`./node_modules/…` or a pinned CDN). See the loading note above.
818
- - Override framework styles by writing your own rules outside
819
- `@layer bronto` not with higher specificity or `!important`.
820
+ - Override ordinary framework styles by writing your own rules outside
821
+ `@layer bronto`, not with higher specificity. Reserve `!important` for the
822
+ same kind of media-boundary safeguards the framework uses in print and
823
+ reduced-motion rules.
820
824
  - Color is tiered (ADR-0001): neutral canvas · one rationed accent · locked
821
825
  status · display expression · opt-in data-viz. Theme via the documented
822
826
  tokens — re-point `--accent` (or a `data-bronto-skin` colorway), use status