@ponchia/ui 0.6.8 → 0.6.10

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 (60) hide show
  1. package/CHANGELOG.md +79 -4
  2. package/README.md +2 -2
  3. package/annotations/index.d.ts.map +1 -1
  4. package/annotations/index.js +5 -6
  5. package/behaviors/carousel.d.ts.map +1 -1
  6. package/behaviors/carousel.js +100 -60
  7. package/behaviors/combobox.d.ts.map +1 -1
  8. package/behaviors/combobox.js +167 -113
  9. package/behaviors/connectors.d.ts.map +1 -1
  10. package/behaviors/connectors.js +39 -23
  11. package/behaviors/forms.d.ts.map +1 -1
  12. package/behaviors/forms.js +211 -207
  13. package/behaviors/glyph.d.ts.map +1 -1
  14. package/behaviors/glyph.js +157 -132
  15. package/behaviors/inert.d.ts +1 -1
  16. package/behaviors/inert.d.ts.map +1 -1
  17. package/behaviors/inert.js +1 -1
  18. package/behaviors/internal.js +2 -2
  19. package/behaviors/modal.js +1 -1
  20. package/behaviors/popover.js +5 -5
  21. package/behaviors/table.d.ts +1 -1
  22. package/behaviors/table.d.ts.map +1 -1
  23. package/behaviors/table.js +7 -8
  24. package/behaviors/tabs.js +2 -2
  25. package/behaviors/toast.js +5 -5
  26. package/classes/classes.json +33 -2
  27. package/classes/index.d.ts +10 -0
  28. package/classes/index.js +59 -35
  29. package/connectors/index.d.ts +2 -2
  30. package/connectors/index.d.ts.map +1 -1
  31. package/connectors/index.js +7 -10
  32. package/css/app.css +3 -4
  33. package/css/base.css +1 -1
  34. package/css/content.css +3 -3
  35. package/css/disclosure.css +3 -3
  36. package/css/dots.css +4 -4
  37. package/css/feedback.css +6 -7
  38. package/css/forms.css +9 -12
  39. package/css/legend.css +1 -1
  40. package/css/marks.css +1 -1
  41. package/css/motion.css +6 -6
  42. package/css/overlay.css +5 -7
  43. package/css/primitives.css +14 -16
  44. package/css/sidenote.css +2 -2
  45. package/css/table.css +2 -2
  46. package/css/workbench.css +128 -0
  47. package/dist/css/workbench.css +1 -1
  48. package/docs/annotations.md +36 -0
  49. package/docs/architecture.md +28 -0
  50. package/docs/interop/react-flow.md +89 -0
  51. package/docs/package-contract.md +2 -0
  52. package/docs/reference.md +21 -1
  53. package/docs/reporting.md +8 -8
  54. package/docs/stability.md +67 -7
  55. package/docs/workbench.md +56 -9
  56. package/glyphs/glyphs.js +43 -33
  57. package/llms.txt +10 -4
  58. package/package.json +5 -2
  59. package/schemas/report-claims.v1.schema.json +1 -1
  60. package/tokens/index.js +2 -2
@@ -74,7 +74,7 @@
74
74
  /* Intrinsic aspect-ratio box; the media child fills it. The contract is ONE
75
75
  child (a single <img>/<video>/<iframe>). Scope the fill to :first-child rather
76
76
  than every child: a second child would otherwise be forced to 100%/100% +
77
- object-fit and stack on top, silently breaking the ratio. (audit C34.) */
77
+ object-fit and stack on top, silently breaking the ratio. */
78
78
  .ui-ratio {
79
79
  aspect-ratio: var(--ratio, 16 / 9);
80
80
  }
@@ -100,7 +100,7 @@
100
100
  /* Logical `max-inline-size`, not physical `max-width`: the container is typed
101
101
  `inline-size`, so the inline axis is the one actually tracked — the logical
102
102
  query matches it in any writing mode (a physical `width` query silently
103
- misses in a vertical WM). (component audit C34.) */
103
+ misses in a vertical writing mode). */
104
104
  @container bronto (max-inline-size: 34rem) {
105
105
  .ui-grid {
106
106
  --grid-min: 100%;
@@ -193,7 +193,7 @@
193
193
  /* These tiles hold IDs / hashes / big numbers — the unbreakable-token case is
194
194
  the common one. A grid item defaults to min-inline-size:auto, so a long
195
195
  value pushes the whole statgrid track wider; allow the tile to shrink so the
196
- value can wrap instead (paired with overflow-wrap on __value). (audit C5.) */
196
+ value can wrap instead (paired with overflow-wrap on __value). */
197
197
  min-inline-size: 0;
198
198
  padding: var(--space-md);
199
199
  }
@@ -216,7 +216,7 @@
216
216
  font-weight: var(--display-weight-strong);
217
217
  letter-spacing: 0.02em;
218
218
  line-height: 1.05;
219
- overflow-wrap: anywhere; /* break an unspaced ID/hash rather than overflow (audit C5) */
219
+ overflow-wrap: anywhere; /* break an unspaced ID/hash rather than overflow */
220
220
  }
