@sdxc/ui 2026.11.11 → 2026.11.14

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 (191) hide show
  1. package/README.md +89 -44
  2. package/dist/app/app-shell-toggle.d.ts +2 -0
  3. package/dist/app/app-shell-toggle.js +5 -2
  4. package/dist/app/app-shell.d.ts +25 -1
  5. package/dist/app/app-shell.js +73 -38
  6. package/dist/app/auto-refresh.d.ts +2 -0
  7. package/dist/app/auto-refresh.js +3 -3
  8. package/dist/app/behaviors/refresh-schedule.d.ts +8 -3
  9. package/dist/app/behaviors/refresh-schedule.js +4 -3
  10. package/dist/app/board.d.ts +123 -0
  11. package/dist/app/board.js +224 -0
  12. package/dist/app/chart.d.ts +2 -2
  13. package/dist/app/chart.js +7 -3
  14. package/dist/app/check-runs.d.ts +116 -0
  15. package/dist/app/check-runs.js +201 -0
  16. package/dist/app/code-view.d.ts +172 -0
  17. package/dist/app/code-view.js +414 -0
  18. package/dist/app/command-palette.d.ts +38 -3
  19. package/dist/app/command-palette.js +53 -5
  20. package/dist/app/contribution-graph.d.ts +106 -0
  21. package/dist/app/contribution-graph.js +289 -0
  22. package/dist/app/detail-sheet.d.ts +7 -0
  23. package/dist/app/detail-sheet.js +7 -7
  24. package/dist/app/diff.d.ts +200 -0
  25. package/dist/app/diff.js +702 -0
  26. package/dist/app/filter-bar.d.ts +20 -0
  27. package/dist/app/filter-bar.js +35 -15
  28. package/dist/app/filter-menu.d.ts +144 -0
  29. package/dist/app/filter-menu.js +480 -0
  30. package/dist/app/gantt.d.ts +108 -0
  31. package/dist/app/gantt.js +420 -0
  32. package/dist/app/index.d.ts +19 -0
  33. package/dist/app/index.js +19 -0
  34. package/dist/app/log-viewer.d.ts +120 -0
  35. package/dist/app/log-viewer.js +384 -0
  36. package/dist/app/merge-box.d.ts +97 -0
  37. package/dist/app/merge-box.js +227 -0
  38. package/dist/app/mixins/app-shell-controls.d.ts +4 -1
  39. package/dist/app/mixins/app-shell-controls.js +64 -4
  40. package/dist/app/mixins/auto-refresh.d.ts +5 -2
  41. package/dist/app/mixins/auto-refresh.js +9 -3
  42. package/dist/app/mixins/close-popover-on-submit.d.ts +16 -0
  43. package/dist/app/mixins/close-popover-on-submit.js +32 -0
  44. package/dist/app/mixins/code-view-selection.d.ts +60 -0
  45. package/dist/app/mixins/code-view-selection.js +276 -0
  46. package/dist/app/mixins/command-palette.d.ts +15 -4
  47. package/dist/app/mixins/command-palette.js +94 -6
  48. package/dist/app/mixins/contribution-graph-keys.d.ts +19 -0
  49. package/dist/app/mixins/contribution-graph-keys.js +155 -0
  50. package/dist/app/mixins/diff-interactions.d.ts +72 -0
  51. package/dist/app/mixins/diff-interactions.js +269 -0
  52. package/dist/app/mixins/filter-menu-keys.d.ts +41 -0
  53. package/dist/app/mixins/filter-menu-keys.js +91 -0
  54. package/dist/app/mixins/gantt-today.d.ts +17 -0
  55. package/dist/app/mixins/gantt-today.js +50 -0
  56. package/dist/app/mixins/log-viewer.d.ts +29 -0
  57. package/dist/app/mixins/log-viewer.js +333 -0
  58. package/dist/app/mixins/optimistic-toggle-sync.d.ts +5 -0
  59. package/dist/app/mixins/optimistic-toggle-sync.js +25 -1
  60. package/dist/app/mixins/save-bar-sync.d.ts +7 -1
  61. package/dist/app/mixins/save-bar-sync.js +23 -4
  62. package/dist/app/mixins/save-status-sync.js +23 -1
  63. package/dist/app/mixins/split-view.js +1 -1
  64. package/dist/app/mixins/submit-on-close.d.ts +17 -0
  65. package/dist/app/mixins/submit-on-close.js +52 -0
  66. package/dist/app/mixins/tree-filter.d.ts +44 -0
  67. package/dist/app/mixins/tree-filter.js +111 -0
  68. package/dist/app/mixins/tree-navigation.d.ts +50 -0
  69. package/dist/app/mixins/tree-navigation.js +216 -0
  70. package/dist/app/optimistic-toggle.d.ts +8 -0
  71. package/dist/app/optimistic-toggle.js +3 -2
  72. package/dist/app/page-header.d.ts +18 -3
  73. package/dist/app/page-header.js +105 -50
  74. package/dist/app/review-thread.d.ts +115 -0
  75. package/dist/app/review-thread.js +116 -0
  76. package/dist/app/save-bar.d.ts +5 -0
  77. package/dist/app/save-bar.js +1 -1
  78. package/dist/app/settings-layout.d.ts +5 -0
  79. package/dist/app/settings-layout.js +5 -5
  80. package/dist/app/skeleton.d.ts +9 -0
  81. package/dist/app/skeleton.js +28 -0
  82. package/dist/app/split-view.d.ts +4 -0
  83. package/dist/app/split-view.js +3 -3
  84. package/dist/app/styles/code-tokens.d.ts +24 -0
  85. package/dist/app/styles/code-tokens.js +47 -0
  86. package/dist/app/tab-bar.d.ts +59 -0
  87. package/dist/app/tab-bar.js +111 -0
  88. package/dist/app/tree.d.ts +111 -14
  89. package/dist/app/tree.js +202 -15
  90. package/dist/app/utils/ansi.d.ts +55 -0
  91. package/dist/app/utils/ansi.js +157 -0
  92. package/dist/app/utils/diff-rows.d.ts +82 -0
  93. package/dist/app/utils/diff-rows.js +209 -0
  94. package/dist/app/utils/fuzzy-path.d.ts +58 -0
  95. package/dist/app/utils/fuzzy-path.js +202 -0
  96. package/dist/app/utils/line-range.d.ts +48 -0
  97. package/dist/app/utils/line-range.js +61 -0
  98. package/dist/app/utils/log-lines.d.ts +107 -0
  99. package/dist/app/utils/log-lines.js +170 -0
  100. package/dist/app/utils/tree-filter.d.ts +19 -0
  101. package/dist/app/utils/tree-filter.js +26 -0
  102. package/dist/app/view-options.d.ts +2 -0
  103. package/dist/app/view-options.js +2 -2
  104. package/dist/chat/activity.d.ts +72 -0
  105. package/dist/chat/activity.js +184 -0
  106. package/dist/chat/composer-submit.d.ts +38 -0
  107. package/dist/chat/composer-submit.js +44 -0
  108. package/dist/chat/composer.d.ts +47 -0
  109. package/dist/chat/composer.js +100 -0
  110. package/dist/chat/index.d.ts +6 -0
  111. package/dist/chat/index.js +6 -0
  112. package/dist/chat/mixins/composer-send.d.ts +32 -0
  113. package/dist/chat/mixins/composer-send.js +121 -0
  114. package/dist/chat/mixins/reveal-stream.d.ts +68 -0
  115. package/dist/chat/mixins/reveal-stream.js +184 -0
  116. package/dist/chat/mixins/stream-target.d.ts +18 -0
  117. package/dist/chat/mixins/stream-target.js +38 -0
  118. package/dist/components/button.js +7 -1
  119. package/dist/components/character-count.d.ts +44 -0
  120. package/dist/components/character-count.js +68 -0
  121. package/dist/components/index.d.ts +2 -0
  122. package/dist/components/index.js +2 -0
  123. package/dist/components/label-chip.d.ts +42 -0
  124. package/dist/components/label-chip.js +86 -0
  125. package/dist/components/property-list.d.ts +9 -2
  126. package/dist/components/property-list.js +11 -6
  127. package/dist/components/textarea.js +6 -1
  128. package/dist/components/timeline.d.ts +62 -5
  129. package/dist/components/timeline.js +124 -5
  130. package/dist/docs/code-block.js +8 -31
  131. package/dist/docs/file-tree.js +3 -48
  132. package/dist/landing/case-study.d.ts +79 -0
  133. package/dist/landing/case-study.js +162 -0
  134. package/dist/landing/contributor-wall.d.ts +72 -0
  135. package/dist/landing/contributor-wall.js +129 -0
  136. package/dist/landing/countdown.d.ts +88 -0
  137. package/dist/landing/countdown.js +91 -0
  138. package/dist/landing/episode-player.d.ts +87 -0
  139. package/dist/landing/episode-player.js +113 -0
  140. package/dist/landing/faq-band.d.ts +3 -2
  141. package/dist/landing/faq-band.js +4 -3
  142. package/dist/landing/index.d.ts +7 -0
  143. package/dist/landing/index.js +7 -0
  144. package/dist/landing/landing-header.js +15 -4
  145. package/dist/landing/mixins/countdown-tick.d.ts +29 -0
  146. package/dist/landing/mixins/countdown-tick.js +65 -0
  147. package/dist/landing/mixins/usage-estimate-live.d.ts +32 -0
  148. package/dist/landing/mixins/usage-estimate-live.js +120 -0
  149. package/dist/landing/phone-frame.d.ts +2 -1
  150. package/dist/landing/price-list.d.ts +68 -0
  151. package/dist/landing/price-list.js +125 -0
  152. package/dist/landing/scroll-scene.d.ts +59 -0
  153. package/dist/landing/scroll-scene.js +70 -0
  154. package/dist/landing/sponsor-wall.d.ts +30 -6
  155. package/dist/landing/sponsor-wall.js +70 -14
  156. package/dist/landing/typed-terminal.d.ts +24 -6
  157. package/dist/landing/typed-terminal.js +22 -14
  158. package/dist/landing/usage-estimate.d.ts +127 -0
  159. package/dist/landing/usage-estimate.js +164 -0
  160. package/dist/landing/utils/countdown.d.ts +33 -0
  161. package/dist/landing/utils/countdown.js +42 -0
  162. package/dist/landing/utils/pause-toggle.d.ts +2 -1
  163. package/dist/mixins/character-count.d.ts +62 -0
  164. package/dist/mixins/character-count.js +139 -0
  165. package/dist/mixins/index.d.ts +6 -2
  166. package/dist/mixins/index.js +6 -2
  167. package/dist/mixins/invoker-fields.d.ts +18 -0
  168. package/dist/mixins/invoker-fields.js +60 -0
  169. package/dist/mixins/media-sync.d.ts +58 -0
  170. package/dist/mixins/media-sync.js +102 -0
  171. package/dist/mixins/menu-keys.d.ts +11 -0
  172. package/dist/mixins/menu-keys.js +79 -70
  173. package/dist/mixins/sortable.d.ts +96 -0
  174. package/dist/mixins/sortable.js +433 -0
  175. package/dist/utils/code-lines.d.ts +26 -0
  176. package/dist/utils/code-lines.js +29 -0
  177. package/dist/utils/file-icon.d.ts +31 -0
  178. package/dist/utils/file-icon.js +60 -0
  179. package/dist/utils/index.d.ts +2 -0
  180. package/dist/utils/index.js +2 -0
  181. package/dist/utils/write-cookie.d.ts +15 -15
  182. package/dist/utils/write-cookie.js +10 -16
  183. package/dist/video/index.d.ts +11 -0
  184. package/dist/video/index.js +11 -0
  185. package/dist/video/mixins/video-player-sync.d.ts +27 -0
  186. package/dist/video/mixins/video-player-sync.js +413 -0
  187. package/dist/video/utils/timeline.d.ts +55 -0
  188. package/dist/video/utils/timeline.js +90 -0
  189. package/dist/video/video-player.d.ts +261 -0
  190. package/dist/video/video-player.js +927 -0
  191. package/package.json +6 -3
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { visuallyHidden } from "@sdxc/u/a11y";
3
+ import { raw } from "@sdxc/u/general";
4
+ import { motionReduce } from "@sdxc/u/responsive";
5
+ import { when } from "@sdxc/u/state";
6
+ import { clientEntry } from "remix/component";
7
+ import { characterCount, characterCountState, countCharacters, isRingHidden, } from "../mixins/character-count.js";
8
+ export { countCharacters } from "../mixins/character-count.js";
9
+ /** How many characters left show the number when `warn` is omitted. */
10
+ const DEFAULT_WARN = 20;
11
+ /**
12
+ * Renders the ring and its number. The ring sits in a fixed box and scales up for the
13
+ * warning, so the controls beside it never move; past ten over, only the number remains.
14
+ * The island loads from `@sdxc/ui/character-count`, which the browser entry maps.
15
+ *
16
+ * @example
17
+ * <Textarea id="draft" name="text" />
18
+ * <CharacterCount for="draft" max={280} holdSubmit
19
+ * labels={{ remaining: "{count} characters left", over: "{count} characters over" }} />
20
+ */
21
+ export const CharacterCount = clientEntry("@sdxc/ui/character-count#CharacterCount", function CharacterCount(handle) {
22
+ return () => {
23
+ let { for: field, max, value = "", warn = DEFAULT_WARN, holdSubmit = false, labels, } = handle.props;
24
+ let length = countCharacters(value);
25
+ let state = characterCountState(length, max, warn);
26
+ let left = max - length;
27
+ let shown = state === "warn" || state === "over" ? String(left) : "";
28
+ return (_jsxs("span", { "data-slot": "character-count", "data-state": state, "data-ring-hidden": isRingHidden(left) ? "" : undefined, style: `--ui-character-count-progress: ${Math.min(1, length / max)}`, mix: [
29
+ characterCount({ for: field, max, warn, holdSubmit, labels }),
30
+ raw({
31
+ "--ui-character-count-tone": "var(--ui-brand-fg)",
32
+ position: "relative",
33
+ display: "inline-grid",
34
+ placeItems: "center",
35
+ flexShrink: 0,
36
+ inlineSize: "1.875rem",
37
+ blockSize: "1.875rem",
38
+ fontSize: "0.75rem",
39
+ fontVariantNumeric: "tabular-nums",
40
+ color: "var(--ui-neutral-fg-muted)",
41
+ }),
42
+ when("&[data-state='warn']", raw({ "--ui-character-count-tone": "var(--ui-warning-fg)" })),
43
+ when("&[data-state='over']", raw({
44
+ "--ui-character-count-tone": "var(--ui-danger-fg)",
45
+ color: "var(--ui-danger-fg)",
46
+ })),
47
+ ], children: [_jsxs("svg", { viewBox: "0 0 20 20", "aria-hidden": "true", "data-character-count-ring": "", mix: [
48
+ raw({
49
+ gridArea: "1 / 1",
50
+ inlineSize: "1.25rem",
51
+ blockSize: "1.25rem",
52
+ transform: "rotate(-90deg)",
53
+ transition: "scale 150ms ease-out, opacity 150ms ease-out",
54
+ }),
55
+ when("[data-state='warn'] > &, [data-state='over'] > &", raw({ scale: "1.4" })),
56
+ when("[data-ring-hidden] > &", raw({ opacity: "0" })),
57
+ motionReduce(raw({ transition: "none" })),
58
+ ], children: [_jsx("circle", { cx: "10", cy: "10", r: "8", fill: "none", "stroke-width": "2", mix: [raw({ stroke: "var(--ui-neutral-border)" })] }), _jsx("circle", { cx: "10", cy: "10", r: "8", fill: "none", "stroke-width": "2", "stroke-linecap": "round", pathLength: "100", "stroke-dasharray": "100", mix: [
59
+ raw({
60
+ stroke: "var(--ui-character-count-tone)",
61
+ strokeDashoffset: "calc(100 - var(--ui-character-count-progress, 0) * 100)",
62
+ transition: "stroke-dashoffset 120ms linear, stroke 150ms",
63
+ }),
64
+ when("[data-state='empty'] > svg > &", raw({ opacity: "0" })),
65
+ motionReduce(raw({ transition: "none" })),
66
+ ] })] }), _jsx("span", { "aria-hidden": "true", "data-character-count-number": "", mix: [raw({ gridArea: "1 / 1", lineHeight: "1" })], children: shown }), _jsx("span", { role: "status", "data-character-count-status": "", mix: [visuallyHidden()] })] }));
67
+ };
68
+ });
@@ -18,6 +18,7 @@ export * from "./button.js";
18
18
  export * from "./calendar.js";
