@ponchia/ui 0.8.0 → 0.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -5,6 +5,51 @@
5
5
  |> `^0` / `*` wildcard does **not** protect you. See README → Versioning, and
6
6
  |> the deprecation policy in CONTRIBUTING.md.
7
7
 
8
+ ## 0.8.1 — 2026-08-11
9
+
10
+ A packaging fix, plus dependency hygiene. **No published CSS, token, class, or
11
+ type artifact changed** — `dist/`, `css/`, `tokens/` and `classes/` are byte-for-byte
12
+ identical to 0.8.0. If you are on 0.8.0 and do not read the migration guide from
13
+ the package, there is nothing here for you.
14
+
15
+ ### Fixed
16
+
17
+ - **`docs/migrations/0.7-to-0.8.md` was missing from the published package.**
18
+ 0.8.0's one breaking change is the colorway canvas re-point, `CHANGELOG.md`
19
+ and `MIGRATIONS.json` both point at that guide, and it was not in the tarball —
20
+ so a consumer following the pointer from an offline install got nothing. The
21
+ guide was written, linked, and gated by `check:doc-links`; it was simply never
22
+ added to `package.json`'s hand-maintained `files` array.
23
+ - **The gate that should have caught it was circular.** `check-pack.mjs` derived
24
+ its set of shipped docs *from* `files`, so it proved every listed doc ships and
25
+ could never prove a doc that exists is listed. It now asserts the other
26
+ direction for the two directories the published package itself references —
27
+ `docs/migrations/` (from `MIGRATIONS.json`) and `docs/adr/` (from
28
+ `docs/architecture.md`) — where a missing file costs a reader a dead pointer.
29
+ Other `docs/` pages stay opt-in: the package ships a curated subset by design.
30
+
31
+ ### Changed
32
+
33
+ - **Dependency sweep** — ten Dependabot PRs landed as one reviewed change. Every
34
+ advisory was **devDependency-scoped**; the package declares no runtime
35
+ dependencies and `npm audit --omit=dev` was already clean, so none of them
36
+ ever reached a consumer. `npm audit` now reports 0 across the whole tree
37
+ (`fast-uri`, `js-yaml`, `nanoid`, `pdfjs-dist`, `postcss`, `shell-quote`,
38
+ `tar`, `undici`), the toolchain moved (`jsdom` 30, `knip` 6.32, `prettier`
39
+ 3.9.6, `publint` 0.3.23, `react`/`react-dom` 19.2.8, `solid-js` 1.9.14,
40
+ `stylelint` 17.14.1, `vega` 6.3.1, `@arethetypeswrong/cli` 0.18.5), the pinned
41
+ action SHAs moved, and the Astro example moved to Astro 7 (verified building
42
+ against the packed 0.8.0 tarball).
43
+
44
+ ### Not taken
45
+
46
+ - **TypeScript 7.** Its default export is now `{ version, versionMajorMinor }` —
47
+ the compiler-API namespace moved in the native port — so `ts.ScriptTarget` is
48
+ `undefined` and `scripts/lib/import-policy.mjs` throws at `check:exports`.
49
+ Adapting this repository's AST tooling to that API is real work with its own
50
+ review, and there is no security driver: TypeScript is not in any advisory
51
+ here. Pinned to `^6.0.3`; Dependabot's dev-group PR stays open for it.
52
+
8
53
  ## 0.8.0 — 2026-08-11
9
54
 
10
55
  A single-consumer release. A full-surface audit of the largest downstream
package/README.md CHANGED
@@ -81,7 +81,7 @@ Or drop it in with no build step, straight from a CDN (replace the version only
81
81
  when deliberately upgrading across a breaking pre-1.0 minor):
82
82
 
83
83
  ```html
84
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/bronto.css">
84
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/bronto.css">
85
85
  ```
86
86
 
87
87
  ## Quick start