221
221
 
222
222
  .ui-stat__delta,
@@ -237,7 +237,7 @@
237
237
 
238
238
  /* A direction arrow is the non-colour channel — colour alone (success/danger)
239
239
  fails WCAG 1.4.1, so the tile carries the same ▲/▼ glyph as `.ui-delta`
240
- (C13). Marked aria-hidden-equivalent by being generated content; the sign is
240
+ as a second signal. Marked aria-hidden-equivalent by being generated content; the sign is
241
241
  still in the author's text ("+12%"). */
242
242
  .ui-stat__delta.is-pos::before,
243
243
  .ui-app-metric__delta.is-pos::before {
@@ -259,7 +259,7 @@
259
259
  .ui-num {
260
260
  /* inline-block so `text-align: end` actually applies: on a bare inline element
261
261
  it computes but never paints (the box is shrink-wrapped), so an author who
262
- followed the docs to right-align an inline figure saw no effect. (audit C17.) */
262
+ followed the docs to right-align an inline figure saw no effect. */
263
263
  display: inline-block;
264
264
  font-variant-numeric: tabular-nums;
265
265
  text-align: end;
@@ -436,8 +436,8 @@
436
436
  this looks-dead state is NOT keyboard-inert: for that, prefer native
437
437
  `<button disabled>`, run `initDisabledGuard()` (it intercepts Enter/Space on
438
438
  aria-disabled controls), or add `tabindex="-1"` (and drop `href` on a link).
439
- See docs/usage.md "Disabled vs aria-disabled". (a11y review C3 / audit C4;
440
- native :disabled already inert.) */
439
+ See docs/usage.md "Disabled vs aria-disabled"; native :disabled is already
440
+ inert. */
441
441
  .ui-button[aria-disabled='true'],
442
442
  .ui-link[aria-disabled='true'] {
443
443
  pointer-events: none;
@@ -445,7 +445,7 @@
445
445
 
446
446
  /* The button family dims + shows not-allowed via its `:disabled` rule above, but
447
447
  a disabled LINK got only pointer-events:none — it looked fully live. Give it
448
- the same visual disabled cue. (component audit C30.) */
448
+ the same visual disabled cue. */
449
449
  .ui-link[aria-disabled='true'] {
450
450
  cursor: not-allowed;
451
451
  opacity: 0.45;
@@ -480,7 +480,7 @@
480
480
  !important `animation-duration`, so the old non-important `1.4s` slow-spin
481
481
  here was dead code AND left a broken, transparent-topped ring looking like a
482
482
  rendering bug. Drop the dead rule; show a STATIC complete ring instead — a
483
- still busy cue with no implied motion. (component audit C15.) */
483
+ still busy cue with no implied motion. */
484
484
  .ui-button[aria-busy='true']::before {
485
485
  border-block-start-color: currentcolor;
486
486
  }
@@ -530,8 +530,7 @@
530
530
 
531
531
  /* RTL: the logical borders flip sides, but a fixed `rotate(45deg)` then points
532
532
  the chevron UP rather than toward the inline-end (the reading-forward way).
533
- Mirror the rotation so the resting affordance points forward in RTL too.
534
- (component audit C14.) */
533
+ Mirror the rotation so the resting affordance points forward in RTL too. */
535
534
  [dir='rtl'] .ui-link--arrow::after,
536
535
  [dir='rtl'] .ui-link--cta::after {
537
536
  transform: rotate(-45deg);
@@ -540,8 +539,7 @@
540
539
  /* Standalone CTA links are tap targets, not inline prose links: on a coarse
541
540
  pointer float them to the WCAG 2.5.8 AA 24px floor (the 2.5.8 inline-link
542
541
  exception doesn't cover a block-level call-to-action, which is what these
543
- are). Buttons already auto-grow to ~44px on coarse pointers. (component
544
- audit C14.) */
542
+ are). Buttons already auto-grow to ~44px on coarse pointers. */
545
543
  @media (pointer: coarse) {
546
544
  .ui-link--arrow,
547
545
  .ui-link--cta {
@@ -600,7 +598,7 @@
600
598
 
601
599
  /* Accent mixes 45% (vs 40% for the status tones below) on purpose: the brand
602
600
  hue is lower-chroma here than the status hues, so it needs a touch more to
603
- read at the same border weight. Intentional, not a copy-paste slip. (Q15.) */
601
+ read at the same border weight. Intentional, not a copy-paste slip. */
604
602
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
605
603
  }
606
604
 
@@ -694,7 +692,7 @@
694
692
  font-family: var(--mono);
695
693
  margin: 0;
696
694
  min-inline-size: 0;
697
- overflow-wrap: anywhere; /* IDs/hashes/paths are the common value — break, don't overflow (audit C5) */
695
+ overflow-wrap: anywhere; /* IDs/hashes/paths are the common value — break, don't overflow */
698
696
  }
699
697
 
700
698
  /* --- Hover (pointer only) --- */
package/css/sidenote.css CHANGED
@@ -41,7 +41,7 @@
41
41
  /* The inline superscript that anchors a numbered sidenote. Use --accent-text,
42
42
  not raw --accent: this is readable text and must clear WCAG AA 4.5:1 even
43
43
  after a one-knob re-brand to a paler --accent (raw --accent drops to ~1.5:1).
44
- Same accent-as-text contract as .ui-eyebrow / .ui-link--cta. (audit C6.) */
44
+ Same accent-as-text contract as .ui-eyebrow / .ui-link--cta. */
45
45
  .ui-sidenote__ref {
46
46
  color: var(--accent-text);
47
47
  counter-increment: ui-sidenote;
@@ -54,7 +54,7 @@
54
54
  }
55
55
 
56
56
  /* The note repeats its number (display only — the ref already incremented).
57
- --accent-text for the same WCAG-AA reason as the ref above. (audit C6.) */
57
+ --accent-text for the same WCAG-AA reason as the ref above. */
58
58
  .ui-sidenote::before {
59
59
  color: var(--accent-text);
60
60
  content: counter(ui-sidenote) '. ';
package/css/table.css CHANGED
@@ -39,7 +39,7 @@
39
39
 
40
40
  /* Keep the sticky header above body cells — cheap insurance for the
41
41
  sticky-header + pinned/positioned-column combo, where an un-z-indexed th
42
- scrolls under a positioned cell. (audit C30.) */
42
+ scrolls under a positioned cell. */
43
43
  z-index: 1;
44
44
  }
45
45
 
@@ -171,7 +171,7 @@
171
171
 
172
172
  /* --- Loading state: set aria-busy + .ui-table-wrap--loading on the wrap. The
173
173
  modifier is named for the element it goes ON (the wrap), not `.ui-table`, so
174
- the BEM host matches the documented placement. (component audit C19.) --- */
174
+ the BEM host matches the documented placement. --- */
175
175
  .ui-table-wrap--loading {
176
176
  opacity: 0.6;
177
177
  pointer-events: none;
package/css/workbench.css CHANGED
@@ -32,6 +32,119 @@
32
32
  gap: var(--space-2xs);
33
33
  }
34
34
 
35
+ /* --- Toolstrip — compact workbench controls, optionally floating over a
36
+ viewport. The host owns commands, search behavior, active mode, and
37
+ responsive hiding policy. --- */
38
+ .ui-toolstrip {
39
+ align-items: center;
40
+ background: var(--panel-strong);
41
+ border: 1px solid var(--line-strong);
42
+ border-radius: var(--radius-md);
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ gap: var(--space-xs);
46
+ min-inline-size: 0;
47
+ padding: 0.35rem;
48
+ }
49
+
50
+ .ui-toolstrip--floating {
51
+ box-shadow: var(--shadow-raised);
52
+ }
53
+
54
+ .ui-toolstrip--compact {
55
+ gap: var(--space-2xs);
56
+ padding: 0.25rem;
57
+ }
58
+
59
+ .ui-toolstrip__brand {
60
+ align-items: baseline;
61
+ display: inline-flex;
62
+ flex: 0 1 auto;
63
+ gap: var(--space-xs);
64
+ min-inline-size: 0;
65
+ padding-inline: var(--space-xs);
66
+ }
67
+
68
+ .ui-toolstrip__brand strong {
69
+ color: var(--text);
70
+ font-size: var(--text-sm);
71
+ }
72
+
73
+ .ui-toolstrip__context {
74
+ color: var(--text-dim);
75
+ font-size: var(--text-xs);
76
+ min-inline-size: 0;
77
+ overflow: hidden;
78
+ text-overflow: ellipsis;
79
+ white-space: nowrap;
80
+ }
81
+
82
+ .ui-toolstrip__group,
83
+ .ui-toolstrip__actions {
84
+ align-items: center;
85
+ display: inline-flex;
86
+ flex-wrap: wrap;
87
+ gap: var(--space-2xs);
88
+ }
89
+
90
+ .ui-toolstrip__group {
91
+ background: var(--panel-soft);
92
+ border: 1px solid var(--line);
93
+ border-radius: var(--radius-md);
94
+ padding: 0.16rem;
95
+ }
96
+
97
+ .ui-toolstrip__search {
98
+ flex: 1 1 14rem;
99
+ min-inline-size: min(100%, 11rem);
100
+ }
101
+
102
+ .ui-toolstrip__actions {
103
+ margin-inline-start: auto;
104
+ }
105
+
106
+ /* --- Button segmented control — command buttons that expose one active
107
+ mode. For actual form values, keep using `.ui-segmented` with radio inputs. --- */
108
+ .ui-segmented-buttons {
109
+ align-items: center;
110
+ background: var(--panel-soft);
111
+ border: 1px solid var(--line);
112
+ border-radius: var(--radius-md);
113
+ display: inline-flex;
114
+ flex-wrap: wrap;
115
+ gap: 0.16rem;
116
+ padding: 0.16rem;
117
+ }
118
+
119
+ .ui-segmented-buttons__button {
120
+ background: transparent;
121
+ border: 1px solid transparent;
122
+ border-radius: var(--radius-sm);
123
+ color: var(--text-soft);
124
+ cursor: pointer;
125
+ font-family: var(--mono);
126
+ font-size: var(--text-xs);
127
+ font-weight: 700;
128
+ letter-spacing: var(--tracking-wide);
129
+ line-height: 1;
130
+ min-block-size: 1.9rem;
131
+ padding: 0.48rem 0.7rem;
132
+ text-transform: uppercase;
133
+ }
134
+
135
+ .ui-segmented-buttons__button[aria-pressed='true'],
136
+ .ui-segmented-buttons__button.is-active {
137
+ background: var(--accent);
138
+ border-color: var(--accent);
139
+ color: var(--button-text);
140
+ }
141
+
142
+ .ui-segmented-buttons__button:disabled,
143
+ .ui-segmented-buttons__button[aria-disabled='true'] {
144
+ cursor: not-allowed;
145
+ opacity: 0.45;
146
+ }
147
+
35
148
  /* --- Property row — a label/value pair, denser than ui-key-value and tuned
36
149
  for an inspector (the value can hold an input or a static read-out). --- */
37
150
  .ui-property {
@@ -81,6 +194,14 @@
81
194
  gap: var(--space-xs);
82
195
  }
83
196
 
197
+ @media (hover: hover) {
198
+ .ui-segmented-buttons__button:hover:not(:disabled, [aria-disabled='true'], [aria-pressed='true'], .is-active) {
199
+ background: var(--panel);
200
+ border-color: var(--line-strong);
201
+ color: var(--text);
202
+ }
203
+ }
204
+
84
205
  /* --- Splitter — two panes separated by a focusable ARIA separator handle. --- */
85
206
  .ui-splitter {
86
207
  --splitter-pos: 50%;
@@ -166,6 +287,13 @@
166
287
  }
167
288
 
168
289
  @media (forced-colors: active) {
290
+ .ui-segmented-buttons__button[aria-pressed='true'],
291
+ .ui-segmented-buttons__button.is-active {
292
+ background: Highlight;
293
+ border-color: Highlight;
294
+ color: HighlightText;
295
+ }
296
+
169
297
  .ui-splitter__handle {
170
298
  border-color: CanvasText;
171
299
  }
@@ -1 +1 @@
1
- @layer bronto{.ui-inspector{background: var(--panel);border: 1px solid var(--line);border-radius: var(--radius-md);display: grid;gap: var(--space-sm);padding: var(--space-md)}.ui-inspector__head{align-items: baseline;border-block-end: 1px solid var(--line);display: flex;gap: var(--space-sm);justify-content: space-between;padding-block-end: var(--space-xs)}.ui-inspector__body{display: grid;gap: var(--space-2xs)}.ui-property{align-items: baseline;display: grid;gap: var(--space-sm);grid-template-columns: minmax(6rem,38%) 1fr}.ui-property__label{color: var(--text-dim);font-family: var(--mono);font-size: var(--text-2xs);letter-spacing: var(--tracking-wide);text-transform: uppercase}.ui-property__value{color: var(--text);font-size: var(--text-sm);min-inline-size: 0}.ui-selectionbar{align-items: center;background: var(--panel-strong);border: 1px solid var(--line-strong);border-radius: var(--radius-md);box-shadow: var(--shadow-raised);display: flex;flex-wrap: wrap;gap: var(--space-sm) var(--space-md);justify-content: space-between;padding: 0.5rem 0.85rem}.ui-selectionbar__count{color: var(--text);font-family: var(--mono);font-size: var(--text-sm)}.ui-selectionbar__actions{display: flex;flex-wrap: wrap;gap: var(--space-xs)}.ui-splitter{--splitter-pos: 50%;--splitter-handle: 0.75rem;--splitter-pane-min: 0px;background: var(--panel);border: 1px solid var(--line);border-radius: var(--radius-md);display: grid;grid-template-columns: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr);min-block-size: 18rem;overflow: hidden}.ui-splitter--vertical{grid-template-columns: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr)}.ui-splitter--horizontal{grid-template-columns: 1fr;grid-template-rows: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr)}.ui-splitter__pane{min-block-size: 0;min-inline-size: 0;overflow: auto;padding: var(--space-md)}.ui-splitter__handle{align-self: stretch;background: var(--panel-strong);border-block: 0;border-inline: 1px solid var(--line);cursor: col-resize;display: grid;min-inline-size: var(--splitter-handle);place-items: center;touch-action: none}.ui-splitter__handle::before{background: var(--line-strong);border-radius: var(--radius-pill);block-size: 2.5rem;content: "";inline-size: 2px}.ui-splitter__handle:hover::before,.ui-splitter__handle.is-active::before,.ui-splitter__handle[aria-valuenow]:focus-visible::before{background: var(--accent)}.ui-splitter__handle:focus-visible{outline: 2px solid var(--focus-ring);outline-offset: -2px}.ui-splitter--horizontal .ui-splitter__handle{border-block: 1px solid var(--line);border-inline: 0;cursor: row-resize;min-block-size: var(--splitter-handle);min-inline-size: 0}.ui-splitter--horizontal .ui-splitter__handle::before{block-size: 2px;inline-size: 2.5rem}@media (forced-colors: active){.ui-splitter__handle{border-color: CanvasText}.ui-splitter__handle::before{background: CanvasText}}}
1
+ @layer bronto{.ui-inspector{background: var(--panel);border: 1px solid var(--line);border-radius: var(--radius-md);display: grid;gap: var(--space-sm);padding: var(--space-md)}.ui-inspector__head{align-items: baseline;border-block-end: 1px solid var(--line);display: flex;gap: var(--space-sm);justify-content: space-between;padding-block-end: var(--space-xs)}.ui-inspector__body{display: grid;gap: var(--space-2xs)}.ui-toolstrip{align-items: center;background: var(--panel-strong);border: 1px solid var(--line-strong);border-radius: var(--radius-md);display: flex;flex-wrap: wrap;gap: var(--space-xs);min-inline-size: 0;padding: 0.35rem}.ui-toolstrip--floating{box-shadow: var(--shadow-raised)}.ui-toolstrip--compact{gap: var(--space-2xs);padding: 0.25rem}.ui-toolstrip__brand{align-items: baseline;display: inline-flex;flex: 0 1 auto;gap: var(--space-xs);min-inline-size: 0;padding-inline: var(--space-xs)}.ui-toolstrip__brand strong{color: var(--text);font-size: var(--text-sm)}.ui-toolstrip__context{color: var(--text-dim);font-size: var(--text-xs);min-inline-size: 0;overflow: hidden;text-overflow: ellipsis;white-space: nowrap}.ui-toolstrip__group,.ui-toolstrip__actions{align-items: center;display: inline-flex;flex-wrap: wrap;gap: var(--space-2xs)}.ui-toolstrip__group{background: var(--panel-soft);border: 1px solid var(--line);border-radius: var(--radius-md);padding: 0.16rem}.ui-toolstrip__search{flex: 1 1 14rem;min-inline-size: min(100%,11rem)}.ui-toolstrip__actions{margin-inline-start: auto}.ui-segmented-buttons{align-items: center;background: var(--panel-soft);border: 1px solid var(--line);border-radius: var(--radius-md);display: inline-flex;flex-wrap: wrap;gap: 0.16rem;padding: 0.16rem}.ui-segmented-buttons__button{background: transparent;border: 1px solid transparent;border-radius: var(--radius-sm);color: var(--text-soft);cursor: pointer;font-family: var(--mono);font-size: var(--text-xs);font-weight: 700;letter-spacing: var(--tracking-wide);line-height: 1;min-block-size: 1.9rem;padding: 0.48rem 0.7rem;text-transform: uppercase}.ui-segmented-buttons__button[aria-pressed='true'],.ui-segmented-buttons__button.is-active{background: var(--accent);border-color: var(--accent);color: var(--button-text)}.ui-segmented-buttons__button:disabled,.ui-segmented-buttons__button[aria-disabled='true']{cursor: not-allowed;opacity: 0.45}.ui-property{align-items: baseline;display: grid;gap: var(--space-sm);grid-template-columns: minmax(6rem,38%) 1fr}.ui-property__label{color: var(--text-dim);font-family: var(--mono);font-size: var(--text-2xs);letter-spacing: var(--tracking-wide);text-transform: uppercase}.ui-property__value{color: var(--text);font-size: var(--text-sm);min-inline-size: 0}.ui-selectionbar{align-items: center;background: var(--panel-strong);border: 1px solid var(--line-strong);border-radius: var(--radius-md);box-shadow: var(--shadow-raised);display: flex;flex-wrap: wrap;gap: var(--space-sm) var(--space-md);justify-content: space-between;padding: 0.5rem 0.85rem}.ui-selectionbar__count{color: var(--text);font-family: var(--mono);font-size: var(--text-sm)}.ui-selectionbar__actions{display: flex;flex-wrap: wrap;gap: var(--space-xs)}@media (hover: hover){.ui-segmented-buttons__button:hover:not(:disabled,[aria-disabled='true'],[aria-pressed='true'],.is-active){background: var(--panel);border-color: var(--line-strong);color: var(--text)}}.ui-splitter{--splitter-pos: 50%;--splitter-handle: 0.75rem;--splitter-pane-min: 0px;background: var(--panel);border: 1px solid var(--line);border-radius: var(--radius-md);display: grid;grid-template-columns: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr);min-block-size: 18rem;overflow: hidden}.ui-splitter--vertical{grid-template-columns: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr)}.ui-splitter--horizontal{grid-template-columns: 1fr;grid-template-rows: minmax(var(--splitter-pane-min),var(--splitter-pos)) var(--splitter-handle) minmax(0,1fr)}.ui-splitter__pane{min-block-size: 0;min-inline-size: 0;overflow: auto;padding: var(--space-md)}.ui-splitter__handle{align-self: stretch;background: var(--panel-strong);border-block: 0;border-inline: 1px solid var(--line);cursor: col-resize;display: grid;min-inline-size: var(--splitter-handle);place-items: center;touch-action: none}.ui-splitter__handle::before{background: var(--line-strong);border-radius: var(--radius-pill);block-size: 2.5rem;content: "";inline-size: 2px}.ui-splitter__handle:hover::before,.ui-splitter__handle.is-active::before,.ui-splitter__handle[aria-valuenow]:focus-visible::before{background: var(--accent)}.ui-splitter__handle:focus-visible{outline: 2px solid var(--focus-ring);outline-offset: -2px}.ui-splitter--horizontal .ui-splitter__handle{border-block: 1px solid var(--line);border-inline: 0;cursor: row-resize;min-block-size: var(--splitter-handle);min-inline-size: 0}.ui-splitter--horizontal .ui-splitter__handle::before{block-size: 2px;inline-size: 2.5rem}@media (forced-colors: active){.ui-segmented-buttons__button[aria-pressed='true'],.ui-segmented-buttons__button.is-active{background: Highlight;border-color: Highlight;color: HighlightText}.ui-splitter__handle{border-color: CanvasText}.ui-splitter__handle::before{background: CanvasText}}}
@@ -13,6 +13,42 @@ points away from it, and a **note** carries the visible explanation.
13
13
  Use it with any SVG renderer. Bronto supplies classes and tiny geometry helpers;