19
19
  export * from "./card.js";
20
20
  export * from "./carousel.js";
21
+ export * from "./character-count.js";
21
22
  export * from "./checkbox-group.js";
22
23
  export * from "./checkbox.js";
23
24
  export * from "./combobox.js";
@@ -44,6 +45,7 @@ export * from "./image-placeholder.js";
44
45
  export * from "./input.js";
45
46
  export * from "./item.js";
46
47
  export * from "./keyboard.js";
48
+ export * from "./label-chip.js";
47
49
  export * from "./label.js";
48
50
  export * from "./link-button.js";
49
51
  export * from "./link.js";
@@ -18,6 +18,7 @@ export * from "./button.js";
18
18
  export * from "./calendar.js";
19
19
  export * from "./card.js";
20
20
  export * from "./carousel.js";
21
+ export * from "./character-count.js";
21
22
  export * from "./checkbox-group.js";
22
23
  export * from "./checkbox.js";
23
24
  export * from "./combobox.js";
@@ -44,6 +45,7 @@ export * from "./image-placeholder.js";
44
45
  export * from "./input.js";
45
46
  export * from "./item.js";
46
47
  export * from "./keyboard.js";
48
+ export * from "./label-chip.js";
47
49
  export * from "./label.js";
48
50
  export * from "./link-button.js";
