@sdxc/ui 2026.11.10 → 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 (196) hide show
  1. package/README.md +92 -45
  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/feature-band.d.ts +8 -0
  143. package/dist/landing/feature-band.js +9 -3
  144. package/dist/landing/index.d.ts +9 -0
  145. package/dist/landing/index.js +9 -0
  146. package/dist/landing/landing-header.js +15 -4
  147. package/dist/landing/mixins/countdown-tick.d.ts +29 -0
  148. package/dist/landing/mixins/countdown-tick.js +65 -0
  149. package/dist/landing/mixins/usage-estimate-live.d.ts +32 -0
  150. package/dist/landing/mixins/usage-estimate-live.js +120 -0
  151. package/dist/landing/phone-fan.d.ts +38 -0
  152. package/dist/landing/phone-fan.js +89 -0
  153. package/dist/landing/phone-frame.d.ts +48 -0
  154. package/dist/landing/phone-frame.js +41 -0
  155. package/dist/landing/price-list.d.ts +68 -0
  156. package/dist/landing/price-list.js +125 -0
  157. package/dist/landing/scroll-scene.d.ts +59 -0
  158. package/dist/landing/scroll-scene.js +70 -0
  159. package/dist/landing/sponsor-wall.d.ts +30 -6
  160. package/dist/landing/sponsor-wall.js +70 -14
  161. package/dist/landing/typed-terminal.d.ts +24 -6
  162. package/dist/landing/typed-terminal.js +22 -14
  163. package/dist/landing/usage-estimate.d.ts +127 -0
  164. package/dist/landing/usage-estimate.js +164 -0
  165. package/dist/landing/utils/countdown.d.ts +33 -0
  166. package/dist/landing/utils/countdown.js +42 -0
  167. package/dist/landing/utils/pause-toggle.d.ts +2 -1
  168. package/dist/mixins/character-count.d.ts +62 -0
  169. package/dist/mixins/character-count.js +139 -0
  170. package/dist/mixins/index.d.ts +6 -2
  171. package/dist/mixins/index.js +6 -2
  172. package/dist/mixins/invoker-fields.d.ts +18 -0
  173. package/dist/mixins/invoker-fields.js +60 -0
  174. package/dist/mixins/media-sync.d.ts +58 -0
  175. package/dist/mixins/media-sync.js +102 -0
  176. package/dist/mixins/menu-keys.d.ts +11 -0
  177. package/dist/mixins/menu-keys.js +79 -70
  178. package/dist/mixins/sortable.d.ts +96 -0
  179. package/dist/mixins/sortable.js +433 -0
  180. package/dist/utils/code-lines.d.ts +26 -0
  181. package/dist/utils/code-lines.js +29 -0
  182. package/dist/utils/file-icon.d.ts +31 -0
  183. package/dist/utils/file-icon.js +60 -0
  184. package/dist/utils/index.d.ts +2 -0
  185. package/dist/utils/index.js +2 -0
  186. package/dist/utils/write-cookie.d.ts +15 -15
  187. package/dist/utils/write-cookie.js +10 -16
  188. package/dist/video/index.d.ts +11 -0
  189. package/dist/video/index.js +11 -0
  190. package/dist/video/mixins/video-player-sync.d.ts +27 -0
  191. package/dist/video/mixins/video-player-sync.js +413 -0
  192. package/dist/video/utils/timeline.d.ts +55 -0
  193. package/dist/video/utils/timeline.js +90 -0
  194. package/dist/video/video-player.d.ts +261 -0
  195. package/dist/video/video-player.js +927 -0
  196. package/package.json +6 -3
