@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.
Files changed (120) hide show
  1. package/README.md +81 -5
  2. package/dist/agent/AgentProvider.d.ts +4 -0
  3. package/dist/agent/AskOverlay.d.ts +0 -1
  4. package/dist/agent/AskPanel.d.ts +0 -1
  5. package/dist/agent/agentContext.d.ts +6 -2
  6. package/dist/agent/agentmChannelClient.d.ts +1 -0
  7. package/dist/agent/runtime.d.ts +6 -1
  8. package/dist/agent/usePrimitiveSurface.d.ts +30 -0
  9. package/dist/commands/CommandProvider.d.ts +3 -3
  10. package/dist/commands/commandContext.d.ts +2 -2
  11. package/dist/components/ui/AgentPanel.d.ts +3 -10
  12. package/dist/components/ui/AuthLayout.d.ts +1 -1
  13. package/dist/components/ui/Avatar.d.ts +6 -13
  14. package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
  15. package/dist/components/ui/Breadcrumb.d.ts +1 -1
  16. package/dist/components/ui/BucketCard.d.ts +1 -1
  17. package/dist/components/ui/ChatComposer.d.ts +1 -1
  18. package/dist/components/ui/ChatMessage.d.ts +7 -14
  19. package/dist/components/ui/ChatMessageList.d.ts +3 -10
  20. package/dist/components/ui/ChatSessionList.d.ts +0 -1
  21. package/dist/components/ui/Chip.d.ts +3 -10
  22. package/dist/components/ui/CodeBlock.d.ts +8 -14
  23. package/dist/components/ui/CodeEditor.d.ts +6 -13
  24. package/dist/components/ui/CommandInvocationCard.d.ts +7 -14
  25. package/dist/components/ui/CommandPalette.d.ts +0 -1
  26. package/dist/components/ui/ContentInspectorContent.d.ts +14 -0
  27. package/dist/components/ui/ContentInspectorDialog.d.ts +15 -0
  28. package/dist/components/ui/ControlListItem.d.ts +1 -1
  29. package/dist/components/ui/DangerZone.d.ts +1 -1
  30. package/dist/components/ui/DataList.d.ts +3 -11
  31. package/dist/components/ui/DataTable.d.ts +27 -11
  32. package/dist/components/ui/DiffViewer.d.ts +6 -13
  33. package/dist/components/ui/DropdownMenu.d.ts +6 -2
  34. package/dist/components/ui/EmptyState.d.ts +1 -1
  35. package/dist/components/ui/EnvironmentSwitcher.d.ts +0 -1
  36. package/dist/components/ui/ErrorState.d.ts +8 -2
  37. package/dist/components/ui/EventTable.d.ts +0 -1
  38. package/dist/components/ui/FileDropzone.d.ts +1 -1
  39. package/dist/components/ui/FilePreview.d.ts +8 -15
  40. package/dist/components/ui/FolderDropzone.d.ts +0 -1
  41. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -1
  42. package/dist/components/ui/FormRow.d.ts +1 -1
  43. package/dist/components/ui/InboxPage.d.ts +3 -10
  44. package/dist/components/ui/KeyValueList.d.ts +3 -10
  45. package/dist/components/ui/LoginForm.d.ts +1 -1
  46. package/dist/components/ui/Markdown.d.ts +9 -3
  47. package/dist/components/ui/MetadataList.d.ts +0 -1
  48. package/dist/components/ui/MetricCard.d.ts +7 -14
  49. package/dist/components/ui/MetricLabel.d.ts +1 -1
  50. package/dist/components/ui/MonoValue.d.ts +3 -10
  51. package/dist/components/ui/NotificationBell.d.ts +1 -1
  52. package/dist/components/ui/ObjectBrowser.d.ts +1 -1
  53. package/dist/components/ui/ObjectInspector.d.ts +0 -1
  54. package/dist/components/ui/PageHeader.d.ts +1 -1
  55. package/dist/components/ui/PageSizeSelect.d.ts +8 -2
  56. package/dist/components/ui/Panel.d.ts +3 -10
  57. package/dist/components/ui/PanelTitle.d.ts +1 -1
  58. package/dist/components/ui/ParquetViewer.d.ts +8 -15
  59. package/dist/components/ui/PasswordField.d.ts +1 -1
  60. package/dist/components/ui/ProjectSelector.d.ts +8 -2
  61. package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
  62. package/dist/components/ui/RegisterForm.d.ts +1 -1
  63. package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
  64. package/dist/components/ui/SavedQueryBar.d.ts +0 -1
  65. package/dist/components/ui/SearchInput.d.ts +0 -1
  66. package/dist/components/ui/SectionDivider.d.ts +1 -1
  67. package/dist/components/ui/SessionRunView.d.ts +50 -0
  68. package/dist/components/ui/SettingsSection.d.ts +1 -1
  69. package/dist/components/ui/ShareLinkDialog.d.ts +1 -1
  70. package/dist/components/ui/SparkLine.d.ts +3 -10
  71. package/dist/components/ui/StatBlock.d.ts +7 -14
  72. package/dist/components/ui/StatusDot.d.ts +1 -1
  73. package/dist/components/ui/Tabs.d.ts +1 -1
  74. package/dist/components/ui/Terminal.d.ts +3 -10
  75. package/dist/components/ui/TextField.d.ts +1 -1
  76. package/dist/components/ui/TimeDisplay.d.ts +3 -3
  77. package/dist/components/ui/TimeRangePicker.d.ts +0 -1
  78. package/dist/components/ui/Timeline.d.ts +3 -10
  79. package/dist/components/ui/ToolCallCard.d.ts +3 -10
  80. package/dist/components/ui/Toolbar.d.ts +0 -1
  81. package/dist/components/ui/TraceSpanInspector.d.ts +12 -0
  82. package/dist/components/ui/TraceTree.d.ts +9 -11
  83. package/dist/components/ui/TrajectoryStep.d.ts +3 -10
  84. package/dist/components/ui/TrajectoryTimeline.d.ts +2 -10
  85. package/dist/components/ui/UploadQueue.d.ts +1 -1
  86. package/dist/components/ui/index.d.ts +10 -1
  87. package/dist/components/ui/relativeTime.d.ts +1 -1
  88. package/dist/components/ui/traceFormat.d.ts +5 -0
  89. package/dist/hooks/useCopyToClipboard.d.ts +8 -0
  90. package/dist/hooks/useMenuPopover.d.ts +27 -0
  91. package/dist/hooks/useResizable.d.ts +9 -0
  92. package/dist/index.cjs +12 -1
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.d.ts +4 -3
  95. package/dist/index.js +9848 -124
  96. package/dist/index.js.map +1 -1
  97. package/dist/layouts/shell/AegisShell.d.ts +1 -1
  98. package/dist/layouts/shell/AuthRequiredCard.d.ts +2 -2
  99. package/dist/layouts/shell/TopHeader.d.ts +5 -1
  100. package/dist/layouts/shell/paths.d.ts +8 -0
  101. package/dist/layouts/shell/types.d.ts +21 -13
  102. package/dist/lib/format.d.ts +2 -0
  103. package/dist/lib/id.d.ts +2 -0
  104. package/dist/lib/storage.d.ts +12 -0
  105. package/dist/style.css +1 -1
  106. package/dist/theme/antdTheme.d.ts +2 -3
  107. package/package.json +24 -17
  108. package/dist/index-6WZzHI2Z.cjs +0 -1151
  109. package/dist/index-6WZzHI2Z.cjs.map +0 -1
  110. package/dist/index-CZ_qegBG.js +0 -6736
  111. package/dist/index-CZ_qegBG.js.map +0 -1
  112. package/dist/index-DLXAAlfH.cjs +0 -15
  113. package/dist/index-DLXAAlfH.cjs.map +0 -1
  114. package/dist/index-DtgBxtmy.js +0 -56284
  115. package/dist/index-DtgBxtmy.js.map +0 -1
  116. package/dist/styles/fonts.d.ts +0 -0
  117. package/dist/workerBundle-D52AeOj1.js +0 -76
  118. package/dist/workerBundle-D52AeOj1.js.map +0 -1
  119. package/dist/workerBundle-FGNDqtbW.cjs +0 -73
  120. package/dist/workerBundle-FGNDqtbW.cjs.map +0 -1
@@ -1,5 +1,5 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
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 interface TerminalSurface {
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 default Terminal;
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 default TextField;
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' = "2 m ago", 'duration' = elapsed time. */
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 default TimeDisplay;
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 { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
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 interface TimelineSurface {
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 default Timeline;
25
+ export {};
@@ -1,4 +1,4 @@
1
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
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 interface ToolCallCardSurface {
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 default ToolCallCard;
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 { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface TraceTreeSurface {
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 default TraceTree;
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 { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
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 interface TrajectoryStepSurface {
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 default TrajectoryStep;
21
+ export {};
@@ -1,14 +1,7 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
3
  import { TrajectoryStepData } from './TrajectoryStep';
4
- export interface TrajectoryTimelineSurface {
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;
@@ -10,4 +10,4 @@ interface UploadQueueProps {
10
10
  className?: string;
11
11
  }
12
12
  export declare function UploadQueue({ items, onRetry, onDismiss, onClearCompleted, className, }: UploadQueueProps): import("react/jsx-runtime").JSX.Element;
13
- export default UploadQueue;
13
+ export {};
@@ -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(iso: string, now?: number): string;
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;