49
51
  export * from "./link.js";
@@ -0,0 +1,42 @@
1
+ /**
2
+ * A label an issue, pull request or record carries, drawn as a small pill in the label's own
3
+ * colour. Any colour goes in and the text stays readable on its tint in light and dark, so
4
+ * labels whose colours people pick themselves never need a hand-tuned text colour.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
10
+ /**
11
+ * Prop types for {@link LabelChip}.
12
+ */
13
+ export declare namespace LabelChip {
14
+ /**
15
+ * How the colour shows: `pill` tints the whole chip and its text, `dot` keeps a neutral
16
+ * outlined chip with the colour in a dot before the name, for dense rows.
17
+ */
18
+ type Variant = "pill" | "dot";
19
+ /** Every native `<span>` attribute plus the label's colour and look. */
20
+ interface Props extends TagProps<"span"> {
21
+ /** Any CSS colour (`#d73a4a`, `oklch(0.63 0.19 25)`), as the label was defined. */
22
+ color?: string;
23
+ /** A hue in degrees, used when `color` is absent; it stands for a mid-tone colour. */
24
+ hue?: number;
25
+ /** @default "pill" */
26
+ variant?: Variant;
27
+ /** The label's name. */
28
+ children?: RemixNode;
29
+ }
30
+ }
31
+ /**
32
+ * Renders the chip as plain HTML and CSS. A pill derives tint, border and text from the colour at
33
+ * fixed OKLCH lightness through `light-dark()`, so text clears 4.5:1 for every hue in the page's
34
+ * `color-scheme`; the dot variant reads neutral roles. Rules read the colour from `--ui-label-chip-color`.
35
+ *
36
+ * @param handle Runtime handle carrying the host `<span>`'s props.
37
+ * @returns The render function producing the chip's markup.
38
+ * @example <LabelChip color="#d73a4a">bug</LabelChip>
39
+ * @example <LabelChip hue={150}>{t("labels.feature")}</LabelChip>
40
+ * @example <LabelChip variant="dot" color={label.color}>{label.name}</LabelChip>
41
+ */
42
+ export declare function LabelChip(handle: Handle<LabelChip.Props>): () => import("remix/component").RemixElement;
@@ -0,0 +1,86 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { mergeMix, raw } from "@sdxc/u/general";
3
+ import { inlineFlex, items, shrink } from "@sdxc/u/layout";
4
+ import { nowrap } from "@sdxc/u/typography";
5
+ import { mergeStyle } from "../utils/merge-style.js";
6
+ /** Custom property carrying the label's colour to every rule that derives from it. */
7
+ const COLOR_PROPERTY = "--ui-label-chip-color";
8
+ /** The label's colour as the rules read it. */
9
+ const COLOR = `var(${COLOR_PROPERTY})`;
10
+ /** Lightness of the colour a `hue` stands for: a mid-tone, which both themes derive from well. */
11
+ const HUE_LIGHTNESS = 0.62;
12
+ /** Chroma of the colour a `hue` stands for. */
13
+ const HUE_CHROMA = 0.15;
14
+ /** The colour a label without `color` or `hue` takes: a quiet grey. */
15
+ const DEFAULT_COLOR = "oklch(0.62 0 0)";
16
+ /**
17
+ * Renders the chip as plain HTML and CSS. A pill derives tint, border and text from the colour at
18
+ * fixed OKLCH lightness through `light-dark()`, so text clears 4.5:1 for every hue in the page's
19
+ * `color-scheme`; the dot variant reads neutral roles. Rules read the colour from `--ui-label-chip-color`.
20
+ *
21
+ * @param handle Runtime handle carrying the host `<span>`'s props.
22
+ * @returns The render function producing the chip's markup.
23
+ * @example <LabelChip color="#d73a4a">bug</LabelChip>
24
+ * @example <LabelChip hue={150}>{t("labels.feature")}</LabelChip>
25
+ * @example <LabelChip variant="dot" color={label.color}>{label.name}</LabelChip>
26
+ */
27
+ export function LabelChip(handle) {
28
+ return () => {
29
+ let { children, color, hue, mix, style, variant = "pill", ...rest } = handle.props;
30
+ let resolved = color ?? (hue === undefined ? DEFAULT_COLOR : hueColor(hue));
31
+ let dot = variant === "dot";
32
+ return (_jsxs("span", { ...rest, "data-slot": "label-chip", "data-variant": variant, style: mergeStyle(style, { [COLOR_PROPERTY]: resolved }), mix: mergeMix([
33
+ inlineFlex(),
34
+ items("center"),
35
+ nowrap(),
36
+ raw({
37
+ gap: "0.3125rem",
38
+ blockSize: "1.25rem",
39
+ paddingInline: "0.4375rem",
40
+ boxSizing: "border-box",
41
+ borderWidth: "1px",
42
+ borderStyle: "solid",
43
+ borderRadius: "999px",
44
+ fontSize: "0.75rem",
45
+ lineHeight: "1rem",
46
+ }),
47
+ dot ? dotRules() : pillRules(),
48
+ ], mix), children: [dot ? (_jsx("span", { "aria-hidden": "true", "data-slot": "label-chip-dot", mix: [
49
+ shrink(0),
50
+ raw({
51
+ inlineSize: "0.5rem",
52
+ blockSize: "0.5rem",
53
+ borderRadius: "999px",
54
+ backgroundColor: COLOR,
55
+ }),
56
+ ] })) : null, children] }));
57
+ };
58
+ }
59
+ /** The colour a hue stands for. */
60
+ function hueColor(hue) {
61
+ return `oklch(${HUE_LIGHTNESS} ${HUE_CHROMA} ${hue})`;
62
+ }
63
+ /**
64
+ * Re-derives the label's colour at one lightness and capped chroma. Fixing lightness is
65
+ * what holds contrast for any hue; capping chroma keeps the result inside sRGB, where
66
+ * clipping would shift its lightness.
67
+ */
68
+ function derive(lightness, chroma) {
69
+ return `oklch(from ${COLOR} ${lightness} min(c, ${chroma}) h)`;
70
+ }
71
+ /** A pill's tint, border and text, one pair of lightnesses per theme. */
72
+ function pillRules() {
73
+ return raw({
74
+ fontWeight: 500,
75
+ backgroundColor: `light-dark(${derive(0.95, 0.05)}, ${derive(0.3, 0.07)})`,
76
+ borderColor: `light-dark(${derive(0.85, 0.09)}, ${derive(0.42, 0.1)})`,
77
+ color: `light-dark(${derive(0.42, 0.14)}, ${derive(0.86, 0.1)})`,
78
+ });
79
+ }
80
+ /** The dot variant's neutral outline and text, which the page's theme already makes readable. */
81
+ function dotRules() {
82
+ return raw({
83
+ borderColor: "var(--ui-neutral-border)",
84
+ color: "var(--ui-neutral-fg)",
85
+ });
86
+ }
@@ -27,7 +27,8 @@ export declare namespace PropertyList {
27
27
  }
