@lincyaw/aegis-ui 0.3.0 → 0.5.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 (120) hide show
  1. package/README.md +81 -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/AuthLayout.d.ts +1 -1
  13. package/dist/components/ui/Avatar.d.ts +6 -13
  14. package/dist/components/ui/BlastRadiusBar.d.ts +6 -13
  15. package/dist/components/ui/Breadcrumb.d.ts +1 -1
  16. package/dist/components/ui/BucketCard.d.ts +1 -1
  17. package/dist/components/ui/ChatComposer.d.ts +1 -1
  18. package/dist/components/ui/ChatMessage.d.ts +7 -14
  19. package/dist/components/ui/ChatMessageList.d.ts +3 -10
  20. package/dist/components/ui/ChatSessionList.d.ts +0 -1
  21. package/dist/components/ui/Chip.d.ts +3 -10
  22. package/dist/components/ui/CodeBlock.d.ts +8 -14
  23. package/dist/components/ui/CodeEditor.d.ts +6 -13
  24. package/dist/components/ui/CommandInvocationCard.d.ts +7 -14
  25. package/dist/components/ui/CommandPalette.d.ts +0 -1
  26. package/dist/components/ui/ContentInspectorContent.d.ts +14 -0
  27. package/dist/components/ui/ContentInspectorDialog.d.ts +15 -0
  28. package/dist/components/ui/ControlListItem.d.ts +1 -1
  29. package/dist/components/ui/DangerZone.d.ts +1 -1
  30. package/dist/components/ui/DataList.d.ts +3 -11
  31. package/dist/components/ui/DataTable.d.ts +27 -11
  32. package/dist/components/ui/DiffViewer.d.ts +6 -13
  33. package/dist/components/ui/DropdownMenu.d.ts +6 -2
  34. package/dist/components/ui/EmptyState.d.ts +1 -1
  35. package/dist/components/ui/EnvironmentSwitcher.d.ts +0 -1
  36. package/dist/components/ui/ErrorState.d.ts +8 -2
  37. package/dist/components/ui/EventTable.d.ts +0 -1
  38. package/dist/components/ui/FileDropzone.d.ts +1 -1
  39. package/dist/components/ui/FilePreview.d.ts +8 -15
  40. package/dist/components/ui/FolderDropzone.d.ts +0 -1
  41. package/dist/components/ui/ForgotPasswordForm.d.ts +1 -1
  42. package/dist/components/ui/FormRow.d.ts +1 -1
  43. package/dist/components/ui/InboxPage.d.ts +3 -10
  44. package/dist/components/ui/KeyValueList.d.ts +3 -10
  45. package/dist/components/ui/LoginForm.d.ts +1 -1
  46. package/dist/components/ui/Markdown.d.ts +9 -3
  47. package/dist/components/ui/MetadataList.d.ts +0 -1
  48. package/dist/components/ui/MetricCard.d.ts +7 -14
  49. package/dist/components/ui/MetricLabel.d.ts +1 -1
  50. package/dist/components/ui/MonoValue.d.ts +3 -10
  51. package/dist/components/ui/NotificationBell.d.ts +1 -1
  52. package/dist/components/ui/ObjectBrowser.d.ts +1 -1
  53. package/dist/components/ui/ObjectInspector.d.ts +0 -1
  54. package/dist/components/ui/PageHeader.d.ts +1 -1
  55. package/dist/components/ui/PageSizeSelect.d.ts +8 -2
  56. package/dist/components/ui/Panel.d.ts +3 -10
  57. package/dist/components/ui/PanelTitle.d.ts +1 -1
  58. package/dist/components/ui/ParquetViewer.d.ts +8 -15
  59. package/dist/components/ui/PasswordField.d.ts +1 -1
  60. package/dist/components/ui/ProjectSelector.d.ts +8 -2
  61. package/dist/components/ui/QueryAutocomplete.d.ts +0 -1
  62. package/dist/components/ui/RegisterForm.d.ts +1 -1
  63. package/dist/components/ui/ResizableSidePanel.d.ts +17 -2
  64. package/dist/components/ui/SavedQueryBar.d.ts +0 -1
  65. package/dist/components/ui/SearchInput.d.ts +0 -1
  66. package/dist/components/ui/SectionDivider.d.ts +1 -1
  67. package/dist/components/ui/SessionRunView.d.ts +50 -0
  68. package/dist/components/ui/SettingsSection.d.ts +1 -1
  69. package/dist/components/ui/ShareLinkDialog.d.ts +1 -1
  70. package/dist/components/ui/SparkLine.d.ts +3 -10
  71. package/dist/components/ui/StatBlock.d.ts +7 -14
  72. package/dist/components/ui/StatusDot.d.ts +1 -1
  73. package/dist/components/ui/Tabs.d.ts +1 -1
  74. package/dist/components/ui/Terminal.d.ts +3 -10
  75. package/dist/components/ui/TextField.d.ts +1 -1
  76. package/dist/components/ui/TimeDisplay.d.ts +3 -3
  77. package/dist/components/ui/TimeRangePicker.d.ts +0 -1
  78. package/dist/components/ui/Timeline.d.ts +3 -10
  79. package/dist/components/ui/ToolCallCard.d.ts +3 -10
  80. package/dist/components/ui/Toolbar.d.ts +0 -1
  81. package/dist/components/ui/TraceSpanInspector.d.ts +12 -0
  82. package/dist/components/ui/TraceTree.d.ts +9 -11
  83. package/dist/components/ui/TrajectoryStep.d.ts +3 -10
  84. package/dist/components/ui/TrajectoryTimeline.d.ts +2 -10
  85. package/dist/components/ui/UploadQueue.d.ts +1 -1
  86. package/dist/components/ui/index.d.ts +10 -1
  87. package/dist/components/ui/relativeTime.d.ts +1 -1
  88. package/dist/components/ui/traceFormat.d.ts +5 -0
  89. package/dist/hooks/useCopyToClipboard.d.ts +8 -0
  90. package/dist/hooks/useMenuPopover.d.ts +27 -0
  91. package/dist/hooks/useResizable.d.ts +9 -0
  92. package/dist/index.cjs +12 -1
  93. package/dist/index.cjs.map +1 -1
  94. package/dist/index.d.ts +4 -3
  95. package/dist/index.js +9848 -124
  96. package/dist/index.js.map +1 -1
  97. package/dist/layouts/shell/AegisShell.d.ts +1 -1
  98. package/dist/layouts/shell/AuthRequiredCard.d.ts +2 -2
  99. package/dist/layouts/shell/TopHeader.d.ts +5 -1
  100. package/dist/layouts/shell/paths.d.ts +8 -0
  101. package/dist/layouts/shell/types.d.ts +21 -13
  102. package/dist/lib/format.d.ts +2 -0
  103. package/dist/lib/id.d.ts +2 -0
  104. package/dist/lib/storage.d.ts +12 -0
  105. package/dist/style.css +1 -1
  106. package/dist/theme/antdTheme.d.ts +2 -3
  107. package/package.json +24 -17
  108. package/dist/index-6WZzHI2Z.cjs +0 -1151
  109. package/dist/index-6WZzHI2Z.cjs.map +0 -1
  110. package/dist/index-CZ_qegBG.js +0 -6736
  111. package/dist/index-CZ_qegBG.js.map +0 -1
  112. package/dist/index-DLXAAlfH.cjs +0 -15
  113. package/dist/index-DLXAAlfH.cjs.map +0 -1
  114. package/dist/index-DtgBxtmy.js +0 -56284
  115. package/dist/index-DtgBxtmy.js.map +0 -1
  116. package/dist/styles/fonts.d.ts +0 -0
  117. package/dist/workerBundle-D52AeOj1.js +0 -76
  118. package/dist/workerBundle-D52AeOj1.js.map +0 -1
  119. package/dist/workerBundle-FGNDqtbW.cjs +0 -73
  120. package/dist/workerBundle-FGNDqtbW.cjs.map +0 -1