@@ -0,0 +1,216 @@
1
+ # Migrating 0.7 to 0.8
2
+
3
+ Machine-readable migration graph: [`MIGRATIONS.json`](../../MIGRATIONS.json) —
4
+ it has no entry for this pair, because nothing was renamed or removed. Every
5
+ class, token, attribute, and export valid in 0.7 is still valid.
6
+
7
+ 0.8.0 comes from auditing one real consumer's stylesheet in full. It repairs an
8
+ accessibility floor, adds three surfaces that consumer had to hand-write, and
9
+ changes what a colorway does. Only the last of those needs a decision from you.
10
+
11
+ ## 1. Decide what your skins should look like — the one breaking change
12
+
13
+ **Only affects you if you set `data-bronto-skin`.** If you don't, skip to §2.
14
+
15
+ Until 0.7, a colorway moved `--accent` and nothing else; the neutral canvas
16
+ stayed grey, and ADR-0001 step 4 said so. From 0.8 a colorway also re-points ten
17
+ canvas tokens per theme:
18
+
19
+ ```
20
+ --bg --bg-elevated --panel --panel-strong --panel-soft
21
+ --line --line-strong --text --text-soft --text-dim
22
+ ```
23
+
24
+ So "Amber CRT" now actually renders amber. Nothing in your source changes and no
25
+ checker will flag anything — the break is purely visual, which is why it is
26
+ worth reading rather than discovering.
27
+
28
+ **Contrast is not a regression risk.** Each neutral keeps the core token's OKLCH
29
+ *lightness* exactly and moves only hue plus a small chroma, and `check-contrast`
30
+ re-measures all 21 gated pairings per skin per theme. Status colours
31
+ (`--success` / `--warning` / `--danger` / `--info`) are untouched by design: a
32
+ warning must look like a warning in every skin.
33
+
34
+ ### If you already hand-wrote a canvas for a skin
35
+
36
+ Delete it. That workaround is what motivated this change, and a hand-rolled
37
+ version is almost certainly not contrast-gated, probably covers one theme, and
38
+ probably misses whichever skin nobody opened.
39
+
40
+ ### If you want the 0.7 look back
41
+
42
+ Re-declare the ten tokens after the skin import. They are ordinary custom
43
+ properties on a `:root[data-bronto-skin=…]` selector inside `@layer bronto`, so
44
+ un-layered app CSS wins without a specificity fight:
45
+
46
+ ```css
47
+ @import '@ponchia/ui';
48
+ @import '@ponchia/ui/css/skins.css';
49
+
50
+ /* Keep the neutral canvas grey under every colorway. */
51
+ :root[data-bronto-skin] {
52
+ --bg: #f4f4f2;
53
+ --bg-elevated: #fbfbfa;
54
+ --panel: #ffffff;
55
+ --panel-strong: #ffffff;
56
+ --panel-soft: #ececea;
57
+ --line: #d8d8d4;
58
+ --line-strong: #a8a8a2;
59
+ --text: #0a0a0a;
60
+ --text-soft: #353533;
61
+ --text-dim: #686863;
62
+ }
63
+ ```
64
+
65
+ (Those are the 0.7 light values; take the dark set from `tokens/resolved.json`
66
+ and repeat under `:root[data-theme='dark'][data-bronto-skin]`.)
67
+
68
+ ## 2. Delete your tap-target workaround
69
+
70
+ The coarse-pointer floor was written as a bare `2.9rem`, and `css/base.css` sets
71
+ `html { font-size: 0.9375rem }` — so it resolved to **43.5px**, half a pixel
72
+ under the 44 that WCAG 2.5.5 and both platform HIGs require, and less than that
73
+ under any host with a smaller root. If you noticed and declared your own 44px
74
+ floor, you can now drop it:
75
+
76
+ ```diff
77
+ -:root { --touch-target: 44px; }
78
+ -
79
+ -@media (pointer: coarse) {
80
+ - .my-control { min-block-size: var(--touch-target); }
81
+ -}
82
+ ```
83
+
84
+ Bronto's controls float to `var(--tap-target)` — `max(44px, 2.9rem)` — on their
85
+ own. For your *own* controls, consume the token rather than a literal:
86
+
87
+ ```css
88
+ @media (pointer: coarse) {
89
+ .my-control {
90
+ min-block-size: var(--tap-target); /* 44px floor, WCAG 2.5.5 */
91
+ }
92
+ }
93
+ ```
94
+
95
+ `--tap-target-min` is the WCAG 2.5.8 AA 24px floor, for controls that only have
96
+ to clear the smaller bar. Both clamp in px on purpose: **keep the clamp if you
97
+ override them.** A bare rem is how a 44px floor quietly becomes 43.5px.
98
+
99
+ ## 3. Delete your safe-area declarations
100
+
101
+ 0.7 had no `env()` awareness at all. If you declared your own insets, drop them —
102
+ the same four names now ship:
103
+
104
+ ```diff
105
+ -:root {
106
+ - --safe-area-top: env(safe-area-inset-top, 0px);
107
+ - --safe-area-bottom: env(safe-area-inset-bottom, 0px);
108
+ -}
109
+ ```
110
+
111
+ Eight viewport-anchored surfaces now read them: the app rail and topbar, a
112
+ sticky site header, the skip link, both toast stacks, the drawer modal, and the
113
+ lightbox. Every rule uses `max(<authored>, var(--safe-area-*))`, so **desktop
114
+ rendering is unchanged**.
115
+
116
+ They are indirected through custom properties rather than calling `env()` at the
117
+ point of use, which matters twice: a desktop test runner cannot emulate `env()`
118
+ but can override a property, and a host running inside its own chrome (an
119
+ embedded webview, a kiosk frame) can declare the real insets. Follow the same
120
+ convention for your own floating chrome:
121
+
122
+ ```css
123
+ .my-floating-bar {
124
+ inset-block-end: max(1rem, var(--safe-area-bottom));
125
+ }
126
+ ```
127
+
128
+ ## 4. Two new opt-in ergonomics
129
+
130
+ Neither is required; both replace a common workaround.
131
+
132
+ **`ui-button__label`** — an icon button can keep its words for the accessible
133
+ name and for text-based test selectors while giving back the pixels. One markup
134
+ shape serves both forms, and no `aria-label` can drift out of sync with the
135
+ visible wording:
136
+
137
+ ```html
138
+ <button class="ui-button ui-button--icon">
139
+ <span class="ui-icon" style="--icon-mask: …"></span>
140
+ <span class="ui-button__label">Delete</span>
141
+ </button>
142
+ ```
143
+
144
+ Drop `--icon` and the same markup renders glyph + word. The slot ellipsises
145
+ rather than wrapping, so a labelled button in a tight bar shrinks instead of
146
+ pushing its neighbours out.
147
+
148
+ **`ui-button--dense`** — for bars whose *height* is the constraint: a pane title
149
+ bar, a packed toolbar, a table row's actions. It lowers only the visual floor,
150
+ to `--tap-target-min`. The coarse-pointer block still floats it to the full
151
+ `--tap-target`, so a control you shrink for a mouse is never shrunk for a
152
+ finger. `ui.button({ size: 'dense' })` in the recipe API.
153
+
154
+ ## 5. Retire your own severity vocabulary
155
+
156
+ Nothing forces this, but it is the reason most likely to have produced
157
+ divergent code. Bronto shipped the tones without the **scale**, so consumers
158
+ invented tier names — and inside one app they drift, because each surface was
159
+ written on a different day. If you have more than one, `css/state.css` now
160
+ publishes the canonical ladder:
161
+
162
+ ```
163
+ critical › error › warning › notice › ok (+ unknown, outside the order)
164
+ ```
165
+
166
+ ```js
167
+ import { severity, SEVERITY_LEVELS } from '@ponchia/ui/classes';
168
+
169
+ severity('critical'); // { class: 'ui-severity', 'data-level': 'critical' }
170
+ severity('warning', { part: 'row' }); // { class: 'ui-severity-row', … }
171
+ SEVERITY_LEVELS; // sort and filter from this, not a local copy
172
+ ```
173
+
174
+ The level travels on `data-level` — one attribute name — so a chip, a row, a
175
+ dot, and your own element all read the same selector, and your own element can
176
+ take `var(--severity-tone)` without copying a colour table.
177
+
178
+ Map your existing tiers onto it rather than keeping both. `unknown` is the
179
+ landing spot for anything unmeasured or stale; do **not** map it to `ok`, which
180
+ is an assertion of health and is how a dead collector reads as a healthy system.
181
+
182
+ ## 6. Other surfaces you may be hand-rolling
183
+
184
+ Each of these replaced something a real consumer had built locally. None is
185
+ required.
186
+
187
+ - **`.ui-pane`** — a grab header, an in-place rename input, and an actions slot
188
+ that scrolls rather than pushing its last control past the clipped edge. If
189
+ you have a node/window/panel with a draggable title bar, this is it.
190
+ `.ui-panel` is still just a padded card.
191
+ - **`.ui-toolstrip--pane`** — a control bar belonging to one pane rather than to
192
+ the app: no frame of its own, and it refuses to wrap so a second row cannot
193
+ resize live content underneath. Mark the shrinking element with
194
+ `.ui-toolstrip__fill`.
195
+ - **`.ui-selectionbar--anchored`** (and the same on `.ui-toolstrip`) — viewport
196
+ anchoring for a floating bar, safe-area aware. Use
197
+ `--anchor-block-start` for the bar that must *not* sit under the thumb.
198
+ - **`.ui-empty-state__glyph/__lead/__hint`** and **`--invite`** — the three
199
+ parts every empty surface re-invents, plus the distinction between reporting
200
+ absence and offering the next action.
201
+
202
+ ## 7. If you read `tokens.dtcg.json`
203
+
204
+ Six new scale tokens are **deliberately absent** from it, listed in the root
205
+ extension's `omittedCssVariables`: the two tap-target floors are `max()`
206
+ comparisons and the four safe-area insets are `env()` reads, and neither has a
207
+ conforming DTCG shape. Emitting one arm of a clamp, or the 0px fallback of an
208
+ `env()`, would publish a value that is wrong everywhere it matters. Read
209
+ `tokens.json` for the authored CSS. This is the same treatment `--shadow` and
210
+ the em trackings already get.
211
+
212
+ ## Nothing else changed
213
+
214
+ No class was renamed or removed. No export moved. `bronto-ui-check` will not
215
+ report anything new for a 0.7-clean consumer — which is worth stating plainly,
216
+ because the one breaking change in this release is invisible to it.
@@ -299,6 +299,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
299
299
  | `docs/migrations/0.4-to-0.5.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
300
300
  | `docs/migrations/0.5-to-0.6.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
