@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.
Files changed (162) hide show
  1. package/README.md +82 -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/Alert.d.ts +14 -0
  13. package/dist/components/ui/AmbientBackground.d.ts +23 -0
  14. package/dist/components/ui/AuthLayout.d.ts +1 -1
  15. package/dist/components/ui/Avatar.d.ts +14 -14
  16. package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
  17. package/dist/components/ui/Breadcrumb.d.ts +4 -14
  18. package/dist/components/ui/BucketCard.d.ts +1 -1
  19. package/dist/components/ui/Button.d.ts +26 -4
  20. package/dist/components/ui/Carousel.d.ts +28 -0
  21. package/dist/components/ui/ChatComposer.d.ts +1 -1
  22. package/dist/components/ui/ChatMessage.d.ts +7 -14
  23. package/dist/components/ui/ChatMessageList.d.ts +3 -10
  24. package/dist/components/ui/ChatSessionList.d.ts +0 -1
  25. package/dist/components/ui/CheckGrid.d.ts +47 -0
  26. package/dist/components/ui/Checkbox.d.ts +14 -0
  27. package/dist/components/ui/Chip.d.ts +17 -14
  28. package/dist/components/ui/CodeBlock.d.ts +11 -15
  29. package/dist/components/ui/CodeEditor.d.ts +6 -13
  30. package/dist/components/ui/Collapse.d.ts +16 -0
  31. package/dist/components/ui/ColumnLayout.d.ts +16 -0
  32. package/dist/components/ui/CommandInvocationCard.d.ts +7 -14
  33. package/dist/components/ui/CommandPalette.d.ts +0 -1
  34. package/dist/components/ui/ContentInspectorContent.d.ts +14 -0
  35. package/dist/components/ui/ContentInspectorDialog.d.ts +15 -0
  36. package/dist/components/ui/ControlListItem.d.ts +4 -2
  37. package/dist/components/ui/DangerZone.d.ts +1 -1
  38. package/dist/components/ui/DataList.d.ts +3 -11
  39. package/dist/components/ui/DataTable.d.ts +86 -10
  40. package/dist/components/ui/Dialog.d.ts +21 -0
  41. package/dist/components/ui/DiffViewer.d.ts +6 -13
  42. package/dist/components/ui/DropdownMenu.d.ts +6 -2
  43. package/dist/components/ui/EmptyState.d.ts +1 -1
  44. package/dist/components/ui/EnvironmentSwitcher.d.ts +0 -1
  45. package/dist/components/ui/ErrorState.d.ts +8 -2
  46. package/dist/components/ui/EventTable.d.ts +0 -1
  47. package/dist/components/ui/FileDropzone.d.ts +1 -1
  48. package/dist/components/ui/FilePreview.d.ts +8 -15
  49. package/dist/components/ui/FileTree.d.ts +27 -0
  50. package/dist/components/ui/FolderDropzone.d.ts +0 -1
  51. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -1
  52. package/dist/components/ui/FormRow.d.ts +1 -1
  53. package/dist/components/ui/IdentityCell.d.ts +25 -0
  54. package/dist/components/ui/InboxPage.d.ts +3 -10
  55. package/dist/components/ui/KeyValueList.d.ts +3 -10
  56. package/dist/components/ui/LoginForm.d.ts +1 -1
  57. package/dist/components/ui/Markdown.d.ts +9 -3
  58. package/dist/components/ui/MdxDocument.d.ts +17 -0
  59. package/dist/components/ui/MetadataList.d.ts +0 -1
  60. package/dist/components/ui/MetricCard.d.ts +7 -14
  61. package/dist/components/ui/MetricLabel.d.ts +2 -1
  62. package/dist/components/ui/MonoValue.d.ts +6 -11
  63. package/dist/components/ui/NotificationBell.d.ts +1 -1
  64. package/dist/components/ui/ObjectBrowser.d.ts +1 -1
  65. package/dist/components/ui/ObjectInspector.d.ts +0 -1
  66. package/dist/components/ui/PageHeader.d.ts +8 -3
  67. package/dist/components/ui/PageSizeSelect.d.ts +9 -2
  68. package/dist/components/ui/Pagination.d.ts +13 -0
  69. package/dist/components/ui/Panel.d.ts +35 -14
  70. package/dist/components/ui/PanelTitle.d.ts +3 -3
  71. package/dist/components/ui/ParetoChart.d.ts +41 -0
  72. package/dist/components/ui/ParquetViewer.d.ts +8 -15
  73. package/dist/components/ui/PasswordField.d.ts +1 -1
  74. package/dist/components/ui/PickerField.d.ts +17 -0
  75. package/dist/components/ui/ProjectSelector.d.ts +8 -2
  76. package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
  77. package/dist/components/ui/RankBar.d.ts +25 -0
  78. package/dist/components/ui/RegisterForm.d.ts +1 -1
  79. package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
  80. package/dist/components/ui/Reveal.d.ts +17 -0
  81. package/dist/components/ui/RunPips.d.ts +25 -0
  82. package/dist/components/ui/SavedQueryBar.d.ts +0 -1
  83. package/dist/components/ui/ScoreBar.d.ts +21 -0
  84. package/dist/components/ui/SearchInput.d.ts +6 -2
  85. package/dist/components/ui/SectionDivider.d.ts +1 -1
  86. package/dist/components/ui/Select.d.ts +25 -0
  87. package/dist/components/ui/SessionRunView.d.ts +50 -0
  88. package/dist/components/ui/SettingsSection.d.ts +1 -1
  89. package/dist/components/ui/ShareLinkDialog.d.ts +22 -6
  90. package/dist/components/ui/SparkLine.d.ts +3 -10
  91. package/dist/components/ui/StackedBar.d.ts +47 -0
  92. package/dist/components/ui/StatBlock.d.ts +15 -16
  93. package/dist/components/ui/StatusDot.d.ts +2 -2
  94. package/dist/components/ui/TableOfContents.d.ts +20 -0
  95. package/dist/components/ui/Tabs.d.ts +12 -2
  96. package/dist/components/ui/Terminal.d.ts +3 -10
  97. package/dist/components/ui/TextField.d.ts +1 -1
  98. package/dist/components/ui/TimeDisplay.d.ts +3 -3
  99. package/dist/components/ui/TimeRangePicker.d.ts +0 -1
  100. package/dist/components/ui/Timeline.d.ts +23 -15
  101. package/dist/components/ui/ToolCallCard.d.ts +3 -10
  102. package/dist/components/ui/Toolbar.d.ts +0 -1
  103. package/dist/components/ui/TraceSpanInspector.d.ts +15 -0
  104. package/dist/components/ui/TraceTree.d.ts +16 -14
  105. package/dist/components/ui/TrajectoryStep.d.ts +16 -10
  106. package/dist/components/ui/TrajectoryTimeline.d.ts +5 -11
  107. package/dist/components/ui/UploadQueue.d.ts +1 -1
  108. package/dist/components/ui/codeFence.d.ts +5 -0
  109. package/dist/components/ui/index.d.ts +51 -5
  110. package/dist/components/ui/linkComponent.d.ts +12 -0
  111. package/dist/components/ui/mdxTableOfContents.d.ts +13 -0
  112. package/dist/components/ui/relativeTime.d.ts +1 -1
  113. package/dist/components/ui/tablistKeyboard.d.ts +6 -0
  114. package/dist/components/ui/traceFormat.d.ts +5 -0
  115. package/dist/hooks/index.d.ts +2 -0
  116. package/dist/hooks/useCopyToClipboard.d.ts +8 -0
  117. package/dist/hooks/useElementWidth.d.ts +3 -0
  118. package/dist/hooks/useMediaQuery.d.ts +2 -0
  119. package/dist/hooks/useMenuPopover.d.ts +27 -0
  120. package/dist/hooks/usePageHidden.d.ts +2 -0
  121. package/dist/hooks/useResizable.d.ts +9 -0
  122. package/dist/index.cjs +13 -1
  123. package/dist/index.cjs.map +1 -1
  124. package/dist/index.d.ts +8 -5
  125. package/dist/index.js +12123 -123
  126. package/dist/index.js.map +1 -1
  127. package/dist/layouts/shell/AegisShell.d.ts +1 -1
  128. package/dist/layouts/shell/AuthRequiredCard.d.ts +2 -2
  129. package/dist/layouts/shell/TopHeader.d.ts +9 -1
  130. package/dist/layouts/shell/paths.d.ts +11 -0
  131. package/dist/layouts/shell/types.d.ts +40 -13
  132. package/dist/lib/format.d.ts +2 -0
  133. package/dist/lib/id.d.ts +2 -0
  134. package/dist/lib/luceneQuery/lucene.d.ts +63 -0
  135. package/dist/lib/storage.d.ts +12 -0
  136. package/dist/locale/LocaleProvider.d.ts +9 -0
  137. package/dist/locale/index.d.ts +4 -0
  138. package/dist/locale/localeContext.d.ts +2 -0
  139. package/dist/locale/strings.d.ts +110 -0
  140. package/dist/locale/useStrings.d.ts +2 -0
  141. package/dist/mdx-modules.d.ts +22 -0
  142. package/dist/style.css +1 -1
  143. package/dist/theme/antdTheme.d.ts +2 -3
  144. package/dist/vite.cjs +2 -0
  145. package/dist/vite.cjs.map +1 -0
  146. package/dist/vite.d.ts +7 -0
  147. package/dist/vite.js +18 -0
  148. package/dist/vite.js.map +1 -0
  149. package/package.json +43 -18
  150. package/dist/index-6WZzHI2Z.cjs +0 -1151
  151. package/dist/index-6WZzHI2Z.cjs.map +0 -1
  152. package/dist/index-CZ_qegBG.js +0 -6736
  153. package/dist/index-CZ_qegBG.js.map +0 -1
  154. package/dist/index-DLXAAlfH.cjs +0 -15
  155. package/dist/index-DLXAAlfH.cjs.map +0 -1
  156. package/dist/index-DtgBxtmy.js +0 -56284
  157. package/dist/index-DtgBxtmy.js.map +0 -1
  158. package/dist/styles/fonts.d.ts +0 -0
  159. package/dist/workerBundle-D52AeOj1.js +0 -76
  160. package/dist/workerBundle-D52AeOj1.js.map +0 -1
  161. package/dist/workerBundle-FGNDqtbW.cjs +0 -73
  162. package/dist/workerBundle-FGNDqtbW.cjs.map +0 -1