@@ -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, }: AegisShellProps): ReactElement;
11
+ export declare function AegisShell({ brand, apps, rootRoutes, fallbackPath, notFoundElement, user, userMenu, headerCenter, headerActions, inboxPath, onAppSwitch, enableCommandPalette, agentPanel, }: AegisShellProps): ReactElement;
@@ -1,9 +1,9 @@
1
1
  import { ReactElement } from 'react';
2
- import { AegisAuthUser } from '../../auth';
2
+ import { AegisAuthUser, AuthStatus } from '../../auth';
3
3
  import { AegisApp } from './types';
4
4
  interface AuthRequiredCardProps {
5
5
  app: AegisApp;
6
- status: 'loading' | 'authenticated' | 'unauthenticated';
6
+ status: AuthStatus;
7
7
  user: AegisAuthUser | null;
8
8
  onSignIn?: () => void;
9
9
  }
@@ -28,6 +28,10 @@ interface TopHeaderProps {
28
28
  inlineSlotRef?: (node: HTMLDivElement | null) => void;
29
29
  /** When true, hide the global `headerCenter` (an app header took it over). */
30
30
  inlineSlotActive?: boolean;
31
+ /** Current agent panel state — drives aria-pressed on its toggle. */
32
+ agentPanelOpen?: boolean;
33
+ /** Fired by the agent panel toggle; the toggle renders only when set. */
34
+ onAgentPanelToggle?: () => void;
31
35
  }
32
- export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, }: TopHeaderProps): ReactElement;
36
+ export declare function TopHeader({ brand, apps, activeAppId, onAppSwitch, user, headerCenter, headerActions, inboxPath, onMobileMenuToggle, showMobileMenu, sidebarCollapsible, sidebarCollapsed, onSidebarToggle, inlineSlotRef, inlineSlotActive, agentPanelOpen, onAgentPanelToggle, }: TopHeaderProps): ReactElement;
33
37
  export {};
