@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,88 @@
1
+ /**
2
+ * The days, hours, minutes and seconds left until a launch, a sale's end or an event's doors,
3
+ * as one `<time>` naming the moment. The server renders the time left from `now`, and the
4
+ * optional island keeps it ticking from the viewer's clock, so a cached page still reads true.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { EntryComponent, Handle } from "remix/component";
10
+ import type { CountdownParts } from "./utils/countdown.js";
11
+ export { countdownParts } from "./utils/countdown.js";
12
+ /**
13
+ * Prop types for {@link Countdown} and its island.
14
+ */
15
+ export declare namespace Countdown {
16
+ /** A moment as a `Date`, an ISO 8601 string or epoch milliseconds. */
17
+ type DateInput = CountdownParts.DateInput;
18
+ /** The name printed under each unit's figure. */
19
+ interface Labels {
20
+ days: string;
21
+ hours: string;
22
+ minutes: string;
23
+ seconds: string;
24
+ }
25
+ /**
26
+ * The moment and the countdown's text. A page sets the figures in its own type from an
27
+ * ancestor: `--ui-countdown-value-font/-size/-weight/-color`, `--ui-countdown-label-font/-size`,
28
+ * `--ui-countdown-gap` and `--ui-countdown-align`, which reach the server render and the island alike.
29
+ */
30
+ interface Props {
31
+ /** The moment counted down to. */
32
+ to: DateInput;
33
+ /** The moment counted from; pass the request's time so server and tests render the same text. */
34
+ now?: DateInput;
35
+ /** Unit names, merged over the English ones. */
36
+ labels?: Partial<Labels>;
37
+ /**
38
+ * Shows the seconds unit and ticks every second; off, the minutes are the smallest unit.
39
+ *
40
+ * @default true
41
+ */
42
+ seconds?: boolean;
43
+ /** What the countdown reads once the moment has passed, such as "Doors are open". */
44
+ done: string;
45
+ /**
46
+ * Hydrates {@link CountdownLive}, which counts from the viewer's clock every second.
47
+ * Needs `@sdxc/ui/landing/countdown#CountdownLive` in the app's browser entry.
48
+ */
49
+ live?: boolean;
50
+ /** Accessible name for the `<time>`. */
51
+ "aria-label"?: string;
52
+ /** Element id for the `<time>`. */
53
+ id?: string;
54
+ }
55
+ /** Props {@link CountdownLive} serializes for hydration, so they stay plain JSON. */
56
+ interface LiveProps {
57
+ /** The moment, as an ISO 8601 string or epoch milliseconds. */
58
+ to: string | number;
59
+ /** The moment the server counted from, so the hydrated text matches its HTML. */
60
+ now: string | number;
61
+ labels: Labels;
62
+ seconds: boolean;
63
+ done: string;
64
+ /** Accessible name, passed through to the `<time>`. */
65
+ "aria-label"?: string;
66
+ /** Element id, passed through to the `<time>`. */
67
+ id?: string;
68
+ }
69
+ }
70
+ /**
71
+ * The time left from `now` as a `<time datetime>` that reads true with no script; `live` hydrates
72
+ * {@link CountdownLive} (map it in the browser entry) to tick on the viewer's clock. Type it with
73
+ * `--ui-countdown-value-{font,size,weight,color}`, `--ui-countdown-label-{font,size}` and `--ui-countdown-{gap,align}`.
74
+ *
75
+ * @param handle Runtime handle carrying the moment, the labels and the `<time>`'s props.
76
+ * @returns The render function producing the countdown.
77
+ * @example <Countdown to="2027-04-15T07:00:00Z" now={ctx.requestTime} done="Doors are open" />
78
+ * @example <Countdown to={launch} done="Live now" labels={{ days: "días" }} live />
79
+ */
80
+ export declare function Countdown(handle: Handle<Countdown.Props>): () => import("remix/component").RemixElement;
81
+ /**
82
+ * Client island behind {@link Countdown}'s `live` prop: the same `<time>` the server renders,
83
+ * ticking from the viewer's clock once it is in the document. Until the island loads, the
84
+ * server's figures stand.
85
+ *
86
+ * @example <CountdownLive to="2027-04-15T07:00:00Z" now="2026-11-13T09:00:00Z" labels={labels} seconds done="Doors are open" />
87
+ */
88
+ export declare const CountdownLive: EntryComponent<Countdown.LiveProps>;
@@ -0,0 +1,91 @@
1
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "remix/component/jsx-runtime";
2
+ import { clientEntry, css } from "remix/component";
3
+ import { countdownTick, formatUnit } from "./mixins/countdown-tick.js";
4
+ import { countdownParts } from "./utils/countdown.js";
5
+ export { countdownParts } from "./utils/countdown.js";
6
+ /** The units the countdown shows, largest first. */
7
+ const UNITS = ["days", "hours", "minutes", "seconds"];
8
+ /** The English unit names, used for any `labels` entry a page leaves out. */
9
+ const DEFAULT_LABELS = {
10
+ days: "days",
11
+ hours: "hours",
12
+ minutes: "minutes",
13
+ seconds: "seconds",
14
+ };
15
+ /**
16
+ * The time left from `now` as a `<time datetime>` that reads true with no script; `live` hydrates
17
+ * {@link CountdownLive} (map it in the browser entry) to tick on the viewer's clock. Type it with
18
+ * `--ui-countdown-value-{font,size,weight,color}`, `--ui-countdown-label-{font,size}` and `--ui-countdown-{gap,align}`.
19
+ *
20
+ * @param handle Runtime handle carrying the moment, the labels and the `<time>`'s props.
21
+ * @returns The render function producing the countdown.
22
+ * @example <Countdown to="2027-04-15T07:00:00Z" now={ctx.requestTime} done="Doors are open" />
23
+ * @example <Countdown to={launch} done="Live now" labels={{ days: "días" }} live />
24
+ */
25
+ export function Countdown(handle) {
26
+ return () => {
27
+ let { to, now, labels, seconds = true, done, live, ...rest } = handle.props;
28
+ let names = { ...DEFAULT_LABELS, ...labels };
29
+ let from = now ?? new Date();
30
+ if (live) {
31
+ return (_jsx(CountdownLive, { to: serializable(to), now: serializable(from), labels: names, seconds: seconds, done: done, ...rest }));
32
+ }
33
+ return (_jsx("time", { ...rest, dateTime: isoString(to), "data-slot": "countdown", children: _jsx(CountdownBody, { to: to, now: from, labels: names, seconds: seconds, done: done }) }));
34
+ };
35
+ }
36
+ /**
37
+ * Client island behind {@link Countdown}'s `live` prop: the same `<time>` the server renders,
38
+ * ticking from the viewer's clock once it is in the document. Until the island loads, the
39
+ * server's figures stand.
40
+ *
41
+ * @example <CountdownLive to="2027-04-15T07:00:00Z" now="2026-11-13T09:00:00Z" labels={labels} seconds done="Doors are open" />
42
+ */
43
+ export const CountdownLive = clientEntry("@sdxc/ui/landing/countdown#CountdownLive", function CountdownLive(handle) {
44
+ return () => {
45
+ let { to, now, labels, seconds, done, ...rest } = handle.props;
46
+ return (_jsx("time", { ...rest, dateTime: isoString(to), "data-slot": "countdown", mix: [countdownTick(seconds)], children: _jsx(CountdownBody, { to: to, now: now, labels: labels, seconds: seconds, done: done }) }));
47
+ };
48
+ });
49
+ /**
50
+ * The units and the done text inside the `<time>`, exactly one of the two visible at a time;
51
+ * the live island also writes `data-state` on the host as it ticks.
52
+ */
53
+ function CountdownBody(handle) {
54
+ return () => {
55
+ let { to, now, labels, seconds, done } = handle.props;
56
+ let left = countdownParts(to, now);
57
+ let units = seconds ? UNITS : UNITS.slice(0, 3);
58
+ return (_jsxs(_Fragment, { children: [_jsx("span", { "data-slot": "countdown-units", hidden: left.done, mix: css({
59
+ display: "inline-flex",
60
+ flexWrap: "wrap",
61
+ alignItems: "flex-start",
62
+ columnGap: "var(--ui-countdown-gap, 1em)",
63
+ rowGap: "0.5em",
64
+ "&[hidden]": { display: "none" },
65
+ }), children: units.map((unit) => (_jsxs("span", { "data-slot": "countdown-unit", "data-unit": unit, mix: css({
66
+ display: "inline-flex",
67
+ flexDirection: "column",
68
+ alignItems: "var(--ui-countdown-align, center)",
69
+ }), children: [_jsx("span", { "data-slot": "countdown-value", mix: css({
70
+ fontFamily: "var(--ui-countdown-value-font, inherit)",
71
+ fontVariantNumeric: "tabular-nums",
72
+ fontSize: "var(--ui-countdown-value-size, 1.5em)",
73
+ fontWeight: "var(--ui-countdown-value-weight, 600)",
74
+ lineHeight: "1",
75
+ color: "var(--ui-countdown-value-color, inherit)",
76
+ }), children: formatUnit(unit, left[unit]) }), _jsx("span", { "data-slot": "countdown-label", mix: css({
77
+ fontFamily: "var(--ui-countdown-label-font, inherit)",
78
+ fontSize: "var(--ui-countdown-label-size, 0.75em)",
79
+ lineHeight: "1.4",
80
+ }), children: labels[unit] })] }, unit))) }), _jsx("span", { "data-slot": "countdown-done", hidden: !left.done, children: done })] }));
81
+ };
82
+ }
83
+ /** The moment as an ISO string for `datetime`, empty when it does not parse. */
84
+ function isoString(value) {
85
+ let date = value instanceof Date ? value : new Date(value);
86
+ return Number.isNaN(date.getTime()) ? "" : date.toISOString();
87
+ }
88
+ /** Turns a `Date` into its ISO string so an island prop survives serialization. */
89
+ function serializable(value) {
90
+ return value instanceof Date ? value.toISOString() : value;
91
+ }
@@ -0,0 +1,87 @@
1
+ /**
2
+ * An episode player for a podcast or a read-aloud letter: the browser's own `<audio>`
3
+ * controls, a list of chapters and a timed transcript. Every time is a media-fragment link,
4
+ * so it plays from that point with no script; the island makes it seek the player instead.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
10
+ /**
11
+ * Prop types for {@link EpisodePlayer}.
12
+ */
13
+ export declare namespace EpisodePlayer {
14
+ /** One chapter: where it starts and what it is called. */
15
+ interface Chapter {
16
+ /** Seconds from the start of the audio. */
17
+ start: number;
18
+ /** The chapter's name, the link text a reader presses to play from its start. */
19
+ title: RemixNode;
20
+ }
21
+ /** One transcript passage: where it starts, who speaks, and what they say. */
22
+ interface Cue {
23
+ /** Seconds from the start of the audio. */
24
+ start: number;
25
+ /** The speaker's name, shown once at the start of the passage. */
26
+ speaker?: RemixNode;
27
+ /** What is said, set after the time link and the speaker. */
28
+ text: RemixNode;
29
+ }
30
+ /**
31
+ * Props accepted by {@link EpisodePlayer}.
32
+ */
33
+ interface Props extends Omit<TagProps<"div">, "title"> {
34
+ /** Address of the audio file; every time link appends `#t=<whole seconds>` to it. */
35
+ src: string;
36
+ /** Media type of the file, such as `audio/mpeg`, so a browser skips a format it cannot play. */
37
+ type?: string;
38
+ /** The episode's title, rendered as a heading at the surrounding level. */
39
+ title: RemixNode;
40
+ /** A line under the title, such as the number, date and running time. */
41
+ meta?: RemixNode;
42
+ /** Chapters in playing order; the list is left out when empty. */
43
+ chapters?: readonly Chapter[];
44
+ /** Transcript passages in playing order; the disclosure is left out when empty. */
45
+ transcript?: readonly Cue[];
46
+ /** Accessible name of the chapter list, such as "Chapters". */
47
+ chaptersLabel: string;
48
+ /** Visible label of the transcript disclosure, such as "Read the transcript". */
49
+ transcriptLabel: string;
50
+ /** The WebVTT captions file for the audio, which assistive technology can read out. */
51
+ captions: {
52
+ src: string;
53
+ srclang: string;
54
+ label: string;
55
+ };
56
+ /** Rendered inside `<audio>` for a browser without audio support, such as a download link. */
57
+ fallback: RemixNode;
58
+ /** A line under the player, such as a credit or a download link. */
59
+ note?: RemixNode;
60
+ }
61
+ }
62
+ /**
63
+ * Writes seconds as a clock reading: `m:ss` under an hour and `h:mm:ss` from one.
64
+ *
65
+ * @param seconds Whole or fractional seconds from the start.
66
+ * @returns The reading, such as `1:52` or `1:02:03`.
67
+ */
68
+ export declare function formatEpisodeTime(seconds: number): string;
69
+ /**
70
+ * The audio, chapter links and a closed transcript; with no script a time link opens the file
71
+ * at its moment. Map {@link EpisodeSync} (`@sdxc/ui/landing/episode-player`) in the browser entry
72
+ * to seek in place and mark what plays. `--ui-landing-hairline` colours the chapter rules.
73
+ *
74
+ * @param handle Runtime handle carrying the host `<div>`'s props.
75
+ * @returns The render function producing the player.
76
+ * @example
77
+ * <EpisodePlayer src="/audio/63.mp3" captions={{ src: "/audio/63.vtt", srclang: "en", label: "English" }} title="No. 63" chaptersLabel="Chapters" transcriptLabel="Transcript" fallback={<a href="/audio/63.mp3">Download</a>} />
78
+ * @example
79
+ * <EpisodePlayer src="/audio/63.mp3" type="audio/mpeg" captions={{ src: "/audio/63.vtt", srclang: "en", label: "English" }} title="No. 63" meta="Episode 63 · 14:20" chaptersLabel="Chapters" transcriptLabel="Read the transcript" fallback={<a href="/audio/63.mp3">Download</a>} chapters={[{ start: 0, title: "Opening" }, { start: 112, title: "Pressure" }]} transcript={[{ start: 0, speaker: "Tove", text: "This is Undercurrent." }]} />
80
+ */
81
+ export declare function EpisodePlayer(handle: Handle<EpisodePlayer.Props>): () => import("remix/component").RemixElement;
82
+ /**
83
+ * The island inside every {@link EpisodePlayer}: a hidden marker running {@link mediaSync},
84
+ * so a time link seeks and plays, and the playing chapter and passage carry `aria-current`.
85
+ * It loads from `@sdxc/ui/landing/episode-player`, which the browser entry maps to an import.
86
+ */
87
+ export declare const EpisodeSync: EntryComponent<Record<never, never>>;
@@ -0,0 +1,113 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { fg } from "@sdxc/u/color";
3
+ import { mergeMix, raw } from "@sdxc/u/general";
4
+ import { hidden } from "@sdxc/u/layout";
5
+ import { focusVisible, hover, when } from "@sdxc/u/state";
6
+ import { clientEntry } from "remix/component";
7
+ import { Heading } from "../components/heading.js";
8
+ import { mediaSync } from "../mixins/media-sync.js";
9
+ /** Translucent ink the rules draw with, the page's hairline when it sets one. */
10
+ const HAIRLINE = "var(--ui-landing-hairline, color-mix(in oklch, CanvasText 12%, transparent))";
11
+ /**
12
+ * Writes seconds as a clock reading: `m:ss` under an hour and `h:mm:ss` from one.
13
+ *
14
+ * @param seconds Whole or fractional seconds from the start.
15
+ * @returns The reading, such as `1:52` or `1:02:03`.
16
+ */
17
+ export function formatEpisodeTime(seconds) {
18
+ let total = Math.max(0, Math.floor(seconds));
19
+ let h = Math.floor(total / 3600);
20
+ let m = Math.floor((total % 3600) / 60);
21
+ let s = String(total % 60).padStart(2, "0");
22
+ return h > 0 ? `${h}:${String(m).padStart(2, "0")}:${s}` : `${m}:${s}`;
23
+ }
24
+ /** The same moment as an ISO 8601 duration, for a `<time dateTime>` attribute. */
25
+ function isoDuration(seconds) {
26
+ let total = Math.max(0, Math.floor(seconds));
27
+ return `PT${Math.floor(total / 60)}M${total % 60}S`;
28
+ }
29
+ /** Styling shared by every time link: muted tabular figures that take the brand on hover. */
30
+ function timeLink() {
31
+ return [
32
+ fg("neutral.muted"),
33
+ raw({
34
+ fontVariantNumeric: "tabular-nums",
35
+ textDecoration: "none",
36
+ borderRadius: "var(--ui-radius-xs, 0.25rem)",
37
+ }),
38
+ hover(raw({ color: "var(--ui-brand-fg)" })),
39
+ focusVisible(raw({ outline: "2px solid var(--ui-focus-ring, var(--ui-brand-fg))" })),
40
+ ];
41
+ }
42
+ /**
43
+ * The audio, chapter links and a closed transcript; with no script a time link opens the file
44
+ * at its moment. Map {@link EpisodeSync} (`@sdxc/ui/landing/episode-player`) in the browser entry
45
+ * to seek in place and mark what plays. `--ui-landing-hairline` colours the chapter rules.
46
+ *
47
+ * @param handle Runtime handle carrying the host `<div>`'s props.
48
+ * @returns The render function producing the player.
49
+ * @example
50
+ * <EpisodePlayer src="/audio/63.mp3" captions={{ src: "/audio/63.vtt", srclang: "en", label: "English" }} title="No. 63" chaptersLabel="Chapters" transcriptLabel="Transcript" fallback={<a href="/audio/63.mp3">Download</a>} />
51
+ * @example
52
+ * <EpisodePlayer src="/audio/63.mp3" type="audio/mpeg" captions={{ src: "/audio/63.vtt", srclang: "en", label: "English" }} title="No. 63" meta="Episode 63 · 14:20" chaptersLabel="Chapters" transcriptLabel="Read the transcript" fallback={<a href="/audio/63.mp3">Download</a>} chapters={[{ start: 0, title: "Opening" }, { start: 112, title: "Pressure" }]} transcript={[{ start: 0, speaker: "Tove", text: "This is Undercurrent." }]} />
53
+ */
54
+ export function EpisodePlayer(handle) {
55
+ return () => {
56
+ let { captions, chapters = [], chaptersLabel, fallback, meta, mix, note, src, title, transcript = [], transcriptLabel, type, ...rest } = handle.props;
57
+ let at = (start) => `${src}#t=${Math.floor(start)}`;
58
+ return (_jsxs("div", { ...rest, "data-slot": "episode-player", mix: mergeMix([raw({ display: "flex", flexDirection: "column", gap: "1.25rem", minInlineSize: "0" })], mix), children: [_jsxs("div", { "data-slot": "episode-player-header", children: [_jsx(Heading, { mix: [raw({ margin: "0", fontSize: "1.25rem", lineHeight: "1.3" })], children: title }), meta ? (_jsx("p", { mix: [
59
+ fg("neutral.muted"),
60
+ raw({ margin: "0.25rem 0 0", fontVariantNumeric: "tabular-nums" }),
61
+ ], children: meta })) : null] }), _jsxs("audio", { controls: true, preload: "metadata", "data-slot": "episode-player-audio", mix: [raw({ display: "block", inlineSize: "100%" })], children: [_jsx("source", { src: src, type: type }), _jsx("track", { kind: "captions", src: captions.src, srclang: captions.srclang, label: captions.label }), fallback] }), _jsx(EpisodeSync, {}), chapters.length > 0 ? (_jsx("nav", { "aria-label": chaptersLabel, "data-slot": "episode-player-chapters", children: _jsx("ol", { mix: [
62
+ raw({
63
+ margin: "0",
64
+ padding: "0",
65
+ listStyle: "none",
66
+ borderBlockStart: `1px solid ${HAIRLINE}`,
67
+ }),
68
+ ], children: chapters.map((chapter) => (_jsx("li", { mix: [raw({ borderBlockEnd: `1px solid ${HAIRLINE}` })], children: _jsxs("a", { href: at(chapter.start), "data-start": chapter.start, mix: [
69
+ raw({
70
+ display: "grid",
71
+ gridTemplateColumns: "4.5rem minmax(0, 1fr)",
72
+ gap: "1rem",
73
+ paddingBlock: "0.625rem",
74
+ color: "var(--ui-neutral-fg)",
75
+ textDecoration: "none",
76
+ }),
77
+ hover(raw({ color: "var(--ui-brand-fg)" })),
78
+ focusVisible(raw({ outline: "2px solid var(--ui-focus-ring, var(--ui-brand-fg))" })),
79
+ when('&[aria-current="true"]', raw({ color: "var(--ui-brand-fg)", fontWeight: "600" })),
80
+ ], children: [_jsx("time", { dateTime: isoDuration(chapter.start), mix: [raw({ fontVariantNumeric: "tabular-nums", opacity: "0.75" })], children: formatEpisodeTime(chapter.start) }), _jsx("span", { children: chapter.title })] }) }, chapter.start))) }) })) : null, transcript.length > 0 ? (_jsxs("details", { "data-slot": "episode-player-transcript", children: [_jsx("summary", { mix: [
81
+ raw({ cursor: "pointer", fontWeight: "600", inlineSize: "fit-content" }),
82
+ focusVisible(raw({ outline: "2px solid var(--ui-focus-ring, var(--ui-brand-fg))" })),
83
+ ], children: transcriptLabel }), _jsx("div", { mix: [
84
+ raw({
85
+ display: "flex",
86
+ flexDirection: "column",
87
+ gap: "1rem",
88
+ marginBlockStart: "1rem",
89
+ }),
90
+ ], children: transcript.map((cue) => (_jsxs("p", { "data-slot": "episode-player-cue", "data-cue": cue.start, mix: [
91
+ raw({
92
+ margin: "0",
93
+ paddingInlineStart: "0.875rem",
94
+ borderInlineStart: "2px solid transparent",
95
+ }),
96
+ when('&[aria-current="true"]', raw({ borderInlineStartColor: "var(--ui-brand-fg)" })),
97
+ ], children: [_jsx("a", { href: at(cue.start), "data-start": cue.start, mix: timeLink(), children: _jsx("time", { dateTime: isoDuration(cue.start), children: formatEpisodeTime(cue.start) }) }), " ", cue.speaker ? (_jsx("strong", { mix: [raw({ fontWeight: "600" })], children: cue.speaker })) : null, " ", cue.text] }, cue.start))) })] })) : null, note ? _jsx("p", { mix: [fg("neutral.muted"), raw({ margin: "0" })], children: note }) : null] }));
98
+ };
99
+ }
100
+ /**
101
+ * The island inside every {@link EpisodePlayer}: a hidden marker running {@link mediaSync},
102
+ * so a time link seeks and plays, and the playing chapter and passage carry `aria-current`.
103
+ * It loads from `@sdxc/ui/landing/episode-player`, which the browser entry maps to an import.
104
+ */
105
+ export const EpisodeSync = clientEntry("@sdxc/ui/landing/episode-player#EpisodeSync", function EpisodeSync() {
106
+ return () => (_jsx("span", { mix: [
107
+ hidden(),
108
+ mediaSync({
109
+ root: '[data-slot="episode-player"]',
110
+ marks: ['[data-slot="episode-player-chapters"] a', '[data-slot="episode-player-cue"]'],
111
+ }),
112
+ ] }));
113
+ });
@@ -55,8 +55,9 @@ export declare namespace FaqBand {
55
55
  }
