@lincyaw/aegis-ui 0.3.0 → 0.5.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/README.md +81 -5
- package/dist/agent/AgentProvider.d.ts +4 -0
- package/dist/agent/AskOverlay.d.ts +0 -1
- package/dist/agent/AskPanel.d.ts +0 -1
- package/dist/agent/agentContext.d.ts +6 -2
- package/dist/agent/agentmChannelClient.d.ts +1 -0
- package/dist/agent/runtime.d.ts +6 -1
- package/dist/agent/usePrimitiveSurface.d.ts +30 -0
- package/dist/commands/CommandProvider.d.ts +3 -3
- package/dist/commands/commandContext.d.ts +2 -2
- package/dist/components/ui/AgentPanel.d.ts +3 -10
- package/dist/components/ui/AuthLayout.d.ts +1 -1
- package/dist/components/ui/Avatar.d.ts +6 -13
- package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
- package/dist/components/ui/Breadcrumb.d.ts +1 -1
- package/dist/components/ui/BucketCard.d.ts +1 -1
- package/dist/components/ui/ChatComposer.d.ts +1 -1
- package/dist/components/ui/ChatMessage.d.ts +7 -14
- package/dist/components/ui/ChatMessageList.d.ts +3 -10
- package/dist/components/ui/ChatSessionList.d.ts +0 -1
- package/dist/components/ui/Chip.d.ts +3 -10
- package/dist/components/ui/CodeBlock.d.ts +8 -14
- package/dist/components/ui/CodeEditor.d.ts +6 -13
- package/dist/components/ui/CommandInvocationCard.d.ts +7 -14
- package/dist/components/ui/CommandPalette.d.ts +0 -1
- package/dist/components/ui/ContentInspectorContent.d.ts +14 -0
- package/dist/components/ui/ContentInspectorDialog.d.ts +15 -0
- package/dist/components/ui/ControlListItem.d.ts +1 -1
- package/dist/components/ui/DangerZone.d.ts +1 -1
- package/dist/components/ui/DataList.d.ts +3 -11
- package/dist/components/ui/DataTable.d.ts +27 -11
- package/dist/components/ui/DiffViewer.d.ts +6 -13
- package/dist/components/ui/DropdownMenu.d.ts +6 -2
- package/dist/components/ui/EmptyState.d.ts +1 -1
- package/dist/components/ui/EnvironmentSwitcher.d.ts +0 -1
- package/dist/components/ui/ErrorState.d.ts +8 -2
- package/dist/components/ui/EventTable.d.ts +0 -1
- package/dist/components/ui/FileDropzone.d.ts +1 -1
- package/dist/components/ui/FilePreview.d.ts +8 -15
- package/dist/components/ui/FolderDropzone.d.ts +0 -1
- package/dist/components/ui/ForgotPasswordForm.d.ts +1 -1
- package/dist/components/ui/FormRow.d.ts +1 -1
- package/dist/components/ui/InboxPage.d.ts +3 -10
- package/dist/components/ui/KeyValueList.d.ts +3 -10
- package/dist/components/ui/LoginForm.d.ts +1 -1
- package/dist/components/ui/Markdown.d.ts +9 -3
- package/dist/components/ui/MetadataList.d.ts +0 -1
- package/dist/components/ui/MetricCard.d.ts +7 -14
- package/dist/components/ui/MetricLabel.d.ts +1 -1
- package/dist/components/ui/MonoValue.d.ts +3 -10
- package/dist/components/ui/NotificationBell.d.ts +1 -1
- package/dist/components/ui/ObjectBrowser.d.ts +1 -1
- package/dist/components/ui/ObjectInspector.d.ts +0 -1
- package/dist/components/ui/PageHeader.d.ts +1 -1
- package/dist/components/ui/PageSizeSelect.d.ts +8 -2
- package/dist/components/ui/Panel.d.ts +3 -10
- package/dist/components/ui/PanelTitle.d.ts +1 -1
- package/dist/components/ui/ParquetViewer.d.ts +8 -15
- package/dist/components/ui/PasswordField.d.ts +1 -1
- package/dist/components/ui/ProjectSelector.d.ts +8 -2
- package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
- package/dist/components/ui/RegisterForm.d.ts +1 -1
- package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
- package/dist/components/ui/SavedQueryBar.d.ts +0 -1
- package/dist/components/ui/SearchInput.d.ts +0 -1
- package/dist/components/ui/SectionDivider.d.ts +1 -1
- package/dist/components/ui/SessionRunView.d.ts +50 -0
- package/dist/components/ui/SettingsSection.d.ts +1 -1
- package/dist/components/ui/ShareLinkDialog.d.ts +1 -1
- package/dist/components/ui/SparkLine.d.ts +3 -10
- package/dist/components/ui/StatBlock.d.ts +7 -14
- package/dist/components/ui/StatusDot.d.ts +1 -1
- package/dist/components/ui/Tabs.d.ts +1 -1
- package/dist/components/ui/Terminal.d.ts +3 -10
- package/dist/components/ui/TextField.d.ts +1 -1
- package/dist/components/ui/TimeDisplay.d.ts +3 -3
- package/dist/components/ui/TimeRangePicker.d.ts +0 -1
- package/dist/components/ui/Timeline.d.ts +3 -10
- package/dist/components/ui/ToolCallCard.d.ts +3 -10
- package/dist/components/ui/Toolbar.d.ts +0 -1
- package/dist/components/ui/TraceSpanInspector.d.ts +12 -0
- package/dist/components/ui/TraceTree.d.ts +9 -11
- package/dist/components/ui/TrajectoryStep.d.ts +3 -10
- package/dist/components/ui/TrajectoryTimeline.d.ts +2 -10
- package/dist/components/ui/UploadQueue.d.ts +1 -1
- package/dist/components/ui/index.d.ts +10 -1
- package/dist/components/ui/relativeTime.d.ts +1 -1
- package/dist/components/ui/traceFormat.d.ts +5 -0
- package/dist/hooks/useCopyToClipboard.d.ts +8 -0
- package/dist/hooks/useMenuPopover.d.ts +27 -0
- package/dist/hooks/useResizable.d.ts +9 -0
- package/dist/index.cjs +12 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.js +9848 -124
- package/dist/index.js.map +1 -1
- package/dist/layouts/shell/AegisShell.d.ts +1 -1
- package/dist/layouts/shell/AuthRequiredCard.d.ts +2 -2
- package/dist/layouts/shell/TopHeader.d.ts +5 -1
- package/dist/layouts/shell/paths.d.ts +8 -0
- package/dist/layouts/shell/types.d.ts +21 -13
- package/dist/lib/format.d.ts +2 -0
- package/dist/lib/id.d.ts +2 -0
- package/dist/lib/storage.d.ts +12 -0
- package/dist/style.css +1 -1
- package/dist/theme/antdTheme.d.ts +2 -3
- package/package.json +24 -17
- package/dist/index-6WZzHI2Z.cjs +0 -1151
- package/dist/index-6WZzHI2Z.cjs.map +0 -1
- package/dist/index-CZ_qegBG.js +0 -6736
- package/dist/index-CZ_qegBG.js.map +0 -1
- package/dist/index-DLXAAlfH.cjs +0 -15
- package/dist/index-DLXAAlfH.cjs.map +0 -1
- package/dist/index-DtgBxtmy.js +0 -56284
- package/dist/index-DtgBxtmy.js.map +0 -1
- package/dist/styles/fonts.d.ts +0 -0
- package/dist/workerBundle-D52AeOj1.js +0 -76
- package/dist/workerBundle-D52AeOj1.js.map +0 -1
- package/dist/workerBundle-FGNDqtbW.cjs +0 -73
- package/dist/workerBundle-FGNDqtbW.cjs.map +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
|
|
4
4
|
export interface TerminalLine {
|
|
5
5
|
ts?: string;
|
|
@@ -7,14 +7,7 @@ export interface TerminalLine {
|
|
|
7
7
|
level?: LogLevel;
|
|
8
8
|
body: ReactNode;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
id: string;
|
|
12
|
-
kind?: SurfaceKind;
|
|
13
|
-
label?: string;
|
|
14
|
-
project: (lines: TerminalLine[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
15
|
-
askSuggestions?: string[];
|
|
16
|
-
ask?: boolean;
|
|
17
|
-
}
|
|
10
|
+
export type TerminalSurface = PrimitiveSurface<TerminalLine[]>;
|
|
18
11
|
interface TerminalProps {
|
|
19
12
|
lines: TerminalLine[];
|
|
20
13
|
ariaLabel?: string;
|
|
@@ -22,4 +15,4 @@ interface TerminalProps {
|
|
|
22
15
|
surface?: TerminalSurface;
|
|
23
16
|
}
|
|
24
17
|
export declare function Terminal({ lines, ariaLabel, className, surface, }: TerminalProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
-
export
|
|
18
|
+
export {};
|
|
@@ -7,4 +7,4 @@ interface TextFieldProps extends Omit<InputHTMLAttributes<HTMLInputElement>, 'si
|
|
|
7
7
|
trailingIcon?: ReactNode;
|
|
8
8
|
}
|
|
9
9
|
export declare const TextField: import('react').ForwardRefExoticComponent<TextFieldProps & import('react').RefAttributes<HTMLInputElement>>;
|
|
10
|
-
export
|
|
10
|
+
export {};
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
interface TimeDisplayProps {
|
|
2
2
|
/** ISO string, timestamp ms, or Date object. */
|
|
3
3
|
value: string | number | Date;
|
|
4
|
-
/** 'absolute' = full timestamp, 'relative' = "
|
|
4
|
+
/** 'absolute' = full timestamp, 'relative' = "2m ago", 'duration' = elapsed time. */
|
|
5
5
|
mode?: 'absolute' | 'relative' | 'duration';
|
|
6
6
|
/** For relative mode: refresh interval in ms (default 60 000). */
|
|
7
7
|
refreshMs?: number;
|
|
8
8
|
className?: string;
|
|
9
9
|
}
|
|
10
|
-
export declare function TimeDisplay({ value, mode, className, }: TimeDisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export
|
|
10
|
+
export declare function TimeDisplay({ value, mode, refreshMs, className, }: TimeDisplayProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -15,4 +15,3 @@ export interface TimeRangePickerProps {
|
|
|
15
15
|
className?: string;
|
|
16
16
|
}
|
|
17
17
|
export declare function TimeRangePicker({ value, onChange, presets, now, placeholder, disabled, className, }: TimeRangePickerProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export default TimeRangePicker;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
export interface TimelineItem {
|
|
4
4
|
id: string;
|
|
5
5
|
/** Headline — actor / event / verb, e.g. "alice@aegis updated `db.dsn`". */
|
|
@@ -13,14 +13,7 @@ export interface TimelineItem {
|
|
|
13
13
|
/** Override dot colour with a CSS custom property name or raw token. */
|
|
14
14
|
dotColor?: string;
|
|
15
15
|
}
|
|
16
|
-
export
|
|
17
|
-
id: string;
|
|
18
|
-
kind?: SurfaceKind;
|
|
19
|
-
label?: string;
|
|
20
|
-
project: (items: TimelineItem[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
21
|
-
askSuggestions?: string[];
|
|
22
|
-
ask?: boolean;
|
|
23
|
-
}
|
|
16
|
+
export type TimelineSurface = PrimitiveSurface<TimelineItem[]>;
|
|
24
17
|
interface TimelineProps {
|
|
25
18
|
items: TimelineItem[];
|
|
26
19
|
/** Reverse visual order (newest first vs oldest first). Doesn't sort. */
|
|
@@ -29,4 +22,4 @@ interface TimelineProps {
|
|
|
29
22
|
surface?: TimelineSurface;
|
|
30
23
|
}
|
|
31
24
|
export declare function Timeline({ items, className, style, surface }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
32
|
-
export
|
|
25
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
2
2
|
export type ToolCallStatus = 'running' | 'ok' | 'error';
|
|
3
3
|
export interface ToolCallData {
|
|
4
4
|
name: string;
|
|
@@ -7,18 +7,11 @@ export interface ToolCallData {
|
|
|
7
7
|
status?: ToolCallStatus;
|
|
8
8
|
isError?: boolean;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
id: string;
|
|
12
|
-
kind?: SurfaceKind;
|
|
13
|
-
label?: string;
|
|
14
|
-
project: (data: ToolCallData) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
15
|
-
askSuggestions?: string[];
|
|
16
|
-
ask?: boolean;
|
|
17
|
-
}
|
|
10
|
+
export type ToolCallCardSurface = PrimitiveSurface<ToolCallData>;
|
|
18
11
|
interface ToolCallCardProps {
|
|
19
12
|
data: ToolCallData;
|
|
20
13
|
className?: string;
|
|
21
14
|
surface?: ToolCallCardSurface;
|
|
22
15
|
}
|
|
23
16
|
export declare function ToolCallCard({ data, className, surface }: ToolCallCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export
|
|
17
|
+
export {};
|
|
@@ -21,4 +21,3 @@ export interface ToolbarProps {
|
|
|
21
21
|
className?: string;
|
|
22
22
|
}
|
|
23
23
|
export declare function Toolbar({ left, center, right, searchPlaceholder, searchValue, onSearchChange, filters, onFilterRemove, onClearFilters, action, className, }: ToolbarProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export default Toolbar;
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { TraceSpan } from './TraceTree';
|
|
2
|
+
export interface TraceSpanInspectorProps {
|
|
3
|
+
span: TraceSpan | null;
|
|
4
|
+
onClose: () => void;
|
|
5
|
+
/** Optional resolver to render related spans (parent + children) as clickable refs. */
|
|
6
|
+
spanLookup?: (id: string) => TraceSpan | undefined;
|
|
7
|
+
/** Called when a related span is clicked. */
|
|
8
|
+
onSelectRelated?: (span: TraceSpan) => void;
|
|
9
|
+
/** Optional raw OTel attributes from the original span row (for the Raw tab JSON). */
|
|
10
|
+
raw?: unknown;
|
|
11
|
+
}
|
|
12
|
+
export declare function TraceSpanInspector({ span, onClose, spanLookup, onSelectRelated, raw, }: TraceSpanInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,13 +1,6 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
id: string;
|
|
5
|
-
kind?: SurfaceKind;
|
|
6
|
-
label?: string;
|
|
7
|
-
project: (spans: TraceSpan[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
8
|
-
askSuggestions?: string[];
|
|
9
|
-
ask?: boolean;
|
|
10
|
-
}
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
|
+
export type TraceTreeSurface = PrimitiveSurface<TraceSpan[]>;
|
|
11
4
|
export interface TraceSpan {
|
|
12
5
|
id: string;
|
|
13
6
|
parentId?: string | null;
|
|
@@ -30,6 +23,11 @@ interface TraceTreeProps {
|
|
|
30
23
|
className?: string;
|
|
31
24
|
style?: CSSProperties;
|
|
32
25
|
surface?: TraceTreeSurface;
|
|
26
|
+
nameColumnWidth?: number;
|
|
27
|
+
defaultNameColumnWidth?: number;
|
|
28
|
+
onNameColumnWidthChange?: (w: number) => void;
|
|
29
|
+
persistKey?: string;
|
|
30
|
+
wrapName?: boolean;
|
|
33
31
|
}
|
|
34
|
-
export declare function TraceTree({ spans, selectedId, onSelect, defaultCollapsedDepth, className, style, surface, }: TraceTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
35
|
-
export
|
|
32
|
+
export declare function TraceTree({ spans, selectedId, onSelect, defaultCollapsedDepth, className, style, surface, nameColumnWidth, defaultNameColumnWidth, onNameColumnWidthChange, persistKey, wrapName, }: TraceTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
+
export {};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
2
2
|
import { ToolCallData } from './ToolCallCard';
|
|
3
3
|
export interface TrajectoryStepData {
|
|
4
4
|
step: number;
|
|
@@ -10,14 +10,7 @@ export interface TrajectoryStepData {
|
|
|
10
10
|
toolCall?: ToolCallData;
|
|
11
11
|
observation?: string;
|
|
12
12
|
}
|
|
13
|
-
export
|
|
14
|
-
id: string;
|
|
15
|
-
kind?: SurfaceKind;
|
|
16
|
-
label?: string;
|
|
17
|
-
project: (data: TrajectoryStepData) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
18
|
-
askSuggestions?: string[];
|
|
19
|
-
ask?: boolean;
|
|
20
|
-
}
|
|
13
|
+
export type TrajectoryStepSurface = PrimitiveSurface<TrajectoryStepData>;
|
|
21
14
|
interface TrajectoryStepProps {
|
|
22
15
|
data: TrajectoryStepData;
|
|
23
16
|
defaultExpanded?: boolean;
|
|
@@ -25,4 +18,4 @@ interface TrajectoryStepProps {
|
|
|
25
18
|
surface?: TrajectoryStepSurface;
|
|
26
19
|
}
|
|
27
20
|
export declare function TrajectoryStep({ data, defaultExpanded, className, surface, }: TrajectoryStepProps): import("react/jsx-runtime").JSX.Element;
|
|
28
|
-
export
|
|
21
|
+
export {};
|
|
@@ -1,14 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
import { TrajectoryStepData } from './TrajectoryStep';
|
|
4
|
-
export
|
|
5
|
-
id: string;
|
|
6
|
-
kind?: SurfaceKind;
|
|
7
|
-
label?: string;
|
|
8
|
-
project: (steps: TrajectoryStepData[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
9
|
-
askSuggestions?: string[];
|
|
10
|
-
ask?: boolean;
|
|
11
|
-
}
|
|
4
|
+
export type TrajectoryTimelineSurface = PrimitiveSurface<TrajectoryStepData[]>;
|
|
12
5
|
export interface TrajectoryTimelineProps {
|
|
13
6
|
steps: TrajectoryStepData[];
|
|
14
7
|
agentName?: string;
|
|
@@ -19,4 +12,3 @@ export interface TrajectoryTimelineProps {
|
|
|
19
12
|
surface?: TrajectoryTimelineSurface;
|
|
20
13
|
}
|
|
21
14
|
export declare function TrajectoryTimeline({ steps, agentName, status, totalDurationMs, extra, className, surface, }: TrajectoryTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
-
export default TrajectoryTimeline;
|
|
@@ -9,6 +9,7 @@ export { Panel } from './Panel';
|
|
|
9
9
|
export type { PanelSurface } from './Panel';
|
|
10
10
|
export { PanelTitle } from './PanelTitle';
|
|
11
11
|
export { Markdown } from './Markdown';
|
|
12
|
+
export type { MarkdownProps } from './Markdown';
|
|
12
13
|
export { MetricLabel } from './MetricLabel';
|
|
13
14
|
export { MonoValue } from './MonoValue';
|
|
14
15
|
export type { MonoValueSurface } from './MonoValue';
|
|
@@ -40,8 +41,14 @@ export { Skeleton, SkeletonText } from './Skeleton';
|
|
|
40
41
|
export { TimeDisplay } from './TimeDisplay';
|
|
41
42
|
export { CodeBlock } from './CodeBlock';
|
|
42
43
|
export type { CodeBlockSurface } from './CodeBlock';
|
|
44
|
+
export { ContentInspectorDialog, ContentPreview, } from './ContentInspectorDialog';
|
|
45
|
+
export type { ContentInspectorDialogProps, ContentPreviewProps, } from './ContentInspectorDialog';
|
|
46
|
+
export { prepareInspectableContent } from './ContentInspectorContent';
|
|
47
|
+
export type { InspectableContent, InspectableContentKind, PreparedInspectableContent, } from './ContentInspectorContent';
|
|
48
|
+
export { SessionRunOutputView, SessionRunTrajectoryView, } from './SessionRunView';
|
|
49
|
+
export type { SessionRunFact, SessionRunMessage, SessionRunOutputViewProps, SessionRunSubmission, SessionRunSummary, SessionRunToolCall, SessionRunTrajectoryViewProps, } from './SessionRunView';
|
|
43
50
|
export { DataTable } from './DataTable';
|
|
44
|
-
export type { DataTableColumn, DataTableSurface } from './DataTable';
|
|
51
|
+
export type { DataTableColumn, DataTablePagination, DataTableSurface, } from './DataTable';
|
|
45
52
|
export { EventTable } from './EventTable';
|
|
46
53
|
export type { EventTableColumn, EventTableProps } from './EventTable';
|
|
47
54
|
export { DataList } from './DataList';
|
|
@@ -111,6 +118,8 @@ export { ParquetViewer } from './ParquetViewer';
|
|
|
111
118
|
export type { ParquetViewerSurface } from './ParquetViewer';
|
|
112
119
|
export { TraceTree } from './TraceTree';
|
|
113
120
|
export type { TraceSpan, TraceTreeSurface } from './TraceTree';
|
|
121
|
+
export { TraceSpanInspector } from './TraceSpanInspector';
|
|
122
|
+
export type { TraceSpanInspectorProps } from './TraceSpanInspector';
|
|
114
123
|
export { TimelineChart } from './TimelineChart';
|
|
115
124
|
export type { TimelineChartProps, TimelineSpan } from './TimelineChart';
|
|
116
125
|
export { BucketCard } from './BucketCard';
|
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* Short, human-friendly relative time. Mirrors the conventions used in
|
|
3
3
|
* inbox-style UIs ("just now", "5m", "2h", "yesterday", "Mon", "Mar 4").
|
|
4
4
|
*/
|
|
5
|
-
export declare function relativeTime(
|
|
5
|
+
export declare function relativeTime(value: string | number | Date, now?: number): string;
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { TraceSpan } from './TraceTree';
|
|
3
|
+
export declare function formatDuration(ms: number): string;
|
|
4
|
+
export declare function statusTone(status?: TraceSpan['status']): 'warning' | 'ink' | 'muted';
|
|
5
|
+
export declare function nodeToString(node: ReactNode): string;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export interface UseCopyToClipboardResult {
|
|
2
|
+
/** True for `resetMs` after a successful copy. */
|
|
3
|
+
copied: boolean;
|
|
4
|
+
/** Resolves false when the clipboard is unavailable or denied. */
|
|
5
|
+
copy: (text: string) => Promise<boolean>;
|
|
6
|
+
reset: () => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function useCopyToClipboard(resetMs: number): UseCopyToClipboardResult;
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { KeyboardEvent, RefObject } from 'react';
|
|
2
|
+
import { PopoverProps } from 'antd';
|
|
3
|
+
/**
|
|
4
|
+
* Flip on either axis, then slide along the trigger to stay on screen. antd's
|
|
5
|
+
* `AdjustOverflow` type omits `shiftX`, but antd hands the object through to
|
|
6
|
+
* rc-trigger, which supports it — without it a wide menu opened from the
|
|
7
|
+
* middle of a phone screen runs off the edge.
|
|
8
|
+
*/
|
|
9
|
+
export declare const MENU_OVERFLOW: PopoverProps["autoAdjustOverflow"];
|
|
10
|
+
export interface MenuPopover<P extends HTMLElement> {
|
|
11
|
+
open: boolean;
|
|
12
|
+
setOpen: (open: boolean) => void;
|
|
13
|
+
/** Closes the menu and hands focus back to the trigger. */
|
|
14
|
+
close: () => void;
|
|
15
|
+
triggerRef: RefObject<HTMLButtonElement>;
|
|
16
|
+
panelRef: RefObject<P>;
|
|
17
|
+
onTriggerKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
|
|
18
|
+
onPanelKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
|
|
19
|
+
}
|
|
20
|
+
/**
|
|
21
|
+
* Open state and keyboard handling for a click-triggered menu rendered in
|
|
22
|
+
* an antd `Popover`. The popover portals to `document.body`, so focus is
|
|
23
|
+
* moved into the panel on open (the selected option, else the first
|
|
24
|
+
* input or button) and handed back to the trigger on Escape, Tab and
|
|
25
|
+
* item activation.
|
|
26
|
+
*/
|
|
27
|
+
export declare function useMenuPopover<P extends HTMLElement>(): MenuPopover<P>;
|
|
@@ -6,10 +6,19 @@ export interface UseResizableOptions {
|
|
|
6
6
|
side: 'left' | 'right';
|
|
7
7
|
persistKey?: string;
|
|
8
8
|
onCollapse?: () => void;
|
|
9
|
+
/** Width change per arrow-key press, in px. */
|
|
10
|
+
keyboardStep?: number;
|
|
11
|
+
/**
|
|
12
|
+
* Narrows a proposed width after the min/max clamp, e.g. so a neighbouring
|
|
13
|
+
* pane keeps its own minimum. The result is clamped to min/max again.
|
|
14
|
+
*/
|
|
15
|
+
constrainWidth?: (width: number) => number;
|
|
9
16
|
}
|
|
10
17
|
export interface UseResizableReturn {
|
|
11
18
|
width: number;
|
|
12
19
|
handleProps: HTMLAttributes<HTMLDivElement>;
|
|
13
20
|
isDragging: boolean;
|
|
21
|
+
/** Restores `initialWidth`, clamped and constrained like any other change. */
|
|
22
|
+
reset: () => void;
|
|
14
23
|
}
|
|
15
24
|
export declare function useResizable(opts: UseResizableOptions): UseResizableReturn;
|