@@ -0,0 +1,8 @@
1
+ /** Strips trailing slashes, so an app mounted at `/` has the basePath `''`. */
2
+ export declare function normalizeBasePath(basePath: string): string;
3
+ /**
4
+ * Resolves an app-relative path against a basePath. Leading slashes on
5
+ * `rel` are app-root-relative, and an empty `rel` is the app root (`/` for
6
+ * an app mounted at the root).
7
+ */
8
+ export declare function joinPath(basePath: string, rel: string): string;
@@ -40,9 +40,10 @@ export interface AegisApp {
40
40
  /** Optional inner sidebar shown when this app is active. */
41
41
  sidebar?: AegisAppNavGroup[];
42
42
  /**
43
- * Optional sub-header rendered between the shell's `TopHeader` and the
44
- * page content. Use for app-scoped toolbars, tab nav, filters, etc.
45
- * Sticky by default so it stays in view while the page scrolls.
43
+ * Optional app header rendered in the centre of the shell's sticky top
44
+ * header, in place of `headerCenter`. Use for app-scoped toolbars, tab
45
+ * nav, a project switcher, etc. At ≤768 px it wraps onto its own
46
+ * full-width row under the brand and actions.
46
47
  *
47
48
  * Rendered inside `wrap`, so it can read from the app's Context.
48
49
  */
@@ -66,8 +67,12 @@ export interface AegisApp {
66
67
  */
67
68
  hidden?: boolean;
68
69
  /**
69
- * Commands exposed by this app. Registered by AegisShell when this
70
- * app becomes active. (Contract only — wiring is a separate task.)
70
+ * Commands this app contributes to the <CommandProvider/> registry.
71
+ * AegisShell registers them for every app the current user can see,
72
+ * with `scope` overwritten to this app's id: the palette and keyboard
73
+ * shortcuts surface them only while this app is active, agents see
74
+ * them all via `allCommands`. Register app-independent commands with
75
+ * `useRegisterCommands` above the shell instead.
71
76
  */
72
77
  commands?: Command[];
73
78
  /**
@@ -157,17 +162,20 @@ export interface AegisShellProps {
157
162
  /** Fired when the user navigates between apps. */
158
163
  onAppSwitch?: (appId: string) => void;
159
164
  /**
160
- * When true, AegisShell mounts <CommandPalette/> and threads
161
- * active-app scope into the command registry. Requires
162
- * <CommandProvider/> above the shell. (Contract only — wiring is a
163
- * separate task.)
165
+ * When true, AegisShell mounts <CommandPalette/>, opened and closed by
166
+ * the provider's mod+k (⌘K / Ctrl+K) binding. It lists the active app's
167
+ * commands plus unscoped ones. Requires <CommandProvider/> above the
168
+ * shell; without one the palette is not mounted and a warning is logged.
169
+ * Don't also render <CommandPalette/> yourself.
164
170
  */
165
171
  enableCommandPalette?: boolean;
166
172
  /**
167
- * When provided, AegisShell renders the node as a collapsible right-side
168
- * panel (typically <AgentPanel/> filled with messages from useAgent()).
169
- * The open state is owned by the host (read via the agent context's
170
- * panelOpen field). Requires <AgentProvider/> above the shell.
173
+ * When provided, AegisShell renders the node (typically <AgentPanel/>
174
+ * filled from useAgent()) as a right-side column while the agent
175
+ * context's `panelOpen` is true — at ≤768 px as an overlay below the
176
+ * header. A header toggle flips it through `setPanelOpen`. Requires
177
+ * <AgentProvider/> above the shell; without one nothing renders and a
178
+ * warning is logged.
171
179
  */
172
180
  agentPanel?: ReactNode;
173
181
  }
@@ -0,0 +1,2 @@
1
+ /** Formats a byte count in binary units: `512 B`, `1.5 KB`, `12 MB`. */
2
+ export declare function formatBytes(n: number): string;
@@ -0,0 +1,2 @@
1
+ /** Returns `<prefix>-<time>-<random>`, unique enough for client-side ids. */
2
+ export declare function uniqueId(prefix: string): string;
@@ -0,0 +1,12 @@
1
+ export type StorageArea = 'local' | 'session';
2
+ /** Reads a key, returning null when storage is missing, blocked or empty. */
3
+ export declare function readStorage(key: string, area?: StorageArea): string | null;
4
+ /** Writes a key; failures (private mode, quota) are ignored. */
5
+ export declare function writeStorage(key: string, value: string, area?: StorageArea): void;
6
+ export declare function removeStorage(key: string, area?: StorageArea): void;
7
+ /**
8
+ * Returns the value stored under `key`, creating and storing it with
9
+ * `create` on first use. Falls back to an unstored value when storage is
10
+ * unavailable.
11
+ */
12
+ export declare function getOrCreateStored(key: string, create: () => string, area?: StorageArea): string;