301
301
  | `docs/migrations/0.6-to-0.7.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
302
+ | `docs/migrations/0.7-to-0.8.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
302
303
  | `docs/adr/0001-color-system.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
303
304
  | `docs/adr/0002-scope-and-2026-baseline.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
304
305
  | `docs/adr/0003-theme-model.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
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.8.0/dist/bronto.css" />
58
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/report-kit.css" />
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/bronto.css" />
58
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/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.8.0/dist/bronto.css" />
65
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/report.css" />
66
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/dataviz.css" />
67
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/annotations.css" />
68
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/legend.css" />
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/bronto.css" />
65
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/css/report.css" />
66
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/css/dataviz.css" />
67
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/css/annotations.css" />
68
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/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.8.0/schemas/report-claims.v1.schema.json",
882
+ "$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/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/llms.txt CHANGED
@@ -45,7 +45,7 @@ the path changes from source `css/` to built `dist/css/`:
45
45
  <!-- installed locally -->
46
46
  <link rel="stylesheet" href="./node_modules/@ponchia/ui/dist/css/<leaf>.css" />
47
47
  <!-- or from a CDN; pin the version (pre-1.0, breaking changes ship in the minor) -->
48
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.0/dist/css/<leaf>.css" />
48
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.8.1/dist/css/<leaf>.css" />
49
49
  ```
