@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
@@ -2,4 +2,4 @@
2
2
  * Short, human-friendly relative time. Mirrors the conventions used in
3
3
  * inbox-style UIs ("just now", "5m", "2h", "yesterday", "Mon", "Mar 4").
4
4
  */
5
- export declare function relativeTime(iso: string, now?: number): string;
5
+ export declare function relativeTime(value: string | number | Date, now?: number): string;
@@ -0,0 +1,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;
@@ -0,0 +1,5 @@
1
+ import { ReactNode } from 'react';
2
+ import { TraceSpan } from './TraceTree';
3
+ export declare function formatDuration(ms: number): string;
4
+ export declare function statusTone(status?: TraceSpan['status']): 'warning' | 'ink' | 'muted';
5
+ export declare function nodeToString(node: ReactNode): string;
@@ -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';
@@ -0,0 +1,8 @@
1
+ export interface UseCopyToClipboardResult {
2
+ /** True for `resetMs` after a successful copy. */
3
+ copied: boolean;
4
+ /** Resolves false when the browser refuses the copy. */
5
+ copy: (text: string) => Promise<boolean>;
6
+ reset: () => void;
7
+ }
8
+ export declare function useCopyToClipboard(resetMs: number): UseCopyToClipboardResult;
@@ -0,0 +1,3 @@
1
+ import { RefObject } from 'react';
2
+ /** Content-box width of `ref`'s element in CSS px, kept current on resize. */
3
+ export declare function useElementWidth(ref: RefObject<HTMLElement>): number;
@@ -0,0 +1,2 @@
1
+ /** Tracks whether `query` (e.g. `(max-width: 768px)`) currently matches. */
2
+ export declare function useMediaQuery(query: string): boolean;
@@ -0,0 +1,27 @@
1
+ import { KeyboardEvent, RefObject } from 'react';
2
+ import { PopoverProps } from 'antd';
3
+ /**
4
+ * Flip on either axis, then slide along the trigger to stay on screen. antd's
5
+ * `AdjustOverflow` type omits `shiftX`, but antd hands the object through to
6
+ * rc-trigger, which supports it — without it a wide menu opened from the
7
+ * middle of a phone screen runs off the edge.
8
+ */
9
+ export declare const MENU_OVERFLOW: PopoverProps["autoAdjustOverflow"];
10
+ export interface MenuPopover<P extends HTMLElement> {
11
+ open: boolean;
12
+ setOpen: (open: boolean) => void;
13
+ /** Closes the menu and hands focus back to the trigger. */
14
+ close: () => void;
15
+ triggerRef: RefObject<HTMLButtonElement>;
16
+ panelRef: RefObject<P>;
17
+ onTriggerKeyDown: (event: KeyboardEvent<HTMLButtonElement>) => void;
18
+ onPanelKeyDown: (event: KeyboardEvent<HTMLElement>) => void;
19
+ }
20
+ /**
21
+ * Open state and keyboard handling for a click-triggered menu rendered in
22
+ * an antd `Popover`. The popover portals to `document.body`, so focus is
23
+ * moved into the panel on open (the selected option, else the first
24
+ * input or button) and handed back to the trigger on Escape, Tab and
25
+ * item activation.
26
+ */
27
+ export declare function useMenuPopover<P extends HTMLElement>(): MenuPopover<P>;
@@ -0,0 +1,2 @@
1
+ /** Tracks whether the document is hidden (a background tab or minimised). */
2
+ export declare function usePageHidden(): boolean;
@@ -6,10 +6,19 @@ export interface UseResizableOptions {
6
6
  side: 'left' | 'right';
7
7
  persistKey?: string;
8
8
  onCollapse?: () => void;
9
+ /** Width change per arrow-key press, in px. */
10
+ keyboardStep?: number;
11
+ /**
12
+ * Narrows a proposed width after the min/max clamp, e.g. so a neighbouring
13
+ * pane keeps its own minimum. The result is clamped to min/max again.
14
+ */
15
+ constrainWidth?: (width: number) => number;
9
16
  }
10
17
  export interface UseResizableReturn {
11
18
  width: number;
12
19
  handleProps: HTMLAttributes<HTMLDivElement>;
13
20
  isDragging: boolean;
21
+ /** Restores `initialWidth`, clamped and constrained like any other change. */
22
+ reset: () => void;
14
23
  }
15
24
  export declare function useResizable(opts: UseResizableOptions): UseResizableReturn;