14
14
  it does not own chart scales, mutate the DOM, or provide draggable edit mode.
15
15
 
16
+ For new annotation-engine work, use the sibling `@ponchia/annotations` package:
17
+ it owns placement, collision handling, SVG/React renderers, editable layers, and
18
+ Mermaid/D2/Vega/React Flow adapters. This `@ponchia/ui/annotations` subpath
19
+ stays a dependency-free compatibility surface for static Bronto SVG helpers, so
20
+ installing the UI package never pulls in the annotation engine and public
21
+ declarations never type-reference it. Combine the two by using Bronto's
22
+ `css/annotations.css` for the visual grammar, or the annotation package's Bronto
23
+ CSS bridge when the engine emits its own layer.
24
+
25
+ When an annotation engine overlays a rendered chart, screenshot, canvas, or
26
+ diagram, put the rendered media in `.ui-figure__media` and the emitted annotation
27
+ layer in `.ui-figure__overlay`. The figure stage supplies the stable positioning
28
+ context; the annotation package owns anchors, placement, collision handling, and
29
+ SVG/React rendering. Keep the same annotation text available through a caption,
30
+ `<desc>`, fallback table, or surrounding prose when it carries data.
31
+
32
+ For inspector-driven selection, keep selection state in the host application:
33
+ the selected item can render details in `.ui-inspector`, while the annotation
34
+ engine receives the focused anchor and emits the matching overlay. Bronto UI
35
+ styles the inspector, figure stage, and annotation visual grammar; it does not
36
+ own hit-testing, selected IDs, camera/chart state, or focus policy.
37
+
38
+ ```html
39
+ <figure class="ui-figure" role="group" aria-labelledby="annotated-title">
40
+ <figcaption id="annotated-title" class="ui-figure__caption">
41
+ Annotated service latency
42
+ </figcaption>
43
+ <div class="ui-figure__stage">
44
+ <canvas class="ui-figure__media" aria-label="Latency chart"></canvas>
45
+ <svg class="ui-figure__overlay pa-annotation-layer" viewBox="0 0 640 360">
46
+ <!-- emitted by @ponchia/annotations -->
47
+ </svg>
48
+ </div>
49
+ </figure>
50
+ ```
51
+
16
52
  ```js
17
53
  import {
18
54
  annotationParts,
@@ -76,6 +76,13 @@ on top of the CSS, none of which require a framework commitment**:
76
76
  `index.js` is a barrel; each behavior lives in its own module
77
77
  (`dialog.js`, `combobox.js`, …) over a shared `internal.js` of DOM helpers,
78
78
  so the public import surface is unchanged.
79
+ - **connectors/** and **annotations/** — dependency-free SVG geometry helpers
80
+ for report and analytical figures. `@ponchia/ui/annotations` intentionally
81
+ stays a small static-helper compatibility layer for the Bronto subject /
82
+ connector / note grammar. The richer annotation engine - placement,
83
+ collision handling, SVG/React renderers, editing, and diagram/chart adapters
84
+ - lives in the sibling `@ponchia/annotations` package and must not be pulled
85
+ in as a runtime or public type dependency of `@ponchia/ui`.
79
86
  - **glyphs/** — static bitmap data and SSR-safe render helpers. The
80
87
  256-cell DOM renderers are for display and solid inline icons; the `.ui-icon`
81
88
  mask renderer is for dense icon-at-scale use.
@@ -102,6 +109,26 @@ on top of the CSS, none of which require a framework commitment**:
102
109
  `/svelte`, `/vue`, `/skins`, `/charts`, `/mermaid`, `/d2`, `/vega`). This is
103
110
  a permanent, intentional contract.
104
111
 
112
+ ### Surface admission rule
113
+
114
+ The default bundle is the shared app/service identity, not the complete Bronto
115
+ catalog. A new public surface must choose one lane before it ships:
116
+
117
+ - **core identity** — universal application chrome or accessibility/platform
118
+ glue that belongs in `dist/bronto.css`;
119
+ - **opt-in toolbox** — report, analytical, provenance, generated-content,
120
+ renderer, workbench, or command vocabulary that ships as an explicit CSS/JS
121
+ subpath;
122
+ - **recipe/docs only** — a pattern that can be taught without creating a new
123
+ class, token, behavior, export, or package path.
124
+
125
+ When the answer is unclear, choose recipe/docs first. Promote to an opt-in leaf
126
+ only after a real consumer repeats the pattern; promote to core only when it is
127
+ clearly shared application identity. Bronto owns visual grammar, token handoff,
128
+ pure geometry, and delegated accessibility behavior. It does not own chart
129
+ scales, data fetching, persistence, routing, workflow execution, action
130
+ registries, virtualized grids, or framework component APIs.
131
+
105
132
  ## Repository layout
106
133
 
107
134
  The repo root mixes five kinds of directory that look alike but follow very
@@ -162,6 +189,7 @@ are copied into consumer reports.
162
189
  | published tarball == intended `files` only | `check-pack.mjs` |
163
190
  | packed core JS/JSON public subpaths import without optional framework peers, packed JS named exports exactly match source modules, peer-backed adapters import after peers are linked, concrete CSS/doc/font subpaths resolve, and packed behavior initializers/toast no-op in a clean consumer with no DOM globals | `check-consumer-surface.mjs` |
164
191
  | packed typed public subpaths compile through package exports in a clean TypeScript consumer | `check-consumer-types.mjs` |
192
+ | function-level cyclomatic complexity stays ≤12 and function NLOC stays within budget, with no per-function exception list | `check-complexity.mjs` |
165
193
  | GitHub Actions workflow syntax and embedded shell snippets lint | `check:workflows` (`github-actionlint`) |
166
194
  | every shipped CSS leaf is classified as foundation or has explicit docs/demo/e2e ownership | `check-component-matrix.mjs` |
167
195
  | every public behavior export has explicit docs, unit-test, and browser-test ownership | `check-behavior-matrix.mjs` |
@@ -0,0 +1,89 @@
1
+ # React Flow interop
2
+
3
+ `@ponchia/ui` does not wrap or depend on React Flow / Xyflow. Use React Flow as
4
+ the renderer and keep graph state, layout, hit-testing, and node components in
5
+ the host application.
6
+
7
+ The one Bronto-specific gotcha is the base media reset:
8
+
9
+ ```css
10
+ img,
11
+ svg {
12
+ display: block;
13
+ max-inline-size: 100%;
14
+ }
15
+ ```
16
+
17
+ That reset is correct for normal inline SVGs, report figures, icons, and rendered
18
+ diagrams. React Flow edge SVGs are different: the edge layer uses absolutely
19
+ positioned SVG wrappers that paint by overflow. If `max-inline-size: 100%` is
20
+ allowed to constrain those wrappers, edges can disappear or clip.
21
+
22
+ ## Edge SVG escape hatch
23
+
24
+ Scope the escape hatch to the React Flow surface in your app stylesheet. Keep it
25
+ un-layered, or place it in an app layer declared after `bronto`.
26
+
27
+ ```css
28
+ /* app.css */
29
+ @import '@ponchia/ui';
30
+
31
+ .flow-surface .react-flow__edges svg,
32
+ .flow-surface .react-flow__edge svg {
33
+ display: initial;
34
+ max-inline-size: none;
35
+ overflow: visible;
36
+ }
37
+ ```
38
+
39
+ ```tsx
40
+ import { ReactFlow } from '@xyflow/react';
41
+ import '@xyflow/react/dist/style.css';
42
+
43
+ export function GraphView() {
44
+ return (
45
+ <div className="flow-surface">
46
+ <ReactFlow nodes={nodes} edges={edges} />
47
+ </div>
48
+ );
49
+ }
50
+ ```
51
+
52
+ Do not remove Bronto's global SVG reset to fix this. The incompatibility is
53
+ specific to React Flow's edge-layer geometry, so the override should stay scoped
54
+ to the canvas.
55
+
56
+ ## HTML edge labels
57
+
58
+ If you use React Flow's `EdgeLabelRenderer`, remember that labels are HTML
59
+ overlays, not SVG text. Container/group nodes can paint over them. Lift the label
60
+ overlay only inside the graph surface, and keep labels pointer-transparent unless
61
+ they are deliberately interactive:
62
+
63
+ ```css
64
+ .flow-surface .react-flow__edgelabel-renderer {
65
+ z-index: var(--z-raised, 10);
66
+ }
67
+
68
+ .flow-surface .flow-edge-label {
69
+ pointer-events: none;
70
+ }
71
+ ```
72
+
73
+ For dense operational diagrams, prefer sparse edge labels plus a side inspector
74
+ for detail. Use Bronto primitives inside nodes or inspectors (`ui-badge`,
75
+ `ui-dot`, `ui-property`, `ui-legend`) rather than adding a Bronto graph-node
76
+ component before a second consumer proves the pattern repeats.
77
+
78
+ ## What belongs in the app
79
+
80
+ Keep these outside `@ponchia/ui`:
81
+
82
+ - authored or automatic node placement;
83
+ - graph data models and domain status names;
84
+ - brand/product icons;
85
+ - animation semantics, such as travelling reconciliation dots;
86
+ - click/hover selection behavior.
87
+
88
+ Bronto should provide the visual vocabulary and interop recipe. The graph
89
+ renderer and product meaning remain the host application's job.
@@ -169,6 +169,7 @@ semantic versioning contract for the surfaces listed here.
169
169
  | `./docs/workbench.md` | `./docs/workbench.md` | Shipped documentation | Stable path | Markdown documentation shipped in the tarball. Paths are public reading assets within a compatible minor. |
170
170
  | `./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. |