56
56
  /**
57
57
  * Renders a FAQ band with a chapter header and one or two accordion columns.
58
- * The column host is the named sizing container; an inner wrapper holds the
59
- * `@container` tracks so the query can restyle a descendant.
58
+ * Stacked columns sit `--ui-landing-faq-gap` apart (0 by default, so hairline
59
+ * rows read as one list); a page whose questions are cards sets it to the gap
60
+ * between its cards, so the seam between columns matches every other gap.
60
61
  *
61
62
  * @param handle Runtime handle carrying the band's props.
62
63
  * @returns The render function producing the band's markup.
@@ -9,8 +9,9 @@ const DEFAULT_COLUMNS = 1;
9
9
  const DEFAULT_TONE = "plain";
10
10
  /**
11
11
  * Renders a FAQ band with a chapter header and one or two accordion columns.
12
- * The column host is the named sizing container; an inner wrapper holds the
13
- * `@container` tracks so the query can restyle a descendant.
12
+ * Stacked columns sit `--ui-landing-faq-gap` apart (0 by default, so hairline
13
+ * rows read as one list); a page whose questions are cards sets it to the gap
14
+ * between its cards, so the seam between columns matches every other gap.
14
15
  *
15
16
  * @param handle Runtime handle carrying the band's props.
16
17
  * @returns The render function producing the band's markup.
@@ -32,7 +33,7 @@ export function FaqBand(handle) {
32
33
  description: parts?.description,
33
34
  }, children: title }), _jsx("div", { "data-columns": String(resolvedColumns), mix: [container("ui-landing-faq"), parts?.columns], children: _jsx("div", { mix: [
34
35
  grid(),
35
- gap(0, 8),
36
+ gap("var(--ui-landing-faq-gap, 0px)", 8),
36
37
  gridTemplate({ columns: "minmax(0, 1fr)" }),
37
38
  isTwo
38
39
  ? at("xl", "ui-landing-faq", gridTemplate({ columns: "minmax(0, 1fr) minmax(0, 1fr)" }))
@@ -11,13 +11,17 @@ export * from "./animations/entrance.js";
11
11
  export * from "./announcement-chip.js";
12
12
  export * from "./author-band.js";
13
13
  export * from "./bento.js";
14
+ export * from "./case-study.js";
14
15
  export * from "./changelog-strip.js";
15
16
  export * from "./check-row.js";
16
17
  export * from "./closing-cta.js";
17
18
  export * from "./code-stage.js";
19
+ export * from "./contributor-wall.js";
20
+ export * from "./countdown.js";
18
21
  export * from "./crosshair.js";
19
22
  export * from "./curriculum.js";
20
23
  export * from "./drawn-chart.js";
24
+ export * from "./episode-player.js";
21
25
  export * from "./event-ticker.js";
22
26
  export * from "./fan-out-diagram.js";
23
27
  export * from "./faq-band.js";
@@ -35,11 +39,13 @@ export * from "./marquee.js";
35
39
  export * from "./motion-loop.js";
36
40
  export * from "./phone-fan.js";
37
41
  export * from "./phone-frame.js";
42
+ export * from "./price-list.js";
38
43
  export * from "./pricing-band.js";
39
44
  export * from "./product-frame.js";
40
45
  export * from "./proof-strip.js";
41
46
  export * from "./rails.js";
42
47
  export * from "./rotating-text.js";
48
+ export * from "./scroll-scene.js";
43
49
  export * from "./segmented-stage.js";
44
50
  export * from "./sequence-diagram.js";
45
51
  export * from "./site-footer.js";
@@ -52,3 +58,4 @@ export * from "./styles/card-grid.js";
52
58
  export * from "./tabbed-stage.js";
53
59
  export * from "./testimonial-band.js";
54
60
  export * from "./typed-terminal.js";
61
+ export * from "./usage-estimate.js";
@@ -11,13 +11,17 @@ export * from "./animations/entrance.js";
11
11
  export * from "./announcement-chip.js";
12
12
  export * from "./author-band.js";
13
13
  export * from "./bento.js";
14
+ export * from "./case-study.js";
14
15
  export * from "./changelog-strip.js";
15
16
  export * from "./check-row.js";
16
17
  export * from "./closing-cta.js";
17
18
  export * from "./code-stage.js";
19
+ export * from "./contributor-wall.js";
20
+ export * from "./countdown.js";
18
21
  export * from "./crosshair.js";
19
22
  export * from "./curriculum.js";
20
23
  export * from "./drawn-chart.js";
24
+ export * from "./episode-player.js";
21
25
  export * from "./event-ticker.js";
22
26
  export * from "./fan-out-diagram.js";
23
27
  export * from "./faq-band.js";
@@ -35,11 +39,13 @@ export * from "./marquee.js";
35
39
  export * from "./motion-loop.js";
36
40
  export * from "./phone-fan.js";
37
41
  export * from "./phone-frame.js";
42
+ export * from "./price-list.js";
38
43
  export * from "./pricing-band.js";
39
44
  export * from "./product-frame.js";
40
45
  export * from "./proof-strip.js";
41
46
  export * from "./rails.js";
42
47
  export * from "./rotating-text.js";
48
+ export * from "./scroll-scene.js";
43
49
  export * from "./segmented-stage.js";
44
50
  export * from "./sequence-diagram.js";
45
51
  export * from "./site-footer.js";
@@ -52,3 +58,4 @@ export * from "./styles/card-grid.js";
52
58
  export * from "./tabbed-stage.js";
53
59
  export * from "./testimonial-band.js";
54
60
  export * from "./typed-terminal.js";
61
+ export * from "./usage-estimate.js";
@@ -51,9 +51,8 @@ export function LandingHeader(handle) {
51
51
  isSplit ? splitGrid() : [],
52
52
  action ? raw({ flex: "1 1 20rem", minInlineSize: "0" }) : [],
53
53
  ], children: [eyebrow ? (_jsx(Eyebrow, { href: eyebrowHref, variant: resolvedEyebrowVariant, index: resolvedEyebrowVariant === "numbered" ? eyebrowIndex : undefined, mix: [
54
- self(isCenter ? "center" : "start"),
54
+ isSplit ? splitEyebrow() : self(isCenter ? "center" : "start"),
55
55
  raw({ marginBlockEnd: resolvedEyebrowVariant === "mono" ? "0.5rem" : "1.5rem" }),
56
- isSplit ? raw({ gridArea: "eyebrow" }) : [],
57
56
  parts?.eyebrow,
58
57
  ], children: eyebrow })) : null, _jsxs(Heading, { size: "chapter", mix: [m(0), isSplit ? raw({ gridArea: "title" }) : [], parts?.title], children: [tone === "statement" ? (_jsx("span", { "data-slot": "landing-header-statement", mix: [statement()], children: children })) : (children), subtitle ? (_jsx("span", { "data-slot": "landing-header-subtitle", mix: [raw({ display: "block", color: MUTED_TITLE })], children: subtitle })) : null] }), description ? (_jsx("p", { mix: [
59
58
  landingLead(),
@@ -81,17 +80,29 @@ export function LandingHeader(handle) {
81
80
  }
82
81
  /**
83
82
  * The split grid: eyebrow over title in the wider first column and the lead in the second,
84
- * from the header's `lg` width. Narrower headers keep the stack.
83
+ * from the header's `lg` width. The lead spans both rows and the first row takes any height
84
+ * it adds, so a lead taller than the title never pulls the eyebrow away from it.
85
85
  */
