@ponchia/ui 0.14.0 → 0.16.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.
Files changed (49) hide show
  1. package/CHANGELOG.md +46 -0
  2. package/README.md +1 -1
  3. package/classes/classes.json +5 -1
  4. package/classes/index.d.ts +6 -0
  5. package/classes/index.js +10 -1
  6. package/classes/vscode.css-custom-data.json +4 -0
  7. package/css/annotations.css +4 -2
  8. package/css/blocknote.css +14 -0
  9. package/css/connectors.css +4 -2
  10. package/css/marks.css +3 -2
  11. package/css/primitives.css +13 -0
  12. package/css/tokens.css +1 -0
  13. package/dist/bronto.css +1 -1
  14. package/dist/css/analytical.css +1 -1
  15. package/dist/css/annotations.css +1 -1
  16. package/dist/css/blocknote.css +1 -1
  17. package/dist/css/connectors.css +1 -1
  18. package/dist/css/marks.css +1 -1
  19. package/dist/css/primitives.css +1 -1
  20. package/dist/css/report-kit.css +1 -1
  21. package/dist/css/tokens.css +1 -1
  22. package/dist/css/tool.css +1 -1
  23. package/docs/compositions.md +2 -2
  24. package/docs/connectors.md +4 -2
  25. package/docs/contrast.md +16 -0
  26. package/docs/d2.md +10 -10
  27. package/docs/interop/blocknote.md +5 -0
  28. package/docs/marks.md +2 -1
  29. package/docs/mermaid.md +2 -0
  30. package/docs/reference.md +4 -1
  31. package/docs/renderer.md +1 -0
  32. package/docs/reporting.md +8 -8
  33. package/docs/stability.md +1 -1
  34. package/docs/theming.md +10 -1
  35. package/llms.txt +1 -1
  36. package/package.json +2 -2
  37. package/renderer/index.d.ts +5 -0
  38. package/renderer/index.d.ts.map +1 -1
  39. package/renderer/index.js +6 -1
  40. package/tokens/d2.js +2 -2
  41. package/tokens/d2.json +2 -2
  42. package/tokens/figma.variables.json +26 -0
  43. package/tokens/index.d.ts +2 -2
  44. package/tokens/index.js +6 -0
  45. package/tokens/index.json +4 -2
  46. package/tokens/mermaid.js +2 -2
  47. package/tokens/mermaid.json +2 -2
  48. package/tokens/resolved.json +2 -0
  49. package/tokens/tokens.dtcg.json +42 -0
package/CHANGELOG.md CHANGED
@@ -5,6 +5,52 @@
5
5
  |> `^0` / `*` wildcard does **not** protect you. See README → Versioning, and
6
6
  |> the deprecation policy in CONTRIBUTING.md.
7
7
 
