@knpkv/rly 0.9.0 → 0.10.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 (70) hide show
  1. package/README.md +11 -3
  2. package/dist/{Dialog-_t9OodCK.js → Dialog-B9Ub_gMT.js} +79 -62
  3. package/dist/Dialog-B9Ub_gMT.js.map +1 -0
  4. package/dist/components.css +2 -2
  5. package/dist/diff/bounded/index.js +317 -303
  6. package/dist/diff/bounded/index.js.map +1 -1
  7. package/dist/diff/index.js +2436 -2433
  8. package/dist/diff/index.js.map +1 -1
  9. package/dist/diff/patch/index.js +188 -186
  10. package/dist/diff/patch/index.js.map +1 -1
  11. package/dist/diff/workbench/index.js +1 -1
  12. package/dist/dts/diff/DiffCodeView.d.ts.map +1 -1
  13. package/dist/dts/diff/DiffFileTree.d.ts.map +1 -1
  14. package/dist/dts/diff/DiffFinding.d.ts.map +1 -1
  15. package/dist/dts/diff/DiffHeader.d.ts.map +1 -1
  16. package/dist/dts/diff/bounded/BoundedDiffCodeView.d.ts.map +1 -1
  17. package/dist/dts/diff/patch/PatchDiffView.d.ts.map +1 -1
  18. package/dist/dts/internal/useNarrowerThan.d.ts +10 -0
  19. package/dist/dts/internal/useNarrowerThan.d.ts.map +1 -0
  20. package/dist/dts/patterns/AgentThread.d.ts.map +1 -1
  21. package/dist/dts/patterns/FreshnessStamp.d.ts.map +1 -1
  22. package/dist/dts/patterns/ReleaseRelay.d.ts.map +1 -1
  23. package/dist/dts/patterns/Verdict.d.ts +1 -1
  24. package/dist/dts/patterns/Verdict.d.ts.map +1 -1
  25. package/dist/dts/primitives/Button.d.ts +9 -4
  26. package/dist/dts/primitives/Button.d.ts.map +1 -1
  27. package/dist/dts/primitives/Field.d.ts +8 -3
  28. package/dist/dts/primitives/Field.d.ts.map +1 -1
  29. package/dist/dts/primitives/IconButton.d.ts +9 -4
  30. package/dist/dts/primitives/IconButton.d.ts.map +1 -1
  31. package/dist/dts/primitives/Notice.d.ts +5 -5
  32. package/dist/dts/primitives/Select.d.ts +8 -3
  33. package/dist/dts/primitives/Select.d.ts.map +1 -1
  34. package/dist/dts/primitives/StateLabel.d.ts +6 -6
  35. package/dist/dts/primitives/StateLabel.d.ts.map +1 -1
  36. package/dist/dts/primitives/StatePanel.d.ts +7 -6
  37. package/dist/dts/primitives/StatePanel.d.ts.map +1 -1
  38. package/dist/dts/primitives/ThemeSelect.d.ts +3 -2
  39. package/dist/dts/primitives/ThemeSelect.d.ts.map +1 -1
  40. package/dist/dts/primitives/ToggleGroup.d.ts +9 -4
  41. package/dist/dts/primitives/ToggleGroup.d.ts.map +1 -1
  42. package/dist/dts/tokens/control.d.ts +27 -0
  43. package/dist/dts/tokens/control.d.ts.map +1 -0
  44. package/dist/dts/tokens/index.d.ts +2 -2
  45. package/dist/dts/tokens/index.d.ts.map +1 -1
  46. package/dist/dts/tokens/semantic-tokens.d.ts +2 -0
  47. package/dist/dts/tokens/semantic-tokens.d.ts.map +1 -1
  48. package/dist/generated-tokens.css +19 -6
  49. package/dist/index.js +5 -5
  50. package/dist/patterns/index.js +1 -1
  51. package/dist/{patterns-lOWLKH70.js → patterns-DTsU3pFo.js} +12 -14
  52. package/dist/patterns-DTsU3pFo.js.map +1 -0
  53. package/dist/primitives/index.js +2 -2
  54. package/dist/{primitives-Dj-qYrUZ.js → primitives-CgvvYKjR.js} +167 -161
  55. package/dist/primitives-CgvvYKjR.js.map +1 -0
  56. package/dist/tokens/index.js +2 -2
  57. package/dist/{tokens-DaF1m6rr.js → tokens-B075JP3Z.js} +7 -2
  58. package/dist/tokens-B075JP3Z.js.map +1 -0
  59. package/dist/useNarrowerThan-B1PM32sm.js +21 -0
  60. package/dist/useNarrowerThan-B1PM32sm.js.map +1 -0
  61. package/dist/{workbench-4C25n_BY.js → workbench-CHCnYW3G.js} +107 -131
  62. package/dist/workbench-CHCnYW3G.js.map +1 -0
  63. package/package.json +5 -3
  64. package/registry/components.json +68 -13
  65. package/registry/search.json +9 -0
  66. package/dist/Dialog-_t9OodCK.js.map +0 -1
  67. package/dist/patterns-lOWLKH70.js.map +0 -1
  68. package/dist/primitives-Dj-qYrUZ.js.map +0 -1
  69. package/dist/tokens-DaF1m6rr.js.map +0 -1
  70. package/dist/workbench-4C25n_BY.js.map +0 -1