28
28
  /**
29
29
  * Makes a row editable in place: its value becomes a button that opens a popover
30
- * anchored under it, holding whatever form the app renders as `content`.
30
+ * anchored under it, holding whatever form the app renders as `content`, or the app's
31
+ * own popover given as `popover`.
31
32
  */
32
33
  interface Edit {
33
34
  /** Id of the popover, which the value button targets. */
@@ -35,7 +36,13 @@ export declare namespace PropertyList {
35
36
  /** What the button does, read before the current value, such as "Edit assignee". */
36
37
  label: string;
37
38
  /** The popover's content: the app's form, its described options and its submit. */
38
- content: RemixNode;
39
+ content?: RemixNode;
40
+ /**
41
+ * A whole popover whose `id` is `id`, drawn in place of the row's own and its `content`,
42
+ * such as a `FilterMenu.Popover` picker for a multi-value property; the value button
43
+ * still opens it and anchors it under the row.
44
+ */
45
+ popover?: RemixNode;
39
46
  }
40
47
  /** Every native `<div>` attribute the row's group accepts, plus its label and value. */
41
48
  interface ItemProps extends Omit<TagProps<"div">, "children"> {
@@ -73,9 +73,9 @@ export function PropertyList(handle) {
73
73
  };
74
74
  }
75
75
  /**
76
- * Renders one property. In the rows variant the label column holds
77
- * `--ui-property-list-label-width` (9rem) from a 22rem container up and stacks above the
78
- * value below it; a value-less row names its emptiness in muted text.
76
+ * Renders one property. In the rows variant the label column holds `--ui-property-list-label-width`
77
+ * (9rem) from a 22rem container up and stacks over the value below that; an empty row says so.
78
+ * With `edit`, the value opens a Popover API popover with no script: the row's own or `popover`.
79
79
  *
80
80
  * @param handle Runtime handle carrying the group `<div>`'s props.
81
81
  * @returns The render function producing the row's markup.
@@ -89,6 +89,11 @@ export function PropertyList(handle) {
89
89
  * >
90
90
  * {assignee?.name}
91
91
  * </PropertyList.Item>
92
+ * @example
93
+ * <PropertyList.Item label="Labels" empty="None yet"
94
+ * edit={{ id: "edit-labels", label: "Edit labels", popover: <FilterMenu.Popover id="edit-labels" {...picker} /> }}>
95
+ * {chips}
96
+ * </PropertyList.Item>
92
97
  */
93
98
  PropertyList.Item = function PropertyListItem(handle) {
94
99
  return () => {
@@ -142,8 +147,8 @@ PropertyList.Item = function PropertyListItem(handle) {
142
147
  };
143
148
  /**
144
149
  * The editable value: a full-width button naming its action before the current value,
145
- * and the popover it opens. The button is the popover's invoker, which makes it the
146
- * popover's implicit anchor, so the form opens directly under its row.
150
+ * and the popover it opens, the row's own or the app's. The button is the popover's
151
+ * invoker, which makes it the popover's implicit anchor, so it opens under its row.
147
152
  *
148
153
  * @param handle Runtime handle carrying the edit description and the rendered value.
149
154
  * @returns The render function producing the button and its popover.
@@ -170,6 +175,6 @@ function PropertyEdit(handle) {
170
175
  transition("background-color"),
171
176
  hover(bg("neutral.tint")),
172
177
  focusVisible(outline({ color: "brand.ring", width: 2, offset: -2 })),
173
- ], children: [_jsxs("span", { mix: [flex(), items("center"), gap(1.5), raw({ flexWrap: "wrap" }), minIs(0)], children: [_jsx("span", { mix: [visuallyHidden()], children: `${edit.label}: ` }), children] }), _jsx(ChevronDownIcon, { size: 14, "aria-hidden": "true", mix: [shrink(0), fg("neutral.muted")] })] }), _jsx(Popover, { id: edit.id, placement: "bottom-start", role: "dialog", "aria-label": edit.label, "data-slot": "property-popover", mix: [p(3), is("min(20rem, calc(100vw - 2rem))"), text("sm")], children: edit.content })] }));
178
+ ], children: [_jsxs("span", { mix: [flex(), items("center"), gap(1.5), raw({ flexWrap: "wrap" }), minIs(0)], children: [_jsx("span", { mix: [visuallyHidden()], children: `${edit.label}: ` }), children] }), _jsx(ChevronDownIcon, { size: 14, "aria-hidden": "true", mix: [shrink(0), fg("neutral.muted")] })] }), edit.popover ?? (_jsx(Popover, { id: edit.id, placement: "bottom-start", role: "dialog", "aria-label": edit.label, "data-slot": "property-popover", mix: [p(3), is("min(20rem, calc(100vw - 2rem))"), text("sm")], children: edit.content }))] }));
174
179
  };
175
180
  }
@@ -75,7 +75,12 @@ export function TextArea(handle) {
75
75
  resize: "block",
76
76
  fieldSizing: "content",
77
77
  }),
78
- when("&:focus", outline("none")),
78
+ /**
79
+ * Pointer focus drops the platform outline and keyboard focus keeps the ring above:
80
+ * `outline: none` is a shorthand, and from a later cascade layer it would reset the
81
+ * ring's color, width and style at once.
82
+ */
83
+ when("&:focus:not(:focus-visible)", outline("none")),
79
84
  ], mix) }));