171
171
  | `./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. |
172
+ | `./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. |
172
173
  | `./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. |
173
174
  | `./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. |
174
175
  | `./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. |
@@ -266,6 +267,7 @@ always includes `package.json`, `README.md`, `LICENSE`, and
266
267
  | `docs/workbench.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
267
268
  | `docs/command.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
268
269
  | `docs/interop/tailwind.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
270
+ | `docs/interop/react-flow.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
269
271
  | `docs/migrations/0.2-to-0.3.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
270
272
  | `docs/migrations/0.3-to-0.4.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
271
273
  | `docs/migrations/0.4-to-0.5.md` | Shipped documentation | Curated Markdown reading asset shipped in the npm tarball. |
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
- - 634 classes across 177 component groups
12
+ - 644 classes across 179 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`,
@@ -1131,6 +1131,13 @@ each one matches a real selector in the stylesheet.
1131
1131
  | `cls.segmented` | `ui-segmented` | base |
1132
1132
  | `cls.segmentedOption` | `ui-segmented__option` | part |
1133
1133
 
1134
+ ### `.ui-segmented-buttons`
1135
+
1136
+ | Registry key | Class | Kind |
1137
+ | --- | --- | --- |
1138
+ | `cls.segmentedButtons` | `ui-segmented-buttons` | base |
1139
+ | `cls.segmentedButtonsButton` | `ui-segmented-buttons__button` | part |
1140
+
1134
1141
  ### `.ui-sel`
