@ponchia/ui 0.11.0 → 0.13.0
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 +98 -0
- package/MIGRATIONS.json +24 -0
- package/README.md +5 -5
- package/behaviors/forms.d.ts +1 -1
- package/behaviors/internal.d.ts +1 -1
- package/classes/classes.json +3 -1
- package/classes/index.d.ts +2 -0
- package/classes/index.js +3 -1
- package/classes/vscode.css-custom-data.json +64 -0
- package/css/base.css +2 -2
- package/css/blocknote.css +61 -0
- package/css/clamp.css +2 -2
- package/css/content.css +126 -0
- package/css/dataviz.css +117 -64
- package/css/disclosure.css +10 -10
- package/css/forms.css +8 -8
- package/css/legend.css +1 -2
- package/css/primitives.css +5 -6
- package/css/row.css +2 -2
- package/css/term.css +2 -2
- package/css/textref.css +2 -2
- package/css/toc.css +2 -2
- package/css/tokens.css +43 -0
- package/css/workbench.css +2 -2
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -1
- package/dist/css/base.css +1 -1
- package/dist/css/blocknote.css +1 -0
- package/dist/css/clamp.css +1 -1
- package/dist/css/content.css +1 -1
- package/dist/css/dataviz.css +1 -1
- package/dist/css/disclosure.css +1 -1
- package/dist/css/forms.css +1 -1
- package/dist/css/legend.css +1 -1
- package/dist/css/report-kit.css +1 -1
- package/dist/css/row.css +1 -1
- package/dist/css/term.css +1 -1
- package/dist/css/textref.css +1 -1
- package/dist/css/toc.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0001-color-system.md +29 -0
- package/docs/architecture.md +1 -1
- package/docs/compositions.md +2 -2
- package/docs/contrast.md +24 -24
- package/docs/frontier-primitives.md +5 -0
- package/docs/interop/blocknote.md +60 -0
- package/docs/mermaid.md +1 -1
- package/docs/migrations/0.11-to-0.12.md +47 -0
- package/docs/package-contract.md +12 -2
- package/docs/reference.md +18 -1
- package/docs/renderer.md +100 -0
- package/docs/reporting.md +9 -9
- package/docs/stability.md +4 -2
- package/docs/theming.md +77 -20
- package/docs/usage.md +12 -8
- package/docs/vega.md +24 -23
- package/llms.txt +8 -4
- package/package.json +24 -12
- package/renderer/index.d.ts +203 -0
- package/renderer/index.d.ts.map +1 -0
- package/renderer/index.js +650 -0
- package/tokens/charts.d.ts +16 -10
- package/tokens/charts.js +65 -49
- package/tokens/charts.json +77 -29
- package/tokens/figma.variables.json +240 -0
- package/tokens/index.d.ts +2 -2
- package/tokens/index.js +30 -2
- package/tokens/index.json +32 -0
- package/tokens/mermaid.js +56 -56
- package/tokens/mermaid.json +56 -56
- package/tokens/resolved.json +17 -1
- package/tokens/tokens.dtcg.json +190 -0
- package/tokens/vega.d.ts +3 -3
- package/tokens/vega.js +111 -72
- package/tokens/vega.json +198 -126
|
@@ -223,6 +223,35 @@ Hard acceptance criteria for every step below:
|
|
|
223
223
|
safety, which the gate caught); the ramps are OKLCH. A chart colour's WCAG
|
|
224
224
|
ratio vs the background is reported **advisory** (a fill is not body text;
|
|
225
225
|
the pattern + ΔE gate carry distinguishability).
|
|
226
|
+
|
|
227
|
+
**Amended in 0.12 — categorical, not accent-led; measured, not inherited.**
|
|
228
|
+
The accent-led set failed the measurable palette checks on the package's own
|
|
229
|
+
surfaces: Okabe-Ito's yellow and the slate fell outside the lightness band,
|
|
230
|
+
the slate read as grey under the chroma floor, and spending slot 1 on the
|
|
231
|
+
alert red made every ordinary first series look like an error. A consumer
|
|
232
|
+
that draws charts, timeline lanes, graph colours and participant presence
|
|
233
|
+
from one palette shipped validated values and recorded the divergence; 0.12
|
|
234
|
+
adopts them. The order is fixed (blue, orange, aqua, yellow, magenta, green,
|
|
235
|
+
violet, red) and no slot is the accent, which keeps rule 5's single
|
|
236
|
+
interactive accent intact.
|
|
237
|
+
|
|
238
|
+
The gate changed with it. A fixed order means adjacent slots are the pairs a
|
|
239
|
+
legend or a stacked mark puts side by side, so `check:charts` holds
|
|
240
|
+
*adjacent* pairs apart under simulated protanopia/deuteranopia (OKLab
|
|
241
|
+
ΔE×100 ≥ 6) and in normal vision (≥ 15), with every slot inside the theme's
|
|
242
|
+
OKLCH lightness band and above the chroma floor, measured per theme against
|
|
243
|
+
the panel, the page and the OLED surfaces. All-pairs separation is reported,
|
|
244
|
+
not gated: no eight-hue set clears it, which is why the pattern fill stays
|
|
245
|
+
the mandated second channel for scatter and map use. Contrast under 3:1 is
|
|
246
|
+
reported for the same reason.
|
|
247
|
+
|
|
248
|
+
The tier also gains its second use, which the Context above names as a
|
|
249
|
+
monochrome restriction: **categorical identity**. `--cat-N` carries the same
|
|
250
|
+
hue for a tag, a participant or a user-chosen tint, with `--cat-N-tint` (a
|
|
251
|
+
16% wash over `--panel`, so it follows skins) and `--cat-N-ink` (text that
|
|
252
|
+
holds 4.5:1 on the panel, the page and its own tint, gated). Rule 4 still
|
|
253
|
+
holds: neither namespace may appear in core component CSS, and identity
|
|
254
|
+
colour is never status.
|
|
226
255
|
8. **OKLCH `--accent-1..6` ramp migration.** *(done in 0.4.0)* Steps 1–4 mix
|
|
227
256
|
the accent toward `--accent-ramp-end` (white in light, black in dark)
|
|
228
257
|
`in oklch` (perceptually even). The explicit endpoint avoids low-chroma
|
package/docs/architecture.md
CHANGED
|
@@ -188,7 +188,7 @@ are copied into consumer reports.
|
|
|
188
188
|
| GitHub Actions workflow syntax and embedded shell snippets lint | `check:workflows` (`github-actionlint`) |
|
|
189
189
|
| every shipped CSS leaf is classified as foundation or has explicit docs/demo/e2e ownership | `check-component-matrix.mjs` |
|
|
190
190
|
| every public behavior export has explicit docs, unit-test, and browser-test ownership | `check-behavior-matrix.mjs` |
|
|
191
|
-
| every public helper export in `classes`/`annotations`/`connectors`/`glyphs` has explicit docs, unit-test, and type-test ownership | `check-helper-matrix.mjs` |
|
|
191
|
+
| every public helper export in `classes`/`annotations`/`connectors`/`renderer`/`glyphs` has explicit docs, unit-test, and type-test ownership | `check-helper-matrix.mjs` |
|
|
192
192
|
| `@playwright/test` version ⇄ pinned Playwright container image ⇄ visual workflows/docs/local runner | `check-playwright-container.mjs` |
|
|
193
193
|
| every shipped JSON schema is exported, documented, validates its public cookbook example, and rejects malformed sidecars | `check-schemas.mjs` |
|
|
194
194
|
| packed public text contains no private terms, local paths, or secret-looking assignments | `check-public-hygiene.mjs` |
|
package/docs/compositions.md
CHANGED
|
@@ -74,8 +74,8 @@ Use the core stylesheet plus `report-kit.css` for a standalone HTML report.
|
|
|
74
74
|
Use real asset URLs in HTML; package specifiers resolve only in build tools.
|
|
75
75
|
|
|
76
76
|
```html
|
|
77
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
78
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
77
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/bronto.css" />
|
|
78
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/report-kit.css" />
|
|
79
79
|
<article class="ui-report">
|
|
80
80
|
<header class="ui-report__cover ui-report__cover--compact">
|
|
81
81
|
<h1 class="ui-report__title">Keep the current configuration</h1>
|
package/docs/contrast.md
CHANGED
|
@@ -283,40 +283,40 @@ palette untouched). Accents are authored in OKLCH; `--accent-text` is the
|
|
|
283
283
|
|
|
284
284
|
## Data-viz palette (advisory)
|
|
285
285
|
|
|
286
|
-
The opt-in Tier-4
|
|
287
|
-
`tokens/charts.js`) is gated differently:
|
|
288
|
-
|
|
289
|
-
vision** (`check:charts`,
|
|
290
|
-
each series ships a matching
|
|
291
|
-
WCAG ratios below are **advisory**
|
|
292
|
-
|
|
293
|
-
the
|
|
286
|
+
The opt-in Tier-4 categorical palette (`@ponchia/ui/css/dataviz.css`, authored
|
|
287
|
+
in `tokens/charts.js`) is gated differently: each slot sits inside the theme's
|
|
288
|
+
OKLCH lightness band and above the chroma floor, and **adjacent slots stay apart
|
|
289
|
+
under simulated protanopia/deuteranopia and in normal vision** (`check:charts`,
|
|
290
|
+
OKLab ΔE). Colour is **never the sole signal** — each series ships a matching
|
|
291
|
+
`--chart-pattern-*` dot-matrix fill. So the WCAG ratios below are **advisory**
|
|
292
|
+
(a chart fill is not body text); for thin lines, points or text use the slot's
|
|
293
|
+
`--cat-N-ink`, which `check:charts` holds to 4.5:1. No slot is the accent.
|
|
294
294
|
|
|
295
295
|
### Light theme — categorical vs `--bg`
|
|
296
296
|
|
|
297
297
|
| Series | Colour | Ratio _(advisory)_ | APCA _(advisory)_ |
|
|
298
298
|
| --- | --- | --- | --- |
|
|
299
|
-
| 1 _(accent)_ | `#
|
|
300
|
-
| 2 | `#
|
|
301
|
-
| 3 | `#
|
|
302
|
-
| 4 | `#
|
|
303
|
-
| 5 | `#
|
|
304
|
-
| 6 | `#
|
|
305
|
-
| 7 | `#
|
|
306
|
-
| 8 | `#
|
|
299
|
+
| 1 _(accent)_ | `#2a78d6` | 4.01:1 | Lc 63.5 |
|
|
300
|
+
| 2 | `#eb6834` | 2.91:1 | Lc 51.8 |
|
|
301
|
+
| 3 | `#1baf7a` | 2.56:1 | Lc 46.9 |
|
|
302
|
+
| 4 | `#eda100` | 1.97:1 | Lc 35.5 |
|
|
303
|
+
| 5 | `#e87ba4` | 2.44:1 | Lc 45.2 |
|
|
304
|
+
| 6 | `#008300` | 4.49:1 | Lc 66.8 |
|
|
305
|
+
| 7 | `#4a3aa7` | 7.77:1 | Lc 82.3 |
|
|
306
|
+
| 8 | `#e34948` | 3.59:1 | Lc 59.1 |
|
|
307
307
|
|
|
308
308
|
### Dark theme — categorical vs `--bg`
|
|
309
309
|
|
|
310
310
|
| Series | Colour | Ratio _(advisory)_ | APCA _(advisory)_ |
|
|
311
311
|
| --- | --- | --- | --- |
|
|
312
|
-
| 1 _(accent)_ | `#
|
|
313
|
-
| 2 | `#
|
|
314
|
-
| 3 | `#
|
|
315
|
-
| 4 | `#
|
|
316
|
-
| 5 | `#
|
|
317
|
-
| 6 | `#
|
|
318
|
-
| 7 | `#
|
|
319
|
-
| 8 | `#
|
|
312
|
+
| 1 _(accent)_ | `#3987e5` | 5.15:1 | Lc 37.5 |
|
|
313
|
+
| 2 | `#d95926` | 4.82:1 | Lc 35.6 |
|
|
314
|
+
| 3 | `#199e70` | 5.50:1 | Lc 40.1 |
|
|
315
|
+
| 4 | `#c98500` | 6.10:1 | Lc 43.9 |
|
|
316
|
+
| 5 | `#d55181` | 4.75:1 | Lc 35.0 |
|
|
317
|
+
| 6 | `#008300` | 3.79:1 | Lc 27.7 |
|
|
318
|
+
| 7 | `#9085e9` | 5.99:1 | Lc 43.0 |
|
|
319
|
+
| 8 | `#e66767` | 5.80:1 | Lc 42.2 |
|
|
320
320
|
|
|
321
321
|
## Scope & caveats
|
|
322
322
|
|
|
@@ -235,6 +235,11 @@ consumer since**; their follow-ons are demand-gated, not queued. Active work
|
|
|
235
235
|
is therefore consolidation of the report lane (hub routing, print/PDF
|
|
236
236
|
fidelity, consumer-contract gates), not new surfaces.
|
|
237
237
|
|
|
238
|
+
> **Superseded (2026-10-01).** A canvas workspace now consumes the command,
|
|
239
|
+
> workbench and state leaves daily, and its notes and visual models carry more
|
|
240
|
+
> agent-authored prose than reports do. The north star moved to objects on a
|
|
241
|
+
> canvas that explain themselves; see the [roadmap](https://github.com/Ponchia/bronto-ui/blob/main/ROADMAP.md#north-star).
|
|
242
|
+
|
|
238
243
|
### Report-lane primitives shipped in 0.6.7
|
|
239
244
|
|
|
240
245
|
From the 2026-06-09 local scout. These were kept on merit, then shipped only
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
# BlockNote interop
|
|
2
|
+
|
|
3
|
+
[BlockNote](https://www.blocknotejs.org) is a block editor. It themes its
|
|
4
|
+
editor, menus, side menu, formatting toolbar and text highlights through
|
|
5
|
+
`--bn-*` custom properties declared on `.bn-root`, with its own light and dark
|
|
6
|
+
values. `css/blocknote.css` points those properties at bronto tokens, so the
|
|
7
|
+
editor follows the theme, skins, contrast and the OLED surface like the rest of
|
|
8
|
+
the page.
|
|
9
|
+
|
|
10
|
+
## Import
|
|
11
|
+
|
|
12
|
+
BlockNote's stylesheet is unlayered, and an unlayered rule outranks every
|
|
13
|
+
layered one. Import this leaf's **unlayered** build, after BlockNote's:
|
|
14
|
+
|
|
15
|
+
```css
|
|
16
|
+
@import '@blocknote/mantine/style.css';
|
|
17
|
+
@import '@ponchia/ui/css/dataviz.css';
|
|
18
|
+
@import '@ponchia/ui/css/unlayered/blocknote.css';
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
The rule targets `.bn-root` and `.bn-root[data-color-scheme]`, which has the
|
|
22
|
+
same specificity as BlockNote's dark block, so source order is what makes it
|
|
23
|
+
win.
|
|
24
|
+
|
|
25
|
+
## What maps to what
|
|
26
|
+
|
|
27
|
+
| BlockNote | bronto |
|
|
28
|
+
| --- | --- |
|
|
29
|
+
| editor text, background | `--text`, `--panel` |
|
|
30
|
+
| menu text, background | `--text`, `--panel-strong` |
|
|
31
|
+
| tooltip, hovered background | `--panel-soft` |
|
|
32
|
+
| selected text, background | `--on-accent`, `--accent` |
|
|
33
|
+
| disabled text | `--text-dim` |
|
|
34
|
+
| border, shadow | `--line` |
|
|
35
|
+
| side menu (drag handle, add) | `--text-dim` |
|
|
36
|
+
| font, radius | `--sans`, `--radius-lg` |
|
|
37
|
+
|
|
38
|
+
Text and background highlights are categorical identity: a colour someone chose
|
|
39
|
+
for a span. They take `--cat-N-ink` (text, 4.5:1 on its tint and the panel) and
|
|
40
|
+
`--cat-N-tint` (background) from `css/dataviz.css`:
|
|
41
|
+
|
|
42
|
+
| BlockNote highlight | Categorical hue |
|
|
43
|
+
| --- | --- |
|
|
44
|
+
| blue | 1 · blue |
|
|
45
|
+
| orange, brown (text) | 2 · orange |
|
|
46
|
+
| yellow | 4 · yellow |
|
|
47
|
+
| pink | 5 · magenta |
|
|
48
|
+
| green | 6 · green |
|
|
49
|
+
| purple | 7 · violet |
|
|
50
|
+
| red | 8 · red |
|
|
51
|
+
| gray | `--text-dim` on `--panel-soft` |
|
|
52
|
+
|
|
53
|
+
Without `css/dataviz.css` the highlights fall back to the status colours.
|
|
54
|
+
|
|
55
|
+
## A read view that matches the editor
|
|
56
|
+
|
|
57
|
+
A surface that shows the same text read-only (a preview, a fallback while the
|
|
58
|
+
editor loads) can use `.ui-prose.ui-prose--blocks`. That variant reproduces
|
|
59
|
+
BlockNote's block geometry, so text does not jump when the surface switches
|
|
60
|
+
between reading and editing. See [the prose reference](../reference.md).
|
package/docs/mermaid.md
CHANGED
|
@@ -92,7 +92,7 @@ switch, re-`initialize` with the other palette and re-render.
|
|
|
92
92
|
- **Chart-like** diagrams carry a categorical series palette — **pie**
|
|
93
93
|
(`pie1`…`pie12`), **git** (`git0`…`git7`), and **user-journey**
|
|
94
94
|
(`fillType0`…`fillType7`) are wired to the CVD-safe
|
|
95
|
-
[charts palette](./legends.md) (
|
|
95
|
+
[charts palette](./legends.md) (blue first; no slot is the accent).
|
|
96
96
|
- **Structural** diagrams — flowchart, sequence, class, ER, state — use the
|
|
97
97
|
monochrome node/edge/cluster grammar and spend the accent only on notes.
|
|
98
98
|
- **Not themed: `gantt` and `timeline`.** Their colours come from
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
# Upgrade from 0.11 to 0.12
|
|
2
|
+
|
|
3
|
+
0.12 replaces the categorical palette and adds a runtime resolver for
|
|
4
|
+
renderers. Classes and core tokens are unchanged; the structured changes are
|
|
5
|
+
in [`MIGRATIONS.json`](../../MIGRATIONS.json). If you are coming from 0.10,
|
|
6
|
+
apply the [0.11 migration](0.10-to-0.11.md) first.
|
|
7
|
+
|
|
8
|
+
## Review charts that relied on series 1 being the accent
|
|
9
|
+
|
|
10
|
+
Until 0.11, `--chart-1` was `var(--accent)` and series 2–8 were Okabe-Ito.
|
|
11
|
+
From 0.12 the eight slots are fixed hues: blue, orange, aqua, yellow, magenta,
|
|
12
|
+
green, violet, red. No slot is the accent.
|
|
13
|
+
|
|
14
|
+
1. Find uses of `--chart-1`, `range.category[0]`, `charts.<theme>.categorical[0]`
|
|
15
|
+
and `ACCENT` from `@ponchia/ui/charts`. `ACCENT` is removed.
|
|
16
|
+
2. Where a chart meant "the brand", paint that one mark with the accent through
|
|
17
|
+
an explicit encoding (`brontoVegaAccent(theme)`, or `var(--accent)` in SVG),
|
|
18
|
+
and leave the categorical palette for categories.
|
|
19
|
+
3. Where you pinned `--chart-1` to a fixed value to keep the accent out of
|
|
20
|
+
your data, delete the pin.
|
|
21
|
+
4. `brontoVegaAccent(theme)` now returns the resolved `--accent`, and
|
|
22
|
+
`brontoVegaNeutral(theme)` the resolved `--text-dim`. They no longer index
|
|
23
|
+
`range.category`.
|
|
24
|
+
|
|
25
|
+
## Sequential ramps have five steps
|
|
26
|
+
|
|
27
|
+
`--chart-seq-6` is removed; `--chart-seq-1..5` is one blue hue, step 1 nearest
|
|
28
|
+
the surface. Re-map a six-bin choropleth or heatmap to five bins, or
|
|
29
|
+
interpolate between steps in your renderer.
|
|
30
|
+
|
|
31
|
+
## The static Vega config is frameless
|
|
32
|
+
|
|
33
|
+
`brontoVegaConfig()` sets `view.stroke: null` (no plot frame), draws a single
|
|
34
|
+
series in the first categorical hue, keeps a `--panel` gap between adjacent
|
|
35
|
+
rect, arc and area fills, and sets readable label sizes. A spec's own `config`
|
|
36
|
+
still wins. Review dashboards that relied on the frame or the accent-coloured
|
|
37
|
+
default mark.
|
|
38
|
+
|
|
39
|
+
## New: categorical identity and runtime tokens
|
|
40
|
+
|
|
41
|
+
- `--cat-N`, `--cat-N-tint` and `--cat-N-ink` carry the same hues for tags,
|
|
42
|
+
participants and user-chosen tints. Replace hand-picked tag colours, and
|
|
43
|
+
status tokens borrowed as category colours, with these.
|
|
44
|
+
- `@ponchia/ui/renderer` resolves the live theme for canvas, WebGL and SVG
|
|
45
|
+
renderers (`readTokens`, `observeTokens`, `vegaConfig`, `xtermTheme`). A page
|
|
46
|
+
that switches skin, contrast or the OLED surface should use it instead of
|
|
47
|
+
`charts.json` or the static Vega files. See [renderer](../renderer.md).
|
package/docs/package-contract.md
CHANGED
|
@@ -48,6 +48,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
48
48
|
| `./css/app.css` | `./dist/css/app.css` | Bundled layered CSS leaf | Stable additive | Generated layered direct-import leaf. Also included in dist/bronto.css. |
|
|
49
49
|
| `./css/skins.css` | `./dist/css/skins.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
50
50
|
| `./css/dataviz.css` | `./dist/css/dataviz.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
51
|
+
| `./css/blocknote.css` | `./dist/css/blocknote.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
51
52
|
| `./css/report.css` | `./dist/css/report.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
52
53
|
| `./css/row.css` | `./dist/css/row.css` | Bundled layered CSS leaf | Stable additive | Generated layered direct-import leaf. Also included in dist/bronto.css. |
|
|
53
54
|
| `./css/figure.css` | `./dist/css/figure.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
@@ -94,6 +95,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
94
95
|
| `./css/unlayered/app.css` | `./css/app.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
95
96
|
| `./css/unlayered/skins.css` | `./css/skins.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
96
97
|
| `./css/unlayered/dataviz.css` | `./css/dataviz.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
98
|
+
| `./css/unlayered/blocknote.css` | `./css/blocknote.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
97
99
|
| `./css/unlayered/report.css` | `./css/report.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
98
100
|
| `./css/unlayered/row.css` | `./css/row.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
99
101
|
| `./css/unlayered/figure.css` | `./css/figure.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
@@ -150,6 +152,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
150
152
|
| `./docs/legends.md` | `./docs/legends.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
151
153
|
| `./docs/marks.md` | `./docs/marks.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
152
154
|
| `./docs/connectors.md` | `./docs/connectors.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
155
|
+
| `./docs/renderer.md` | `./docs/renderer.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
153
156
|
| `./docs/spotlight.md` | `./docs/spotlight.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
154
157
|
| `./docs/crosshair.md` | `./docs/crosshair.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
155
158
|
| `./docs/selection.md` | `./docs/selection.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
@@ -172,6 +175,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
172
175
|
| `./docs/command.md` | `./docs/command.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
173
176
|
| `./docs/interop/tailwind.md` | `./docs/interop/tailwind.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
174
177
|
| `./docs/interop/react-flow.md` | `./docs/interop/react-flow.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
178
|
+
| `./docs/interop/blocknote.md` | `./docs/interop/blocknote.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
175
179
|
| `./docs/migrations/0.2-to-0.3.md` | `./docs/migrations/0.2-to-0.3.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
176
180
|
| `./docs/migrations/0.3-to-0.4.md` | `./docs/migrations/0.3-to-0.4.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
177
181
|
| `./docs/migrations/0.4-to-0.5.md` | `./docs/migrations/0.4-to-0.5.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
@@ -208,6 +212,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
208
212
|
| `./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. |
|
|
209
213
|
| `./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. |
|
|
210
214
|
| `./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. |
|
|
215
|
+
| `./renderer` | types: `./renderer/index.d.ts`<br>default: `./renderer/index.js` | Renderer/theme helper JS | Stable additive | ESM theme data/helpers for opt-in skins, chart palettes, and external renderers. |
|
|
211
216
|
| `./skins` | types: `./tokens/skins.d.ts`<br>default: `./tokens/skins.js` | Renderer/theme helper JS | Stable additive | ESM theme data/helpers for opt-in skins, chart palettes, and external renderers. |
|
|
212
217
|
| `./charts` | types: `./tokens/charts.d.ts`<br>default: `./tokens/charts.js` | Renderer/theme helper JS | Stable additive | ESM theme data/helpers for opt-in skins, chart palettes, and external renderers. |
|
|
213
218
|
| `./charts.json` | `./tokens/charts.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. |
|
|
@@ -223,6 +228,7 @@ semantic versioning contract for the surfaces listed here.
|
|
|
223
228
|
| `./docs/migrations/0.9-to-0.10.md` | `./docs/migrations/0.9-to-0.10.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
224
229
|
| `./docs/adr/0006-trusted-publishing.md` | `./docs/adr/0006-trusted-publishing.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
225
230
|
| `./docs/migrations/0.10-to-0.11.md` | `./docs/migrations/0.10-to-0.11.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
231
|
+
| `./docs/migrations/0.11-to-0.12.md` | `./docs/migrations/0.11-to-0.12.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
226
232
|
| `./css/discussion.css` | `./dist/css/discussion.css` | Opt-in layered CSS leaf | Stable additive | Generated layered direct-import leaf. Opt-in and not included in dist/bronto.css. |
|
|
227
233
|
| `./css/unlayered/discussion.css` | `./css/discussion.css` | Unlayered CSS leaf | Stable path | Raw authored CSS leaf for consumers that deliberately opt out of @layer bronto on that leaf. |
|
|
228
234
|
| `./docs/discussion.md` | `./docs/discussion.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
|
|
@@ -248,6 +254,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
|
|
|
248
254
|
| `schemas` | Machine-readable schemas | Declarative JSON schemas for package-adjacent report/tooling contracts. |
|
|
249
255
|
| `annotations` | Authored public JS directory | ESM source shipped as-is; adjacent declarations/maps are generated. |
|
|
250
256
|
| `connectors` | Authored public JS directory | ESM source shipped as-is; adjacent declarations/maps are generated. |
|
|
257
|
+
| `renderer` | Authored public JS directory | ESM source shipped as-is; adjacent declarations/maps are generated. |
|
|
251
258
|
| `shiki` | Theme data | Shiki theme JSON on the governed palette. |
|
|
252
259
|
| `llms.txt` | Agent entrypoint | Shipped plain-text orientation for offline LLM/agent consumers. |
|
|
253
260
|
| `CHANGELOG.md` | Release record | Shipped historical release notes. |
|
|
@@ -272,6 +279,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
|
|
|
272
279
|
| `docs/legends.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
273
280
|
| `docs/marks.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
274
281
|
| `docs/connectors.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
282
|
+
| `docs/renderer.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
275
283
|
| `docs/spotlight.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
276
284
|
| `docs/crosshair.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
277
285
|
| `docs/selection.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
@@ -294,6 +302,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
|
|
|
294
302
|
| `docs/command.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
295
303
|
| `docs/interop/tailwind.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
296
304
|
| `docs/interop/react-flow.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
305
|
+
| `docs/interop/blocknote.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
297
306
|
| `docs/migrations/0.2-to-0.3.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
298
307
|
| `docs/migrations/0.3-to-0.4.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
299
308
|
| `docs/migrations/0.4-to-0.5.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
@@ -310,6 +319,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
|
|
|
310
319
|
| `docs/migrations/0.9-to-0.10.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
311
320
|
| `docs/adr/0006-trusted-publishing.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
312
321
|
| `docs/migrations/0.10-to-0.11.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
322
|
+
| `docs/migrations/0.11-to-0.12.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
|
|
313
323
|
|
|
314
324
|
## Artifact Provenance
|
|
315
325
|
|
|
@@ -322,8 +332,8 @@ result. The listed gates are part of `npm run check`.
|
|
|
322
332
|
| Package manifest | `package.json` | docs/package-contract.md | `npm run package-contract:build` | check:fresh; check:exports; check:pack; check:consumer-surface; check:consumer-types; check:publint; check:attw | The complete export/file matrix in this document is generated from the manifest; packed tarball imports, concrete file resolution, and package-level type resolution are smoke-tested in clean consumers. |
|
|
323
333
|
| Token model | `tokens/index.js` | css/tokens.css; tokens/index.json; tokens/tokens.dtcg.json; tokens/resolved.json; tokens/figma.variables.json; tokens/index.d.ts | `npm run tokens:css:build; tokens:build; dtcg:build; resolved:build; figma:variables:build; dts:build` | check:fresh; check:contrast | Token names/roles are public. Resolved and Figma handoff values are visual tuning before 1.0. |
|
|
324
334
|
| Class registry | `classes/index.js plus css/*.css selectors` | classes/classes.json; classes/index.d.ts; classes/vscode.css-custom-data.json; docs/reference.md | `npm run classes:json:build; dts:build; vscode:build; reference:build` | check:fresh; check:classes; check:contract | The typed registry, JSON vocabulary, and generated reference stay aligned with real selectors. |
|
|
325
|
-
| Authored CSS graph | `css/core.css plus css/*.css leaves` | dist/bronto.css; dist/css/*.css (
|
|
326
|
-
| JSDoc-authored public JS | `
|
|
335
|
+
| Authored CSS graph | `css/core.css plus css/*.css leaves` | dist/bronto.css; dist/css/*.css (49 layered outputs) | `npm run dist:build` | check:dist; check:exports; check:component-matrix | Default bundle and direct layered leaf imports are generated from authored CSS, size-gated, and coverage-owned as foundation or component leaves. |
|
|
336
|
+
| JSDoc-authored public JS | `connectors/; renderer/; annotations/; behaviors/` | adjacent *.d.ts and *.d.ts.map files | `npm run dts:emit` | check:dts-emit; check:types; check:consumer-surface; check:consumer-types; check:behavior-matrix; check:attw; check:publint | Declarations are emitted from the shipped JS, package subpath imports are compiled from a packed clean consumer, and public behavior exports are docs/unit/browser owned. |
|
|
327
337
|
| Glyph registry | `glyphs/glyphs.js` | glyphs/glyphs.d.ts | `npm run glyphs:build` | check:glyphs; check:unit | Glyph names and render options are public. The registry stays sorted and type-covered. |
|
|
328
338
|
| Display colorways | `tokens/skins.js` | css/skins.css; tokens/skins.d.ts | `npm run skins:build` | check:skins; check:contrast | Skins are opt-in root-level choices and never part of dist/bronto.css. |
|
|
329
339
|
| Chart palette | `tokens/charts.js` | css/dataviz.css; tokens/charts.json; tokens/charts.d.ts | `npm run charts:build` | check:charts | Data-viz colors are opt-in, CVD-gated, and never UI chrome. |
|
package/docs/reference.md
CHANGED
|
@@ -9,7 +9,7 @@ rendering of every class is the kitchen-sink demo:
|
|
|
9
9
|
**<https://ponchia.github.io/bronto-ui/>**. Theming knobs and the token
|
|
10
10
|
contract: [docs/theming.md](theming.md).
|
|
11
11
|
|
|
12
|
-
-
|
|
12
|
+
- 696 classes across 187 component groups
|
|
13
13
|
- Import the typed registry: `import { cls, ui, cx } from '@ponchia/ui/classes'`
|
|
14
14
|
- Validate markup as data (no JS/TS): `@ponchia/ui/classes.json` — the same
|
|
15
15
|
vocabulary as language-neutral JSON (`groups`, `classes`, `states`,
|
|
@@ -1035,6 +1035,7 @@ each one matches a real selector in the stylesheet.
|
|
|
1035
1035
|
| Registry key | Class | Kind |
|
|
1036
1036
|
| --- | --- | --- |
|
|
1037
1037
|
| `cls.prose` | `ui-prose` | base |
|
|
1038
|
+
| `cls.proseBlocks` | `ui-prose--blocks` | modifier |
|
|
1038
1039
|
| `cls.proseCompact` | `ui-prose--compact` | modifier |
|
|
1039
1040
|
|
|
1040
1041
|
### `.ui-provenance`
|
|
@@ -1759,6 +1760,10 @@ Exact mirror of the `:root` blocks in `css/tokens.css`
|
|
|
1759
1760
|
| `--space-lg` | `1.35rem` |
|
|
1760
1761
|
| `--space-xl` | `1.75rem` |
|
|
1761
1762
|
| `--space-2xl` | `2.5rem` |
|
|
1763
|
+
| `--space-0-5` | `0.125rem` |
|
|
1764
|
+
| `--space-0-75` | `0.1875rem` |
|
|
1765
|
+
| `--space-1-5` | `0.375rem` |
|
|
1766
|
+
| `--space-2-5` | `0.625rem` |
|
|
1762
1767
|
| `--tap-target` | `max(44px, 2.9rem)` |
|
|
1763
1768
|
| `--tap-target-min` | `max(24px, 1.6rem)` |
|
|
1764
1769
|
| `--safe-area-top` | `env(safe-area-inset-top, 0px)` |
|
|
@@ -1793,6 +1798,18 @@ Exact mirror of the `:root` blocks in `css/tokens.css`
|
|
|
1793
1798
|
| `--z-overlay` | `30` |
|
|
1794
1799
|
| `--z-popover` | `50` |
|
|
1795
1800
|
| `--z-toast` | `60` |
|
|
1801
|
+
| `--z-canvas` | `var(--z-base)` |
|
|
1802
|
+
| `--z-chrome` | `var(--z-sticky)` |
|
|
1803
|
+
| `--z-panel` | `25` |
|
|
1804
|
+
| `--z-modal` | `var(--z-overlay)` |
|
|
1805
|
+
| `--z-menu` | `var(--z-popover)` |
|
|
1806
|
+
| `--z-tooltip` | `70` |
|
|
1807
|
+
| `--z-navigation` | `80` |
|
|
1808
|
+
| `--ui-zoom` | `1` |
|
|
1809
|
+
| `--ui-px` | `1px` |
|
|
1810
|
+
| `--hairline` | `1px` |
|
|
1811
|
+
| `--focus-ring-width` | `2px` |
|
|
1812
|
+
| `--focus-ring-offset` | `2px` |
|
|
1796
1813
|
| `--accent-1` | `color-mix(in oklch, var(--accent) 8%, var(--accent-ramp-end))` |
|
|
1797
1814
|
| `--accent-2` | `color-mix(in oklch, var(--accent) 16%, var(--accent-ramp-end))` |
|
|
1798
1815
|
| `--accent-3` | `color-mix(in oklch, var(--accent) 32%, var(--accent-ramp-end))` |
|
package/docs/renderer.md
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
# Renderer tokens
|
|
2
|
+
|
|
3
|
+
`@ponchia/ui/renderer` resolves the live bronto theme for renderers that cannot
|
|
4
|
+
read CSS: Vega, xterm.js, a canvas or WebGL graph, a map, a 3D scene. Those
|
|
5
|
+
engines take literal colours, so a page that switches theme, skin, contrast or
|
|
6
|
+
the OLED surface has to resolve its tokens again before each repaint that
|
|
7
|
+
matters.
|
|
8
|
+
|
|
9
|
+
```js
|
|
10
|
+
import { readTokens, observeTokens, vegaConfig, xtermTheme } from '@ponchia/ui/renderer';
|
|
11
|
+
|
|
12
|
+
const tokens = readTokens(); // { scheme, bg, panel, text, line, accent, categorical, … }
|
|
13
|
+
view = await embed(el, spec, { config: vegaConfig(tokens, { narrow: el.clientWidth < 480 }) });
|
|
14
|
+
terminal.options.theme = xtermTheme(tokens);
|
|
15
|
+
|
|
16
|
+
const stop = observeTokens((next) => {
|
|
17
|
+
terminal.options.theme = xtermTheme(next);
|
|
18
|
+
rebuildChart(vegaConfig(next));
|
|
19
|
+
});
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
The static exports serve a different host. [`charts.json`](./theming.md#data-viz-palette)
|
|
23
|
+
and [`tokens/vega.js`](./vega.md) are snapshots per light/dark theme for a
|
|
24
|
+
report, a `file://` document or a build step. They cannot follow a skin or the
|
|
25
|
+
OLED preset; this module reads the page.
|
|
26
|
+
|
|
27
|
+
## What `readTokens()` returns
|
|
28
|
+
|
|
29
|
+
Every colour is a renderer literal: `#rrggbb` when opaque, `rgba(r, g, b, a)`
|
|
30
|
+
when translucent. Canvas, SVG, d3-color, xterm.js, three.js and MapLibre all
|
|
31
|
+
accept both.
|
|
32
|
+
|
|
33
|
+
| Field | Token | Use |
|
|
34
|
+
| --- | --- | --- |
|
|
35
|
+
| `scheme` | luminance of `--bg` | `'light'` or `'dark'` |
|
|
36
|
+
| `bg`, `bgElevated`, `panel`, `panelStrong` | `--bg`, `--bg-elevated`, `--panel`, `--panel-strong` | Backgrounds; draw on `panel` |
|
|
37
|
+
| `text`, `textSoft`, `textDim` | `--text`, `--text-soft`, `--text-dim` | Labels, secondary and tertiary ink |
|
|
38
|
+
| `line`, `lineStrong` | `--line`, `--line-strong` | Grid and hairlines; axes and rules |
|
|
39
|
+
| `accent`, `accentText`, `onAccent`, `focus` | accent family | The one emphasis, its text forms, focus |
|
|
40
|
+
| `selection` | `--accent` at 27% | A translucent selection wash |
|
|
41
|
+
| `success`, `warning`, `danger`, `info` | status tier | Status only, never categories |
|
|
42
|
+
| `sans`, `mono` | `--sans`, `--mono` | Font stacks for a canvas renderer |
|
|
43
|
+
| `categorical` | `--cat-1..8` | Eight hues in fixed order |
|
|
44
|
+
| `categoricalTint` | `--cat-N-tint` | Each hue as a wash over `panel` |
|
|
45
|
+
| `categoricalInk` | `--cat-N-ink` | Each hue as text, 4.5:1 on panel and tint |
|
|
46
|
+
| `sequential`, `diverging` | `--chart-seq-*`, `--chart-div-*` | Ramps for magnitude and ± data |
|
|
47
|
+
|
|
48
|
+
`readTokens(element)` reads the custom properties as computed on `element`, so a
|
|
49
|
+
subtree that re-points tokens is honoured. Without `css/dataviz.css` on the
|
|
50
|
+
page, the categorical set and the ramps fall back to the packaged palette for
|
|
51
|
+
the resolved scheme, and the tint is computed over the live panel. Without a
|
|
52
|
+
DOM (SSR, tests) it returns the packaged values; pass `{ scheme: 'dark' }` to
|
|
53
|
+
choose.
|
|
54
|
+
|
|
55
|
+
## Following changes
|
|
56
|
+
|
|
57
|
+
`observeTokens(callback, { element, signal })` calls back with fresh tokens
|
|
58
|
+
when the root's `data-theme`, `data-bronto-skin`, `data-contrast`,
|
|
59
|
+
`data-surface`, `data-density`, `class` or `style` changes and a token's value
|
|
60
|
+
moved with it, or when the system colour-scheme or contrast preference flips.
|
|
61
|
+
A host that writes its own inline properties on the root every frame (a canvas
|
|
62
|
+
zoom, say) costs one computed-style read per frame and no callback. Calls are
|
|
63
|
+
coalesced to one per animation frame. It returns a stop function; an
|
|
64
|
+
`AbortSignal` also stops it.
|
|
65
|
+
|
|
66
|
+
A host that already announces its own settled appearance change can read
|
|
67
|
+
`readTokens()` on that event instead and skip the observer.
|
|
68
|
+
|
|
69
|
+
## Mappings
|
|
70
|
+
|
|
71
|
+
- **`vegaConfig(tokens, { mode, narrow, background })`** — a Vega-Lite (default)
|
|
72
|
+
or Vega `config`. Quiet chrome in the bronto inks, no plot frame, the
|
|
73
|
+
categorical palette as `range.category` (a single series takes its first
|
|
74
|
+
hue), the sequential ramp for `ordinal`/`ramp`/`heatmap`, the diverging ramp
|
|
75
|
+
for `diverging`. `narrow` moves the legend under the plot and thins ticks;
|
|
76
|
+
`background` defaults to transparent so the host panel shows. A spec's own
|
|
77
|
+
`config` still wins where Vega merges it. The static
|
|
78
|
+
[`tokens/vega.js`](./vega.md) is this mapping applied to each theme's
|
|
79
|
+
packaged tokens.
|
|
80
|
+
- **`xtermTheme(tokens)`** — an xterm.js `ITheme`: page ink on the page
|
|
81
|
+
background, the accent as cursor, the status colours for red, green, yellow
|
|
82
|
+
and blue, and the categorical magenta and aqua inks for magenta and cyan, so
|
|
83
|
+
all six ANSI hues differ.
|
|
84
|
+
|
|
85
|
+
For any other engine, map the fields yourself: they are already the roles a
|
|
86
|
+
renderer needs.
|
|
87
|
+
|
|
88
|
+
## Conversions
|
|
89
|
+
|
|
90
|
+
- **`parseColor(value)`** — a resolved CSS colour to `{ r, g, b, alpha }`,
|
|
91
|
+
clipped into sRGB: hex, `rgb()`, `hsl()`, `oklch()`, `oklab()`, `lab()`,
|
|
92
|
+
`lch()` and `color(srgb | srgb-linear | display-p3 | xyz-d65 | xyz-d50 …)`.
|
|
93
|
+
It returns null for `var()`, `color-mix()`, `light-dark()` and named colours,
|
|
94
|
+
which only a browser can compute.
|
|
95
|
+
- **`formatColor(rgba)`** — `#rrggbb` or `rgba(r, g, b, a)`.
|
|
96
|
+
- **`resolveColor(value, { element })`** — any colour expression to a literal,
|
|
97
|
+
asking the browser for what `parseColor()` cannot compute.
|
|
98
|
+
|
|
99
|
+
The module is SSR-safe: it touches the DOM only inside a call that needs it.
|
|
100
|
+
It owns no renderer and imports none.
|
package/docs/reporting.md
CHANGED
|
@@ -60,18 +60,18 @@ No install? Link the same files from a CDN. Pin the version — pre-1.0, breakin
|
|
|
60
60
|
changes ship in the minor (see [stability.md](./stability.md)):
|
|
61
61
|
|
|
62
62
|
```html
|
|
63
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
64
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
63
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/bronto.css" />
|
|
64
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/report-kit.css" />
|
|
65
65
|
```
|
|
66
66
|
|
|
67
67
|
Leaf-by-leaf CDN imports use the same `dist/css/` paths:
|
|
68
68
|
|
|
69
69
|
```html
|
|
70
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
71
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
72
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
73
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
74
|
-
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
70
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/bronto.css" />
|
|
71
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/report.css" />
|
|
72
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/dataviz.css" />
|
|
73
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/annotations.css" />
|
|
74
|
+
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/dist/css/legend.css" />
|
|
75
75
|
```
|
|
76
76
|
|
|
77
77
|
The CDN serves the package's own `fonts/` next to the CSS, so font URLs resolve
|
|
@@ -649,7 +649,7 @@ directly; for a Vega chart, the same colours arrive through
|
|
|
649
649
|
`brontoVegaConfig`'s `range.*` ramps, projected from `@ponchia/ui/charts.json`.
|
|
650
650
|
|
|
651
651
|
For a **sequential** figure (a heatmap, a choropleth, a magnitude ramp) fill the
|
|
652
|
-
cells from the single-hue ramp tokens `--chart-seq-1` … `--chart-seq-
|
|
652
|
+
cells from the single-hue ramp tokens `--chart-seq-1` … `--chart-seq-5`
|
|
653
653
|
(low → high); for a **diverging** figure (−…0…+) use `--chart-div-1` …
|
|
654
654
|
`--chart-div-7` (the middle band is the neutral midpoint). Both ramps live in
|
|
655
655
|
`css/dataviz.css`, and their resolved per-theme hexes are in
|
|
@@ -885,7 +885,7 @@ or validation runtime.
|
|
|
885
885
|
|
|
886
886
|
```json
|
|
887
887
|
{
|
|
888
|
-
"$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.
|
|
888
|
+
"$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.13.0/schemas/report-claims.v1.schema.json",
|
|
889
889
|
"schemaVersion": "bronto-report-claims.v1",
|
|
890
890
|
"report": { "title": "Decision readiness", "type": "decision" },
|
|
891
891
|
"claims": [
|
package/docs/stability.md
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
# Public API stability
|
|
2
2
|
|
|
3
3
|
`@ponchia/ui` is pre-1.0. Breaking changes ship in the minor (`0.x.0`), and
|
|
4
|
-
patches are non-breaking. In practical terms: **PATCH releases (`0.
|
|
4
|
+
patches are non-breaking. In practical terms: **PATCH releases (`0.13.x`) are
|
|
5
5
|
non-breaking bug-fixes and additive changes — safe to upgrade without review;
|
|
6
6
|
MINOR releases (`0.x.0`) may include breaking changes and consumers should
|
|
7
7
|
review the CHANGELOG before upgrading.** Pin `~0.x` (tilde) to accept only
|
|
@@ -93,7 +93,9 @@ current public-surface matrix and the release policy above still applies.
|
|
|
93
93
|
| Glyph registry/renderers (`@ponchia/ui/glyphs`) | Stable additive | Existing glyph names stay valid. New glyphs are additive. Renderer option names and accessibility defaults are public. |
|
|
94
94
|
| `.ui-icon` mask renderer | Stable | Class name, `--icon-size`, currentColor inheritance, and `--icon-mask` contract are public. The internal data URL encoding is not. |
|
|
95
95
|
| Skins (`@ponchia/ui/skins`, `css/skins.css`) | Stable additive | Existing skin names stay valid. New skins are additive. Skins are root-level choices. Skin CSS is opt-in, not in the default bundle. |
|
|
96
|
-
|
|
|
96
|
+
| BlockNote interop (`css/blocknote.css`) | Stable additive | The leaf is opt-in and maps BlockNote's `--bn-*` theme variables to bronto tokens. Which bronto token a BlockNote variable points at may tune with the tokens; newly mapped BlockNote variables are additive. Import the unlayered build after BlockNote's own stylesheet. |
|
|
97
|
+
| Charts (`@ponchia/ui/charts`, `charts.json`, `css/dataviz.css`) | Stable additive | Token names (`--chart-*`, `--cat-N`, `--cat-N-tint`, `--cat-N-ink`), `CATEGORICAL_HUES`, the JSON shape, and the 8 categorical slots in fixed hue order are public. `css/dataviz.css` is opt-in, not in the default bundle. Exact palette values may tune if gates and release notes justify it. |
|
|
98
|
+
| Renderer tokens (`@ponchia/ui/renderer`) | Stable additive | Function names, option names and the `RendererTokens` field names are public; new fields are additive. Colours are returned as `#rrggbb` or `rgba()` literals. The exact Vega/xterm mapping may tune with the token model. |
|
|
97
99
|
| External renderer themes (`@ponchia/ui/mermaid`, `@ponchia/ui/mermaid.json`, `@ponchia/ui/d2`, `@ponchia/ui/d2.json`, `@ponchia/ui/vega`, `@ponchia/ui/vega.json`) | Stable additive | Theme helper names, JSON shapes, and supported renderer theme slots are public. Values are resolved colours because Mermaid, D2, and Vega cannot consume Bronto CSS variables directly. Exact colours may tune with token changes, but `check:mermaid`, `check:d2`, and `check:vega` must prove every exported theme resolves with no `var()` leaks. No renderer runtime ships. |
|
|
98
100
|
| Shiki theme data (`@ponchia/ui/shiki/nothing.json`) | Stable additive | The bundled Shiki theme JSON shape and token-derived scope roles are public for syntax-highlighting consumers. Exact colours may tune with the token model and must stay generated from the governed palette. |
|
|
99
101
|
| Reports (`css/report.css`, `.ui-report*`, print utilities) | Stable additive | Report class names, BEM part names, and print utility names are public. Report CSS is opt-in and not imported by the default bundle. The data key now lives in the standalone Legends layer (below), not `css/report.css`; charting is via the Vega theme target (`@ponchia/ui/vega`, see [vega](./vega.md)) or a token-themed inline SVG, not a shipped renderer. |
|