@knpkv/rly 0.12.1 → 0.14.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -204,12 +204,33 @@ never reads as 0%. Under forced colours the track keeps a `CanvasText` edge. Pas
204
204
  to expose it as a meter instead. With `value={null}`, it is a named image whose
205
205
  accessible label combines `label` and `valueText`, without a numeric range.
206
206
 
207
+ `StackedBars` stacks values per period on a time axis, with optional `bands` of
208
+ limit levels above the bars on the same axis, and an optional `window` (such as the
209
+ current limit window) shaded across bands and bars and named in a key under the axis. Narrow containers bin periods so every
210
+ bar's hit area stays at least 24px wide, a full pointer target (the drawn fill is 2px narrower, for the gap). The plot is one tab stop: ←/→ move and select, Shift
211
+ extends, Home/End jump and Escape clears. Click selects, and Shift+click or a second
212
+ tap elsewhere extends the span. The caller owns `selection` and words it through
213
+ `describeSelection`. Only a selection the user makes is announced, politely, once it
214
+ settles: the first render and a data refresh under the same selection stay quiet. Charts
215
+ are presentation only: the application computes columns, bands and any projection.
216
+ `columns` must be in time order without overlaps (gaps are fine), or the chart throws an error naming
217
+ the first column out of place. Every bar stacks its series in one chart-wide order, the order
218
+ each id first appears. Bins group every N columns, so hourly columns that start on the
219
+ hour bin on clock hours. The selection is outlined above the bars, and the window is a
220
+ neutral dashed stretch, never the focus colour. A chart on a surface other than
221
+ `surface-1` sets `--rly-stacked-bars-gap` to that background, so the gaps between bars
222
+ match it.
223
+ Everything the bands draw is named in that key in the caller's words: each band's
224
+ `near: { level, label }` mark, and `noReadingLabel`, which is required once any band has
225
+ a stretch with `level: null`. Zero, negative and non-finite values draw nothing.
226
+
207
227
  `TrackKey` explains the marks the tracks draw, listing only the marks in use.
208
228
  `ChartLegend` says which colour is which series, with the swatch before each label.
209
229
  Series colours are the tokens `--rly-color-series-1` to `-8` plus
210
230
  `--rly-color-series-other` for folded series. Use `rlySeriesColor(series)` in SVG
211
231
  fills, and keep an id on the same slot while it is visible. Colour is never the only
212
- carrier: every chart ships a labelled key and a table equivalent, and forced-colours
232
+ carrier: every chart ships a labelled key and a table equivalent (a readable-resolution
233
+ table, each band's intervals, and a selection announcement naming every series' value), and forced-colours
213
234
  mode collapses the series to `CanvasText`.
214
235
 
215
236
  ```tsx
@@ -427,6 +448,30 @@ target, expected revision, impact, and evidence beside a named human reviewer.
427
448
  Its owned authorization button stays disabled until the controlled exact-action
428
449
  confirmation is checked, and terminal outcomes remain visible after review.
429
450
 
451
+ `RelayMark` is Relay's mark, the baton: two open hooks with a stroke passed between
452
+ them. The bare mark is drawn in the current colour, so it follows its host's text in
453
+ every theme and in forced colours; sizes are 16, 20 (default), 24 and 32px, and 16px
454
+ stays legible in one colour. `RelayMark.Tile` sets it on the agent colour (20, 24 or
455
+ 32px); in forced colours the tile becomes an outline in its context's colour
456
+ (LinkText in a link, ButtonText in a button). Both are decorative
457
+ unless given a `label`. The same mark on its tile ships as `@knpkv/rly/relay-mark.svg`
458
+ for a host's favicon.
459
+
460
+ `RelayLauncher` is the header button that opens and closes Relay: the mark, a label
461
+ ("Relay" unless the host names it) and the Ctrl/⌘+J hint. It sits in the host's header
462
+ like any other control, never fixed over the page. `expanded` drives `aria-expanded`,
463
+ and `aria-keyshortcuts` names the shortcut while the visible hint stays hidden from
464
+ assistive technology. `shortcut` is required: pass `useRelayShortcut()` (Ctrl/⌘+J for
465
+ the platform) only when the host binds that key and prevents the browser's own Ctrl+J,
466
+ or `null` where it binds none, such as a live terminal that keeps its chords.
467
+ The hint hides at 40rem and below, and the button is 32px tall, 44px for a coarse pointer.
468
+
469
+ ```tsx
470
+ import { RelayLauncher, useRelayShortcut } from "@knpkv/rly/patterns"
471
+
472
+ ;<RelayLauncher expanded={open} onClick={() => setOpen((value) => !value)} shortcut={useRelayShortcut()} />
473
+ ```
474
+
430
475
  `RelayDock` is the shared product frame for one adapter-owned Relay thread. It
431
476
  starts collapsed, keeps context plus profile and model selection visible above
432
477
  the scrolling thread, and accepts explicit ready, loading, empty, error, and
@@ -0,0 +1,9 @@
1
+ <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="32" height="32">
2
+ <title>Relay</title>
3
+ <rect width="32" height="32" rx="9.6" fill="#6741A5"/>
4
+ <g transform="translate(8 8) scale(0.6667)" fill="none" stroke="#FFFFFF" stroke-width="2.75" stroke-linecap="round" stroke-linejoin="round">
5
+ <path d="M4 20V9.5A5.5 5.5 0 0 1 9.5 4H13"/>
6
+ <path d="M20 4v10.5a5.5 5.5 0 0 1-5.5 5.5H11"/>
7
+ <path d="M10 14 14 10"/>
8
+ </g>
9
+ </svg>