@lincyaw/aegis-ui 0.5.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 +3 -2
- package/dist/components/ui/Alert.d.ts +14 -0
- package/dist/components/ui/AmbientBackground.d.ts +23 -0
- package/dist/components/ui/Avatar.d.ts +8 -1
- package/dist/components/ui/Breadcrumb.d.ts +3 -13
- package/dist/components/ui/Button.d.ts +26 -4
- package/dist/components/ui/Carousel.d.ts +28 -0
- 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 +14 -4
- package/dist/components/ui/CodeBlock.d.ts +3 -1
- package/dist/components/ui/Collapse.d.ts +16 -0
- package/dist/components/ui/ColumnLayout.d.ts +16 -0
- package/dist/components/ui/ControlListItem.d.ts +3 -1
- package/dist/components/ui/DataTable.d.ts +61 -1
- package/dist/components/ui/Dialog.d.ts +21 -0
- package/dist/components/ui/FileTree.d.ts +27 -0
- package/dist/components/ui/IdentityCell.d.ts +25 -0
- package/dist/components/ui/MdxDocument.d.ts +17 -0
- package/dist/components/ui/MetricLabel.d.ts +1 -0
- package/dist/components/ui/MonoValue.d.ts +3 -1
- package/dist/components/ui/PageHeader.d.ts +7 -2
- package/dist/components/ui/PageSizeSelect.d.ts +2 -1
- package/dist/components/ui/Pagination.d.ts +13 -0
- package/dist/components/ui/Panel.d.ts +32 -4
- package/dist/components/ui/PanelTitle.d.ts +2 -2
- package/dist/components/ui/ParetoChart.d.ts +41 -0
- package/dist/components/ui/PickerField.d.ts +17 -0
- package/dist/components/ui/RankBar.d.ts +25 -0
- package/dist/components/ui/Reveal.d.ts +17 -0
- package/dist/components/ui/RunPips.d.ts +25 -0
- package/dist/components/ui/ScoreBar.d.ts +21 -0
- package/dist/components/ui/SearchInput.d.ts +6 -1
- package/dist/components/ui/Select.d.ts +25 -0
- package/dist/components/ui/ShareLinkDialog.d.ts +21 -5
- package/dist/components/ui/StackedBar.d.ts +47 -0
- package/dist/components/ui/StatBlock.d.ts +8 -2
- package/dist/components/ui/StatusDot.d.ts +1 -1
- package/dist/components/ui/TableOfContents.d.ts +20 -0
- package/dist/components/ui/Tabs.d.ts +11 -1
- package/dist/components/ui/Timeline.d.ts +20 -5
- package/dist/components/ui/TraceSpanInspector.d.ts +4 -1
- package/dist/components/ui/TraceTree.d.ts +7 -3
- package/dist/components/ui/TrajectoryStep.d.ts +13 -0
- package/dist/components/ui/TrajectoryTimeline.d.ts +3 -1
- package/dist/components/ui/codeFence.d.ts +5 -0
- package/dist/components/ui/index.d.ts +42 -5
- package/dist/components/ui/linkComponent.d.ts +12 -0
- package/dist/components/ui/mdxTableOfContents.d.ts +13 -0
- package/dist/components/ui/tablistKeyboard.d.ts +6 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useCopyToClipboard.d.ts +1 -1
- package/dist/hooks/useElementWidth.d.ts +3 -0
- package/dist/hooks/useMediaQuery.d.ts +2 -0
- package/dist/hooks/usePageHidden.d.ts +2 -0
- package/dist/index.cjs +9 -8
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +6439 -4163
- package/dist/index.js.map +1 -1
- package/dist/layouts/shell/AegisShell.d.ts +1 -1
- package/dist/layouts/shell/TopHeader.d.ts +5 -1
- package/dist/layouts/shell/paths.d.ts +4 -1
- package/dist/layouts/shell/types.d.ts +19 -0
- package/dist/lib/luceneQuery/lucene.d.ts +63 -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/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 +20 -2
|
@@ -2,9 +2,9 @@ import { ReactNode } from 'react';
|
|
|
2
2
|
interface PanelTitleProps {
|
|
3
3
|
children: ReactNode;
|
|
4
4
|
as?: 'span' | 'h1' | 'h2' | 'h3' | 'h4';
|
|
5
|
-
|
|
5
|
+
/** Type roles: sm Strong, base Heading, lg Title, hero Display. */
|
|
6
6
|
size?: 'sm' | 'base' | 'lg' | 'hero';
|
|
7
7
|
className?: string;
|
|
8
8
|
}
|
|
9
|
-
export declare function PanelTitle({ children, as: Tag,
|
|
9
|
+
export declare function PanelTitle({ children, as: Tag, size, className, }: PanelTitleProps): import("react/jsx-runtime").JSX.Element;
|
|
10
10
|
export {};
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface ParetoPoint {
|
|
3
|
+
key: string;
|
|
4
|
+
label: string;
|
|
5
|
+
x: number;
|
|
6
|
+
y: number;
|
|
7
|
+
/** Point fill, e.g. `var(--data-cat-2)` to match the series elsewhere. */
|
|
8
|
+
color?: string;
|
|
9
|
+
}
|
|
10
|
+
/** One series in the legend under the plot, e.g. a model and its colour. */
|
|
11
|
+
export interface ParetoLegendItem {
|
|
12
|
+
key: string;
|
|
13
|
+
label: ReactNode;
|
|
14
|
+
/** Swatch fill; the same value its points use. */
|
|
15
|
+
color?: string;
|
|
16
|
+
}
|
|
17
|
+
interface ParetoChartProps {
|
|
18
|
+
points: ParetoPoint[];
|
|
19
|
+
xLabel: string;
|
|
20
|
+
yLabel: string;
|
|
21
|
+
/** Which direction counts as better on each axis. */
|
|
22
|
+
xDirection?: 'lower' | 'higher';
|
|
23
|
+
yDirection?: 'lower' | 'higher';
|
|
24
|
+
/** Formats the 0 and maximum labels of each axis. */
|
|
25
|
+
formatX?: (value: number) => string;
|
|
26
|
+
formatY?: (value: number) => string;
|
|
27
|
+
onSelect?: (key: string) => void;
|
|
28
|
+
/** Series swatches with labels, listed under the plot. */
|
|
29
|
+
legend?: ParetoLegendItem[];
|
|
30
|
+
/**
|
|
31
|
+
* Shown in place of the plot, at its minimum height, while there are no
|
|
32
|
+
* points — e.g. an EmptyState with an icon asking for both axes. Replaces
|
|
33
|
+
* the default empty state built from `emptyTitle`.
|
|
34
|
+
*/
|
|
35
|
+
empty?: ReactNode;
|
|
36
|
+
emptyTitle?: string;
|
|
37
|
+
emptyDescription?: string;
|
|
38
|
+
className?: string;
|
|
39
|
+
}
|
|
40
|
+
export declare function ParetoChart({ points, xLabel, yLabel, xDirection, yDirection, formatX, formatY, onSelect, legend, empty, emptyTitle, emptyDescription, className, }: ParetoChartProps): import("react/jsx-runtime").JSX.Element;
|
|
41
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface PickerFieldProps {
|
|
3
|
+
/** Caption rendered above the control, as on Select. */
|
|
4
|
+
label?: ReactNode;
|
|
5
|
+
/** Current choice; the placeholder shows while it is empty. */
|
|
6
|
+
value?: ReactNode;
|
|
7
|
+
placeholder?: ReactNode;
|
|
8
|
+
/** Opens the picker, typically a Dialog. */
|
|
9
|
+
onClick: () => void;
|
|
10
|
+
disabled?: boolean;
|
|
11
|
+
/** Accessible name when the caption is not plain text. */
|
|
12
|
+
ariaLabel?: string;
|
|
13
|
+
className?: string;
|
|
14
|
+
}
|
|
15
|
+
/** Looks like a closed Select but opens a dialog instead of a native menu. */
|
|
16
|
+
export declare function PickerField({ label, value, placeholder, onClick, disabled, ariaLabel, className, }: PickerFieldProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RankBarItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/**
|
|
6
|
+
* `null` is a missing value: an em dash over an empty track, distinct
|
|
7
|
+
* from a real 0, which keeps a visible endpoint.
|
|
8
|
+
*/
|
|
9
|
+
value: number | null;
|
|
10
|
+
/** Trailing slot for a per-row link, e.g. "逐题表现". */
|
|
11
|
+
action?: ReactNode;
|
|
12
|
+
}
|
|
13
|
+
interface RankBarProps {
|
|
14
|
+
items: RankBarItem[];
|
|
15
|
+
/** Upper bound of the scale. Defaults to the largest value, or 1 when all are 0. */
|
|
16
|
+
max?: number;
|
|
17
|
+
/** Scale hint rendered at the bottom, e.g. "越高越好". */
|
|
18
|
+
direction?: ReactNode;
|
|
19
|
+
format?: (value: number) => string;
|
|
20
|
+
/** Makes each row's label and bar track select that row. */
|
|
21
|
+
onSelect?: (key: string) => void;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function RankBar({ items, max, direction, format, onSelect, className, }: RankBarProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface RevealProps {
|
|
3
|
+
children: ReactNode;
|
|
4
|
+
/**
|
|
5
|
+
* Position within a group that enters together: delays the entrance by
|
|
6
|
+
* that many `--motion-reveal-stagger`s.
|
|
7
|
+
*/
|
|
8
|
+
staggerIndex?: number;
|
|
9
|
+
className?: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Fades its content in and lifts it by `--motion-reveal-offset` the first
|
|
13
|
+
* time it enters the viewport. Content is hidden only while an
|
|
14
|
+
* IntersectionObserver is watching it, so it stays visible without one,
|
|
15
|
+
* and under prefers-reduced-motion it appears without moving.
|
|
16
|
+
*/
|
|
17
|
+
export declare function Reveal({ children, staggerIndex, className }: RevealProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
export interface RunPipsCounts {
|
|
2
|
+
passed: number;
|
|
3
|
+
/** Ran and was graded as failing. */
|
|
4
|
+
failed: number;
|
|
5
|
+
/** The run itself failed (no gradable answer). */
|
|
6
|
+
errored: number;
|
|
7
|
+
/** Not finished yet. */
|
|
8
|
+
pending?: number;
|
|
9
|
+
}
|
|
10
|
+
interface RunPipsProps {
|
|
11
|
+
counts: RunPipsCounts;
|
|
12
|
+
/** Above this many runs the dots collapse into a proportional bar. */
|
|
13
|
+
maxDots?: number;
|
|
14
|
+
/** Accessible name; defaults to a localized count summary. */
|
|
15
|
+
ariaLabel?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* Per-run outcome strip: "passed/total" in the numeric type role, then one
|
|
20
|
+
* dot per run (passed, failed, execution failed as a hollow ring, pending).
|
|
21
|
+
* The text and the accessible name always carry the counts, so colour is
|
|
22
|
+
* never the only signal.
|
|
23
|
+
*/
|
|
24
|
+
export declare function RunPips({ counts, maxDots, ariaLabel, className, }: RunPipsProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
interface ScoreBarProps {
|
|
2
|
+
/**
|
|
3
|
+
* `null` is a missing value: an em dash over an empty track, distinct
|
|
4
|
+
* from a real 0, which keeps a visible endpoint.
|
|
5
|
+
*/
|
|
6
|
+
value: number | null;
|
|
7
|
+
/** Value of a full track. */
|
|
8
|
+
max?: number;
|
|
9
|
+
format?: (value: number) => string;
|
|
10
|
+
/** Accessible name; defaults to "<value> of <max>". */
|
|
11
|
+
ariaLabel?: string;
|
|
12
|
+
/**
|
|
13
|
+
* Position in a list (e.g. the table row index): delays the draw-in by
|
|
14
|
+
* that many `--motion-stagger-step`s so rows fill one after another.
|
|
15
|
+
*/
|
|
16
|
+
staggerIndex?: number;
|
|
17
|
+
className?: string;
|
|
18
|
+
}
|
|
19
|
+
/** Inline score: a right-aligned tabular value and a short bar, for table cells. */
|
|
20
|
+
export declare function ScoreBar({ value, max, format, ariaLabel, staggerIndex, className, }: ScoreBarProps): import("react/jsx-runtime").JSX.Element;
|
|
21
|
+
export {};
|
|
@@ -6,6 +6,11 @@ export interface SearchInputProps {
|
|
|
6
6
|
/** Optional keyboard shortcut hint, e.g. `⌘K`. */
|
|
7
7
|
kbd?: ReactNode;
|
|
8
8
|
onClear?: () => void;
|
|
9
|
+
/**
|
|
10
|
+
* Fills the container's width, the field taking the free space. A host
|
|
11
|
+
* that sizes the search (e.g. a flex-basis in a toolbar) sets this too.
|
|
12
|
+
*/
|
|
13
|
+
block?: boolean;
|
|
9
14
|
className?: string;
|
|
10
15
|
}
|
|
11
|
-
export declare function SearchInput({ value, onChange, placeholder, kbd, onClear, className, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function SearchInput({ value, onChange, placeholder, kbd, onClear, block, className, }: SearchInputProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface SelectOption {
|
|
3
|
+
value: string;
|
|
4
|
+
label: string;
|
|
5
|
+
disabled?: boolean;
|
|
6
|
+
}
|
|
7
|
+
interface SelectProps {
|
|
8
|
+
value: string;
|
|
9
|
+
options: SelectOption[];
|
|
10
|
+
onChange: (value: string) => void;
|
|
11
|
+
/** Caption rendered above the control. */
|
|
12
|
+
label?: ReactNode;
|
|
13
|
+
/** Accessible name for a select shown without a visible caption, e.g. a compact filter. */
|
|
14
|
+
ariaLabel?: string;
|
|
15
|
+
/** Rendered as a disabled first option when `value` is empty. */
|
|
16
|
+
placeholder?: string;
|
|
17
|
+
/** Shows a clear control once a value is set. */
|
|
18
|
+
allowClear?: boolean;
|
|
19
|
+
disabled?: boolean;
|
|
20
|
+
/** Lets a caller's `<label htmlFor>` point at the control. */
|
|
21
|
+
id?: string;
|
|
22
|
+
className?: string;
|
|
23
|
+
}
|
|
24
|
+
export declare function Select({ value, options, onChange, label, ariaLabel, placeholder, allowClear, disabled, id, className, }: SelectProps): import("react/jsx-runtime").JSX.Element;
|
|
25
|
+
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
export interface ShareLinkOptions {
|
|
2
3
|
ttlSeconds: number;
|
|
3
4
|
/** When true, response forces attachment download instead of inline render. */
|
|
@@ -7,9 +8,16 @@ export interface ShareLinkResult {
|
|
|
7
8
|
url: string;
|
|
8
9
|
expiresAt: string;
|
|
9
10
|
}
|
|
10
|
-
interface
|
|
11
|
+
interface ShareLinkDialogBaseProps {
|
|
11
12
|
/** Object key being shared — displayed at the top for context. */
|
|
12
13
|
objectKey: string;
|
|
14
|
+
/** Context under the object key, e.g. what the link opens and that it is read-only. */
|
|
15
|
+
description?: ReactNode;
|
|
16
|
+
/** Optional cancel/close handler — renders a secondary button. */
|
|
17
|
+
onClose?: () => void;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
interface ExpiringShareLinkProps extends ShareLinkDialogBaseProps {
|
|
13
21
|
/** Available TTL presets shown as chips. */
|
|
14
22
|
ttlPresets?: Array<{
|
|
15
23
|
label: string;
|
|
@@ -17,9 +25,17 @@ interface ShareLinkDialogProps {
|
|
|
17
25
|
}>;
|
|
18
26
|
/** Asked when user clicks "Generate". Resolves to URL + expires. */
|
|
19
27
|
onGenerate: (opts: ShareLinkOptions) => Promise<ShareLinkResult>;
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
28
|
+
url?: undefined;
|
|
29
|
+
}
|
|
30
|
+
interface PlainShareLinkProps extends ShareLinkDialogBaseProps {
|
|
31
|
+
/**
|
|
32
|
+
* A link that does not expire, e.g. the current page. It is shown with a
|
|
33
|
+
* copy button and no TTL presets, download toggle or countdown.
|
|
34
|
+
*/
|
|
35
|
+
url: string;
|
|
36
|
+
ttlPresets?: undefined;
|
|
37
|
+
onGenerate?: undefined;
|
|
23
38
|
}
|
|
24
|
-
|
|
39
|
+
type ShareLinkDialogProps = ExpiringShareLinkProps | PlainShareLinkProps;
|
|
40
|
+
export declare function ShareLinkDialog({ objectKey, description, url: plainUrl, ttlPresets: ttlPresetsProp, onGenerate, onClose, className, }: ShareLinkDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
25
41
|
export {};
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Segment colour from the data palette: `seq` for a single magnitude,
|
|
4
|
+
* `cat-1`…`cat-6` to tell categories apart, `unknown` a neutral muted fill
|
|
5
|
+
* with a hairline edge for a share not classified yet.
|
|
6
|
+
*/
|
|
7
|
+
export type StackedBarColor = 'seq' | 'cat-1' | 'cat-2' | 'cat-3' | 'cat-4' | 'cat-5' | 'cat-6' | 'unknown';
|
|
8
|
+
/** One category stacked in every bar, listed in the legend. */
|
|
9
|
+
export interface StackedBarSeries<K extends string> {
|
|
10
|
+
key: K;
|
|
11
|
+
/** Legend text; also names the segment in each bar's accessible label. */
|
|
12
|
+
label: string;
|
|
13
|
+
color: StackedBarColor;
|
|
14
|
+
}
|
|
15
|
+
export interface StackedBarRow<K extends string> {
|
|
16
|
+
key: string;
|
|
17
|
+
label: ReactNode;
|
|
18
|
+
/** Every series' value in this row, keyed by series key. */
|
|
19
|
+
values: Readonly<Record<K, number>>;
|
|
20
|
+
/** Muted text after the row total, e.g. "已复核 30". */
|
|
21
|
+
note?: ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export interface StackedBarProps<K extends string> {
|
|
24
|
+
/** Categories, stacked left to right in this order. */
|
|
25
|
+
series: Array<StackedBarSeries<K>>;
|
|
26
|
+
rows: Array<StackedBarRow<K>>;
|
|
27
|
+
/** Upper bound of the scale. Defaults to the largest row total, or 1 when all are 0. */
|
|
28
|
+
max?: number;
|
|
29
|
+
/** Scale hint between the 0 and maximum ticks, e.g. "越低越好". */
|
|
30
|
+
direction?: ReactNode;
|
|
31
|
+
format?: (value: number) => string;
|
|
32
|
+
/**
|
|
33
|
+
* `table` lists the same rows as a data table in place of the bars, for
|
|
34
|
+
* the host's "查看数据表" control.
|
|
35
|
+
*/
|
|
36
|
+
view?: 'chart' | 'table';
|
|
37
|
+
/** Table header of the row label column, e.g. "模型". */
|
|
38
|
+
labelHeader: ReactNode;
|
|
39
|
+
/** Table header of the row total column, e.g. "合计". */
|
|
40
|
+
totalHeader: ReactNode;
|
|
41
|
+
className?: string;
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Horizontal stacked bars on one shared scale: a label, the series
|
|
45
|
+
* segments of each row drawn in from the left, and the row total.
|
|
46
|
+
*/
|
|
47
|
+
export declare function StackedBar<K extends string>({ series, rows, max, direction, format, view, labelHeader, totalHeader, className, }: StackedBarProps<K>): import("react/jsx-runtime").JSX.Element;
|
|
@@ -12,11 +12,17 @@ interface StatBlockProps {
|
|
|
12
12
|
unit?: ReactNode;
|
|
13
13
|
/** Layout direction. Default: horizontal (label · value, baseline). */
|
|
14
14
|
direction?: 'horizontal' | 'vertical';
|
|
15
|
-
/**
|
|
15
|
+
/** Value in the number type role instead of the numeric role. */
|
|
16
16
|
emphasized?: boolean;
|
|
17
|
+
/**
|
|
18
|
+
* When `value` is a number, counts it up from 0 once on mount over
|
|
19
|
+
* `--motion-chart`, keeping its decimal places. Shows the final value at
|
|
20
|
+
* once under prefers-reduced-motion.
|
|
21
|
+
*/
|
|
22
|
+
animateValue?: boolean;
|
|
17
23
|
inverted?: boolean;
|
|
18
24
|
className?: string;
|
|
19
25
|
surface?: StatBlockSurface;
|
|
20
26
|
}
|
|
21
|
-
export declare function StatBlock({ label, value, unit, direction, emphasized, inverted, className, surface, }: StatBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function StatBlock({ label, value, unit, direction, emphasized, animateValue, inverted, className, surface, }: StatBlockProps): import("react/jsx-runtime").JSX.Element;
|
|
22
28
|
export {};
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
export interface TableOfContentsItem {
|
|
3
|
+
/** The id of the section element, already in the document, the item links to. */
|
|
4
|
+
id: string;
|
|
5
|
+
label: ReactNode;
|
|
6
|
+
/** Nesting depth of the section; 2 and 3 indent the label. Defaults to 1. */
|
|
7
|
+
level?: 1 | 2 | 3;
|
|
8
|
+
}
|
|
9
|
+
export interface TableOfContentsProps {
|
|
10
|
+
/** The sections in document order. */
|
|
11
|
+
items: TableOfContentsItem[];
|
|
12
|
+
/** Controls the current item; omit it to follow the scroll position. */
|
|
13
|
+
currentId?: string;
|
|
14
|
+
/** Called with the id that scrolling or a click makes current. */
|
|
15
|
+
onCurrentChange?: (id: string) => void;
|
|
16
|
+
/** The element that scrolls the sections; omitted or null means the viewport. */
|
|
17
|
+
scrollContainer?: HTMLElement | null;
|
|
18
|
+
className?: string;
|
|
19
|
+
}
|
|
20
|
+
export declare function TableOfContents({ items, currentId, onCurrentChange, scrollContainer, className, }: TableOfContentsProps): ReactElement;
|
|
@@ -12,7 +12,17 @@ interface TabsProps {
|
|
|
12
12
|
defaultActiveKey?: string;
|
|
13
13
|
onChange?: (key: string) => void;
|
|
14
14
|
children?: ReactNode;
|
|
15
|
+
/**
|
|
16
|
+
* Renders the tab list without a tabpanel, for tabs that switch a view
|
|
17
|
+
* rendered elsewhere (site navigation, a toolbar view switch).
|
|
18
|
+
*/
|
|
19
|
+
listOnly?: boolean;
|
|
20
|
+
/**
|
|
21
|
+
* `sm` makes each tab `--size-control-sm` tall, so the whole list is
|
|
22
|
+
* `--size-control-base` and lines up with inputs in a toolbar.
|
|
23
|
+
*/
|
|
24
|
+
size?: 'md' | 'sm';
|
|
15
25
|
className?: string;
|
|
16
26
|
}
|
|
17
|
-
export declare function Tabs({ items, activeKey: controlledKey, defaultActiveKey, onChange, children, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
27
|
+
export declare function Tabs({ items, activeKey: controlledKey, defaultActiveKey, onChange, children, listOnly, size, className, }: TabsProps): import("react/jsx-runtime").JSX.Element;
|
|
18
28
|
export {};
|
|
@@ -6,20 +6,35 @@ export interface TimelineItem {
|
|
|
6
6
|
title: ReactNode;
|
|
7
7
|
/** Body — optional secondary line. */
|
|
8
8
|
description?: ReactNode;
|
|
9
|
-
/** Absolute timestamp
|
|
9
|
+
/** Absolute timestamp, in the mono role. */
|
|
10
10
|
timestamp?: ReactNode;
|
|
11
|
-
/** Slot at the end of the row (e.g. revision
|
|
11
|
+
/** Slot at the end of the title row, in the mono role (e.g. a revision). */
|
|
12
12
|
meta?: ReactNode;
|
|
13
|
-
/**
|
|
13
|
+
/** CSS colour for the dot, e.g. `var(--accent-success)`. */
|
|
14
14
|
dotColor?: string;
|
|
15
|
+
/**
|
|
16
|
+
* Leading mono label in the `numbered` variant, e.g. a step number.
|
|
17
|
+
* Defaults to the 1-based position, zero-padded to two digits.
|
|
18
|
+
*/
|
|
19
|
+
marker?: ReactNode;
|
|
15
20
|
}
|
|
16
21
|
export type TimelineSurface = PrimitiveSurface<TimelineItem[]>;
|
|
17
22
|
interface TimelineProps {
|
|
18
23
|
items: TimelineItem[];
|
|
19
|
-
/**
|
|
24
|
+
/**
|
|
25
|
+
* `numbered` replaces the dot and connector with a leading mono marker
|
|
26
|
+
* column, separates rows with hairlines and keeps the line breaks of
|
|
27
|
+
* each description.
|
|
28
|
+
*/
|
|
29
|
+
variant?: 'dot' | 'numbered';
|
|
30
|
+
/**
|
|
31
|
+
* `compact` keeps each title on one line with an ellipsis (a string title
|
|
32
|
+
* shows in full on hover) and tightens the rows.
|
|
33
|
+
*/
|
|
34
|
+
density?: 'comfortable' | 'compact';
|
|
20
35
|
className?: string;
|
|
21
36
|
style?: CSSProperties;
|
|
22
37
|
surface?: TimelineSurface;
|
|
23
38
|
}
|
|
24
|
-
export declare function Timeline({ items, className, style, surface }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function Timeline({ items, variant, density, className, style, surface, }: TimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
25
40
|
export {};
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
1
2
|
import { TraceSpan } from './TraceTree';
|
|
2
3
|
export interface TraceSpanInspectorProps {
|
|
3
4
|
span: TraceSpan | null;
|
|
@@ -8,5 +9,7 @@ export interface TraceSpanInspectorProps {
|
|
|
8
9
|
onSelectRelated?: (span: TraceSpan) => void;
|
|
9
10
|
/** Optional raw OTel attributes from the original span row (for the Raw tab JSON). */
|
|
10
11
|
raw?: unknown;
|
|
12
|
+
/** The span's content, shown in the Overview tab under its facts. */
|
|
13
|
+
detail?: ReactNode;
|
|
11
14
|
}
|
|
12
|
-
export declare function TraceSpanInspector({ span, onClose, spanLookup, onSelectRelated, raw, }: TraceSpanInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
15
|
+
export declare function TraceSpanInspector({ span, onClose, spanLookup, onSelectRelated, raw, detail, }: TraceSpanInspectorProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -5,9 +5,13 @@ export interface TraceSpan {
|
|
|
5
5
|
id: string;
|
|
6
6
|
parentId?: string | null;
|
|
7
7
|
name: string;
|
|
8
|
-
/**
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
/**
|
|
9
|
+
* Milliseconds since trace start. Leave `startMs` and `durationMs` out for a
|
|
10
|
+
* span whose time is not recorded: its row draws no bar, and siblings that are
|
|
11
|
+
* not all timed keep the order they are given in.
|
|
12
|
+
*/
|
|
13
|
+
startMs?: number;
|
|
14
|
+
durationMs?: number;
|
|
11
15
|
status?: 'ok' | 'error' | 'unset';
|
|
12
16
|
/** Short label rendered as a chip on the left of the row. */
|
|
13
17
|
kind?: ReactNode;
|
|
@@ -1,14 +1,27 @@
|
|
|
1
1
|
import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
|
|
2
2
|
import { ToolCallData } from './ToolCallCard';
|
|
3
|
+
/** A labelled text of a step beyond its thought, action and observation. */
|
|
4
|
+
export interface TrajectoryStepSection {
|
|
5
|
+
label: string;
|
|
6
|
+
text: string;
|
|
7
|
+
/** `text` keeps the text as recorded, preformatted and scrolling past a cap. */
|
|
8
|
+
format?: 'markdown' | 'text';
|
|
9
|
+
}
|
|
3
10
|
export interface TrajectoryStepData {
|
|
4
11
|
step: number;
|
|
5
12
|
timestamp?: string;
|
|
6
13
|
durationMs?: number;
|
|
14
|
+
/** The head's one-line preview; defaults to `action`. */
|
|
15
|
+
summary?: string;
|
|
7
16
|
thought?: string;
|
|
8
17
|
action?: string;
|
|
9
18
|
actionType?: 'tool_call' | 'message' | 'internal';
|
|
10
19
|
toolCall?: ToolCallData;
|
|
20
|
+
/** Further calls of the step, each a card after `toolCall`. */
|
|
21
|
+
toolCalls?: ToolCallData[];
|
|
11
22
|
observation?: string;
|
|
23
|
+
/** Shown after the thought and action, before the tool calls. */
|
|
24
|
+
sections?: TrajectoryStepSection[];
|
|
12
25
|
}
|
|
13
26
|
export type TrajectoryStepSurface = PrimitiveSurface<TrajectoryStepData>;
|
|
14
27
|
interface TrajectoryStepProps {
|
|
@@ -8,7 +8,9 @@ export interface TrajectoryTimelineProps {
|
|
|
8
8
|
status?: 'running' | 'completed' | 'failed';
|
|
9
9
|
totalDurationMs?: number;
|
|
10
10
|
extra?: ReactNode;
|
|
11
|
+
/** `false` drops the agent, status and duration header, e.g. inside a titled Panel. */
|
|
12
|
+
header?: boolean;
|
|
11
13
|
className?: string;
|
|
12
14
|
surface?: TrajectoryTimelineSurface;
|
|
13
15
|
}
|
|
14
|
-
export declare function TrajectoryTimeline({ steps, agentName, status, totalDurationMs, extra, className, surface, }: TrajectoryTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
16
|
+
export declare function TrajectoryTimeline({ steps, agentName, status, totalDurationMs, extra, header, className, surface, }: TrajectoryTimelineProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -4,12 +4,20 @@
|
|
|
4
4
|
* Add a new primitive ⇒ register it here so app code can `import { X } from
|
|
5
5
|
* '@/components/ui'` without knowing the file layout.
|
|
6
6
|
*/
|
|
7
|
-
export { Button } from './Button';
|
|
7
|
+
export { Button, ButtonLink } from './Button';
|
|
8
8
|
export { Panel } from './Panel';
|
|
9
|
-
export type { PanelSurface } from './Panel';
|
|
9
|
+
export type { PanelElevation, PanelSurface, PanelVariant } from './Panel';
|
|
10
10
|
export { PanelTitle } from './PanelTitle';
|
|
11
|
+
export { AmbientBackground } from './AmbientBackground';
|
|
12
|
+
export type { AmbientBackgroundProps, AmbientBackgroundVariant, } from './AmbientBackground';
|
|
13
|
+
export { Reveal } from './Reveal';
|
|
14
|
+
export type { RevealProps } from './Reveal';
|
|
11
15
|
export { Markdown } from './Markdown';
|
|
12
16
|
export type { MarkdownProps } from './Markdown';
|
|
17
|
+
export { MdxDocument } from './MdxDocument';
|
|
18
|
+
export type { MdxDocumentProps } from './MdxDocument';
|
|
19
|
+
export { mdxTableOfContents } from './mdxTableOfContents';
|
|
20
|
+
export type { MdxTocEntry } from './mdxTableOfContents';
|
|
13
21
|
export { MetricLabel } from './MetricLabel';
|
|
14
22
|
export { MonoValue } from './MonoValue';
|
|
15
23
|
export type { MonoValueSurface } from './MonoValue';
|
|
@@ -21,6 +29,27 @@ export type { BlastRadiusBarSurface } from './BlastRadiusBar';
|
|
|
21
29
|
export { ControlListItem } from './ControlListItem';
|
|
22
30
|
export { Chip } from './Chip';
|
|
23
31
|
export type { ChipSurface } from './Chip';
|
|
32
|
+
export { Checkbox } from './Checkbox';
|
|
33
|
+
export { Collapse } from './Collapse';
|
|
34
|
+
export type { CollapseItem } from './Collapse';
|
|
35
|
+
export { Alert } from './Alert';
|
|
36
|
+
export { Pagination } from './Pagination';
|
|
37
|
+
export { Select } from './Select';
|
|
38
|
+
export type { SelectOption } from './Select';
|
|
39
|
+
export { RankBar } from './RankBar';
|
|
40
|
+
export type { RankBarItem } from './RankBar';
|
|
41
|
+
export { ScoreBar } from './ScoreBar';
|
|
42
|
+
export { RunPips } from './RunPips';
|
|
43
|
+
export type { RunPipsCounts } from './RunPips';
|
|
44
|
+
export { ParetoChart } from './ParetoChart';
|
|
45
|
+
export type { ParetoLegendItem, ParetoPoint } from './ParetoChart';
|
|
46
|
+
export { CheckGrid } from './CheckGrid';
|
|
47
|
+
export type { CheckGridCell, CheckGridColumn, CheckGridProps, CheckGridRow, } from './CheckGrid';
|
|
48
|
+
export { StackedBar } from './StackedBar';
|
|
49
|
+
export type { StackedBarColor, StackedBarProps, StackedBarRow, StackedBarSeries, } from './StackedBar';
|
|
50
|
+
export { ColumnLayout } from './ColumnLayout';
|
|
51
|
+
export { PickerField } from './PickerField';
|
|
52
|
+
export { Dialog } from './Dialog';
|
|
24
53
|
export { SectionDivider } from './SectionDivider';
|
|
25
54
|
export { KeyValueList } from './KeyValueList';
|
|
26
55
|
export type { KeyValueItem, KeyValueListSurface } from './KeyValueList';
|
|
@@ -31,7 +60,7 @@ export type { SparkLineSurface } from './SparkLine';
|
|
|
31
60
|
export { MetricCard } from './MetricCard';
|
|
32
61
|
export type { MetricCardSurface } from './MetricCard';
|
|
33
62
|
export { TrajectoryStep } from './TrajectoryStep';
|
|
34
|
-
export type { TrajectoryStepData, TrajectoryStepSurface, } from './TrajectoryStep';
|
|
63
|
+
export type { TrajectoryStepData, TrajectoryStepSection, TrajectoryStepSurface, } from './TrajectoryStep';
|
|
35
64
|
export { TrajectoryTimeline } from './TrajectoryTimeline';
|
|
36
65
|
export type { TrajectoryTimelineProps, TrajectoryTimelineSurface, } from './TrajectoryTimeline';
|
|
37
66
|
export { ToolCallCard } from './ToolCallCard';
|
|
@@ -41,6 +70,8 @@ export { Skeleton, SkeletonText } from './Skeleton';
|
|
|
41
70
|
export { TimeDisplay } from './TimeDisplay';
|
|
42
71
|
export { CodeBlock } from './CodeBlock';
|
|
43
72
|
export type { CodeBlockSurface } from './CodeBlock';
|
|
73
|
+
export { FileTree } from './FileTree';
|
|
74
|
+
export type { FileTreeFile, FileTreeProps } from './FileTree';
|
|
44
75
|
export { ContentInspectorDialog, ContentPreview, } from './ContentInspectorDialog';
|
|
45
76
|
export type { ContentInspectorDialogProps, ContentPreviewProps, } from './ContentInspectorDialog';
|
|
46
77
|
export { prepareInspectableContent } from './ContentInspectorContent';
|
|
@@ -48,7 +79,7 @@ export type { InspectableContent, InspectableContentKind, PreparedInspectableCon
|
|
|
48
79
|
export { SessionRunOutputView, SessionRunTrajectoryView, } from './SessionRunView';
|
|
49
80
|
export type { SessionRunFact, SessionRunMessage, SessionRunOutputViewProps, SessionRunSubmission, SessionRunSummary, SessionRunToolCall, SessionRunTrajectoryViewProps, } from './SessionRunView';
|
|
50
81
|
export { DataTable } from './DataTable';
|
|
51
|
-
export type { DataTableColumn, DataTablePagination, DataTableSurface, } from './DataTable';
|
|
82
|
+
export type { DataTableCellTone, DataTableColumn, DataTablePagination, DataTableSurface, } from './DataTable';
|
|
52
83
|
export { EventTable } from './EventTable';
|
|
53
84
|
export type { EventTableColumn, EventTableProps } from './EventTable';
|
|
54
85
|
export { DataList } from './DataList';
|
|
@@ -65,10 +96,16 @@ export { ObjectInspector } from './ObjectInspector';
|
|
|
65
96
|
export type { ObjectInspectorProps, ObjectInspectorTab, } from './ObjectInspector';
|
|
66
97
|
export { Tabs } from './Tabs';
|
|
67
98
|
export type { TabItem } from './Tabs';
|
|
99
|
+
export { Carousel } from './Carousel';
|
|
100
|
+
export type { CarouselProps, CarouselSlide } from './Carousel';
|
|
68
101
|
export { Breadcrumb } from './Breadcrumb';
|
|
69
102
|
export type { BreadcrumbItem } from './Breadcrumb';
|
|
103
|
+
export { TableOfContents } from './TableOfContents';
|
|
104
|
+
export type { TableOfContentsItem, TableOfContentsProps, } from './TableOfContents';
|
|
70
105
|
export { Avatar } from './Avatar';
|
|
71
|
-
export type { AvatarSurface } from './Avatar';
|
|
106
|
+
export type { AvatarColorSlot, AvatarSurface } from './Avatar';
|
|
107
|
+
export { IdentityCell } from './IdentityCell';
|
|
108
|
+
export type { LinkComponent } from './linkComponent';
|
|
72
109
|
export { DropdownMenu } from './DropdownMenu';
|
|
73
110
|
export type { DropdownItem } from './DropdownMenu';
|
|
74
111
|
export { PageSizeSelect } from './PageSizeSelect';
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ComponentType, ReactNode } from 'react';
|
|
2
|
+
/**
|
|
3
|
+
* Router link adapter for primitives that render links. Routed apps pass a
|
|
4
|
+
* wrapper around their router's `<Link>`; without one the primitive renders
|
|
5
|
+
* a plain `<a href>`, so primitives stay router-agnostic.
|
|
6
|
+
*/
|
|
7
|
+
export type LinkComponent = ComponentType<{
|
|
8
|
+
to: string;
|
|
9
|
+
className?: string;
|
|
10
|
+
children: ReactNode;
|
|
11
|
+
}>;
|
|
12
|
+
export declare const DefaultLink: LinkComponent;
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TableOfContentsItem } from './TableOfContents';
|
|
2
|
+
/** One heading of a document's `tableOfContents` export, with the headings under it. */
|
|
3
|
+
export interface MdxTocEntry {
|
|
4
|
+
value: string;
|
|
5
|
+
depth: number;
|
|
6
|
+
id?: string;
|
|
7
|
+
children?: MdxTocEntry[];
|
|
8
|
+
}
|
|
9
|
+
/**
|
|
10
|
+
* The table of contents of a document's `tableOfContents` export: its second
|
|
11
|
+
* and third level headings, in document order.
|
|
12
|
+
*/
|
|
13
|
+
export declare function mdxTableOfContents(toc: MdxTocEntry[]): TableOfContentsItem[];
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Index of the tab that a key moves to from the tab at `index` in a row of
|
|
3
|
+
* `count` tabs: ArrowLeft and ArrowRight step and wrap, Home and End jump
|
|
4
|
+
* to the ends. `null` for any other key.
|
|
5
|
+
*/
|
|
6
|
+
export declare function tablistKeyTarget(key: string, index: number, count: number): number | null;
|
package/dist/hooks/index.d.ts
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
export { useCopyToClipboard } from './useCopyToClipboard';
|
|
2
|
+
export type { UseCopyToClipboardResult } from './useCopyToClipboard';
|
|
1
3
|
export { useResizable } from './useResizable';
|
|
2
4
|
export type { UseResizableOptions, UseResizableReturn } from './useResizable';
|
|
3
5
|
export { useSavedQueries } from './useSavedQueries';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
export interface UseCopyToClipboardResult {
|
|
2
2
|
/** True for `resetMs` after a successful copy. */
|
|
3
3
|
copied: boolean;
|
|
4
|
-
/** Resolves false when the
|
|
4
|
+
/** Resolves false when the browser refuses the copy. */
|
|
5
5
|
copy: (text: string) => Promise<boolean>;
|
|
6
6
|
reset: () => void;
|
|
7
7
|
}
|