package/README.md CHANGED
@@ -160,10 +160,18 @@ keep the notice mounted and swap its children, because a status region reliably
160
160
  announces changes, not its own appearance. An `announce="assertive"` alert may
161
161
  announce as soon as it is inserted.
162
162
 
163
+ Controls default to tool density. `Button`, `IconButton`, `Select`, and the
164
+ `Field` control share `--rly-control-height-{dense,compact,default,principal}`
165
+ (32/40/48/56px), so mixed controls in one toolbar line up. `dense` is the
166
+ default and sizes a button to its text with a small radius; on coarse pointers
167
+ the dense and compact heights rise to a 44px touch target. Pass
168
+ `size="default"` or `"principal"` where an action needs more presence.
169
+
163
170
  `ToggleGroup` chooses one of a few peer options, such as a range or a measure,
164
171
  and is always controlled: exactly one option is on, pressing it again changes
165
172
  nothing, and arrow keys move to the next option and choose it. It renders a
166
- named `radiogroup`; use `size="compact"` beside other filters.
173
+ named `radiogroup`. It is dense by default, an outlined row as tall as the dense
174
+ controls beside it; `compact` and `default` follow the same control heights.
167
175
 
168
176
  `Tabs` items may set `forceMount: true` to retain inactive content, for example
169
177
  when printing both panels. It defaults to unmounting inactive content. Callers
@@ -285,8 +293,8 @@ spark, stack, and compass. Reordering or replacing that map is a breaking
285
293
  identity change rather than a cosmetic icon update.
286
294
 
287
295
  `Verdict` stays deliberately large and neutral. The caller supplies its exact
288
- wording, reason, and semantic tone; tone affects only the redundant icon,
289
- 4px rail, and restrained reason context. Rly does not infer readiness from any
296
+ wording, reason, and semantic tone; tone affects only the redundant icon and
297
+ the reason panel's tint and even border. Rly does not infer readiness from any
290
298
  of those values.
291
299
 
292
300
  ## Delivery stages and relationships
@@ -274,11 +274,12 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
274
274
  primary: "rly_Button-module__primary",
275
275
  secondary: "rly_Button-module__secondary",
276
276
  quiet: "rly_Button-module__quiet",
277
+ dense: "rly_Button-module__dense",
278
+ content: "rly_Button-module__content",
277
279
  compact: "rly_Button-module__compact",
278
280
  defaultSize: "rly_Button-module__defaultSize",
