@knpkv/rly 0.8.0 → 0.9.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 (41) hide show
  1. package/README.md +38 -0
  2. package/dist/components.css +1 -1
  3. package/dist/dts/patterns/DecisionBar.d.ts +68 -0
  4. package/dist/dts/patterns/DecisionBar.d.ts.map +1 -0
  5. package/dist/dts/patterns/Hero.d.ts +69 -0
  6. package/dist/dts/patterns/Hero.d.ts.map +1 -0
  7. package/dist/dts/patterns/Region.d.ts +56 -0
  8. package/dist/dts/patterns/Region.d.ts.map +1 -0
  9. package/dist/dts/patterns/StageRail.d.ts +11 -1
  10. package/dist/dts/patterns/StageRail.d.ts.map +1 -1
  11. package/dist/dts/patterns/TimelineRow.d.ts +25 -0
  12. package/dist/dts/patterns/TimelineRow.d.ts.map +1 -1
  13. package/dist/dts/patterns/index.d.ts +8 -2
  14. package/dist/dts/patterns/index.d.ts.map +1 -1
  15. package/dist/dts/primitives/ChartLegend.d.ts +23 -0
  16. package/dist/dts/primitives/ChartLegend.d.ts.map +1 -0
  17. package/dist/dts/primitives/LimitTrack.d.ts +62 -0
  18. package/dist/dts/primitives/LimitTrack.d.ts.map +1 -0
  19. package/dist/dts/primitives/TrackKey.d.ts +20 -0
  20. package/dist/dts/primitives/TrackKey.d.ts.map +1 -0
  21. package/dist/dts/primitives/index.d.ts +6 -0
  22. package/dist/dts/primitives/index.d.ts.map +1 -1
  23. package/dist/dts/tokens/semantic-tokens.d.ts +1 -1
  24. package/dist/dts/tokens/semantic-tokens.d.ts.map +1 -1
  25. package/dist/generated-tokens.css +36 -0
  26. package/dist/index.js +5 -5
  27. package/dist/patterns/index.js +2 -2
  28. package/dist/{patterns-LJ8Y44f2.js → patterns-lOWLKH70.js} +1246 -947
  29. package/dist/patterns-lOWLKH70.js.map +1 -0
  30. package/dist/primitives/index.js +2 -2
  31. package/dist/{primitives-CjQX0eVM.js → primitives-Dj-qYrUZ.js} +215 -85
  32. package/dist/primitives-Dj-qYrUZ.js.map +1 -0
  33. package/dist/tokens/index.js +1 -1
  34. package/dist/{tokens-CjK9bxo7.js → tokens-DaF1m6rr.js} +2 -2
  35. package/dist/tokens-DaF1m6rr.js.map +1 -0
  36. package/package.json +1 -1
  37. package/registry/components.json +639 -12
  38. package/registry/search.json +163 -2
  39. package/dist/patterns-LJ8Y44f2.js.map +0 -1
  40. package/dist/primitives-CjQX0eVM.js.map +0 -1
  41. package/dist/tokens-CjK9bxo7.js.map +0 -1
package/README.md CHANGED
@@ -177,6 +177,44 @@ state, contain and restore focus, lock document scrolling, and become
177
177
  full-screen at compact widths. Titles are always visible and required, while
178
178
  motion is governed by the central theme tokens.
179
179
 
180
+ ## Limits and chart keys
181
+
182
+ `LimitTrack` shows how full a limit is on a 0–100% track: the fill is the latest
183
+ reading, a two-tone hairline marks the near threshold (80% unless `near` says otherwise),
184
+ a dotted extension shows a `projected` level the application computed, and a
185
+ `stale` reading is hatched. Rly derives only the tone (`limitTrackTone`); it never
186
+ estimates a projection. The track is decorative by default because the number sits
187
+ beside it, so that text must also carry the age and the projection ("61%, old
188
+ reading", "84%, about 103% at reset"). A non-finite `value` is drawn as no reading,
189
+ and a non-finite `near` throws. No reading draws a faint full-width hatch in a dashed edge, so it
190
+ never reads as 0%. Under forced colours the track keeps a `CanvasText` edge. Pass `decorative={false}` with a `label` and the caller's `valueText`
191
+ to expose it as a meter instead. With `value={null}`, it is a named image whose
192
+ accessible label combines `label` and `valueText`, without a numeric range.
193
+
194
+ `TrackKey` explains the marks the tracks draw, listing only the marks in use.
195
+ `ChartLegend` says which colour is which series, with the swatch before each label.
196
+ Series colours are the tokens `--rly-color-series-1` to `-8` plus
197
+ `--rly-color-series-other` for folded series. Use `rlySeriesColor(series)` in SVG
198
+ fills, and keep an id on the same slot while it is visible. Colour is never the only
199
+ carrier: every chart ships a labelled key and a table equivalent, and forced-colours
200
+ mode collapses the series to `CanvasText`.
201
+
202
+ ```tsx
203
+ import { ChartLegend, LimitTrack, TrackKey } from "@knpkv/rly/primitives"
204
+
205
+ <p>
206
+ Weekly <LimitTrack projected={103} value={84} /> 84%, about 103% at reset
207
+ </p>
208
+ <TrackKey
209
+ label="What the track marks mean"
210
+ items={[
211
+ { mark: "near", label: "80%, near the limit" },
212
+ { mark: "projected", label: "Where it is heading at reset" }
213
+ ]}
214
+ />
215
+ <ChartLegend label="Bookings by colour" items={[{ id: "b1", label: "RLY-142", series: 1 }]} />
216
+ ```
217
+
180
218
  ## Provenance and collaborators
181
219
 
182
220
  The first product patterns keep source, freshness, and human responsibility as