@seekbuddy/dsh-ui 0.0.0-stage → 0.2.0-beta.1

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 (213) hide show
  1. package/CHANGELOG.md +83 -0
  2. package/LICENSE +22 -0
  3. package/README.md +175 -2
  4. package/README.zh.md +176 -0
  5. package/THIRD_PARTY_NOTICES.md +42 -0
  6. package/UPSTREAM.md +59 -0
  7. package/dist/blocks.js +1617 -0
  8. package/dist/chunks/chunk-23KOEBWJ.js +104 -0
  9. package/dist/chunks/chunk-6SGSJ5KW.js +57 -0
  10. package/dist/chunks/chunk-7NH2UOZO.js +155 -0
  11. package/dist/chunks/chunk-7SKW4S35.js +66 -0
  12. package/dist/chunks/chunk-B3EEK7A2.js +408 -0
  13. package/dist/chunks/chunk-CEBTQO6W.js +24 -0
  14. package/dist/chunks/chunk-ENKPNYOB.js +26 -0
  15. package/dist/chunks/chunk-EWAZFWLW.js +27 -0
  16. package/dist/chunks/chunk-F352IICS.js +57 -0
  17. package/dist/chunks/chunk-FFJ6TCCF.js +31 -0
  18. package/dist/chunks/chunk-FZXK4LTI.js +129 -0
  19. package/dist/chunks/chunk-JA3XDLIA.js +1115 -0
  20. package/dist/chunks/chunk-L7XALG4J.js +36 -0
  21. package/dist/chunks/chunk-OCAQFVT3.js +3172 -0
  22. package/dist/chunks/chunk-RAXDA2PT.js +202 -0
  23. package/dist/chunks/chunk-RNVSCTW7.js +24 -0
  24. package/dist/chunks/chunk-RZOP2PFC.js +152 -0
  25. package/dist/chunks/chunk-SN6RSUWC.js +61 -0
  26. package/dist/chunks/chunk-SNVSQWCU.js +22 -0
  27. package/dist/chunks/chunk-SO3DCAWG.js +170 -0
  28. package/dist/chunks/chunk-UAEFKTV3.js +144 -0
  29. package/dist/chunks/chunk-UGEORMLD.js +89 -0
  30. package/dist/chunks/chunk-W6FLI3AK.js +112 -0
  31. package/dist/chunks/chunk-WX46TSKP.js +328 -0
  32. package/dist/chunks/chunk-XL33IPCV.js +261 -0
  33. package/dist/chunks/chunk-XW4L4ZGL.js +967 -0
  34. package/dist/chunks/chunk-YOBY6PSL.js +850 -0
  35. package/dist/chunks/chunk-ZA47FP7C.js +7 -0
  36. package/dist/icons.js +859 -0
  37. package/dist/index.js +1675 -0
  38. package/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
  39. package/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
  40. package/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
  41. package/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
  42. package/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
  43. package/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
  44. package/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
  45. package/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
  46. package/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
  47. package/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
  48. package/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
  49. package/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
  50. package/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
  51. package/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
  52. package/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
  53. package/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
  54. package/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
  55. package/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
  56. package/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
  57. package/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
  58. package/dist/katex.css +1 -0
  59. package/dist/katex.css.d.ts +2 -0
  60. package/dist/markdown.js +225 -0
  61. package/dist/meta.json +7575 -0
  62. package/dist/root-inputs.json +86 -0
  63. package/dist/seekbuddy-card.js +7 -0
  64. package/dist/seekbuddy-empty.js +8 -0
  65. package/dist/seekbuddy-internal/DangerButton.js +7 -0
  66. package/dist/seekbuddy-internal/Mark.js +7 -0
  67. package/dist/seekbuddy-internal/Message.js +10 -0
  68. package/dist/seekbuddy-internal/Pagination.js +9 -0
  69. package/dist/seekbuddy-internal/StatusBadge.js +7 -0
  70. package/dist/seekbuddy-internal/SubtleButton.js +7 -0
  71. package/dist/seekbuddy-internal/Switch.js +7 -0
  72. package/dist/seekbuddy-internal/Upload.js +7 -0
  73. package/dist/seekbuddy-internal/date/Calendar.js +8 -0
  74. package/dist/seekbuddy-internal/date/DatePicker.js +9 -0
  75. package/dist/seekbuddy-internal/date/DateRangePicker.js +9 -0
  76. package/dist/seekbuddy-internal/date/TimePicker.js +8 -0
  77. package/dist/seekbuddy-internal/date/fields.js +16 -0
  78. package/dist/seekbuddy-internal/qr/QrCode.js +7 -0
  79. package/dist/seekbuddy-spinner.js +7 -0
  80. package/dist/seekbuddy-tabs.js +7 -0
  81. package/dist/seekbuddy-timeline.js +8 -0
  82. package/dist/seekbuddy.js +89 -0
  83. package/dist/theme-bootstrap.js +13 -0
  84. package/dist/theme.js +37 -0
  85. package/dist/tokens.css +974 -0
  86. package/dist/tokens.css.d.ts +2 -0
  87. package/dist/types/AnimatedRows.d.ts +45 -0
  88. package/dist/types/Button.d.ts +18 -0
  89. package/dist/types/Checkbox.d.ts +19 -0
  90. package/dist/types/CodeFileIcon.d.ts +11 -0
  91. package/dist/types/CodeToolbar.d.ts +29 -0
  92. package/dist/types/CommandText.d.ts +15 -0
  93. package/dist/types/ConfigField.d.ts +32 -0
  94. package/dist/types/ConnectionIndicator.d.ts +25 -0
  95. package/dist/types/DetailDocument.d.ts +77 -0
  96. package/dist/types/DiffBlock.d.ts +51 -0
  97. package/dist/types/DisclosureRow.d.ts +37 -0
  98. package/dist/types/DraggableImage.d.ts +18 -0
  99. package/dist/types/FileTypeIcon.d.ts +42 -0
  100. package/dist/types/FoldToggle.d.ts +19 -0
  101. package/dist/types/HoverCard.d.ts +44 -0
  102. package/dist/types/HoverCardGroup.d.ts +24 -0
  103. package/dist/types/ImageLightbox.d.ts +29 -0
  104. package/dist/types/ImagePreview.d.ts +11 -0
  105. package/dist/types/InlineEditor.d.ts +22 -0
  106. package/dist/types/Input.d.ts +11 -0
  107. package/dist/types/JsonTree.d.ts +58 -0
  108. package/dist/types/LinkIcon.d.ts +33 -0
  109. package/dist/types/Menu.d.ts +163 -0
  110. package/dist/types/MenuGroup.d.ts +21 -0
  111. package/dist/types/MenuSurface.d.ts +24 -0
  112. package/dist/types/Modal.d.ts +43 -0
  113. package/dist/types/PermissionIcon.d.ts +50 -0
  114. package/dist/types/Pill.d.ts +12 -0
  115. package/dist/types/QuotePreview.d.ts +23 -0
  116. package/dist/types/ReadBlock.d.ts +47 -0
  117. package/dist/types/ReferenceIcon.d.ts +20 -0
  118. package/dist/types/RiskConfirmation.d.ts +19 -0
  119. package/dist/types/SearchBlock.d.ts +71 -0
  120. package/dist/types/SegmentedControl.d.ts +34 -0
  121. package/dist/types/SegmentedTabs.d.ts +27 -0
  122. package/dist/types/ShortcutKeys.d.ts +10 -0
  123. package/dist/types/SiteGlyph.d.ts +24 -0
  124. package/dist/types/StateDot.d.ts +19 -0
  125. package/dist/types/Switch.d.ts +19 -0
  126. package/dist/types/Tag.d.ts +31 -0
  127. package/dist/types/TerminalBlock.d.ts +85 -0
  128. package/dist/types/TextShimmer.d.ts +22 -0
  129. package/dist/types/Toast.d.ts +48 -0
  130. package/dist/types/Tooltip.d.ts +69 -0
  131. package/dist/types/UserMessageBubble.d.ts +10 -0
  132. package/dist/types/WebBlock.d.ts +60 -0
  133. package/dist/types/ZoomControls.d.ts +26 -0
  134. package/dist/types/ansi.d.ts +16 -0
  135. package/dist/types/blocks.d.ts +21 -0
  136. package/dist/types/clipboard.d.ts +8 -0
  137. package/dist/types/code-file-icon-artwork.d.ts +53 -0
  138. package/dist/types/code-file-types.d.ts +29 -0
  139. package/dist/types/code-highlighting.d.ts +11 -0
  140. package/dist/types/css-modules.d.ts +6 -0
  141. package/dist/types/darwin-desktop.d.ts +8 -0
  142. package/dist/types/document-zoom.d.ts +16 -0
  143. package/dist/types/file-drag-actions.d.ts +36 -0
  144. package/dist/types/file-size.d.ts +7 -0
  145. package/dist/types/focus.d.ts +15 -0
  146. package/dist/types/guide-artwork.d.ts +14 -0
  147. package/dist/types/head-tail-cap.d.ts +22 -0
  148. package/dist/types/icons/artwork.d.ts +421 -0
  149. package/dist/types/icons/index.d.ts +397 -0
  150. package/dist/types/icons/props.d.ts +8 -0
  151. package/dist/types/icons/shared-artwork.d.ts +36 -0
  152. package/dist/types/icons.d.ts +6 -0
  153. package/dist/types/image-drag.d.ts +16 -0
  154. package/dist/types/index.d.ts +71 -0
  155. package/dist/types/input-modality.d.ts +18 -0
  156. package/dist/types/keyboard-composition.d.ts +10 -0
  157. package/dist/types/markdown/CodeBlock.d.ts +34 -0
  158. package/dist/types/markdown/JsonBlock.d.ts +7 -0
  159. package/dist/types/markdown/MarkdownDelegate.d.ts +68 -0
  160. package/dist/types/markdown/MarkdownText.d.ts +54 -0
  161. package/dist/types/markdown/cjkFriendlyStrong.d.ts +8 -0
  162. package/dist/types/markdown/file-link.d.ts +22 -0
  163. package/dist/types/markdown/highlight.d.ts +169 -0
  164. package/dist/types/markdown/incremental.d.ts +79 -0
  165. package/dist/types/markdown/katex.d.ts +18 -0
  166. package/dist/types/markdown/local-image-syntax.d.ts +9 -0
  167. package/dist/types/markdown/mathCompatibility.d.ts +10 -0
  168. package/dist/types/markdown/parse.d.ts +24 -0
  169. package/dist/types/markdown/plain-text.d.ts +21 -0
  170. package/dist/types/markdown/quote-text.d.ts +7 -0
  171. package/dist/types/markdown/render.d.ts +145 -0
  172. package/dist/types/markdown/useViewportHighlighting.d.ts +10 -0
  173. package/dist/types/markdown/windows-path-destinations.d.ts +10 -0
  174. package/dist/types/markdown.d.ts +12 -0
  175. package/dist/types/overlay-top-margin.d.ts +14 -0
  176. package/dist/types/plugin-artwork.d.ts +16 -0
  177. package/dist/types/pointer-grace.d.ts +21 -0
  178. package/dist/types/rank-by-name.d.ts +21 -0
  179. package/dist/types/relative-time.d.ts +22 -0
  180. package/dist/types/seekbuddy/Card.d.ts +28 -0
  181. package/dist/types/seekbuddy/DangerButton.d.ts +31 -0
  182. package/dist/types/seekbuddy/Empty.d.ts +34 -0
  183. package/dist/types/seekbuddy/Mark.d.ts +27 -0
  184. package/dist/types/seekbuddy/Message.d.ts +52 -0
  185. package/dist/types/seekbuddy/Pagination.d.ts +66 -0
  186. package/dist/types/seekbuddy/Spinner.d.ts +20 -0
  187. package/dist/types/seekbuddy/StatusBadge.d.ts +33 -0
  188. package/dist/types/seekbuddy/SubtleButton.d.ts +30 -0
  189. package/dist/types/seekbuddy/Switch.d.ts +36 -0
  190. package/dist/types/seekbuddy/Tabs.d.ts +49 -0
  191. package/dist/types/seekbuddy/Timeline.d.ts +42 -0
  192. package/dist/types/seekbuddy/Upload.d.ts +101 -0
  193. package/dist/types/seekbuddy/date/Calendar.d.ts +94 -0
  194. package/dist/types/seekbuddy/date/DatePicker.d.ts +29 -0
  195. package/dist/types/seekbuddy/date/DateRangePicker.d.ts +41 -0
  196. package/dist/types/seekbuddy/date/TimePicker.d.ts +35 -0
  197. package/dist/types/seekbuddy/date/date.d.ts +79 -0
  198. package/dist/types/seekbuddy/date/fields.d.ts +45 -0
  199. package/dist/types/seekbuddy/index.d.ts +49 -0
  200. package/dist/types/seekbuddy/qr/QrCode.d.ts +37 -0
  201. package/dist/types/seekbuddy/qr/qr.d.ts +38 -0
  202. package/dist/types/theme-bootstrap.d.ts +3 -0
  203. package/dist/types/theme-core.d.ts +14 -0
  204. package/dist/types/theme.d.ts +4 -0
  205. package/dist/types/tooltip-placement.d.ts +34 -0
  206. package/dist/types/use-clipboard-copy.d.ts +13 -0
  207. package/dist/types/useAnchoredMaxHeight.d.ts +13 -0
  208. package/dist/types/useAnchoredPosition.d.ts +35 -0
  209. package/dist/types/useDismissOnOutsidePointer.d.ts +10 -0
  210. package/dist/types/useModalLayer.d.ts +26 -0
  211. package/dist/types/useRowDragPreview.d.ts +19 -0
  212. package/dist/types/user-text.d.ts +31 -0
  213. package/package.json +151 -4
