@lincyaw/aegis-ui 0.6.0 → 0.7.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/dist/agent/ask/AskOverlay.cjs +2 -0
- package/dist/agent/ask/AskOverlay.cjs.map +1 -0
- package/dist/agent/ask/AskOverlay.js +83 -0
- package/dist/agent/ask/AskOverlay.js.map +1 -0
- package/dist/agent/ask/AskPanel.cjs +2 -0
- package/dist/agent/ask/AskPanel.cjs.map +1 -0
- package/dist/agent/{AskPanel.d.ts → ask/AskPanel.d.ts} +1 -1
- package/dist/agent/ask/AskPanel.js +174 -0
- package/dist/agent/ask/AskPanel.js.map +1 -0
- package/dist/agent/ask/buildAskContext.cjs +2 -0
- package/dist/agent/ask/buildAskContext.cjs.map +1 -0
- package/dist/agent/{buildAskContext.d.ts → ask/buildAskContext.d.ts} +2 -2
- package/dist/agent/ask/buildAskContext.js +22 -0
- package/dist/agent/ask/buildAskContext.js.map +1 -0
- package/dist/agent/chat/AgentChatProvider.cjs +2 -0
- package/dist/agent/chat/AgentChatProvider.cjs.map +1 -0
- package/dist/agent/{AgentProvider.d.ts → chat/AgentChatProvider.d.ts} +4 -4
- package/dist/agent/chat/AgentChatProvider.js +26 -0
- package/dist/agent/chat/AgentChatProvider.js.map +1 -0
- package/dist/agent/chat/chat.cjs +2 -0
- package/dist/agent/chat/chat.cjs.map +1 -0
- package/dist/agent/{agentContext.d.ts → chat/chat.d.ts} +5 -6
- package/dist/agent/chat/chat.js +14 -0
- package/dist/agent/chat/chat.js.map +1 -0
- package/dist/agent/chat/useAgentChat.cjs +2 -0
- package/dist/agent/chat/useAgentChat.cjs.map +1 -0
- package/dist/agent/chat/useAgentChat.d.ts +7 -0
- package/dist/agent/chat/useAgentChat.js +9 -0
- package/dist/agent/chat/useAgentChat.js.map +1 -0
- package/dist/agent/core/AegisRuntimeProvider.cjs +2 -0
- package/dist/agent/core/AegisRuntimeProvider.cjs.map +1 -0
- package/dist/agent/core/AegisRuntimeProvider.d.ts +32 -0
- package/dist/agent/core/AegisRuntimeProvider.js +35 -0
- package/dist/agent/core/AegisRuntimeProvider.js.map +1 -0
- package/dist/agent/core/aegisRuntimeContext.cjs +2 -0
- package/dist/agent/core/aegisRuntimeContext.cjs.map +1 -0
- package/dist/agent/core/aegisRuntimeContext.d.ts +6 -0
- package/dist/agent/core/aegisRuntimeContext.js +6 -0
- package/dist/agent/core/aegisRuntimeContext.js.map +1 -0
- package/dist/agent/core/hooks.cjs +2 -0
- package/dist/agent/core/hooks.cjs.map +1 -0
- package/dist/agent/core/hooks.js +83 -0
- package/dist/agent/core/hooks.js.map +1 -0
- package/dist/agent/core/mcpToolCatalogue.cjs +2 -0
- package/dist/agent/core/mcpToolCatalogue.cjs.map +1 -0
- package/dist/agent/core/mcpToolCatalogue.js +101 -0
- package/dist/agent/core/mcpToolCatalogue.js.map +1 -0
- package/dist/agent/core/runtime.cjs +2 -0
- package/dist/agent/core/runtime.cjs.map +1 -0
- package/dist/agent/{runtime.d.ts → core/runtime.d.ts} +3 -7
- package/dist/agent/core/runtime.js +391 -0
- package/dist/agent/core/runtime.js.map +1 -0
- package/dist/agent/core/usePrimitiveSurface.cjs +2 -0
- package/dist/agent/core/usePrimitiveSurface.cjs.map +1 -0
- package/dist/agent/core/usePrimitiveSurface.js +21 -0
- package/dist/agent/core/usePrimitiveSurface.js.map +1 -0
- package/dist/agent/index.d.ts +14 -17
- package/dist/auth/AuthProvider.cjs +2 -0
- package/dist/auth/AuthProvider.cjs.map +1 -0
- package/dist/auth/AuthProvider.js +12 -0
- package/dist/auth/AuthProvider.js.map +1 -0
- package/dist/auth/RequireAuth.cjs +2 -0
- package/dist/auth/RequireAuth.cjs.map +1 -0
- package/dist/auth/RequireAuth.js +15 -0
- package/dist/auth/RequireAuth.js.map +1 -0
- package/dist/auth/authContext.cjs +2 -0
- package/dist/auth/authContext.cjs.map +1 -0
- package/dist/auth/authContext.js +12 -0
- package/dist/auth/authContext.js.map +1 -0
- package/dist/auth/useAuth.cjs +2 -0
- package/dist/auth/useAuth.cjs.map +1 -0
- package/dist/auth/useAuth.js +9 -0
- package/dist/auth/useAuth.js.map +1 -0
- package/dist/commands/CommandProvider.cjs +2 -0
- package/dist/commands/CommandProvider.cjs.map +1 -0
- package/dist/commands/CommandProvider.js +76 -0
- package/dist/commands/CommandProvider.js.map +1 -0
- package/dist/commands/commandContext.cjs +2 -0
- package/dist/commands/commandContext.cjs.map +1 -0
- package/dist/commands/commandContext.d.ts +1 -1
- package/dist/commands/commandContext.js +20 -0
- package/dist/commands/commandContext.js.map +1 -0
- package/dist/commands/shortcut.cjs +2 -0
- package/dist/commands/shortcut.cjs.map +1 -0
- package/dist/commands/shortcut.js +62 -0
- package/dist/commands/shortcut.js.map +1 -0
- package/dist/commands/useCommands.cjs +2 -0
- package/dist/commands/useCommands.cjs.map +1 -0
- package/dist/commands/useCommands.js +9 -0
- package/dist/commands/useCommands.js.map +1 -0
- package/dist/commands/useRegisterCommands.cjs +2 -0
- package/dist/commands/useRegisterCommands.cjs.map +1 -0
- package/dist/commands/useRegisterCommands.js +12 -0
- package/dist/commands/useRegisterCommands.js.map +1 -0
- package/dist/components/ui/AgentPanel.cjs +2 -0
- package/dist/components/ui/AgentPanel.cjs.map +1 -0
- package/dist/components/ui/AgentPanel.d.ts +1 -1
- package/dist/components/ui/AgentPanel.js +35 -0
- package/dist/components/ui/AgentPanel.js.map +1 -0
- package/dist/components/ui/Alert.cjs +2 -0
- package/dist/components/ui/Alert.cjs.map +1 -0
- package/dist/components/ui/Alert.js +29 -0
- package/dist/components/ui/Alert.js.map +1 -0
- package/dist/components/ui/AmbientBackground.cjs +2 -0
- package/dist/components/ui/AmbientBackground.cjs.map +1 -0
- package/dist/components/ui/AmbientBackground.js +24 -0
- package/dist/components/ui/AmbientBackground.js.map +1 -0
- package/dist/components/ui/AuthLayout.cjs +2 -0
- package/dist/components/ui/AuthLayout.cjs.map +1 -0
- package/dist/components/ui/AuthLayout.js +27 -0
- package/dist/components/ui/AuthLayout.js.map +1 -0
- package/dist/components/ui/Avatar.cjs +2 -0
- package/dist/components/ui/Avatar.cjs.map +1 -0
- package/dist/components/ui/Avatar.d.ts +1 -1
- package/dist/components/ui/Avatar.js +55 -0
- package/dist/components/ui/Avatar.js.map +1 -0
- package/dist/components/ui/BlastRadiusBar.cjs +2 -0
- package/dist/components/ui/BlastRadiusBar.cjs.map +1 -0
- package/dist/components/ui/BlastRadiusBar.d.ts +1 -1
- package/dist/components/ui/BlastRadiusBar.js +46 -0
- package/dist/components/ui/BlastRadiusBar.js.map +1 -0
- package/dist/components/ui/Breadcrumb.cjs +2 -0
- package/dist/components/ui/Breadcrumb.cjs.map +1 -0
- package/dist/components/ui/Breadcrumb.js +29 -0
- package/dist/components/ui/Breadcrumb.js.map +1 -0
- package/dist/components/ui/BucketCard.cjs +2 -0
- package/dist/components/ui/BucketCard.cjs.map +1 -0
- package/dist/components/ui/BucketCard.js +73 -0
- package/dist/components/ui/BucketCard.js.map +1 -0
- package/dist/components/ui/Button.cjs +2 -0
- package/dist/components/ui/Button.cjs.map +1 -0
- package/dist/components/ui/Button.d.ts +1 -1
- package/dist/components/ui/Button.js +73 -0
- package/dist/components/ui/Button.js.map +1 -0
- package/dist/components/ui/Carousel.cjs +2 -0
- package/dist/components/ui/Carousel.cjs.map +1 -0
- package/dist/components/ui/Carousel.js +112 -0
- package/dist/components/ui/Carousel.js.map +1 -0
- package/dist/components/ui/ChatComposer.cjs +2 -0
- package/dist/components/ui/ChatComposer.cjs.map +1 -0
- package/dist/components/ui/ChatComposer.js +63 -0
- package/dist/components/ui/ChatComposer.js.map +1 -0
- package/dist/components/ui/ChatMessage.cjs +2 -0
- package/dist/components/ui/ChatMessage.cjs.map +1 -0
- package/dist/components/ui/ChatMessage.d.ts +2 -2
- package/dist/components/ui/ChatMessage.js +36 -0
- package/dist/components/ui/ChatMessage.js.map +1 -0
- package/dist/components/ui/ChatMessageList.cjs +2 -0
- package/dist/components/ui/ChatMessageList.cjs.map +1 -0
- package/dist/components/ui/ChatMessageList.d.ts +1 -1
- package/dist/components/ui/ChatMessageList.js +35 -0
- package/dist/components/ui/ChatMessageList.js.map +1 -0
- package/dist/components/ui/ChatSessionList.cjs +2 -0
- package/dist/components/ui/ChatSessionList.cjs.map +1 -0
- package/dist/components/ui/ChatSessionList.js +232 -0
- package/dist/components/ui/ChatSessionList.js.map +1 -0
- package/dist/components/ui/CheckGrid.cjs +2 -0
- package/dist/components/ui/CheckGrid.cjs.map +1 -0
- package/dist/components/ui/CheckGrid.js +69 -0
- package/dist/components/ui/CheckGrid.js.map +1 -0
- package/dist/components/ui/Checkbox.cjs +2 -0
- package/dist/components/ui/Checkbox.cjs.map +1 -0
- package/dist/components/ui/Checkbox.js +41 -0
- package/dist/components/ui/Checkbox.js.map +1 -0
- package/dist/components/ui/Chip.cjs +2 -0
- package/dist/components/ui/Chip.cjs.map +1 -0
- package/dist/components/ui/Chip.d.ts +1 -1
- package/dist/components/ui/Chip.js +55 -0
- package/dist/components/ui/Chip.js.map +1 -0
- package/dist/components/ui/CodeBlock.cjs +3 -0
- package/dist/components/ui/CodeBlock.cjs.map +1 -0
- package/dist/components/ui/CodeBlock.d.ts +1 -1
- package/dist/components/ui/CodeBlock.js +54 -0
- package/dist/components/ui/CodeBlock.js.map +1 -0
- package/dist/components/ui/CodeEditor.cjs +2 -0
- package/dist/components/ui/CodeEditor.cjs.map +1 -0
- package/dist/components/ui/CodeEditor.d.ts +1 -1
- package/dist/components/ui/CodeEditor.js +119 -0
- package/dist/components/ui/CodeEditor.js.map +1 -0
- package/dist/components/ui/Collapse.cjs +2 -0
- package/dist/components/ui/Collapse.cjs.map +1 -0
- package/dist/components/ui/Collapse.js +52 -0
- package/dist/components/ui/Collapse.js.map +1 -0
- package/dist/components/ui/ColumnLayout.cjs +2 -0
- package/dist/components/ui/ColumnLayout.cjs.map +1 -0
- package/dist/components/ui/ColumnLayout.js +26 -0
- package/dist/components/ui/ColumnLayout.js.map +1 -0
- package/dist/components/ui/CommandInvocationCard.cjs +2 -0
- package/dist/components/ui/CommandInvocationCard.cjs.map +1 -0
- package/dist/components/ui/CommandInvocationCard.d.ts +1 -1
- package/dist/components/ui/CommandInvocationCard.js +65 -0
- package/dist/components/ui/CommandInvocationCard.js.map +1 -0
- package/dist/components/ui/CommandPalette.cjs +2 -0
- package/dist/components/ui/CommandPalette.cjs.map +1 -0
- package/dist/components/ui/CommandPalette.js +147 -0
- package/dist/components/ui/CommandPalette.js.map +1 -0
- package/dist/components/ui/ContentInspectorContent.cjs +5 -0
- package/dist/components/ui/ContentInspectorContent.cjs.map +1 -0
- package/dist/components/ui/ContentInspectorContent.js +101 -0
- package/dist/components/ui/ContentInspectorContent.js.map +1 -0
- package/dist/components/ui/ContentInspectorDialog.cjs +4 -0
- package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -0
- package/dist/components/ui/ContentInspectorDialog.js +211 -0
- package/dist/components/ui/ContentInspectorDialog.js.map +1 -0
- package/dist/components/ui/ControlListItem.cjs +2 -0
- package/dist/components/ui/ControlListItem.cjs.map +1 -0
- package/dist/components/ui/ControlListItem.d.ts +1 -1
- package/dist/components/ui/ControlListItem.js +48 -0
- package/dist/components/ui/ControlListItem.js.map +1 -0
- package/dist/components/ui/DangerZone.cjs +2 -0
- package/dist/components/ui/DangerZone.cjs.map +1 -0
- package/dist/components/ui/DangerZone.js +23 -0
- package/dist/components/ui/DangerZone.js.map +1 -0
- package/dist/components/ui/DataList.cjs +2 -0
- package/dist/components/ui/DataList.cjs.map +1 -0
- package/dist/components/ui/DataList.d.ts +1 -1
- package/dist/components/ui/DataList.js +41 -0
- package/dist/components/ui/DataList.js.map +1 -0
- package/dist/components/ui/DataTable.cjs +2 -0
- package/dist/components/ui/DataTable.cjs.map +1 -0
- package/dist/components/ui/DataTable.d.ts +1 -1
- package/dist/components/ui/DataTable.js +419 -0
- package/dist/components/ui/DataTable.js.map +1 -0
- package/dist/components/ui/Dialog.cjs +2 -0
- package/dist/components/ui/Dialog.cjs.map +1 -0
- package/dist/components/ui/Dialog.js +110 -0
- package/dist/components/ui/Dialog.js.map +1 -0
- package/dist/components/ui/DiffViewer.cjs +2 -0
- package/dist/components/ui/DiffViewer.cjs.map +1 -0
- package/dist/components/ui/DiffViewer.d.ts +1 -1
- package/dist/components/ui/DiffViewer.js +83 -0
- package/dist/components/ui/DiffViewer.js.map +1 -0
- package/dist/components/ui/DropdownMenu.cjs +2 -0
- package/dist/components/ui/DropdownMenu.cjs.map +1 -0
- package/dist/components/ui/DropdownMenu.d.ts +1 -1
- package/dist/components/ui/DropdownMenu.js +104 -0
- package/dist/components/ui/DropdownMenu.js.map +1 -0
- package/dist/components/ui/EmptyState.cjs +2 -0
- package/dist/components/ui/EmptyState.cjs.map +1 -0
- package/dist/components/ui/EmptyState.js +21 -0
- package/dist/components/ui/EmptyState.js.map +1 -0
- package/dist/components/ui/EnvironmentSwitcher.cjs +2 -0
- package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -0
- package/dist/components/ui/EnvironmentSwitcher.d.ts +1 -1
- package/dist/components/ui/EnvironmentSwitcher.js +115 -0
- package/dist/components/ui/EnvironmentSwitcher.js.map +1 -0
- package/dist/components/ui/ErrorState.cjs +2 -0
- package/dist/components/ui/ErrorState.cjs.map +1 -0
- package/dist/components/ui/ErrorState.js +28 -0
- package/dist/components/ui/ErrorState.js.map +1 -0
- package/dist/components/ui/EventTable.cjs +2 -0
- package/dist/components/ui/EventTable.cjs.map +1 -0
- package/dist/components/ui/EventTable.js +184 -0
- package/dist/components/ui/EventTable.js.map +1 -0
- package/dist/components/ui/FileDropzone.cjs +2 -0
- package/dist/components/ui/FileDropzone.cjs.map +1 -0
- package/dist/components/ui/FileDropzone.js +84 -0
- package/dist/components/ui/FileDropzone.js.map +1 -0
- package/dist/components/ui/FilePreview.cjs +2 -0
- package/dist/components/ui/FilePreview.cjs.map +1 -0
- package/dist/components/ui/FilePreview.d.ts +2 -2
- package/dist/components/ui/FilePreview.js +102 -0
- package/dist/components/ui/FilePreview.js.map +1 -0
- package/dist/components/ui/FileTree.cjs +2 -0
- package/dist/components/ui/FileTree.cjs.map +1 -0
- package/dist/components/ui/FileTree.js +159 -0
- package/dist/components/ui/FileTree.js.map +1 -0
- package/dist/components/ui/FolderDropzone.cjs +2 -0
- package/dist/components/ui/FolderDropzone.cjs.map +1 -0
- package/dist/components/ui/FolderDropzone.js +158 -0
- package/dist/components/ui/FolderDropzone.js.map +1 -0
- package/dist/components/ui/ForgotPasswordForm.cjs +2 -0
- package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -0
- package/dist/components/ui/ForgotPasswordForm.js +47 -0
- package/dist/components/ui/ForgotPasswordForm.js.map +1 -0
- package/dist/components/ui/FormRow.cjs +2 -0
- package/dist/components/ui/FormRow.cjs.map +1 -0
- package/dist/components/ui/FormRow.js +21 -0
- package/dist/components/ui/FormRow.js.map +1 -0
- package/dist/components/ui/IdentityCell.cjs +2 -0
- package/dist/components/ui/IdentityCell.cjs.map +1 -0
- package/dist/components/ui/IdentityCell.js +47 -0
- package/dist/components/ui/IdentityCell.js.map +1 -0
- package/dist/components/ui/InboxPage.cjs +2 -0
- package/dist/components/ui/InboxPage.cjs.map +1 -0
- package/dist/components/ui/InboxPage.d.ts +1 -1
- package/dist/components/ui/InboxPage.js +102 -0
- package/dist/components/ui/InboxPage.js.map +1 -0
- package/dist/components/ui/KeyValueList.cjs +2 -0
- package/dist/components/ui/KeyValueList.cjs.map +1 -0
- package/dist/components/ui/KeyValueList.d.ts +1 -1
- package/dist/components/ui/KeyValueList.js +23 -0
- package/dist/components/ui/KeyValueList.js.map +1 -0
- package/dist/components/ui/LoginForm.cjs +2 -0
- package/dist/components/ui/LoginForm.cjs.map +1 -0
- package/dist/components/ui/LoginForm.js +100 -0
- package/dist/components/ui/LoginForm.js.map +1 -0
- package/dist/components/ui/Markdown.cjs +2 -0
- package/dist/components/ui/Markdown.cjs.map +1 -0
- package/dist/components/ui/Markdown.js +82 -0
- package/dist/components/ui/Markdown.js.map +1 -0
- package/dist/components/ui/MdxDocument.cjs +2 -0
- package/dist/components/ui/MdxDocument.cjs.map +1 -0
- package/dist/components/ui/MdxDocument.js +66 -0
- package/dist/components/ui/MdxDocument.js.map +1 -0
- package/dist/components/ui/MetadataList.cjs +2 -0
- package/dist/components/ui/MetadataList.cjs.map +1 -0
- package/dist/components/ui/MetadataList.js +36 -0
- package/dist/components/ui/MetadataList.js.map +1 -0
- package/dist/components/ui/MetricCard.cjs +2 -0
- package/dist/components/ui/MetricCard.cjs.map +1 -0
- package/dist/components/ui/MetricCard.d.ts +1 -1
- package/dist/components/ui/MetricCard.js +63 -0
- package/dist/components/ui/MetricCard.js.map +1 -0
- package/dist/components/ui/MetricLabel.cjs +2 -0
- package/dist/components/ui/MetricLabel.cjs.map +1 -0
- package/dist/components/ui/MetricLabel.js +22 -0
- package/dist/components/ui/MetricLabel.js.map +1 -0
- package/dist/components/ui/MonoValue.cjs +2 -0
- package/dist/components/ui/MonoValue.cjs.map +1 -0
- package/dist/components/ui/MonoValue.d.ts +1 -1
- package/dist/components/ui/MonoValue.js +29 -0
- package/dist/components/ui/MonoValue.js.map +1 -0
- package/dist/components/ui/NotificationBell.cjs +2 -0
- package/dist/components/ui/NotificationBell.cjs.map +1 -0
- package/dist/components/ui/NotificationBell.d.ts +1 -1
- package/dist/components/ui/NotificationBell.js +98 -0
- package/dist/components/ui/NotificationBell.js.map +1 -0
- package/dist/components/ui/ObjectBrowser.cjs +2 -0
- package/dist/components/ui/ObjectBrowser.cjs.map +1 -0
- package/dist/components/ui/ObjectBrowser.js +116 -0
- package/dist/components/ui/ObjectBrowser.js.map +1 -0
- package/dist/components/ui/ObjectInspector.cjs +2 -0
- package/dist/components/ui/ObjectInspector.cjs.map +1 -0
- package/dist/components/ui/ObjectInspector.js +117 -0
- package/dist/components/ui/ObjectInspector.js.map +1 -0
- package/dist/components/ui/PageHeader.cjs +2 -0
- package/dist/components/ui/PageHeader.cjs.map +1 -0
- package/dist/components/ui/PageHeader.js +29 -0
- package/dist/components/ui/PageHeader.js.map +1 -0
- package/dist/components/ui/PageSizeSelect.cjs +2 -0
- package/dist/components/ui/PageSizeSelect.cjs.map +1 -0
- package/dist/components/ui/PageSizeSelect.js +88 -0
- package/dist/components/ui/PageSizeSelect.js.map +1 -0
- package/dist/components/ui/Pagination.cjs +2 -0
- package/dist/components/ui/Pagination.cjs.map +1 -0
- package/dist/components/ui/Pagination.js +56 -0
- package/dist/components/ui/Pagination.js.map +1 -0
- package/dist/components/ui/Panel.cjs +2 -0
- package/dist/components/ui/Panel.cjs.map +1 -0
- package/dist/components/ui/Panel.d.ts +1 -1
- package/dist/components/ui/Panel.js +47 -0
- package/dist/components/ui/Panel.js.map +1 -0
- package/dist/components/ui/PanelTitle.cjs +2 -0
- package/dist/components/ui/PanelTitle.cjs.map +1 -0
- package/dist/components/ui/PanelTitle.js +21 -0
- package/dist/components/ui/PanelTitle.js.map +1 -0
- package/dist/components/ui/ParetoChart.cjs +2 -0
- package/dist/components/ui/ParetoChart.cjs.map +1 -0
- package/dist/components/ui/ParetoChart.js +278 -0
- package/dist/components/ui/ParetoChart.js.map +1 -0
- package/dist/components/ui/ParquetViewer.cjs +2 -0
- package/dist/components/ui/ParquetViewer.cjs.map +1 -0
- package/dist/components/ui/ParquetViewer.d.ts +1 -1
- package/dist/components/ui/ParquetViewer.js +210 -0
- package/dist/components/ui/ParquetViewer.js.map +1 -0
- package/dist/components/ui/PasswordField.cjs +2 -0
- package/dist/components/ui/PasswordField.cjs.map +1 -0
- package/dist/components/ui/PasswordField.js +37 -0
- package/dist/components/ui/PasswordField.js.map +1 -0
- package/dist/components/ui/PickerField.cjs +2 -0
- package/dist/components/ui/PickerField.cjs.map +1 -0
- package/dist/components/ui/PickerField.js +45 -0
- package/dist/components/ui/PickerField.js.map +1 -0
- package/dist/components/ui/ProjectSelector.cjs +2 -0
- package/dist/components/ui/ProjectSelector.cjs.map +1 -0
- package/dist/components/ui/ProjectSelector.d.ts +1 -1
- package/dist/components/ui/ProjectSelector.js +74 -0
- package/dist/components/ui/ProjectSelector.js.map +1 -0
- package/dist/components/ui/QueryAutocomplete.cjs +2 -0
- package/dist/components/ui/QueryAutocomplete.cjs.map +1 -0
- package/dist/components/ui/QueryAutocomplete.js +235 -0
- package/dist/components/ui/QueryAutocomplete.js.map +1 -0
- package/dist/components/ui/RankBar.cjs +2 -0
- package/dist/components/ui/RankBar.cjs.map +1 -0
- package/dist/components/ui/RankBar.js +90 -0
- package/dist/components/ui/RankBar.js.map +1 -0
- package/dist/components/ui/RegisterForm.cjs +2 -0
- package/dist/components/ui/RegisterForm.cjs.map +1 -0
- package/dist/components/ui/RegisterForm.js +72 -0
- package/dist/components/ui/RegisterForm.js.map +1 -0
- package/dist/components/ui/ResizableSidePanel.cjs +2 -0
- package/dist/components/ui/ResizableSidePanel.cjs.map +1 -0
- package/dist/components/ui/ResizableSidePanel.js +79 -0
- package/dist/components/ui/ResizableSidePanel.js.map +1 -0
- package/dist/components/ui/Reveal.cjs +2 -0
- package/dist/components/ui/Reveal.cjs.map +1 -0
- package/dist/components/ui/Reveal.js +37 -0
- package/dist/components/ui/Reveal.js.map +1 -0
- package/dist/components/ui/RunPips.cjs +2 -0
- package/dist/components/ui/RunPips.cjs.map +1 -0
- package/dist/components/ui/RunPips.js +53 -0
- package/dist/components/ui/RunPips.js.map +1 -0
- package/dist/components/ui/SavedQueryBar.cjs +2 -0
- package/dist/components/ui/SavedQueryBar.cjs.map +1 -0
- package/dist/components/ui/SavedQueryBar.js +390 -0
- package/dist/components/ui/SavedQueryBar.js.map +1 -0
- package/dist/components/ui/ScoreBar.cjs +2 -0
- package/dist/components/ui/ScoreBar.cjs.map +1 -0
- package/dist/components/ui/ScoreBar.js +44 -0
- package/dist/components/ui/ScoreBar.js.map +1 -0
- package/dist/components/ui/ScrollStory.cjs +3 -0
- package/dist/components/ui/ScrollStory.cjs.map +1 -0
- package/dist/components/ui/ScrollStory.d.ts +33 -0
- package/dist/components/ui/ScrollStory.js +116 -0
- package/dist/components/ui/ScrollStory.js.map +1 -0
- package/dist/components/ui/SearchInput.cjs +2 -0
- package/dist/components/ui/SearchInput.cjs.map +1 -0
- package/dist/components/ui/SearchInput.js +48 -0
- package/dist/components/ui/SearchInput.js.map +1 -0
- package/dist/components/ui/SectionDivider.cjs +2 -0
- package/dist/components/ui/SectionDivider.cjs.map +1 -0
- package/dist/components/ui/SectionDivider.js +22 -0
- package/dist/components/ui/SectionDivider.js.map +1 -0
- package/dist/components/ui/Select.cjs +2 -0
- package/dist/components/ui/Select.cjs.map +1 -0
- package/dist/components/ui/Select.js +70 -0
- package/dist/components/ui/Select.js.map +1 -0
- package/dist/components/ui/ServiceMap.cjs +2 -0
- package/dist/components/ui/ServiceMap.cjs.map +1 -0
- package/dist/components/ui/ServiceMap.js +187 -0
- package/dist/components/ui/ServiceMap.js.map +1 -0
- package/dist/components/ui/SessionRunView.cjs +4 -0
- package/dist/components/ui/SessionRunView.cjs.map +1 -0
- package/dist/components/ui/SessionRunView.js +379 -0
- package/dist/components/ui/SessionRunView.js.map +1 -0
- package/dist/components/ui/SettingsSection.cjs +2 -0
- package/dist/components/ui/SettingsSection.cjs.map +1 -0
- package/dist/components/ui/SettingsSection.js +23 -0
- package/dist/components/ui/SettingsSection.js.map +1 -0
- package/dist/components/ui/ShareLinkDialog.cjs +2 -0
- package/dist/components/ui/ShareLinkDialog.cjs.map +1 -0
- package/dist/components/ui/ShareLinkDialog.js +133 -0
- package/dist/components/ui/ShareLinkDialog.js.map +1 -0
- package/dist/components/ui/Skeleton.cjs +2 -0
- package/dist/components/ui/Skeleton.cjs.map +1 -0
- package/dist/components/ui/Skeleton.js +42 -0
- package/dist/components/ui/Skeleton.js.map +1 -0
- package/dist/components/ui/SparkLine.cjs +2 -0
- package/dist/components/ui/SparkLine.cjs.map +1 -0
- package/dist/components/ui/SparkLine.d.ts +1 -1
- package/dist/components/ui/SparkLine.js +61 -0
- package/dist/components/ui/SparkLine.js.map +1 -0
- package/dist/components/ui/StackedBar.cjs +2 -0
- package/dist/components/ui/StackedBar.cjs.map +1 -0
- package/dist/components/ui/StackedBar.js +110 -0
- package/dist/components/ui/StackedBar.js.map +1 -0
- package/dist/components/ui/StatBlock.cjs +2 -0
- package/dist/components/ui/StatBlock.cjs.map +1 -0
- package/dist/components/ui/StatBlock.d.ts +1 -1
- package/dist/components/ui/StatBlock.js +67 -0
- package/dist/components/ui/StatBlock.js.map +1 -0
- package/dist/components/ui/StatusDot.cjs +2 -0
- package/dist/components/ui/StatusDot.cjs.map +1 -0
- package/dist/components/ui/StatusDot.js +27 -0
- package/dist/components/ui/StatusDot.js.map +1 -0
- package/dist/components/ui/TableOfContents.cjs +2 -0
- package/dist/components/ui/TableOfContents.cjs.map +1 -0
- package/dist/components/ui/TableOfContents.js +104 -0
- package/dist/components/ui/TableOfContents.js.map +1 -0
- package/dist/components/ui/Tabs.cjs +3 -0
- package/dist/components/ui/Tabs.cjs.map +1 -0
- package/dist/components/ui/Tabs.d.ts +1 -1
- package/dist/components/ui/Tabs.js +144 -0
- package/dist/components/ui/Tabs.js.map +1 -0
- package/dist/components/ui/Terminal.cjs +2 -0
- package/dist/components/ui/Terminal.cjs.map +1 -0
- package/dist/components/ui/Terminal.d.ts +1 -1
- package/dist/components/ui/Terminal.js +42 -0
- package/dist/components/ui/Terminal.js.map +1 -0
- package/dist/components/ui/TextField.cjs +2 -0
- package/dist/components/ui/TextField.cjs.map +1 -0
- package/dist/components/ui/TextField.js +56 -0
- package/dist/components/ui/TextField.js.map +1 -0
- package/dist/components/ui/ThemeToggle.cjs +2 -0
- package/dist/components/ui/ThemeToggle.cjs.map +1 -0
- package/dist/components/ui/ThemeToggle.d.ts +1 -1
- package/dist/components/ui/ThemeToggle.js +37 -0
- package/dist/components/ui/ThemeToggle.js.map +1 -0
- package/dist/components/ui/TimeDisplay.cjs +2 -0
- package/dist/components/ui/TimeDisplay.cjs.map +1 -0
- package/dist/components/ui/TimeDisplay.js +56 -0
- package/dist/components/ui/TimeDisplay.js.map +1 -0
- package/dist/components/ui/TimeRangePicker.cjs +2 -0
- package/dist/components/ui/TimeRangePicker.cjs.map +1 -0
- package/dist/components/ui/TimeRangePicker.js +152 -0
- package/dist/components/ui/TimeRangePicker.js.map +1 -0
- package/dist/components/ui/Timeline.cjs +2 -0
- package/dist/components/ui/Timeline.cjs.map +1 -0
- package/dist/components/ui/Timeline.d.ts +1 -1
- package/dist/components/ui/Timeline.js +54 -0
- package/dist/components/ui/Timeline.js.map +1 -0
- package/dist/components/ui/TimelineChart.cjs +2 -0
- package/dist/components/ui/TimelineChart.cjs.map +1 -0
- package/dist/components/ui/TimelineChart.js +281 -0
- package/dist/components/ui/TimelineChart.js.map +1 -0
- package/dist/components/ui/ToolCallCard.cjs +4 -0
- package/dist/components/ui/ToolCallCard.cjs.map +1 -0
- package/dist/components/ui/ToolCallCard.d.ts +1 -2
- package/dist/components/ui/ToolCallCard.js +56 -0
- package/dist/components/ui/ToolCallCard.js.map +1 -0
- package/dist/components/ui/Toolbar.cjs +2 -0
- package/dist/components/ui/Toolbar.cjs.map +1 -0
- package/dist/components/ui/Toolbar.js +68 -0
- package/dist/components/ui/Toolbar.js.map +1 -0
- package/dist/components/ui/TraceSpanInspector.cjs +2 -0
- package/dist/components/ui/TraceSpanInspector.cjs.map +1 -0
- package/dist/components/ui/TraceSpanInspector.js +148 -0
- package/dist/components/ui/TraceSpanInspector.js.map +1 -0
- package/dist/components/ui/TraceTree.cjs +2 -0
- package/dist/components/ui/TraceTree.cjs.map +1 -0
- package/dist/components/ui/TraceTree.d.ts +1 -1
- package/dist/components/ui/TraceTree.js +195 -0
- package/dist/components/ui/TraceTree.js.map +1 -0
- package/dist/components/ui/TrajectoryStep.cjs +2 -0
- package/dist/components/ui/TrajectoryStep.cjs.map +1 -0
- package/dist/components/ui/TrajectoryStep.d.ts +1 -1
- package/dist/components/ui/TrajectoryStep.js +74 -0
- package/dist/components/ui/TrajectoryStep.js.map +1 -0
- package/dist/components/ui/TrajectoryTimeline.cjs +2 -0
- package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -0
- package/dist/components/ui/TrajectoryTimeline.d.ts +1 -1
- package/dist/components/ui/TrajectoryTimeline.js +51 -0
- package/dist/components/ui/TrajectoryTimeline.js.map +1 -0
- package/dist/components/ui/UploadQueue.cjs +2 -0
- package/dist/components/ui/UploadQueue.cjs.map +1 -0
- package/dist/components/ui/UploadQueue.js +146 -0
- package/dist/components/ui/UploadQueue.js.map +1 -0
- package/dist/components/ui/codeFence.cjs +2 -0
- package/dist/components/ui/codeFence.cjs.map +1 -0
- package/dist/components/ui/codeFence.js +16 -0
- package/dist/components/ui/codeFence.js.map +1 -0
- package/dist/components/ui/index.d.ts +2 -0
- package/dist/components/ui/linkComponent.cjs +2 -0
- package/dist/components/ui/linkComponent.cjs.map +1 -0
- package/dist/components/ui/linkComponent.d.ts +4 -1
- package/dist/components/ui/linkComponent.js +11 -0
- package/dist/components/ui/linkComponent.js.map +1 -0
- package/dist/components/ui/mdxTableOfContents.cjs +2 -0
- package/dist/components/ui/mdxTableOfContents.cjs.map +1 -0
- package/dist/components/ui/mdxTableOfContents.js +13 -0
- package/dist/components/ui/mdxTableOfContents.js.map +1 -0
- package/dist/components/ui/relativeTime.cjs +2 -0
- package/dist/components/ui/relativeTime.cjs.map +1 -0
- package/dist/components/ui/relativeTime.js +11 -0
- package/dist/components/ui/relativeTime.js.map +1 -0
- package/dist/components/ui/tablistKeyboard.cjs +2 -0
- package/dist/components/ui/tablistKeyboard.cjs.map +1 -0
- package/dist/components/ui/tablistKeyboard.js +18 -0
- package/dist/components/ui/tablistKeyboard.js.map +1 -0
- package/dist/components/ui/traceFormat.cjs +2 -0
- package/dist/components/ui/traceFormat.cjs.map +1 -0
- package/dist/components/ui/traceFormat.js +15 -0
- package/dist/components/ui/traceFormat.js.map +1 -0
- package/dist/hooks/index.d.ts +2 -0
- package/dist/hooks/useCopyToClipboard.cjs +2 -0
- package/dist/hooks/useCopyToClipboard.cjs.map +1 -0
- package/dist/hooks/useCopyToClipboard.js +24 -0
- package/dist/hooks/useCopyToClipboard.js.map +1 -0
- package/dist/hooks/useElementWidth.cjs +2 -0
- package/dist/hooks/useElementWidth.cjs.map +1 -0
- package/dist/hooks/useElementWidth.js +22 -0
- package/dist/hooks/useElementWidth.js.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.cjs +2 -0
- package/dist/hooks/useIsomorphicLayoutEffect.cjs.map +1 -0
- package/dist/hooks/useIsomorphicLayoutEffect.d.ts +7 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js +6 -0
- package/dist/hooks/useIsomorphicLayoutEffect.js.map +1 -0
- package/dist/hooks/useMediaQuery.cjs +2 -0
- package/dist/hooks/useMediaQuery.cjs.map +1 -0
- package/dist/hooks/useMediaQuery.d.ts +4 -1
- package/dist/hooks/useMediaQuery.js +23 -0
- package/dist/hooks/useMediaQuery.js.map +1 -0
- package/dist/hooks/useMenuPopover.cjs +2 -0
- package/dist/hooks/useMenuPopover.cjs.map +1 -0
- package/dist/hooks/useMenuPopover.js +64 -0
- package/dist/hooks/useMenuPopover.js.map +1 -0
- package/dist/hooks/usePageHidden.cjs +2 -0
- package/dist/hooks/usePageHidden.cjs.map +1 -0
- package/dist/hooks/usePageHidden.js +23 -0
- package/dist/hooks/usePageHidden.js.map +1 -0
- package/dist/hooks/useResizable.cjs +2 -0
- package/dist/hooks/useResizable.cjs.map +1 -0
- package/dist/hooks/useResizable.js +99 -0
- package/dist/hooks/useResizable.js.map +1 -0
- package/dist/hooks/useSavedQueries.cjs +2 -0
- package/dist/hooks/useSavedQueries.cjs.map +1 -0
- package/dist/hooks/useSavedQueries.js +93 -0
- package/dist/hooks/useSavedQueries.js.map +1 -0
- package/dist/hooks/useScrollProgress.cjs +2 -0
- package/dist/hooks/useScrollProgress.cjs.map +1 -0
- package/dist/hooks/useScrollProgress.d.ts +36 -0
- package/dist/hooks/useScrollProgress.js +64 -0
- package/dist/hooks/useScrollProgress.js.map +1 -0
- package/dist/hooks/useWindowScrolled.cjs +2 -0
- package/dist/hooks/useWindowScrolled.cjs.map +1 -0
- package/dist/hooks/useWindowScrolled.d.ts +2 -0
- package/dist/hooks/useWindowScrolled.js +19 -0
- package/dist/hooks/useWindowScrolled.js.map +1 -0
- package/dist/index.cjs +1 -13
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.ts +11 -8
- package/dist/index.js +307 -12124
- package/dist/index.js.map +1 -1
- package/dist/layouts/PageWrapper.cjs +2 -0
- package/dist/layouts/PageWrapper.cjs.map +1 -0
- package/dist/layouts/PageWrapper.js +14 -0
- package/dist/layouts/PageWrapper.js.map +1 -0
- package/dist/layouts/shell/AegisShell.cjs +2 -0
- package/dist/layouts/shell/AegisShell.cjs.map +1 -0
- package/dist/layouts/shell/AegisShell.d.ts +1 -1
- package/dist/layouts/shell/AegisShell.js +311 -0
- package/dist/layouts/shell/AegisShell.js.map +1 -0
- package/dist/layouts/shell/AppSwitcher.cjs +2 -0
- package/dist/layouts/shell/AppSwitcher.cjs.map +1 -0
- package/dist/layouts/shell/AppSwitcher.js +81 -0
- package/dist/layouts/shell/AppSwitcher.js.map +1 -0
- package/dist/layouts/shell/AuthRequiredCard.cjs +2 -0
- package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -0
- package/dist/layouts/shell/AuthRequiredCard.js +33 -0
- package/dist/layouts/shell/AuthRequiredCard.js.map +1 -0
- package/dist/layouts/shell/BreadcrumbBar.cjs +2 -0
- package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -0
- package/dist/layouts/shell/BreadcrumbBar.js +38 -0
- package/dist/layouts/shell/BreadcrumbBar.js.map +1 -0
- package/dist/layouts/shell/Sidebar.cjs +2 -0
- package/dist/layouts/shell/Sidebar.cjs.map +1 -0
- package/dist/layouts/shell/Sidebar.js +34 -0
- package/dist/layouts/shell/Sidebar.js.map +1 -0
- package/dist/layouts/shell/TopHeader.cjs +2 -0
- package/dist/layouts/shell/TopHeader.cjs.map +1 -0
- package/dist/layouts/shell/TopHeader.js +201 -0
- package/dist/layouts/shell/TopHeader.js.map +1 -0
- package/dist/layouts/shell/activeAppContext.cjs +2 -0
- package/dist/layouts/shell/activeAppContext.cjs.map +1 -0
- package/dist/layouts/shell/activeAppContext.js +17 -0
- package/dist/layouts/shell/activeAppContext.js.map +1 -0
- package/dist/layouts/shell/environments/EnvironmentContext.cjs +2 -0
- package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +1 -0
- package/dist/layouts/shell/environments/EnvironmentContext.js +94 -0
- package/dist/layouts/shell/environments/EnvironmentContext.js.map +1 -0
- package/dist/layouts/shell/environments/context.cjs +2 -0
- package/dist/layouts/shell/environments/context.cjs.map +1 -0
- package/dist/layouts/shell/environments/context.js +6 -0
- package/dist/layouts/shell/environments/context.js.map +1 -0
- package/dist/layouts/shell/environments/hooks.cjs +2 -0
- package/dist/layouts/shell/environments/hooks.cjs.map +1 -0
- package/dist/layouts/shell/environments/hooks.js +24 -0
- package/dist/layouts/shell/environments/hooks.js.map +1 -0
- package/dist/layouts/shell/environments/manifest.cjs +2 -0
- package/dist/layouts/shell/environments/manifest.cjs.map +1 -0
- package/dist/layouts/shell/environments/manifest.js +82 -0
- package/dist/layouts/shell/environments/manifest.js.map +1 -0
- package/dist/layouts/shell/environments/types.cjs +2 -0
- package/dist/layouts/shell/environments/types.cjs.map +1 -0
- package/dist/layouts/shell/environments/types.js +5 -0
- package/dist/layouts/shell/environments/types.js.map +1 -0
- package/dist/layouts/shell/paths.cjs +2 -0
- package/dist/layouts/shell/paths.cjs.map +1 -0
- package/dist/layouts/shell/paths.js +17 -0
- package/dist/layouts/shell/paths.js.map +1 -0
- package/dist/layouts/shell/types.d.ts +10 -2
- package/dist/layouts/shell/useAppNavigate.cjs +2 -0
- package/dist/layouts/shell/useAppNavigate.cjs.map +1 -0
- package/dist/layouts/shell/useAppNavigate.js +25 -0
- package/dist/layouts/shell/useAppNavigate.js.map +1 -0
- package/dist/layouts/site/SiteFooter.cjs +2 -0
- package/dist/layouts/site/SiteFooter.cjs.map +1 -0
- package/dist/layouts/site/SiteFooter.d.ts +27 -0
- package/dist/layouts/site/SiteFooter.js +58 -0
- package/dist/layouts/site/SiteFooter.js.map +1 -0
- package/dist/layouts/site/SiteLayout.cjs +2 -0
- package/dist/layouts/site/SiteLayout.cjs.map +1 -0
- package/dist/layouts/site/SiteLayout.d.ts +18 -0
- package/dist/layouts/site/SiteLayout.js +44 -0
- package/dist/layouts/site/SiteLayout.js.map +1 -0
- package/dist/layouts/site/SiteNav.cjs +2 -0
- package/dist/layouts/site/SiteNav.cjs.map +1 -0
- package/dist/layouts/site/SiteNav.d.ts +31 -0
- package/dist/layouts/site/SiteNav.js +113 -0
- package/dist/layouts/site/SiteNav.js.map +1 -0
- package/dist/layouts/site/SiteSection.cjs +2 -0
- package/dist/layouts/site/SiteSection.cjs.map +1 -0
- package/dist/layouts/site/SiteSection.d.ts +20 -0
- package/dist/layouts/site/SiteSection.js +27 -0
- package/dist/layouts/site/SiteSection.js.map +1 -0
- package/dist/layouts/site/index.d.ts +8 -0
- package/dist/lib/format.cjs +2 -0
- package/dist/lib/format.cjs.map +1 -0
- package/dist/lib/format.js +13 -0
- package/dist/lib/format.js.map +1 -0
- package/dist/lib/id.cjs +2 -0
- package/dist/lib/id.cjs.map +1 -0
- package/dist/lib/id.js +7 -0
- package/dist/lib/id.js.map +1 -0
- package/dist/lib/luceneQuery/index.d.ts +0 -2
- package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +3 -0
- package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -0
- package/dist/lib/luceneQuery/tokenizeAtCursor.js +58 -0
- package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -0
- package/dist/lib/scrollView.cjs +2 -0
- package/dist/lib/scrollView.cjs.map +1 -0
- package/dist/lib/scrollView.d.ts +16 -0
- package/dist/lib/scrollView.js +27 -0
- package/dist/lib/scrollView.js.map +1 -0
- package/dist/lib/storage.cjs +2 -0
- package/dist/lib/storage.cjs.map +1 -0
- package/dist/lib/storage.js +35 -0
- package/dist/lib/storage.js.map +1 -0
- package/dist/lib/timeRange.cjs +2 -0
- package/dist/lib/timeRange.cjs.map +1 -0
- package/dist/lib/timeRange.js +70 -0
- package/dist/lib/timeRange.js.map +1 -0
- package/dist/locale/LocaleProvider.cjs +2 -0
- package/dist/locale/LocaleProvider.cjs.map +1 -0
- package/dist/locale/LocaleProvider.js +9 -0
- package/dist/locale/LocaleProvider.js.map +1 -0
- package/dist/locale/localeContext.cjs +2 -0
- package/dist/locale/localeContext.cjs.map +1 -0
- package/dist/locale/localeContext.js +7 -0
- package/dist/locale/localeContext.js.map +1 -0
- package/dist/locale/strings.cjs +2 -0
- package/dist/locale/strings.cjs.map +1 -0
- package/dist/locale/strings.d.ts +4 -0
- package/dist/locale/strings.js +202 -0
- package/dist/locale/strings.js.map +1 -0
- package/dist/locale/useStrings.cjs +2 -0
- package/dist/locale/useStrings.cjs.map +1 -0
- package/dist/locale/useStrings.js +9 -0
- package/dist/locale/useStrings.js.map +1 -0
- package/dist/notifications/NotificationProvider.cjs +2 -0
- package/dist/notifications/NotificationProvider.cjs.map +1 -0
- package/dist/notifications/NotificationProvider.js +18 -0
- package/dist/notifications/NotificationProvider.js.map +1 -0
- package/dist/notifications/notificationContext.cjs +2 -0
- package/dist/notifications/notificationContext.cjs.map +1 -0
- package/dist/notifications/notificationContext.js +11 -0
- package/dist/notifications/notificationContext.js.map +1 -0
- package/dist/notifications/useNotifications.cjs +2 -0
- package/dist/notifications/useNotifications.cjs.map +1 -0
- package/dist/notifications/useNotifications.js +9 -0
- package/dist/notifications/useNotifications.js.map +1 -0
- package/dist/style.css +1 -1
- package/dist/theme/ThemeProvider.cjs +2 -0
- package/dist/theme/ThemeProvider.cjs.map +1 -0
- package/dist/theme/ThemeProvider.d.ts +3 -1
- package/dist/theme/ThemeProvider.js +62 -0
- package/dist/theme/ThemeProvider.js.map +1 -0
- package/dist/theme/antdTheme.cjs +2 -0
- package/dist/theme/antdTheme.cjs.map +1 -0
- package/dist/theme/antdTheme.js +230 -0
- package/dist/theme/antdTheme.js.map +1 -0
- package/dist/theme/themeContext.cjs +2 -0
- package/dist/theme/themeContext.cjs.map +1 -0
- package/dist/theme/themeContext.js +6 -0
- package/dist/theme/themeContext.js.map +1 -0
- package/dist/theme/themeInitScript.cjs +2 -0
- package/dist/theme/themeInitScript.cjs.map +1 -0
- package/dist/theme/themeInitScript.d.ts +10 -0
- package/dist/theme/themeInitScript.js +16 -0
- package/dist/theme/themeInitScript.js.map +1 -0
- package/dist/theme/useTheme.cjs +2 -0
- package/dist/theme/useTheme.cjs.map +1 -0
- package/dist/theme/useTheme.js +12 -0
- package/dist/theme/useTheme.js.map +1 -0
- package/dist/transports/agentm/AgentmChannelProvider.cjs +2 -0
- package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -0
- package/dist/{agent → transports/agentm}/AgentmChannelProvider.d.ts +2 -2
- package/dist/transports/agentm/AgentmChannelProvider.js +193 -0
- package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -0
- package/dist/transports/agentm/agentmChannelClient.cjs +2 -0
- package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -0
- package/dist/transports/agentm/agentmChannelClient.js +279 -0
- package/dist/transports/agentm/agentmChannelClient.js.map +1 -0
- package/dist/transports/bridge.cjs +2 -0
- package/dist/transports/bridge.cjs.map +1 -0
- package/dist/transports/bridge.d.ts +17 -0
- package/dist/transports/bridge.js +143 -0
- package/dist/transports/bridge.js.map +1 -0
- package/dist/transports/index.d.ts +5 -0
- package/dist/transports.cjs +2 -0
- package/dist/transports.cjs.map +1 -0
- package/dist/transports.js +10 -0
- package/dist/transports.js.map +1 -0
- package/package.json +6 -2
- package/dist/agent/AegisAgentProvider.d.ts +0 -35
- package/dist/agent/aegisAgentContext.d.ts +0 -6
- package/dist/agent/useAgent.d.ts +0 -7
- package/dist/lib/luceneQuery/compile.d.ts +0 -29
- package/dist/lib/luceneQuery/lucene.d.ts +0 -63
- /package/dist/agent/{AskOverlay.d.ts → ask/AskOverlay.d.ts} +0 -0
- /package/dist/agent/{hooks.d.ts → core/hooks.d.ts} +0 -0
- /package/dist/agent/{mcpToolCatalogue.d.ts → core/mcpToolCatalogue.d.ts} +0 -0
- /package/dist/agent/{types.d.ts → core/types.d.ts} +0 -0
- /package/dist/agent/{usePrimitiveSurface.d.ts → core/usePrimitiveSurface.d.ts} +0 -0
- /package/dist/{agent → transports/agentm}/agentmChannelClient.d.ts +0 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NotificationBell.js","sources":["../../../src/components/ui/NotificationBell.tsx"],"sourcesContent":["import { type ReactElement, useState } from 'react';\n\nimport { BellOutlined } from '@ant-design/icons';\nimport { Popover } from 'antd';\nimport { Link, useNavigate } from 'react-router-dom';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport { type AegisNotification, useNotifications } from '../../notifications';\nimport './NotificationBell.css';\nimport { relativeTime } from './relativeTime';\n\ninterface NotificationBellProps {\n /** Path to the full inbox page, e.g. '/inbox'. */\n inboxPath: string;\n /** Override popover width in px. Defaults to 360. */\n width?: number;\n /** Optional aegis-ui agent action — fired when the bell is clicked. */\n action?: AegisAction<void, unknown>;\n}\n\nconst MAX_PREVIEW_ITEMS = 8;\nconst DEFAULT_WIDTH = 360;\n\nexport function NotificationBell({\n inboxPath,\n width = DEFAULT_WIDTH,\n action,\n}: NotificationBellProps): ReactElement {\n const { items, unreadCount, markRead } = useNotifications();\n const [open, setOpen] = useState(false);\n const navigate = useNavigate();\n const bound = useAegisAction<void, unknown>(action);\n\n const preview = items.slice(0, MAX_PREVIEW_ITEMS);\n\n const handleItemClick = (item: AegisNotification): void => {\n if (!item.read && markRead) {\n void markRead(item.id);\n }\n setOpen(false);\n if (item.to) {\n navigate(item.to);\n }\n };\n\n const content = (\n <div className=\"aegis-notif-pop\" style={{ width }}>\n <div className=\"aegis-notif-pop__head\">\n <span className=\"aegis-notif-pop__title\">Notifications</span>\n {unreadCount > 0 && (\n <span className=\"aegis-notif-pop__count\">{unreadCount} unread</span>\n )}\n </div>\n {preview.length === 0 ? (\n <div className=\"aegis-notif-pop__empty\">You're all caught up.</div>\n ) : (\n <ul className=\"aegis-notif-pop__list\">\n {preview.map((item) => (\n <li key={item.id} className=\"aegis-notif-pop__item-wrap\">\n <button\n type=\"button\"\n className={[\n 'aegis-notif-pop__item',\n item.read ? '' : 'aegis-notif-pop__item--unread',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n handleItemClick(item);\n }}\n >\n <span\n className=\"aegis-notif-pop__dot\"\n aria-hidden=\"true\"\n data-unread={!item.read}\n />\n <span className=\"aegis-notif-pop__body\">\n <span className=\"aegis-notif-pop__row\">\n <span className=\"aegis-notif-pop__item-title\">\n {item.title}\n </span>\n <span className=\"aegis-notif-pop__time\">\n {relativeTime(item.timestamp)}\n </span>\n </span>\n {item.body && (\n <span className=\"aegis-notif-pop__item-body\">\n {item.body}\n </span>\n )}\n </span>\n </button>\n </li>\n ))}\n </ul>\n )}\n <div className=\"aegis-notif-pop__foot\">\n <Link\n to={inboxPath}\n className=\"aegis-notif-pop__view-all\"\n onClick={() => {\n setOpen(false);\n }}\n >\n View all\n </Link>\n </div>\n </div>\n );\n\n return (\n <Popover\n content={content}\n trigger=\"click\"\n open={open}\n onOpenChange={setOpen}\n placement=\"bottomRight\"\n arrow={false}\n classNames={{ root: 'aegis-notif-pop__overlay' }}\n >\n <button\n type=\"button\"\n className=\"aegis-notif-bell\"\n aria-label={\n unreadCount > 0\n ? `Notifications: ${String(unreadCount)} unread`\n : 'Notifications'\n }\n data-agent-action-id={action?.id}\n onClick={action ? () => void bound.invoke() : undefined}\n >\n <BellOutlined className=\"aegis-notif-bell__icon\" />\n {unreadCount > 0 && (\n <span className=\"aegis-notif-bell__badge\" aria-hidden=\"true\">\n {unreadCount > 99 ? '99+' : unreadCount}\n </span>\n )}\n </button>\n </Popover>\n );\n}\n"],"names":["MAX_PREVIEW_ITEMS","DEFAULT_WIDTH","NotificationBell","inboxPath","width","action","items","unreadCount","markRead","useNotifications","open","setOpen","useState","navigate","useNavigate","bound","useAegisAction","preview","handleItemClick","item","content","jsxs","jsx","relativeTime","Link","Popover","BellOutlined"],"mappings":";;;;;;;;;AAqBA,MAAMA,IAAoB,GACpBC,IAAgB;AAEf,SAASC,EAAiB;AAAA,EAC/B,WAAAC;AAAA,EACA,OAAAC,IAAQH;AAAA,EACR,QAAAI;AACF,GAAwC;AACtC,QAAM,EAAE,OAAAC,GAAO,aAAAC,GAAa,UAAAC,EAAA,IAAaC,EAAA,GACnC,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAK,GAChCC,IAAWC,EAAA,GACXC,IAAQC,EAA8BX,CAAM,GAE5CY,IAAUX,EAAM,MAAM,GAAGN,CAAiB,GAE1CkB,IAAkB,CAACC,MAAkC;AACzD,IAAI,CAACA,EAAK,QAAQX,KACXA,EAASW,EAAK,EAAE,GAEvBR,EAAQ,EAAK,GACTQ,EAAK,MACPN,EAASM,EAAK,EAAE;AAAA,EAEpB,GAEMC,sBACH,OAAA,EAAI,WAAU,mBAAkB,OAAO,EAAE,OAAAhB,KACxC,UAAA;AAAA,IAAA,gBAAAiB,EAAC,OAAA,EAAI,WAAU,yBACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,QAAA,EAAK,WAAU,0BAAyB,UAAA,iBAAa;AAAA,MACrDf,IAAc,KACb,gBAAAc,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAA;AAAA,QAAAd;AAAA,QAAY;AAAA,MAAA,EAAA,CAAO;AAAA,IAAA,GAEjE;AAAA,IACCU,EAAQ,WAAW,IAClB,gBAAAK,EAAC,SAAI,WAAU,0BAAyB,mCAA0B,IAElE,gBAAAA,EAAC,QAAG,WAAU,yBACX,YAAQ,IAAI,CAACH,MACZ,gBAAAG,EAAC,MAAA,EAAiB,WAAU,8BAC1B,UA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AAY,EAAE,MAAM,2BAAA;AAAA,MAEpB,UAAA,gBAAAU;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,MAAK;AAAA,UACL,WAAU;AAAA,UACV,cACEd,IAAc,IACV,kBAAkB,OAAOA,CAAW,CAAC,YACrC;AAAA,UAEN,wBAAsBF,GAAQ;AAAA,UAC9B,SAASA,IAAS,MAAM,KAAKU,EAAM,WAAW;AAAA,UAE9C,UAAA;AAAA,YAAA,gBAAAO,EAACI,GAAA,EAAa,WAAU,yBAAA,CAAyB;AAAA,YAChDnB,IAAc,KACb,gBAAAe,EAAC,QAAA,EAAK,WAAU,2BAA0B,eAAY,QACnD,UAAAf,IAAc,KAAK,QAAQA,EAAA,CAC9B;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IAEJ;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),M=require("react"),n=require("./MetricLabel.cjs"),d=require("./MonoValue.cjs");;/* empty css */const b=require("./Skeleton.cjs");function S(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?r:r.slice(l+1)}function f(s){const r=s.endsWith("/")?s.slice(0,-1):s,l=r.lastIndexOf("/");return l===-1?"":`${r.slice(0,l)}/`}function q({prefixes:s,currentPrefix:r,onPrefixChange:l,children:m,toolbar:j,searchSlot:a,viewModeSlot:u,footer:h,dragOverlay:_,selectionCount:i=0,hideTree:c=!1,defaultTreeCollapsed:x=!1,loading:g=!1,className:w}){const[t,N]=M.useState(x),p=!c&&!t,v=["aegis-object-browser",c||t?"aegis-object-browser--no-tree":"",w??""].filter(Boolean).join(" "),k=j!==void 0||a!==void 0||u!==void 0||i>0;return e.jsxs("div",{className:v,children:[c?null:e.jsxs("aside",{className:"aegis-object-browser__tree","aria-label":"Folders",children:[e.jsxs("header",{className:"aegis-object-browser__tree-head",children:[e.jsx(n.MetricLabel,{children:"Folders"}),e.jsx("button",{type:"button",className:"aegis-object-browser__tree-toggle",onClick:()=>{N(o=>!o)},"aria-label":t?"Expand folders":"Collapse folders",title:t?"Expand":"Collapse",children:t?"›":"‹"})]}),p?e.jsxs("ul",{className:"aegis-object-browser__tree-list",children:[r!==""?e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item aegis-object-browser__tree-item--up",onClick:()=>{l(f(r))},children:[e.jsx("span",{"aria-hidden":"true",children:"↑"}),e.jsx(d.MonoValue,{size:"sm",children:".."})]})}):null,s.length===0&&r===""?e.jsx("li",{className:"aegis-object-browser__tree-empty",children:e.jsx(n.MetricLabel,{children:"No sub-prefixes"})}):null,s.map(o=>{const y=S(o);return e.jsx("li",{children:e.jsxs("button",{type:"button",className:"aegis-object-browser__tree-item",onClick:()=>{l(o)},children:[e.jsx("span",{"aria-hidden":"true",children:"▸"}),e.jsx(d.MonoValue,{size:"sm",children:y})]})},o)})]}):null]}),e.jsxs("section",{className:"aegis-object-browser__main",children:[k?e.jsxs("div",{className:"aegis-object-browser__toolbar",children:[i>0?e.jsxs("span",{className:"aegis-object-browser__selection",children:[e.jsx(d.MonoValue,{size:"sm",children:i.toString()}),e.jsx(n.MetricLabel,{children:"Selected"})]}):null,a!==void 0?e.jsx("span",{className:"aegis-object-browser__search-slot",children:a}):null,e.jsxs("span",{className:"aegis-object-browser__toolbar-slot",children:[u,j]})]}):null,e.jsxs("div",{className:"aegis-object-browser__body-wrap",children:[_!==void 0?e.jsx("div",{className:"aegis-object-browser__drag-overlay",children:_}):null,e.jsx("div",{className:"aegis-object-browser__body",children:g?e.jsxs("div",{className:"aegis-object-browser__skeleton","aria-busy":"true",children:[e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"}),e.jsx(b.Skeleton,{block:!0,height:"var(--space-8)"})]}):m})]}),h!==void 0?e.jsx("div",{className:"aegis-object-browser__footer",children:h}):null]})]})}exports.ObjectBrowser=q;
|
|
2
|
+
//# sourceMappingURL=ObjectBrowser.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectBrowser.cjs","sources":["../../../src/components/ui/ObjectBrowser.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport { MetricLabel } from './MetricLabel';\nimport { MonoValue } from './MonoValue';\nimport './ObjectBrowser.css';\nimport { Skeleton } from './Skeleton';\n\ninterface ObjectBrowserProps {\n /** Sub-prefixes at the current level (driver list with delimiter='/'). */\n prefixes: string[];\n /** Currently-selected prefix path, e.g. `\"a/b/\"` or `\"\"` for root. */\n currentPrefix: string;\n onPrefixChange: (next: string) => void;\n /** Right-pane content — typically a DataTable of objects at this level. */\n children: ReactNode;\n /** Optional toolbar rendered above the right pane. */\n toolbar?: ReactNode;\n /** Rendered in the toolbar row, before the `toolbar` slot. */\n searchSlot?: ReactNode;\n /** Rendered in the toolbar row after searchSlot — for a view-mode switch. */\n viewModeSlot?: ReactNode;\n /** Rendered below the body — pagination or \"Load more\". */\n footer?: ReactNode;\n /**\n * Absolutely positioned above the body — caller controls visibility based\n * on its own drag state.\n */\n dragOverlay?: ReactNode;\n /** When >0, surfaces a \"n selected\" pill in the toolbar bar. */\n selectionCount?: number;\n /** Hide the left tree pane entirely (flat listing mode). */\n hideTree?: boolean;\n /**\n * When true, collapses the prefix tree by default. An internal toggle\n * button allows the user to expand/collapse it.\n */\n defaultTreeCollapsed?: boolean;\n /**\n * When true, shows 3 shimmer skeleton rows in the body instead of\n * `children`.\n */\n loading?: boolean;\n className?: string;\n}\n\nfunction lastSegment(prefix: string): string {\n const trimmed = prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;\n const idx = trimmed.lastIndexOf('/');\n return idx === -1 ? trimmed : trimmed.slice(idx + 1);\n}\n\nfunction parentPrefix(prefix: string): string {\n const trimmed = prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;\n const idx = trimmed.lastIndexOf('/');\n return idx === -1 ? '' : `${trimmed.slice(0, idx)}/`;\n}\n\nexport function ObjectBrowser({\n prefixes,\n currentPrefix,\n onPrefixChange,\n children,\n toolbar,\n searchSlot,\n viewModeSlot,\n footer,\n dragOverlay,\n selectionCount = 0,\n hideTree = false,\n defaultTreeCollapsed = false,\n loading = false,\n className,\n}: ObjectBrowserProps) {\n const [treeCollapsed, setTreeCollapsed] = useState(defaultTreeCollapsed);\n\n const showTree = !hideTree && !treeCollapsed;\n const cls = [\n 'aegis-object-browser',\n hideTree || treeCollapsed ? 'aegis-object-browser--no-tree' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const hasToolbarRow =\n toolbar !== undefined ||\n searchSlot !== undefined ||\n viewModeSlot !== undefined ||\n selectionCount > 0;\n\n return (\n <div className={cls}>\n {!hideTree ? (\n <aside className=\"aegis-object-browser__tree\" aria-label=\"Folders\">\n <header className=\"aegis-object-browser__tree-head\">\n <MetricLabel>{treeCollapsed ? 'Folders' : 'Folders'}</MetricLabel>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-toggle\"\n onClick={() => {\n setTreeCollapsed((prev) => !prev);\n }}\n aria-label={treeCollapsed ? 'Expand folders' : 'Collapse folders'}\n title={treeCollapsed ? 'Expand' : 'Collapse'}\n >\n {treeCollapsed ? '›' : '‹'}\n </button>\n </header>\n {showTree ? (\n <ul className=\"aegis-object-browser__tree-list\">\n {currentPrefix !== '' ? (\n <li>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-item aegis-object-browser__tree-item--up\"\n onClick={() => {\n onPrefixChange(parentPrefix(currentPrefix));\n }}\n >\n <span aria-hidden=\"true\">↑</span>\n <MonoValue size=\"sm\">..</MonoValue>\n </button>\n </li>\n ) : null}\n {prefixes.length === 0 && currentPrefix === '' ? (\n <li className=\"aegis-object-browser__tree-empty\">\n <MetricLabel>No sub-prefixes</MetricLabel>\n </li>\n ) : null}\n {prefixes.map((p) => {\n const label = lastSegment(p);\n return (\n <li key={p}>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-item\"\n onClick={() => {\n onPrefixChange(p);\n }}\n >\n <span aria-hidden=\"true\">▸</span>\n <MonoValue size=\"sm\">{label}</MonoValue>\n </button>\n </li>\n );\n })}\n </ul>\n ) : null}\n </aside>\n ) : null}\n <section className=\"aegis-object-browser__main\">\n {hasToolbarRow ? (\n <div className=\"aegis-object-browser__toolbar\">\n {selectionCount > 0 ? (\n <span className=\"aegis-object-browser__selection\">\n <MonoValue size=\"sm\">{selectionCount.toString()}</MonoValue>\n <MetricLabel>Selected</MetricLabel>\n </span>\n ) : null}\n {searchSlot !== undefined ? (\n <span className=\"aegis-object-browser__search-slot\">\n {searchSlot}\n </span>\n ) : null}\n <span className=\"aegis-object-browser__toolbar-slot\">\n {viewModeSlot}\n {toolbar}\n </span>\n </div>\n ) : null}\n <div className=\"aegis-object-browser__body-wrap\">\n {dragOverlay !== undefined ? (\n <div className=\"aegis-object-browser__drag-overlay\">\n {dragOverlay}\n </div>\n ) : null}\n <div className=\"aegis-object-browser__body\">\n {loading ? (\n <div className=\"aegis-object-browser__skeleton\" aria-busy=\"true\">\n <Skeleton block height=\"var(--space-8)\" />\n <Skeleton block height=\"var(--space-8)\" />\n <Skeleton block height=\"var(--space-8)\" />\n </div>\n ) : (\n children\n )}\n </div>\n </div>\n {footer !== undefined ? (\n <div className=\"aegis-object-browser__footer\">{footer}</div>\n ) : null}\n </section>\n </div>\n );\n}\n"],"names":["lastSegment","prefix","trimmed","idx","parentPrefix","ObjectBrowser","prefixes","currentPrefix","onPrefixChange","children","toolbar","searchSlot","viewModeSlot","footer","dragOverlay","selectionCount","hideTree","defaultTreeCollapsed","loading","className","treeCollapsed","setTreeCollapsed","useState","showTree","cls","hasToolbarRow","jsxs","jsx","MetricLabel","prev","MonoValue","p","label","Skeleton"],"mappings":"yQA6CA,SAASA,EAAYC,EAAwB,CAC3C,MAAMC,EAAUD,EAAO,SAAS,GAAG,EAAIA,EAAO,MAAM,EAAG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Q,CAAA,CAAA,CACvB,EACE,KACHjB,IAAe,OACdgB,EAAAA,IAAC,QAAK,UAAU,oCACb,WACH,EACE,KACJD,EAAAA,KAAC,OAAA,CAAK,UAAU,qCACb,SAAA,CAAAd,EACAF,CAAA,CAAA,CACH,CAAA,CAAA,CACF,EACE,KACJgB,EAAAA,KAAC,MAAA,CAAI,UAAU,kCACZ,SAAA,CAAAZ,IAAgB,OACfa,EAAAA,IAAC,MAAA,CAAI,UAAU,qCACZ,WACH,EACE,KACJA,EAAAA,IAAC,MAAA,CAAI,UAAU,6BACZ,SAAAT,SACE,MAAA,CAAI,UAAU,iCAAiC,YAAU,OACxD,SAAA,CAAAS,EAAAA,IAACM,EAAAA,SAAA,CAAS,MAAK,GAAC,OAAO,iBAAiB,EACxCN,EAAAA,IAACM,EAAAA,SAAA,CAAS,MAAK,GAAC,OAAO,iBAAiB,EACxCN,EAAAA,IAACM,EAAAA,SAAA,CAAS,MAAK,GAAC,OAAO,gBAAA,CAAiB,CAAA,CAAA,CAC1C,EAEAxB,CAAA,CAEJ,CAAA,EACF,EACCI,IAAW,OACVc,EAAAA,IAAC,OAAI,UAAU,+BAAgC,WAAO,EACpD,IAAA,CAAA,CACN,CAAA,EACF,CAEJ"}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
import { jsxs as s, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useState as x } from "react";
|
|
3
|
+
import { MetricLabel as d } from "./MetricLabel.js";
|
|
4
|
+
import { MonoValue as b } from "./MonoValue.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { Skeleton as m } from "./Skeleton.js";
|
|
7
|
+
function z(r) {
|
|
8
|
+
const l = r.endsWith("/") ? r.slice(0, -1) : r, o = l.lastIndexOf("/");
|
|
9
|
+
return o === -1 ? l : l.slice(o + 1);
|
|
10
|
+
}
|
|
11
|
+
function F(r) {
|
|
12
|
+
const l = r.endsWith("/") ? r.slice(0, -1) : r, o = l.lastIndexOf("/");
|
|
13
|
+
return o === -1 ? "" : `${l.slice(0, o)}/`;
|
|
14
|
+
}
|
|
15
|
+
function L({
|
|
16
|
+
prefixes: r,
|
|
17
|
+
currentPrefix: l,
|
|
18
|
+
onPrefixChange: o,
|
|
19
|
+
children: j,
|
|
20
|
+
toolbar: h,
|
|
21
|
+
searchSlot: i,
|
|
22
|
+
viewModeSlot: _,
|
|
23
|
+
footer: u,
|
|
24
|
+
dragOverlay: g,
|
|
25
|
+
selectionCount: c = 0,
|
|
26
|
+
hideTree: n = !1,
|
|
27
|
+
defaultTreeCollapsed: p = !1,
|
|
28
|
+
loading: w = !1,
|
|
29
|
+
className: N
|
|
30
|
+
}) {
|
|
31
|
+
const [a, v] = x(p), f = !n && !a, k = [
|
|
32
|
+
"aegis-object-browser",
|
|
33
|
+
n || a ? "aegis-object-browser--no-tree" : "",
|
|
34
|
+
N ?? ""
|
|
35
|
+
].filter(Boolean).join(" "), y = h !== void 0 || i !== void 0 || _ !== void 0 || c > 0;
|
|
36
|
+
return /* @__PURE__ */ s("div", { className: k, children: [
|
|
37
|
+
n ? null : /* @__PURE__ */ s("aside", { className: "aegis-object-browser__tree", "aria-label": "Folders", children: [
|
|
38
|
+
/* @__PURE__ */ s("header", { className: "aegis-object-browser__tree-head", children: [
|
|
39
|
+
/* @__PURE__ */ e(d, { children: "Folders" }),
|
|
40
|
+
/* @__PURE__ */ e(
|
|
41
|
+
"button",
|
|
42
|
+
{
|
|
43
|
+
type: "button",
|
|
44
|
+
className: "aegis-object-browser__tree-toggle",
|
|
45
|
+
onClick: () => {
|
|
46
|
+
v((t) => !t);
|
|
47
|
+
},
|
|
48
|
+
"aria-label": a ? "Expand folders" : "Collapse folders",
|
|
49
|
+
title: a ? "Expand" : "Collapse",
|
|
50
|
+
children: a ? "›" : "‹"
|
|
51
|
+
}
|
|
52
|
+
)
|
|
53
|
+
] }),
|
|
54
|
+
f ? /* @__PURE__ */ s("ul", { className: "aegis-object-browser__tree-list", children: [
|
|
55
|
+
l !== "" ? /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
|
|
56
|
+
"button",
|
|
57
|
+
{
|
|
58
|
+
type: "button",
|
|
59
|
+
className: "aegis-object-browser__tree-item aegis-object-browser__tree-item--up",
|
|
60
|
+
onClick: () => {
|
|
61
|
+
o(F(l));
|
|
62
|
+
},
|
|
63
|
+
children: [
|
|
64
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: "↑" }),
|
|
65
|
+
/* @__PURE__ */ e(b, { size: "sm", children: ".." })
|
|
66
|
+
]
|
|
67
|
+
}
|
|
68
|
+
) }) : null,
|
|
69
|
+
r.length === 0 && l === "" ? /* @__PURE__ */ e("li", { className: "aegis-object-browser__tree-empty", children: /* @__PURE__ */ e(d, { children: "No sub-prefixes" }) }) : null,
|
|
70
|
+
r.map((t) => {
|
|
71
|
+
const C = z(t);
|
|
72
|
+
return /* @__PURE__ */ e("li", { children: /* @__PURE__ */ s(
|
|
73
|
+
"button",
|
|
74
|
+
{
|
|
75
|
+
type: "button",
|
|
76
|
+
className: "aegis-object-browser__tree-item",
|
|
77
|
+
onClick: () => {
|
|
78
|
+
o(t);
|
|
79
|
+
},
|
|
80
|
+
children: [
|
|
81
|
+
/* @__PURE__ */ e("span", { "aria-hidden": "true", children: "▸" }),
|
|
82
|
+
/* @__PURE__ */ e(b, { size: "sm", children: C })
|
|
83
|
+
]
|
|
84
|
+
}
|
|
85
|
+
) }, t);
|
|
86
|
+
})
|
|
87
|
+
] }) : null
|
|
88
|
+
] }),
|
|
89
|
+
/* @__PURE__ */ s("section", { className: "aegis-object-browser__main", children: [
|
|
90
|
+
y ? /* @__PURE__ */ s("div", { className: "aegis-object-browser__toolbar", children: [
|
|
91
|
+
c > 0 ? /* @__PURE__ */ s("span", { className: "aegis-object-browser__selection", children: [
|
|
92
|
+
/* @__PURE__ */ e(b, { size: "sm", children: c.toString() }),
|
|
93
|
+
/* @__PURE__ */ e(d, { children: "Selected" })
|
|
94
|
+
] }) : null,
|
|
95
|
+
i !== void 0 ? /* @__PURE__ */ e("span", { className: "aegis-object-browser__search-slot", children: i }) : null,
|
|
96
|
+
/* @__PURE__ */ s("span", { className: "aegis-object-browser__toolbar-slot", children: [
|
|
97
|
+
_,
|
|
98
|
+
h
|
|
99
|
+
] })
|
|
100
|
+
] }) : null,
|
|
101
|
+
/* @__PURE__ */ s("div", { className: "aegis-object-browser__body-wrap", children: [
|
|
102
|
+
g !== void 0 ? /* @__PURE__ */ e("div", { className: "aegis-object-browser__drag-overlay", children: g }) : null,
|
|
103
|
+
/* @__PURE__ */ e("div", { className: "aegis-object-browser__body", children: w ? /* @__PURE__ */ s("div", { className: "aegis-object-browser__skeleton", "aria-busy": "true", children: [
|
|
104
|
+
/* @__PURE__ */ e(m, { block: !0, height: "var(--space-8)" }),
|
|
105
|
+
/* @__PURE__ */ e(m, { block: !0, height: "var(--space-8)" }),
|
|
106
|
+
/* @__PURE__ */ e(m, { block: !0, height: "var(--space-8)" })
|
|
107
|
+
] }) : j })
|
|
108
|
+
] }),
|
|
109
|
+
u !== void 0 ? /* @__PURE__ */ e("div", { className: "aegis-object-browser__footer", children: u }) : null
|
|
110
|
+
] })
|
|
111
|
+
] });
|
|
112
|
+
}
|
|
113
|
+
export {
|
|
114
|
+
L as ObjectBrowser
|
|
115
|
+
};
|
|
116
|
+
//# sourceMappingURL=ObjectBrowser.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectBrowser.js","sources":["../../../src/components/ui/ObjectBrowser.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport { MetricLabel } from './MetricLabel';\nimport { MonoValue } from './MonoValue';\nimport './ObjectBrowser.css';\nimport { Skeleton } from './Skeleton';\n\ninterface ObjectBrowserProps {\n /** Sub-prefixes at the current level (driver list with delimiter='/'). */\n prefixes: string[];\n /** Currently-selected prefix path, e.g. `\"a/b/\"` or `\"\"` for root. */\n currentPrefix: string;\n onPrefixChange: (next: string) => void;\n /** Right-pane content — typically a DataTable of objects at this level. */\n children: ReactNode;\n /** Optional toolbar rendered above the right pane. */\n toolbar?: ReactNode;\n /** Rendered in the toolbar row, before the `toolbar` slot. */\n searchSlot?: ReactNode;\n /** Rendered in the toolbar row after searchSlot — for a view-mode switch. */\n viewModeSlot?: ReactNode;\n /** Rendered below the body — pagination or \"Load more\". */\n footer?: ReactNode;\n /**\n * Absolutely positioned above the body — caller controls visibility based\n * on its own drag state.\n */\n dragOverlay?: ReactNode;\n /** When >0, surfaces a \"n selected\" pill in the toolbar bar. */\n selectionCount?: number;\n /** Hide the left tree pane entirely (flat listing mode). */\n hideTree?: boolean;\n /**\n * When true, collapses the prefix tree by default. An internal toggle\n * button allows the user to expand/collapse it.\n */\n defaultTreeCollapsed?: boolean;\n /**\n * When true, shows 3 shimmer skeleton rows in the body instead of\n * `children`.\n */\n loading?: boolean;\n className?: string;\n}\n\nfunction lastSegment(prefix: string): string {\n const trimmed = prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;\n const idx = trimmed.lastIndexOf('/');\n return idx === -1 ? trimmed : trimmed.slice(idx + 1);\n}\n\nfunction parentPrefix(prefix: string): string {\n const trimmed = prefix.endsWith('/') ? prefix.slice(0, -1) : prefix;\n const idx = trimmed.lastIndexOf('/');\n return idx === -1 ? '' : `${trimmed.slice(0, idx)}/`;\n}\n\nexport function ObjectBrowser({\n prefixes,\n currentPrefix,\n onPrefixChange,\n children,\n toolbar,\n searchSlot,\n viewModeSlot,\n footer,\n dragOverlay,\n selectionCount = 0,\n hideTree = false,\n defaultTreeCollapsed = false,\n loading = false,\n className,\n}: ObjectBrowserProps) {\n const [treeCollapsed, setTreeCollapsed] = useState(defaultTreeCollapsed);\n\n const showTree = !hideTree && !treeCollapsed;\n const cls = [\n 'aegis-object-browser',\n hideTree || treeCollapsed ? 'aegis-object-browser--no-tree' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const hasToolbarRow =\n toolbar !== undefined ||\n searchSlot !== undefined ||\n viewModeSlot !== undefined ||\n selectionCount > 0;\n\n return (\n <div className={cls}>\n {!hideTree ? (\n <aside className=\"aegis-object-browser__tree\" aria-label=\"Folders\">\n <header className=\"aegis-object-browser__tree-head\">\n <MetricLabel>{treeCollapsed ? 'Folders' : 'Folders'}</MetricLabel>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-toggle\"\n onClick={() => {\n setTreeCollapsed((prev) => !prev);\n }}\n aria-label={treeCollapsed ? 'Expand folders' : 'Collapse folders'}\n title={treeCollapsed ? 'Expand' : 'Collapse'}\n >\n {treeCollapsed ? '›' : '‹'}\n </button>\n </header>\n {showTree ? (\n <ul className=\"aegis-object-browser__tree-list\">\n {currentPrefix !== '' ? (\n <li>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-item aegis-object-browser__tree-item--up\"\n onClick={() => {\n onPrefixChange(parentPrefix(currentPrefix));\n }}\n >\n <span aria-hidden=\"true\">↑</span>\n <MonoValue size=\"sm\">..</MonoValue>\n </button>\n </li>\n ) : null}\n {prefixes.length === 0 && currentPrefix === '' ? (\n <li className=\"aegis-object-browser__tree-empty\">\n <MetricLabel>No sub-prefixes</MetricLabel>\n </li>\n ) : null}\n {prefixes.map((p) => {\n const label = lastSegment(p);\n return (\n <li key={p}>\n <button\n type=\"button\"\n className=\"aegis-object-browser__tree-item\"\n onClick={() => {\n onPrefixChange(p);\n }}\n >\n <span aria-hidden=\"true\">▸</span>\n <MonoValue size=\"sm\">{label}</MonoValue>\n </button>\n </li>\n );\n })}\n </ul>\n ) : null}\n </aside>\n ) : null}\n <section className=\"aegis-object-browser__main\">\n {hasToolbarRow ? (\n <div className=\"aegis-object-browser__toolbar\">\n {selectionCount > 0 ? (\n <span className=\"aegis-object-browser__selection\">\n <MonoValue size=\"sm\">{selectionCount.toString()}</MonoValue>\n <MetricLabel>Selected</MetricLabel>\n </span>\n ) : null}\n {searchSlot !== undefined ? (\n <span className=\"aegis-object-browser__search-slot\">\n {searchSlot}\n </span>\n ) : null}\n <span className=\"aegis-object-browser__toolbar-slot\">\n {viewModeSlot}\n {toolbar}\n </span>\n </div>\n ) : null}\n <div className=\"aegis-object-browser__body-wrap\">\n {dragOverlay !== undefined ? (\n <div className=\"aegis-object-browser__drag-overlay\">\n {dragOverlay}\n </div>\n ) : null}\n <div className=\"aegis-object-browser__body\">\n {loading ? (\n <div className=\"aegis-object-browser__skeleton\" aria-busy=\"true\">\n <Skeleton block height=\"var(--space-8)\" />\n <Skeleton block height=\"var(--space-8)\" />\n <Skeleton block height=\"var(--space-8)\" />\n </div>\n ) : (\n children\n )}\n </div>\n </div>\n {footer !== undefined ? (\n <div className=\"aegis-object-browser__footer\">{footer}</div>\n ) : null}\n </section>\n </div>\n );\n}\n"],"names":["lastSegment","prefix","trimmed","idx","parentPrefix","ObjectBrowser","prefixes","currentPrefix","onPrefixChange","children","toolbar","searchSlot","viewModeSlot","footer","dragOverlay","selectionCount","hideTree","defaultTreeCollapsed","loading","className","treeCollapsed","setTreeCollapsed","useState","showTree","cls","hasToolbarRow","jsxs","jsx","MetricLabel","prev","MonoValue","p","label","Skeleton"],"mappings":";;;;;;AA6CA,SAASA,EAAYC,GAAwB;AAC3C,QAAMC,IAAUD,EAAO,SAAS,GAAG,IAAIA,EAAO,MAAM,GAAG,EAAE,IAAIA,GACvDE,IAAMD,EAAQ,YAAY,GAAG;AACnC,SAAOC,MAAQ,KAAKD,IAAUA,EAAQ,MAAMC,IAAM,CAAC;AACrD;AAEA,SAASC,EAAaH,GAAwB;AAC5C,QAAMC,IAAUD,EAAO,SAAS,GAAG,IAAIA,EAAO,MAAM,GAAG,EAAE,IAAIA,GACvDE,IAAMD,EAAQ,YAAY,GAAG;AACnC,SAAOC,MAAQ,KAAK,KAAK,GAAGD,EAAQ,MAAM,GAAGC,CAAG,CAAC;AACnD;AAEO,SAASE,EAAc;AAAA,EAC5B,UAAAC;AAAA,EACA,eAAAC;AAAA,EACA,gBAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YA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;AAAA,QACHjB,MAAe,SACd,gBAAAgB,EAAC,UAAK,WAAU,qCACb,aACH,IACE;AAAA,QACJ,gBAAAD,EAAC,QAAA,EAAK,WAAU,sCACb,UAAA;AAAA,UAAAd;AAAA,UACAF;AAAA,QAAA,EAAA,CACH;AAAA,MAAA,EAAA,CACF,IACE;AAAA,MACJ,gBAAAgB,EAAC,OAAA,EAAI,WAAU,mCACZ,UAAA;AAAA,QAAAZ,MAAgB,SACf,gBAAAa,EAAC,OAAA,EAAI,WAAU,sCACZ,aACH,IACE;AAAA,QACJ,gBAAAA,EAAC,OAAA,EAAI,WAAU,8BACZ,UAAAT,sBACE,OAAA,EAAI,WAAU,kCAAiC,aAAU,QACxD,UAAA;AAAA,UAAA,gBAAAS,EAACM,GAAA,EAAS,OAAK,IAAC,QAAO,kBAAiB;AAAA,UACxC,gBAAAN,EAACM,GAAA,EAAS,OAAK,IAAC,QAAO,kBAAiB;AAAA,UACxC,gBAAAN,EAACM,GAAA,EAAS,OAAK,IAAC,QAAO,iBAAA,CAAiB;AAAA,QAAA,EAAA,CAC1C,IAEAxB,EAAA,CAEJ;AAAA,MAAA,GACF;AAAA,MACCI,MAAW,SACV,gBAAAc,EAAC,SAAI,WAAU,gCAAgC,aAAO,IACpD;AAAA,IAAA,EAAA,CACN;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),b=require("react"),a=require("@ant-design/icons"),N=require("antd"),y=require("./MetricLabel.cjs");;/* empty css */const q=require("./Toolbar.cjs"),I=require("../../locale/useStrings.cjs");function O({open:j,onClose:n,title:u,subtitle:l,tabs:t,defaultTabId:o,actions:d,width:p=720,maximizedWidth:_="100vw",defaultMaximized:x=!1}){const[c,m]=b.useState(x),s=I.useStrings();function g(){if(o!==void 0)return o;const e=t.find(f=>!f.disabled);return e!==void 0?e.id:t[0]?.id??""}const[r,h]=b.useState(g),v=t.find(e=>e.id===r);return i.jsx(N.Drawer,{open:j,onClose:n,width:c?_:p,placement:"right",closable:!1,className:"aegis-object-inspector__drawer",styles:{body:{padding:0,display:"flex",flexDirection:"column",height:"100%"},header:{display:"none"}},children:i.jsxs("div",{className:"aegis-object-inspector",children:[i.jsxs("header",{className:"aegis-object-inspector__header",children:[i.jsxs("div",{className:"aegis-object-inspector__header-text",children:[i.jsx("span",{className:"aegis-object-inspector__title",children:u}),l!==void 0?i.jsx(y.MetricLabel,{className:"aegis-object-inspector__subtitle",children:l}):null]}),i.jsxs("div",{className:"aegis-object-inspector__header-buttons",children:[i.jsx("button",{type:"button",className:"aegis-object-inspector__close",onClick:()=>{m(e=>!e)},"aria-label":c?s.restoreInspector:s.maximizeInspector,title:c?s.restore:s.maximize,children:c?i.jsx(a.FullscreenExitOutlined,{}):i.jsx(a.FullscreenOutlined,{})}),i.jsx("button",{type:"button",className:"aegis-object-inspector__close",onClick:n,"aria-label":s.closeInspector,children:i.jsx(a.CloseOutlined,{})})]})]}),d!==void 0?i.jsx("div",{className:"aegis-object-inspector__actions",children:i.jsx(q.Toolbar,{left:d})}):null,i.jsx("div",{className:"aegis-object-inspector__tablist",role:"tablist","aria-label":s.inspectorTabs,children:t.map(e=>i.jsx("button",{type:"button",role:"tab","aria-selected":e.id===r,"aria-disabled":e.disabled,disabled:e.disabled,className:["aegis-object-inspector__tab",e.id===r?"aegis-object-inspector__tab--active":"",e.disabled?"aegis-object-inspector__tab--disabled":""].filter(Boolean).join(" "),title:e.disabled?e.hint:void 0,onClick:()=>{e.disabled||h(e.id)},children:e.label},e.id))}),i.jsx("div",{className:"aegis-object-inspector__body",role:"tabpanel",children:v?.content})]})})}exports.ObjectInspector=O;
|
|
2
|
+
//# sourceMappingURL=ObjectInspector.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectInspector.cjs","sources":["../../../src/components/ui/ObjectInspector.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport {\n CloseOutlined,\n FullscreenExitOutlined,\n FullscreenOutlined,\n} from '@ant-design/icons';\nimport { Drawer } from 'antd';\n\nimport { useStrings } from '../../locale';\nimport { MetricLabel } from './MetricLabel';\nimport './ObjectInspector.css';\nimport { Toolbar } from './Toolbar';\n\nexport interface ObjectInspectorTab {\n id: string;\n label: string;\n content: ReactNode;\n disabled?: boolean;\n /** Shown when tab is disabled. */\n hint?: string;\n}\n\nexport interface ObjectInspectorProps {\n open: boolean;\n onClose: () => void;\n title: string;\n subtitle?: string;\n tabs: ObjectInspectorTab[];\n defaultTabId?: string;\n /** Row of action buttons (Download / Copy URL / Share / Delete). */\n actions?: ReactNode;\n /** Default: 720 */\n width?: number | string;\n /** Width when the inspector is maximized. Default: '100vw' */\n maximizedWidth?: number | string;\n /** Start maximized. Default: false */\n defaultMaximized?: boolean;\n}\n\nexport function ObjectInspector({\n open,\n onClose,\n title,\n subtitle,\n tabs,\n defaultTabId,\n actions,\n width = 720,\n maximizedWidth = '100vw',\n defaultMaximized = false,\n}: ObjectInspectorProps) {\n const [maximized, setMaximized] = useState<boolean>(defaultMaximized);\n const strings = useStrings();\n function resolveInitialTabId(): string {\n if (defaultTabId !== undefined) {\n return defaultTabId;\n }\n const firstEnabled = tabs.find((t) => !t.disabled);\n if (firstEnabled !== undefined) {\n return firstEnabled.id;\n }\n return tabs[0]?.id ?? '';\n }\n const [activeId, setActiveId] = useState<string>(resolveInitialTabId);\n\n const activeTab = tabs.find((t) => t.id === activeId);\n\n return (\n <Drawer\n open={open}\n onClose={onClose}\n width={maximized ? maximizedWidth : width}\n placement=\"right\"\n closable={false}\n className=\"aegis-object-inspector__drawer\"\n styles={{\n body: {\n padding: 0,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n header: { display: 'none' },\n }}\n >\n <div className=\"aegis-object-inspector\">\n {/* Header */}\n <header className=\"aegis-object-inspector__header\">\n <div className=\"aegis-object-inspector__header-text\">\n <span className=\"aegis-object-inspector__title\">{title}</span>\n {subtitle !== undefined ? (\n <MetricLabel className=\"aegis-object-inspector__subtitle\">\n {subtitle}\n </MetricLabel>\n ) : null}\n </div>\n <div className=\"aegis-object-inspector__header-buttons\">\n <button\n type=\"button\"\n className=\"aegis-object-inspector__close\"\n onClick={() => {\n setMaximized((m) => !m);\n }}\n aria-label={\n maximized ? strings.restoreInspector : strings.maximizeInspector\n }\n title={maximized ? strings.restore : strings.maximize}\n >\n {maximized ? <FullscreenExitOutlined /> : <FullscreenOutlined />}\n </button>\n <button\n type=\"button\"\n className=\"aegis-object-inspector__close\"\n onClick={onClose}\n aria-label={strings.closeInspector}\n >\n <CloseOutlined />\n </button>\n </div>\n </header>\n\n {/* Actions */}\n {actions !== undefined ? (\n <div className=\"aegis-object-inspector__actions\">\n <Toolbar left={actions} />\n </div>\n ) : null}\n\n {/* Tabs */}\n <div\n className=\"aegis-object-inspector__tablist\"\n role=\"tablist\"\n aria-label={strings.inspectorTabs}\n >\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={tab.id === activeId}\n aria-disabled={tab.disabled}\n disabled={tab.disabled}\n className={[\n 'aegis-object-inspector__tab',\n tab.id === activeId\n ? 'aegis-object-inspector__tab--active'\n : '',\n tab.disabled ? 'aegis-object-inspector__tab--disabled' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n title={tab.disabled ? tab.hint : undefined}\n onClick={() => {\n if (!tab.disabled) {\n setActiveId(tab.id);\n }\n }}\n >\n {tab.label}\n </button>\n ))}\n </div>\n\n {/* Body */}\n <div className=\"aegis-object-inspector__body\" role=\"tabpanel\">\n {activeTab?.content}\n </div>\n </div>\n </Drawer>\n );\n}\n"],"names":["ObjectInspector","open","onClose","title","subtitle","tabs","defaultTabId","actions","width","maximizedWidth","defaultMaximized","maximized","setMaximized","useState","strings","useStrings","resolveInitialTabId","firstEnabled","t","activeId","setActiveId","activeTab","jsx","Drawer","jsxs","MetricLabel","m","FullscreenExit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|
2
|
+
import { useState as p } from "react";
|
|
3
|
+
import { FullscreenExitOutlined as x, FullscreenOutlined as y, CloseOutlined as I } from "@ant-design/icons";
|
|
4
|
+
import { Drawer as w } from "antd";
|
|
5
|
+
import { MetricLabel as z } from "./MetricLabel.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { Toolbar as O } from "./Toolbar.js";
|
|
8
|
+
import { useStrings as k } from "../../locale/useStrings.js";
|
|
9
|
+
function B({
|
|
10
|
+
open: b,
|
|
11
|
+
onClose: c,
|
|
12
|
+
title: m,
|
|
13
|
+
subtitle: l,
|
|
14
|
+
tabs: s,
|
|
15
|
+
defaultTabId: n,
|
|
16
|
+
actions: d,
|
|
17
|
+
width: _ = 720,
|
|
18
|
+
maximizedWidth: h = "100vw",
|
|
19
|
+
defaultMaximized: u = !1
|
|
20
|
+
}) {
|
|
21
|
+
const [o, f] = p(u), t = k();
|
|
22
|
+
function g() {
|
|
23
|
+
if (n !== void 0)
|
|
24
|
+
return n;
|
|
25
|
+
const e = s.find((N) => !N.disabled);
|
|
26
|
+
return e !== void 0 ? e.id : s[0]?.id ?? "";
|
|
27
|
+
}
|
|
28
|
+
const [r, j] = p(g), v = s.find((e) => e.id === r);
|
|
29
|
+
return /* @__PURE__ */ i(
|
|
30
|
+
w,
|
|
31
|
+
{
|
|
32
|
+
open: b,
|
|
33
|
+
onClose: c,
|
|
34
|
+
width: o ? h : _,
|
|
35
|
+
placement: "right",
|
|
36
|
+
closable: !1,
|
|
37
|
+
className: "aegis-object-inspector__drawer",
|
|
38
|
+
styles: {
|
|
39
|
+
body: {
|
|
40
|
+
padding: 0,
|
|
41
|
+
display: "flex",
|
|
42
|
+
flexDirection: "column",
|
|
43
|
+
height: "100%"
|
|
44
|
+
},
|
|
45
|
+
header: { display: "none" }
|
|
46
|
+
},
|
|
47
|
+
children: /* @__PURE__ */ a("div", { className: "aegis-object-inspector", children: [
|
|
48
|
+
/* @__PURE__ */ a("header", { className: "aegis-object-inspector__header", children: [
|
|
49
|
+
/* @__PURE__ */ a("div", { className: "aegis-object-inspector__header-text", children: [
|
|
50
|
+
/* @__PURE__ */ i("span", { className: "aegis-object-inspector__title", children: m }),
|
|
51
|
+
l !== void 0 ? /* @__PURE__ */ i(z, { className: "aegis-object-inspector__subtitle", children: l }) : null
|
|
52
|
+
] }),
|
|
53
|
+
/* @__PURE__ */ a("div", { className: "aegis-object-inspector__header-buttons", children: [
|
|
54
|
+
/* @__PURE__ */ i(
|
|
55
|
+
"button",
|
|
56
|
+
{
|
|
57
|
+
type: "button",
|
|
58
|
+
className: "aegis-object-inspector__close",
|
|
59
|
+
onClick: () => {
|
|
60
|
+
f((e) => !e);
|
|
61
|
+
},
|
|
62
|
+
"aria-label": o ? t.restoreInspector : t.maximizeInspector,
|
|
63
|
+
title: o ? t.restore : t.maximize,
|
|
64
|
+
children: o ? /* @__PURE__ */ i(x, {}) : /* @__PURE__ */ i(y, {})
|
|
65
|
+
}
|
|
66
|
+
),
|
|
67
|
+
/* @__PURE__ */ i(
|
|
68
|
+
"button",
|
|
69
|
+
{
|
|
70
|
+
type: "button",
|
|
71
|
+
className: "aegis-object-inspector__close",
|
|
72
|
+
onClick: c,
|
|
73
|
+
"aria-label": t.closeInspector,
|
|
74
|
+
children: /* @__PURE__ */ i(I, {})
|
|
75
|
+
}
|
|
76
|
+
)
|
|
77
|
+
] })
|
|
78
|
+
] }),
|
|
79
|
+
d !== void 0 ? /* @__PURE__ */ i("div", { className: "aegis-object-inspector__actions", children: /* @__PURE__ */ i(O, { left: d }) }) : null,
|
|
80
|
+
/* @__PURE__ */ i(
|
|
81
|
+
"div",
|
|
82
|
+
{
|
|
83
|
+
className: "aegis-object-inspector__tablist",
|
|
84
|
+
role: "tablist",
|
|
85
|
+
"aria-label": t.inspectorTabs,
|
|
86
|
+
children: s.map((e) => /* @__PURE__ */ i(
|
|
87
|
+
"button",
|
|
88
|
+
{
|
|
89
|
+
type: "button",
|
|
90
|
+
role: "tab",
|
|
91
|
+
"aria-selected": e.id === r,
|
|
92
|
+
"aria-disabled": e.disabled,
|
|
93
|
+
disabled: e.disabled,
|
|
94
|
+
className: [
|
|
95
|
+
"aegis-object-inspector__tab",
|
|
96
|
+
e.id === r ? "aegis-object-inspector__tab--active" : "",
|
|
97
|
+
e.disabled ? "aegis-object-inspector__tab--disabled" : ""
|
|
98
|
+
].filter(Boolean).join(" "),
|
|
99
|
+
title: e.disabled ? e.hint : void 0,
|
|
100
|
+
onClick: () => {
|
|
101
|
+
e.disabled || j(e.id);
|
|
102
|
+
},
|
|
103
|
+
children: e.label
|
|
104
|
+
},
|
|
105
|
+
e.id
|
|
106
|
+
))
|
|
107
|
+
}
|
|
108
|
+
),
|
|
109
|
+
/* @__PURE__ */ i("div", { className: "aegis-object-inspector__body", role: "tabpanel", children: v?.content })
|
|
110
|
+
] })
|
|
111
|
+
}
|
|
112
|
+
);
|
|
113
|
+
}
|
|
114
|
+
export {
|
|
115
|
+
B as ObjectInspector
|
|
116
|
+
};
|
|
117
|
+
//# sourceMappingURL=ObjectInspector.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ObjectInspector.js","sources":["../../../src/components/ui/ObjectInspector.tsx"],"sourcesContent":["import { type ReactNode, useState } from 'react';\n\nimport {\n CloseOutlined,\n FullscreenExitOutlined,\n FullscreenOutlined,\n} from '@ant-design/icons';\nimport { Drawer } from 'antd';\n\nimport { useStrings } from '../../locale';\nimport { MetricLabel } from './MetricLabel';\nimport './ObjectInspector.css';\nimport { Toolbar } from './Toolbar';\n\nexport interface ObjectInspectorTab {\n id: string;\n label: string;\n content: ReactNode;\n disabled?: boolean;\n /** Shown when tab is disabled. */\n hint?: string;\n}\n\nexport interface ObjectInspectorProps {\n open: boolean;\n onClose: () => void;\n title: string;\n subtitle?: string;\n tabs: ObjectInspectorTab[];\n defaultTabId?: string;\n /** Row of action buttons (Download / Copy URL / Share / Delete). */\n actions?: ReactNode;\n /** Default: 720 */\n width?: number | string;\n /** Width when the inspector is maximized. Default: '100vw' */\n maximizedWidth?: number | string;\n /** Start maximized. Default: false */\n defaultMaximized?: boolean;\n}\n\nexport function ObjectInspector({\n open,\n onClose,\n title,\n subtitle,\n tabs,\n defaultTabId,\n actions,\n width = 720,\n maximizedWidth = '100vw',\n defaultMaximized = false,\n}: ObjectInspectorProps) {\n const [maximized, setMaximized] = useState<boolean>(defaultMaximized);\n const strings = useStrings();\n function resolveInitialTabId(): string {\n if (defaultTabId !== undefined) {\n return defaultTabId;\n }\n const firstEnabled = tabs.find((t) => !t.disabled);\n if (firstEnabled !== undefined) {\n return firstEnabled.id;\n }\n return tabs[0]?.id ?? '';\n }\n const [activeId, setActiveId] = useState<string>(resolveInitialTabId);\n\n const activeTab = tabs.find((t) => t.id === activeId);\n\n return (\n <Drawer\n open={open}\n onClose={onClose}\n width={maximized ? maximizedWidth : width}\n placement=\"right\"\n closable={false}\n className=\"aegis-object-inspector__drawer\"\n styles={{\n body: {\n padding: 0,\n display: 'flex',\n flexDirection: 'column',\n height: '100%',\n },\n header: { display: 'none' },\n }}\n >\n <div className=\"aegis-object-inspector\">\n {/* Header */}\n <header className=\"aegis-object-inspector__header\">\n <div className=\"aegis-object-inspector__header-text\">\n <span className=\"aegis-object-inspector__title\">{title}</span>\n {subtitle !== undefined ? (\n <MetricLabel className=\"aegis-object-inspector__subtitle\">\n {subtitle}\n </MetricLabel>\n ) : null}\n </div>\n <div className=\"aegis-object-inspector__header-buttons\">\n <button\n type=\"button\"\n className=\"aegis-object-inspector__close\"\n onClick={() => {\n setMaximized((m) => !m);\n }}\n aria-label={\n maximized ? strings.restoreInspector : strings.maximizeInspector\n }\n title={maximized ? strings.restore : strings.maximize}\n >\n {maximized ? <FullscreenExitOutlined /> : <FullscreenOutlined />}\n </button>\n <button\n type=\"button\"\n className=\"aegis-object-inspector__close\"\n onClick={onClose}\n aria-label={strings.closeInspector}\n >\n <CloseOutlined />\n </button>\n </div>\n </header>\n\n {/* Actions */}\n {actions !== undefined ? (\n <div className=\"aegis-object-inspector__actions\">\n <Toolbar left={actions} />\n </div>\n ) : null}\n\n {/* Tabs */}\n <div\n className=\"aegis-object-inspector__tablist\"\n role=\"tablist\"\n aria-label={strings.inspectorTabs}\n >\n {tabs.map((tab) => (\n <button\n key={tab.id}\n type=\"button\"\n role=\"tab\"\n aria-selected={tab.id === activeId}\n aria-disabled={tab.disabled}\n disabled={tab.disabled}\n className={[\n 'aegis-object-inspector__tab',\n tab.id === activeId\n ? 'aegis-object-inspector__tab--active'\n : '',\n tab.disabled ? 'aegis-object-inspector__tab--disabled' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n title={tab.disabled ? tab.hint : undefined}\n onClick={() => {\n if (!tab.disabled) {\n setActiveId(tab.id);\n }\n }}\n >\n {tab.label}\n </button>\n ))}\n </div>\n\n {/* Body */}\n <div className=\"aegis-object-inspector__body\" role=\"tabpanel\">\n {activeTab?.content}\n </div>\n </div>\n </Drawer>\n );\n}\n"],"names":["ObjectInspector","open","onClose","title","subtitle","tabs","defaultTabId","actions","width","maximizedWidth","defaultMaximized","maximized","setMaximized","useState","strings","useStrings","resolveInitialTabId","firstEnabled","t","activeId","setActiveId","activeTab","jsx","Drawer","jsxs","MetricLabel","m","FullscreenExitOutlined","FullscreenOutlined","CloseOutlined","Toolbar","tab"],"mappings":";;;;;;;;AAwCO,SAASA,EAAgB;AAAA,EAC9B,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AAAA,EACA,SAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,gBAAAC,IAAiB;AAAA,EACjB,kBAAAC,IAAmB;AACrB,GAAyB;AACvB,QAAM,CAACC,GAAWC,CAAY,IAAIC,EAAkBH,CAAgB,GAC9DI,IAAUC,EAAA;AAChB,WAASC,IAA8B;AACrC,QAAIV,MAAiB;AACnB,aAAOA;AAET,UAAMW,IAAeZ,EAAK,KAAK,CAACa,MAAM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AA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),t=require("./MetricLabel.cjs");;/* empty css */const g=require("./PanelTitle.cjs");function h({title:d,titleExtra:a,description:s,meta:i,action:r,className:c}){const n=["aegis-page-header",c??""].filter(Boolean).join(" "),l=e.jsx(g.PanelTitle,{size:"lg",as:"h1",className:"aegis-page-header__title",children:d});return e.jsxs("header",{className:n,children:[e.jsxs("div",{className:"aegis-page-header__text",children:[a===void 0?l:e.jsxs("div",{className:"aegis-page-header__title-row",children:[l,e.jsx("div",{className:"aegis-page-header__title-extra",children:a})]}),s?e.jsx(t.MetricLabel,{className:"aegis-page-header__description",children:s}):null,i!==void 0&&e.jsx("div",{className:"aegis-page-header__meta",children:i})]}),r&&e.jsx("div",{className:"aegis-page-header__action",children:r})]})}exports.PageHeader=h;
|
|
2
|
+
//# sourceMappingURL=PageHeader.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.cjs","sources":["../../../src/components/ui/PageHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { MetricLabel } from './MetricLabel';\nimport './PageHeader.css';\nimport { PanelTitle } from './PanelTitle';\n\ninterface PageHeaderProps {\n title: string;\n /** Inline content beside the title, e.g. a verdict badge and scores. */\n titleExtra?: ReactNode;\n /** One line under the title; may carry inline content such as an avatar. */\n description?: ReactNode;\n /** Label row under the description, e.g. a type badge and a version. */\n meta?: ReactNode;\n action?: ReactNode;\n className?: string;\n}\n\nexport function PageHeader({\n title,\n titleExtra,\n description,\n meta,\n action,\n className,\n}: PageHeaderProps) {\n const cls = ['aegis-page-header', className ?? ''].filter(Boolean).join(' ');\n const heading = (\n <PanelTitle size=\"lg\" as=\"h1\" className=\"aegis-page-header__title\">\n {title}\n </PanelTitle>\n );\n\n return (\n <header className={cls}>\n <div className=\"aegis-page-header__text\">\n {titleExtra === undefined ? (\n heading\n ) : (\n <div className=\"aegis-page-header__title-row\">\n {heading}\n <div className=\"aegis-page-header__title-extra\">{titleExtra}</div>\n </div>\n )}\n {description ? (\n <MetricLabel className=\"aegis-page-header__description\">\n {description}\n </MetricLabel>\n ) : null}\n {meta !== undefined && (\n <div className=\"aegis-page-header__meta\">{meta}</div>\n )}\n </div>\n {action && <div className=\"aegis-page-header__action\">{action}</div>}\n </header>\n );\n}\n"],"names":["PageHeader","title","titleExtra","description","meta","action","className","cls","heading","PanelTitle","jsxs","jsx","MetricLabel"],"mappings":"wNAkBO,SAASA,EAAW,CACzB,MAAAC,EACA,WAAAC,EACA,YAAAC,EACA,KAAAC,EACA,OAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAM,CAAC,oBAAqBD,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACrEE,QACHC,aAAA,CAAW,KAAK,KAAK,GAAG,KAAK,UAAU,2BACrC,SAAAR,CAAA,CACH,EAGF,OACES,EAAAA,KAAC,SAAA,CAAO,UAAWH,EACjB,SAAA,CAAAG,EAAAA,KAAC,MAAA,CAAI,UAAU,0BACZ,SAAA,CAAAR,IAAe,OACdM,EAEAE,EAAAA,KAAC,MAAA,CAAI,UAAU,+BACZ,SAAA,CAAAF,EACDG,EAAAA,IAAC,MAAA,CAAI,UAAU,iCAAkC,SAAAT,CAAA,CAAW,CAAA,EAC9D,EAEDC,EACCQ,EAAAA,IAACC,EAAAA,YAAA,CAAY,UAAU,iCACpB,WACH,EACE,KACHR,IAAS,QACRO,EAAAA,IAAC,MAAA,CAAI,UAAU,0BAA2B,SAAAP,CAAA,CAAK,CAAA,EAEnD,EACCC,GAAUM,EAAAA,IAAC,MAAA,CAAI,UAAU,4BAA6B,SAAAN,CAAA,CAAO,CAAA,EAChE,CAEJ"}
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { jsxs as a, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { MetricLabel as n } from "./MetricLabel.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { PanelTitle as t } from "./PanelTitle.js";
|
|
5
|
+
function N({
|
|
6
|
+
title: c,
|
|
7
|
+
titleExtra: i,
|
|
8
|
+
description: s,
|
|
9
|
+
meta: r,
|
|
10
|
+
action: l,
|
|
11
|
+
className: g
|
|
12
|
+
}) {
|
|
13
|
+
const h = ["aegis-page-header", g ?? ""].filter(Boolean).join(" "), d = /* @__PURE__ */ e(t, { size: "lg", as: "h1", className: "aegis-page-header__title", children: c });
|
|
14
|
+
return /* @__PURE__ */ a("header", { className: h, children: [
|
|
15
|
+
/* @__PURE__ */ a("div", { className: "aegis-page-header__text", children: [
|
|
16
|
+
i === void 0 ? d : /* @__PURE__ */ a("div", { className: "aegis-page-header__title-row", children: [
|
|
17
|
+
d,
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "aegis-page-header__title-extra", children: i })
|
|
19
|
+
] }),
|
|
20
|
+
s ? /* @__PURE__ */ e(n, { className: "aegis-page-header__description", children: s }) : null,
|
|
21
|
+
r !== void 0 && /* @__PURE__ */ e("div", { className: "aegis-page-header__meta", children: r })
|
|
22
|
+
] }),
|
|
23
|
+
l && /* @__PURE__ */ e("div", { className: "aegis-page-header__action", children: l })
|
|
24
|
+
] });
|
|
25
|
+
}
|
|
26
|
+
export {
|
|
27
|
+
N as PageHeader
|
|
28
|
+
};
|
|
29
|
+
//# sourceMappingURL=PageHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageHeader.js","sources":["../../../src/components/ui/PageHeader.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { MetricLabel } from './MetricLabel';\nimport './PageHeader.css';\nimport { PanelTitle } from './PanelTitle';\n\ninterface PageHeaderProps {\n title: string;\n /** Inline content beside the title, e.g. a verdict badge and scores. */\n titleExtra?: ReactNode;\n /** One line under the title; may carry inline content such as an avatar. */\n description?: ReactNode;\n /** Label row under the description, e.g. a type badge and a version. */\n meta?: ReactNode;\n action?: ReactNode;\n className?: string;\n}\n\nexport function PageHeader({\n title,\n titleExtra,\n description,\n meta,\n action,\n className,\n}: PageHeaderProps) {\n const cls = ['aegis-page-header', className ?? ''].filter(Boolean).join(' ');\n const heading = (\n <PanelTitle size=\"lg\" as=\"h1\" className=\"aegis-page-header__title\">\n {title}\n </PanelTitle>\n );\n\n return (\n <header className={cls}>\n <div className=\"aegis-page-header__text\">\n {titleExtra === undefined ? (\n heading\n ) : (\n <div className=\"aegis-page-header__title-row\">\n {heading}\n <div className=\"aegis-page-header__title-extra\">{titleExtra}</div>\n </div>\n )}\n {description ? (\n <MetricLabel className=\"aegis-page-header__description\">\n {description}\n </MetricLabel>\n ) : null}\n {meta !== undefined && (\n <div className=\"aegis-page-header__meta\">{meta}</div>\n )}\n </div>\n {action && <div className=\"aegis-page-header__action\">{action}</div>}\n </header>\n );\n}\n"],"names":["PageHeader","title","titleExtra","description","meta","action","className","cls","heading","PanelTitle","jsxs","jsx","MetricLabel"],"mappings":";;;;AAkBO,SAASA,EAAW;AAAA,EACzB,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAM,CAAC,qBAAqBD,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,GACrEE,sBACHC,GAAA,EAAW,MAAK,MAAK,IAAG,MAAK,WAAU,4BACrC,UAAAR,EAAA,CACH;AAGF,SACE,gBAAAS,EAAC,UAAA,EAAO,WAAWH,GACjB,UAAA;AAAA,IAAA,gBAAAG,EAAC,OAAA,EAAI,WAAU,2BACZ,UAAA;AAAA,MAAAR,MAAe,SACdM,IAEA,gBAAAE,EAAC,OAAA,EAAI,WAAU,gCACZ,UAAA;AAAA,QAAAF;AAAA,QACD,gBAAAG,EAAC,OAAA,EAAI,WAAU,kCAAkC,UAAAT,EAAA,CAAW;AAAA,MAAA,GAC9D;AAAA,MAEDC,IACC,gBAAAQ,EAACC,GAAA,EAAY,WAAU,kCACpB,aACH,IACE;AAAA,MACHR,MAAS,UACR,gBAAAO,EAAC,OAAA,EAAI,WAAU,2BAA2B,UAAAP,EAAA,CAAK;AAAA,IAAA,GAEnD;AAAA,IACCC,KAAU,gBAAAM,EAAC,OAAA,EAAI,WAAU,6BAA6B,UAAAN,EAAA,CAAO;AAAA,EAAA,GAChE;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),h=require("react"),x=require("@ant-design/icons"),f=require("antd"),r=require("../../hooks/useMenuPopover.cjs");;/* empty css */const z=require("../../locale/useStrings.cjs"),y=[10,20,50,100];function N({value:i,onChange:c,options:g=y,disabled:n=!1,label:p,className:u,placement:d="top"}){const _=z.useStrings(),t=p??_.rowsPerPage,o=h.useId(),s=r.useMenuPopover(),m=["aegis-page-size-select",u??""].filter(Boolean).join(" "),b=a=>{s.close(),a!==i&&c(a)},j=e.jsx("ul",{ref:s.panelRef,className:"aegis-page-size-select__panel",role:"listbox",tabIndex:-1,onKeyDown:s.onPanelKeyDown,children:g.map(a=>{const l=a===i;return e.jsx("li",{role:"presentation",children:e.jsx("button",{type:"button",role:"option","aria-selected":l,className:["aegis-page-size-select__item",l?"aegis-page-size-select__item--selected":""].filter(Boolean).join(" "),onClick:()=>{b(a)},children:e.jsx("span",{className:"aegis-page-size-select__item-value",children:a})})},a)})});return e.jsxs("div",{className:m,children:[t&&e.jsx("span",{className:"aegis-page-size-select__label",id:o,children:t}),e.jsx(f.Popover,{content:j,trigger:"click",open:n?!1:s.open,onOpenChange:s.setOpen,placement:d==="top"?"topRight":"bottomRight",autoAdjustOverflow:r.MENU_OVERFLOW,arrow:!1,classNames:{root:"aegis-page-size-select__overlay"},destroyOnHidden:!0,children:e.jsxs("button",{ref:s.triggerRef,type:"button",className:"aegis-page-size-select__trigger","aria-haspopup":"listbox","aria-expanded":s.open,"aria-labelledby":t?o:void 0,"aria-label":t?void 0:"Page size",disabled:n,onKeyDown:s.onTriggerKeyDown,children:[e.jsx("span",{className:"aegis-page-size-select__value",children:i}),e.jsx(x.DownOutlined,{className:"aegis-page-size-select__caret","aria-hidden":!0})]})})]})}exports.PageSizeSelect=N;
|
|
2
|
+
//# sourceMappingURL=PageSizeSelect.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSizeSelect.cjs","sources":["../../../src/components/ui/PageSizeSelect.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { DownOutlined } from '@ant-design/icons';\nimport { Popover } from 'antd';\n\nimport { MENU_OVERFLOW, useMenuPopover } from '../../hooks/useMenuPopover';\nimport { useStrings } from '../../locale';\nimport './PageSizeSelect.css';\n\nexport interface PageSizeSelectProps {\n value: number;\n onChange: (next: number) => void;\n options?: number[];\n disabled?: boolean;\n /** Defaults to the locale's \"rows per page\"; pass '' to hide the caption. */\n label?: string;\n className?: string;\n /**\n * Preferred side for the options panel. Default is 'top' because the\n * primitive was originally used as a pagination footer where the table\n * content is above; use 'bottom' when the trigger sits at the top of a\n * section. The panel flips when the preferred side has no room.\n */\n placement?: 'top' | 'bottom';\n}\n\nconst DEFAULT_OPTIONS: readonly number[] = [10, 20, 50, 100];\n\nexport function PageSizeSelect({\n value,\n onChange,\n options = DEFAULT_OPTIONS as number[],\n disabled = false,\n label: labelProp,\n className,\n placement = 'top',\n}: PageSizeSelectProps): ReactElement {\n const strings = useStrings();\n const label = labelProp ?? strings.rowsPerPage;\n const labelId = useId();\n const menu = useMenuPopover<HTMLUListElement>();\n\n const cls = ['aegis-page-size-select', className ?? '']\n .filter(Boolean)\n .join(' ');\n\n const pickOption = (next: number): void => {\n menu.close();\n if (next !== value) {\n onChange(next);\n }\n };\n\n const panel = (\n <ul\n ref={menu.panelRef}\n className=\"aegis-page-size-select__panel\"\n role=\"listbox\"\n tabIndex={-1}\n onKeyDown={menu.onPanelKeyDown}\n >\n {options.map((opt) => {\n const selected = opt === value;\n return (\n <li key={opt} role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n className={[\n 'aegis-page-size-select__item',\n selected ? 'aegis-page-size-select__item--selected' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n pickOption(opt);\n }}\n >\n <span className=\"aegis-page-size-select__item-value\">{opt}</span>\n </button>\n </li>\n );\n })}\n </ul>\n );\n\n return (\n <div className={cls}>\n {label && (\n <span className=\"aegis-page-size-select__label\" id={labelId}>\n {label}\n </span>\n )}\n <Popover\n content={panel}\n trigger=\"click\"\n open={disabled ? false : menu.open}\n onOpenChange={menu.setOpen}\n placement={placement === 'top' ? 'topRight' : 'bottomRight'}\n autoAdjustOverflow={MENU_OVERFLOW}\n arrow={false}\n classNames={{ root: 'aegis-page-size-select__overlay' }}\n destroyOnHidden\n >\n <button\n ref={menu.triggerRef}\n type=\"button\"\n className=\"aegis-page-size-select__trigger\"\n aria-haspopup=\"listbox\"\n aria-expanded={menu.open}\n aria-labelledby={label ? labelId : undefined}\n aria-label={!label ? 'Page size' : undefined}\n disabled={disabled}\n onKeyDown={menu.onTriggerKeyDown}\n >\n <span className=\"aegis-page-size-select__value\">{value}</span>\n <DownOutlined className=\"aegis-page-size-select__caret\" aria-hidden />\n </button>\n </Popover>\n </div>\n );\n}\n"],"names":["DEFAULT_OPTIONS","PageSizeSelect","value","onChange","options","disabled","labelProp","className","placement","strings","useStrings","label","labelId","useId","menu","useMenuPopover","cls","pickOption","next","panel","jsx","opt","selected","jsxs","Popover","MENU_OVERFLOW","DownOutlined"],"mappings":"wTA0BMA,EAAqC,CAAC,GAAI,GAAI,GAAI,GAAG,EAEpD,SAASC,EAAe,CAC7B,MAAAC,EACA,SAAAC,EACA,QAAAC,EAAUJ,EACV,SAAAK,EAAW,GACX,MAAOC,EACP,UAAAC,EACA,UAAAC,EAA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AAc,UACd,gBAAeA,EAAK,KACpB,kBAAiBH,EAAQC,EAAU,OACnC,aAAaD,EAAsB,OAAd,YACrB,SAAAN,EACA,UAAWS,EAAK,iBAEhB,SAAA,CAAAM,EAAAA,IAAC,OAAA,CAAK,UAAU,gCAAiC,SAAAlB,EAAM,EACvDkB,EAAAA,IAACM,EAAAA,aAAA,CAAa,UAAU,gCAAgC,cAAW,EAAA,CAAC,CAAA,CAAA,CAAA,CACtE,CAAA,CACF,EACF,CAEJ"}
|
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
import { jsx as s, jsxs as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as h } from "react";
|
|
3
|
+
import { DownOutlined as z } from "@ant-design/icons";
|
|
4
|
+
import { Popover as N } from "antd";
|
|
5
|
+
import { useMenuPopover as O, MENU_OVERFLOW as y } from "../../hooks/useMenuPopover.js";
|
|
6
|
+
/* empty css */
|
|
7
|
+
import { useStrings as w } from "../../locale/useStrings.js";
|
|
8
|
+
const P = [10, 20, 50, 100];
|
|
9
|
+
function S({
|
|
10
|
+
value: o,
|
|
11
|
+
onChange: c,
|
|
12
|
+
options: p = P,
|
|
13
|
+
disabled: t = !1,
|
|
14
|
+
label: g,
|
|
15
|
+
className: m,
|
|
16
|
+
placement: d = "top"
|
|
17
|
+
}) {
|
|
18
|
+
const _ = w(), i = g ?? _.rowsPerPage, l = h(), e = O(), u = ["aegis-page-size-select", m ?? ""].filter(Boolean).join(" "), f = (a) => {
|
|
19
|
+
e.close(), a !== o && c(a);
|
|
20
|
+
}, b = /* @__PURE__ */ s(
|
|
21
|
+
"ul",
|
|
22
|
+
{
|
|
23
|
+
ref: e.panelRef,
|
|
24
|
+
className: "aegis-page-size-select__panel",
|
|
25
|
+
role: "listbox",
|
|
26
|
+
tabIndex: -1,
|
|
27
|
+
onKeyDown: e.onPanelKeyDown,
|
|
28
|
+
children: p.map((a) => {
|
|
29
|
+
const n = a === o;
|
|
30
|
+
return /* @__PURE__ */ s("li", { role: "presentation", children: /* @__PURE__ */ s(
|
|
31
|
+
"button",
|
|
32
|
+
{
|
|
33
|
+
type: "button",
|
|
34
|
+
role: "option",
|
|
35
|
+
"aria-selected": n,
|
|
36
|
+
className: [
|
|
37
|
+
"aegis-page-size-select__item",
|
|
38
|
+
n ? "aegis-page-size-select__item--selected" : ""
|
|
39
|
+
].filter(Boolean).join(" "),
|
|
40
|
+
onClick: () => {
|
|
41
|
+
f(a);
|
|
42
|
+
},
|
|
43
|
+
children: /* @__PURE__ */ s("span", { className: "aegis-page-size-select__item-value", children: a })
|
|
44
|
+
}
|
|
45
|
+
) }, a);
|
|
46
|
+
})
|
|
47
|
+
}
|
|
48
|
+
);
|
|
49
|
+
return /* @__PURE__ */ r("div", { className: u, children: [
|
|
50
|
+
i && /* @__PURE__ */ s("span", { className: "aegis-page-size-select__label", id: l, children: i }),
|
|
51
|
+
/* @__PURE__ */ s(
|
|
52
|
+
N,
|
|
53
|
+
{
|
|
54
|
+
content: b,
|
|
55
|
+
trigger: "click",
|
|
56
|
+
open: t ? !1 : e.open,
|
|
57
|
+
onOpenChange: e.setOpen,
|
|
58
|
+
placement: d === "top" ? "topRight" : "bottomRight",
|
|
59
|
+
autoAdjustOverflow: y,
|
|
60
|
+
arrow: !1,
|
|
61
|
+
classNames: { root: "aegis-page-size-select__overlay" },
|
|
62
|
+
destroyOnHidden: !0,
|
|
63
|
+
children: /* @__PURE__ */ r(
|
|
64
|
+
"button",
|
|
65
|
+
{
|
|
66
|
+
ref: e.triggerRef,
|
|
67
|
+
type: "button",
|
|
68
|
+
className: "aegis-page-size-select__trigger",
|
|
69
|
+
"aria-haspopup": "listbox",
|
|
70
|
+
"aria-expanded": e.open,
|
|
71
|
+
"aria-labelledby": i ? l : void 0,
|
|
72
|
+
"aria-label": i ? void 0 : "Page size",
|
|
73
|
+
disabled: t,
|
|
74
|
+
onKeyDown: e.onTriggerKeyDown,
|
|
75
|
+
children: [
|
|
76
|
+
/* @__PURE__ */ s("span", { className: "aegis-page-size-select__value", children: o }),
|
|
77
|
+
/* @__PURE__ */ s(z, { className: "aegis-page-size-select__caret", "aria-hidden": !0 })
|
|
78
|
+
]
|
|
79
|
+
}
|
|
80
|
+
)
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
] });
|
|
84
|
+
}
|
|
85
|
+
export {
|
|
86
|
+
S as PageSizeSelect
|
|
87
|
+
};
|
|
88
|
+
//# sourceMappingURL=PageSizeSelect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PageSizeSelect.js","sources":["../../../src/components/ui/PageSizeSelect.tsx"],"sourcesContent":["import { type ReactElement, useId } from 'react';\n\nimport { DownOutlined } from '@ant-design/icons';\nimport { Popover } from 'antd';\n\nimport { MENU_OVERFLOW, useMenuPopover } from '../../hooks/useMenuPopover';\nimport { useStrings } from '../../locale';\nimport './PageSizeSelect.css';\n\nexport interface PageSizeSelectProps {\n value: number;\n onChange: (next: number) => void;\n options?: number[];\n disabled?: boolean;\n /** Defaults to the locale's \"rows per page\"; pass '' to hide the caption. */\n label?: string;\n className?: string;\n /**\n * Preferred side for the options panel. Default is 'top' because the\n * primitive was originally used as a pagination footer where the table\n * content is above; use 'bottom' when the trigger sits at the top of a\n * section. The panel flips when the preferred side has no room.\n */\n placement?: 'top' | 'bottom';\n}\n\nconst DEFAULT_OPTIONS: readonly number[] = [10, 20, 50, 100];\n\nexport function PageSizeSelect({\n value,\n onChange,\n options = DEFAULT_OPTIONS as number[],\n disabled = false,\n label: labelProp,\n className,\n placement = 'top',\n}: PageSizeSelectProps): ReactElement {\n const strings = useStrings();\n const label = labelProp ?? strings.rowsPerPage;\n const labelId = useId();\n const menu = useMenuPopover<HTMLUListElement>();\n\n const cls = ['aegis-page-size-select', className ?? '']\n .filter(Boolean)\n .join(' ');\n\n const pickOption = (next: number): void => {\n menu.close();\n if (next !== value) {\n onChange(next);\n }\n };\n\n const panel = (\n <ul\n ref={menu.panelRef}\n className=\"aegis-page-size-select__panel\"\n role=\"listbox\"\n tabIndex={-1}\n onKeyDown={menu.onPanelKeyDown}\n >\n {options.map((opt) => {\n const selected = opt === value;\n return (\n <li key={opt} role=\"presentation\">\n <button\n type=\"button\"\n role=\"option\"\n aria-selected={selected}\n className={[\n 'aegis-page-size-select__item',\n selected ? 'aegis-page-size-select__item--selected' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n onClick={() => {\n pickOption(opt);\n }}\n >\n <span className=\"aegis-page-size-select__item-value\">{opt}</span>\n </button>\n </li>\n );\n })}\n </ul>\n );\n\n return (\n <div className={cls}>\n {label && (\n <span className=\"aegis-page-size-select__label\" id={labelId}>\n {label}\n </span>\n )}\n <Popover\n content={panel}\n trigger=\"click\"\n open={disabled ? false : menu.open}\n onOpenChange={menu.setOpen}\n placement={placement === 'top' ? 'topRight' : 'bottomRight'}\n autoAdjustOverflow={MENU_OVERFLOW}\n arrow={false}\n classNames={{ root: 'aegis-page-size-select__overlay' }}\n destroyOnHidden\n >\n <button\n ref={menu.triggerRef}\n type=\"button\"\n className=\"aegis-page-size-select__trigger\"\n aria-haspopup=\"listbox\"\n aria-expanded={menu.open}\n aria-labelledby={label ? labelId : undefined}\n aria-label={!label ? 'Page size' : undefined}\n disabled={disabled}\n onKeyDown={menu.onTriggerKeyDown}\n >\n <span className=\"aegis-page-size-select__value\">{value}</span>\n <DownOutlined className=\"aegis-page-size-select__caret\" aria-hidden />\n </button>\n </Popover>\n </div>\n );\n}\n"],"names":["DEFAULT_OPTIONS","PageSizeSelect","value","onChange","options","disabled","labelProp","className","placement","strings","useStrings","label","labelId","useId","menu","useMenuPopover","cls","pickOption","next","panel","jsx","opt","selected","jsxs","Popover","MENU_OVERFLOW","DownOutlined"],"mappings":";;;;;;;AA0BA,MAAMA,IAAqC,CAAC,IAAI,IAAI,IAAI,GAAG;AAEpD,SAASC,EAAe;AAAA,EAC7B,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC,IAAUJ;AAAA,EACV,UAAAK,IAAW;A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AA,QACR,MAAMd,IAAW,KAAQS,EAAK;AAAA,QAC9B,cAAcA,EAAK;AAAA,QACnB,WAAWN,MAAc,QAAQ,aAAa;AAAA,QAC9C,oBAAoBiB;AAAA,QACpB,OAAO;AAAA,QACP,YAAY,EAAE,MAAM,kCAAA;AAAA,QACpB,iBAAe;AAAA,QAEf,UAAA,gBAAAF;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,KAAKT,EAAK;AAAA,YACV,MAAK;AAAA,YACL,WAAU;AAAA,YACV,iBAAc;AAAA,YACd,iBAAeA,EAAK;AAAA,YACpB,mBAAiBH,IAAQC,IAAU;AAAA,YACnC,cAAaD,IAAsB,SAAd;AAAA,YACrB,UAAAN;AAAA,YACA,WAAWS,EAAK;AAAA,YAEhB,UAAA;AAAA,cAAA,gBAAAM,EAAC,QAAA,EAAK,WAAU,iCAAiC,UAAAlB,GAAM;AAAA,cACvD,gBAAAkB,EAACM,GAAA,EAAa,WAAU,iCAAgC,eAAW,GAAA,CAAC;AAAA,YAAA;AAAA,UAAA;AAAA,QAAA;AAAA,MACtE;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),a=require("./Button.cjs"),j=require("./PageSizeSelect.cjs");;/* empty css */const x=require("../../locale/useStrings.cjs");function P({page:e,pageSize:t,total:o=0,onChange:s,pageSizeOptions:c,unit:l,className:u}){const i=x.useStrings(),r=Math.max(1,Math.ceil(o/t)),d=["aegis-pagination",u??""].filter(Boolean).join(" ");return n.jsxs("div",{className:d,children:[n.jsx("span",{className:"aegis-pagination__count",children:i.totalCount(o,l??i.recordsUnit)}),n.jsx(j.PageSizeSelect,{value:t,options:c,onChange:g=>{s(1,g)}}),n.jsx(a.Button,{tone:"secondary",disabled:e<=1,onClick:()=>{s(e-1,t)},children:i.previousPage}),n.jsx("span",{className:"aegis-pagination__page",children:`${String(e)} / ${String(r)}`}),n.jsx(a.Button,{tone:"secondary",disabled:e>=r,onClick:()=>{s(e+1,t)},children:i.nextPage})]})}exports.Pagination=P;
|
|
2
|
+
//# sourceMappingURL=Pagination.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.cjs","sources":["../../../src/components/ui/Pagination.tsx"],"sourcesContent":["import { useStrings } from '../../locale';\nimport { Button } from './Button';\nimport { PageSizeSelect } from './PageSizeSelect';\nimport './Pagination.css';\n\ninterface PaginationProps {\n page: number;\n pageSize: number;\n /** Optional so a `DataTablePagination` can be spread straight in. */\n total?: number;\n onChange: (page: number, pageSize: number) => void;\n pageSizeOptions?: number[];\n /** Noun used in the total count, e.g. \"steps\"; defaults to the locale's records unit. */\n unit?: string;\n className?: string;\n}\n\nexport function Pagination({\n page,\n pageSize,\n total = 0,\n onChange,\n pageSizeOptions,\n unit,\n className,\n}: PaginationProps) {\n const strings = useStrings();\n const pages = Math.max(1, Math.ceil(total / pageSize));\n const cls = ['aegis-pagination', className ?? ''].filter(Boolean).join(' ');\n return (\n <div className={cls}>\n <span className=\"aegis-pagination__count\">\n {strings.totalCount(total, unit ?? strings.recordsUnit)}\n </span>\n <PageSizeSelect\n value={pageSize}\n options={pageSizeOptions}\n onChange={(size) => {\n onChange(1, size);\n }}\n />\n <Button\n tone=\"secondary\"\n disabled={page <= 1}\n onClick={() => {\n onChange(page - 1, pageSize);\n }}\n >\n {strings.previousPage}\n </Button>\n <span className=\"aegis-pagination__page\">{`${String(page)} / ${String(pages)}`}</span>\n <Button\n tone=\"secondary\"\n disabled={page >= pages}\n onClick={() => {\n onChange(page + 1, pageSize);\n }}\n >\n {strings.nextPage}\n </Button>\n </div>\n );\n}\n"],"names":["Pagination","page","pageSize","total","onChange","pageSizeOptions","unit","className","strings","useStrings","pages","cls","jsxs","jsx","PageSizeSelect","size","Button"],"mappings":"gQAiBO,SAASA,EAAW,CACzB,KAAAC,EACA,SAAAC,EACA,MAAAC,EAAQ,EACR,SAAAC,EACA,gBAAAC,EACA,KAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EAAQ,KAAK,IAAI,EAAG,KAAK,KAAKP,EAAQD,CAAQ,CAAC,EAC/CS,EAAM,CAAC,mBAAoBJ,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAC1E,OACEK,EAAAA,KAAC,MAAA,CAAI,UAAWD,EACd,SAAA,CAAAE,EAAAA,IAAC,OAAA,CAAK,UAAU,0BACb,SAAAL,EAAQ,WAAWL,EAAOG,GAAQE,EAAQ,WAAW,CAAA,CACxD,EACAK,EAAAA,IAACC,EAAAA,eAAA,CACC,MAAOZ,EACP,QAASG,EACT,SAAWU,GAAS,CAClBX,EAAS,EAAGW,CAAI,CAClB,CAAA,CAAA,EAEFF,EAAAA,IAACG,EAAAA,OAAA,CACC,KAAK,YACL,SAAUf,GAAQ,EAClB,QAAS,IAAM,CACbG,EAASH,EAAO,EAAGC,CAAQ,CAC7B,EAEC,SAAAM,EAAQ,YAAA,CAAA,EAEXK,EAAAA,IAAC,OAAA,CAAK,UAAU,yBAA0B,SAAA,GAAG,OAAOZ,CAAI,CAAC,MAAM,OAAOS,CAAK,CAAC,EAAA,CAAG,EAC/EG,EAAAA,IAACG,EAAAA,OAAA,CACC,KAAK,YACL,SAAUf,GAAQS,EAClB,QAAS,IAAM,CACbN,EAASH,EAAO,EAAGC,CAAQ,CAC7B,EAEC,SAAAM,EAAQ,QAAA,CAAA,CACX,EACF,CAEJ"}
|