8
+ ## 0.16.0 — 2026-10-02
9
+
10
+ ### Added
11
+
12
+ - **`--edge`, the token for lines that carry meaning.** A relationship between
13
+ nodes, a connector or annotation leader, or a bracket mark is a graphical
14
+ object WCAG 1.4.11 holds to 3:1 against its surface. The hairlines
15
+ (`--line`, `--line-strong`) are decorative and exempt, and `--line-strong`
16
+ measures 2.39:1 on a light card and 2.29:1 on a dark one. `--edge` is the
17
+ dim-text ink (`var(--text-dim)`): 5.60:1 light and 6.52:1 dark on a card,
18
+ and it follows the high-contrast step. The contrast gate now enforces it on
19
+ the page and on a card in every theme and colorway.
20
+ - **`edge` in `readTokens()`**, for renderers that draw relationships on a
21
+ canvas (graph and network views).
22
+
23
+ ### Changed
24
+
25
+ - Connectors, annotation leaders (default and `--accent`) and the bracket note
26
+ draw in `--edge` instead of `--line-strong`. The `--muted` connector and
27
+ annotation keep the decorative `--line`.
28
+ - The bracket note's label was text in `--line-strong` (2.39:1). It is now
29
+ `--edge`, which clears the 4.5:1 text floor.
30
+ - Mermaid `lineColor` and D2's `B1` slot (connections, and the shape borders D2
31
+ draws from the same slot) resolve to `--edge`: `#686863` light, `#a0a0a0`
32
+ dark.
33
+
34
+ ## 0.15.0 — 2026-10-02
35
+
36
+ ### Added
37
+
38
+ - **`ui-eyebrow--caps` and `ui-eyebrow--mono`**, the label voice of a tool
39
+ surface, taken from Spatial. `--caps` sets capitals on the wide tracking step,
40
+ for a label that names a region (a panel, a section, a gate); `--mono` sets the
41
+ mono face, for a label over data, code or a readout. Both compose with
42
+ `--muted` and `--sm`, and `ui.eyebrow({ caps, mono })` emits them. A tool that
43
+ restated this voice by hand can use the base eyebrow and keep only its spacing.
44
+
45
+ ### Changed
46
+
47
+ - **`css/blocknote.css` draws the nested-block guide in `--line`.** BlockNote
48
+ draws the rule beside a nested block in its side-menu colour, which the leaf
49
+ maps to `--text-dim` for the drag handle. In 0.13 that made the guide as dark as
50
+ a control: light mode went from BlockNote's `#cfcfcf` to `#686863`. The guide
51
+ now takes the border token and the handle keeps `--text-dim`. The rule mirrors
52
+ BlockNote 0.54's selector under `.bn-root`, and a test pins that shape.
53
+
8
54
  ## 0.14.0 — 2026-10-01
9
55
 
10
56
  ### Added
package/README.md CHANGED
@@ -93,7 +93,7 @@ Or drop it in with no build step, straight from a CDN (replace the version only
93
93
  when deliberately upgrading across a breaking pre-1.0 minor):
94
94
 
95
95
  ```html
96
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.14.0/dist/bronto.css">
96
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.16.0/dist/bronto.css">
97
97
  ```
98
98
 
99
99
  ## Quick start
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "$comment": "@ponchia/ui class vocabulary as language-neutral data — validate emitted markup without executing the ESM cls map or parsing the .d.ts. Generated from classes/index.js — do not edit by hand; run `npm run classes:json:build`. Drift-checked in CI. `groups[].base` is null for a parts-only namespace (no standalone base class — do NOT emit it). A modifier whose name contains `__` (e.g. `ui-spark__bar--pos`) attaches to THAT part, not the base host. `states` is the author-applied `is-*` hooks (runtime/behavior-managed hooks are excluded); `behaviorAttributes` are the `data-bronto-*` wiring hooks the optional behaviors delegate on; `requiredAria` is the role/aria a generator must emit per component. `states` + `customProperties` are documented in docs/reference.md and ship outside `cls` by design.",
3
3
  "counts": {
4
- "classes": 700,
4
+ "classes": 702,
5
5
  "groups": 188
6
6
  },