80
85
  };
81
86
  }
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * A record's activity as an ordered list: a 2px rail threading 16px event icons toned by
3
- * what happened, one line per event (avatar, bold actor, muted verb, time), an optional
4
- * comment card, and a native `<details>` folding a run of quiet events into "N more".
3
+ * what happened, one line per event, comment cards with an author header and reactions,
4
+ * grouped commits, and a native `<details>` folding a run of quiet events into "N more".
5
5
  *
6
6
  * @author [Sergio Xalambrí](https://sergiodxa.com)
7
7
  * @copyright Sergio Xalambrí 2026
@@ -33,6 +33,51 @@ export declare namespace Timeline {
33
33
  /** What happened, in muted text after the actor: "resolved the incident". */
34
34
  children?: RemixNode;
35
35
  }
36
+ /** Every native `<li>` attribute, plus the comment's parts. */
37
+ interface CommentProps extends Omit<TagProps<"li">, "children"> {
38
+ /** The author's avatar, set on the rail in place of an icon. */
39
+ avatar: RemixNode;
40
+ /** The author's name, set in bold at the start of the card's header. */
41
+ author: RemixNode;
42
+ /** The muted verb after the name: "commented", "reviewed". */
43
+ action?: RemixNode;
44
+ /** When it was written: a `RelativeTime` or plain text. */
45
+ time?: RemixNode;
46
+ /** A `⋯` menu trigger, drawn at the end of the header. */
47
+ menu?: RemixNode;
48
+ /** Reactions or other controls, drawn in a row under the body. */
49
+ reactions?: RemixNode;
50
+ /** The rendered Markdown body. */
51
+ children: RemixNode;
52
+ }
53
+ /** Every native `<li>` attribute, plus the summary line and its commits. */
54
+ interface CommitsProps extends Omit<TagProps<"li">, "children"> {
55
+ /** A 16px glyph for the group, such as a commit icon. */
56
+ icon: RemixNode;
57
+ /** A small avatar of the pusher, shown before the name. */
58
+ avatar?: RemixNode;
59
+ /** Who pushed, set in bold. */
60
+ actor?: RemixNode;
61
+ /** What happened, muted: "added 3 commits". */
62
+ summary?: RemixNode;
63
+ /** When the push happened. */
64
+ time?: RemixNode;
65
+ /** The {@link Timeline.Commit} rows. */
66
+ children: RemixNode;
67
+ }
68
+ /** Every native `<li>` attribute, plus the commit's parts. */
69
+ interface CommitProps extends Omit<TagProps<"li">, "children"> {
70
+ /** The commit's short sha, set in monospace at the end of the row. */
71
+ sha: string;
72
+ /** The commit's page; links the subject and the sha. */
73
+ href?: string;
74
+ /** A small avatar of the author. */
75
+ avatar?: RemixNode;
76
+ /** The commit's checks, such as a toned status icon with its accessible name. */
77
+ check?: RemixNode;
78
+ /** The commit's subject line. */
79
+ children: RemixNode;
80
+ }
36
81
  /** Every native `<li>` attribute, plus the folded events. */
37
82
  interface MoreProps extends Omit<TagProps<"li">, "children"> {
38
83
  /** The disclosure's label, such as "4 more events". */
@@ -44,9 +89,9 @@ export declare namespace Timeline {
44
89
  }
45
90
  }
46
91
  /**
47
- * Renders the `<ol>` and its rail. The rail is drawn once, behind every icon from the
48
- * first to the last, so a folded run keeps the line continuous when it opens; icons sit on
49
- * the page's background, `--ui-timeline-surface`, which masks the rail where they meet it.
92
+ * Renders the `<ol>` and its rail, drawn once behind every icon so an opened fold keeps the line
93
+ * whole; icons and {@link Timeline.Comment} cards sit on `--ui-timeline-surface`, masking the rail,
94
+ * in a `--ui-timeline-icon-box` square. {@link Timeline.Commits} groups a push; all of it is HTML.
50
95
  *
51
96
  * @param handle Runtime handle carrying the `<ol>`'s props.
52
97
  * @returns The render function producing the list's markup.
@@ -59,9 +104,21 @@ export declare namespace Timeline {
59
104
  * commented
60
105
  * </Timeline.Event>
61
106
  * </Timeline>
107
+ * @example
108
+ * <Timeline aria-label={t("pull.conversation")}>
109
+ * <Timeline.Comment id="comment-12" avatar={<Avatar size="xs" />} author="ana" action={t("pull.commented")} time={<RelativeTime date={at} />}>
110
+ * <Markdown source={body} />
111
+ * </Timeline.Comment>
112
+ * <Timeline.Commits icon={<GitCommitHorizontalIcon />} actor="ana" summary={t("pull.addedCommits", { count: 1 })}>
113
+ * <Timeline.Commit sha="a1b2c3d" href="/commit/a1b2c3d">Fix the parser</Timeline.Commit>
114
+ * </Timeline.Commits>
115
+ * </Timeline>
62
116
  */
63
117
  export declare function Timeline(handle: Handle<Timeline.Props>): () => import("remix/component").RemixElement;
64
118
  export declare namespace Timeline {
65
119
  var Event: (handle: Handle<Timeline.EventProps>) => () => import("remix/component").RemixElement;
66
120
  var More: (handle: Handle<Timeline.MoreProps>) => () => import("remix/component").RemixElement;
121
+ var Comment: (handle: Handle<Timeline.CommentProps>) => () => import("remix/component").RemixElement;
122
+ var Commits: (handle: Handle<Timeline.CommitsProps>) => () => import("remix/component").RemixElement;
123
+ var Commit: (handle: Handle<Timeline.CommitProps>) => () => import("remix/component").RemixElement;
67
124
  }
@@ -4,9 +4,9 @@ import { bg, border, fg, outline } from "@sdxc/u/color";
4
4
  import { rounded } from "@sdxc/u/effects";
5
5
  import { cursor, listStyle, pseudoContent, raw, mergeMix } from "@sdxc/u/general";
6
6
  import { flex, gap, grid, inlineFlex, items, justify, relative, vstack } from "@sdxc/u/layout";
7
- import { bs, is, m, minIs, p } from "@sdxc/u/size";
7
+ import { bs, is, m, minIs, p, pi } from "@sdxc/u/size";
8
8
  import { before, data, focusVisible, hover, when } from "@sdxc/u/state";
9
- import { leading, text, weight } from "@sdxc/u/typography";
9
+ import { font, leading, text, truncate, weight } from "@sdxc/u/typography";
10
10
  /** The side of the square each event's icon sits centred in; the rail runs through its middle. */
11
11
  const ICON_BOX = "var(--ui-timeline-icon-box, 1.5rem)";
12
12
  /** Tone an event's icon takes when `tone` is left unset. */
@@ -25,9 +25,9 @@ function rowTrack() {
25
25
  ];
26
26
  }