package/README.md CHANGED
@@ -1,9 +1,12 @@
1
1
  # @lincyaw/aegis-ui
2
2
 
3
- AegisLab shared design system: tokens, primitives, layout, AntD theme.
3
+ Design system and multi-app shell for AegisLab front ends: design tokens,
4
+ presentational React components, `PageWrapper`, the router-aware
5
+ `AegisShell`, and an Ant Design theme that follows the same tokens.
4
6
 
5
- See the [repository root README](../../README.md) for project documentation,
6
- conventions, and the AegisApp contract.
7
+ The package contains no API clients, business state or pages. Applications
8
+ provide their own data and plug into the shell through the `AegisApp`
9
+ contract.
7
10
 
8
11
  ## Install
9
12
 
@@ -11,7 +14,81 @@ conventions, and the AegisApp contract.
11
14
  pnpm add @lincyaw/aegis-ui
12
15
  ```
13
16
 
14
- ```ts
15
- import { PageWrapper, Panel } from '@lincyaw/aegis-ui';
17
+ Peer dependencies: `react` 18, `react-dom` 18, `react-router-dom` 6,
18
+ `antd` 5.25 or later, `@ant-design/icons` 5.
19
+
20
+ Fonts are not bundled. Install `@fontsource-variable/geist`,
21
+ `@fontsource-variable/hanken-grotesk`, `@fontsource-variable/noto-sans-sc`
22
+ and `@fontsource/google-sans-code`, and import them once in the app entry
23
+ (Google Sans Code as its `400.css` and `500.css` weights).
24
+
25
+ ## Usage
26
+
27
+ ```tsx
28
+ import {
29
+ type AegisApp,
30
+ AegisShell,
31
+ ThemeProvider,
32
+ getAegisTheme,
33
+ useTheme,
34
+ } from '@lincyaw/aegis-ui';
16
35
  import '@lincyaw/aegis-ui/style.css';
36
+ import { ConfigProvider } from 'antd';
37
+ import { BrowserRouter } from 'react-router-dom';
38
+
39
+ const containersApp: AegisApp = {
40
+ id: 'containers',
41
+ label: 'Containers',
42
+ icon: <HddOutlined />,
43
+ basePath: '/containers',
44
+ sidebar: [{ items: [{ to: '', label: 'List', end: true }] }],
45
+ routes: [{ path: '', element: <ContainerList /> }],
46
+ };
47
+
48
+ function Root() {
49
+ const { resolved } = useTheme();
50
+ return (
51
+ <ConfigProvider theme={getAegisTheme(resolved)}>
52
+ <BrowserRouter>
53
+ <AegisShell
54
+ brand={{ name: 'AegisLab', href: '/' }}
55
+ apps={[containersApp]}
56
+ fallbackPath="/containers"
57
+ />
58
+ </BrowserRouter>
59
+ </ConfigProvider>
60
+ );
61
+ }
62
+
63
+ export function App() {
64
+ return (
65
+ <ThemeProvider>
66
+ <Root />
67
+ </ThemeProvider>
68
+ );
69
+ }
17
70
  ```