50
50
 
51
51
  The flattened default bundle is `dist/bronto.css` (bundler shorthand
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ponchia/ui",
3
- "version": "0.8.0",
3
+ "version": "0.8.1",
4
4
  "type": "module",
5
5
  "description": "CSS-first identity and UI layer for services, tools, sites, and reports — works in HTML, every framework, and PDF, no component runtime. Shared app shell, forms, tables, workflow chrome, plus opt-in analytical/report primitives. Monochrome with one rationed accent. Zero runtime dependencies.",
6
6
  "keywords": [
@@ -113,6 +113,7 @@
113
113
  "docs/migrations/0.4-to-0.5.md",
114
114
  "docs/migrations/0.5-to-0.6.md",
115
115
  "docs/migrations/0.6-to-0.7.md",
116
+ "docs/migrations/0.7-to-0.8.md",
116
117
  "docs/adr/0001-color-system.md",
117
118
  "docs/adr/0002-scope-and-2026-baseline.md",
118
119
  "docs/adr/0003-theme-model.md",
@@ -213,24 +214,24 @@
213
214
  "prepublishOnly": "npm run build:artifacts && npm run check"
214
215
  },
215
216
  "devDependencies": {
216
- "@arethetypeswrong/cli": "^0.18.4",
217
+ "@arethetypeswrong/cli": "^0.18.5",
217
218
  "@axe-core/playwright": "^4.11.3",
218
219
  "@builder.io/qwik": "^1.20.0",
219
220
  "@playwright/test": "1.60.0",
220
221
  "github-actionlint": "^1.7.12",
221
- "jsdom": "^29.1.1",
222
- "knip": "^6.23.0",
223
- "pdfjs-dist": "^6.1.200",
224
- "prettier": "^3.9.1",
225
- "publint": "^0.3.21",
226
- "react": "^19.2.7",
227
- "react-dom": "^19.2.7",
228
- "solid-js": "^1.9.13",
229
- "stylelint": "^17.14.0",
222
+ "jsdom": "^30.0.1",
223
+ "knip": "^6.32.1",
224
+ "pdfjs-dist": "^6.2.108",
225
+ "prettier": "^3.9.6",
226
+ "publint": "^0.3.23",
227
+ "react": "^19.2.8",
228
+ "react-dom": "^19.2.8",
229
+ "solid-js": "^1.9.14",
230
+ "stylelint": "^17.14.1",
230
231
  "stylelint-config-standard": "^40.0.0",
231
232
  "stylelint-use-logical": "^2.1.3",
232
233
  "typescript": "^6.0.3",
233
- "vega": "^6.2.0",
234
+ "vega": "^6.3.1",
234
235
  "vega-lite": "^6.4.3"
235
236
  },
236
237
  "peerDependencies": {