@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.
- package/CHANGELOG.md +72 -0
- package/README.md +38 -25
- package/annotations/index.d.ts +15 -15
- package/annotations/index.d.ts.map +1 -1
- package/annotations/index.js +52 -34
- package/behaviors/carousel.d.ts +7 -3
- package/behaviors/carousel.d.ts.map +1 -1
- package/behaviors/carousel.js +157 -27
- package/behaviors/combobox.d.ts +1 -1
- package/behaviors/combobox.d.ts.map +1 -1
- package/behaviors/combobox.js +46 -23
- package/behaviors/command.d.ts +1 -1
- package/behaviors/command.d.ts.map +1 -1
- package/behaviors/command.js +63 -23
- package/behaviors/connectors.d.ts.map +1 -1
- package/behaviors/connectors.js +126 -19
- package/behaviors/crosshair.d.ts.map +1 -1
- package/behaviors/crosshair.js +71 -8
- package/behaviors/dialog.d.ts.map +1 -1
- package/behaviors/dialog.js +20 -3
- package/behaviors/disclosure.d.ts.map +1 -1
- package/behaviors/disclosure.js +35 -6
- package/behaviors/dismissible.js +1 -1
- package/behaviors/forms.d.ts +23 -2
- package/behaviors/forms.d.ts.map +1 -1
- package/behaviors/forms.js +97 -9
- package/behaviors/glyph.d.ts.map +1 -1
- package/behaviors/glyph.js +56 -5
- package/behaviors/internal.d.ts.map +1 -1
- package/behaviors/internal.js +52 -5
- package/behaviors/menu.d.ts.map +1 -1
- package/behaviors/menu.js +2 -1
- package/behaviors/modal.d.ts.map +1 -1
- package/behaviors/modal.js +25 -9
- package/behaviors/popover.d.ts.map +1 -1
- package/behaviors/popover.js +8 -6
- package/behaviors/sources.d.ts.map +1 -1
- package/behaviors/sources.js +24 -3
- package/behaviors/splitter.d.ts.map +1 -1
- package/behaviors/splitter.js +27 -6
- package/behaviors/table.d.ts.map +1 -1
- package/behaviors/table.js +44 -7
- package/behaviors/tabs.d.ts.map +1 -1
- package/behaviors/tabs.js +51 -14
- package/behaviors/theme.d.ts.map +1 -1
- package/behaviors/theme.js +64 -4
- package/behaviors/toast.d.ts +6 -1
- package/behaviors/toast.d.ts.map +1 -1
- package/behaviors/toast.js +48 -12
- package/classes/classes.json +24 -0
- package/classes/index.d.ts +3 -2
- package/classes/index.js +77 -39
- package/connectors/index.d.ts +4 -4
- package/connectors/index.d.ts.map +1 -1
- package/connectors/index.js +14 -12
- package/css/annotations.css +1 -0
- package/css/app.css +7 -0
- package/css/base.css +3 -0
- package/css/bullet.css +41 -7
- package/css/code.css +14 -0
- package/css/command.css +10 -0
- package/css/dataviz.css +27 -0
- package/css/diff.css +2 -0
- package/css/disclosure.css +8 -0
- package/css/dots.css +1 -1
- package/css/feedback.css +9 -0
- package/css/interval.css +20 -2
- package/css/legend.css +10 -9
- package/css/marks.css +1 -0
- package/css/motion.css +2 -0
- package/css/overlay.css +14 -2
- package/css/primitives.css +1 -1
- package/css/report.css +3 -0
- package/css/sources.css +4 -4
- package/css/spotlight.css +6 -0
- package/css/table.css +19 -0
- package/css/term.css +4 -1
- package/css/tokens.css +8 -13
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/bullet.css +1 -1
- package/dist/css/code.css +1 -1
- package/dist/css/command.css +1 -1
- package/dist/css/dataviz.css +1 -1
- package/dist/css/diff.css +1 -1
- package/dist/css/disclosure.css +1 -1
- package/dist/css/dots.css +1 -1
- package/dist/css/feedback.css +1 -1
- package/dist/css/interval.css +1 -1
- package/dist/css/legend.css +1 -1
- package/dist/css/marks.css +1 -1
- package/dist/css/overlay.css +1 -1
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -1
- package/dist/css/sources.css +1 -1
- package/dist/css/spotlight.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/term.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/docs/architecture.md +5 -3
- package/docs/bullet.md +6 -1
- package/docs/clamp.md +5 -0
- package/docs/command.md +3 -2
- package/docs/contrast.md +3 -3
- package/docs/crosshair.md +6 -0
- package/docs/dots.md +10 -3
- package/docs/figure.md +7 -0
- package/docs/glyphs.md +14 -2
- package/docs/highlights.md +9 -0
- package/docs/interval.md +6 -0
- package/docs/mermaid.md +5 -3
- package/docs/package-contract.md +24 -1
- package/docs/reporting.md +8 -8
- package/docs/selection.md +9 -0
- package/docs/sources.md +5 -0
- package/docs/state.md +6 -0
- package/docs/textref.md +18 -13
- package/docs/theming.md +18 -8
- package/docs/toc.md +6 -0
- package/docs/tree.md +9 -2
- package/docs/usage.md +2 -2
- package/docs/vega.md +5 -3
- package/glyphs/glyphs.js +62 -8
- package/index.d.ts +1 -0
- package/llms.txt +18 -14
- package/package.json +98 -6
- package/qwik/index.d.ts +4 -3
- package/qwik/index.d.ts.map +1 -1
- package/qwik/index.js +7 -5
- package/react/index.d.ts +4 -3
- package/react/index.d.ts.map +1 -1
- package/react/index.js +3 -2
- package/solid/index.d.ts +7 -5
- package/solid/index.d.ts.map +1 -1
- package/solid/index.js +11 -7
- package/tokens/vega.d.ts +1 -1
- package/tokens/vega.js +3 -2
- package/vue/index.d.ts.map +1 -1
- package/vue/index.js +37 -3
package/docs/package-contract.md
CHANGED
|
@@ -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.
|
|
58
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
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.
|
|
65
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
66
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
67
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
68
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.
|
|
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.
|
|
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
|
-
(
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
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
|
-
-
|
|
19
|
-
first match of the quoted text — no script
|
|
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
|
|
23
|
-
`#section
|
|
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%'
|
|
34
|
-
|
|
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
|
|
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
|
|
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
|
|
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
|
-
|
|
30
|
-
fills —
|
|
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:
|
|
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
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
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
|
|
42
|
-
|
|
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
|
|
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`
|
|
147
|
-
the first category
|
|
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
|
|
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
|
|
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 =
|
|
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 =
|
|
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, '"');
|
|
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
|
|
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
|
-
|
|
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 =
|
|
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
|
-
>
|
|
7
|
-
>
|
|
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)
|
|
33
|
-
|
|
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.
|
|
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`/`--
|
|
470
|
-
+ print safe via an inline-start border). Long lines wrap.
|
|
471
|
-
/ `ui.codeLine({ change })`.
|
|
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` (+`
|
|
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
|
-
|
|
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
|
|
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
|