@lincyaw/aegis-ui 0.3.0 → 0.6.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 +82 -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/Alert.d.ts +14 -0
- package/dist/components/ui/AmbientBackground.d.ts +23 -0
- package/dist/components/ui/AuthLayout.d.ts +1 -1
- package/dist/components/ui/Avatar.d.ts +14 -14
- package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
- package/dist/components/ui/Breadcrumb.d.ts +4 -14
- package/dist/components/ui/BucketCard.d.ts +1 -1
- package/dist/components/ui/Button.d.ts +26 -4
- package/dist/components/ui/Carousel.d.ts +28 -0
- 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/CheckGrid.d.ts +47 -0
- package/dist/components/ui/Checkbox.d.ts +14 -0
- package/dist/components/ui/Chip.d.ts +17 -14
- package/dist/components/ui/CodeBlock.d.ts +11 -15
- package/dist/components/ui/CodeEditor.d.ts +6 -13
- package/dist/components/ui/Collapse.d.ts +16 -0
- package/dist/components/ui/ColumnLayout.d.ts +16 -0
- 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 +4 -2
- 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 +86 -10
- package/dist/components/ui/Dialog.d.ts +21 -0
- 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/FileTree.d.ts +27 -0
- 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/IdentityCell.d.ts +25 -0
- 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/MdxDocument.d.ts +17 -0
- 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 +2 -1
- package/dist/components/ui/MonoValue.d.ts +6 -11
- 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 +8 -3
- package/dist/components/ui/PageSizeSelect.d.ts +9 -2
- package/dist/components/ui/Pagination.d.ts +13 -0
- package/dist/components/ui/Panel.d.ts +35 -14
- package/dist/components/ui/PanelTitle.d.ts +3 -3
- package/dist/components/ui/ParetoChart.d.ts +41 -0
- package/dist/components/ui/ParquetViewer.d.ts +8 -15
- package/dist/components/ui/PasswordField.d.ts +1 -1
- package/dist/components/ui/PickerField.d.ts +17 -0
- package/dist/components/ui/ProjectSelector.d.ts +8 -2
- package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
- package/dist/components/ui/RankBar.d.ts +25 -0
- package/dist/components/ui/RegisterForm.d.ts +1 -1
- package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
- package/dist/components/ui/Reveal.d.ts +17 -0
- package/dist/components/ui/RunPips.d.ts +25 -0
- package/dist/components/ui/SavedQueryBar.d.ts +0 -1
- package/dist/components/ui/ScoreBar.d.ts +21 -0
- package/dist/components/ui/SearchInput.d.ts +6 -2
- package/dist/components/ui/SectionDivider.d.ts +1 -1
- package/dist/components/ui/Select.d.ts +25 -0
- 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 +22 -6
- package/dist/components/ui/SparkLine.d.ts +3 -10
- package/dist/components/ui/StackedBar.d.ts +47 -0
- package/dist/components/ui/StatBlock.d.ts +15 -16
- package/dist/components/ui/StatusDot.d.ts +2 -2
- package/dist/components/ui/TableOfContents.d.ts +20 -0
- package/dist/components/ui/Tabs.d.ts +12 -2
- 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 +23 -15
- 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 +15 -0
- package/dist/components/ui/TraceTree.d.ts +16 -14
- package/dist/components/ui/TrajectoryStep.d.ts +16 -10
- package/dist/components/ui/TrajectoryTimeline.d.ts +5 -11
- package/dist/components/ui/UploadQueue.d.ts +1 -1
- package/dist/components/ui/codeFence.d.ts +5 -0
- package/dist/components/ui/index.d.ts +51 -5
- package/dist/components/ui/linkComponent.d.ts +12 -0
- package/dist/components/ui/mdxTableOfContents.d.ts +13 -0
- package/dist/components/ui/relativeTime.d.ts +1 -1
- package/dist/components/ui/tablistKeyboard.d.ts +6 -0
- package/dist/components/ui/traceFormat.d.ts +5 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useCopyToClipboard.d.ts +8 -0
- package/dist/hooks/useElementWidth.d.ts +3 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -0
- package/dist/hooks/useMenuPopover.d.ts +27 -0
- package/dist/hooks/usePageHidden.d.ts +2 -0
- package/dist/hooks/useResizable.d.ts +9 -0
- package/dist/index.cjs +13 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +8 -5
- package/dist/index.js +12123 -123
- 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 +9 -1
- package/dist/layouts/shell/paths.d.ts +11 -0
- package/dist/layouts/shell/types.d.ts +40 -13
- package/dist/lib/format.d.ts +2 -0
- package/dist/lib/id.d.ts +2 -0
- package/dist/lib/luceneQuery/lucene.d.ts +63 -0
- package/dist/lib/storage.d.ts +12 -0
- package/dist/locale/LocaleProvider.d.ts +9 -0
- package/dist/locale/index.d.ts +4 -0
- package/dist/locale/localeContext.d.ts +2 -0
- package/dist/locale/strings.d.ts +110 -0
- package/dist/locale/useStrings.d.ts +2 -0
- package/dist/mdx-modules.d.ts +22 -0
- package/dist/style.css +1 -1
- package/dist/theme/antdTheme.d.ts +2 -3
- package/dist/vite.cjs +2 -0
- package/dist/vite.cjs.map +1 -0
- package/dist/vite.d.ts +7 -0
- package/dist/vite.js +18 -0
- package/dist/vite.js.map +1 -0
- package/package.json +43 -18
- 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,21 +1,17 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
project: (data: {
|
|
7
|
-
code: string;
|
|
8
|
-
language: string;
|
|
9
|
-
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
10
|
-
askSuggestions?: string[];
|
|
11
|
-
ask?: boolean;
|
|
12
|
-
}
|
|
1
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
2
|
+
export type CodeBlockSurface = PrimitiveSurface<{
|
|
3
|
+
code: string;
|
|
4
|
+
language: string;
|
|
5
|
+
}>;
|
|
13
6
|
interface CodeBlockProps {
|
|
14
7
|
code: string;
|
|
15
|
-
|
|
8
|
+
/** Shown as the header label, e.g. `json`, `typescript`, `python`. */
|
|
9
|
+
language?: string;
|
|
16
10
|
showLineNumbers?: boolean;
|
|
11
|
+
/** Caps the code area's height (number → px); longer code scrolls inside. */
|
|
12
|
+
maxHeight?: number | string;
|
|
17
13
|
className?: string;
|
|
18
14
|
surface?: CodeBlockSurface;
|
|
19
15
|
}
|
|
20
|
-
export declare function CodeBlock({ code, language, showLineNumbers, className, surface, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
-
export
|
|
16
|
+
export declare function CodeBlock({ code, language, showLineNumbers, maxHeight, className, surface, }: CodeBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
export type CodeEditorLanguage = 'json' | 'yaml' | 'sql' | 'text';
|
|
4
4
|
/** Schema hint for SQL autocompletion. */
|
|
5
5
|
export interface CodeEditorField {
|
|
@@ -7,17 +7,10 @@ export interface CodeEditorField {
|
|
|
7
7
|
/** Optional ClickHouse type ('UInt64', 'Map(String,String)', …) shown alongside the suggestion. */
|
|
8
8
|
type?: string;
|
|
9
9
|
}
|
|
10
|
-
export
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
project: (data: {
|
|
15
|
-
value: string;
|
|
16
|
-
language: CodeEditorLanguage;
|
|
17
|
-
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
18
|
-
askSuggestions?: string[];
|
|
19
|
-
ask?: boolean;
|
|
20
|
-
}
|
|
10
|
+
export type CodeEditorSurface = PrimitiveSurface<{
|
|
11
|
+
value: string;
|
|
12
|
+
language: CodeEditorLanguage;
|
|
13
|
+
}>;
|
|
21
14
|
interface CodeEditorProps {
|
|
22
15
|
value: string;
|
|
23
16
|
onChange?: (value: string) => void;
|
|
@@ -39,4 +32,4 @@ interface CodeEditorProps {
|
|
|
39
32
|
onSubmit?: (value: string) => void;
|
|
40
33
|
}
|
|
41
34
|
export declare function CodeEditor({ value, onChange, language, readOnly, theme, placeholder, height, className, style, surface, fields, tables, onSubmit, }: CodeEditorProps): import("react/jsx-runtime").JSX.Element;
|
|
42
|
-
export
|
|
35
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface CollapseItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface CollapseProps {
|
|
8
|
+
items: CollapseItem[];
|
|
9
|
+
/** Controlled open keys. Omit for uncontrolled behaviour. */
|
|
10
|
+
activeKeys?: string[];
|
|
11
|
+
defaultActiveKeys?: string[];
|
|
12
|
+
onChange?: (keys: string[]) => void;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function Collapse({ items, activeKeys, defaultActiveKeys, onChange, className, }: CollapseProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface ColumnLayoutProps {
|
|
3
|
+
/**
|
|
4
|
+
* `grid-template-columns` above 768 px, e.g. `'872fr 304fr'` or
|
|
5
|
+
* `'240fr 552fr 360fr'`. Each child is one column; below 768 px they
|
|
6
|
+
* stack. Nest a `columns="1fr"` layout to stack cards inside a column
|
|
7
|
+
* with the same gap.
|
|
8
|
+
*/
|
|
9
|
+
columns: string;
|
|
10
|
+
/** `md` = `--space-4`, `lg` = `--space-6`. */
|
|
11
|
+
gap?: 'md' | 'lg';
|
|
12
|
+
children: ReactNode;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
export declare function ColumnLayout({ columns, gap, children, className, }: ColumnLayoutProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export {};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
commandId: string;
|
|
8
|
-
args?: unknown;
|
|
9
|
-
status: 'pending' | 'success' | 'error';
|
|
10
|
-
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
11
|
-
askSuggestions?: string[];
|
|
12
|
-
ask?: boolean;
|
|
13
|
-
}
|
|
1
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
2
|
+
export type CommandInvocationCardSurface = PrimitiveSurface<{
|
|
3
|
+
commandId: string;
|
|
4
|
+
args?: unknown;
|
|
5
|
+
status: 'pending' | 'success' | 'error';
|
|
6
|
+
}>;
|
|
14
7
|
interface CommandInvocationCardProps {
|
|
15
8
|
commandId: string;
|
|
16
9
|
args?: unknown;
|
|
@@ -21,4 +14,4 @@ interface CommandInvocationCardProps {
|
|
|
21
14
|
surface?: CommandInvocationCardSurface;
|
|
22
15
|
}
|
|
23
16
|
export declare function CommandInvocationCard({ commandId, args, status, error, onUndo, className, surface, }: CommandInvocationCardProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export type InspectableContentKind = 'json' | 'markdown' | 'sql' | 'text';
|
|
2
|
+
export interface InspectableContent {
|
|
3
|
+
title: string;
|
|
4
|
+
value: unknown;
|
|
5
|
+
kind?: InspectableContentKind;
|
|
6
|
+
}
|
|
7
|
+
export interface PreparedInspectableContent {
|
|
8
|
+
kind: InspectableContentKind;
|
|
9
|
+
text: string;
|
|
10
|
+
rawText: string;
|
|
11
|
+
value: unknown;
|
|
12
|
+
}
|
|
13
|
+
export declare function normalizeInspectableText(text: string): string;
|
|
14
|
+
export declare function prepareInspectableContent(content: InspectableContent): PreparedInspectableContent;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { InspectableContent } from './ContentInspectorContent';
|
|
3
|
+
export interface ContentPreviewProps {
|
|
4
|
+
content: InspectableContent;
|
|
5
|
+
className?: string;
|
|
6
|
+
expanded?: boolean;
|
|
7
|
+
}
|
|
8
|
+
export interface ContentInspectorDialogProps {
|
|
9
|
+
open: boolean;
|
|
10
|
+
content: InspectableContent | null;
|
|
11
|
+
onClose: () => void;
|
|
12
|
+
width?: number | string;
|
|
13
|
+
}
|
|
14
|
+
export declare function ContentPreview({ content, className, expanded, }: ContentPreviewProps): ReactElement;
|
|
15
|
+
export declare function ContentInspectorDialog({ open, content, onClose, width, }: ContentInspectorDialogProps): ReactElement | null;
|
|
@@ -3,6 +3,8 @@ import { AegisAction } from '../../agent/types';
|
|
|
3
3
|
interface ControlListItemProps {
|
|
4
4
|
/** Left-side content (e.g. dot + label). */
|
|
5
5
|
left: ReactNode;
|
|
6
|
+
/** Muted line under `left`, e.g. what the option does; inverts with `active`. */
|
|
7
|
+
description?: ReactNode;
|
|
6
8
|
/** Right-side content (e.g. status text or action button). */
|
|
7
9
|
right?: ReactNode;
|
|
8
10
|
/** Inverts the row to ink — used for the currently-active item. */
|
|
@@ -14,5 +16,5 @@ interface ControlListItemProps {
|
|
|
14
16
|
className?: string;
|
|
15
17
|
style?: CSSProperties;
|
|
16
18
|
}
|
|
17
|
-
export declare function ControlListItem({ left, right, active, onClick, action, className, style, }: ControlListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
export
|
|
19
|
+
export declare function ControlListItem({ left, description, right, active, onClick, action, className, style, }: ControlListItemProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
export interface DataListColumn<T> {
|
|
4
4
|
key: string;
|
|
5
5
|
label: ReactNode;
|
|
@@ -8,15 +8,7 @@ export interface DataListColumn<T> {
|
|
|
8
8
|
export interface DataListItem {
|
|
9
9
|
id: string;
|
|
10
10
|
}
|
|
11
|
-
export
|
|
12
|
-
id: string;
|
|
13
|
-
kind?: SurfaceKind;
|
|
14
|
-
label?: string;
|
|
15
|
-
project: (rows: T[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
16
|
-
askSuggestions?: string[];
|
|
17
|
-
/** When false, AskOverlay skips this surface (per docs §7.1). */
|
|
18
|
-
ask?: boolean;
|
|
19
|
-
}
|
|
11
|
+
export type DataListSurface<T> = PrimitiveSurface<T[]>;
|
|
20
12
|
interface DataListProps<T extends DataListItem> {
|
|
21
13
|
items: T[];
|
|
22
14
|
columns: Array<DataListColumn<T>>;
|
|
@@ -27,4 +19,4 @@ interface DataListProps<T extends DataListItem> {
|
|
|
27
19
|
className?: string;
|
|
28
20
|
}
|
|
29
21
|
export declare function DataList<T extends DataListItem>({ items, columns, selectedId, onSelect, surface, emptyText, className, }: DataListProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
30
|
-
export
|
|
22
|
+
export {};
|
|
@@ -1,12 +1,14 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
|
+
export type DataTableSurface<T> = PrimitiveSurface<T[]>;
|
|
4
|
+
/** Background wash of one cell, e.g. a step on a pass-rate scale. */
|
|
5
|
+
export interface DataTableCellTone {
|
|
6
|
+
tone: 'success' | 'info' | 'caution' | 'warning';
|
|
7
|
+
/**
|
|
8
|
+
* 1 (default) is the tone's soft background; each step up mixes in more
|
|
9
|
+
* of the tone's accent, to 5.
|
|
10
|
+
*/
|
|
11
|
+
step?: 1 | 2 | 3 | 4 | 5;
|
|
10
12
|
}
|
|
11
13
|
export interface DataTableColumn<T> {
|
|
12
14
|
key: string;
|
|
@@ -26,8 +28,37 @@ export interface DataTableColumn<T> {
|
|
|
26
28
|
truncate?: boolean;
|
|
27
29
|
/** Allow dragging the right edge of this column to resize. Default false. */
|
|
28
30
|
resizable?: boolean;
|
|
31
|
+
/**
|
|
32
|
+
* `'actions'` lays the cell out as a right-aligned, gapped, wrapping row of
|
|
33
|
+
* controls — return them straight from `render`. Overrides `align` and
|
|
34
|
+
* `truncate`.
|
|
35
|
+
*/
|
|
36
|
+
kind?: 'actions';
|
|
37
|
+
/**
|
|
38
|
+
* Number column: header and cells right-aligned, figures in
|
|
39
|
+
* `--font-numeric` with tabular widths so digits and decimal points line
|
|
40
|
+
* up. Overrides `align`.
|
|
41
|
+
*/
|
|
42
|
+
numeric?: boolean;
|
|
43
|
+
/** Washes a cell's background in a tone. Table rows only, not mobile cards. */
|
|
44
|
+
cellTone?: (row: T, index: number) => DataTableCellTone | undefined;
|
|
29
45
|
render: (row: T, index: number) => ReactNode;
|
|
30
46
|
}
|
|
47
|
+
/** Server-side pagination: `data` is the current page, never sliced here. */
|
|
48
|
+
export interface DataTablePagination {
|
|
49
|
+
/** 1-based. */
|
|
50
|
+
page: number;
|
|
51
|
+
pageSize: number;
|
|
52
|
+
/**
|
|
53
|
+
* Rows across all pages. Omit when the backend doesn't count them: the
|
|
54
|
+
* range label drops "of N" and Next stays enabled while the page is full.
|
|
55
|
+
*/
|
|
56
|
+
total?: number;
|
|
57
|
+
/** Changing the page size always resets to page 1. */
|
|
58
|
+
onChange: (page: number, pageSize: number) => void;
|
|
59
|
+
/** Renders a "Rows per page" select offering these sizes. */
|
|
60
|
+
pageSizeOptions?: number[];
|
|
61
|
+
}
|
|
31
62
|
interface DataTableProps<T> {
|
|
32
63
|
columns: Array<DataTableColumn<T>>;
|
|
33
64
|
data: T[];
|
|
@@ -37,12 +68,57 @@ interface DataTableProps<T> {
|
|
|
37
68
|
emptyDescription?: string;
|
|
38
69
|
emptyAction?: ReactNode;
|
|
39
70
|
className?: string;
|
|
71
|
+
/**
|
|
72
|
+
* Draws the table as its own card: `--radius-lg`, hairline border and
|
|
73
|
+
* resting shadow, with the header flush with the top and clipped by the
|
|
74
|
+
* radius. Default true. Pass false where a container already frames the
|
|
75
|
+
* table, e.g. a titled `Panel padded={false}`, a dialog or an expanded row.
|
|
76
|
+
*/
|
|
77
|
+
framed?: boolean;
|
|
40
78
|
/**
|
|
41
79
|
* When set, resized column widths are persisted to localStorage under
|
|
42
80
|
* `aegis-data-table:<persistKey>`. Use a stable key per table.
|
|
43
81
|
*/
|
|
44
82
|
persistKey?: string;
|
|
83
|
+
/** Renders a footer with page navigation under the table. */
|
|
84
|
+
pagination?: DataTablePagination;
|
|
85
|
+
/** Adds a leading checkbox column and drives `selectedKeys`. */
|
|
86
|
+
selectable?: boolean;
|
|
87
|
+
selectedKeys?: Array<string | number>;
|
|
88
|
+
onSelectedKeysChange?: (keys: Array<string | number>) => void;
|
|
89
|
+
/**
|
|
90
|
+
* Makes rows expandable: a leading column of chevron toggles, and this
|
|
91
|
+
* content full-width under each expanded row.
|
|
92
|
+
*/
|
|
93
|
+
renderExpanded?: (row: T, index: number) => ReactNode;
|
|
94
|
+
/** Controlled expanded row keys. Omit to let the table track them. */
|
|
95
|
+
expandedKeys?: Array<string | number>;
|
|
96
|
+
/** Rows expanded on mount when `expandedKeys` is omitted. */
|
|
97
|
+
defaultExpandedKeys?: Array<string | number>;
|
|
98
|
+
onExpandedKeysChange?: (keys: Array<string | number>) => void;
|
|
99
|
+
/**
|
|
100
|
+
* At ≤768 px, renders each row through this instead of the columns, as a
|
|
101
|
+
* stacked list with no sideways scroll. Selection, expansion, row clicks,
|
|
102
|
+
* loading, empty state and pagination keep working.
|
|
103
|
+
*/
|
|
104
|
+
renderMobileCard?: (row: T, index: number) => ReactNode;
|
|
105
|
+
/**
|
|
106
|
+
* Makes rows clickable: pointer cursor, a muted hover background, a
|
|
107
|
+
* trailing chevron, and Enter on a focused row. Links, buttons and form
|
|
108
|
+
* controls inside a cell keep their own behaviour.
|
|
109
|
+
*/
|
|
110
|
+
onRowClick?: (row: T, index: number) => void;
|
|
111
|
+
/**
|
|
112
|
+
* Keeps the first column (with the selection and expansion columns) in
|
|
113
|
+
* view while the other columns scroll sideways.
|
|
114
|
+
*/
|
|
115
|
+
stickyFirstColumn?: boolean;
|
|
116
|
+
/**
|
|
117
|
+
* The rows are out of date, e.g. the previous page while the next one
|
|
118
|
+
* loads: they stay in place, dimmed, and the table is marked busy.
|
|
119
|
+
*/
|
|
120
|
+
stale?: boolean;
|
|
45
121
|
surface?: DataTableSurface<T>;
|
|
46
122
|
}
|
|
47
|
-
export declare function DataTable<T>({ columns, data, rowKey, loading, emptyTitle, emptyDescription, emptyAction, className, persistKey, surface, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
48
|
-
export
|
|
123
|
+
export declare function DataTable<T>({ columns, data, rowKey, loading, emptyTitle, emptyDescription, emptyAction, className, framed, persistKey, pagination, selectable, selectedKeys, onSelectedKeysChange, renderExpanded, expandedKeys, defaultExpandedKeys, onExpandedKeysChange, renderMobileCard, onRowClick, stickyFirstColumn, stale, surface, }: DataTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
124
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface DialogProps {
|
|
3
|
+
open: boolean;
|
|
4
|
+
title: ReactNode;
|
|
5
|
+
description?: ReactNode;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
/** Action row rendered at the bottom of the panel, right-aligned. */
|
|
8
|
+
footer?: ReactNode;
|
|
9
|
+
width?: 'sm' | 'md' | 'lg';
|
|
10
|
+
children?: ReactNode;
|
|
11
|
+
className?: string;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Portalled to `document.body` so a transformed or glass (backdrop-filter)
|
|
15
|
+
* ancestor cannot become the containing block of the fixed backdrop. Not a
|
|
16
|
+
* native `<dialog>`: its top layer would sit above antd's body-level
|
|
17
|
+
* popups and toasts. While open, focus stays inside the panel and the page
|
|
18
|
+
* behind it does not scroll.
|
|
19
|
+
*/
|
|
20
|
+
export declare function Dialog({ open, title, description, onClose, footer, width, children, className, }: DialogProps): import('react').ReactPortal | null;
|
|
21
|
+
export {};
|
|
@@ -1,16 +1,9 @@
|
|
|
1
1
|
import { CSSProperties } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
project: (data: {
|
|
8
|
-
oldValue: string;
|
|
9
|
-
newValue: string;
|
|
10
|
-
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
11
|
-
askSuggestions?: string[];
|
|
12
|
-
ask?: boolean;
|
|
13
|
-
}
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
|
+
export type DiffViewerSurface = PrimitiveSurface<{
|
|
4
|
+
oldValue: string;
|
|
5
|
+
newValue: string;
|
|
6
|
+
}>;
|
|
14
7
|
interface DiffViewerProps {
|
|
15
8
|
oldValue: string;
|
|
16
9
|
newValue: string;
|
|
@@ -30,4 +23,4 @@ interface DiffViewerProps {
|
|
|
30
23
|
surface?: DiffViewerSurface;
|
|
31
24
|
}
|
|
32
25
|
export declare function DiffViewer({ oldValue, newValue, splitView, compareMethod, showDiffOnly, hideLineNumbers, leftTitle, rightTitle, className, style, surface, }: DiffViewerProps): import("react/jsx-runtime").JSX.Element;
|
|
33
|
-
export
|
|
26
|
+
export {};
|
|
@@ -13,8 +13,12 @@ export interface DropdownItem {
|
|
|
13
13
|
interface DropdownMenuProps {
|
|
14
14
|
trigger: ReactNode;
|
|
15
15
|
items: DropdownItem[];
|
|
16
|
+
/** Non-clickable content above `items`, before a divider — e.g. a search field. */
|
|
17
|
+
header?: ReactNode;
|
|
18
|
+
/** Rendered below `items`, after a divider — e.g. "View all" / "Create". */
|
|
19
|
+
footerItems?: DropdownItem[];
|
|
16
20
|
className?: string;
|
|
17
21
|
align?: 'left' | 'right';
|
|
18
22
|
}
|
|
19
|
-
export declare function DropdownMenu({ trigger, items, className, align, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
-
export
|
|
23
|
+
export declare function DropdownMenu({ trigger, items, header, footerItems, className, align, }: DropdownMenuProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -26,4 +26,3 @@ export interface EnvironmentSwitcherProps {
|
|
|
26
26
|
* manifest state. Hidden when there is only one environment.
|
|
27
27
|
*/
|
|
28
28
|
export declare function EnvironmentSwitcher({ options, currentId, onChange, hideWhenSingle, className, ariaLabel, }: EnvironmentSwitcherProps): ReactElement | null;
|
|
29
|
-
export default EnvironmentSwitcher;
|
|
@@ -5,7 +5,13 @@ interface ErrorStateProps {
|
|
|
5
5
|
description?: ReactNode;
|
|
6
6
|
action?: ReactNode;
|
|
7
7
|
illustration?: ReactNode;
|
|
8
|
+
/**
|
|
9
|
+
* `page` (default) fills most of the viewport for full-page errors.
|
|
10
|
+
* `compact` drops the minimum height and uses a smaller title for errors
|
|
11
|
+
* inside a panel, pane or sidebar.
|
|
12
|
+
*/
|
|
13
|
+
size?: 'page' | 'compact';
|
|
8
14
|
className?: string;
|
|
9
15
|
}
|
|
10
|
-
export declare function ErrorState({ code, title, description, action, illustration, className, }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export
|
|
16
|
+
export declare function ErrorState({ code, title, description, action, illustration, size, className, }: ErrorStateProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -36,4 +36,3 @@ export interface EventTableProps<T> {
|
|
|
36
36
|
className?: string;
|
|
37
37
|
}
|
|
38
38
|
export declare function EventTable<T>({ columns, data, rowKey, onRowClick, selectedKey, loading, emptyTitle, emptyDescription, estimatedRowHeight, maxVisibleRows, onLoadMore, loadMoreThresholdPx, className, }: EventTableProps<T>): import("react/jsx-runtime").JSX.Element;
|
|
39
|
-
export default EventTable;
|
|
@@ -44,4 +44,4 @@ interface FileDropzoneProps {
|
|
|
44
44
|
style?: CSSProperties;
|
|
45
45
|
}
|
|
46
46
|
export declare function FileDropzone({ onDrop, accept, multiple, disabled, maxSize, directory, variant, items, hint, className, style, }: FileDropzoneProps): import("react/jsx-runtime").JSX.Element;
|
|
47
|
-
export
|
|
47
|
+
export {};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import {
|
|
3
|
-
export
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
mimeType?: string;
|
|
10
|
-
name?: string;
|
|
11
|
-
size?: number;
|
|
12
|
-
}) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
13
|
-
askSuggestions?: string[];
|
|
14
|
-
ask?: boolean;
|
|
15
|
-
}
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
|
+
export type FilePreviewSurface = PrimitiveSurface<{
|
|
4
|
+
src: string;
|
|
5
|
+
mimeType?: string;
|
|
6
|
+
name?: string;
|
|
7
|
+
size?: number;
|
|
8
|
+
}>;
|
|
16
9
|
interface FilePreviewProps {
|
|
17
10
|
/** Public URL or signed `/blob/raw/:token` link. */
|
|
18
11
|
src: string;
|
|
@@ -31,4 +24,4 @@ interface FilePreviewProps {
|
|
|
31
24
|
surface?: FilePreviewSurface;
|
|
32
25
|
}
|
|
33
26
|
export declare function FilePreview({ src, mimeType, name, size, fallback, maxHeight, className, style, surface, }: FilePreviewProps): import("react/jsx-runtime").JSX.Element;
|
|
34
|
-
export
|
|
27
|
+
export {};
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface FileTreeFile {
|
|
3
|
+
/** Path from the tree root with `/` between segments, e.g. `tests/grading.toml`. */
|
|
4
|
+
path: string;
|
|
5
|
+
/** Trailing note, typically the file size. */
|
|
6
|
+
note?: ReactNode;
|
|
7
|
+
}
|
|
8
|
+
export interface FileTreeProps {
|
|
9
|
+
files: FileTreeFile[];
|
|
10
|
+
/** Accessible name of the tree. */
|
|
11
|
+
ariaLabel: string;
|
|
12
|
+
/**
|
|
13
|
+
* Path of the selected file. Whenever it changes, the directories above
|
|
14
|
+
* it open, unless `expandedPaths` controls them.
|
|
15
|
+
*/
|
|
16
|
+
selectedPath?: string;
|
|
17
|
+
/** Called with a file's path when it is clicked or activated with Enter or Space. */
|
|
18
|
+
onSelect?: (path: string) => void;
|
|
19
|
+
/** Open directories, each written with a trailing `/`, e.g. `tests/`. Omit it to let the tree track them. */
|
|
20
|
+
expandedPaths?: string[];
|
|
21
|
+
/** Directories open on first render when `expandedPaths` is omitted. */
|
|
22
|
+
defaultExpandedPaths?: string[];
|
|
23
|
+
/** Called with the open directories whenever one opens or closes. */
|
|
24
|
+
onExpandedPathsChange?: (paths: string[]) => void;
|
|
25
|
+
className?: string;
|
|
26
|
+
}
|
|
27
|
+
export declare function FileTree({ files, ariaLabel, selectedPath, onSelect, expandedPaths, defaultExpandedPaths, onExpandedPathsChange, className, }: FileTreeProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -21,4 +21,3 @@ export interface FolderDropzoneProps {
|
|
|
21
21
|
className?: string;
|
|
22
22
|
}
|
|
23
23
|
export declare function FolderDropzone({ value, onFilesChange, maxFileBytes, maxTotalBytes, maxFiles, accept, disabled, helperText, validationError, summary, className, }: FolderDropzoneProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
-
export default FolderDropzone;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AvatarColorSlot } from './Avatar';
|
|
3
|
+
import { LinkComponent } from './linkComponent';
|
|
4
|
+
interface IdentityCellProps {
|
|
5
|
+
/** Primary line, e.g. a model or task name. Truncates; the full name shows on hover. */
|
|
6
|
+
name: string;
|
|
7
|
+
/** Muted `--font-mono` line under the name for an id or path, e.g. `source / task`; a string shows in full on hover. */
|
|
8
|
+
secondary?: ReactNode;
|
|
9
|
+
/** Leads with an Avatar of the name's initials. */
|
|
10
|
+
avatar?: boolean;
|
|
11
|
+
/** Avatar colour from the chart series colours, so it matches that series. */
|
|
12
|
+
colorSlot?: AvatarColorSlot;
|
|
13
|
+
/** Makes the name a link to this destination. */
|
|
14
|
+
to?: string;
|
|
15
|
+
/** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */
|
|
16
|
+
linkComponent?: LinkComponent;
|
|
17
|
+
/** Puts the secondary text beside the name on one line. */
|
|
18
|
+
inline?: boolean;
|
|
19
|
+
/** Wraps the name and the secondary text, breaking anywhere, instead of truncating, so a long
|
|
20
|
+
* name never widens the card or list it sits in. */
|
|
21
|
+
wrap?: boolean;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function IdentityCell({ name, secondary, avatar, colorSlot, to, linkComponent, inline, wrap, className, }: IdentityCellProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -1,18 +1,11 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
import { AegisNotification } from '../../notifications';
|
|
4
4
|
type Filter = 'all' | 'unread';
|
|
5
|
-
export
|
|
6
|
-
id: string;
|
|
7
|
-
kind?: SurfaceKind;
|
|
8
|
-
label?: string;
|
|
9
|
-
project: (items: AegisNotification[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
10
|
-
askSuggestions?: string[];
|
|
11
|
-
ask?: boolean;
|
|
12
|
-
}
|
|
5
|
+
export type InboxPageSurface = PrimitiveSurface<AegisNotification[]>;
|
|
13
6
|
interface InboxPageProps {
|
|
14
7
|
defaultFilter?: Filter;
|
|
15
8
|
surface?: InboxPageSurface;
|
|
16
9
|
}
|
|
17
10
|
export declare function InboxPage({ defaultFilter, surface, }: InboxPageProps): ReactElement;
|
|
18
|
-
export
|
|
11
|
+
export {};
|
|
@@ -1,19 +1,12 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
-
import {
|
|
2
|
+
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
3
3
|
export interface KeyValueItem {
|
|
4
4
|
/** Left key (mono — IDs, fields). */
|
|
5
5
|
k: ReactNode;
|
|
6
6
|
/** Right value (mono number / string). */
|
|
7
7
|
v: ReactNode;
|
|
8
8
|
}
|
|
9
|
-
export
|
|
10
|
-
id: string;
|
|
11
|
-
kind?: SurfaceKind;
|
|
12
|
-
label?: string;
|
|
13
|
-
project: (items: KeyValueItem[]) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
|
|
14
|
-
askSuggestions?: string[];
|
|
15
|
-
ask?: boolean;
|
|
16
|
-
}
|
|
9
|
+
export type KeyValueListSurface = PrimitiveSurface<KeyValueItem[]>;
|
|
17
10
|
interface KeyValueListProps {
|
|
18
11
|
items: KeyValueItem[];
|
|
19
12
|
/** Render keys as uppercase tracked labels instead of mono. */
|
|
@@ -24,4 +17,4 @@ interface KeyValueListProps {
|
|
|
24
17
|
surface?: KeyValueListSurface;
|
|
25
18
|
}
|
|
26
19
|
export declare function KeyValueList({ items, uppercaseKeys, ruled, className, surface, }: KeyValueListProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
-
export
|
|
20
|
+
export {};
|
|
@@ -15,4 +15,4 @@ interface LoginFormProps {
|
|
|
15
15
|
hiddenFields?: Record<string, string>;
|
|
16
16
|
}
|
|
17
17
|
export declare function LoginForm({ onSubmit, submitting, error, onForgotPassword, showRememberMe, action, method, hiddenFields, }: LoginFormProps): ReactElement;
|
|
18
|
-
export
|
|
18
|
+
export {};
|
|
@@ -1,6 +1,12 @@
|
|
|
1
|
-
|
|
1
|
+
import { Options } from 'react-markdown';
|
|
2
|
+
export interface MarkdownProps extends Pick<Options, 'remarkPlugins' | 'rehypePlugins' | 'components' | 'urlTransform'> {
|
|
2
3
|
children: string;
|
|
3
4
|
className?: string;
|
|
5
|
+
/**
|
|
6
|
+
* `compact` (default) keeps every heading at body size for chat turns,
|
|
7
|
+
* tooltips and cards. `document` uses a heading scale and roomier
|
|
8
|
+
* spacing for long-form pages.
|
|
9
|
+
*/
|
|
10
|
+
variant?: 'compact' | 'document';
|
|
4
11
|
}
|
|
5
|
-
export declare function Markdown({ children, className }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|
|
6
|
-
export default Markdown;
|
|
12
|
+
export declare function Markdown({ children, className, variant, remarkPlugins, rehypePlugins, components, urlTransform, }: MarkdownProps): import("react/jsx-runtime").JSX.Element;
|