86
86
  function splitGrid() {
87
87
  return at("lg", CONTAINER, raw({
88
88
  display: "grid",
89
89
  gridTemplateColumns: "minmax(0, 1.1fr) minmax(0, 1fr)",
90
- gridTemplateAreas: '"eyebrow ." "title lead"',
90
+ gridTemplateRows: "1fr auto",
91
+ gridTemplateAreas: '"eyebrow lead" "title lead"',
91
92
  columnGap: "4rem",
92
93
  alignItems: "end",
93
94
  }));
94
95
  }
96
+ /**
97
+ * The split eyebrow: at the start of the stack on narrow headers, and from `lg` at the foot
98
+ * of the first grid row, so it rests on the title however tall the lead beside them runs.
99
+ */
100
+ function splitEyebrow() {
101
+ return [
102
+ raw({ alignSelf: "var(--ui-landing-split-eyebrow-align, start)", justifySelf: "start" }),
103
+ at("lg", CONTAINER, raw({ gridArea: "eyebrow", "--ui-landing-split-eyebrow-align": "end" })),
104
+ ];
105
+ }
95
106
  /** The split lead: in the second column, on the title's last line, at most 28rem wide. */
96
107
  function splitLead() {
97
108
  return at("lg", CONTAINER, raw({
@@ -0,0 +1,29 @@
1
+ /**
2
+ * Why JS: the time left changes every second after the page renders, and a cached page was
3
+ * rendered against an older clock. No-JS baseline: the countdown reads the time left when the
4
+ * server rendered it, and its `<time datetime>` names the moment it counts down to.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { MixinFactory } from "remix/component";
10
+ /** The units a countdown writes, matching each `data-unit` it renders. */
11
+ declare const UNITS: readonly ["days", "hours", "minutes", "seconds"];
12
+ /**
13
+ * Applied to a countdown's `<time>`: rewrites each `[data-unit] [data-slot="countdown-value"]`
14
+ * from the `datetime` and the viewer's clock as soon as it is in the document, then once a
15
+ * second, or once a minute when `seconds` is off. At zero it shows the done text and stops.
16
+ *
17
+ * @example <time dateTime={iso} mix={[countdownTick(true)]}>…</time>
18
+ */
19
+ export declare const countdownTick: MixinFactory<HTMLTimeElement, [seconds: boolean]>;
20
+ /**
21
+ * A unit's figure as the countdown prints it: days as they are, the clock units padded to two
22
+ * digits so the row keeps its width as they tick.
23
+ *
24
+ * @param unit Which unit the figure counts.
25
+ * @param value The whole units left.
26
+ * @returns The text the unit's value shows.
27
+ */
28
+ export declare function formatUnit(unit: (typeof UNITS)[number], value: number): string;
29
+ export {};
@@ -0,0 +1,65 @@
1
+ /**
2
+ * Why JS: the time left changes every second after the page renders, and a cached page was
3
+ * rendered against an older clock. No-JS baseline: the countdown reads the time left when the
4
+ * server rendered it, and its `<time datetime>` names the moment it counts down to.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { createMixin } from "remix/component";
10
+ import { countdownParts } from "../utils/countdown.js";
11
+ /** The units a countdown writes, matching each `data-unit` it renders. */
12
+ const UNITS = ["days", "hours", "minutes", "seconds"];
13
+ /**
14
+ * Applied to a countdown's `<time>`: rewrites each `[data-unit] [data-slot="countdown-value"]`
15
+ * from the `datetime` and the viewer's clock as soon as it is in the document, then once a
16
+ * second, or once a minute when `seconds` is off. At zero it shows the done text and stops.
17
+ *
18
+ * @example <time dateTime={iso} mix={[countdownTick(true)]}>…</time>
19
+ */
20
+ export const countdownTick = createMixin((handle) => {
21
+ let seconds = true;
22
+ let timer;
23
+ /** Writes the time left into the host and reports whether the countdown has more to run. */
24
+ function write(node) {
25
+ let parts = countdownParts(node.dateTime, Date.now());
26
+ for (let unit of UNITS) {
27
+ let value = node.querySelector(`[data-unit="${unit}"] [data-slot="countdown-value"]`);
28
+ if (value)
29
+ value.textContent = formatUnit(unit, parts[unit]);
30
+ }
31
+ node.dataset.state = parts.done ? "done" : "running";
32
+ let units = node.querySelector('[data-slot="countdown-units"]');
33
+ let done = node.querySelector('[data-slot="countdown-done"]');
34
+ if (units)
35
+ units.hidden = parts.done;
36
+ if (done)
37
+ done.hidden = !parts.done;
38
+ return !parts.done;
39
+ }
40
+ handle.addEventListener("insert", (event) => {
41
+ clearInterval(timer);
42
+ let node = event.node;
43
+ if (!write(node))
44
+ return;
45
+ timer = setInterval(() => {
46
+ if (!write(node))
47
+ clearInterval(timer);
48
+ }, seconds ? 1_000 : 60_000);
49
+ });
50
+ handle.addEventListener("remove", () => clearInterval(timer));
51
+ return (next) => {
52
+ seconds = next;
53
+ };
54
+ });
55
+ /**
56
+ * A unit's figure as the countdown prints it: days as they are, the clock units padded to two
57
+ * digits so the row keeps its width as they tick.
58
+ *
59
+ * @param unit Which unit the figure counts.
60
+ * @param value The whole units left.
61
+ * @returns The text the unit's value shows.
62
+ */
63
+ export function formatUnit(unit, value) {
64
+ return unit === "days" ? String(value) : String(value).padStart(2, "0");
65
+ }