27
27
  /**
28
- * Renders the `<ol>` and its rail. The rail is drawn once, behind every icon from the
29
- * first to the last, so a folded run keeps the line continuous when it opens; icons sit on
30
- * the page's background, `--ui-timeline-surface`, which masks the rail where they meet it.
28
+ * Renders the `<ol>` and its rail, drawn once behind every icon so an opened fold keeps the line
29
+ * whole; icons and {@link Timeline.Comment} cards sit on `--ui-timeline-surface`, masking the rail,
30
+ * in a `--ui-timeline-icon-box` square. {@link Timeline.Commits} groups a push; all of it is HTML.
31
31
  *
32
32
  * @param handle Runtime handle carrying the `<ol>`'s props.
33
33
  * @returns The render function producing the list's markup.
@@ -40,6 +40,15 @@ function rowTrack() {
40
40
  * commented
41
41
  * </Timeline.Event>
42
42
  * </Timeline>
43
+ * @example
44
+ * <Timeline aria-label={t("pull.conversation")}>
45
+ * <Timeline.Comment id="comment-12" avatar={<Avatar size="xs" />} author="ana" action={t("pull.commented")} time={<RelativeTime date={at} />}>
46
+ * <Markdown source={body} />
47
+ * </Timeline.Comment>
48
+ * <Timeline.Commits icon={<GitCommitHorizontalIcon />} actor="ana" summary={t("pull.addedCommits", { count: 1 })}>
49
+ * <Timeline.Commit sha="a1b2c3d" href="/commit/a1b2c3d">Fix the parser</Timeline.Commit>
50
+ * </Timeline.Commits>
51
+ * </Timeline>
43
52
  */