@@ -0,0 +1,10 @@
1
+ /**
2
+ * Render one command's keycaps without owning binding defaults or localized copy.
3
+ * @param props - effective key labels, presentation variant and optional interaction styling.
4
+ * @returns unboxed keys by default, or tooltip keycaps with plus-separated combinations grouped together.
5
+ */
6
+ export declare function ShortcutKeys({ keys, variant, className, }: {
7
+ keys: readonly string[];
8
+ variant?: 'plain' | 'tooltip';
9
+ className?: string | undefined;
10
+ }): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Site marks for well-known external link hosts. {@link LinkIconMedium} renders one in
3
+ * the leading glyph seat, so a familiar destination leads with its own mark
4
+ * instead of the generic globe. The marks are the `simple-icons` artwork set
5
+ * (CC0-1.0), pinned by this package's dependency on it; each mark takes the
6
+ * link's `currentColor` rather than the brand fill that set records.
7
+ */
8
+ import type { ReactElement } from 'react';
9
+ /** Props for {@link siteGlyph}: the destination plus the shared icon sizing seat. */
10
+ interface SiteGlyphProps {
11
+ /** The link destination; only an absolute http(s) URL can name a host. */
12
+ href: string | undefined;
13
+ /** Square edge in px. */
14
+ size: number;
15
+ /** Extra class for layout placement. */
16
+ className?: string | undefined;
17
+ }
18
+ /**
19
+ * Render the site mark for a known external destination.
20
+ * @param props - The destination and the icon sizing seat.
21
+ * @returns The site's mark riding currentColor, or undefined for an unknown site.
22
+ */
23
+ export declare function siteGlyph({ href, size, className }: SiteGlyphProps): ReactElement | undefined;
24
+ export {};
@@ -0,0 +1,19 @@
1
+ /**
2
+ * State semantic: green done / amber user-attention / tertiary-grey loading /
3
+ * red error / neutral-grey idle for a tracked subject with nothing in progress.
4
+ */
5
+ export type StateDotState = 'done' | 'warning' | 'ongoing' | 'error' | 'idle';
6
+ /**
7
+ * Render a state dot.
8
+ * @param props.state - which of `done`, `warning`, `ongoing`, `error`, or `idle` to show.
9
+ * @param props.size - outer diameter in px; defaults to 14 for ongoing and 10 for solid states.
10
+ * @param props.className - extra class for layout placement.
11
+ * @param props.appearance - compact dot by default; step uses a filled check or hollow pending circle.
12
+ * @returns the dot element (aria-hidden; pair with text for accessibility).
13
+ */
14
+ export declare function StateDot({ state, size, className, appearance, }: {
15
+ state: StateDotState;
16
+ size?: number | undefined;
17
+ className?: string | undefined;
18
+ appearance?: 'dot' | 'step';
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * Render a toggle switch.
3
+ * @param props.checked - the current state; the control is fully controlled.
4
+ * @param props.onChange - called with the state the click asks for.
5
+ * @param props.label - localized accessible name, owned by the render site.
6
+ * @param props.disabled - whether the control refuses input; owners also set it
7
+ * while a write is in flight, not only when a deployment locks the toggle.
8
+ * @param props.title - localized hover text, typically why the toggle is locked.
9
+ * @param props.className - extra class for layout placement.
10
+ * @returns the switch element.
11
+ */
12
+ export declare function Switch({ checked, onChange, label, disabled, title, className, }: {
13
+ checked: boolean;
14
+ onChange: (next: boolean) => void;
15
+ label: string;
16
+ disabled?: boolean;
17
+ title?: string | undefined;
18
+ className?: string | undefined;
19
+ }): import("react").JSX.Element;
@@ -0,0 +1,31 @@
1
+ import type { ReactNode } from 'react';
2
+ /** Palette selector; each tone names one shipped appearance. */
3
+ export type TagTone =
4
+ /** Hairline outline on tertiary text: the read-only default. */
5
+ 'outline'
6
+ /** Inverted fill: one tag per group that names the current selection. */
7
+ | 'solid'
8
+ /** Platform-gray fill: a neutral fact with no status meaning. */
9
+ | 'neutral'
10
+ /** Text only, no fill: a fact stated more quietly than `neutral`. */
11
+ | 'quiet'
12
+ /** Tinted green: a healthy or enabled state. */
13
+ | 'success'
14
+ /** Tinted blue: informational classification, not health. */
15
+ | 'info'
16
+ /** Tinted amber: attention needed, not yet a failure. */
17
+ | 'warning'
18
+ /** Tinted red: a failure. */
19
+ | 'danger';
20
+ /**
21
+ * Render a read-only tag.
22
+ * @param props.tone - which palette to use (default `outline`).
23
+ * @param props.className - extra class for layout placement.
24
+ * @param props.children - the localized label, owned by the render site.
25
+ * @returns the tag element.
26
+ */
27
+ export declare function Tag({ tone, className, children, }: {
28
+ tone?: TagTone;
29
+ className?: string | undefined;
30
+ children?: ReactNode;
31
+ }): import("react").JSX.Element;
@@ -0,0 +1,85 @@
1
+ /** Output lines shown before the height cap collapses the middle. */
2
+ export declare const DEFAULT_TERMINAL_MAX_LINES = 16;
3
+ /**
4
+ * Display copy for the terminal surface; the owner passes localized labels
5
+ * (this package is cordis-free, so copy arrives via props).
6
+ */
7
+ export interface TerminalBlockLabels {
8
+ /** Accessible name for an overflowing authored command line, numbered from one. */
9
+ commandLine: (line: number) => string;
10
+ /** Status pill text for a signal-terminated command. */
11
+ signal: (signal: string) => string;
12
+ /** Status pill text for a non-zero exit code. */
13
+ exitCode: (exitCode: number) => string;
14
+ /** Status pill text for a command that ended without an exit code: killed by a signal the view does not know, or never started. */
15
+ noExitCode: string;
16
+ /** Run-state text while the command is still running. */
17
+ running: string;
18
+ /** Run-state text for a signal or non-zero-exit settle. */
19
+ failed: string;
20
+ /** Run-state text for a clean settle. */
21
+ done: string;
22
+ /** Copy-button idle label. */
23
+ copy: string;
24
+ /** Copy-button label during the post-copy confirmation window. */
25
+ copied: string;
26
+ /** Placeholder when a settled command produced no visible output. */
27
+ noOutput: string;
28
+ /** Collapse-toggle aria label while expanded. */
29
+ collapseAria: string;
30
+ /** Collapse-toggle text while expanded. */
31
+ collapse: string;
32
+ /** Expand-toggle aria label while capped, given the hidden line count. */
33
+ expandAria: (hidden: number) => string;
34
+ /** Expand-toggle text while capped, given the hidden line count. */
35
+ expand: (hidden: number) => string;
36
+ }
37
+ export interface TerminalBlockProps {
38
+ /** The command, rendered verbatim after the prompt label; long lines scroll horizontally unless the host enables wrapping. */
39
+ command: string;
40
+ /** Working directory for the prompt label; absent renders a plain `$`. */
41
+ cwd?: string | undefined;
42
+ /** Absolute home directory, so a cwd equal to it collapses to `~`; absent disables that collapse. */
43
+ home?: string | undefined;
44
+ /** The command's output text; may contain ANSI escape sequences. */
45
+ output?: string | undefined;
46
+ /** Settled exit code; a non-zero value renders the status pill, and null (settled without one) the no-exit-code pill. */
47
+ exitCode?: number | null | undefined;
48
+ /** Settled terminating signal name; any value renders the status pill, taking precedence over the exit code. */
49
+ signal?: string | undefined;
50
+ /**
51
+ * The command is still running: with no `output` the block shows the prompt
52
+ * line alone; with output it renders the live text under the running state.
53
+ */
54
+ running?: boolean | undefined;
55
+ /**
56
+ * The call launches background work (default false). `running` describes the
57
+ * launch call only; after it returns, retain the command without job status
58
+ * or output. An explicit `copyText` override remains available.
59
+ */
60
+ background?: boolean | undefined;
61
+ /** Height cap in output lines before the middle collapses (default {@link DEFAULT_TERMINAL_MAX_LINES}); Infinity disables the cap. */
62
+ maxLines?: number | undefined;
63
+ /**
64
+ * Copy-control payload override; the control copies the raw output when
65
+ * absent. Supplying it also keeps the control rendered before any output
66
+ * exists — a command is copyable before it prints.
67
+ */
68
+ copyText?: string | undefined;
69
+ /**
70
+ * Draw the run-state dot and its assistive label in the card gutter
71
+ * (default true). Hosts whose surrounding row already carries the same
72
+ * state omit both and reclaim the gutter via `--dsl-terminal-gutter`.
73
+ */
74
+ runStateDot?: boolean | undefined;
75
+ /** Extra class merged onto the wrapper (callers position; this component draws). */
76
+ className?: string | undefined;
77
+ /** Localized display copy supplied by the owning render site. */
78
+ labels: TerminalBlockLabels;
79
+ }
80
+ /**
81
+ * Render a shell command as a terminal surface.
82
+ * @param props - see {@link TerminalBlockProps}.
83
+ * @returns the terminal block element.
84
+ */
85
+ export declare function TerminalBlock({ command, cwd, home, output, exitCode, signal, running, background, maxLines, copyText, runStateDot, className, labels, }: TerminalBlockProps): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /** Text activity animation shared by a row and its nested text fragments. */
2
+ import * as React from 'react';
3
+ import { type ReactNode } from 'react';
4
+ /** Text and activity supplied by the owning row. */
5
+ export interface TextShimmerProps {
6
+ /** Text or presentational children with text in nested TextShimmer instances. No effects or element ids. */
7
+ children: ReactNode;
8
+ /** Whether to animate; nested instances share the containing row's activity. */
9
+ active?: boolean | undefined;
10
+ className?: string | undefined;
11
+ /** Layout class applied equally to the base and decorative content. */
12
+ contentClassName?: string | undefined;
13
+ }
14
+ /**
15
+ * Render text with one shared highlight while retaining selectable, accessible content.
16
+ * Nested instances inherit the outer animation. Keep icons outside; mark decorative
17
+ * separators with data-shimmer-decoration so their background follows the highlight.
18
+ * Active children also render in an inert, clipped decoration; supply only presentation.
19
+ * @param props - localized text, running state, and owner styling.
20
+ * @returns retained text and its optional decorative highlight.
21
+ */
22
+ export declare const TextShimmer: React.MemoExoticComponent<({ children, active, className, contentClassName, }: TextShimmerProps) => React.JSX.Element>;
@@ -0,0 +1,48 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Transient top-center banner: slides in, holds at full opacity, fades out,
4
+ * then reports done so the owner can unmount it. Re-showing the same text
5
+ * restarts the cycle when the owner remounts the component (key it by a
6
+ * per-show sequence). Rendered through a body portal so an owner inside a
7
+ * transformed or filtered ancestor cannot trap the fixed banner in that
8
+ * ancestor's box.
9
+ * With unchanged holdMs, parent rerenders do not extend the lifetime.
10
+ * Completion calls the latest onDone handler; fully faded actions receive no input.
11
+ *
12
+ * The hold is the owner's to set, because how long a banner has to stay
13
+ * depends on how much there is to read: a one-line limit lands in the default
14
+ * window, while a failure that names what broke does not. One value drives
15
+ * both the unmount timer and the stylesheet's fade delay — the stylesheet
16
+ * reads it as a custom property — so the two can no longer disagree and leave
17
+ * the banner unmounting mid-fade.
18
+ * @param props.text - resolved banner copy; the owner passes localized text.
19
+ * @param props.icon - optional leading glyph (e.g. a warning icon); ignored
20
+ * under `tone="success"`, which brings its own glyph.
21
+ * @param props.tone - 'success' renders the design's circled green check as
22
+ * the leading glyph; omitted, the icon seat keeps its warning tint.
23
+ * @param props.actions - optional inline actions continuing the sentence:
24
+ * each renders its plain-text `prefix` (a connective like 或) followed by its
25
+ * localized `label` as blue clickable text, flowing after `text` as one
26
+ * sentence. Each press is the owner's to handle (e.g. undo the reported
27
+ * change, then unmount the toast). The banner surface stays click-through —
28
+ * only the action text takes the pointer.
29
+ * @param props.holdMs - full-opacity hold before the fade; defaults to 3000.
30
+ * @param props.anchor - optional element whose horizontal center the banner
31
+ * follows (e.g. the composer card, so the banner centers over the chat column
32
+ * rather than the whole window); omitted, it centers on the viewport.
33
+ * @param props.onDone - called once the fade completes; unmount the toast here.
34
+ * @returns the floating banner.
35
+ */
36
+ export declare function Toast({ text, icon, tone, anchor, holdMs, actions, onDone, }: {
37
+ text: string;
38
+ icon?: ReactNode;
39
+ tone?: 'success';
40
+ anchor?: HTMLElement | null;
41
+ holdMs?: number;
42
+ actions?: readonly {
43
+ label: string;
44
+ prefix?: string;
45
+ onClick: () => void;
46
+ }[];
47
+ onDone: () => void;
48
+ }): import("react").ReactPortal;
@@ -0,0 +1,69 @@
1
+ /** Anchor-preserving tooltips; an optional body portal escapes clipping containers and stacking contexts that cap the bubble's z-index. */
2
+ import * as React from 'react';
3
+ import type { Context, FocusEventHandler, MouseEventHandler, PointerEventHandler, ReactElement, Ref } from 'react';
4
+ import { type TooltipSide } from './tooltip-placement.js';
5
+ export type { TooltipSide } from './tooltip-placement.js';
6
+ /**
7
+ * Suppression channel for nested tooltips: a visible descendant tooltip
8
+ * withdraws the enclosing tooltip while its bubble is shown.
9
+ */
10
+ export declare const TooltipSuppression: Context<((suppressed: boolean) => void) | null>;
11
+ /** Props Tooltip injects into its anchor child; the child's own handlers are chained ahead of the tooltip's. */
12
+ interface AnchorProps {
13
+ 'aria-describedby'?: string | undefined;
14
+ ref?: Ref<HTMLElement> | undefined;
15
+ onPointerEnter?: PointerEventHandler | undefined;
16
+ onPointerLeave?: PointerEventHandler | undefined;
17
+ onPointerDown?: PointerEventHandler | undefined;
18
+ onClick?: MouseEventHandler | undefined;
19
+ onFocus?: FocusEventHandler | undefined;
20
+ onBlur?: FocusEventHandler | undefined;
21
+ }
22
+ type TooltipLabel = string | (() => string);
23
+ /**
24
+ * Attach a hover/focus tooltip to an anchor element.
25
+ * @param props.label - bubble text, or a resolver evaluated only while visible; an empty string shows only shortcut keys.
26
+ * @param props.shortcutKeys - effective key labels rendered as platform-formatted keycaps after optional text.
27
+ * @param props.side - preferred placement (default 'right'); fitting tries the opposite then perpendicular sides.
28
+ * @param props.align - horizontal anchor-edge alignment for 'bottom'/'top' bubbles: 'end' pins
29
+ * the bubble's right edge to the anchor's (for anchors beside other hover surfaces the centered
30
+ * bubble would overlap); default 'center'. Horizontal placements ignore it.
31
+ * @param props.portal - render the bubble under document.body, so an ancestor's clipping or its
32
+ * stacking context (which confines the bubble's z-index to that context) cannot hide it.
33
+ * @param props.delayMs - hover delay in milliseconds (default 0).
34
+ * @param props.focusDelayMs - keyboard focus delay in milliseconds (default 0); blur, click,
35
+ * mouse leave, disabling, and unmount cancel a pending show.
36
+ * @param props.gap - anchor-to-bubble distance in pixels for 'bottom'/'top' bubbles (default 8);
37
+ * horizontal placements use 10px, including after a flip.
38
+ * @param props.disabled - suppress the bubble while true; the anchor renders identically so
39
+ * toggling never remounts it (which would cut its CSS transitions).
40
+ * @param props.maxWidth - bubble width cap in pixels, for labels long enough that the default
41
+ * half-viewport cap would render a slab wider than the surface the anchor sits on; always bounded by viewport margins.
42
+ * @param props.openOnClick - clicking or tapping also pins the bubble for reading; another click, Escape,
43
+ * Tab, or an outside pointerdown dismisses it. Defaults to false for ordinary action tooltips.
44
+ * @param props.onlyWhenClipped - show the bubble only when the anchor or an HTML element inside it
45
+ * overflows horizontally, measured when the bubble is about to show; for labels that repeat
46
+ * text an ellipsis may cut off. Defaults to false.
47
+ * @param props.children - a single anchor element; its own ref (callback or object) is forwarded alongside the tooltip's.
48
+ * @returns the cloned anchor plus a fixed-position bubble, optionally portaled to the body.
49
+ * The bubble stays hidden until ResizeObserver supplies its size for viewport fitting; clicking the
50
+ * anchor dismisses the bubble unless openOnClick is enabled, and focus arriving after a pointer
51
+ * interaction (a closing menu refocusing its trigger) never raises it. Touch cannot trigger hover
52
+ * tooltips; tapping still invokes the child's action and can open an openOnClick explanation.
53
+ * When no side fits, the viewport-bounded fallback may overlap the anchor; oversized content is scrollable when pinned.
54
+ */
55
+ export declare function Tooltip({ label, shortcutKeys, side, align, delayMs, focusDelayMs, gap, disabled, portal, maxWidth, openOnClick, onlyWhenClipped, children, }: {
56
+ label: TooltipLabel;
57
+ shortcutKeys?: readonly string[] | undefined;
58
+ side?: TooltipSide;
59
+ align?: 'center' | 'end';
60
+ delayMs?: number;
61
+ focusDelayMs?: number;
62
+ gap?: number;
63
+ disabled?: boolean;
64
+ portal?: boolean;
65
+ maxWidth?: number;
66
+ openOnClick?: boolean;
67
+ onlyWhenClipped?: boolean;
68
+ children: ReactElement<AnchorProps>;
69
+ }): React.JSX.Element;
@@ -0,0 +1,10 @@
1
+ /** Shared user-message background, typography, and content inset. */
2
+ import type { ComponentPropsWithoutRef } from 'react';
3
+ /** Native div attributes for user-authored message content. */
4
+ export type UserMessageBubbleProps = ComponentPropsWithoutRef<'div'>;
5
+ /**
6
+ * Render user-style message content without row placement or actions.
7
+ * @param props - Native div attributes and the caller-owned content.
8
+ * @returns A theme-aware message surface that wraps its content.
9
+ */
10
+ export declare function UserMessageBubble({ className, ...props }: UserMessageBubbleProps): import("react").JSX.Element;
@@ -0,0 +1,60 @@
1
+ import { type MarkdownLabels } from './markdown/MarkdownText.js';
2
+ /**
3
+ * One citeable source drawn in a search card: the projection of the contract's
4
+ * `WebSource`, with the optional fields kept optional so a provider that
5
+ * returned only a URL still renders (its hostname becomes the label).
6
+ */
7
+ export interface WebSourceView {
8
+ /** The source URL; becomes a safe external link when it is http(s). */
9
+ url: string;
10
+ /** The source title; when absent the URL's hostname labels the link. */
11
+ title?: string | undefined;
12
+ /** A short excerpt or summary shown under the link. */
13
+ snippet?: string | undefined;
14
+ /** Publication/crawl timestamp, a provider-supplied string shown under the link. */
15
+ publishedAt?: string | undefined;
16
+ }
17
+ /** A `web_search` card: an optional answer over a capped citation list. */
18
+ export interface WebSearchBlockProps {
19
+ kind: 'search';
20
+ /** Localized chrome supplied by the owning render site. */
21
+ labels: WebBlockLabels;
22
+ /** The provider-generated answer, rendered as markdown above the sources. */
23
+ answer?: string | undefined;
24
+ /** The cited sources, in provider order. */
25
+ sources: WebSourceView[];
26
+ /** True when the tool cut the source list to its result cap. */
27
+ truncated: boolean;
28
+ /** Extra class merged onto the wrapper (callers position; this component draws). */
29
+ className?: string | undefined;
30
+ }
31
+ /** A `web_fetch` card: the retrieval summary for one fetched URL. */
32
+ export interface WebFetchBlockProps {
33
+ kind: 'fetch';
34
+ /** Localized chrome supplied by the owning render site. */
35
+ labels: WebBlockLabels;
36
+ /** The final URL after allowed redirects; becomes a safe external link when http(s). */
37
+ url: string;
38
+ /** HTTP status code of the fetched response. */
39
+ statusCode: number;
40
+ /** True when the provider or the output cap cut the fetched content. */
41
+ truncated: boolean;
42
+ /** Extra class merged onto the wrapper (callers position; this component draws). */
43
+ className?: string | undefined;
44
+ }
45
+ /** A completed web retrieval card, discriminated by `kind`. */
46
+ export type WebBlockProps = WebSearchBlockProps | WebFetchBlockProps;
47
+ /** Localized chrome for {@link WebBlock}. */
48
+ export interface WebBlockLabels {
49
+ noResults: string;
50
+ sourcesTruncated: string;
51
+ http: string;
52
+ contentTruncated: string;
53
+ markdown: MarkdownLabels;
54
+ }
55
+ /**
56
+ * Render a completed web retrieval as a structured card.
57
+ * @param props - see {@link WebBlockProps}; `kind` selects the search or fetch body.
58
+ * @returns the web card element.
59
+ */
60
+ export declare function WebBlock(props: WebBlockProps): import("react").JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { type DocumentZoomLabels } from './document-zoom.js';
2
+ /** Live percentage display updated independently from the document tree. */
3
+ export interface ZoomControlsHandle {
4
+ /** @param zoom - current gesture scale multiplier. */
5
+ showZoom: (zoom: number) => void;
6
+ }
7
+ /**
8
+ * Present optional fitting, fixed presets, and incremental controls.
9
+ * @param props - committed `zoom`, optional `fit` row (omitted: no fitting row), localized labels, `visible`, optional
10
+ * owner `className`, and zoom and activity callbacks.
11
+ * @param ref - `showZoom` displays a transient scale until `zoom` changes.
12
+ * @returns a localized zoom toolbar.
13
+ */
14
+ export declare const ZoomControls: import("react").ForwardRefExoticComponent<{
15
+ readonly zoom: number;
16
+ readonly fit?: {
17
+ readonly label: string;
18
+ readonly selected: boolean;
19
+ readonly onSelect: () => void;
20
+ } | undefined;
21
+ readonly className?: string | undefined;
22
+ readonly labels: DocumentZoomLabels;
23
+ readonly visible: boolean;
24
+ readonly onZoom: (zoom: number) => void;
25
+ readonly onActiveChange: (active: boolean) => void;
26
+ } & import("react").RefAttributes<ZoomControlsHandle>>;
@@ -0,0 +1,16 @@
1
+ import type { CSSProperties } from 'react';
2
+ /** One run of terminal text; `style` is undefined for text that carries no SGR state. */
3
+ export interface AnsiSpan {
4
+ /** The run's plain text, free of escape sequences and newlines. */
5
+ text: string;
6
+ /** Resolved inline style, or undefined when the run needs no wrapper. */
7
+ style: CSSProperties | undefined;
8
+ }
9
+ /** The spans of one output line, in order. */
10
+ export type AnsiLine = readonly AnsiSpan[];
11
+ /**
12
+ * Parse command output into styled spans grouped by line.
13
+ * @param text - raw output text, which may contain ANSI escape sequences.
14
+ * @returns one entry per output line (always at least one, possibly empty).
15
+ */
16
+ export declare function parseAnsiLines(text: string): AnsiLine[];
@@ -0,0 +1,21 @@
1
+ export { JsonTree } from './JsonTree.js';
2
+ export type { JsonTreeProps, JsonTreeLabels } from './JsonTree.js';
3
+ export { TerminalBlock, DEFAULT_TERMINAL_MAX_LINES } from './TerminalBlock.js';
4
+ export type { TerminalBlockProps, TerminalBlockLabels } from './TerminalBlock.js';
5
+ export { CommandText } from './CommandText.js';
6
+ export type { CommandTextProps } from './CommandText.js';
7
+ export { ReadBlock, DEFAULT_READ_MAX_LINES } from './ReadBlock.js';
8
+ export type { ReadBlockProps, ReadBlockLine, ReadBlockLabels } from './ReadBlock.js';
9
+ export { DiffBlock, DEFAULT_DIFF_MAX_LINES, diffTotals } from './DiffBlock.js';
10
+ export type { DiffBlockProps, DiffHunk, DiffBlockLabels } from './DiffBlock.js';
11
+ export { SearchBlock, DEFAULT_SEARCH_MAX_LINES } from './SearchBlock.js';
12
+ export type { SearchBlockProps, SearchMatchesBlockProps, SearchPathsBlockProps, SearchFileGroup, SearchBlockLineMatch, SearchBlockLabels, } from './SearchBlock.js';
13
+ export { WebBlock } from './WebBlock.js';
14
+ export type { WebBlockProps, WebSearchBlockProps, WebFetchBlockProps, WebSourceView, WebBlockLabels, } from './WebBlock.js';
15
+ export { LinkIconMedium, LinkIconRegular, classifyLinkPath } from './LinkIcon.js';
16
+ export type { LinkIconKind, LinkIconProps } from './LinkIcon.js';
17
+ export { FileTypeIcon, classifyFileType, fileExtension } from './FileTypeIcon.js';
18
+ export type { CodeFileType, FileType, FileTypeIconProps, FileTypeKind, FileTypeProjectContext, } from './FileTypeIcon.js';
19
+ export type { CodeToolbarLabels } from './CodeToolbar.js';
20
+ export { CODE_HIGHLIGHT_EXTENSIONS, languageForPath, useCodeHighlighter } from './code-highlighting.js';
21
+ export type { CodeHighlighter, HighlightSpan } from './code-highlighting.js';
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Write text to the host clipboard, preferring the async Clipboard API and
3
+ * falling back to `execCommand('copy')` on hosts (jsdom, insecure contexts)
4
+ * that omit it.
5
+ * @param text - the exact text to place on the clipboard.
6
+ * @returns true only when the host accepted the write.
7
+ */
8
+ export declare function writeClipboard(text: string): Promise<boolean>;