@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,58 @@
1
+ /**
2
+ * Display copy for the tree's copy affordance; the owner passes localized
3
+ * labels (this package is cordis-free, so copy arrives via props).
4
+ */
5
+ export interface JsonTreeLabels {
6
+ /** Menu item: copy the raw primitive value. */
7
+ copyValue: string;
8
+ /** Menu item: copy the value as compact JSON (primitive rows). */
9
+ copyJson: string;
10
+ /** Menu item: copy the property path. */
11
+ copyPath: string;
12
+ /** Menu item: copy the value as pretty-printed JSON. */
13
+ copyPrettyJson: string;
14
+ /** Menu item: copy the value as compact JSON (object rows). */
15
+ copyCompactJson: string;
16
+ /** Copy-button state label after a successful copy. */
17
+ copied: string;
18
+ /** Copy-button state label after a failed copy. */
19
+ copyFailed: string;
20
+ /** Expander aria label while expanded. */
21
+ collapseNode: string;
22
+ /** Expander aria label while collapsed. */
23
+ expandNode: string;
24
+ /** Copy-button tooltip, given the current action label. */
25
+ copyButtonTitle: (action: string) => string;
26
+ }
27
+ /** Props for the read-only, token-themed JSON tree. */
28
+ export interface JsonTreeProps {
29
+ /** Parsed JSON object or array. */
30
+ data: object | unknown[];
31
+ /** Accessible label for the tree. */
32
+ label: string;
33
+ /** Optional positioning class owned by the caller. */
34
+ className?: string | undefined;
35
+ /** Maximum visible lines per collapsed string; defaults to 3. */
36
+ collapsedStringLines?: number;
37
+ /** Optional wrap toggle; each expansion reads the shared default without changing other open strings. */
38
+ stringWrapping?: {
39
+ /** Localized label for the wrapping toggle. */
40
+ label: string;
41
+ /** Read the wrapping preference when a string is expanded. @returns Whether to wrap long lines. */
42
+ getDefault: () => boolean;
43
+ /** Remember a user toggle for future expansions. @param wrapped - Whether to wrap long lines. */
44
+ setDefault: (wrapped: boolean) => void;
45
+ } | undefined;
46
+ /** Whether JSON rows expose copy actions. */
47
+ copyable?: boolean;
48
+ /** Whether the top-level object or array is always expanded. */
49
+ expandTopLevel?: boolean;
50
+ /** Localized display copy supplied by the owning render site. */
51
+ labels: JsonTreeLabels;
52
+ }
53
+ /**
54
+ * Render parsed JSON as a compact, keyboard-accessible inspector tree.
55
+ * @param props - Parsed data, accessible label, and display options.
56
+ * @returns A read-only JSON tree with an optionally fixed-open top level.
57
+ */
58
+ export declare function JsonTree({ data, label, className, collapsedStringLines, stringWrapping, copyable, expandTopLevel, labels, }: JsonTreeProps): import("react").JSX.Element;
@@ -0,0 +1,33 @@
1
+ /**
2
+ * Leading current-color category glyphs for clickable artifact links. The
3
+ * public component keeps individual artwork private to the link vocabulary.
4
+ */
5
+ import type { ReactNode } from 'react';
6
+ import type { IconProps } from './icons/props.js';
7
+ /** Link categories with distinct leading glyphs. */
8
+ export type LinkIconKind = 'url' | 'folder' | 'code' | 'image' | 'document' | 'other';
9
+ /** Props for link icons: the category plus the shared icon sizing seat. */
10
+ export interface LinkIconProps extends IconProps {
11
+ kind: LinkIconKind;
12
+ /** Destination of a URL link; known HTTP(S) hosts render their site mark. */
13
+ href?: string | undefined;
14
+ }
15
+ /**
16
+ * Derive a file path's link-icon category from its extension. Unknown and
17
+ * missing extensions fall to `other` (the plain-paper glyph).
18
+ * @param path - File path as the producing tool spelled it (either separator).
19
+ * @returns The file's glyph category; never `url` or `folder`.
20
+ */
21
+ export declare function classifyLinkPath(path: string): LinkIconKind;
22
+ /**
23
+ * Render a regular one-pixel link icon.
24
+ * @param props - Link category, size, and optional class.
25
+ * @returns The regular decorative link glyph.
26
+ */
27
+ export declare function LinkIconRegular(props: LinkIconProps): ReactNode;
28
+ /**
29
+ * Render a medium 1.3px link icon.
30
+ * @param props - Link category, size, and optional class.
31
+ * @returns The medium decorative link glyph.
32
+ */
33
+ export declare function LinkIconMedium(props: LinkIconProps): ReactNode;
@@ -0,0 +1,163 @@
1
+ import type { ReactNode } from 'react';
2
+ /** Selectable row (optionally with a nested submenu). */
3
+ export interface MenuItem {
4
+ id: string;
5
+ label: ReactNode;
6
+ disabled?: boolean;
7
+ /** Effective binding supplied by the command owner; omitted for unbound actions. */
8
+ shortcut?: {
9
+ keys: readonly string[];
10
+ aria?: string | undefined;
11
+ };
12
+ /** Leading icon (figma .Menu_cell gap 8). */
13
+ icon?: ReactNode;
14
+ /** Destructive row: error-colored text/icon and danger hover fill. */
15
+ danger?: boolean;
16
+ /** Nested card opened to the right on hover/focus. */
17
+ submenu?: readonly MenuEntry[];
18
+ }
19
+ /** Hairline between item groups (not selectable). */
20
+ export interface MenuSeparator {
21
+ type: 'separator';
22
+ id: string;
23
+ }
24
+ /** Non-interactive heading row above a group of items. */
25
+ export interface MenuLabel {
26
+ type: 'label';
27
+ id: string;
28
+ text: string;
29
+ }
30
+ /** One primary-menu entry: a row, a separator, or a heading label. */
31
+ export type MenuEntry = MenuItem | MenuSeparator | MenuLabel;
32
+ /** Props for one component-rendered menu row. */
33
+ export interface MenuItemButtonProps {
34
+ /** Visible row label. */
35
+ children: ReactNode;
36
+ /** Effective binding supplied by the command owner; omitted for unbound actions. */
37
+ shortcut?: MenuItem['shortcut'];
38
+ /** Leading icon (figma .Menu_cell gap 8). */
39
+ icon?: ReactNode;
40
+ /** Whether this row identifies the currently displayed page or view. */
41
+ current?: boolean;
42
+ /** Whether the row cannot be activated. */
43
+ disabled?: boolean;
44
+ /**
45
+ * Why the disabled row cannot be activated. The row then stays hoverable and
46
+ * focusable, shows the reason in a tooltip, and exposes it as the row's
47
+ * description; an enabled row ignores it.
48
+ */
49
+ disabledReason?: string | undefined;
50
+ /** Destructive row: error-colored text/icon and danger hover fill. */
51
+ danger?: boolean;
52
+ /**
53
+ * Start a new group: a hairline above this row, the same one a
54
+ * `{ type: 'separator' }` data entry draws. It comes and goes with the row,
55
+ * so a row that renders nothing leaves no stray line; a data separator
56
+ * directly before it draws no second line, and the list's first row draws none.
57
+ */
58
+ separatorBefore?: boolean;
59
+ /** Row activation (click, Enter, or Tab on the focused row). */
60
+ onSelect: () => void;
61
+ }
62
+ /**
63
+ * Render one `role="menuitem"` row for a {@link Menu} whose rows are
64
+ * components rather than `items` data: the same markup and styling as a data
65
+ * row, so it joins the list's keyboard walk and post-selection focus return
66
+ * without any shared state. Closing the menu stays the owner's decision, as
67
+ * it is for data rows.
68
+ * @param props.children - visible row label.
69
+ * @param props.shortcut - effective key labels and accessible combination.
70
+ * @param props.icon - optional leading icon.
71
+ * @param props.current - whether the row identifies the currently displayed page or view.
72
+ * @param props.disabled - whether the row cannot be activated.
73
+ * @param props.disabledReason - why a disabled row cannot be activated, shown in a tooltip and read as its description.
74
+ * @param props.danger - whether to use the destructive row colors.
75
+ * @param props.separatorBefore - whether this row starts a new group (hairline above it).
76
+ * @param props.onSelect - row activation callback.
77
+ * @returns one menu-item row.
78
+ */
79
+ export declare function MenuItemButton({ children, shortcut, icon, current, disabled, disabledReason, danger, separatorBefore, onSelect, }: MenuItemButtonProps): import("react").JSX.Element;
80
+ /**
81
+ * Render an anchored dropdown menu. While the list is open its keys mirror the
82
+ * composer's: Tab settles the focused row — from the trigger, Tab enters the
83
+ * list instead — and Escape or Shift+Tab close it and return focus to the
84
+ * anchor's first button, and selecting a row does the same — the rows unmount
85
+ * with the list. Only a keyboard on the trigger or inside the list is
86
+ * intercepted; Tab presses elsewhere on the page stay the browser's.
87
+ * @param props.contextual - cursor positioning, context dismissal, and per-divider icon alignment.
88
+ * @param props.exiting - retain an inert popup during dismissal or replacement fade.
89
+ * @param props.returnFocus - original control captured before asynchronous menu preparation.
90
+ * @param props.autoFocus - focus the first item on open; the arrow keys walk the list either way.
91
+ * @param props.open - whether the list is showing (owner-controlled).
92
+ * @param props.anchor - the trigger element (rendered in place).
93
+ * @param props.items - selectable data rows and optional separators (default none; with no `children` either, the list is empty).
94
+ * @param props.selectedId - row shown as selected.
95
+ * @param props.selectedIds - rows shown as selected when a menu contains independent option groups.
96
+ * @param props.onSelect - data-row activation callback (not called for disabled rows or submenu parents that only open children).
97
+ * @param props.onClose - invoked on outside click, Escape, or a window blur
98
+ * that moved focus into an iframe (the only signal a pointerdown inside a
99
+ * cross-origin iframe leaves).
100
+ * @param props.align - list alignment against the anchor (default 'start').
101
+ * @param props.side - open below (`bottom`, default) or above (`top`) the anchor.
102
+ * @param props.portal - render the list into document.body, fixed-positioned
103
+ * synchronously (follows movement, resizing, and browser zoom while open)
104
+ * and clamped inside the visual viewport. Use when an ancestor's overflow clipping would crop the
105
+ * in-place list; default false keeps the pure-CSS in-place behavior.
106
+ * @param props.closeOnPointerLeave - close the list once the pointer has left
107
+ * both trigger and list for the pointer grace (default false keeps it open
108
+ * until outside click/Escape/selection). The grace makes the 4px trigger->list
109
+ * gap and a brief overshoot survivable; coming back cancels the close.
110
+ * @param props.dense - reduce vertical row spacing without changing the standard typography or card width.
111
+ * @param props.compact - use reduced menu typography and spacing.
112
+ * @param props.getAnchorRect - portal mode only: supply the anchor rect
113
+ * directly (e.g. from a host-owned trigger button) instead of measuring the
114
+ * Menu's own wrapper span. Required when the wrapper isn't itself laid out at
115
+ * the trigger (render-prop anchors, effect-positioned proxies — measuring the
116
+ * wrapper there races the host's layout effects). Called while tracking the
117
+ * anchor and on scroll/resize; return null to defer placement.
118
+ * @param props.minWidthFromAnchor - in portal mode, keep the menu at least as wide as its anchor, bounded by viewport margins.
119
+ * @param props.footer - rows pinned below the scrolling items area, separated
120
+ * by a hairline; contextual menus reuse an explicit leading separator. These rows stay visible while the items above scroll.
121
+ * @param props.children - component rows rendered after `items` in the same
122
+ * list, each a `role="menuitem"` button such as {@link MenuItemButton}; they
123
+ * share the keyboard walk, the submenu exclusivity, and the post-selection
124
+ * focus return.
125
+ * @param props.selection - how a selected row is marked: a trailing check
126
+ * (`'check'`, default — figma .Menu_cell) or the hover fill held on the row
127
+ * with no check (`'fill'`, for icon-labelled rows where a trailing glyph
128
+ * crowds the cell).
129
+ * @param props.className - extra class on the anchor wrapper span.
130
+ * @param props.listClassName - extra class on the dropdown card itself; the
131
+ * only style hook that reaches a portaled list, which renders under
132
+ * document.body outside the owner's DOM subtree.
133
+ * @returns anchor wrapper with the conditional list.
134
+ */
135
+ export declare function Menu({ open, anchor, items, children, selectedId, selectedIds, onSelect, onClose, align, side, portal, closeOnPointerLeave, dense, compact, autoFocus, selection, getAnchorRect, minWidthFromAnchor, footer, className, listClassName, contextual, exiting, returnFocus, }: {
136
+ open: boolean;
137
+ /** Pointer-positioned popup: cursor clearance, grouped icons, and context gestures. */
138
+ contextual?: boolean;
139
+ /** Resolve the original control for focus restoration and inert/hidden dismissal. */
140
+ returnFocus?: (() => HTMLElement | null) | undefined;
141
+ /** Retain a dismissed context popup during its short fade. */
142
+ exiting?: 'dismiss' | 'replace' | undefined;
143
+ autoFocus?: boolean;
144
+ anchor: ReactNode;
145
+ items?: readonly MenuEntry[];
146
+ children?: ReactNode;
147
+ footer?: readonly MenuEntry[];
148
+ selectedId?: string | undefined;
149
+ selectedIds?: readonly string[] | undefined;
150
+ onSelect?: (id: string) => void;
151
+ onClose: () => void;
152
+ align?: 'start' | 'end';
153
+ side?: 'bottom' | 'top' | 'right';
154
+ portal?: boolean;
155
+ closeOnPointerLeave?: boolean;
156
+ dense?: boolean;
157
+ compact?: boolean;
158
+ selection?: 'check' | 'fill';
159
+ getAnchorRect?: () => DOMRect | null;
160
+ minWidthFromAnchor?: boolean;
161
+ className?: string | undefined;
162
+ listClassName?: string | undefined;
163
+ }): import("react").JSX.Element;
@@ -0,0 +1,21 @@
1
+ /** Accessible menu groups with shared sticky-heading presentation and viewport observation. */
2
+ import { type ReactNode } from 'react';
3
+ /**
4
+ * Render a named group with an instance-owned heading id and an inaccessible position sentinel.
5
+ * @param props - Caller-localized label and optional menu rows.
6
+ * @returns A section named by its direct heading, followed by the supplied children.
7
+ */
8
+ export declare function MenuGroup({ label, children }: {
9
+ label: string;
10
+ children?: ReactNode;
11
+ }): import("react").JSX.Element;
12
+ /**
13
+ * Update heading backgrounds asynchronously from native intersection and viewport-size observations.
14
+ * Headings remain transparent until observations identify a section crossing the viewport top.
15
+ * Without IntersectionObserver or ResizeObserver, CSS sticky headings remain transparent.
16
+ * Group membership is captured at setup; dispose before observing changed groups or the same viewport again.
17
+ * @param viewport - Unpadded, borderless scroll container with direct MenuGroup children.
18
+ * @returns Cleanup owning both intersection observers and the viewport resize observer; disconnects
19
+ * them, ignores queued callbacks, and clears managed data-stuck attributes. No valid groups acquires nothing.
20
+ */
21
+ export declare function observeStickyMenuGroups(viewport: HTMLElement): () => void;
@@ -0,0 +1,24 @@
1
+ /** Shared menu material and the macOS backing that lets Chromium blur transparent windows. */
2
+ import { type ComponentPropsWithoutRef } from 'react';
3
+ /** Context-menu transition durations in milliseconds, shared with its lifecycle owner. */
4
+ export declare const MENU_TRANSITION_MS: Readonly<{
5
+ enter: 40;
6
+ dismiss: 80;
7
+ replace: 10;
8
+ prepare: 20;
9
+ }>;
10
+ /** Menu containers preserve native div props and refs. */
11
+ export interface MenuSurfaceProps extends ComponentPropsWithoutRef<'div'> {
12
+ /** Match the shared compact menu's smaller outer radius. */
13
+ compact?: boolean;
14
+ /** Fade direct content, material, and native backing without isolating the material's backdrop. */
15
+ phase?: 'enter' | 'dismiss' | 'replace' | undefined;
16
+ }
17
+ /**
18
+ * Paint a menu and, on macOS, an opaque backing behind the page content within its bounds.
19
+ * CSS anchors keep each backing aligned during placement, resizing, and nested-menu movement.
20
+ * @param props - Div content and placement, and compact geometry.
21
+ * @param ref - The visible menu div, excluding the non-interactive backing.
22
+ * @returns Menu content plus a backing portal removed with the menu.
23
+ */
24
+ export declare const MenuSurface: import("react").ForwardRefExoticComponent<MenuSurfaceProps & import("react").RefAttributes<HTMLDivElement>>;
@@ -0,0 +1,43 @@
1
+ import type { KeyboardEventHandler, ReactNode } from 'react';
2
+ interface ModalBaseProps {
3
+ open: boolean;
4
+ onClose: () => void;
5
+ title: string;
6
+ description?: string;
7
+ children?: ReactNode;
8
+ footer?: ReactNode;
9
+ className?: string;
10
+ contentClassName?: string;
11
+ shortcutModal?: string;
12
+ onKeyDownCapture?: KeyboardEventHandler<HTMLDivElement>;
13
+ backdropBlur?: boolean;
14
+ }
15
+ type ModalProps = ModalBaseProps & ({
16
+ headless: true;
17
+ closeLabel?: never;
18
+ } | {
19
+ headless?: false;
20
+ closeLabel: string;
21
+ });
22
+ /**
23
+ * Render a centered, body-portaled modal over a blurred page mask.
24
+ * @param props.open - whether the dialog is showing.
25
+ * @param props.onClose - application close command, Escape, or mask click; while a menu is open inside the
26
+ * dialog, Escape belongs to that menu first.
27
+ * @param props.title - dialog heading (aria-label in every mode).
28
+ * @param props.closeLabel - localized accessible close-button label.
29
+ * @param props.description - optional supporting sentence under the title.
30
+ * @param props.children - dialog body; mark its initial-focus control with
31
+ * data-modal-autofocus instead of React autoFocus to preserve return focus.
32
+ * @param props.footer - action row (Cancel / Create).
33
+ * @param props.contentClassName - optional class for a scrollable content region.
34
+ * @param props.backdropBlur - disable when the caller already blurs the page; defaults to true.
35
+ * @param props.shortcutModal - command scope allowed by shortcut owners; unnamed
36
+ * dialogs block application commands unless their owner allows the "other" scope.
37
+ * @param props.headless - render children directly in the card (no default
38
+ * header/close/body chrome); mask, card, Escape, and aria-label remain.
39
+ * @param props.onKeyDownCapture - handle a nested dialog's keys before the document Escape listeners.
40
+ * @returns null when closed; otherwise the overlay tree.
41
+ */
42
+ export declare function Modal({ open, onClose, title, closeLabel, description, children, footer, className, contentClassName, onKeyDownCapture, headless, backdropBlur, shortcutModal, }: ModalProps): import("react").ReactPortal | null;
43
+ export {};
@@ -0,0 +1,50 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { IconProps } from './icons/props.js';
3
+ /**
4
+ * Render the read-only permission icon with a one-pixel stroke.
5
+ * @param props - Size and optional class.
6
+ * @returns The regular decorative permission glyph.
7
+ */
8
+ export declare function PermissionIconReadOnlyRegular(props: IconProps): ReactNode;
9
+ /**
10
+ * Render the read-only permission icon with a 1.3px stroke.
11
+ * @param props - Size and optional class.
12
+ * @returns The medium decorative permission glyph.
13
+ */
14
+ export declare function PermissionIconReadOnlyMedium(props: IconProps): ReactNode;
15
+ /**
16
+ * Render the workspace-write permission icon with a one-pixel stroke.
17
+ * @param props - Size and optional class.
18
+ * @returns The regular decorative permission glyph.
19
+ */
20
+ export declare function PermissionIconWorkspaceWriteRegular(props: IconProps): ReactNode;
21
+ /**
22
+ * Render the workspace-write permission icon with a 1.3px stroke.
23
+ * @param props - Size and optional class.
24
+ * @returns The medium decorative permission glyph.
25
+ */
26
+ export declare function PermissionIconWorkspaceWriteMedium(props: IconProps): ReactNode;
27
+ /**
28
+ * Render the full-access permission icon with a one-pixel stroke.
29
+ * @param props - Size and optional class.
30
+ * @returns The regular decorative permission glyph.
31
+ */
32
+ export declare function PermissionIconFullAccessRegular(props: IconProps): ReactNode;
33
+ /**
34
+ * Render the full-access permission icon with a 1.3px stroke.
35
+ * @param props - Size and optional class.
36
+ * @returns The medium decorative permission glyph.
37
+ */
38
+ export declare function PermissionIconFullAccessMedium(props: IconProps): ReactNode;
39
+ /**
40
+ * Render the auto-review permission icon with a one-pixel stroke.
41
+ * @param props - Size and optional class.
42
+ * @returns The regular decorative permission glyph.
43
+ */
44
+ export declare function PermissionIconAutoReviewRegular(props: IconProps): ReactNode;
45
+ /**
46
+ * Render the auto-review permission icon with a 1.3px stroke.
47
+ * @param props - Size and optional class.
48
+ * @returns The medium decorative permission glyph.
49
+ */
50
+ export declare function PermissionIconAutoReviewMedium(props: IconProps): ReactNode;
@@ -0,0 +1,12 @@
1
+ import type { ButtonHTMLAttributes, ReactNode } from 'react';
2
+ /**
3
+ * Render a pill chip. Interactive when onClick is supplied (renders a button);
4
+ * otherwise a static span.
5
+ * @param props.active - selected/active visual state.
6
+ * @returns pill element.
7
+ */
8
+ export declare function Pill({ active, className, children, onClick, ...rest }: {
9
+ active?: boolean;
10
+ className?: string | undefined;
11
+ children?: ReactNode;
12
+ } & ButtonHTMLAttributes<HTMLButtonElement>): import("react").JSX.Element;
@@ -0,0 +1,23 @@
1
+ /** Shared compact presentation for draft and sent text quotes. */
2
+ import type { JSX } from 'react';
3
+ /** Optional whole-quote removal control supplied by an editable owner. */
4
+ export interface QuotePreviewRemoval {
5
+ /** Localized accessible name for the removal button. */
6
+ readonly label: string;
7
+ /** Remove the complete owning quote node. */
8
+ readonly onRemove: () => void;
9
+ }
10
+ /** Presentation inputs for one compact quote excerpt. */
11
+ export interface QuotePreviewProps {
12
+ /** Exact selected text rendered inline and exposed in a popover while clipped. */
13
+ readonly text: string;
14
+ /** Composer-only removal action; omit for inert sent quotes. */
15
+ readonly removal?: QuotePreviewRemoval | undefined;
16
+ }
17
+ /**
18
+ * Render one width-capped quote preview shared by editable drafts and sent messages.
19
+ * Clipped excerpts open a content-sized, scrollable popover that fits within the viewport.
20
+ * @param props - selected text and optional localized removal action.
21
+ * @returns a non-navigating quote preview with a full-text popover only while clipped.
22
+ */
23
+ export declare function QuotePreview({ text, removal }: QuotePreviewProps): JSX.Element;
@@ -0,0 +1,47 @@
1
+ import { type CodeToolbarLabels } from './CodeToolbar.js';
2
+ /**
3
+ * Content lines shown before the height cap collapses the middle. Matches
4
+ * TerminalBlock's default so a long read and a long command output cut at the
5
+ * same place in the same flow.
6
+ */
7
+ export declare const DEFAULT_READ_MAX_LINES = 16;
8
+ /** One line of the read window: its file line number and its text (no trailing newline). */
9
+ export interface ReadBlockLine {
10
+ /** 1-based line number in the file (a window past an offset keeps the file's own numbering). */
11
+ number: number;
12
+ /** The line's text, already truncated to the read tool's per-line cap. */
13
+ text: string;
14
+ }
15
+ export interface ReadBlockProps {
16
+ /** Banner label (the file path, or a tool-supplied replacement title); omitted draws no label. */
17
+ label?: string | undefined;
18
+ /** The returned window's lines, in file order, each keeping its file line number. */
19
+ lines: readonly ReadBlockLine[];
20
+ /** Localized chrome supplied by the owning render site. */
21
+ labels: ReadBlockLabels;
22
+ /** Exact total line count in the file, for the "showing N of M" note when the read is a window. */
23
+ totalLines: number;
24
+ /** Grammar hint (a file-extension-derived language id); unknown or absent = plain monospace. */
25
+ lang?: string | undefined;
26
+ /** Height cap in content lines before the middle collapses (default {@link DEFAULT_READ_MAX_LINES}). */
27
+ maxLines?: number | undefined;
28
+ /** Extra class merged onto the wrapper (callers position; this component draws). */
29
+ className?: string | undefined;
30
+ }
31
+ /** Localized chrome for {@link ReadBlock}. */
32
+ export interface ReadBlockLabels extends CodeToolbarLabels {
33
+ window: (shown: number, total: number) => string;
34
+ copy: string;
35
+ copied: string;
36
+ collapseAria: string;
37
+ expandAria: (hidden: number) => string;
38
+ collapse: string;
39
+ expand: (hidden: number) => string;
40
+ }
41
+ /**
42
+ * Render a read tool result as a line-numbered, optionally syntax-highlighted
43
+ * file view.
44
+ * @param props - see {@link ReadBlockProps}.
45
+ * @returns the read block element.
46
+ */
47
+ export declare function ReadBlock({ label, labels, lines, totalLines, lang, maxLines, className, }: ReadBlockProps): import("react").JSX.Element;
@@ -0,0 +1,20 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { IconProps } from './icons/props.js';
3
+ /** Reference domains with distinct composer and transcript glyphs. */
4
+ export type ReferenceIconKind = 'session' | 'file' | 'folder';
5
+ /** Props shared by inline reference glyphs. */
6
+ export interface ReferenceIconProps extends IconProps {
7
+ kind: ReferenceIconKind;
8
+ }
9
+ /**
10
+ * Render a regular one-pixel reference icon.
11
+ * @param props - Reference kind, size, and optional class.
12
+ * @returns The regular decorative reference glyph.
13
+ */
14
+ export declare function ReferenceIconRegular(props: ReferenceIconProps): ReactNode;
15
+ /**
16
+ * Render a medium 1.3px reference icon.
17
+ * @param props - Reference kind, size, and optional class.
18
+ * @returns The medium decorative reference glyph.
19
+ */
20
+ export declare function ReferenceIconMedium(props: ReferenceIconProps): ReactNode;
@@ -0,0 +1,19 @@
1
+ export interface RiskConfirmationProps {
2
+ open: boolean;
3
+ title: string;
4
+ description: string;
5
+ acknowledgeLabel: string;
6
+ cancelLabel: string;
7
+ closeLabel: string;
8
+ confirmLabel: string;
9
+ acknowledged: boolean;
10
+ disabled?: boolean;
11
+ onAcknowledgedChange: (acknowledged: boolean) => void;
12
+ onCancel: () => void;
13
+ onConfirm: () => void;
14
+ }
15
+ /**
16
+ * Render one in-page confirmation whose primary action is unavailable until
17
+ * the caller-controlled acknowledgement is checked.
18
+ */
19
+ export declare function RiskConfirmation({ open, title, description, acknowledgeLabel, cancelLabel, closeLabel, confirmLabel, acknowledged, disabled, onAcknowledgedChange, onCancel, onConfirm, }: RiskConfirmationProps): import("react").JSX.Element;
@@ -0,0 +1,71 @@
1
+ /**
2
+ * Result rows shown before the height cap collapses the middle. Matches
3
+ * {@link DEFAULT_TERMINAL_MAX_LINES} so a search card and a terminal card cut a
4
+ * long result at the same place.
5
+ */
6
+ export declare const DEFAULT_SEARCH_MAX_LINES = 16;
7
+ /** One matched line inside a {@link SearchFileGroup}: its 1-based line number and text. */
8
+ export interface SearchBlockLineMatch {
9
+ /** 1-based line number of the match within its file. */
10
+ lineNumber: number;
11
+ /** The matched line text, as the tool surfaced it. */
12
+ line: string;
13
+ }
14
+ /** One file's grouped matches, in first-seen file order. */
15
+ export interface SearchFileGroup {
16
+ /** The file the matches belong to (the display path). */
17
+ path: string;
18
+ /** The file's matched lines, in output order. */
19
+ matches: SearchBlockLineMatch[];
20
+ }
21
+ /** Fields both search shapes carry (the render site positions; this component draws). */
22
+ interface SearchBlockCommon {
23
+ /** Localized chrome supplied by the owning render site. */
24
+ labels: SearchBlockLabels;
25
+ /**
26
+ * Whether the tool capped the inline result: the shape carries only the
27
+ * retained results, not every result the search found. The banner summary
28
+ * folds the pre-cap `total` in (`显示 X / 共 N …`) so the card never presents a
29
+ * capped result as complete.
30
+ */
31
+ truncated: boolean;
32
+ /** Total results the search found before capping (equals the retained count when not `truncated`). */
33
+ total: number;
34
+ /** Height cap in rows before the middle collapses (default {@link DEFAULT_SEARCH_MAX_LINES}). */
35
+ maxLines?: number | undefined;
36
+ /** Extra class merged onto the wrapper. */
37
+ className?: string | undefined;
38
+ }
39
+ /** Localized chrome for {@link SearchBlock}. */
40
+ export interface SearchBlockLabels {
41
+ pathsSummary: (shown: number, total: number, truncated: boolean) => string;
42
+ matchesSummary: (shown: number, total: number, files: number, truncated: boolean) => string;
43
+ copy: string;
44
+ copied: string;
45
+ noResults: string;
46
+ collapseAria: string;
47
+ expandAria: (hidden: number) => string;
48
+ collapse: string;
49
+ expand: (hidden: number) => string;
50
+ }
51
+ /** Props for the grouped-matches (`grep`) shape. */
52
+ export interface SearchMatchesBlockProps extends SearchBlockCommon {
53
+ kind: 'matches';
54
+ /** Matched lines grouped by file, in first-seen file order. */
55
+ files: SearchFileGroup[];
56
+ }
57
+ /** Props for the flat-path (`glob`) shape. */
58
+ export interface SearchPathsBlockProps extends SearchBlockCommon {
59
+ kind: 'paths';
60
+ /** The discovered paths, in the tool's result order (the retained page when `truncated`). */
61
+ paths: string[];
62
+ }
63
+ /** {@link SearchBlock} props: one card, two `kind`-discriminated shapes. */
64
+ export type SearchBlockProps = SearchMatchesBlockProps | SearchPathsBlockProps;
65
+ /**
66
+ * Render a completed search as a grouped-matches or flat-path card.
67
+ * @param props - see {@link SearchBlockProps}.
68
+ * @returns the search block element.
69
+ */
70
+ export declare function SearchBlock(props: SearchBlockProps): import("react").JSX.Element;
71
+ export {};
@@ -0,0 +1,34 @@
1
+ /** One segment of a {@link SegmentedControl}. */
2
+ export interface SegmentedControlOption<Value extends string> {
3
+ /** The value the owner receives when this segment is chosen. */
4
+ value: Value;
5
+ /** Localized segment text. */
6
+ label: string;
7
+ /** Whether the segment refuses selection. */
8
+ disabled?: boolean;
9
+ /** Localized hover text, typically why the segment is locked. */
10
+ title?: string;
11
+ }
12
+ /**
13
+ * Render a segmented control.
14
+ * @param props.id - the owner's base id: each tab is `<id>-<value>` and names
15
+ * `<id>-<value>-panel` as the panel it controls.
16
+ * @param props.value - the selected option's value; the control is fully controlled.
17
+ * @param props.options - the segments in display order; at least two.
18
+ * @param props.onChange - called with the value a click or a walk key asks for,
19
+ * never with the value already selected.
20
+ * @param props.label - localized accessible name of the tablist.
21
+ * @param props.disabled - lock every segment, typically while the shown panel
22
+ * has a write or a fetch in flight that switching would orphan.
23
+ * @param props.className - extra class for layout placement.
24
+ * @returns the tablist element.
25
+ */
26
+ export declare function SegmentedControl<Value extends string>({ id, value, options, onChange, label, disabled, className, }: {
27
+ id: string;
28
+ value: Value;
29
+ options: readonly SegmentedControlOption<Value>[];
30
+ onChange: (next: Value) => void;
31
+ label: string;
32
+ disabled?: boolean;
33
+ className?: string | undefined;
34
+ }): import("react").JSX.Element;
@@ -0,0 +1,27 @@
1
+ import type { ReactNode } from 'react';
2
+ /** A tab links its localized label to a caller-owned panel. */
3
+ export interface SegmentedTab<Value extends string = string> {
4
+ value: Value;
5
+ label: ReactNode;
6
+ id: string;
7
+ panelId: string;
8
+ }
9
+ /**
10
+ * Render equal-width, controlled tabs with a sliding selection indicator.
11
+ * @param props.items - non-empty ordered tabs with unique values and DOM ids.
12
+ * @param props.value - selected value, which must belong to items.
13
+ * @param props.onChange - selection requested by click, Left/Right, or Home/End.
14
+ * Keyboard selection also moves focus; only the selected tab is a tab stop.
15
+ * @param props.label - localized accessible name for the tab list.
16
+ * @param props.className - layout placement; panels remain caller-owned.
17
+ * @param props.size - `sm` draws 30px tabs with a 2px inset (34px tall); the default `md` draws 34px tabs with a 4px inset (42px tall).
18
+ * @returns the tab list, without its panels.
19
+ */
20
+ export declare function SegmentedTabs<Value extends string>({ items, value, onChange, label, className, size, }: {
21
+ items: readonly [SegmentedTab<Value>, ...SegmentedTab<Value>[]];
22
+ value: Value;
23
+ onChange: (value: Value) => void;
24
+ label: string;
25
+ className?: string | undefined;
26
+ size?: 'sm' | 'md' | undefined;
27
+ }): ReactNode;