44
53
  export function Timeline(handle) {
45
54
  return () => {
@@ -129,6 +138,116 @@ Timeline.More = function TimelineMore(handle) {
129
138
  ], children: summary })] }), _jsx("ol", { mix: [m(0), p(0), listStyle("none"), vstack({ gap: 3 })], children: children })] }) }));
130
139
  };
131
140
  };
141
+ /**
142
+ * Renders a comment as a card on the rail: the author's avatar sits where an event's icon
143
+ * would, the header reads "name action time" with a `⋯` slot at its end, and the body and
144
+ * reactions follow. A conversation reads as cards and housekeeping as single lines.
145
+ *
146
+ * @param handle Runtime handle carrying the `<li>`'s props.
147
+ * @returns The render function producing the comment's markup.
148
+ * @example
149
+ * <Timeline.Comment id="comment-12" avatar={<Avatar size="xs" />} author="ana" action="commented" time={<RelativeTime date={at} />} menu={<CommentMenu />} reactions={<Reactions />}>
150
+ * <Markdown source={body} />
151
+ * </Timeline.Comment>
152
+ */
153
+ Timeline.Comment = function TimelineComment(handle) {
154
+ return () => {
155
+ let { avatar, author, action, time, menu, reactions, children, mix, ...rest } = handle.props;
156
+ return (_jsxs("li", { "data-slot": "timeline-comment", ...rest, mix: mergeMix(rowTrack(), mix), children: [_jsx("span", { "data-slot": "timeline-avatar", mix: [
157
+ relative(),
158
+ inlineFlex(),
159
+ items("center"),
160
+ justify("center"),
161
+ is(ICON_BOX),
162
+ bs(ICON_BOX),
163
+ rounded("full"),
164
+ bg("var(--ui-timeline-surface, var(--ui-bg, Canvas))"),
165
+ ], children: avatar }), _jsxs("div", { "data-slot": "timeline-card", mix: [
166
+ minIs(0),
167
+ rounded("md"),
168
+ border({ color: "neutral.border", width: 1 }),
169
+ bg("var(--ui-timeline-surface, var(--ui-bg, Canvas))"),
170
+ raw({ overflow: "clip" }),
171
+ ], children: [_jsxs("header", { "data-slot": "timeline-comment-header", mix: [
172
+ flex(),
173
+ items("center"),
174
+ gap(2),
175
+ pi(3),
176
+ raw({ minBlockSize: "2.5rem", paddingBlock: "0.375rem" }),
177
+ bg("neutral.tint"),
178
+ raw({ borderBlockEnd: "1px solid var(--ui-neutral-border)" }),
179
+ ], children: [_jsxs("p", { mix: [
180
+ m(0),
181
+ flex(),
182
+ items("baseline"),
183
+ raw({ flexWrap: "wrap", columnGap: "0.375rem", flex: "1 1 auto" }),
184
+ minIs(0),
185
+ leading("1.25rem"),
186
+ ], children: [_jsx("span", { "data-slot": "timeline-actor", mix: [weight("semibold")], children: author }), action ? (_jsx("span", { "data-slot": "timeline-description", mix: [fg("neutral.muted")], children: action })) : null, time ? (_jsx("span", { "data-slot": "timeline-time", mix: [fg("neutral.muted")], children: time })) : null] }), menu ? (_jsx("span", { "data-slot": "timeline-comment-menu", mix: [inlineFlex(), raw({ flexShrink: 0 })], children: menu })) : null] }), _jsx("div", { "data-slot": "timeline-comment-body", mix: [
187
+ p(3),
188
+ raw({
189
+ overflowWrap: "anywhere",
190
+ "& > :first-child": { marginBlockStart: 0 },
191
+ "& > :last-child": { marginBlockEnd: 0 },
192
+ }),
193
+ ], children: children }), reactions ? (_jsx("div", { "data-slot": "timeline-reactions", mix: [
194
+ flex(),
195
+ items("center"),
196
+ raw({ flexWrap: "wrap" }),
197
+ gap(1.5),
198
+ pi(3),
199
+ raw({ paddingBlockEnd: "0.75rem" }),
200
+ ], children: reactions })) : null] })] }));
201
+ };
202
+ };
203
+ /**
204
+ * Renders a push as one event on the rail with its commits listed under the line: each row
205
+ * gives the subject, its checks and the short sha, so a run of commits costs one rail stop.
206
+ *
207
+ * @param handle Runtime handle carrying the `<li>`'s props.
208
+ * @returns The render function producing the group's markup.
209
+ * @example
210
+ * <Timeline.Commits icon={<GitCommitHorizontalIcon />} actor="ana" summary="added 2 commits" time="3h ago">
211
+ * <Timeline.Commit sha="a1b2c3d" href="/commit/a1b2c3d" check={<CheckIcon aria-label="Checks passed" />}>Fix the parser</Timeline.Commit>
212
+ * </Timeline.Commits>
213
+ */
214
+ Timeline.Commits = function TimelineCommits(handle) {
215
+ return () => {
216
+ let { icon, avatar, actor, summary, time, children, mix, ...rest } = handle.props;
217
+ return (_jsxs("li", { "data-slot": "timeline-commits", "data-tone": "neutral", ...rest, mix: mergeMix(rowTrack(), mix), children: [_jsx(TimelineIcon, { tone: "neutral", children: icon }), _jsxs("div", { mix: [vstack({ gap: 1.5 }), minIs(0)], children: [_jsxs("p", { "data-slot": "timeline-line", mix: [
218
+ m(0),
219
+ flex(),
220
+ items("center"),
221
+ raw({ flexWrap: "wrap", minBlockSize: ICON_BOX }),
222
+ gap(1.5),
223
+ leading("1.25rem"),
224
+ ], children: [avatar ? _jsx("span", { mix: [inlineFlex()], children: avatar }) : null, actor ? (_jsx("span", { "data-slot": "timeline-actor", mix: [weight("semibold")], children: actor })) : null, summary ? (_jsx("span", { "data-slot": "timeline-description", mix: [fg("neutral.muted")], children: summary })) : null, time ? (_jsx("span", { "data-slot": "timeline-time", mix: [fg("neutral.muted"), text("xs")], children: time })) : null] }), _jsx("ol", { "data-slot": "timeline-commit-list", mix: [m(0), p(0), listStyle("none"), vstack({ gap: 0.5 })], children: children })] })] }));
225
+ };
226
+ };
227
+ /**
228
+ * Renders one commit of a {@link Timeline.Commits} group: avatar, the subject (truncated to
229
+ * one line), the check-state slot, then the short sha in monospace at the row's end.
230
+ *
231
+ * @param handle Runtime handle carrying the `<li>`'s props.
232
+ * @returns The render function producing the commit's row.
233
+ * @example <Timeline.Commit sha="a1b2c3d" href="/commit/a1b2c3d">Fix the parser</Timeline.Commit>
234
+ */
235
+ Timeline.Commit = function TimelineCommit(handle) {
236
+ return () => {
237
+ let { sha, href, avatar, check, children, mix, ...rest } = handle.props;
238
+ let linkMix = [
239
+ fg("inherit"),
240
+ raw({ textDecoration: "none" }),
241
+ hover(raw({ textDecoration: "underline" })),
242
+ ];
243
+ return (_jsxs("li", { "data-slot": "timeline-commit", ...rest, mix: mergeMix([flex(), items("center"), gap(2), minIs(0), raw({ minBlockSize: "1.75rem" })], mix), children: [avatar ? _jsx("span", { mix: [inlineFlex(), raw({ flexShrink: 0 })], children: avatar }) : null, _jsx("span", { "data-slot": "timeline-commit-subject", mix: [truncate(), raw({ flex: "0 1 auto" })], children: href ? (_jsx("a", { href: href, mix: linkMix, children: children })) : (children) }), check ? (_jsx("span", { "data-slot": "timeline-commit-check", mix: [inlineFlex(), raw({ flexShrink: 0 })], children: check })) : null, _jsx("code", { "data-slot": "timeline-commit-sha", mix: [
244
+ raw({ marginInlineStart: "auto", flexShrink: 0 }),
245
+ font("mono"),
246
+ text("xs"),
247
+ fg("neutral.muted"),
248
+ ], children: href ? (_jsx("a", { href: href, mix: linkMix, children: sha })) : (sha) })] }));
249
+ };
250
+ };
132
251
  /**
133
252
  * The icon box on the rail: the glyph in its tone, on the surface colour so the rail
134
253
  * reads as passing behind it.