@sdxc/ui 2026.11.11 → 2026.11.17

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 (204) hide show
  1. package/README.md +114 -61
  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 +20 -0
  33. package/dist/app/index.js +20 -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 +347 -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/profile-picker.d.ts +47 -0
  75. package/dist/app/profile-picker.js +104 -0
  76. package/dist/app/review-thread.d.ts +115 -0
  77. package/dist/app/review-thread.js +116 -0
  78. package/dist/app/save-bar.d.ts +5 -0
  79. package/dist/app/save-bar.js +1 -1
  80. package/dist/app/save-status.js +1 -1
  81. package/dist/app/settings-layout.d.ts +5 -0
  82. package/dist/app/settings-layout.js +5 -5
  83. package/dist/app/skeleton.d.ts +9 -0
  84. package/dist/app/skeleton.js +28 -0
  85. package/dist/app/split-view.d.ts +4 -0
  86. package/dist/app/split-view.js +3 -3
  87. package/dist/app/styles/code-tokens.d.ts +24 -0
  88. package/dist/app/styles/code-tokens.js +47 -0
  89. package/dist/app/tab-bar.d.ts +59 -0
  90. package/dist/app/tab-bar.js +111 -0
  91. package/dist/app/tree.d.ts +111 -14
  92. package/dist/app/tree.js +202 -15
  93. package/dist/app/utils/ansi.d.ts +55 -0
  94. package/dist/app/utils/ansi.js +157 -0
  95. package/dist/app/utils/diff-rows.d.ts +82 -0
  96. package/dist/app/utils/diff-rows.js +209 -0
  97. package/dist/app/utils/fuzzy-path.d.ts +58 -0
  98. package/dist/app/utils/fuzzy-path.js +202 -0
  99. package/dist/app/utils/line-range.d.ts +48 -0
  100. package/dist/app/utils/line-range.js +61 -0
  101. package/dist/app/utils/log-lines.d.ts +107 -0
  102. package/dist/app/utils/log-lines.js +170 -0
  103. package/dist/app/utils/tree-filter.d.ts +19 -0
  104. package/dist/app/utils/tree-filter.js +26 -0
  105. package/dist/app/view-options.d.ts +2 -0
  106. package/dist/app/view-options.js +2 -2
  107. package/dist/chat/activity.d.ts +72 -0
  108. package/dist/chat/activity.js +184 -0
  109. package/dist/chat/composer-submit.d.ts +38 -0
  110. package/dist/chat/composer-submit.js +44 -0
  111. package/dist/chat/composer.d.ts +47 -0
  112. package/dist/chat/composer.js +100 -0
  113. package/dist/chat/index.d.ts +6 -0
  114. package/dist/chat/index.js +6 -0
  115. package/dist/chat/mixins/composer-send.d.ts +32 -0
  116. package/dist/chat/mixins/composer-send.js +121 -0
  117. package/dist/chat/mixins/reveal-stream.d.ts +68 -0
  118. package/dist/chat/mixins/reveal-stream.js +184 -0
  119. package/dist/chat/mixins/stream-target.d.ts +18 -0
  120. package/dist/chat/mixins/stream-target.js +38 -0
  121. package/dist/components/button.js +7 -1
  122. package/dist/components/character-count.d.ts +44 -0
  123. package/dist/components/character-count.js +68 -0
  124. package/dist/components/index.d.ts +2 -0
  125. package/dist/components/index.js +2 -0
  126. package/dist/components/label-chip.d.ts +42 -0
  127. package/dist/components/label-chip.js +86 -0
  128. package/dist/components/property-list.d.ts +9 -2
  129. package/dist/components/property-list.js +37 -10
  130. package/dist/components/textarea.js +6 -1
  131. package/dist/components/timeline.d.ts +62 -5
  132. package/dist/components/timeline.js +124 -5
  133. package/dist/docs/code-block.js +8 -31
  134. package/dist/docs/file-tree.js +3 -48
  135. package/dist/landing/case-study.d.ts +79 -0
  136. package/dist/landing/case-study.js +162 -0
  137. package/dist/landing/contributor-wall.d.ts +72 -0
  138. package/dist/landing/contributor-wall.js +129 -0
  139. package/dist/landing/countdown.d.ts +88 -0
  140. package/dist/landing/countdown.js +91 -0
  141. package/dist/landing/episode-player.d.ts +87 -0
  142. package/dist/landing/episode-player.js +113 -0
  143. package/dist/landing/faq-band.d.ts +3 -2
  144. package/dist/landing/faq-band.js +4 -3
  145. package/dist/landing/index.d.ts +7 -0
  146. package/dist/landing/index.js +7 -0
  147. package/dist/landing/landing-header.js +15 -4
  148. package/dist/landing/mixins/countdown-tick.d.ts +29 -0
  149. package/dist/landing/mixins/countdown-tick.js +65 -0
  150. package/dist/landing/mixins/usage-estimate-live.d.ts +32 -0
  151. package/dist/landing/mixins/usage-estimate-live.js +120 -0
  152. package/dist/landing/phone-frame.d.ts +2 -1
  153. package/dist/landing/price-list.d.ts +68 -0
  154. package/dist/landing/price-list.js +125 -0
  155. package/dist/landing/scroll-scene.d.ts +59 -0
  156. package/dist/landing/scroll-scene.js +70 -0
  157. package/dist/landing/sponsor-wall.d.ts +30 -6
  158. package/dist/landing/sponsor-wall.js +70 -14
  159. package/dist/landing/typed-terminal.d.ts +24 -6
  160. package/dist/landing/typed-terminal.js +22 -14
  161. package/dist/landing/usage-estimate.d.ts +127 -0
  162. package/dist/landing/usage-estimate.js +164 -0
  163. package/dist/landing/utils/countdown.d.ts +33 -0
  164. package/dist/landing/utils/countdown.js +42 -0
  165. package/dist/landing/utils/pause-toggle.d.ts +2 -1
  166. package/dist/mixins/character-count.d.ts +62 -0
  167. package/dist/mixins/character-count.js +139 -0
  168. package/dist/mixins/index.d.ts +6 -2
  169. package/dist/mixins/index.js +6 -2
  170. package/dist/mixins/invoker-fields.d.ts +18 -0
  171. package/dist/mixins/invoker-fields.js +60 -0
  172. package/dist/mixins/media-sync.d.ts +58 -0
  173. package/dist/mixins/media-sync.js +102 -0
  174. package/dist/mixins/menu-keys.d.ts +11 -0
  175. package/dist/mixins/menu-keys.js +79 -70
  176. package/dist/mixins/sortable.d.ts +96 -0
  177. package/dist/mixins/sortable.js +433 -0
  178. package/dist/utils/code-lines.d.ts +26 -0
  179. package/dist/utils/code-lines.js +29 -0
  180. package/dist/utils/file-icon.d.ts +31 -0
  181. package/dist/utils/file-icon.js +60 -0
  182. package/dist/utils/index.d.ts +2 -0
  183. package/dist/utils/index.js +2 -0
  184. package/dist/utils/write-cookie.d.ts +15 -15
  185. package/dist/utils/write-cookie.js +10 -16
  186. package/dist/video/episode-list.d.ts +48 -0
  187. package/dist/video/episode-list.js +161 -0
  188. package/dist/video/index.d.ts +15 -0
  189. package/dist/video/index.js +15 -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/mixins/video-shelf-steps.d.ts +20 -0
  193. package/dist/video/mixins/video-shelf-steps.js +79 -0
  194. package/dist/video/title-hero.d.ts +51 -0
  195. package/dist/video/title-hero.js +170 -0
  196. package/dist/video/utils/timeline.d.ts +55 -0
  197. package/dist/video/utils/timeline.js +90 -0
  198. package/dist/video/video-card.d.ts +51 -0
  199. package/dist/video/video-card.js +135 -0
  200. package/dist/video/video-player.d.ts +261 -0
  201. package/dist/video/video-player.js +927 -0
  202. package/dist/video/video-shelf.d.ts +58 -0
  203. package/dist/video/video-shelf.js +155 -0
  204. package/package.json +6 -3