279
281
  principal: "rly_Button-module__principal",
280
282
  stretch: "rly_Button-module__stretch",
281
- content: "rly_Button-module__content",
282
283
  label: "rly_Button-module__label",
283
284
  loadingContent: "rly_Button-module__loadingContent",
284
285
  loader: "rly_Button-module__loader"
@@ -301,26 +302,31 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
301
302
  }
302
303
  },
303
304
  size: {
305
+ dense: {
306
+ className: z("dense"),
307
+ purpose: "Tool-density action sized to its text; the default",
308
+ tokens: ["control-height-dense", "radius-tag"]
309
+ },
304
310
  compact: {
305
311
  className: z("compact"),
306
312
  purpose: "Dense text action",
307
- tokens: ["space-40"]
313
+ tokens: ["control-height-compact"]
308
314
  },
309
315
  default: {
310
316
  className: z("defaultSize"),
311
317
  purpose: "Standard action",
312
- tokens: ["space-48"]
318
+ tokens: ["control-height-default"]
313
319
  },
314
320
  principal: {
315
321
  className: z("principal"),
316
322
  purpose: "Prominent consequential action",
317
- tokens: ["space-48", "space-8"]
323
+ tokens: ["control-height-principal", "space-8"]
318
324
  }
319
325
  }
320
326
  }), me = c({
321
327
  variant: "secondary",
322
- size: "default"
323
- }), V = ({ "aria-label": t, "aria-labelledby": n, children: r, className: i, disabled: o, leadingIcon: s, loading: c = !1, size: d = "default", stretch: f = !1, trailingIcon: p, type: m, variant: h = "secondary", ...g }) => {
328
+ size: "dense"
329
+ }), V = ({ "aria-label": t, "aria-labelledby": n, children: r, className: i, disabled: o, leadingIcon: s, loading: c = !1, size: d = me.size, stretch: f = !1, trailingIcon: p, type: m, variant: h = "secondary", ...g }) => {
324
330
  if (!l(r) && !a(r) || a(r) && r.trim().length === 0) throw Error("Button children must contain visible content");
325
331
  return /* @__PURE__ */ C("button", {
326
332
  ...g,
@@ -373,27 +379,27 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
373
379
  neutral: {
374
380
  className: H("neutral"),
375
381
  purpose: "Neutral or unavailable state",
376
- tokens: ["color-text-2", "color-surface-2"]
382
+ tokens: ["color-text-2"]
377
383
  },
378
384
  positive: {
379
385
  className: H("positive"),
380
386
  purpose: "Positive state",
381
- tokens: ["color-success-ink", "color-success-tint"]
387
+ tokens: ["color-success-ink"]
382
388
  },
383
389
  critical: {
384
390
  className: H("critical"),
385
391
  purpose: "Critical state",
386
- tokens: ["color-blocked-ink", "color-blocked-tint"]
392
+ tokens: ["color-blocked-ink"]
387
393
  },
388
394
  caution: {
389
395
  className: H("caution"),
390
396
  purpose: "Caution state",
391
- tokens: ["color-held-ink", "color-held-tint"]
397
+ tokens: ["color-held-ink"]
392
398
  },
393
399
  progress: {
394
400
  className: H("progress"),
395
401
  purpose: "Work in progress",
396
- tokens: ["color-deploying-ink", "color-deploying-tint"]
402
+ tokens: ["color-deploying-ink"]
397
403
  }
398
404
  },
399
405
  size: {
@@ -420,7 +426,7 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
420
426
  }, ve = ({ className: t, icon: n, label: r, size: a = "default", tone: o = "neutral", ...s }) => /* @__PURE__ */ C("span", {
421
427
  ...s,
422
428
  className: u(H("root"), U.tone[o].className, U.size[a].className, t),
423
- children: [/* @__PURE__ */ S(e, {
429
+ children: [n === void 0 && o === "neutral" ? null : /* @__PURE__ */ S(e, {
424
430
  decorative: !0,
425
431
  name: n ?? _e[o],
426
432
  size: "small"
@@ -498,6 +504,7 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
498
504
  primary: "rly_IconButton-module__primary",
499
505
  secondary: "rly_IconButton-module__secondary",
500
506
  quiet: "rly_IconButton-module__quiet",
507
+ dense: "rly_IconButton-module__dense",
501
508
  compact: "rly_IconButton-module__compact",
502
509
  defaultSize: "rly_IconButton-module__defaultSize",
503
510
  principal: "rly_IconButton-module__principal"
@@ -520,26 +527,31 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
520
527
  }
521
528
  },
522
529
  size: {
530
+ dense: {
531
+ className: K("dense"),
532
+ purpose: "Tool-density icon target; the default",
533
+ tokens: ["control-height-dense", "radius-tag"]
534
+ },
523
535
  compact: {
524
536
  className: K("compact"),
525
537
  purpose: "Minimum accessible icon target",
526
- tokens: ["space-40", "space-4"]
538
+ tokens: ["control-height-compact"]
527
539
  },
528
540
  default: {
529
541
  className: K("defaultSize"),
530
542
  purpose: "Standard icon target",
531
- tokens: ["space-48"]
543
+ tokens: ["control-height-default"]
532
544
  },
533
545
  principal: {
534
546
  className: K("principal"),
535
547
  purpose: "Prominent icon target",
536
- tokens: ["space-48", "space-8"]
548
+ tokens: ["control-height-principal"]
537
549
  }
538
550
  }
539
551
  }), we = c({
540
552
  variant: "secondary",
541
- size: "default"
542
- }), Te = ({ className: t, disabled: n, icon: r, label: a, loading: o = !1, size: s = "default", type: c, variant: l = "secondary", ...d }) => /* @__PURE__ */ S("button", {
553
+ size: "dense"
554
+ }), Te = ({ className: t, disabled: n, icon: r, label: a, loading: o = !1, size: s = we.size, type: c, variant: l = "secondary", ...d }) => /* @__PURE__ */ S("button", {
543
555
  ...d,
544
556
  "aria-busy": o ? "true" : void 0,
545
557
  "aria-label": i(a, "IconButton label"),
@@ -554,6 +566,7 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
554
566
  })
555
567
  }), Ee = /* @__PURE__ */ new WeakSet(), De = (e) => (Ee.add(e), e), Oe = (e) => Ee.has(e), ke = {
556
568
  trigger: "rly_Select-module__trigger",
569
+ dense: "rly_Select-module__dense",
557
570
  compact: "rly_Select-module__compact",
558
571
  defaultSize: "rly_Select-module__defaultSize",
559
572
  triggerIcon: "rly_Select-module__triggerIcon",
@@ -563,17 +576,22 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
563
576
  itemIndicator: "rly_Select-module__itemIndicator",
564
577
  scrollButton: "rly_Select-module__scrollButton"
565
578
  }, q = (e) => o(ke, e), Ae = c({ size: {
579
+ dense: {
580
+ className: q("dense"),
581
+ purpose: "Tool-density selection control; the default",
582
+ tokens: ["control-height-dense", "radius-tag"]
583
+ },
566
584
  compact: {
567
585
  className: q("compact"),
568
586
  purpose: "Dense form rows",
569
- tokens: ["space-40", "type-meta"]
587
+ tokens: ["control-height-compact", "type-meta"]
570
588
  },
571
589
  default: {
572
590
  className: q("defaultSize"),
573
591
  purpose: "Standard selection control",
574
- tokens: ["space-48", "type-body"]
592
+ tokens: ["control-height-default", "type-body"]
575
593
  }
576
- } }), je = c({ size: "default" }), Me = (e, t) => {
594
+ } }), je = c({ size: "dense" }), Me = (e, t) => {
577
595
  if (!t && !e.some((e) => !e.disabled)) throw Error("Select options must contain at least one enabled option");
578
596
  let n = /* @__PURE__ */ new Set();
579
597
  for (let t of e) {
@@ -722,7 +740,6 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
722
740
  critical: "rly_StatePanel-module__critical",
723
741
  caution: "rly_StatePanel-module__caution",
724
742
  progress: "rly_StatePanel-module__progress",
725
- rail: "rly_StatePanel-module__rail",
726
743
  icon: "rly_StatePanel-module__icon",
727
744
  content: "rly_StatePanel-module__content",
728
745
  title: "rly_StatePanel-module__title",
@@ -732,72 +749,66 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
732
749
  neutral: {
733
750
  className: Y("neutral"),
734
751
  purpose: "Neutral explanatory state",
735
- tokens: ["color-text-2", "color-surface-2"]
752
+ tokens: ["color-text-2", "color-border-2"]
736
753
  },
737
754
  positive: {
738
755
  className: Y("positive"),
739
756
  purpose: "Positive outcome",
740
- tokens: ["color-success-ink", "color-success-tint"]
757
+ tokens: ["color-success-ink"]
741
758
  },
742
759
  critical: {
743
760
  className: Y("critical"),
744
761
  purpose: "Critical outcome requiring attention",
745
- tokens: ["color-blocked-ink", "color-blocked-tint"]
762
+ tokens: ["color-blocked-ink"]
746
763
  },
747
764
  caution: {
748
765
  className: Y("caution"),
749
766
  purpose: "Held outcome requiring review",
750
- tokens: ["color-held-ink", "color-held-tint"]
767
+ tokens: ["color-held-ink"]
751
768
  },
752
769
  progress: {
753
770
  className: Y("progress"),
754
771
  purpose: "Work currently in progress",
755
- tokens: ["color-deploying-ink", "color-deploying-tint"]
772
+ tokens: ["color-deploying-ink"]
756
773
  }
757
774
  } }), Be = c({ tone: "neutral" }), Ve = {
758
- neutral: "minus",
775
+ neutral: void 0,
759
776
  positive: "check",
760
777
  critical: "alert",
761
778
  caution: "clock",
762
779
  progress: "loader"
763
780
  }, He = ({ action: t, announce: n = "off", className: r, description: a, icon: o, title: s, tone: c = "neutral", ...l }) => {
764
- let d = n === "assertive" ? "alert" : n === "polite" ? "status" : l.role;
781
+ let d = n === "assertive" ? "alert" : n === "polite" ? "status" : l.role, f = o ?? Ve[c];
765
782
  return /* @__PURE__ */ C("section", {
766
783
  ...l,
767
784
  "aria-live": n === "off" ? void 0 : n,
768
785
  className: u(Y("root"), ze.tone[c].className, r),
786
+ "data-icon": f === void 0 ? "none" : void 0,
769
787
  role: d,
770
- children: [
771
- /* @__PURE__ */ S("span", {
772
- "aria-hidden": "true",
773
- className: Y("rail")
774
- }),
775
- /* @__PURE__ */ S("span", {
776
- "aria-hidden": "true",
777
- className: Y("icon"),
778
- children: /* @__PURE__ */ S(e, {
779
- decorative: !0,
780
- name: o ?? Ve[c]
781
- })
782
- }),
783
- /* @__PURE__ */ C("div", {
784
- className: Y("content"),
785
- children: [
786
- /* @__PURE__ */ S("strong", {
787
- className: Y("title"),
788
- children: i(s, "StatePanel title")
789
- }),
790
- a === void 0 ? null : /* @__PURE__ */ S("div", {
791
- className: Y("description"),
792
- children: a
793
- }),
794
- t === void 0 ? null : /* @__PURE__ */ S("div", {
795
- className: Y("action"),
796
- children: t
797
- })
798
- ]
788
+ children: [f === void 0 ? null : /* @__PURE__ */ S("span", {
789
+ "aria-hidden": "true",
790
+ className: Y("icon"),
791
+ children: /* @__PURE__ */ S(e, {
792
+ decorative: !0,
793
+ name: f
799
794
  })
800
- ]
795
+ }), /* @__PURE__ */ C("div", {
796
+ className: Y("content"),
797
+ children: [
798
+ /* @__PURE__ */ S("strong", {
799
+ className: Y("title"),
800
+ children: i(s, "StatePanel title")
801
+ }),
802
+ a === void 0 ? null : /* @__PURE__ */ S("div", {
803
+ className: Y("description"),
804
+ children: a
805
+ }),
806
+ t === void 0 ? null : /* @__PURE__ */ S("div", {
807
+ className: Y("action"),
808
+ children: t
809
+ })
810
+ ]
811
+ })]
801
812
  });
802
813
  }, Ue = {
803
814
  root: "rly_Field-module__root",
@@ -807,6 +818,7 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
807
818
  error: "rly_Field-module__error",
808
819
  controlSlot: "rly_Field-module__controlSlot",
809
820
  control: "rly_Field-module__control",
821
+ dense: "rly_Field-module__dense",
810
822
  compact: "rly_Field-module__compact",
811
823
  defaultSize: "rly_Field-module__defaultSize"
812
824
  }, X = (e) => o(Ue, e), We = [
@@ -823,17 +835,22 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
823
835
  "select",
824
836
  "textarea"
825
837
  ]), Ke = c({ size: {
838
+ dense: {
839
+ className: X("dense"),
840
+ purpose: "Tool-density form controls; the default",
841
+ tokens: ["control-height-dense", "radius-tag"]
842
+ },
826
843
  compact: {
827
844
  className: X("compact"),
828
845
  purpose: "Dense form rows",
829
- tokens: ["space-40", "type-meta"]
846
+ tokens: ["control-height-compact", "type-meta"]
830
847
  },
831
848
  default: {
832
849
  className: X("defaultSize"),
833
850
  purpose: "Standard form controls",
834
- tokens: ["space-48", "type-label"]
851
+ tokens: ["control-height-default", "type-label"]
835
852
  }
836
- } }), qe = c({ size: "default" }), Je = ({ children: e, className: t, controlId: n, description: o, error: c, label: l, required: d = !1, size: f = qe.size, ...p }) => {
853
+ } }), qe = c({ size: "dense" }), Je = ({ children: e, className: t, controlId: n, description: o, error: c, label: l, required: d = !1, size: f = qe.size, ...p }) => {
837
854
  let m = v(), h = n ?? `rly-field-${m}`, g = `${h}-label`, _ = o === void 0 ? void 0 : `${h}-description`, y = c === void 0 ? void 0 : `${h}-error`, b = {
838
855
  "aria-describedby": [_, y].filter((e) => e !== void 0).join(" ") || void 0,
839
856
  "aria-errormessage": y,
@@ -1015,4 +1032,4 @@ var w = /* @__PURE__ */ new WeakMap(), T = /* @__PURE__ */ new WeakMap(), E = m(
1015
1032
  //#endregion
1016
1033
  export { fe as A, U as C, B as D, me as E, P as F, F as I, ne as L, re as M, A as N, se as O, ie as P, N as R, ge as S, V as T, we as _, qe as a, be as b, ze as c, Fe as d, Le as f, Te as g, Ne as h, Je as i, j, oe as k, He as l, Ae as m, $e as n, Ke as o, je as p, Qe as r, Be as s, tt as t, Ie as u, Ce as v, ve as w, G as x, xe as y, M as z };
1017
1034
 
1018
- //# sourceMappingURL=Dialog-_t9OodCK.js.map
1035
+ //# sourceMappingURL=Dialog-B9Ub_gMT.js.map