7
7
  "groups": {
@@ -620,6 +620,8 @@
620
620
  "ui-eyebrow": {
621
621
  "base": "ui-eyebrow",
622
622
  "modifiers": [
623
+ "ui-eyebrow--caps",
624
+ "ui-eyebrow--mono",
623
625
  "ui-eyebrow--muted",
624
626
  "ui-eyebrow--sm"
625
627
  ],
@@ -1891,6 +1893,8 @@
1891
1893
  "ui-evidence-item__window",
1892
1894
  "ui-evidence-ledger",
1893
1895
  "ui-eyebrow",
1896
+ "ui-eyebrow--caps",
1897
+ "ui-eyebrow--mono",
1894
1898
  "ui-eyebrow--muted",
1895
1899
  "ui-eyebrow--sm",
1896
1900
  "ui-field",
@@ -243,6 +243,8 @@ export declare const cls: {
243
243
  readonly eyebrow: 'ui-eyebrow';
244
244
  readonly eyebrowMuted: 'ui-eyebrow--muted';
245
245
  readonly eyebrowSm: 'ui-eyebrow--sm';
246
+ readonly eyebrowCaps: 'ui-eyebrow--caps';
247
+ readonly eyebrowMono: 'ui-eyebrow--mono';
246
248
  readonly prose: 'ui-prose';
247
249
  readonly proseCompact: 'ui-prose--compact';
248
250
  readonly proseBlocks: 'ui-prose--blocks';
@@ -791,6 +793,10 @@ export interface TableOpts {
791
793
  export interface EyebrowOpts {
792
794
  muted?: boolean;
793
795
  sm?: boolean;
796
+ /** Capitals on the wide tracking step: a label that names a region. */
797
+ caps?: boolean;
798
+ /** The mono face: a label over data, code or a readout. */
799
+ mono?: boolean;
794
800
  }
795
801
  export interface HintOpts {
796
802
  error?: boolean;
package/classes/index.js CHANGED
@@ -257,6 +257,8 @@ export const cls = Object.freeze({
257
257
  eyebrow: 'ui-eyebrow',
258
258
  eyebrowMuted: 'ui-eyebrow--muted',
259
259
  eyebrowSm: 'ui-eyebrow--sm',
260
+ eyebrowCaps: 'ui-eyebrow--caps',
261
+ eyebrowMono: 'ui-eyebrow--mono',
260
262
  prose: 'ui-prose',
261
263
  proseCompact: 'ui-prose--compact',
262
264
  proseBlocks: 'ui-prose--blocks',
@@ -1031,7 +1033,14 @@ export const ui = {
1031
1033
  lined && cls.tableLined,
1032
1034
  breakAnywhere && cls.tableBreakAnywhere,
1033
1035
  ),
1034
- eyebrow: ({ muted, sm } = {}) => j(cls.eyebrow, muted && cls.eyebrowMuted, sm && cls.eyebrowSm),
1036
+ eyebrow: ({ muted, sm, caps, mono } = {}) =>
1037
+ j(
1038
+ cls.eyebrow,
1039
+ muted && cls.eyebrowMuted,
1040
+ sm && cls.eyebrowSm,
1041
+ caps && cls.eyebrowCaps,
1042
+ mono && cls.eyebrowMono,
1043
+ ),
1035
1044
  hint: ({ error } = {}) => j(cls.hint, error && cls.hintError),
1036
1045
  cluster: ({ between } = {}) => j(cls.cluster, between && cls.clusterBetween),
1037
1046
  stagger: ({ auto } = {}) => j(cls.stagger, auto && cls.staggerAuto),
@@ -185,6 +185,10 @@
185
185
  "name": "--ease-standard",
186
186
  "description": "Global scale token. Value: `cubic-bezier(0.2, 0.8, 0.2, 1)`"
187
187
  },
188
+ {
189
+ "name": "--edge",
190
+ "description": "Global scale token. Value: `var(--text-dim)`"
191
+ },
188
192
  {
189
193
  "name": "--field-dot",
190
194
  "description": "Theme token. Light: `rgb(10, 10, 10, 0.16)` · Dark: `rgb(242, 242, 242, 0.14)`"
@@ -6,9 +6,11 @@
6
6
  reports, or generated figures that need explicit callouts.
7
7
  ========================================================================== */
8
8
 
9
+ /* The connector carries meaning, so `--annotation-line` is `--edge`, which
10
+ holds 3:1 against the surface (WCAG 1.4.11); `--muted` keeps the hairline. */
9
11
  .ui-annotation {
10
12
  --annotation-color: var(--accent);
11
- --annotation-line: var(--line-strong);
13
+ --annotation-line: var(--edge);
12
14
  --annotation-note-bg: var(--panel);
13
15
  --annotation-subject-fill: color-mix(in srgb, var(--annotation-color) 8%, transparent);
14
16
  --annotation-stroke-width: 1.5;
@@ -26,7 +28,7 @@
26
28
 
27
29
  .ui-annotation--accent {
28
30
  --annotation-color: var(--accent);
29
- --annotation-line: var(--line-strong);
31
+ --annotation-line: var(--edge);
30
32
  }
31
33
 
32
34
  .ui-annotation--success {
package/css/blocknote.css CHANGED
@@ -59,3 +59,17 @@
59
59
  --bn-colors-highlights-pink-text: var(--cat-5-ink, var(--danger));
60
60
  --bn-colors-highlights-pink-background: var(--cat-5-tint, var(--panel-soft));
61
61
  }
62
+
63
+ /* The rule beside a nested block. BlockNote draws it in --bn-colors-side-menu,
64
+ the drag handle's ink, which is --text-dim here: a structural hairline as
65
+ dark as a control. The guide takes the border token instead and the handle
66
+ keeps its colour. The selector is BlockNote 0.54's own (packages/react
67
+ editor/styles.css) under .bn-root, so it outranks it in either order. */
68
+ .bn-root
69
+ .bn-block-group
70
+ .bn-block:not(:has(.bn-toggle-wrapper))
71
+ .bn-block-group
72
+ .bn-block-outer:not([data-prev-depth-changed])::before {
73
+ /* stylelint-disable-next-line csstools/use-logical -- BlockNote draws a physical border-left; a logical override would miss it in RTL. */
74
+ border-left-color: var(--line);
75
+ }
@@ -7,11 +7,13 @@
7
7
  `initConnectors`) draws/tracks the line; the geometry helpers in
8
8
  `@ponchia/ui/connectors` compute the path. Not imported by core.css.
9
9
 
10
- Monochrome by default; the rationed accent and status tones are opt-in.
10
+ Monochrome by default, in `--edge`: a leader line carries meaning, so it
11
+ holds 3:1 against the surface (WCAG 1.4.11). `--muted` drops to the
12
+ decorative hairline; the rationed accent and status tones are opt-in.
11
13
  ========================================================================== */
12
14
 
13
15
  .ui-connector {
14
- --connector-color: var(--line-strong);
16
+ --connector-color: var(--edge);
15
17
 
16
18
  color: var(--connector-color);
17
19
  inset: 0;
package/css/marks.css CHANGED
@@ -109,9 +109,10 @@
109
109
  }
110
110
 
111
111
  /* A passage bracket: a tick down the inline-start with an optional label.
112
- The prose analogue of `ui-annotation--bracket`. */
112
+ The prose analogue of `ui-annotation--bracket`. The tick marks a passage and
113
+ its label is text, so both take `--edge` (the dim-text ink), not a hairline. */
113
114
  .ui-bracket-note {
114
- --mark-color: var(--line-strong);
115
+ --mark-color: var(--edge);
115
116
 
116
117
  border-inline-start: 2px solid var(--mark-color);
117
118
  display: block;
@@ -355,6 +355,19 @@
355
355
  font-size: var(--text-2xs);
356
356
  }
357
357
 
358
+ /* The label voice of a tool surface: capitals on the wide tracking step, for a
359
+ section or panel label that names a region rather than introducing prose.
360
+ Composes with --muted, --sm and --mono. */
361
+ .ui-eyebrow--caps {
362
+ letter-spacing: var(--tracking-wide);
363
+ text-transform: uppercase;
364
+ }
365
+
366
+ /* The same label in the mono face, for a label over data, code or a readout. */
367
+ .ui-eyebrow--mono {
368
+ font-family: var(--mono);
369
+ }
370
+
358
371
  /* --- Buttons --- */
359
372
 
360
373
  .ui-button {
package/css/tokens.css CHANGED
@@ -126,6 +126,7 @@
126
126
  --surface-muted: var(--panel-soft);
127
127
  --border: var(--line);
128
128
  --border-strong: var(--line-strong);
129
+ --edge: var(--text-dim);
129
130
  }
130
131
 
131
132
  /* --------------------------------------------------------------------------