@@ -0,0 +1,200 @@
1
+ /**
2
+ * A change to read and review: one card per file (status, path, counts, collapse), hunks drawn
3
+ * unified or split in one table whose rows sit in chunks the browser skips until they near the
4
+ * screen, word-level marks, review threads between rows, and one island for the whole page.
5
+ *
6
+ * @author [Sergio Xalambrí](https://sergiodxa.com)
7
+ * @copyright Sergio Xalambrí 2026
8
+ */
9
+ import type { FileStatus, Hunk } from "@sdxc/diff";
10
+ import type { EntryComponent, Handle, Props as TagProps, RemixNode } from "remix/component";
11
+ import type { DiffInteractions as DiffGestures } from "./mixins/diff-interactions.js";
12
+ import type { DiffSide } from "./utils/diff-rows.js";
13
+ export type { DiffSide } from "./utils/diff-rows.js";
14
+ export { DIFF_COMMENT_EVENT } from "./mixins/diff-interactions.js";
15
+ export { changeBlocks, hunkHeader, splitRows } from "./utils/diff-rows.js";
16
+ /**
17
+ * Prop types for {@link Diff} and its parts.
18
+ */
19
+ export declare namespace Diff {
20
+ /** How hunks draw: one column of lines, or the old and new sides beside each other. */
21
+ type View = "unified" | "split";
22
+ /** Every string the page's island announces. */
23
+ interface Labels {
24
+ /** Announced once a path is on the clipboard, such as "Copied". */
25
+ copied: string;
26
+ }
27
+ /** Props accepted by {@link Diff}: every native `<div>` attribute for its root. */
28
+ interface Props extends TagProps<"div"> {
29
+ /** The strings the page's island announces, so it reads in any language. */
30
+ labels: Labels;
31
+ /** A {@link Diff.Toolbar} and the page's {@link Diff.File} cards. */
32
+ children?: RemixNode;
33
+ }
34
+ /** Copy {@link Diff.Toolbar} shows. */
35
+ interface ToolbarLabels {
36
+ /** Names the view switch for assistive technology, such as "Diff view". */
37
+ view: string;
38
+ /** The unified link's text, such as "Unified". */
39
+ unified: string;
40
+ /** The split link's text, such as "Split". */
41
+ split: string;
42
+ /** Follows the "n / N" count, such as "files viewed". */
43
+ filesViewed: string;
44
+ }
45
+ /** Props accepted by {@link Diff.Toolbar}: every native `<div>` attribute. */
46
+ interface ToolbarProps extends TagProps<"div"> {
47
+ /** The view the page renders, which the switch marks current. */
48
+ view: View;
49
+ /** This page's address with `?diff=unified`. */
50
+ unifiedHref: string;
51
+ /** This page's address with `?diff=split`. */
52
+ splitHref: string;
53
+ /** The frame the view links swap, such as `"main"`. */
54
+ target?: string;
55
+ /** Files marked viewed; with `total`, draws "n / N files viewed" and its bar. */
56
+ viewed?: number;
57
+ /** The files on the page; with `viewed`, draws the progress. */
58
+ total?: number;
59
+ /** The toolbar's strings. */
60
+ labels: ToolbarLabels;
61
+ /** Controls between the switch and the progress: "Jump to", a file filter. */
62
+ children?: RemixNode;
63
+ }
64
+ /** The hidden column headers a screen reader announces for each cell. */
65
+ interface ColumnLabels {
66
+ /** Such as "Original file line number". */
67
+ oldNumber: string;
68
+ /** Such as "Diff line number". */
69
+ newNumber: string;
70
+ /** The old side's code in the split view, such as "Original file line". */
71
+ oldText: string;
72
+ /** Such as "Diff line change". */
73
+ change: string;
74
+ }
75
+ /** Copy {@link Diff.Hunks} shows or announces. */
76
+ interface HunksLabels {
77
+ /** The hidden headers that tell a screen reader which column a cell is in. */
78
+ columns: ColumnLabels;
79
+ /** Names each hunk's expand link, such as "Expand context". */
80
+ expandContext?: string;
81
+ /** Names a line's `+` link, such as `(side, line) => \`Comment on line ${side}${line}\``. */
82
+ addComment?: (side: DiffSide, line: number) => string;
83
+ }
84
+ /** Copy {@link Diff.File} shows or announces. */
85
+ interface FileLabels extends HunksLabels {
86
+ /** Names the copy button, such as "Copy file path". */
87
+ copyPath: string;
88
+ /** Read for each status letter, such as `{ modified: "Modified", … }`. */
89
+ statuses: Record<FileStatus, string>;
90
+ /** Read for the counts, such as `(added, deleted) => \`${added} additions, ${deleted} deletions\``. */
91
+ changes: (additions: number, deletions: number) => string;
92
+ /** Such as "Binary file not shown." */
93
+ binary: string;
94
+ /** Shown when the patch was dropped for size, such as "Large diff not shown." */
95
+ tooLarge: string;
96
+ /** Shown above the `load` slot, such as "Large diffs are not rendered by default." */
97
+ largeDiff: string;
98
+ /** Shown for a file whose change has no lines, such as "File renamed without changes." */
99
+ empty?: string;
100
+ }
101
+ /** What {@link Diff.Hunks} draws and how its lines link. */
102
+ interface HunksProps extends TagProps<"div"> {
103
+ /** The file's path, which names the table and keys the comment links. */
104
+ path: string;
105
+ /** The parsed hunks to draw, with their word-level ranges. */
106
+ hunks: readonly Hunk[];
107
+ /** Language the code highlights as (`ts`, `css`); omitted, lines draw plain. */
108
+ language?: string;
109
+ /** One column, or old and new side by side above 48rem. @default "unified" */
110
+ view?: View;
111
+ /** Prefix of every line anchor, `<fileId>R12`. @default "diff-" plus a hash of the path */
112
+ fileId?: string;
113
+ /**
114
+ * Review threads drawn as a full-width row after their line, keyed `R12` (new side)
115
+ * or `L12` (old side).
116
+ */
117
+ threads?: Readonly<Record<string, RemixNode>>;
118
+ /** The address a line's number links to. @default `#<fileId><side><line>` */
119
+ lineHref?: (side: DiffSide, line: number) => string;
120
+ /** Where a line's `+` goes without script; set, every line draws a `+`. */
121
+ commentHref?: (path: string, side: DiffSide, line: number) => string;
122
+ /** Where a hunk's expand link goes, which the app can answer as a frame. */
123
+ expandHref?: (hunk: Hunk, index: number) => string;
124
+ /** Lines per chunk. @default DEFAULT_CHUNK_SIZE */
125
+ chunkSize?: number;
126
+ /**
127
+ * Gives each number an `id` and a link. Turn it off for a copy of lines shown beside
128
+ * the file itself (a thread's excerpt or suggestion), so anchors stay unique. @default true
129
+ */
130
+ anchored?: boolean;
131
+ /** The table's strings. */
132
+ labels: HunksLabels;
133
+ }
134
+ /** Props accepted by {@link Diff.File}: every native `<section>` attribute, plus the file. */
135
+ interface FileProps extends Omit<TagProps<"section">, "children">, Omit<HunksProps, keyof TagProps<"div"> | "hunks" | "labels" | "fileId" | "anchored"> {
136
+ /** The path on the old side, drawn as `old → new` when it differs from `path`. */
137
+ oldPath?: string;
138
+ /** Drawn as a toned letter (A, M, D, R, C) and read out through `labels.statuses`. */
139
+ status: FileStatus;
140
+ /** Lines added, counted in the header and its five-block bar. */
141
+ additions: number;
142
+ /** Lines deleted, counted in the header and its five-block bar. */
143
+ deletions: number;
144
+ /** The file's hunks; omitted for a binary file, a dropped patch or a lazy one. */
145
+ hunks?: readonly Hunk[];
146
+ /** Git declared the file binary. */
147
+ binary?: boolean;
148
+ /** The patch was dropped for size, so the file draws "Large diff not shown". */
149
+ tooLarge?: boolean;
150
+ /** Renders closed, as a reader's collapse would. */
151
+ collapsed?: boolean;
152
+ /** The reader marked the file viewed, which renders it closed. */
153
+ viewed?: boolean;
154
+ /** The "Viewed" checkbox, as a form that posts the mark (an `OptimisticToggle`). */
155
+ viewedControl?: RemixNode;
156
+ /** A `⋯` menu trigger at the header's end. */
157
+ menu?: RemixNode;
158
+ /**
159
+ * What a large file shows in place of its lines, such as a lazy frame's "Load diff";
160
+ * given, a file past `largeThreshold` renders collapsed and draws no row.
161
+ */
162
+ load?: RemixNode;
163
+ /** Changed lines past which the file counts as large. @default DEFAULT_LARGE_THRESHOLD */
164
+ largeThreshold?: number;
165
+ /** The card's strings, so it reads in any language. */
166
+ labels: FileLabels;
167
+ }
168
+ /** What a `DiffCommentEvent` names: the file, the side and the lines, counted from 1. */
169
+ type CommentDetail = DiffGestures.CommentDetail;
170
+ /** Props {@link DiffInteractions} receives from {@link Diff}. */
171
+ interface InteractionsProps {
172
+ /** The root's strings. */
173
+ labels: Labels;
174
+ }
175
+ }
176
+ /**
177
+ * Without script each `+` links to `commentHref`; mapping `@sdxc/ui/app/diff` runs one
178
+ * {@link DiffInteractions} for every file, turning `+`, drags and copy into `DIFF_COMMENT_EVENT`.
179
+ * Set `--diff-font-size`, `--diff-line-height` and the `--diff-add-*`/`--diff-del-*` tints.
180
+ *
181
+ * @param handle Runtime handle carrying the root's props.
182
+ * @returns The render function producing the root.
183
+ * @example
184
+ * <Diff labels={{ copied: t("copied") }}>
185
+ * <Diff.Toolbar view={view} unifiedHref="?diff=unified" splitHref="?diff=split" viewed={2} total={files.length} labels={toolbarLabels} />
186
+ * {files.map((file) => <Diff.File path={file.newPath} oldPath={file.oldPath} status={file.status} additions={file.additions} deletions={file.deletions} hunks={parseHunks(text, file)} language="ts" view={view} labels={fileLabels} />)}
187
+ * </Diff>
188
+ */
189
+ export declare function Diff(handle: Handle<Diff.Props>): () => import("remix/component").RemixElement;
190
+ export declare namespace Diff {
191
+ var Toolbar: (handle: Handle<Diff.ToolbarProps>) => () => import("remix/component").RemixElement;
192
+ var File: (handle: Handle<Diff.FileProps>) => () => import("remix/component").RemixElement;
193
+ var Hunks: (handle: Handle<Diff.HunksProps>) => () => import("remix/component").RemixElement;
194
+ }
195
+ /**
196
+ * Client island every {@link Diff} renders once: a status region the `diffInteractions()`
197
+ * mixin speaks through, which listens on the whole root for line gestures and copy buttons.
198
+ * Loads from `@sdxc/ui/app/diff#DiffInteractions` once the app's browser entry maps it.
199
+ */
200
+ export declare const DiffInteractions: EntryComponent<Diff.InteractionsProps>;