@seekbuddy/dsh-ui 0.0.0-stage → 0.2.0-beta.0
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.
- package/CHANGELOG.md +49 -0
- package/LICENSE +22 -0
- package/README.md +175 -2
- package/README.zh.md +176 -0
- package/THIRD_PARTY_NOTICES.md +42 -0
- package/UPSTREAM.md +56 -0
- package/dist/blocks.js +1582 -0
- package/dist/chunks/chunk-23KOEBWJ.js +104 -0
- package/dist/chunks/chunk-3HCOU44R.js +697 -0
- package/dist/chunks/chunk-5JXG4BHW.js +31 -0
- package/dist/chunks/chunk-5XDVPALS.js +61 -0
- package/dist/chunks/chunk-AY44MQMD.js +3052 -0
- package/dist/chunks/chunk-B3EEK7A2.js +408 -0
- package/dist/chunks/chunk-CEBTQO6W.js +24 -0
- package/dist/chunks/chunk-CI73NXA5.js +202 -0
- package/dist/chunks/chunk-CTQPGUZP.js +22 -0
- package/dist/chunks/chunk-F352IICS.js +57 -0
- package/dist/chunks/chunk-IOBKTEKP.js +144 -0
- package/dist/chunks/chunk-KETGFAOH.js +66 -0
- package/dist/chunks/chunk-LA3QDZYN.js +2777 -0
- package/dist/chunks/chunk-NE62SYOZ.js +89 -0
- package/dist/chunks/chunk-OQPH36OI.js +754 -0
- package/dist/chunks/chunk-QJKAQ6PO.js +155 -0
- package/dist/chunks/chunk-R6AUJQ3G.js +129 -0
- package/dist/chunks/chunk-RNVSCTW7.js +24 -0
- package/dist/chunks/chunk-RZOP2PFC.js +152 -0
- package/dist/chunks/chunk-TQU54HSM.js +112 -0
- package/dist/chunks/chunk-TUK6UGXM.js +36 -0
- package/dist/chunks/chunk-TZ7HRE6D.js +328 -0
- package/dist/chunks/chunk-VIH56PDF.js +57 -0
- package/dist/chunks/chunk-WUL523OW.js +27 -0
- package/dist/chunks/chunk-XX6MSZLS.js +261 -0
- package/dist/chunks/chunk-ZA47FP7C.js +7 -0
- package/dist/chunks/chunk-ZZNL5PWF.js +170 -0
- package/dist/icons.js +803 -0
- package/dist/index.js +1182 -0
- package/dist/katex/fonts/KaTeX_AMS-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Caligraphic-Bold.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Caligraphic-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Fraktur-Bold.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Fraktur-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Main-Bold.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Main-BoldItalic.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Main-Italic.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Main-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Math-BoldItalic.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Math-Italic.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_SansSerif-Bold.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_SansSerif-Italic.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_SansSerif-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Script-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Size1-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Size2-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Size3-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Size4-Regular.woff2 +0 -0
- package/dist/katex/fonts/KaTeX_Typewriter-Regular.woff2 +0 -0
- package/dist/katex.css +1 -0
- package/dist/katex.css.d.ts +2 -0
- package/dist/markdown.js +148 -0
- package/dist/meta.json +6876 -0
- package/dist/root-inputs.json +67 -0
- package/dist/seekbuddy-card.js +7 -0
- package/dist/seekbuddy-empty.js +8 -0
- package/dist/seekbuddy-internal/DangerButton.js +7 -0
- package/dist/seekbuddy-internal/Mark.js +7 -0
- package/dist/seekbuddy-internal/Message.js +10 -0
- package/dist/seekbuddy-internal/Pagination.js +9 -0
- package/dist/seekbuddy-internal/StatusBadge.js +7 -0
- package/dist/seekbuddy-internal/SubtleButton.js +7 -0
- package/dist/seekbuddy-internal/Switch.js +7 -0
- package/dist/seekbuddy-internal/Upload.js +7 -0
- package/dist/seekbuddy-internal/date/Calendar.js +8 -0
- package/dist/seekbuddy-internal/date/DatePicker.js +9 -0
- package/dist/seekbuddy-internal/date/DateRangePicker.js +9 -0
- package/dist/seekbuddy-internal/date/TimePicker.js +8 -0
- package/dist/seekbuddy-internal/date/fields.js +16 -0
- package/dist/seekbuddy-internal/qr/QrCode.js +7 -0
- package/dist/seekbuddy-spinner.js +7 -0
- package/dist/seekbuddy-tabs.js +7 -0
- package/dist/seekbuddy-timeline.js +8 -0
- package/dist/seekbuddy.js +89 -0
- package/dist/theme-bootstrap.js +13 -0
- package/dist/theme.js +37 -0
- package/dist/tokens.css +934 -0
- package/dist/tokens.css.d.ts +2 -0
- package/dist/types/Button.d.ts +18 -0
- package/dist/types/Checkbox.d.ts +19 -0
- package/dist/types/CodeFileIcon.d.ts +11 -0
- package/dist/types/CodeToolbar.d.ts +29 -0
- package/dist/types/ConfigField.d.ts +32 -0
- package/dist/types/ConnectionIndicator.d.ts +25 -0
- package/dist/types/DiffBlock.d.ts +51 -0
- package/dist/types/DisclosureRow.d.ts +35 -0
- package/dist/types/FileTypeIcon.d.ts +42 -0
- package/dist/types/FoldToggle.d.ts +19 -0
- package/dist/types/HoverCard.d.ts +36 -0
- package/dist/types/ImageLightbox.d.ts +26 -0
- package/dist/types/ImagePreview.d.ts +11 -0
- package/dist/types/Input.d.ts +11 -0
- package/dist/types/JsonTree.d.ts +58 -0
- package/dist/types/LinkIcon.d.ts +33 -0
- package/dist/types/Menu.d.ts +142 -0
- package/dist/types/MenuGroup.d.ts +21 -0
- package/dist/types/MenuSurface.d.ts +15 -0
- package/dist/types/Modal.d.ts +43 -0
- package/dist/types/PermissionIcon.d.ts +38 -0
- package/dist/types/Pill.d.ts +12 -0
- package/dist/types/ReadBlock.d.ts +47 -0
- package/dist/types/ReferenceIcon.d.ts +20 -0
- package/dist/types/RiskConfirmation.d.ts +19 -0
- package/dist/types/SearchBlock.d.ts +71 -0
- package/dist/types/SegmentedControl.d.ts +34 -0
- package/dist/types/SegmentedTabs.d.ts +25 -0
- package/dist/types/ShortcutKeys.d.ts +10 -0
- package/dist/types/SiteGlyph.d.ts +24 -0
- package/dist/types/StateDot.d.ts +19 -0
- package/dist/types/Switch.d.ts +19 -0
- package/dist/types/Tag.d.ts +31 -0
- package/dist/types/TerminalBlock.d.ts +77 -0
- package/dist/types/TextShimmer.d.ts +22 -0
- package/dist/types/Toast.d.ts +48 -0
- package/dist/types/Tooltip.d.ts +63 -0
- package/dist/types/WebBlock.d.ts +60 -0
- package/dist/types/ansi.d.ts +16 -0
- package/dist/types/blocks.d.ts +19 -0
- package/dist/types/clipboard.d.ts +8 -0
- package/dist/types/code-file-icon-artwork.d.ts +53 -0
- package/dist/types/code-file-types.d.ts +29 -0
- package/dist/types/code-highlighting.d.ts +11 -0
- package/dist/types/css-modules.d.ts +6 -0
- package/dist/types/darwin-desktop.d.ts +8 -0
- package/dist/types/file-size.d.ts +7 -0
- package/dist/types/focus.d.ts +8 -0
- package/dist/types/guide-artwork.d.ts +14 -0
- package/dist/types/head-tail-cap.d.ts +22 -0
- package/dist/types/icons/index.d.ts +384 -0
- package/dist/types/icons/props.d.ts +8 -0
- package/dist/types/icons/shared-artwork.d.ts +42 -0
- package/dist/types/icons.d.ts +6 -0
- package/dist/types/index.d.ts +53 -0
- package/dist/types/input-modality.d.ts +18 -0
- package/dist/types/keyboard-composition.d.ts +10 -0
- package/dist/types/markdown/CodeBlock.d.ts +34 -0
- package/dist/types/markdown/JsonBlock.d.ts +7 -0
- package/dist/types/markdown/MarkdownDelegate.d.ts +45 -0
- package/dist/types/markdown/MarkdownText.d.ts +47 -0
- package/dist/types/markdown/cjkFriendlyStrong.d.ts +8 -0
- package/dist/types/markdown/file-link.d.ts +12 -0
- package/dist/types/markdown/highlight.d.ts +147 -0
- package/dist/types/markdown/incremental.d.ts +79 -0
- package/dist/types/markdown/katex.d.ts +18 -0
- package/dist/types/markdown/local-image-syntax.d.ts +9 -0
- package/dist/types/markdown/mathCompatibility.d.ts +10 -0
- package/dist/types/markdown/parse.d.ts +24 -0
- package/dist/types/markdown/plain-text.d.ts +21 -0
- package/dist/types/markdown/render.d.ts +140 -0
- package/dist/types/markdown/useViewportHighlighting.d.ts +10 -0
- package/dist/types/markdown.d.ts +9 -0
- package/dist/types/overlay-top-margin.d.ts +7 -0
- package/dist/types/plugin-artwork.d.ts +16 -0
- package/dist/types/pointer-grace.d.ts +21 -0
- package/dist/types/rank-by-name.d.ts +21 -0
- package/dist/types/relative-time.d.ts +22 -0
- package/dist/types/seekbuddy/Card.d.ts +28 -0
- package/dist/types/seekbuddy/DangerButton.d.ts +31 -0
- package/dist/types/seekbuddy/Empty.d.ts +34 -0
- package/dist/types/seekbuddy/Mark.d.ts +27 -0
- package/dist/types/seekbuddy/Message.d.ts +52 -0
- package/dist/types/seekbuddy/Pagination.d.ts +66 -0
- package/dist/types/seekbuddy/Spinner.d.ts +20 -0
- package/dist/types/seekbuddy/StatusBadge.d.ts +33 -0
- package/dist/types/seekbuddy/SubtleButton.d.ts +30 -0
- package/dist/types/seekbuddy/Switch.d.ts +36 -0
- package/dist/types/seekbuddy/Tabs.d.ts +49 -0
- package/dist/types/seekbuddy/Timeline.d.ts +42 -0
- package/dist/types/seekbuddy/Upload.d.ts +101 -0
- package/dist/types/seekbuddy/date/Calendar.d.ts +94 -0
- package/dist/types/seekbuddy/date/DatePicker.d.ts +29 -0
- package/dist/types/seekbuddy/date/DateRangePicker.d.ts +41 -0
- package/dist/types/seekbuddy/date/TimePicker.d.ts +35 -0
- package/dist/types/seekbuddy/date/date.d.ts +79 -0
- package/dist/types/seekbuddy/date/fields.d.ts +45 -0
- package/dist/types/seekbuddy/index.d.ts +49 -0
- package/dist/types/seekbuddy/qr/QrCode.d.ts +37 -0
- package/dist/types/seekbuddy/qr/qr.d.ts +38 -0
- package/dist/types/theme-bootstrap.d.ts +3 -0
- package/dist/types/theme-core.d.ts +14 -0
- package/dist/types/theme.d.ts +4 -0
- package/dist/types/use-copy-feedback.d.ts +13 -0
- package/dist/types/useAnchoredMaxHeight.d.ts +13 -0
- package/dist/types/useAnchoredPosition.d.ts +35 -0
- package/dist/types/useDismissOnOutsidePointer.d.ts +10 -0
- package/dist/types/useModalLayer.d.ts +26 -0
- package/dist/types/user-text.d.ts +36 -0
- package/package.json +151 -4
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
/** Shared menu material and the macOS backing that lets Chromium blur transparent windows. */
|
|
2
|
+
import { type ComponentPropsWithoutRef } from 'react';
|
|
3
|
+
/** Menu containers preserve native div props and refs. */
|
|
4
|
+
export interface MenuSurfaceProps extends ComponentPropsWithoutRef<'div'> {
|
|
5
|
+
/** Match the shared compact menu's smaller outer radius. */
|
|
6
|
+
compact?: boolean;
|
|
7
|
+
}
|
|
8
|
+
/**
|
|
9
|
+
* Paint a menu and, on macOS, an opaque backing behind the page content within its bounds.
|
|
10
|
+
* CSS anchors keep each backing aligned during placement, resizing, and nested-menu movement.
|
|
11
|
+
* @param props - Div content and placement, and compact geometry.
|
|
12
|
+
* @param ref - The visible menu div, excluding the non-interactive backing.
|
|
13
|
+
* @returns Menu content plus a backing portal removed with the menu.
|
|
14
|
+
*/
|
|
15
|
+
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,38 @@
|
|
|
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;
|
|
@@ -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,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,25 @@
|
|
|
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
|
+
* @returns the tab list, without its panels.
|
|
18
|
+
*/
|
|
19
|
+
export declare function SegmentedTabs<Value extends string>({ items, value, onChange, label, className, }: {
|
|
20
|
+
items: readonly [SegmentedTab<Value>, ...SegmentedTab<Value>[]];
|
|
21
|
+
value: Value;
|
|
22
|
+
onChange: (value: Value) => void;
|
|
23
|
+
label: string;
|
|
24
|
+
className?: string | undefined;
|
|
25
|
+
}): ReactNode;
|
|
@@ -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,77 @@
|
|
|
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
|
+
/** Status pill text for a signal-terminated command. */
|
|
9
|
+
signal: (signal: string) => string;
|
|
10
|
+
/** Status pill text for a non-zero exit code. */
|
|
11
|
+
exitCode: (exitCode: number) => string;
|
|
12
|
+
/** Status pill text for a command that ended without an exit code: killed by a signal the view does not know, or never started. */
|
|
13
|
+
noExitCode: string;
|
|
14
|
+
/** Run-state text while the command is still running. */
|
|
15
|
+
running: string;
|
|
16
|
+
/** Run-state text for a signal or non-zero-exit settle. */
|
|
17
|
+
failed: string;
|
|
18
|
+
/** Run-state text for a clean settle. */
|
|
19
|
+
done: string;
|
|
20
|
+
/** Copy-button idle label. */
|
|
21
|
+
copy: string;
|
|
22
|
+
/** Copy-button label during the post-copy confirmation window. */
|
|
23
|
+
copied: string;
|
|
24
|
+
/** Placeholder when a settled command produced no visible output. */
|
|
25
|
+
noOutput: string;
|
|
26
|
+
/** Collapse-toggle aria label while expanded. */
|
|
27
|
+
collapseAria: string;
|
|
28
|
+
/** Collapse-toggle text while expanded. */
|
|
29
|
+
collapse: string;
|
|
30
|
+
/** Expand-toggle aria label while capped, given the hidden line count. */
|
|
31
|
+
expandAria: (hidden: number) => string;
|
|
32
|
+
/** Expand-toggle text while capped, given the hidden line count. */
|
|
33
|
+
expand: (hidden: number) => string;
|
|
34
|
+
}
|
|
35
|
+
export interface TerminalBlockProps {
|
|
36
|
+
/** The command line, rendered verbatim after the prompt label. */
|
|
37
|
+
command: string;
|
|
38
|
+
/** Working directory for the prompt label; absent renders a plain `$`. */
|
|
39
|
+
cwd?: string | undefined;
|
|
40
|
+
/** Absolute home directory, so a cwd equal to it collapses to `~`; absent disables that collapse. */
|
|
41
|
+
home?: string | undefined;
|
|
42
|
+
/** The command's output text; may contain ANSI escape sequences. */
|
|
43
|
+
output?: string | undefined;
|
|
44
|
+
/** Settled exit code; a non-zero value renders the status pill, and null (settled without one) the no-exit-code pill. */
|
|
45
|
+
exitCode?: number | null | undefined;
|
|
46
|
+
/** Settled terminating signal name; any value renders the status pill, taking precedence over the exit code. */
|
|
47
|
+
signal?: string | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* The command is still running: with no `output` the block shows the prompt
|
|
50
|
+
* line alone; with output it renders the live text under the running state.
|
|
51
|
+
*/
|
|
52
|
+
running?: boolean | undefined;
|
|
53
|
+
/** Height cap in output lines before the middle collapses (default {@link DEFAULT_TERMINAL_MAX_LINES}); Infinity disables the cap. */
|
|
54
|
+
maxLines?: number | undefined;
|
|
55
|
+
/**
|
|
56
|
+
* Copy-control payload override; the control copies the raw output when
|
|
57
|
+
* absent. Supplying it also keeps the control rendered before any output
|
|
58
|
+
* exists — a command is copyable before it prints.
|
|
59
|
+
*/
|
|
60
|
+
copyText?: string | undefined;
|
|
61
|
+
/**
|
|
62
|
+
* Draw the run-state dot and its assistive label in the card gutter
|
|
63
|
+
* (default true). Hosts whose surrounding row already carries the same
|
|
64
|
+
* state omit both and reclaim the gutter via `--dsl-terminal-gutter`.
|
|
65
|
+
*/
|
|
66
|
+
runStateDot?: boolean | undefined;
|
|
67
|
+
/** Extra class merged onto the wrapper (callers position; this component draws). */
|
|
68
|
+
className?: string | undefined;
|
|
69
|
+
/** Localized display copy supplied by the owning render site. */
|
|
70
|
+
labels: TerminalBlockLabels;
|
|
71
|
+
}
|
|
72
|
+
/**
|
|
73
|
+
* Render a shell command as a terminal surface.
|
|
74
|
+
* @param props - see {@link TerminalBlockProps}.
|
|
75
|
+
* @returns the terminal block element.
|
|
76
|
+
*/
|
|
77
|
+
export declare function TerminalBlock({ command, cwd, home, output, exitCode, signal, running, 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;
|