@@ -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
+ }
@@ -0,0 +1,32 @@
1
+ /**
2
+ * Why JS: re-pricing while a reader types or drags needs input events, a debounce and a frame
3
+ * reload, which a GET form cannot do on its own. No-JS baseline: the form submits by GET and
4
+ * the page renders the bill for the new query.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { MixinFactory } from "remix/component";
10
+ /** Types for {@link usageEstimateLive}. */
11
+ export declare namespace UsageEstimateLiveMixin {
12
+ /** Configuration for {@link usageEstimateLive}, read on every event. */
13
+ interface Options {
14
+ /**
15
+ * Loads the bill for `src`, the form's path with its current query. When the newest
16
+ * reload behind a submit rejects, the form submits natively and the page loads the bill.
17
+ */
18
+ reload: (src: string) => Promise<unknown>;
19
+ /** Milliseconds of quiet after the last input before the bill is requested. */
20
+ delay: number;
21
+ }
22
+ }
23
+ /**
24
+ * Applied inside a calculator's GET form: once the fields go quiet for `delay`, and on a
25
+ * submit from Enter or an unnamed button, it reloads the bill for the form's query; a named
26
+ * button still loads the page. Only the newest request moves the address (`replaceState`).
27
+ *
28
+ * @example <span hidden mix={[usageEstimateLive({ reload: (src) => frame.reload({ src }), delay: 250 })]} />
29
+ */
30
+ export declare const usageEstimateLive: MixinFactory<HTMLElement, [
31
+ options: UsageEstimateLiveMixin.Options
32
+ ]>;
@@ -0,0 +1,120 @@
1
+ /**
2
+ * Why JS: re-pricing while a reader types or drags needs input events, a debounce and a frame
3
+ * reload, which a GET form cannot do on its own. No-JS baseline: the form submits by GET and
4
+ * the page renders the bill for the new query.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import { createMixin } from "remix/component";
10
+ /**
11
+ * Applied inside a calculator's GET form: once the fields go quiet for `delay`, and on a
12
+ * submit from Enter or an unnamed button, it reloads the bill for the form's query; a named
13
+ * button still loads the page. Only the newest request moves the address (`replaceState`).
14
+ *
15
+ * @example <span hidden mix={[usageEstimateLive({ reload: (src) => frame.reload({ src }), delay: 250 })]} />
16
+ */
17
+ export const usageEstimateLive = createMixin((handle) => {
18
+ let options;
19
+ let controller;
20
+ handle.addEventListener("insert", (event) => {
21
+ controller?.abort();
22
+ controller = new AbortController();
23
+ let form = event.node.closest("form");
24
+ if (form !== null)
25
+ follow(form, () => options, controller.signal);
26
+ });
27
+ handle.addEventListener("remove", () => {
28
+ controller?.abort();
29
+ controller = undefined;
30
+ });
31
+ return (next) => {
32
+ options = next;
33
+ };
34
+ });
35
+ /**
36
+ * Listens to `form` until `signal` aborts, reading the latest options on each event so a
37
+ * re-rendered island's new callback is the one used.
38
+ *
39
+ * @param form The calculator's GET form.
40
+ * @param current Returns the options in force.
41
+ * @param signal Ends the listeners and any pending timer.
42
+ */
43
+ function follow(form, current, signal) {
44
+ let timer;
45
+ /** Counts requests, so only the newest one moves the address or falls back to a submit. */
46
+ let latest = 0;
47
+ signal.addEventListener("abort", () => clearTimeout(timer));
48
+ /**
49
+ * Reloads the bill for the form's query and moves the address to it once it has landed.
50
+ * A request a newer one overtook settles without touching the address, and its failure
51
+ * is swallowed, since the newer request owns the bill.
52
+ */
53
+ let price = async () => {
54
+ let request = ++latest;
55
+ let options = current();
56
+ if (options === undefined)
57
+ throw new Error("usageEstimateLive has no options");
58
+ let target = addressOf(form);
59
+ try {
60
+ await options.reload(`${target.pathname}${target.search}`);
61
+ }
62
+ catch (error) {
63
+ if (request === latest)
64
+ throw error;
65
+ return;
66
+ }
67
+ if (signal.aborted || request !== latest)
68
+ return;
69
+ let { history, location } = form.ownerDocument.defaultView ?? window;
70
+ let next = `${target.pathname}${target.search}${location.hash}`;
71
+ if (next !== `${location.pathname}${location.search}${location.hash}`) {
72
+ history.replaceState(history.state, "", next);
73
+ }
74
+ };
75
+ /** Waits for the reader to pause, then prices the form if its values are valid. */
76
+ let schedule = () => {
77
+ clearTimeout(timer);
78
+ timer = setTimeout(() => {
79
+ if (form.checkValidity())
80
+ price().catch(() => undefined);
81
+ }, current()?.delay ?? 0);
82
+ };
83
+ form.addEventListener("input", schedule, { signal });
84
+ form.addEventListener("change", schedule, { signal });
85
+ form.addEventListener("submit", (event) => {
86
+ if (event.defaultPrevented || carriesValue(event.submitter))
87
+ return;
88
+ event.preventDefault();
89
+ clearTimeout(timer);
90
+ price().catch(() => form.submit());
91
+ }, { signal });
92
+ }
93
+ /**
94
+ * The address a GET submission of `form` would load: its action with the fields as the query.
95
+ *
96
+ * @param form The calculator's GET form.
97
+ * @returns The action URL with its query replaced by the form's values.
98
+ */
99
+ function addressOf(form) {
100
+ let url = new URL(form.action, form.ownerDocument.baseURI);
101
+ let query = new URLSearchParams();
102
+ for (let [name, value] of new FormData(form)) {
103
+ if (typeof value === "string")
104
+ query.append(name, value);
105
+ }
106
+ url.search = query.toString();
107
+ return url;
108
+ }
109
+ /**
110
+ * Whether a submit came from a button with its own `name`, such as "Add monitor". Its value is
111
+ * something the fields don't hold and may change which fields the form has, so the page has
112
+ * to render it; Enter, `requestSubmit()` and an unnamed button only re-price.
113
+ *
114
+ * @param submitter The element that submitted the form, if any.
115
+ * @returns `true` when the submit must reach the server as a page load.
116
+ */
117
+ function carriesValue(submitter) {
118
+ return ((submitter instanceof HTMLButtonElement || submitter instanceof HTMLInputElement) &&
119
+ submitter.name !== "");
120
+ }
@@ -0,0 +1,38 @@
1
+ /**
2
+ * Three phones on a landing stage: the front screen readable, two more fanned behind it
3
+ * once the column is wide enough, floating on staggered bobs inside a pausable loop.
4
+ *
5
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
6
+ * @copyright Sergio Xalambrí 2026
7
+ */
8
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
9
+ /**
10
+ * Prop types for {@link PhoneFan}.
11
+ */
12
+ export declare namespace PhoneFan {
13
+ /**
14
+ * Props accepted by {@link PhoneFan}.
15
+ */
16
+ interface Props extends TagProps<"div"> {
17
+ /** Accessible name of the stage as a whole. */
18
+ label: string;
19
+ /** Accessible name of the pause toggle. Forwarded to {@link MotionLoop}. */
20
+ pauseLabel?: string;
21
+ /** Phone behind the front on the inline start, tilted out. */
22
+ start: RemixNode;
23
+ /** Leading phone in the middle of the fan. */
24
+ front: RemixNode;
25
+ /** Phone behind the front on the inline end, tilted out. */
26
+ end: RemixNode;
27
+ }
28
+ }
29
+ /**
30
+ * Lays three phone screens as a fan: side phones hide on a narrow column and tilt out from
31
+ * `md`, all floating on staggered bobs that {@link MotionLoop} can pause.
32
+ *
33
+ * @param handle Runtime handle carrying the host `<div>`'s props.
34
+ * @returns The render function producing the stage.
35
+ * @example
36
+ * <PhoneFan label={t("phones.label")} pauseLabel={t("pause")} start={left} front={hero} end={right} />
37
+ */
38
+ export declare function PhoneFan(handle: Handle<PhoneFan.Props>): () => import("remix/component").RemixElement;
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { keyframes } from "@sdxc/u/animation";
3
+ import { raw } from "@sdxc/u/general";
4
+ import { hidden, hstack } from "@sdxc/u/layout";
5
+ import { at, motionSafe } from "@sdxc/u/responsive";
6
+ import { MotionLoop } from "./motion-loop.js";
7
+ /** Container the fan queries so side phones appear only when the stage has room. */
8
+ const FAN_CONTAINER = "ui-landing-phone-fan";
9
+ /**
10
+ * A slow bob that keeps a phone feeling held. Delay offsets neighbours so they never rise
11
+ * together; reduced-motion visitors see the rest pose.
12
+ *
13
+ * @param name Unique keyframe name for this bob.
14
+ * @param delay Negative delay so the loop is mid-cycle on first paint.
15
+ * @param rise How far the host lifts at the peak.
16
+ * @param rotate Resting tilt kept through the motion so float does not flatten it.
17
+ */
18
+ function bob(name, delay, rise, rotate) {
19
+ return [
20
+ keyframes(name, {
21
+ "0%, 100%": { translate: "0 0", rotate },
22
+ "50%": { translate: `0 ${rise}`, rotate },
23
+ }),
24
+ motionSafe(raw({
25
+ animationName: name,
26
+ animationDuration: "5.5s",
27
+ animationTimingFunction: "ease-in-out",
28
+ animationIterationCount: "infinite",
29
+ animationDelay: delay,
30
+ })),
31
+ ];
32
+ }
33
+ /**
34
+ * Lays three phone screens as a fan: side phones hide on a narrow column and tilt out from
35
+ * `md`, all floating on staggered bobs that {@link MotionLoop} can pause.
36
+ *
37
+ * @param handle Runtime handle carrying the host `<div>`'s props.
38
+ * @returns The render function producing the stage.
39
+ * @example
40
+ * <PhoneFan label={t("phones.label")} pauseLabel={t("pause")} start={left} front={hero} end={right} />
41
+ */
42
+ export function PhoneFan(handle) {
43
+ return () => {
44
+ let { end, front, label, mix, pauseLabel, start, ...rest } = handle.props;
45
+ return (_jsx(MotionLoop, { pauseLabel: pauseLabel, mix: mix, ...rest, children: _jsx("div", { role: "img", "aria-label": label, "data-slot": "phone-fan", mix: [
46
+ raw({
47
+ "--phone": "min(14rem, 58cqi)",
48
+ position: "relative",
49
+ isolation: "isolate",
50
+ overflow: "visible",
51
+ paddingBlock: "0.75rem 1.25rem",
52
+ containerType: "inline-size",
53
+ containerName: FAN_CONTAINER,
54
+ }),
55
+ ], children: _jsxs("div", { "data-slot": "phone-fan-row", mix: [hstack({ gap: 0, align: "start", justify: "center" })], children: [_jsx(FannedPhone, { side: "start", children: start }), _jsx("div", { "data-slot": "phone-fan-front", mix: [
56
+ raw({
57
+ inlineSize: "var(--phone)",
58
+ flexShrink: "0",
59
+ zIndex: "1",
60
+ transformOrigin: "50% 100%",
61
+ }),
62
+ bob("ui-phone-fan-front", "-0.4s", "-0.55rem", "-1.5deg"),
63
+ ], children: front }), _jsx(FannedPhone, { side: "end", children: end })] }) }) }));
64
+ };
65
+ }
66
+ /**
67
+ * A phone tilted out from behind the front screen once the stage is wide enough; on a
68
+ * narrow column the front phone stands alone. The tilt is baked into its bob so the float
69
+ * never erases it.
70
+ */
71
+ function FannedPhone(handle) {
72
+ return () => {
73
+ let start = handle.props.side === "start";
74
+ let rotate = start ? "-7deg" : "7deg";
75
+ return (_jsx("div", { "data-slot": "phone-fan-side", "data-side": handle.props.side, mix: [
76
+ hidden(),
77
+ at("md", FAN_CONTAINER, raw({
78
+ display: "block",
79
+ flexShrink: "0",
80
+ inlineSize: "var(--phone)",
81
+ marginBlockStart: "calc(var(--phone) * 0.18)",
82
+ marginInline: start ? "0 calc(var(--phone) * -0.12)" : "calc(var(--phone) * -0.12) 0",
83
+ scale: "0.86",
84
+ transformOrigin: start ? "100% 0%" : "0% 0%",
85
+ })),
86
+ at("md", FAN_CONTAINER, bob(start ? "ui-phone-fan-start" : "ui-phone-fan-end", start ? "-1.2s" : "-2.8s", "-0.4rem", rotate)),
87
+ ], children: handle.props.children }));
88
+ };
89
+ }
@@ -0,0 +1,48 @@
1
+ /**
2
+ * Hardware chrome for a phone screenshot or live screen on a landing: an ink bezel in the
3
+ * proportions of a tall capture, and the screen's rounded corners, at the width the column
4
+ * gives it. Pair with {@link PhoneFan} when several screens share a stage.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { UtilityMixin } from "@sdxc/u";
10
+ import type { Handle, Props as TagProps, RemixNode } from "remix/component";
11
+ /**
12
+ * Prop types for {@link PhoneFrame}.
13
+ */
14
+ export declare namespace PhoneFrame {
15
+ /**
16
+ * Props accepted by {@link PhoneFrame}.
17
+ */
18
+ interface Props extends TagProps<"div"> {
19
+ /**
20
+ * Bezel fill. Defaults to `var(--app-bezel)` so a page can paint every phone from one
21
+ * token, then to {@link DEFAULT_BEZEL} when that token is unset.
22
+ */
23
+ bezel?: string;
24
+ /** The screen: a capture, a `picture`, or live UI, clipped with {@link screenCorners}. */
25
+ children: RemixNode;
26
+ }
27
+ }
28
+ /**
29
+ * The bezel around a phone screen. The capture carries its own status bar, so the frame
30
+ * adds only the hardware rim.
31
+ *
32
+ * @param handle Runtime handle carrying the host `<div>`'s props.
33
+ * @returns The render function producing the bezel.
34
+ * @example
35
+ * <PhoneFrame bezel="#1a0830">
36
+ * <img src={shot} alt={t("phone.alt")} mix={[screenCorners()]} />
37
+ * </PhoneFrame>
38
+ */
39
+ export declare function PhoneFrame(handle: Handle<PhoneFrame.Props>): () => import("remix/component").RemixElement;
40
+ /**
41
+ * The corners of the screen inside a {@link PhoneFrame}, for the element that holds the
42
+ * capture, so the picture itself clips and the bezel hugs it.
43
+ *
44
+ * @returns A `css()` mixin for the screen element.
45
+ * @example
46
+ * <img src={shot} alt="" mix={[screenCorners()]} />
47
+ */
48
+ export declare function screenCorners(): UtilityMixin;
@@ -0,0 +1,41 @@
1
+ import { jsx as _jsx } from "remix/component/jsx-runtime";
2
+ import { raw, mergeMix } from "@sdxc/u/general";
3
+ import { is, p } from "@sdxc/u/size";
4
+ /** Fallback ink when the page has not set `--app-bezel`. */
5
+ const DEFAULT_BEZEL = "#161412";
6
+ /**
7
+ * The bezel around a phone screen. The capture carries its own status bar, so the frame
8
+ * adds only the hardware rim.
9
+ *
10
+ * @param handle Runtime handle carrying the host `<div>`'s props.
11
+ * @returns The render function producing the bezel.
12
+ * @example
13
+ * <PhoneFrame bezel="#1a0830">
14
+ * <img src={shot} alt={t("phone.alt")} mix={[screenCorners()]} />
15
+ * </PhoneFrame>
16
+ */
17
+ export function PhoneFrame(handle) {
18
+ return () => {
19
+ let { bezel, children, mix, ...rest } = handle.props;
20
+ return (_jsx("div", { ...rest, "data-slot": "phone-frame", mix: mergeMix([
21
+ is("full"),
22
+ p(1.5),
23
+ raw({
24
+ backgroundColor: bezel ?? `var(--app-bezel, ${DEFAULT_BEZEL})`,
25
+ borderRadius: "15% / 7%",
26
+ boxShadow: "inset 0 0 0 1px rgb(255 255 255 / 0.12)",
27
+ }),
28
+ ], mix), children: children }));
29
+ };
30
+ }
31
+ /**
32
+ * The corners of the screen inside a {@link PhoneFrame}, for the element that holds the
33
+ * capture, so the picture itself clips and the bezel hugs it.
34
+ *
35
+ * @returns A `css()` mixin for the screen element.
36
+ * @example
37
+ * <img src={shot} alt="" mix={[screenCorners()]} />
38
+ */
39
+ export function screenCorners() {
40
+ return raw({ overflow: "hidden", borderRadius: "12.5% / 5.8%" });
41
+ }
@@ -0,0 +1,68 @@
1
+ /**
2
+ * A menu or price list for a landing: named groups of items, each a name joined to its price
3
+ * by a dotted leader, with a line of description under it. Groups flow into as many columns
4
+ * as the band's width holds, so the same list reads as a board on a desk and a column on a phone.
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 PriceList}.
12
+ */
13
+ export declare namespace PriceList {
14
+ /**
15
+ * Props accepted by {@link PriceList}.
16
+ */
17
+ interface Props extends TagProps<"div"> {
18
+ /**
19
+ * Narrowest a column gets, as a CSS length; the list fits as many columns as clear it.
20
+ *
21
+ * @default "18rem"
22
+ */
23
+ columnWidth?: string;
24
+ /** One or more {@link PriceList.Group} elements. */
25
+ children: RemixNode;
26
+ }
27
+ /**
28
+ * Props accepted by {@link PriceList.Group}.
29
+ */
30
+ interface GroupProps extends Omit<TagProps<"div">, "title"> {
31
+ /** The group's name, rendered as a heading at the ambient level. */
32
+ title: RemixNode;
33
+ /** A line under the title, such as when the group is served. */
34
+ description?: RemixNode;
35
+ /** One or more {@link PriceList.Item} elements. */
36
+ children: RemixNode;
37
+ }
38
+ /**
39
+ * Props accepted by {@link PriceList.Item}.
40
+ */
41
+ interface ItemProps extends Omit<TagProps<"li">, "children"> {
42
+ /** What the item is called. */
43
+ name: RemixNode;
44
+ /** The price as the reader should see it, currency included. */
45
+ price: RemixNode;
46
+ /** A short line under the name: what is in it, or how it is sold. */
47
+ children?: RemixNode;
48
+ }
49
+ }
50
+ /**
51
+ * Lays its groups into columns that each stay at least `columnWidth` wide, starting every
52
+ * group at the top of its cell so a short group keeps its own height. Server markup and CSS
53
+ * alone; group titles rule off in `--ui-landing-hairline`, set in `--ui-landing-display-weight`.
54
+ *
55
+ * @param handle Runtime handle carrying the host `<div>`'s props.
56
+ * @returns The render function producing the list's markup.
57
+ * @example
58
+ * <PriceList>
59
+ * <PriceList.Group title="Bread">
60
+ * <PriceList.Item name="Country sourdough" price="$9">Two-day ferment, 900 g</PriceList.Item>
61
+ * </PriceList.Group>
62
+ * </PriceList>
63
+ */
64
+ export declare function PriceList(handle: Handle<PriceList.Props>): () => import("remix/component").RemixElement;
65
+ export declare namespace PriceList {
66
+ var Group: (handle: Handle<PriceList.GroupProps>) => () => import("remix/component").RemixElement;
67
+ var Item: (handle: Handle<PriceList.ItemProps>) => () => import("remix/component").RemixElement;
68
+ }
@@ -0,0 +1,125 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "remix/component/jsx-runtime";
2
+ import { mergeMix, raw } from "@sdxc/u/general";
3
+ import { Heading } from "../components/heading.js";
4
+ /** Narrowest a group's column gets before the list drops to fewer columns. */
5
+ const DEFAULT_COLUMN_WIDTH = "18rem";
6
+ /**
7
+ * Lays its groups into columns that each stay at least `columnWidth` wide, starting every
8
+ * group at the top of its cell so a short group keeps its own height. Server markup and CSS
9
+ * alone; group titles rule off in `--ui-landing-hairline`, set in `--ui-landing-display-weight`.
10
+ *
11
+ * @param handle Runtime handle carrying the host `<div>`'s props.
12
+ * @returns The render function producing the list's markup.
13
+ * @example
14
+ * <PriceList>
15
+ * <PriceList.Group title="Bread">
16
+ * <PriceList.Item name="Country sourdough" price="$9">Two-day ferment, 900 g</PriceList.Item>
17
+ * </PriceList.Group>
18
+ * </PriceList>
19
+ */
20
+ export function PriceList(handle) {
21
+ return () => {
22
+ let { columnWidth, mix, ...rest } = handle.props;
23
+ let width = columnWidth ?? DEFAULT_COLUMN_WIDTH;
24
+ return (_jsx("div", { ...rest, "data-slot": "price-list", mix: mergeMix([
25
+ raw({
26
+ display: "grid",
27
+ gridTemplateColumns: `repeat(auto-fit, minmax(min(100%, ${width}), 1fr))`,
28
+ alignItems: "start",
29
+ columnGap: "clamp(2rem, 5cqi, 4rem)",
30
+ rowGap: "2.5rem",
31
+ }),
32
+ ], mix) }));
33
+ };
34
+ }
35
+ /**
36
+ * One named group: its heading, an optional line under it, then the items as a list.
37
+ *
38
+ * @param handle Runtime handle carrying the title, description and items.
39
+ * @returns The render function producing the group's markup.
40
+ * @example
41
+ * <PriceList.Group title="Pastry" description="From 7 am">
42
+ * <PriceList.Item name="Butter croissant" price="$4.25" />
43
+ * </PriceList.Group>
44
+ */
45
+ PriceList.Group = function PriceListGroup(handle) {
46
+ return () => {
47
+ let { children, description, mix, title, ...rest } = handle.props;
48
+ return (_jsxs("div", { ...rest, "data-slot": "price-list-group", mix: mergeMix([raw({ display: "flex", flexDirection: "column", gap: "1rem" })], mix), children: [_jsxs("div", { mix: [
49
+ raw({
50
+ display: "flex",
51
+ flexDirection: "column",
52
+ gap: "0.25rem",
53
+ paddingBlockEnd: "0.625rem",
54
+ borderBlockEnd: "1px solid var(--ui-landing-hairline, var(--ui-neutral-border))",
55
+ }),
56
+ ], children: [_jsx(Heading, { "data-slot": "price-list-title", mix: [
57
+ raw({
58
+ margin: "0",
59
+ fontFamily: "var(--ui-font-display)",
60
+ fontSize: "1.375rem",
61
+ lineHeight: "1.2",
62
+ fontWeight: "var(--ui-landing-display-weight, 700)",
63
+ color: "var(--ui-neutral-fg-emphasis)",
64
+ }),
65
+ ], children: title }), description ? (_jsx("p", { mix: [
66
+ raw({
67
+ margin: "0",
68
+ fontSize: "0.875rem",
69
+ lineHeight: "1.4",
70
+ color: "var(--ui-neutral-fg-muted)",
71
+ }),
72
+ ], children: description })) : null] }), _jsx("ul", { mix: [
73
+ raw({
74
+ listStyle: "none",
75
+ margin: "0",
76
+ padding: "0",
77
+ display: "flex",
78
+ flexDirection: "column",
79
+ gap: "1rem",
80
+ }),
81
+ ], children: children })] }));
82
+ };
83
+ };
84
+ /**
85
+ * One item: the name and the price on a shared baseline with a dotted leader filling the gap,
86
+ * and the description under them. A long name wraps before it pushes the price off the row.
87
+ *
88
+ * @param handle Runtime handle carrying the name, price and description.
89
+ * @returns The render function producing the item's markup.
90
+ * @example <PriceList.Item name="Seeded rye" price="$10">Sunflower, flax and pumpkin seeds.</PriceList.Item>
91
+ */
92
+ PriceList.Item = function PriceListItem(handle) {
93
+ return () => {
94
+ let { children, mix, name, price, ...rest } = handle.props;
95
+ return (_jsxs("li", { ...rest, "data-slot": "price-list-item", mix: mergeMix([raw({ display: "flex", flexDirection: "column", gap: "0.25rem" })], mix), children: [_jsxs("span", { mix: [
96
+ raw({
97
+ display: "flex",
98
+ alignItems: "baseline",
99
+ gap: "0.5rem",
100
+ fontWeight: "600",
101
+ color: "var(--ui-neutral-fg-emphasis)",
102
+ }),
103
+ ], children: [_jsx("span", { "data-slot": "price-list-name", mix: [raw({ minInlineSize: "0" })], children: name }), _jsx("span", { "aria-hidden": "true", "data-slot": "price-list-leader", mix: [
104
+ raw({
105
+ flex: "1 1 1.5rem",
106
+ minInlineSize: "1.5rem",
107
+ borderBlockEnd: "2px dotted var(--ui-neutral-border)",
108
+ transform: "translateY(-0.25em)",
109
+ }),
110
+ ] }), _jsx("span", { "data-slot": "price-list-price", mix: [
111
+ raw({
112
+ flexShrink: "0",
113
+ fontVariantNumeric: "tabular-nums",
114
+ whiteSpace: "nowrap",
115
+ }),
116
+ ], children: price })] }), children ? (_jsx("span", { "data-slot": "price-list-description", mix: [
117
+ raw({
118
+ fontSize: "0.9375rem",
119
+ lineHeight: "1.45",
120
+ color: "var(--ui-neutral-fg)",
121
+ textWrap: "pretty",
122
+ }),
123
+ ], children: children })) : null] }));
124
+ };
125
+ };