71
+
72
+ The shell wraps each route in `PageWrapper`, so pages render content only:
73
+
74
+ ```tsx
75
+ import { DataTable, PageHeader, Panel } from '@lincyaw/aegis-ui';
76
+
77
+ export function ContainerList() {
78
+ return (
79
+ <>
80
+ <PageHeader title="Containers" />
81
+ <Panel>
82
+ <DataTable columns={columns} data={rows} rowKey={(row) => row.id} />
83
+ </Panel>
84
+ </>
85
+ );
86
+ }
87
+ ```
88
+
89
+ ## Documentation
90
+
91
+ The [repository README](https://github.com/Lincyaw/aegis-ui#readme) covers the
92
+ full contents of the package, the development workflow and the release
93
+ process. The [component gallery](https://profile.aoyangfang.top/aegis-ui/)
94
+ shows every component with its variants, in light and dark themes.
@@ -8,6 +8,10 @@ interface AgentProviderProps {
8
8
  * Thin context wrapper. The library deliberately holds no agent state —
9
9
  * the host owns the LLM round-trip, tool-call dispatch, and message
10
10
  * history, and feeds the resulting value in.
11
+ *
12
+ * The one piece of UI state it can hold is `panelOpen`: when the host
13
+ * leaves it undefined, the provider keeps it (starting closed) and still
14
+ * forwards changes to the host's `setPanelOpen`, if any.
11
15
  */
12
16
  export declare function AgentProvider({ value, children, }: AgentProviderProps): ReactElement;
13
17
  export {};
@@ -1,3 +1,2 @@
1
1
  import { ReactElement } from 'react';
2
2
  export declare function AskOverlay(): ReactElement | null;
3
- export default AskOverlay;
@@ -16,4 +16,3 @@ export interface AskPanelProps {
16
16
  popover?: boolean;
17
17
  }
18
18
  export declare function AskPanel({ context, tools, anchorRect, anchorPoint, onClose, popover, }: AskPanelProps): ReactElement;
19
- export default AskPanel;
@@ -43,9 +43,13 @@ export interface AgentContextValue {
43
43
  send: (content: string) => Promise<void> | void;
44
44
  /** Optional: clear the current thread. */
45
45
  clear?: () => void;
46
- /** Optional: panel open/closed (panel controls). Persisted by host. */
46
+ /**
47
+ * Optional: whether AegisShell's `agentPanel` is shown. Pass it with
48
+ * `setPanelOpen` to own the state; leave it undefined and
49
+ * <AgentProvider/> keeps it instead.
50
+ */
47
51
  panelOpen?: boolean;
48
- /** Optional: toggle panel. */
52
+ /** Optional: open or close the agent panel (AegisShell's header toggle). */
49
53
  setPanelOpen?: (open: boolean) => void;
50
54
  }
51
55
  export declare const defaultAgentContextValue: AgentContextValue;
@@ -30,6 +30,7 @@ export interface AgentmChannelClientOptions {
30
30
  /** If false, do not auto-reconnect after close. Default true. */
31
31
  autoReconnect?: boolean;
32
32
  }
33
+ export declare const RECONNECT_BACKOFF_MS: number[];
33
34
  export type Listener<T> = (value: T) => void;
34
35
  interface ConnectResult {
35
36
  welcome: Envelope;
@@ -1,4 +1,4 @@
1
- import { ActionSource, AegisAction, AegisActionDescriptor, AegisEvent, AegisInspectResult, AegisRef, AegisSearchResult, AegisSnapshot, AskContext, AskRequest, DispatchResult, EntityRef, InvocationSource, McpToolDefinition, SearchProvider, ShellSnapshot, SurfaceKind, SurfaceSnapshot } from './types';
1
+ import { ActionSource, AegisAction, AegisActionDescriptor, AegisEvent, AegisInspectResult, AegisRef, AegisSearchResult, AegisSnapshot, AskContext, AskRequest, DispatchResult, EntityProjection, EntityRef, InvocationSource, McpToolDefinition, SearchProvider, ShellSnapshot, SurfaceKind, SurfaceSnapshot } from './types';
2
2
  export interface RegisteredAction {
3
3
  action: AegisAction<unknown, unknown>;
4
4
  source: ActionSource;
@@ -62,4 +62,9 @@ export interface RuntimeDeps {
62
62
  navigate?: (to: string) => void;
63
63
  toast?: (msg: string, level?: 'info' | 'warn' | 'error') => void;
64
64
  }
65
+ export declare function defaultShellSnapshot(currentAppId?: string | null): ShellSnapshot;
66
+ export declare function findSurfaceContaining(surfaces: SurfaceSnapshot[], entityId: string): {
67
+ surface: SurfaceSnapshot;
68
+ entity: EntityProjection;
69
+ } | null;
65
70
  export declare function createAegisRuntime(deps?: RuntimeDeps): AegisRuntime;
@@ -0,0 +1,30 @@
1
+ import { RefObject } from 'react';
2
+ import { SurfaceKind, SurfaceSnapshot } from './types';
3
+ type SurfaceProjection = Pick<SurfaceSnapshot, 'entities' | 'fields'>;
4
+ interface PrimitiveSurfaceBase {
5
+ id: string;
6
+ kind?: SurfaceKind;
7
+ label?: string;
8
+ askSuggestions?: string[];
9
+ /** When false, AskOverlay skips this surface (per docs §7.1). */
10
+ ask?: boolean;
11
+ }
12
+ /** `surface` prop shape for primitives that project their own data. */
13
+ export interface PrimitiveSurface<T> extends PrimitiveSurfaceBase {
14
+ project: (data: T) => SurfaceProjection;
15
+ }
16
+ /** `surface` prop shape for containers (Panel, AgentPanel) with no data. */
17
+ export interface ContainerSurface extends PrimitiveSurfaceBase {
18
+ project?: () => SurfaceProjection;
19
+ }
20
+ export interface PrimitiveSurfaceAttrs {
21
+ 'data-agent-surface-id': string | undefined;
22
+ 'data-agent-ask': 'off' | undefined;
23
+ }
24
+ /**
25
+ * Registers a primitive's optional `surface` prop with the agent runtime
26
+ * and returns the `data-agent-*` attributes for its root element. A no-op
27
+ * registration when `surface` is undefined.
28
+ */
29
+ export declare function usePrimitiveSurface<T>(surface: PrimitiveSurface<T> | ContainerSurface | undefined, data: T, defaultKind: SurfaceKind, ref: RefObject<HTMLElement | null>): PrimitiveSurfaceAttrs;
30
+ export {};
@@ -4,9 +4,9 @@ interface CommandProviderProps {
4
4
  }
5
5
  /**
6
6
  * Owns the command registry, the palette open-state, and the global
7
- * `mod+k` opener. Apps inside register commands via
8
- * `useRegisterCommands`; AegisShell flips the active scope as the user
9
- * navigates between sub-apps.
7
+ * `mod+k` opener. Components register commands via
8
+ * `useRegisterCommands`; AegisShell registers each `AegisApp.commands`
9
+ * and flips the active scope as the user navigates between sub-apps.
10
10
  */
11
11
  export declare function CommandProvider({ children, }: CommandProviderProps): ReactElement;
12
12
  export {};
@@ -28,9 +28,9 @@ export interface Command<TArgs = unknown> {
28
28
  schema?: Record<string, unknown>;
29
29
  /** The actual side-effect. */
30
30
  handler: (args?: TArgs) => void | Promise<void>;
31
- /** Optional undo callback — UI will surface an Undo affordance. */
31
+ /** Optional undo callback for hosts that offer Undo; CommandPalette never calls it. */
32
32
  undo?: () => void | Promise<void>;
33
- /** Optional aegis-ui agent action — fired alongside handler from the palette. */
33
+ /** Optional aegis-ui agent action, registered while the palette row is rendered. */
34
34
  action?: AegisAction<void, unknown>;
35
35
  }
36
36
  /**
@@ -1,13 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface AgentPanelSurface {
4
- id: string;
5
- kind?: SurfaceKind;
6
- label?: string;
7
- project?: () => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
8
- askSuggestions?: string[];
9
- ask?: boolean;
10
- }
2
+ import { ContainerSurface } from '../../agent/usePrimitiveSurface';
3
+ export type AgentPanelSurface = ContainerSurface;
11
4
  interface AgentPanelProps {
12
5
  title?: ReactNode;
13
6
  /** Header right-side slot (e.g. close button). */
@@ -20,4 +13,4 @@ interface AgentPanelProps {
20
13
  surface?: AgentPanelSurface;
21
14
  }
22
15
  export declare function AgentPanel({ title, headerActions, children, footer, className, surface, }: AgentPanelProps): import("react/jsx-runtime").JSX.Element;
23
- export default AgentPanel;
16
+ export {};
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ type AlertTone = 'info' | 'success' | 'warning' | 'error';
3
+ interface AlertProps {
4
+ /** `error` is the anomaly tone — only for failures, never for emphasis. */
5
+ tone?: AlertTone;
6
+ /** Strong heading over a muted body, e.g. a verdict and its summary. */
7
+ title?: ReactNode;
8
+ /** Leading icon in place of the tone dot, e.g. a verdict glyph. */
9
+ icon?: ReactNode;
10
+ children: ReactNode;
11
+ className?: string;
12
+ }
13
+ export declare function Alert({ tone, title, icon, children, className, }: AlertProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -0,0 +1,23 @@
1
+ export type AmbientBackgroundVariant = 'page' | 'hero';
2
+ export interface AmbientBackgroundProps {
3
+ /**
4
+ * `page` for app pages; `hero` for overview and article heroes, with
5
+ * stronger glows that drift 1.6 times as far.
6
+ */
7
+ variant?: AmbientBackgroundVariant;
8
+ /**
9
+ * Layer height. Defaults to `--ambient-page-height` or
10
+ * `--ambient-hero-height`; the glows scale with the width, not the height.
11
+ */
12
+ height?: number | string;
13
+ className?: string;
14
+ }
15
+ /**
16
+ * Blue, teal and violet glows drifting across the top of a surface.
17
+ * Render it as the first child of a `position: relative; isolation:
18
+ * isolate` container: the layer spans that container's top edge and
19
+ * paints above its background and beneath its content. The drift pauses
20
+ * while the document is hidden and stays still under
21
+ * prefers-reduced-motion.
22
+ */
23
+ export declare function AmbientBackground({ variant, height, className, }: AmbientBackgroundProps): import("react/jsx-runtime").JSX.Element;
@@ -8,4 +8,4 @@ interface AuthLayoutProps {
8
8
  className?: string;
9
9
  }
10
10
  export declare function AuthLayout({ brand, title, description, children, footer, className, }: AuthLayoutProps): import("react/jsx-runtime").JSX.Element;
11
- export default AuthLayout;
11
+ export {};
@@ -1,26 +1,26 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
3
  type AvatarSize = 'sm' | 'md' | 'lg';
4
4
  type AvatarStatus = 'online' | 'offline' | 'busy' | 'away';
5
- export interface AvatarSurface {
6
- id: string;
7
- kind?: SurfaceKind;
8
- label?: string;
9
- project: (data: {
10
- name: string;
11
- status?: AvatarStatus;
12
- }) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
13
- askSuggestions?: string[];
14
- ask?: boolean;
15
- }
5
+ /** Index into `--data-cat-1` … `--data-cat-6`, the chart series colours. */
6
+ export type AvatarColorSlot = 1 | 2 | 3 | 4 | 5 | 6;
7
+ export type AvatarSurface = PrimitiveSurface<{
8
+ name: string;
9
+ status?: AvatarStatus;
10
+ }>;
16
11
  interface AvatarProps {
17
12
  name: string;
18
13
  src?: string;
19
14
  size?: AvatarSize;
20
15
  status?: AvatarStatus;
21
16
  icon?: ReactNode;
17
+ /**
18
+ * Colours the initials fallback with `--data-cat-<n>` instead of the
19
+ * name-hashed hue, so it matches that series in charts.
20
+ */
21
+ colorSlot?: AvatarColorSlot;
22
22
  className?: string;
23
23
  surface?: AvatarSurface;
24
24
  }
25
- export declare function Avatar({ name, src, size, status, icon, className, surface, }: AvatarProps): import("react/jsx-runtime").JSX.Element;
26
- export default Avatar;
25
+ export declare function Avatar({ name, src, size, status, icon, colorSlot, className, surface, }: AvatarProps): import("react/jsx-runtime").JSX.Element;
26
+ export {};
@@ -1,15 +1,8 @@
1
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
2
- export interface BlastRadiusBarSurface {
3
- id: string;
4
- kind?: SurfaceKind;
5
- label?: string;
6
- project: (data: {
7
- value: number;
8
- centerLabel?: string;
9
- }) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
10
- askSuggestions?: string[];
11
- ask?: boolean;
12
- }
1
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
2
+ export type BlastRadiusBarSurface = PrimitiveSurface<{
3
+ value: number;
4
+ centerLabel?: string;
5
+ }>;
13
6
  interface BlastRadiusBarProps {
14
7
  /** 0 – 100 */
15
8
  value: number;
@@ -21,4 +14,4 @@ interface BlastRadiusBarProps {
21
14
  surface?: BlastRadiusBarSurface;
22
15
  }
23
16
  export declare function BlastRadiusBar({ value, centerLabel, hideTicks, className, surface, }: BlastRadiusBarProps): import("react/jsx-runtime").JSX.Element;
24
- export default BlastRadiusBar;
17
+ export {};
@@ -1,20 +1,10 @@
1
- import { ComponentType, ReactElement, ReactNode } from 'react';
1
+ import { ReactElement, ReactNode } from 'react';
2
+ import { LinkComponent } from './linkComponent';
2
3
  export interface BreadcrumbItem {
3
4
  label: ReactNode;
4
5
  /** Optional destination. If omitted, the item renders as plain text. */
5
6
  to?: string;
6
7
  }
7
- /**
8
- * Render-prop signature for routed links. Sub-apps that use a router
9
- * (`react-router-dom`, `@tanstack/router`, Next.js) pass a wrapper that
10
- * forwards to their `<Link>`. Keeping this contract minimal so the primitive
11
- * has zero router dependency.
12
- */
13
- export type BreadcrumbLinkComponent = ComponentType<{
14
- to: string;
15
- className?: string;
16
- children: ReactNode;
17
- }>;
18
8
  interface BreadcrumbProps {
19
9
  items: BreadcrumbItem[];
20
10
  className?: string;
@@ -23,7 +13,7 @@ interface BreadcrumbProps {
23
13
  * unstyled `<a href>`. Sub-apps using a router should pass their
24
14
  * Link adapter here.
25
15
  */
26
- linkComponent?: BreadcrumbLinkComponent;
16
+ linkComponent?: LinkComponent;
27
17
  }
28
18
  export declare function Breadcrumb({ items, className, linkComponent, }: BreadcrumbProps): ReactElement;
29
- export default Breadcrumb;
19
+ export {};
@@ -21,4 +21,4 @@ interface BucketCardProps {
21
21
  className?: string;
22
22
  }
23
23
  export declare function BucketCard({ name, driver, maxObjectBytes, retentionDays, publicRead, objectCount, totalBytes, quickActions, onClick, className, }: BucketCardProps): import("react/jsx-runtime").JSX.Element;
24
- export default BucketCard;
24
+ export {};
@@ -1,14 +1,36 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from 'react';
2
2
  import { AegisAction } from '../../agent/types';
3
- type NativeButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'children'>;
4
- interface ButtonProps extends NativeButtonProps {
3
+ import { LinkComponent } from './linkComponent';
4
+ type ButtonTone = 'primary' | 'secondary' | 'ghost' | 'glass';
5
+ type ButtonIconPosition = 'start' | 'end';
6
+ interface ButtonLookProps {
5
7
  children: ReactNode;
6
- /** Visual treatment. */
7
- tone?: 'primary' | 'secondary' | 'ghost';
8
+ /**
9
+ * Visual treatment. `glass` is the secondary button frosted for a tinted,
10
+ * gradient or image background.
11
+ */
12
+ tone?: ButtonTone;
13
+ /** Icon beside the label, sized to the button's icon slot. */
14
+ icon?: ReactNode;
15
+ /** Side of the label the icon sits on. */
16
+ iconPosition?: ButtonIconPosition;
17
+ }
18
+ type NativeButtonProps = Omit<ButtonHTMLAttributes<HTMLButtonElement>, 'type' | 'children'>;
19
+ interface ButtonProps extends NativeButtonProps, ButtonLookProps {
8
20
  /** Optional aegis-ui agent action — also wires the agent runtime. */
9
21
  action?: AegisAction<void, unknown>;
10
22
  /** Native HTML button type. */
11
23
  type?: 'button' | 'submit' | 'reset';
12
24
  }
25
+ /** A toggle button passes `aria-pressed`; the pressed state is the inverted fill. */
13
26
  export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLButtonElement>>;
27
+ interface ButtonLinkProps extends ButtonLookProps {
28
+ /** Destination; the control navigates instead of firing a handler. */
29
+ to: string;
30
+ /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */
31
+ linkComponent?: LinkComponent;
32
+ className?: string;
33
+ }
34
+ /** A link that looks like a Button, for actions that open another page. */
35
+ export declare function ButtonLink({ to, children, tone, icon, iconPosition, linkComponent, className, }: ButtonLinkProps): import("react/jsx-runtime").JSX.Element;
14
36
  export {};
@@ -0,0 +1,28 @@
1
+ import { ReactNode } from 'react';
2
+ export interface CarouselSlide {
3
+ key: string;
4
+ /** Name shown in the tab row under the slides. */
5
+ label: ReactNode;
6
+ content: ReactNode;
7
+ }
8
+ export interface CarouselProps {
9
+ slides: CarouselSlide[];
10
+ /** Accessible name of the carousel region. */
11
+ ariaLabel: string;
12
+ /** Key of the slide shown; omit it to let the carousel track the slide. */
13
+ activeKey?: string;
14
+ /** Key of the slide shown first when `activeKey` is omitted; defaults to the first slide. */
15
+ defaultActiveKey?: string;
16
+ /** Fires with a slide's key when a tab is chosen and when autoplay moves to the next slide. */
17
+ onChange?: (key: string) => void;
18
+ className?: string;
19
+ }
20
+ /**
21
+ * Slides with a named tab row under them. The current tab's progress bar
22
+ * fills over `--carousel-dwell`, then the next slide shows. Autoplay pauses
23
+ * on hover, on focus within and while the page is hidden, stops at the
24
+ * pause button until it is pressed again, and is off under
25
+ * prefers-reduced-motion, where neither the progress bars nor the button
26
+ * are drawn.
27
+ */
28
+ export declare function Carousel({ slides, ariaLabel, activeKey: controlledKey, defaultActiveKey, onChange, className, }: CarouselProps): import("react/jsx-runtime").JSX.Element;
@@ -7,4 +7,4 @@ interface ChatComposerProps {
7
7
  className?: string;
8
8
  }
9
9
  export declare function ChatComposer({ onSend, sending, placeholder, disabledReason, className, }: ChatComposerProps): import("react/jsx-runtime").JSX.Element;
10
- export default ChatComposer;
10
+ export {};
@@ -1,18 +1,11 @@
1
1
  import { ReactNode } from 'react';
2
2
  import { AgentMessageRole } from '../../agent/agentContext';
3
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
4
- export interface ChatMessageSurface {
5
- id: string;
6
- kind?: SurfaceKind;
7
- label?: string;
8
- project: (data: {
9
- role: AgentMessageRole;
10
- content: ReactNode;
11
- timestamp?: string;
12
- }) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
13
- askSuggestions?: string[];
14
- ask?: boolean;
15
- }
3
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
4
+ export type ChatMessageSurface = PrimitiveSurface<{
5
+ role: AgentMessageRole;
6
+ content: ReactNode;
7
+ timestamp?: string;
8
+ }>;
16
9
  interface ChatMessageProps {
17
10
  role: AgentMessageRole;
18
11
  content: ReactNode;
@@ -28,4 +21,4 @@ interface ChatMessageProps {
28
21
  surface?: ChatMessageSurface;
29
22
  }
30
23
  export declare function ChatMessage({ role, content, timestamp, avatar, senderName, footer, className, surface, }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
31
- export default ChatMessage;
24
+ export {};
@@ -1,13 +1,6 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface ChatMessageListSurface {
4
- id: string;
5
- kind?: SurfaceKind;
6
- label?: string;
7
- project: (count: number) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
8
- askSuggestions?: string[];
9
- ask?: boolean;
10
- }
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
+ export type ChatMessageListSurface = PrimitiveSurface<number>;
11
4
  interface ChatMessageListProps {
12
5
  children: ReactNode;
13
6
  /** Auto-scroll to bottom on children change. Default: true. */
@@ -20,4 +13,4 @@ interface ChatMessageListProps {
20
13
  surface?: ChatMessageListSurface;
21
14
  }
22
15
  export declare function ChatMessageList({ children, autoScroll, header, footer, className, surface, }: ChatMessageListProps): import("react/jsx-runtime").JSX.Element;
23
- export default ChatMessageList;
16
+ export {};
@@ -19,4 +19,3 @@ export interface ChatSessionListProps {
19
19
  className?: string;
20
20
  }
21
21
  export declare function ChatSessionList({ items, onSelect, onRename, onDelete, density, emptyState, className, }: ChatSessionListProps): ReactElement;
22
- export default ChatSessionList;
@@ -0,0 +1,47 @@
1
+ import { ReactNode } from 'react';
2
+ /**
3
+ * One check in one run. `missed` carries how far the run fell short, e.g.
4
+ * "−0.80" or "replica"; `unchecked` (the check never ran, e.g. after a
5
+ * failed gate) shows an em dash.
6
+ */
7
+ export type CheckGridCell = {
8
+ state: 'passed';
9
+ } | {
10
+ state: 'missed';
11
+ value: string;
12
+ } | {
13
+ state: 'unchecked';
14
+ };
15
+ export interface CheckGridColumn<C extends string> {
16
+ key: C;
17
+ /** Column header, e.g. "运行 1". */
18
+ label: ReactNode;
19
+ }
20
+ export interface CheckGridRow<C extends string> {
21
+ key: string;
22
+ /** Row header, e.g. the check's id. */
23
+ label: ReactNode;
24
+ /** The check's outcome in every column, keyed by column key. */
25
+ cells: Readonly<Record<C, CheckGridCell>>;
26
+ }
27
+ export interface CheckGridProps<C extends string> {
28
+ /** Runs, left to right. */
29
+ columns: Array<CheckGridColumn<C>>;
30
+ /** Checks, top to bottom. */
31
+ rows: Array<CheckGridRow<C>>;
32
+ /** Header over the row labels, e.g. "检查". */
33
+ rowHeader: ReactNode;
34
+ /** Text of every passed cell, e.g. "通过". */
35
+ passedLabel: string;
36
+ /** Read out in place of an unchecked cell's em dash, e.g. "未检查". */
37
+ uncheckedLabel: string;
38
+ /** Note under the grid, e.g. "图 1 · …". */
39
+ caption?: ReactNode;
40
+ className?: string;
41
+ }
42
+ /**
43
+ * Checks against runs: one row per check, one column per run. Every cell
44
+ * writes its outcome — the passed label, the miss, or an em dash — so the
45
+ * colour is never the only signal.
46
+ */
47
+ export declare function CheckGrid<C extends string>({ columns, rows, rowHeader, passedLabel, uncheckedLabel, caption, className, }: CheckGridProps<C>): import("react/jsx-runtime").JSX.Element;
@@ -0,0 +1,14 @@
1
+ import { ReactNode } from 'react';
2
+ interface CheckboxProps {
3
+ checked: boolean;
4
+ onChange: (checked: boolean) => void;
5
+ label?: ReactNode;
6
+ /** Mixed state for a parent checkbox whose children are partially selected. */
7
+ indeterminate?: boolean;
8
+ disabled?: boolean;
9
+ /** Accessible name for checkboxes whose label is not visible, e.g. row selectors. */
10
+ ariaLabel?: string;
11
+ className?: string;
12
+ }
13
+ export declare function Checkbox({ checked, onChange, label, indeterminate, disabled, ariaLabel, className, }: CheckboxProps): import("react/jsx-runtime").JSX.Element;
14
+ export {};
@@ -1,22 +1,25 @@
1
1
  import { ReactNode } from 'react';
2
- import { SurfaceKind, SurfaceSnapshot } from '../../agent/types';
3
- export interface ChipSurface {
4
- id: string;
5
- kind?: SurfaceKind;
6
- label?: string;
7
- project: (children: ReactNode) => Pick<SurfaceSnapshot, 'entities' | 'fields'>;
8
- askSuggestions?: string[];
9
- ask?: boolean;
10
- }
2
+ import { PrimitiveSurface } from '../../agent/usePrimitiveSurface';
3
+ export type ChipSurface = PrimitiveSurface<ReactNode>;
11
4
  interface ChipProps {
12
5
  children: ReactNode;
13
- /** Visual treatment. */
14
- tone?: 'default' | 'ink' | 'warning' | 'ghost';
15
- /** Optional leading dot/icon node. */
6
+ /**
7
+ * Visual treatment. `warning` is the anomaly tone — a failed check or a
8
+ * rejected run belongs there, not on decorative labels.
9
+ */
10
+ tone?: 'default' | 'ink' | 'warning' | 'success' | 'info' | 'caution' | 'ghost';
11
+ /**
12
+ * `sm` is 20 high with the micro type role; `md` and `lg` are 28 high
13
+ * with the label role, `lg` without vertical padding.
14
+ */
15
+ size?: 'sm' | 'md' | 'lg';
16
+ /** Optional leading dot or icon; icons render at `--size-icon-sm`. */
16
17
  leading?: ReactNode;
17
18
  className?: string;
18
19
  onClick?: () => void;
20
+ /** Renders a trailing dismiss control, e.g. for removable filter chips. */
21
+ onClose?: () => void;
19
22
  surface?: ChipSurface;
20
23
  }
21
- export declare function Chip({ children, tone, leading, className, onClick, surface, }: ChipProps): import("react/jsx-runtime").JSX.Element;
22
- export default Chip;
24
+ export declare function Chip({ children, tone, size, leading, className, onClick, onClose, surface, }: ChipProps): import("react/jsx-runtime").JSX.Element;
25
+ export {};