@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
|
@@ -8,4 +8,4 @@ import { AegisShellProps } from './types';
|
|
|
8
8
|
* the chrome around every app — apps themselves only render page content
|
|
9
9
|
* inside a `<PageWrapper>` (the shell wraps the outlet automatically).
|
|
10
10
|
*/
|
|
11
|
-
export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, inboxPath, onAppSwitch, enableCommandPalette, agentPanel, }: AegisShellProps): ReactElement;
|
|
11
|
+
export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, appSwitcher, elevateHeaderOnScroll, ambient, inboxPath, onAppSwitch, enableCommandPalette, agentPanel, }: AegisShellProps): ReactElement;
|
|
@@ -5,6 +5,10 @@ interface TopHeaderProps {
|
|
|
5
5
|
apps: AegisApp[];
|
|
6
6
|
activeAppId?: string;
|
|
7
7
|
onAppSwitch?: (appId: string) => void;
|
|
8
|
+
/** Whether to render the app launcher. */
|
|
9
|
+
appSwitcher?: boolean;
|
|
10
|
+
/** The page has scrolled under the header; it gets a shadow. */
|
|
11
|
+
scrolled?: boolean;
|
|
8
12
|
user?: AegisUser;
|
|
9
13
|
headerCenter?: ReactNode;
|
|
10
14
|
headerActions?: ReactNode;
|
|
@@ -33,5 +37,5 @@ interface TopHeaderProps {
|
|
|
33
37
|
/** Fired by the agent panel toggle; the toggle renders only when set. */
|
|
34
38
|
onAgentPanelToggle?: () => void;
|
|
35
39
|
}
|
|
36
|
-
export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, agentPanelOpen, onAgentPanelToggle, }: TopHeaderProps): ReactElement;
|
|
40
|
+
export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, appSwitcher, scrolled, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, agentPanelOpen, onAgentPanelToggle, }: TopHeaderProps): ReactElement;
|
|
37
41
|
export {};
|
|
@@ -3,6 +3,9 @@ export declare function normalizeBasePath(basePath: string): string;
|
|
|
3
3
|
/**
|
|
4
4
|
* Resolves an app-relative path against a basePath. Leading slashes on
|
|
5
5
|
* `rel` are app-root-relative, and an empty `rel` is the app root (`/` for
|
|
6
|
-
* an app mounted at the root).
|
|
6
|
+
* an app mounted at the root). A query string on `rel` is kept and appended
|
|
7
|
+
* after the joined path, so `?x=1` resolves to the app root with that query.
|
|
7
8
|
*/
|
|
8
9
|
export declare function joinPath(basePath: string, rel: string): string;
|
|
10
|
+
/** The path part of an app-relative link, without its query string. */
|
|
11
|
+
export declare function pathOf(rel: string): string;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { RouteObject } from 'react-router-dom';
|
|
3
3
|
import { Command } from '../../commands';
|
|
4
|
+
import { AmbientBackgroundVariant } from '../../components/ui/AmbientBackground';
|
|
4
5
|
import { AegisAppEnvironmentsConfig } from './environments/types';
|
|
5
6
|
/**
|
|
6
7
|
* One entry in an app's internal left-nav. Sub-app authors only have to
|
|
@@ -58,6 +59,11 @@ export interface AegisApp {
|
|
|
58
59
|
* shell render, blowing away its state.
|
|
59
60
|
*/
|
|
60
61
|
wrap?: (children: ReactNode) => ReactNode;
|
|
62
|
+
/**
|
|
63
|
+
* Set false to drop the shell's breadcrumb bar while this app is active,
|
|
64
|
+
* for apps whose pages render their own `<Breadcrumb>`. Default true.
|
|
65
|
+
*/
|
|
66
|
+
breadcrumbBar?: boolean;
|
|
61
67
|
/** Optional one-line description shown in app pickers. */
|
|
62
68
|
description?: string;
|
|
63
69
|
/**
|
|
@@ -152,6 +158,19 @@ export interface AegisShellProps {
|
|
|
152
158
|
headerCenter?: ReactNode;
|
|
153
159
|
/** Slot rendered in the top header right side, before the user menu. */
|
|
154
160
|
headerActions?: ReactNode;
|
|
161
|
+
/**
|
|
162
|
+
* Renders the app launcher in the top header. Default true; a single-app
|
|
163
|
+
* site sets false, since the launcher would only list that app.
|
|
164
|
+
*/
|
|
165
|
+
appSwitcher?: boolean;
|
|
166
|
+
/** Gives the sticky top header a shadow once the page scrolls. */
|
|
167
|
+
elevateHeaderOnScroll?: boolean;
|
|
168
|
+
/**
|
|
169
|
+
* Draws an `AmbientBackground` of this variant across the top of the
|
|
170
|
+
* shell, beneath the glass header and the page content. Omit it for a
|
|
171
|
+
* plain page background.
|
|
172
|
+
*/
|
|
173
|
+
ambient?: AmbientBackgroundVariant;
|
|
155
174
|
/**
|
|
156
175
|
* When set, a notification bell is rendered in the top header (between
|
|
157
176
|
* `headerActions` and the user menu) and clicking "View all" routes to
|
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
// Minimal typing for @hyperdx/lucene (3.1.x). The upstream package ships no
|
|
2
|
+
// .d.ts; we model only the AST surface our compiler reads. Shape derived from
|
|
3
|
+
// lib/lucene.grammar in @hyperdx/lucene@3.1.1.
|
|
4
|
+
declare module '@hyperdx/lucene' {
|
|
5
|
+
export type Operator =
|
|
6
|
+
| 'AND'
|
|
7
|
+
| 'OR'
|
|
8
|
+
| 'NOT'
|
|
9
|
+
| 'AND NOT'
|
|
10
|
+
| 'OR NOT'
|
|
11
|
+
| '<implicit>';
|
|
12
|
+
|
|
13
|
+
export interface NodeTerm {
|
|
14
|
+
field: string;
|
|
15
|
+
term: string;
|
|
16
|
+
quoted?: boolean;
|
|
17
|
+
regex?: boolean;
|
|
18
|
+
prefix?: string;
|
|
19
|
+
boost?: number;
|
|
20
|
+
similarity?: number;
|
|
21
|
+
proximity?: number;
|
|
22
|
+
fieldLocation?: unknown;
|
|
23
|
+
termLocation?: unknown;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
export interface NodeRangedTerm {
|
|
27
|
+
field: string;
|
|
28
|
+
term_min: string;
|
|
29
|
+
term_max: string;
|
|
30
|
+
inclusive: 'both' | 'left' | 'right' | 'none';
|
|
31
|
+
inclusive_min?: boolean;
|
|
32
|
+
inclusive_max?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export type Node = NodeTerm | NodeRangedTerm | AST;
|
|
36
|
+
|
|
37
|
+
export interface LeftOnlyAST {
|
|
38
|
+
left: Node;
|
|
39
|
+
start?: Operator;
|
|
40
|
+
parenthesized?: boolean;
|
|
41
|
+
field?: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
export interface BinaryAST {
|
|
45
|
+
left: Node;
|
|
46
|
+
operator: Operator;
|
|
47
|
+
right: Node;
|
|
48
|
+
start?: Operator;
|
|
49
|
+
parenthesized?: boolean;
|
|
50
|
+
field?: string;
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
export type AST = LeftOnlyAST | BinaryAST | EmptyAST;
|
|
54
|
+
|
|
55
|
+
export interface EmptyAST {
|
|
56
|
+
left?: undefined;
|
|
57
|
+
right?: undefined;
|
|
58
|
+
operator?: Operator;
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
export function parse(query: string): AST;
|
|
62
|
+
export function toString(ast: AST): string;
|
|
63
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { AegisStrings } from './strings';
|
|
3
|
+
interface LocaleProviderProps {
|
|
4
|
+
strings: AegisStrings;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/** Supplies the strings primitives render; without it they render English. */
|
|
8
|
+
export declare function LocaleProvider({ strings, children }: LocaleProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
+
export {};
|
|
@@ -0,0 +1,110 @@
|
|
|
1
|
+
/** Every user-visible string a primitive renders on its own. */
|
|
2
|
+
export interface AegisStrings {
|
|
3
|
+
copy: string;
|
|
4
|
+
copied: string;
|
|
5
|
+
copyToClipboard: string;
|
|
6
|
+
plainTextLanguage: string;
|
|
7
|
+
inspectorRendered: string;
|
|
8
|
+
inspectorRaw: string;
|
|
9
|
+
openInInspector: string;
|
|
10
|
+
openContent: (title: string) => string;
|
|
11
|
+
inputTokens: string;
|
|
12
|
+
outputTokens: string;
|
|
13
|
+
loadingTrajectory: string;
|
|
14
|
+
trajectoryLoadFailed: string;
|
|
15
|
+
noMessages: string;
|
|
16
|
+
noMessagesDescription: string;
|
|
17
|
+
clearSearch: string;
|
|
18
|
+
clearSelection: string;
|
|
19
|
+
remove: string;
|
|
20
|
+
close: string;
|
|
21
|
+
breadcrumb: string;
|
|
22
|
+
tableOfContents: string;
|
|
23
|
+
switchApp: string;
|
|
24
|
+
openNavigation: string;
|
|
25
|
+
closeNavigation: string;
|
|
26
|
+
/** The shell's first link, which moves keyboard focus past the header to the page. */
|
|
27
|
+
skipToContent: string;
|
|
28
|
+
showSidebar: string;
|
|
29
|
+
hideSidebar: string;
|
|
30
|
+
selectRow: string;
|
|
31
|
+
selectAllRows: string;
|
|
32
|
+
previousPage: string;
|
|
33
|
+
nextPage: string;
|
|
34
|
+
rowsPerPage: string;
|
|
35
|
+
/** Joins a row range to its total, e.g. "1–25 of 469". */
|
|
36
|
+
rangeOf: string;
|
|
37
|
+
totalCount: (total: number, unit: string) => string;
|
|
38
|
+
recordsUnit: string;
|
|
39
|
+
/** Accessible value of a bar, e.g. "0.75 of 1.00". */
|
|
40
|
+
barValue: (value: string, max: string) => string;
|
|
41
|
+
/** Accessible text for a missing value (shown as an em dash). */
|
|
42
|
+
noValue: string;
|
|
43
|
+
paretoChartLabel: (xLabel: string, yLabel: string) => string;
|
|
44
|
+
paretoEmptyTitle: string;
|
|
45
|
+
/** Accessible summary of RunPips, e.g. "3 of 5 runs passed, 1 failed, 1 errored". */
|
|
46
|
+
runPipsLabel: (counts: {
|
|
47
|
+
passed: number;
|
|
48
|
+
failed: number;
|
|
49
|
+
errored: number;
|
|
50
|
+
pending: number;
|
|
51
|
+
total: number;
|
|
52
|
+
}) => string;
|
|
53
|
+
shareLinkSharing: string;
|
|
54
|
+
shareLinkExpiresAfter: string;
|
|
55
|
+
/** A share link lifetime preset, e.g. "15 min" or "7 days". */
|
|
56
|
+
shareLinkTtl: (seconds: number) => string;
|
|
57
|
+
shareLinkDisposition: string;
|
|
58
|
+
shareLinkForceDownload: string;
|
|
59
|
+
/** Time left on a generated link, e.g. "expires in 59m 12s". */
|
|
60
|
+
shareLinkExpiresIn: (remaining: {
|
|
61
|
+
hours: number;
|
|
62
|
+
minutes: number;
|
|
63
|
+
seconds: number;
|
|
64
|
+
}) => string;
|
|
65
|
+
shareLinkExpired: string;
|
|
66
|
+
shareLinkCopy: string;
|
|
67
|
+
shareLinkGenerate: string;
|
|
68
|
+
shareLinkGenerating: string;
|
|
69
|
+
shareLinkGenerateFailed: string;
|
|
70
|
+
clipboardUnavailable: string;
|
|
71
|
+
/** The TrajectoryTimeline header when it names no agent. */
|
|
72
|
+
trajectoryHeading: string;
|
|
73
|
+
trajectoryStatus: (status: 'running' | 'completed' | 'failed') => string;
|
|
74
|
+
trajectoryActionType: (type: 'tool_call' | 'message' | 'internal') => string;
|
|
75
|
+
trajectoryThought: string;
|
|
76
|
+
trajectoryAction: string;
|
|
77
|
+
trajectoryTool: string;
|
|
78
|
+
trajectoryObservation: string;
|
|
79
|
+
toolCallArguments: string;
|
|
80
|
+
toolCallResult: string;
|
|
81
|
+
toolCallError: string;
|
|
82
|
+
toolCallStatus: (status: 'running' | 'ok' | 'error') => string;
|
|
83
|
+
expandRow: string;
|
|
84
|
+
collapseRow: string;
|
|
85
|
+
resizeNameColumn: string;
|
|
86
|
+
/** A TraceTree tooltip's timing, e.g. "start +1.2s · dur 300ms". */
|
|
87
|
+
traceSpanTiming: (start: string, duration: string) => string;
|
|
88
|
+
traceSpanStatus: (status: 'ok' | 'error' | 'unset') => string;
|
|
89
|
+
traceSpanField: (field: 'name' | 'status' | 'kind' | 'start' | 'duration' | 'parent' | 'id') => string;
|
|
90
|
+
inspectorOverview: string;
|
|
91
|
+
inspectorAttributes: string;
|
|
92
|
+
noAttributes: string;
|
|
93
|
+
noAttributesDescription: string;
|
|
94
|
+
inspectorTabs: string;
|
|
95
|
+
maximizeInspector: string;
|
|
96
|
+
restoreInspector: string;
|
|
97
|
+
closeInspector: string;
|
|
98
|
+
maximize: string;
|
|
99
|
+
restore: string;
|
|
100
|
+
timelineEmptyTitle: string;
|
|
101
|
+
timelineEmptyDescription: string;
|
|
102
|
+
/** Read before an Alert's content to name its tone, e.g. "Error:". */
|
|
103
|
+
alertTone: (tone: 'info' | 'success' | 'warning' | 'error') => string;
|
|
104
|
+
/** What assistive technology calls a Carousel region. */
|
|
105
|
+
carouselRoleDescription: string;
|
|
106
|
+
carouselPause: string;
|
|
107
|
+
carouselPlay: string;
|
|
108
|
+
}
|
|
109
|
+
export declare const enStrings: AegisStrings;
|
|
110
|
+
export declare const zhCNStrings: AegisStrings;
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Types of the `.mdx` modules that `aegisMdx()` from `@lincyaw/aegis-ui/vite`
|
|
3
|
+
* compiles. A host references them with
|
|
4
|
+
* `/// <reference types="@lincyaw/aegis-ui/mdx-modules" />`.
|
|
5
|
+
*/
|
|
6
|
+
declare module '*.mdx' {
|
|
7
|
+
import type { MDXContent } from 'mdx/types';
|
|
8
|
+
|
|
9
|
+
/** A heading, with the headings under it; `MdxTocEntry` in the library. */
|
|
10
|
+
interface TocEntry {
|
|
11
|
+
value: string;
|
|
12
|
+
depth: number;
|
|
13
|
+
id?: string;
|
|
14
|
+
children?: TocEntry[];
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/** The document's headings, for `mdxTableOfContents`. */
|
|
18
|
+
export const tableOfContents: TocEntry[];
|
|
19
|
+
|
|
20
|
+
const Content: MDXContent;
|
|
21
|
+
export default Content;
|
|
22
|
+
}
|