@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,2 @@
1
+ declare const css: string
2
+ export default css
@@ -0,0 +1,45 @@
1
+ /** React-commit-driven movement and entry/exit fades for keyed rows. */
2
+ import { Component, type AriaRole, type ReactNode } from 'react';
3
+ /** Keyed row content, list semantics, and animation readiness. */
4
+ export interface AnimatedRowsProps {
5
+ children: ReactNode;
6
+ className: string;
7
+ role?: AriaRole;
8
+ label?: string;
9
+ /** Unique DOM-order keys matching the rendered data-row-key attributes. */
10
+ rowKeys: readonly string[];
11
+ ready: boolean;
12
+ /** Changes that replace the view or reveal hidden rows settle immediately. */
13
+ resetKey: string;
14
+ }
15
+ interface RowPosition {
16
+ element: HTMLElement;
17
+ rect: DOMRect;
18
+ opacity: number;
19
+ }
20
+ interface RowSnapshot {
21
+ positions: Map<string, RowPosition>;
22
+ removed: Map<string, RowPosition>;
23
+ }
24
+ /**
25
+ * Animates keyed rows only when their rendered membership or order changes.
26
+ * Motion starts after the first pointer or keyboard input inside the mounted list.
27
+ * The parent supplies a positioned container for the inert exit overlay.
28
+ */
29
+ export declare class AnimatedRows extends Component<AnimatedRowsProps> {
30
+ private armed;
31
+ private readonly list;
32
+ private readonly overlay;
33
+ private readonly movements;
34
+ private readonly exits;
35
+ getSnapshotBeforeUpdate(previous: AnimatedRowsProps): RowSnapshot | null;
36
+ componentDidUpdate(previous: AnimatedRowsProps, _state: unknown, snapshot: RowSnapshot | null): void;
37
+ componentWillUnmount(): void;
38
+ private readPositions;
39
+ private move;
40
+ private cancelMovements;
41
+ private removeExit;
42
+ private clear;
43
+ render(): ReactNode;
44
+ }
45
+ export {};
@@ -0,0 +1,18 @@
1
+ import { type ButtonHTMLAttributes, type ReactNode } from 'react';
2
+ /** Visual variant, each backed by its --dsw-alias-button-* token family. */
3
+ export type ButtonVariant = 'primary' | 'ghost' | 'outline' | 'toolbar';
4
+ /**
5
+ * Render a button.
6
+ * @param props.variant - visual family (default 'ghost'); outlined buttons use a DPR-aware inset stroke.
7
+ * @param props.size - 'md' 36px control with 12px corners or 'sm' 28px control with 8px corners.
8
+ * @param props.icon - optional leading 16px icon node.
9
+ * @param ref - native button for focus management and overlay anchors.
10
+ * @returns the button element; native button attributes pass through.
11
+ */
12
+ export declare const Button: import("react").ForwardRefExoticComponent<{
13
+ variant?: ButtonVariant;
14
+ size?: 'md' | 'sm';
15
+ icon?: ReactNode;
16
+ className?: string | undefined;
17
+ children?: ReactNode;
18
+ } & ButtonHTMLAttributes<HTMLButtonElement> & import("react").RefAttributes<HTMLButtonElement>>;
@@ -0,0 +1,19 @@
1
+ /** Controlled native checkbox with a caller-owned visible and accessible label. */
2
+ /**
3
+ * Render a labeled checkbox with native keyboard and form semantics.
4
+ * @param props.checked - current checked state.
5
+ * @param props.onChange - receives the requested checked state.
6
+ * @param props.label - localized visible and accessible label.
7
+ * @param props.disabled - whether the control refuses changes.
8
+ * @param props.title - optional localized hover text.
9
+ * @param props.className - extra class for the label's placement.
10
+ * @returns the label containing its checkbox.
11
+ */
12
+ export declare function Checkbox({ 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,11 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { IconProps } from './icons/props.js';
3
+ import type { CodeFileType } from './code-file-types.js';
4
+ /**
5
+ * Render one full-color square code-file glyph from the embedded icon set.
6
+ * @param props - Detailed code type, optional size, and optional CSS class.
7
+ * @returns The selected decorative SVG with its identifying palette intact.
8
+ */
9
+ export declare function CodeFileIcon({ type, size, className }: IconProps & {
10
+ readonly type: CodeFileType;
11
+ }): ReactNode;
@@ -0,0 +1,29 @@
1
+ /** Localized language fallback and wrapping actions supplied by the card owner. */
2
+ export interface CodeToolbarLabels {
3
+ /** Title for an absent or unsupported language. */
4
+ codeLabel: string;
5
+ /** Action that enables wrapping. */
6
+ wrapLabel: string;
7
+ /** Action that preserves source columns with horizontal scrolling. */
8
+ unwrapLabel: string;
9
+ }
10
+ /** Display state and callbacks for a code card's toolbar. */
11
+ interface CodeToolbarProps {
12
+ lang?: string | undefined;
13
+ title?: string | undefined;
14
+ status?: string | undefined;
15
+ labels: CodeToolbarLabels;
16
+ copyLabel: string;
17
+ copiedLabel: string;
18
+ copied: boolean;
19
+ wrapped: boolean;
20
+ onCopy?: (() => void) | undefined;
21
+ onWrap?: (() => void) | undefined;
22
+ }
23
+ /**
24
+ * Render a language label and keyboard-accessible icon actions with tooltips.
25
+ * @param props - Localized labels, current state, and card-owned actions.
26
+ * @returns The shared code-card header.
27
+ */
28
+ export declare function CodeToolbar({ lang, title, status, labels, copyLabel, copiedLabel, copied, wrapped, onCopy, onWrap, }: CodeToolbarProps): import("react").JSX.Element;
29
+ export {};
@@ -0,0 +1,15 @@
1
+ /** Display text and owner-localized identification for a command scrollport. */
2
+ export interface CommandTextProps {
3
+ /** Original command or formatted command arguments, without truncation. */
4
+ text: string;
5
+ /** Accessible name while the text can scroll horizontally. */
6
+ label: string;
7
+ /** Owner typography and positioning. */
8
+ className?: string | undefined;
9
+ }
10
+ /**
11
+ * Render command text without adding Tab stops for content that fits.
12
+ * @param props - Text, localized scrollport name, and owner styling.
13
+ * @returns A horizontal text scrollport, named and keyboard-focusable only when overflowing.
14
+ */
15
+ export declare function CommandText({ text, label, className }: CommandTextProps): import("react").JSX.Element;
@@ -0,0 +1,32 @@
1
+ /** Field state and localized controls supplied by the owning form. */
2
+ export interface ConfigFieldProps {
3
+ /** Display label from the owning plugin. */
4
+ label: string;
5
+ /** Editable text; containers may use JSON. */
6
+ value: string;
7
+ /** Hide the input text and disable browser password autofill. */
8
+ secret: boolean;
9
+ /** Finite choices; an empty list uses a text control. */
10
+ choices: readonly string[];
11
+ /** Whether the field is currently read-only. */
12
+ disabled: boolean;
13
+ /** Whether the field has a user override. */
14
+ overridden: boolean;
15
+ /** Whether the draft fails validation. */
16
+ invalid: boolean;
17
+ /** Localized reset, inherited-value choice, and validation text. */
18
+ labels: {
19
+ reset: string;
20
+ inherited: string;
21
+ invalid: string;
22
+ };
23
+ /** Stage a new text value. */
24
+ onChange: (value: string) => void;
25
+ /** Stage removal of the user override. */
26
+ onReset: () => void;
27
+ }
28
+ /** Render a field without owning its schema, draft, or persistence.
29
+ * @param props Controlled field state and actions.
30
+ * @returns A labelled input with reset and validation feedback.
31
+ */
32
+ export declare function ConfigField(props: ConfigFieldProps): import("react").JSX.Element;
@@ -0,0 +1,25 @@
1
+ /** Visual state rendered by {@link ConnectionIndicator}. */
2
+ export type ConnectionIndicatorState = 'disconnected' | 'connecting' | 'recovered';
3
+ /**
4
+ * Render an inline connection-recovery control. The outage and retry-attempt
5
+ * states are one button whose static label already names the retry action;
6
+ * clicking it requests an immediate reconnect. The indicator animates in on
7
+ * appearance and fades out for {@link EXIT_MS} before unmounting.
8
+ * @param props.state - visible outage, retry-attempt, or recovered state.
9
+ * @param props.disconnectedLabel - localized outage text naming the retry action.
10
+ * @param props.connectingLabel - localized retry text followed by the attempt dots.
11
+ * @param props.recoveredLabel - localized recovery confirmation.
12
+ * @param props.reconnectActionLabel - accessible label for the outage action.
13
+ * @param props.restartActionLabel - accessible label for replacing an active attempt.
14
+ * @param props.onReconnect - request an immediate reconnect attempt.
15
+ * @returns the indicator, or null when no connection feedback is active.
16
+ */
17
+ export declare function ConnectionIndicator({ state, disconnectedLabel, connectingLabel, recoveredLabel, reconnectActionLabel, restartActionLabel, onReconnect, }: {
18
+ state: ConnectionIndicatorState | undefined;
19
+ disconnectedLabel: string;
20
+ connectingLabel: string;
21
+ recoveredLabel: string;
22
+ reconnectActionLabel: string;
23
+ restartActionLabel: string;
24
+ onReconnect: () => void;
25
+ }): import("react").JSX.Element | null;
@@ -0,0 +1,77 @@
1
+ import { type ReactNode } from 'react';
2
+ import { type MarkdownLabels, type MarkdownPathImages } from './markdown/MarkdownText.js';
3
+ /** One read of a long Markdown description, such as a plugin's detail document. */
4
+ export type DetailDocumentState = {
5
+ readonly status: 'loading';
6
+ } | {
7
+ readonly status: 'found';
8
+ readonly markdown: string;
9
+ } | {
10
+ readonly status: 'none';
11
+ } | {
12
+ readonly status: 'error';
13
+ readonly message: string;
14
+ };
15
+ /** A read as owners track it: in flight, settled with a document or none, or failed with a localized message. */
16
+ export type DetailDocumentRead = undefined | {
17
+ readonly status: 'loading';
18
+ } | {
19
+ readonly status: 'ready';
20
+ readonly markdown: string | undefined;
21
+ } | {
22
+ readonly status: 'error';
23
+ readonly message: string;
24
+ };
25
+ /**
26
+ * The state {@link DetailDocument} shows for an owner's read: loading until it settles, then the document, none, or the
27
+ * failure.
28
+ * @param read - the owner's read; undefined before it starts.
29
+ * @returns the state to show.
30
+ */
31
+ export declare function detailDocumentState(read: DetailDocumentRead): DetailDocumentState;
32
+ /** Translated strings of a detail document's chrome, as an owner's dictionary supplies them. */
33
+ export interface DetailDocumentCopy {
34
+ readonly title: string;
35
+ readonly loading: string;
36
+ readonly retry: string;
37
+ readonly copy: string;
38
+ readonly copied: string;
39
+ readonly codeBlock: string;
40
+ readonly wrap: string;
41
+ readonly unwrap: string;
42
+ readonly footnotes: string;
43
+ }
44
+ /**
45
+ * Assemble reference-stable labels for {@link DetailDocument} from translated strings.
46
+ * @param copy - the translated strings.
47
+ * @returns labels that keep their identity while the strings stay equal.
48
+ */
49
+ export declare function useDetailDocumentLabels(copy: DetailDocumentCopy): DetailDocumentLabels;
50
+ /** Localized chrome of a detail document. */
51
+ export interface DetailDocumentLabels {
52
+ /** Accessible name of the scrollable document region; the section shows no heading of its own. */
53
+ readonly title: string;
54
+ /** Accessible name of the loading placeholder. */
55
+ readonly loading: string;
56
+ /** Retry button text. */
57
+ readonly retry: string;
58
+ readonly markdown: MarkdownLabels;
59
+ }
60
+ /**
61
+ * A section showing a long Markdown description, without a heading of its own: three skeleton lines while it loads, the
62
+ * document once found, or the owner's failure message with a retry. Nothing renders for `none`. A document taller than
63
+ * the section's height limit scrolls inside it, and the scroll region, named by `labels.title`, takes keyboard focus.
64
+ * Raw HTML is omitted, relative links stay text, and only images the owner's `images` resolver accepts, or absolute
65
+ * HTTP(S) images, load.
66
+ * @param props.state - the read to show.
67
+ * @param props.labels - localized region name, placeholder name, retry text, and Markdown chrome; keep `markdown` reference-stable.
68
+ * @param props.images - resolves the document's relative image destinations to displayable URLs.
69
+ * @param props.onRetry - reads the document again after a failure.
70
+ * @returns the section, or null.
71
+ */
72
+ export declare function DetailDocument({ state, labels, images, onRetry, }: {
73
+ readonly state: DetailDocumentState;
74
+ readonly labels: DetailDocumentLabels;
75
+ readonly images?: MarkdownPathImages | undefined;
76
+ readonly onRetry: () => void;
77
+ }): ReactNode;
@@ -0,0 +1,51 @@
1
+ import { type CodeToolbarLabels } from './CodeToolbar.js';
2
+ /** Output lines shown before the height cap collapses the middle. */
3
+ export declare const DEFAULT_DIFF_MAX_LINES = 16;
4
+ /**
5
+ * One file change in the form {@link DiffBlock} renders. It is declared here
6
+ * so this primitive stays independent of the tool contract.
7
+ */
8
+ export interface DiffHunk {
9
+ /** The changed file's path, drawn verbatim as the hunk's header (the tool's model-facing path). */
10
+ path: string;
11
+ /** Prior content including context, or `null` when no prior content is available. */
12
+ oldText: string | null;
13
+ /** Content after the change, including any shared context. */
14
+ newText: string;
15
+ }
16
+ export interface DiffBlockProps {
17
+ /** One entry per applied hunk, in file order; empty renders nothing. */
18
+ diffs: DiffHunk[];
19
+ /** Localized chrome supplied by the owning render site. */
20
+ labels: DiffBlockLabels;
21
+ /** Height cap in body lines before the middle collapses (default {@link DEFAULT_DIFF_MAX_LINES}). */
22
+ maxLines?: number | undefined;
23
+ /** Extra class merged onto the wrapper (callers position; this component draws). */
24
+ className?: string | undefined;
25
+ }
26
+ /** Localized chrome for {@link DiffBlock}. */
27
+ export interface DiffBlockLabels extends CodeToolbarLabels {
28
+ copy: string;
29
+ copied: string;
30
+ collapseAria: string;
31
+ expandAria: (hidden: number) => string;
32
+ collapse: string;
33
+ expand: (hidden: number) => string;
34
+ }
35
+ /**
36
+ * Count displayed additions and deletions. Exact patches exclude shared context;
37
+ * comparisons exceeding the edit limit count both complete fragments as replaced.
38
+ * Text follows {@link contentLines}'s terminator rule.
39
+ * @param diffs - the hunks to count.
40
+ * @returns the +/- totals for tool summaries.
41
+ */
42
+ export declare function diffTotals(diffs: DiffHunk[]): {
43
+ added: number;
44
+ removed: number;
45
+ };
46
+ /**
47
+ * Render a file mutation as an inline diff surface.
48
+ * @param props - see {@link DiffBlockProps}.
49
+ * @returns the diff block element.
50
+ */
51
+ export declare function DiffBlock({ diffs, labels, maxLines, className }: DiffBlockProps): import("react").JSX.Element | null;
@@ -0,0 +1,37 @@
1
+ import { type ReactNode } from 'react';
2
+ /** Shared 24px process row: tertiary text and icons, secondary on hover. */
3
+ export interface DisclosureRowProps {
4
+ icon: ReactNode;
5
+ title: string;
6
+ open: boolean;
7
+ expandable: boolean;
8
+ onToggle: () => void;
9
+ /** Animate the complete header while its owning operation is running. */
10
+ running?: boolean | undefined;
11
+ /** Makes the title row the disclosure target; with an accessory, it shrinks to its content width. */
12
+ expandOnRowClick?: boolean | undefined;
13
+ /** Replaces the collapsed icon with a chevron while the row is hovered. */
14
+ previewChevron?: boolean | undefined;
15
+ /** Keeps `collapsedContent` inline while open. */
16
+ keepContentWhenOpen?: boolean | undefined;
17
+ collapsedContent?: ReactNode;
18
+ /** Independent action beside the title, outside the disclosure target and shimmer. */
19
+ headerAccessory?: ReactNode;
20
+ children?: ReactNode;
21
+ className?: string | undefined;
22
+ rowClassName?: string | undefined;
23
+ /** Sizing class for the header text area, beside the leading icon. */
24
+ contentClassName?: string | undefined;
25
+ /** Layout class shared by the header text and its decorative copy. */
26
+ contentLayoutClassName?: string | undefined;
27
+ leadingClassName?: string | undefined;
28
+ chevronClassName?: string | undefined;
29
+ titleClassName?: string | undefined;
30
+ }
31
+ /**
32
+ * Render one disclosure header and its controlled expanded content.
33
+ * Shallow prop comparison requires stable callbacks and React nodes to skip unchanged renders.
34
+ * @param props - Visual content, controlled state, and interaction policy.
35
+ * @returns the disclosure row.
36
+ */
37
+ export declare const DisclosureRow: import("react").MemoExoticComponent<({ icon, title, open, expandable, onToggle, running, expandOnRowClick, previewChevron, keepContentWhenOpen, collapsedContent, headerAccessory, children, className, rowClassName, contentClassName, contentLayoutClassName, leadingClassName, chevronClassName, titleClassName, }: DisclosureRowProps) => import("react").JSX.Element>;
@@ -0,0 +1,18 @@
1
+ /** Original-image drag gestures owned by a presentation primitive. */
2
+ import { type ImgHTMLAttributes } from 'react';
3
+ import type { FileDragActions } from './file-drag-actions.js';
4
+ /** Image presentation plus original content and explicit file preparation callbacks. */
5
+ export interface DraggableImageProps extends Omit<ImgHTMLAttributes<HTMLImageElement>, 'src' | 'draggable' | 'onDragStart' | 'onDragEnd' | 'onPointerEnter' | 'onPointerLeave' | 'onPointerDown' | 'onPointerUp' | 'onClickCapture'> {
6
+ readonly fileDrag: FileDragActions;
7
+ readonly src: string;
8
+ readonly name: string;
9
+ readonly resourceAddress?: string | undefined;
10
+ readonly original?: File | undefined;
11
+ }
12
+ /**
13
+ * Render an image with original-file dragging; using explicit application-owned callbacks.
14
+ * @param props - image attributes, original filename and file preparation callbacks.
15
+ * @param ref - image element for measurement and pointer-mode bindings.
16
+ * @returns a draggable image that suppresses only the mouse click following its drag.
17
+ */
18
+ export declare const DraggableImage: import("react").ForwardRefExoticComponent<DraggableImageProps & import("react").RefAttributes<HTMLImageElement>>;
@@ -0,0 +1,42 @@
1
+ import type { ReactNode } from 'react';
2
+ import { type CodeFileType, type FileTypeProjectContext } from './code-file-types.js';
3
+ import type { IconProps } from './icons/props.js';
4
+ /** File categories with distinct 28px glyphs. */
5
+ export type FileType = CodeFileType | 'code' | 'excel' | 'folder' | 'html' | 'image' | 'markdown' | 'other' | 'pdf' | 'ppt' | 'video' | 'word';
6
+ /** Compatibility name for consumers that pass an already resolved category. */
7
+ export type FileTypeKind = FileType;
8
+ type ClassifiedFileType = Exclude<FileType, 'folder'>;
9
+ export type { CodeFileType, FileTypeProjectContext } from './code-file-types.js';
10
+ /** Props for {@link FileTypeIcon}: either a path to classify or an already resolved kind. */
11
+ export type FileTypeIconProps = IconProps & ({
12
+ /** File path or name to classify. */
13
+ readonly path: string;
14
+ /** Optional project-file snapshot for context-sensitive code icons such as Flutter. */
15
+ readonly context?: FileTypeProjectContext | undefined;
16
+ } | {
17
+ /** Explicit category for callers that already resolved the file type. */
18
+ readonly kind: FileTypeKind;
19
+ });
20
+ /**
21
+ * Extract the final suffix from a file path without changing its case.
22
+ * A leading dot starts a suffix, while a missing or trailing dot returns an empty string.
23
+ * @param path - File path or basename using either path separator.
24
+ * @returns The characters after the basename's final dot.
25
+ */
26
+ export declare function fileExtension(path: string): string;
27
+ /**
28
+ * Classify a file path or name for file-card presentation.
29
+ * Matching is case-insensitive and applies code filename rules before extension rules;
30
+ * unknown names fall back to `other`.
31
+ * @param path - File path or basename using either path separator.
32
+ * @param context - Optional project files used by context-sensitive code mappings.
33
+ * @returns The file's closed presentation category.
34
+ */
35
+ export declare function classifyFileType(path: string, context?: FileTypeProjectContext): ClassifiedFileType;
36
+ /**
37
+ * Render a decorative file-type glyph for a path or an explicitly resolved kind.
38
+ * @param props - Path or kind selection, optional project context, size, and CSS class.
39
+ * @returns The category-colored SVG; the caller owns the accessible name and may override
40
+ * the color through `--dsh-file-type-icon-color`.
41
+ */
42
+ export declare function FileTypeIcon(props: FileTypeIconProps): ReactNode;
@@ -0,0 +1,19 @@
1
+ interface FoldToggleProps {
2
+ className: string | undefined;
3
+ expanded: boolean;
4
+ hidden: number;
5
+ labels: {
6
+ collapseAria: string;
7
+ expandAria: (hidden: number) => string;
8
+ collapse: string;
9
+ expand: (hidden: number) => string;
10
+ };
11
+ onToggle: () => void;
12
+ }
13
+ /**
14
+ * Render the shared head-tail fold control with caller-owned localized copy.
15
+ * @param props - Fold state, localized labels, and toggle callback.
16
+ * @returns The accessible expand or collapse button.
17
+ */
18
+ export declare function FoldToggle({ className, expanded, hidden, labels, onToggle }: FoldToggleProps): import("react").JSX.Element;
19
+ export {};
@@ -0,0 +1,44 @@
1
+ import type { ReactNode, RefObject } from 'react';
2
+ /**
3
+ * Render an anchor with a hover-triggered preview card independently of nested tooltips.
4
+ * Touch entry does not open a preview or intercept the anchor's action.
5
+ * @param props.anchor - the hover target (rendered in place inside a wrapper span).
6
+ * @param props.content - card content; the pointer may rest on it, so it is
7
+ * readable and selectable, but it carries no dismissal affordance of its own.
8
+ * @param props.openDelayMs - hover dwell before the card shows (default 500).
9
+ * @param props.variant - compact card beside the anchor, or a preview above/below it
10
+ * with 24px side insets, a 420px height cap, the frame-top clearance (capped below an anchor inside the top strip),
11
+ * and 100ms opacity transitions.
12
+ * @param props.widthAnchorRef - optional element whose width and horizontal position size the preview.
13
+ * @param props.inline - keep the anchor in prose; show a contained preview on hover or keyboard focus.
14
+ * Its hover region connects the anchor and preview across the visual gap.
15
+ * @param props.fitContent - size an inline card to its content within the usual width cap.
16
+ * @param props.disabled - suppress opening; turning true dismisses an open card.
17
+ * @param props.grouped - share first-display dwell across the surrounding list and active portal.
18
+ * Group replacement removes the previous card immediately, including a fading preview.
19
+ * @param props.copyText - optional primary value copied by activation and
20
+ * included in the card's accessible name.
21
+ * @param props.copyLabel - localized accessible activation-label prefix.
22
+ * @param props.copiedLabel - localized visible success label.
23
+ * @returns anchor wrapper with the conditional portaled card.
24
+ */
25
+ export declare function HoverCard({ anchor, content, openDelayMs, disabled, grouped, copyText, copyLabel, copiedLabel, variant, widthAnchorRef, inline, fitContent, }: {
26
+ anchor: ReactNode;
27
+ /** Inline media preview using the shared menu material and keyboard focus. */
28
+ inline?: boolean;
29
+ fitContent?: boolean;
30
+ content: ReactNode;
31
+ openDelayMs?: number;
32
+ disabled?: boolean;
33
+ grouped?: boolean;
34
+ variant?: 'compact' | 'preview';
35
+ widthAnchorRef?: RefObject<HTMLElement | null>;
36
+ } & ({
37
+ copyText?: string | undefined;
38
+ copyLabel: string;
39
+ copiedLabel: string;
40
+ } | {
41
+ copyText?: undefined;
42
+ copyLabel?: string;
43
+ copiedLabel?: string;
44
+ })): import("react").JSX.Element;
@@ -0,0 +1,24 @@
1
+ import { type ReactNode } from 'react';
2
+ interface GroupState {
3
+ isWarm: () => boolean;
4
+ enter: (overCard: boolean) => void;
5
+ leave: () => void;
6
+ containsCard: (target: EventTarget | null) => boolean;
7
+ shown: (owner: symbol, dismiss: () => void, element: HTMLElement) => void;
8
+ release: (owner: symbol) => void;
9
+ }
10
+ /** Private coordination shared only by opted-in HoverCards inside one mounted group. */
11
+ export declare const HoverCardGroupContext: import("react").Context<GroupState | null>;
12
+ /**
13
+ * Share first-display dwell across a list and its active portal, including the card's existing pointer grace.
14
+ * @param props.children - list contents, including opted-in HoverCards.
15
+ * @param props.className - classes for the physical list container.
16
+ * @param props.as - physical container tag; use span to preserve inline text layout.
17
+ * @returns the list container and its private hover coordinator.
18
+ */
19
+ export declare function HoverCardGroup({ children, className, as: Container, }: {
20
+ children: ReactNode;
21
+ className?: string | undefined;
22
+ as?: 'div' | 'span';
23
+ }): import("react").JSX.Element;
24
+ export {};
@@ -0,0 +1,29 @@
1
+ import type { HTMLAttributes } from 'react';
2
+ /** Lightbox strings the owner resolves from its own locale namespace. */
3
+ export interface ImageLightboxLabels {
4
+ /** Accessible name of the preview dialog. */
5
+ dialog: string;
6
+ /** Accessible label of the close control. */
7
+ close: string;
8
+ }
9
+ /**
10
+ * Document-level original-image preview opened by clicking a thumbnail.
11
+ * Closes on Escape, backdrop press, or the close control, and restores focus
12
+ * to the opener on unmount. Rendered through a body portal: an opener inside
13
+ * a transformed or filtered ancestor would otherwise trap the fixed backdrop
14
+ * in that ancestor's box instead of covering the viewport.
15
+ *
16
+ * @param props.src - the original image URL.
17
+ * @param props.alt - the image's alt text.
18
+ * @param props.labels - dialog and close-control strings.
19
+ * @param props.contextMenuProps - optional original-image gesture bindings.
20
+ * @param props.onClose - dismiss callback owned by the opener.
21
+ * @returns the modal preview dialog.
22
+ */
23
+ export declare function ImageLightbox({ src, alt, labels, onClose, contextMenuProps, }: {
24
+ src: string;
25
+ alt: string;
26
+ labels: ImageLightboxLabels;
27
+ onClose: () => void;
28
+ contextMenuProps?: Pick<HTMLAttributes<HTMLElement>, 'onContextMenu' | 'onKeyDown' | 'tabIndex'> | undefined;
29
+ }): import("react").ReactPortal;
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Render an image without introducing a second activation target.
3
+ * @param props - Source, accessible description, localized status.
4
+ * @returns A contained preview with loading or failure status.
5
+ */
6
+ export declare function ImagePreview({ src, alt, loadingLabel, failedLabel, }: {
7
+ src: string;
8
+ alt: string;
9
+ loadingLabel: string;
10
+ failedLabel: string;
11
+ }): import("react").JSX.Element;
@@ -0,0 +1,22 @@
1
+ /** Multi-line inline editor for short saved-on-Enter drafts such as queued messages and goals. */
2
+ /**
3
+ * Render an autofocused textarea that grows with its text up to six lines, then scrolls.
4
+ * A textarea rather than an input: HTML strips newlines from single-line input values.
5
+ * Enter saves, Shift+Enter breaks the line, Enter during IME composition does nothing,
6
+ * and Escape cancels.
7
+ * @param props.value - current draft text.
8
+ * @param props.label - localized accessible name.
9
+ * @param props.onChange - receives the edited text.
10
+ * @param props.onSave - called for a plain Enter.
11
+ * @param props.onCancel - called for Escape.
12
+ * @param props.className - extra class for the editor's placement.
13
+ * @returns the textarea.
14
+ */
15
+ export declare function InlineEditor({ value, label, onChange, onSave, onCancel, className, }: {
16
+ value: string;
17
+ label: string;
18
+ onChange: (value: string) => void;
19
+ onSave: () => void;
20
+ onCancel: () => void;
21
+ className?: string;
22
+ }): import("react").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import { type InputHTMLAttributes, type ReactNode } from 'react';
2
+ /**
3
+ * Render a text input with an optional leading icon.
4
+ * @param props.icon - optional 16px leading icon node.
5
+ * @param ref - the native input, cleared when it unmounts.
6
+ * @returns wrapper span containing the native input; input attributes pass through.
7
+ */
8
+ export declare const Input: import("react").ForwardRefExoticComponent<{
9
+ icon?: ReactNode;
10
+ className?: string;
11
+ } & InputHTMLAttributes<HTMLInputElement> & import("react").RefAttributes<HTMLInputElement>>;