1135
1142
 
1136
1143
  | Registry key | Class | Kind |
@@ -1496,6 +1503,19 @@ each one matches a real selector in the stylesheet.
1496
1503
  | --- | --- | --- |
1497
1504
  | `cls.toolLog` | `ui-tool-log` | base |
1498
1505
 
1506
+ ### `.ui-toolstrip`
1507
+
1508
+ | Registry key | Class | Kind |
1509
+ | --- | --- | --- |
1510
+ | `cls.toolstrip` | `ui-toolstrip` | base |
1511
+ | `cls.toolstripActions` | `ui-toolstrip__actions` | part |
1512
+ | `cls.toolstripBrand` | `ui-toolstrip__brand` | part |
1513
+ | `cls.toolstripContext` | `ui-toolstrip__context` | part |
1514
+ | `cls.toolstripGroup` | `ui-toolstrip__group` | part |
1515
+ | `cls.toolstripSearch` | `ui-toolstrip__search` | part |
1516
+ | `cls.toolstripCompact` | `ui-toolstrip--compact` | modifier |
1517
+ | `cls.toolstripFloating` | `ui-toolstrip--floating` | modifier |
1518
+
1499
1519
  ### `.ui-tooltip`
1500
1520
 
1501
1521
  | Registry key | Class | Kind |
