@ponchia/ui 0.6.5 → 0.6.7
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 +170 -0
- package/README.md +43 -23
- package/behaviors/carousel.d.ts.map +1 -1
- package/behaviors/carousel.js +3 -0
- package/behaviors/dialog.d.ts.map +1 -1
- package/behaviors/dialog.js +14 -8
- package/behaviors/forms.d.ts.map +1 -1
- package/behaviors/forms.js +11 -5
- package/behaviors/index.d.ts +2 -0
- package/behaviors/index.d.ts.map +1 -1
- package/behaviors/index.js +2 -0
- package/behaviors/internal.d.ts +2 -1
- package/behaviors/internal.d.ts.map +1 -1
- package/behaviors/internal.js +23 -3
- package/behaviors/legend.d.ts.map +1 -1
- package/behaviors/legend.js +41 -9
- package/behaviors/splitter.d.ts +26 -0
- package/behaviors/splitter.d.ts.map +1 -0
- package/behaviors/splitter.js +200 -0
- package/behaviors/table.js +3 -3
- package/behaviors/theme.js +2 -2
- package/classes/classes.json +230 -4
- package/classes/index.d.ts +49 -1
- package/classes/index.js +56 -1
- package/classes/vscode.css-custom-data.json +1 -1
- package/css/analytical.css +3 -1
- package/css/app.css +4 -4
- package/css/clamp.css +92 -0
- package/css/figure.css +102 -0
- package/css/highlights.css +50 -0
- package/css/interval.css +90 -0
- package/css/primitives.css +2 -3
- package/css/report-kit.css +38 -0
- package/css/report.css +51 -4
- package/css/sidenote.css +12 -2
- package/css/site.css +2 -1
- package/css/sources.css +5 -0
- package/css/state.css +120 -1
- package/css/table.css +4 -0
- package/css/tokens.css +9 -9
- package/css/workbench.css +101 -8
- package/dist/bronto.css +1 -1
- package/dist/css/analytical.css +1 -1
- package/dist/css/app.css +1 -1
- package/dist/css/clamp.css +1 -0
- package/dist/css/figure.css +1 -0
- package/dist/css/highlights.css +1 -0
- package/dist/css/interval.css +1 -0
- package/dist/css/primitives.css +1 -1
- package/dist/css/report-kit.css +1 -0
- package/dist/css/report.css +1 -1
- package/dist/css/sidenote.css +1 -1
- package/dist/css/site.css +1 -1
- package/dist/css/sources.css +1 -1
- package/dist/css/state.css +1 -1
- package/dist/css/table.css +1 -1
- package/dist/css/tokens.css +1 -1
- package/dist/css/workbench.css +1 -1
- package/docs/adr/0002-scope-and-2026-baseline.md +1 -1
- package/docs/architecture.md +67 -43
- package/docs/clamp.md +49 -0
- package/docs/contrast.md +34 -24
- package/docs/d2.md +37 -0
- package/docs/figure.md +71 -0
- package/docs/frontier-primitives.md +48 -23
- package/docs/highlights.md +52 -0
- package/docs/interop/tailwind.md +148 -0
- package/docs/interval.md +55 -0
- package/docs/legends.md +3 -2
- package/docs/mermaid.md +6 -0
- package/docs/migrations/0.2-to-0.3.md +80 -0
- package/docs/migrations/0.3-to-0.4.md +48 -0
- package/docs/migrations/0.4-to-0.5.md +96 -0
- package/docs/migrations/0.5-to-0.6.md +82 -0
- package/docs/package-contract.md +40 -2
- package/docs/reference.md +79 -6
- package/docs/reporting.md +132 -56
- package/docs/sidenote.md +7 -1
- package/docs/sources.md +1 -1
- package/docs/stability.md +5 -3
- package/docs/state.md +67 -10
- package/docs/theming.md +10 -2
- package/docs/usage.md +31 -11
- package/docs/workbench.md +59 -18
- package/llms.txt +82 -14
- package/package.json +68 -6
- package/qwik/index.d.ts +1 -0
- package/qwik/index.d.ts.map +1 -1
- package/qwik/index.js +26 -21
- package/react/index.d.ts +1 -0
- package/react/index.d.ts.map +1 -1
- package/react/index.js +4 -1
- package/schemas/report-claims.v1.schema.json +137 -0
- package/solid/index.d.ts +2 -0
- package/solid/index.d.ts.map +1 -1
- package/solid/index.js +3 -0
- package/svelte/index.d.ts +88 -0
- package/svelte/index.d.ts.map +1 -0
- package/svelte/index.js +166 -0
- package/tailwind.css +87 -0
- package/tokens/figma.variables.json +2241 -0
- package/tokens/index.js +1 -1
- package/tokens/index.json +2 -2
- package/tokens/resolved.json +3 -3
- package/tokens/tokens.dtcg.json +1 -1
- package/vue/index.d.ts +79 -0
- package/vue/index.d.ts.map +1 -0
- package/vue/index.js +197 -0
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
# Highlights
|
|
2
|
+
|
|
3
|
+
`@ponchia/ui/css/highlights.css` is an opt-in paint layer for the CSS Custom
|
|
4
|
+
Highlight API. It styles named `Range` sets without adding wrapper spans to the
|
|
5
|
+
DOM.
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
@import '@ponchia/ui';
|
|
9
|
+
@import '@ponchia/ui/css/highlights.css';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
Bronto only paints the names below. The host owns range discovery, search,
|
|
13
|
+
source mapping, current-match state, and cleanup.
|
|
14
|
+
|
|
15
|
+
| Highlight name | Use |
|
|
16
|
+
| --- | --- |
|
|
17
|
+
| `bronto-evidence` | Cited evidence or selected proof text. |
|
|
18
|
+
| `bronto-search` | Search result matches. |
|
|
19
|
+
| `bronto-current` | The active/current match. |
|
|
20
|
+
|
|
21
|
+
```html
|
|
22
|
+
<article class="ui-highlights" id="review">
|
|
23
|
+
<p id="evidence">Latency improved after the migration, but the window is short.</p>
|
|
24
|
+
</article>
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
```js
|
|
28
|
+
const text = document.querySelector('#evidence').firstChild;
|
|
29
|
+
if (CSS.highlights) {
|
|
30
|
+
const range = new Range();
|
|
31
|
+
range.setStart(text, 0);
|
|
32
|
+
range.setEnd(text, 16);
|
|
33
|
+
CSS.highlights.set('bronto-evidence', new Highlight(range));
|
|
34
|
+
}
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Contract
|
|
38
|
+
|
|
39
|
+
| Class | Role |
|
|
40
|
+
| --- | --- |
|
|
41
|
+
| `.ui-highlights` | Scope for Bronto's named highlight paints. |
|
|
42
|
+
|
|
43
|
+
| Custom property | On | Meaning |
|
|
44
|
+
| --- | --- | --- |
|
|
45
|
+
| `--highlight-evidence` | `.ui-highlights` | Wash for `bronto-evidence`. |
|
|
46
|
+
| `--highlight-search` | `.ui-highlights` | Wash for `bronto-search`. |
|
|
47
|
+
| `--highlight-current` | `.ui-highlights` | Wash for `bronto-current`. |
|
|
48
|
+
|
|
49
|
+
## Robustness
|
|
50
|
+
|
|
51
|
+
Check `CSS.highlights` before registering ranges. Without support, the page
|
|
52
|
+
falls back to plain text; no wrapper spans or extra cleanup are required.
|
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
# Tailwind v4 bridge and cascade-layer interop
|
|
2
|
+
|
|
3
|
+
Everything `@ponchia/ui` ships lives inside a single named cascade layer,
|
|
4
|
+
`@layer bronto`. This makes coexistence with Tailwind (or any layer-based CSS)
|
|
5
|
+
deterministic, but only if you control **layer order**.
|
|
6
|
+
|
|
7
|
+
Bronto also ships a Tailwind v4 bridge at `@ponchia/ui/tailwind`. It maps
|
|
8
|
+
Bronto's CSS custom properties into Tailwind's CSS-first `@theme` namespaces and
|
|
9
|
+
defines Bronto-aware variants. The bridge does **not** import the Bronto
|
|
10
|
+
component CSS for you; import both when you want both systems.
|
|
11
|
+
|
|
12
|
+
## The one rule
|
|
13
|
+
|
|
14
|
+
In CSS, an explicit `@layer` declaration's order beats specificity: later layers
|
|
15
|
+
win over earlier layers, and **un-layered styles beat all layered styles**. So:
|
|
16
|
+
|
|
17
|
+
- Un-layered Tailwind utilities already override `@ponchia/ui` with no
|
|
18
|
+
`!important` and no specificity fight.
|
|
19
|
+
- If Tailwind is itself layered (Tailwind v4 default), you must place its layers
|
|
20
|
+
**after** `bronto`.
|
|
21
|
+
|
|
22
|
+
## Tailwind v4
|
|
23
|
+
|
|
24
|
+
v4 emits `@layer theme, base, components, utilities;`. Declare `bronto`
|
|
25
|
+
**before** Tailwind's utilities so utilities can override components, then import
|
|
26
|
+
Tailwind and the Bronto bridge:
|
|
27
|
+
|
|
28
|
+
```css
|
|
29
|
+
/* app.css — order line first, before any @import */
|
|
30
|
+
@layer bronto, theme, base, components, utilities;
|
|
31
|
+
|
|
32
|
+
@import '@ponchia/ui'; /* fills @layer bronto */
|
|
33
|
+
@import 'tailwindcss'; /* fills theme/base/components/utilities */
|
|
34
|
+
@import '@ponchia/ui/tailwind'; /* adds @theme + @custom-variant bridge */
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Because the `@layer` statement above fixes the order up front, it does not
|
|
38
|
+
matter that `@ponchia/ui` is imported first — `utilities` is declared after
|
|
39
|
+
`bronto`, so `class="ui-button px-8"` gives Tailwind's `px-8` the final word.
|
|
40
|
+
|
|
41
|
+
If you'd rather Tailwind's **Preflight reset not touch** `@ponchia/ui` elements,
|
|
42
|
+
keep Preflight (in `base`) before `bronto` instead:
|
|
43
|
+
|
|
44
|
+
```css
|
|
45
|
+
@layer theme, base, bronto, components, utilities;
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Pick based on which reset you want to win; `@ponchia/ui`'s own reset is inside
|
|
49
|
+
`bronto`, so whichever layer is later wins the reset too.
|
|
50
|
+
|
|
51
|
+
### Theme utilities
|
|
52
|
+
|
|
53
|
+
The bridge uses Tailwind v4's CSS-first `@theme inline` form, so Bronto tokens
|
|
54
|
+
become ordinary Tailwind utilities while still reading the live CSS variables
|
|
55
|
+
from the active theme:
|
|
56
|
+
|
|
57
|
+
```html
|
|
58
|
+
<section
|
|
59
|
+
class="bg-bronto-surface text-bronto-text border border-bronto-border p-bronto-lg rounded-bronto-lg"
|
|
60
|
+
>
|
|
61
|
+
<button class="bg-bronto-action text-bronto-on-action ring-bronto-focus">Save</button>
|
|
62
|
+
</section>
|
|
63
|
+
```
|
|
64
|
+
|
|
65
|
+
Useful namespaces:
|
|
66
|
+
|
|
67
|
+
| Bronto token family | Tailwind utility examples |
|
|
68
|
+
| --- | --- |
|
|
69
|
+
| Surface/text/action colours | `bg-bronto-surface`, `text-bronto-text`, `border-bronto-border`, `ring-bronto-focus` |
|
|
70
|
+
| Accent ramps | `bg-bronto-accent-1` … `bg-bronto-accent-6` |
|
|
71
|
+
| Status colours | `text-bronto-success`, `bg-bronto-warning`, `border-bronto-danger`, `text-bronto-info` |
|
|
72
|
+
| Typography | `font-bronto-sans`, `font-bronto-mono`, `font-bronto-display`, `text-bronto-sm` |
|
|
73
|
+
| Spacing/radius/shadow/easing | `p-bronto-md`, `gap-bronto-sm`, `rounded-bronto-xl`, `shadow-bronto-raised`, `ease-bronto-standard` |
|
|
74
|
+
|
|
75
|
+
### Bronto variants
|
|
76
|
+
|
|
77
|
+
The bridge defines root/theme variants and common Bronto state variants:
|
|
78
|
+
|
|
79
|
+
```html
|
|
80
|
+
<article
|
|
81
|
+
class="bg-bronto-surface bronto-dark:bg-bronto-surface-raised bronto-contrast-more:border-bronto-border-strong"
|
|
82
|
+
>
|
|
83
|
+
...
|
|
84
|
+
</article>
|
|
85
|
+
|
|
86
|
+
<button class="bronto-active:text-bronto-action bronto-busy:opacity-70">Run</button>
|
|
87
|
+
```
|
|
88
|
+
|
|
89
|
+
Available variants:
|
|
90
|
+
|
|
91
|
+
| Variant | Selector intent |
|
|
92
|
+
| --- | --- |
|
|
93
|
+
| `bronto-light:*` / `bronto-dark:*` | Descendants under `html[data-theme="light|dark"]` |
|
|
94
|
+
| `bronto-oled:*` | Descendants under `[data-surface="oled"]` |
|
|
95
|
+
| `bronto-contrast-more:*` | Descendants under `[data-contrast="more"]` |
|
|
96
|
+
| `bronto-compact:*` / `bronto-comfortable:*` | Descendants under density presets |
|
|
97
|
+
| `bronto-active:*` | `.is-active`, current page, or selected tab state |
|
|
98
|
+
| `bronto-open:*` | Native/dialog/popover/open disclosure state |
|
|
99
|
+
| `bronto-selected:*` | selected/pressed state |
|
|
100
|
+
| `bronto-invalid:*` | invalid field state |
|
|
101
|
+
| `bronto-busy:*` | busy/loading state |
|
|
102
|
+
|
|
103
|
+
### Svelte/Vue component styles
|
|
104
|
+
|
|
105
|
+
When using `@apply` or `@variant` inside Vue or Svelte component style blocks,
|
|
106
|
+
import your app stylesheet with Tailwind's `@reference` directive so Tailwind
|
|
107
|
+
can see the Bronto theme variables and custom variants without duplicating CSS
|
|
108
|
+
output:
|
|
109
|
+
|
|
110
|
+
```css
|
|
111
|
+
@reference '../app.css';
|
|
112
|
+
|
|
113
|
+
.panel {
|
|
114
|
+
@apply bg-bronto-surface text-bronto-text bronto-dark:bg-bronto-surface-raised;
|
|
115
|
+
}
|
|
116
|
+
```
|
|
117
|
+
|
|
118
|
+
### Package source detection
|
|
119
|
+
|
|
120
|
+
`@ponchia/ui` components are normal `.ui-*` classes and do not need Tailwind to
|
|
121
|
+
scan the package. If your own app builds Tailwind class names inside ignored
|
|
122
|
+
generated files or an external package, register those sources with Tailwind's
|
|
123
|
+
`@source` directive in your app stylesheet.
|
|
124
|
+
|
|
125
|
+
## Tailwind v3
|
|
126
|
+
|
|
127
|
+
v3 (`@tailwind base/components/utilities`) is un-layered by default, so its
|
|
128
|
+
utilities **already** beat `@layer bronto` with zero config — just
|
|
129
|
+
`@import '@ponchia/ui';` first. If you opt into v3's experimental `cssLayers`,
|
|
130
|
+
apply the v4 rule above.
|
|
131
|
+
|
|
132
|
+
## Override matrix
|
|
133
|
+
|
|
134
|
+
| You want… | Use |
|
|
135
|
+
| ---------------------------------------------------- | ------------------------------------------------------------------- |
|
|
136
|
+
| Tailwind utilities to win (normal case) | Nothing — un-layered utilities already beat `@layer bronto` |
|
|
137
|
+
| A full-specificity, layer-free `@ponchia/ui` build | Import the `@ponchia/ui/css/unlayered/<leaf>.css` escape-hatch paths |
|
|
138
|
+
| Per-route CSS splitting + the bundle, no inversion | Mix freely — every leaf export self-wraps in `@layer bronto` |
|
|
139
|
+
| Tailwind's Preflight to NOT reset `ui-*` elements | `@layer theme, base, bronto, components, utilities;` |
|
|
140
|
+
| Bronto tokens as Tailwind utilities | `@import '@ponchia/ui/tailwind';` after Tailwind v4 |
|
|
141
|
+
| Vue/Svelte style blocks using Bronto utilities | `@reference '../app.css';` from the component style block |
|
|
142
|
+
|
|
143
|
+
## Gotcha
|
|
144
|
+
|
|
145
|
+
Do **not** mix `@ponchia/ui` (layered) with `@ponchia/ui/css/unlayered/*` for
|
|
146
|
+
the _same_ leaf — the unlayered copy will unconditionally win and you lose the
|
|
147
|
+
ordering guarantees. The `unlayered/*` paths are a deliberate, surgical escape
|
|
148
|
+
hatch, not a default.
|
package/docs/interval.md
ADDED
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
# Interval
|
|
2
|
+
|
|
3
|
+
`@ponchia/ui/css/interval.css` is an opt-in low/high uncertainty primitive for
|
|
4
|
+
reports: confidence intervals, estimates, measurement ranges, target windows,
|
|
5
|
+
and caveated values.
|
|
6
|
+
|
|
7
|
+
```css
|
|
8
|
+
@import '@ponchia/ui';
|
|
9
|
+
@import '@ponchia/ui/css/interval.css';
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
The host normalises every value to `0..1`. Bronto paints only the track, range,
|
|
13
|
+
and optional point estimate.
|
|
14
|
+
|
|
15
|
+
```html
|
|
16
|
+
<div
|
|
17
|
+
class="ui-interval"
|
|
18
|
+
style="--lo: 0.22; --hi: 0.68"
|
|
19
|
+
role="img"
|
|
20
|
+
aria-label="Estimated completion between 22 and 68 percent, point estimate 52 percent"
|
|
21
|
+
>
|
|
22
|
+
<span class="ui-interval__label">Estimate window</span>
|
|
23
|
+
<span class="ui-interval__track" aria-hidden="true">
|
|
24
|
+
<span class="ui-interval__range"></span>
|
|
25
|
+
<span class="ui-interval__point" style="--v: 0.52"></span>
|
|
26
|
+
</span>
|
|
27
|
+
<span class="ui-interval__bounds" aria-hidden="true">
|
|
28
|
+
<span>22%</span>
|
|
29
|
+
<span>68%</span>
|
|
30
|
+
</span>
|
|
31
|
+
</div>
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
## Contract
|
|
35
|
+
|
|
36
|
+
| Class | Role |
|
|
37
|
+
| --- | --- |
|
|
38
|
+
| `.ui-interval` | Wrapper and custom-property host. |
|
|
39
|
+
| `.ui-interval__track` | Neutral track. |
|
|
40
|
+
| `.ui-interval__range` | Low-high range span. |
|
|
41
|
+
| `.ui-interval__point` | Optional point estimate. Omit the element when none exists. |
|
|
42
|
+
| `.ui-interval__label` | Written label. |
|
|
43
|
+
| `.ui-interval__bounds` | Visible low/high labels. |
|
|
44
|
+
|
|
45
|
+
| Custom property | On | Meaning |
|
|
46
|
+
| --- | --- | --- |
|
|
47
|
+
| `--lo` | `.ui-interval` | Required normalised lower bound, `0..1`. |
|
|
48
|
+
| `--hi` | `.ui-interval` | Required normalised upper bound, `0..1`. |
|
|
49
|
+
| `--v` | `.ui-interval__point` | Optional normalised point estimate, `0..1`. |
|
|
50
|
+
|
|
51
|
+
## Accessibility
|
|
52
|
+
|
|
53
|
+
Pair each interval with a written label or `role="img"` plus `aria-label`. The
|
|
54
|
+
range is not the data of record: under forced-colors or print, the readable
|
|
55
|
+
label and bounds must still explain the value.
|
package/docs/legends.md
CHANGED
|
@@ -184,5 +184,6 @@ document.addEventListener('bronto:legend:toggle', (e) => {
|
|
|
184
184
|
Convention: `aria-pressed="true"` means the series is **shown** (the default).
|
|
185
185
|
The entry's label never changes on toggle — only `aria-pressed` and
|
|
186
186
|
`.is-inactive` flip, so a screen reader reads a stable name with a clear
|
|
187
|
-
pressed state. React/Solid/Qwik consumers can use `useLegend()`
|
|
188
|
-
calling `initLegend` directly
|
|
187
|
+
pressed state. React/Solid/Qwik/Svelte consumers can use `useLegend()` (or the
|
|
188
|
+
`legend` Svelte action) instead of calling `initLegend` directly; Vue consumers
|
|
189
|
+
can use `vLegend`.
|
package/docs/mermaid.md
CHANGED
|
@@ -54,6 +54,12 @@ below):
|
|
|
54
54
|
</script>
|
|
55
55
|
```
|
|
56
56
|
|
|
57
|
+
> **There is no classic-script path.** Mermaid v11 ships **no UMD bundle** —
|
|
58
|
+
> its `dist/` is ESM-chunked, so vendoring a `mermaid.min.js` for a plain
|
|
59
|
+
> `<script src>` is a dead end. In the browser it is the ES-module import
|
|
60
|
+
> above (over a real `http(s)` origin); for everything else, pre-render to a
|
|
61
|
+
> frozen SVG with `mmdc` (below) so there is no runtime at all.
|
|
62
|
+
|
|
57
63
|
> **file:// portability.** A report opened straight from disk (`file://`) cannot
|
|
58
64
|
> `import` the `@ponchia/ui/mermaid` module **nor** `fetch('…/mermaid.json')` —
|
|
59
65
|
> the browser blocks both across the `null`/file origin (CORS), exactly as with
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
# Migrating 0.2 → 0.3
|
|
2
|
+
|
|
3
|
+
0.3.0 removed the entire pre-`ui-*` vocabulary. Everything shipped is now
|
|
4
|
+
under the `.ui-*` contract and the `check-classes` drift gate. This page
|
|
5
|
+
turns the CHANGELOG's BREAKING notes into a runnable recipe. The
|
|
6
|
+
machine-readable source of truth is [`MIGRATIONS.json`](../../MIGRATIONS.json).
|
|
7
|
+
|
|
8
|
+
## 1. Mechanical renames (safe to automate)
|
|
9
|
+
|
|
10
|
+
These are whole-class-token renames with no semantic change. Run from
|
|
11
|
+
your **consuming app's** repo root (adjust the glob to your templates —
|
|
12
|
+
`.astro`, `.svelte`, `.jsx`, `.tsx`, `.html`):
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
# Preview first — list every file/line that will change:
|
|
16
|
+
rg -l --glob '*.{astro,svelte,jsx,tsx,vue,html}' \
|
|
17
|
+
-e 'skip-link' -e 'site-nav' -e 'site-menu' -e 'theme-toggle' -e '\bapp-' .
|
|
18
|
+
|
|
19
|
+
# Apply (BSD/macOS sed shown; GNU sed: drop the '' after -i):
|
|
20
|
+
fd -e astro -e svelte -e jsx -e tsx -e vue -e html -x sed -i '' \
|
|
21
|
+
-e 's/\bskip-link\b/ui-skiplink/g' \
|
|
22
|
+
-e 's/\bsite-nav\b/ui-sitenav/g' \
|
|
23
|
+
-e 's/\bsite-menu\b/ui-sitemenu/g' \
|
|
24
|
+
-e 's/\btheme-toggle\b/ui-themetoggle/g' \
|
|
25
|
+
-e 's/\bapp-\(shell\|rail\|topbar\|toolbar\|nav\|panel\|content\|main\|metrics\|metric\|empty-state\)/ui-app-\1/g' {}
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
The `\b` word boundaries keep `app-` from clobbering unrelated tokens,
|
|
29
|
+
but **review the diff** — a codemod cannot know your markup.
|
|
30
|
+
|
|
31
|
+
If you import the typed class registry, switch to the new entries
|
|
32
|
+
instead and let the compiler find the rest:
|
|
33
|
+
|
|
34
|
+
```js
|
|
35
|
+
import { cls } from '@ponchia/ui/classes';
|
|
36
|
+
// cls.appShell, cls.appRail, …, cls.themetoggleTrack, cls.menuHost
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
## 2. Concept moves (manual — no 1:1 rename)
|
|
40
|
+
|
|
41
|
+
| Old | Now |
|
|
42
|
+
| ------------------------------------------------ | --------------------------------------------------------------------------- |
|
|
43
|
+
| `.hero`, `.project-*`, `.post-card`, `.essay-*`, `.page-*`, `.home-*`, `.signal-panel`, `.worklog-summary` | Re-compose with the content layer: `.ui-prose` / `.ui-quote`, `.ui-card`, `.ui-grid` / `.ui-stack`, the `ui-site*` shell |
|
|
44
|
+
| `.callout` | `.ui-alert` (pick a tone: `--info` / `--success` / `--warning` / `--danger`) |
|
|
45
|
+
| `.metric-tile` | `.ui-app-metric` inside `.ui-app-metrics` |
|
|
46
|
+
| `.tag-list` / `.tag` | `.ui-tags` / `.ui-tag` (verify accent-on-accent contrast) |
|
|
47
|
+
|
|
48
|
+
## 3. Import and token checks
|
|
49
|
+
|
|
50
|
+
The bundle collapsed in 0.3.0. Use the package root (`@ponchia/ui`) or
|
|
51
|
+
`@ponchia/ui/css`; removed paths such as `./css/index.css`,
|
|
52
|
+
`./css/responsive.css`, `./dist/bronto-core.css`, and
|
|
53
|
+
`./css/{layout,typography,cards}.css` should be deleted.
|
|
54
|
+
|
|
55
|
+
Direct leaf imports changed meaning too: `@ponchia/ui/css/<leaf>.css` now
|
|
56
|
+
resolves to the safe layered build. If you intentionally depended on a raw
|
|
57
|
+
unlayered leaf overriding your app by specificity, switch that import to
|
|
58
|
+
`@ponchia/ui/css/unlayered/<leaf>.css`.
|
|
59
|
+
|
|
60
|
+
If you re-brand with a pale `--accent`, set `--accent-text` as well; 0.3.0
|
|
61
|
+
routes small accent-coloured text through that AA-safe token. TypeScript users
|
|
62
|
+
should also expect `cls` and token helpers to reject typos now that the
|
|
63
|
+
declarations are literal unions.
|
|
64
|
+
|
|
65
|
+
## 4. Verify
|
|
66
|
+
|
|
67
|
+
- `rg -n 'class(Name)?=.*"[^"]*\b(hero|callout|metric-tile|post-card|skip-link)\b'`
|
|
68
|
+
should return nothing after the pass.
|
|
69
|
+
- `rg -n '@ponchia/ui/(css/(index|responsive|layout|typography|cards)\\.css|dist/bronto-core\\.css)'`
|
|
70
|
+
should return nothing.
|
|
71
|
+
- Visual-diff your app: token **values** can change in any release
|
|
72
|
+
without a major bump, so eyeball the result, don't just diff classes.
|
|
73
|
+
|
|
74
|
+
## Deprecation policy
|
|
75
|
+
|
|
76
|
+
From 0.3.1 onward, removals follow the policy in
|
|
77
|
+
[CONTRIBUTING.md](../../CONTRIBUTING.md#deprecation-policy): a class is
|
|
78
|
+
deprecated for **one minor** (kept working, marked in CHANGELOG +
|
|
79
|
+
`MIGRATIONS.json`) before it is removed. 0.2 → 0.3 predates this policy,
|
|
80
|
+
which is why it was a hard cut.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# Migrating 0.3 → 0.4
|
|
2
|
+
|
|
3
|
+
0.4.0 is the **colour-system** release (see
|
|
4
|
+
[ADR-0001](../adr/0001-color-system.md)). It is **additive for almost
|
|
5
|
+
everyone** — the default `dist/bronto.css` renders identically. There is a
|
|
6
|
+
single breaking change, and it only bites if you used an undocumented token.
|
|
7
|
+
The machine-readable map is [`MIGRATIONS.json`](../../MIGRATIONS.json).
|
|
8
|
+
|
|
9
|
+
## The one breaking change
|
|
10
|
+
|
|
11
|
+
**`--orange` / `--orange-soft` were removed.** They were defined in the token
|
|
12
|
+
mirrors but referenced by no component and documented nowhere — an orphan that
|
|
13
|
+
contradicted the tier model. Removed under the CONTRIBUTING "provably-
|
|
14
|
+
unreferenced surface" exception.
|
|
15
|
+
|
|
16
|
+
**Migration:** if you referenced `--orange` / `--orange-soft` anywhere, define
|
|
17
|
+
it yourself in a consumer override:
|
|
18
|
+
|
|
19
|
+
```css
|
|
20
|
+
:root {
|
|
21
|
+
--orange: #a85f32;
|
|
22
|
+
--orange-soft: rgb(168 95 50 / 0.13);
|
|
23
|
+
}
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
Most apps need to do nothing. Verify with:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
rg -- '--orange' .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## What's new (all opt-in, nothing to change)
|
|
33
|
+
|
|
34
|
+
- **Colorways** — `@ponchia/ui/css/skins.css` + `data-bronto-skin="amber-crt |
|
|
35
|
+
phosphor-green | e-ink"` on `<html>`. Not loaded → no effect.
|
|
36
|
+
- **Data-viz palette** — `@ponchia/ui/css/dataviz.css` + `@ponchia/ui/charts.json`
|
|
37
|
+
(`--chart-*` + dot-matrix pattern fills). Charts only.
|
|
38
|
+
- **Tier-3 dot-matrix display tokens** (`--dotmatrix-glow`, `--dotmatrix-pulse-min`)
|
|
39
|
+
— default to a no-op.
|
|
40
|
+
- **APCA** advisory contrast column in `docs/contrast.md`; WCAG 2.1 AA stays the
|
|
41
|
+
gate.
|
|
42
|
+
|
|
43
|
+
## Re-pin
|
|
44
|
+
|
|
45
|
+
```jsonc
|
|
46
|
+
// package.json — 0.4 is a breaking minor under the pre-1.0 policy
|
|
47
|
+
"@ponchia/ui": "~0.4.0"
|
|
48
|
+
```
|
|
@@ -0,0 +1,96 @@
|
|
|
1
|
+
# Migrating 0.4 → 0.5
|
|
2
|
+
|
|
3
|
+
0.5.0 builds out the **analytical & communication** identity: an opt-in suite of
|
|
4
|
+
primitives for interfaces that explain themselves — SVG annotations, standalone
|
|
5
|
+
legends, text/evidence marks, leader-line connectors, a guided-focus spotlight, a
|
|
6
|
+
crosshair/readout, a selection vocabulary (rolled up in
|
|
7
|
+
[`css/analytical.css`](../../css/analytical.css)), plus standalone
|
|
8
|
+
`sources`/provenance, lifecycle `state`, AI-trust `generated`, `workbench` and a
|
|
9
|
+
`command` palette.
|
|
10
|
+
|
|
11
|
+
Almost all of it is **additive and opt-in** — the default `dist/bronto.css`
|
|
12
|
+
renders identically and needs no change. There are **three breaking changes**,
|
|
13
|
+
and every one of them lives in the _opt-in_ report / analytical layer. The
|
|
14
|
+
machine-readable map is [`MIGRATIONS.json`](../../MIGRATIONS.json) (now shipped
|
|
15
|
+
in the package).
|
|
16
|
+
|
|
17
|
+
## 1. The report kit's chart key moved to the standalone Legends layer
|
|
18
|
+
|
|
19
|
+
`.ui-chart__legend` / `.ui-chart__swatch` were **removed** from
|
|
20
|
+
`css/report.css`. The data key is now the standalone Legends layer
|
|
21
|
+
(`css/legend.css`), which is richer (categorical / gradient / threshold /
|
|
22
|
+
pattern keys, an optional interactive series toggle) and reusable outside
|
|
23
|
+
reports.
|
|
24
|
+
|
|
25
|
+
**Migration:** add the legend leaf next to the report kit and rework the wrapper.
|
|
26
|
+
|
|
27
|
+
```diff
|
|
28
|
+
+ <link rel="stylesheet" href="@ponchia/ui/css/legend.css">
|
|
29
|
+
|
|
30
|
+
- <ul class="ui-chart__legend">
|
|
31
|
+
- <li><span class="ui-chart__swatch" style="--chart-color: var(--chart-1)"></span> Research</li>
|
|
32
|
+
- </ul>
|
|
33
|
+
+ <ul class="ui-legend">
|
|
34
|
+
+ <li class="ui-legend__item">
|
|
35
|
+
+ <span class="ui-legend__swatch" style="--chart-color: var(--chart-1)"></span>
|
|
36
|
+
+ <span class="ui-legend__label">Research</span>
|
|
37
|
+
+ </li>
|
|
38
|
+
+ </ul>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
The swatch's `--chart-color` / `--chart-pattern` inline contract is unchanged;
|
|
42
|
+
the categorical colour is also available via `.ui-legend__swatch--1..8`. Full
|
|
43
|
+
grammar: [`docs/legends.md`](../legends.md). Quick rename:
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
rg -l 'ui-chart__legend|ui-chart__swatch' .
|
|
47
|
+
# s/ui-chart__swatch/ui-legend__swatch/g + rework the <ul> wrapper as above
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## 2. The marks rationed-accent tone `evidence` → `accent`
|
|
51
|
+
|
|
52
|
+
To match the connector/annotation tone vocabulary, the **tone** modifier on
|
|
53
|
+
text marks and bracket notes was renamed:
|
|
54
|
+
|
|
55
|
+
| 0.4 | 0.5 |
|
|
56
|
+
| --- | --- |
|
|
57
|
+
| `.ui-mark--evidence` | `.ui-mark--accent` |
|
|
58
|
+
| `.ui-bracket-note--evidence` | `.ui-bracket-note--accent` |
|
|
59
|
+
| `ui.mark({ tone: 'evidence' })` | `ui.mark({ tone: 'accent' })` |
|
|
60
|
+
| `ui.bracketNote({ tone: 'evidence' })` | `ui.bracketNote({ tone: 'accent' })` |
|
|
61
|
+
|
|
62
|
+
**Do _not_ rewrite** `ui.annotation({ variant: 'evidence' })` or the
|
|
63
|
+
`.ui-annotation--evidence` subject marker — those are a marker **shape**, not a
|
|
64
|
+
tone, and are unchanged.
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
rg -l 'ui-mark--evidence|ui-bracket-note--evidence' .
|
|
68
|
+
# s/ui-mark--evidence/ui-mark--accent/g ; s/ui-bracket-note--evidence/ui-bracket-note--accent/g
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## 3. Annotation arrowheads share the connectors geometry kernel
|
|
72
|
+
|
|
73
|
+
No API change — `connectorEndArrow` and the annotation arrowhead recipes keep
|
|
74
|
+
their signatures. Only the **rendered arrowhead path** differs slightly now that
|
|
75
|
+
it reuses the shared `@ponchia/ui/connectors` geometry kernel.
|
|
76
|
+
|
|
77
|
+
**Migration:** nothing to change in code. If you keep exact-path SVG snapshot
|
|
78
|
+
tests of annotation arrowheads, **re-baseline** them.
|
|
79
|
+
|
|
80
|
+
## What's new (all opt-in, nothing to change)
|
|
81
|
+
|
|
82
|
+
- **Analytical suite** — `@ponchia/ui/css/analytical.css` rolls up annotations,
|
|
83
|
+
legend, marks, connectors, spotlight, crosshair and selection. Each owns only
|
|
84
|
+
its visual grammar + pure geometry (no chart engine, no state, no hit-testing).
|
|
85
|
+
- **App-tier leaves** — `css/sources.css` (citation/provenance trust),
|
|
86
|
+
`css/state.css` (lifecycle/system state), `css/generated.css` (AI-trust),
|
|
87
|
+
`css/workbench.css` (inspector/property/selection bar), and `css/command.css`
|
|
88
|
+
+ `initCommand` (a filter/keyboard command palette).
|
|
89
|
+
- **`.ui-shortcut`** — a keyboard-hint chord/sequence primitive in the core layer.
|
|
90
|
+
|
|
91
|
+
## Re-pin
|
|
92
|
+
|
|
93
|
+
```jsonc
|
|
94
|
+
// package.json — 0.5 is a breaking minor under the pre-1.0 policy
|
|
95
|
+
"@ponchia/ui": "~0.5.0"
|
|
96
|
+
```
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
# Migrating 0.5 -> 0.6
|
|
2
|
+
|
|
3
|
+
0.6.0 is the **charting realignment** release. The analytical layer still
|
|
4
|
+
explains figures, but it no longer pretends CSS can be a chart renderer:
|
|
5
|
+
scales, domains, axes and data binding belong to a chart engine.
|
|
6
|
+
|
|
7
|
+
There is one breaking change. The data-viz palette (`--chart-*`,
|
|
8
|
+
`tokens/charts.json`) and the standalone Legends layer are unchanged. The
|
|
9
|
+
machine-readable map is [`MIGRATIONS.json`](../../MIGRATIONS.json).
|
|
10
|
+
|
|
11
|
+
## 1. Replace the removed `.ui-chart*` renderer
|
|
12
|
+
|
|
13
|
+
The static bar-chart classes were removed:
|
|
14
|
+
|
|
15
|
+
```text
|
|
16
|
+
ui-chart
|
|
17
|
+
ui-chart__plot
|
|
18
|
+
ui-chart__bar
|
|
19
|
+
ui-chart__label
|
|
20
|
+
ui-chart__track
|
|
21
|
+
ui-chart__fill
|
|
22
|
+
ui-chart__fallback
|
|
23
|
+
ui-chart__caption
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
There is no safe class rename. Find call sites first:
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
rg -n 'ui-chart\b|ui-chart__' .
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
For live or data-driven charts, migrate to Vega-Lite and apply the Bronto
|
|
33
|
+
theme config:
|
|
34
|
+
|
|
35
|
+
```js
|
|
36
|
+
import { brontoVegaConfig } from '@ponchia/ui/vega';
|
|
37
|
+
|
|
38
|
+
vegaEmbed('#chart', spec, {
|
|
39
|
+
config: brontoVegaConfig(document.documentElement.dataset.theme || 'light'),
|
|
40
|
+
renderer: 'svg',
|
|
41
|
+
actions: false,
|
|
42
|
+
});
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Wrap the rendered chart in report chrome and keep the data key in the
|
|
46
|
+
standalone legend layer:
|
|
47
|
+
|
|
48
|
+
```html
|
|
49
|
+
<figure class="ui-report__figure">
|
|
50
|
+
<div id="chart"></div>
|
|
51
|
+
<figcaption class="ui-report__caption">Latency by region.</figcaption>
|
|
52
|
+
<ul class="ui-legend">
|
|
53
|
+
<li class="ui-legend__item">
|
|
54
|
+
<span class="ui-legend__swatch ui-legend__swatch--1"></span>
|
|
55
|
+
<span class="ui-legend__label">EU West</span>
|
|
56
|
+
</li>
|
|
57
|
+
</ul>
|
|
58
|
+
</figure>
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
For frozen print charts with no runtime, hand-author an inline `<svg>` using the
|
|
62
|
+
resolved `--chart-*` palette or `tokens/charts.json`.
|
|
63
|
+
|
|
64
|
+
## 2. Remove `--chart-value`
|
|
65
|
+
|
|
66
|
+
The old renderer's per-bar `--chart-value` knob is gone with the renderer.
|
|
67
|
+
Keep using `--chart-color` and `--chart-pattern` on `.ui-legend__swatch`; those
|
|
68
|
+
belong to the unchanged Legends layer.
|
|
69
|
+
|
|
70
|
+
## 3. Import the new chart theme helper only when needed
|
|
71
|
+
|
|
72
|
+
`@ponchia/ui/vega` and `vega.json` are config/data only. Vega, Vega-Lite and
|
|
73
|
+
vega-embed remain consumer dependencies; Bronto does not bundle a chart engine.
|
|
74
|
+
See [`docs/vega.md`](../vega.md) for the browser, CDN and static-report
|
|
75
|
+
recipes.
|
|
76
|
+
|
|
77
|
+
## Re-pin
|
|
78
|
+
|
|
79
|
+
```jsonc
|
|
80
|
+
// package.json — 0.6 is a breaking minor under the pre-1.0 policy
|
|
81
|
+
"@ponchia/ui": "~0.6.0"
|
|
82
|
+
```
|