package/docs/reporting.md CHANGED
@@ -54,18 +54,18 @@ No install? Link the same files from a CDN. Pin the version — pre-1.0, breakin
54
54
  changes ship in the minor (see [stability.md](./stability.md)):
55
55
 
56
56
  ```html
57
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/bronto.css" />
58
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/report-kit.css" />
57
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/bronto.css" />
58
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/report-kit.css" />
59
59
  ```
60
60
 
61
61
  Leaf-by-leaf CDN imports use the same `dist/css/` paths:
62
62
 
63
63
  ```html
64
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/bronto.css" />
65
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/report.css" />
66
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/dataviz.css" />
67
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/annotations.css" />
68
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/dist/css/legend.css" />
64
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/bronto.css" />
65
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/report.css" />
66
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/dataviz.css" />
67
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/annotations.css" />
68
+ <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/dist/css/legend.css" />
69
69
  ```
70
70
 
71
71
  The CDN serves the package's own `fonts/` next to the CSS, so font URLs resolve
@@ -879,7 +879,7 @@ or validation runtime.
879
879
 
880
880
  ```json
881
881
  {
882
- "$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.8/schemas/report-claims.v1.schema.json",
882
+ "$schema": "https://cdn.jsdelivr.net/npm/@ponchia/ui@0.6.10/schemas/report-claims.v1.schema.json",
883
883
  "schemaVersion": "bronto-report-claims.v1",
884
884
  "report": { "title": "Decision readiness", "type": "decision" },
885
885
  "claims": [