@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,56 @@
|
|
|
1
|
+
import { jsxs as p, jsx as i } from "react/jsx-runtime";
|
|
2
|
+
import { Button as e } from "./Button.js";
|
|
3
|
+
import { PageSizeSelect as u } from "./PageSizeSelect.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useStrings as f } from "../../locale/useStrings.js";
|
|
6
|
+
function v({
|
|
7
|
+
page: n,
|
|
8
|
+
pageSize: o,
|
|
9
|
+
total: r = 0,
|
|
10
|
+
onChange: s,
|
|
11
|
+
pageSizeOptions: c,
|
|
12
|
+
unit: l,
|
|
13
|
+
className: d
|
|
14
|
+
}) {
|
|
15
|
+
const t = f(), a = Math.max(1, Math.ceil(r / o)), m = ["aegis-pagination", d ?? ""].filter(Boolean).join(" ");
|
|
16
|
+
return /* @__PURE__ */ p("div", { className: m, children: [
|
|
17
|
+
/* @__PURE__ */ i("span", { className: "aegis-pagination__count", children: t.totalCount(r, l ?? t.recordsUnit) }),
|
|
18
|
+
/* @__PURE__ */ i(
|
|
19
|
+
u,
|
|
20
|
+
{
|
|
21
|
+
value: o,
|
|
22
|
+
options: c,
|
|
23
|
+
onChange: (g) => {
|
|
24
|
+
s(1, g);
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
),
|
|
28
|
+
/* @__PURE__ */ i(
|
|
29
|
+
e,
|
|
30
|
+
{
|
|
31
|
+
tone: "secondary",
|
|
32
|
+
disabled: n <= 1,
|
|
33
|
+
onClick: () => {
|
|
34
|
+
s(n - 1, o);
|
|
35
|
+
},
|
|
36
|
+
children: t.previousPage
|
|
37
|
+
}
|
|
38
|
+
),
|
|
39
|
+
/* @__PURE__ */ i("span", { className: "aegis-pagination__page", children: `${String(n)} / ${String(a)}` }),
|
|
40
|
+
/* @__PURE__ */ i(
|
|
41
|
+
e,
|
|
42
|
+
{
|
|
43
|
+
tone: "secondary",
|
|
44
|
+
disabled: n >= a,
|
|
45
|
+
onClick: () => {
|
|
46
|
+
s(n + 1, o);
|
|
47
|
+
},
|
|
48
|
+
children: t.nextPage
|
|
49
|
+
}
|
|
50
|
+
)
|
|
51
|
+
] });
|
|
52
|
+
}
|
|
53
|
+
export {
|
|
54
|
+
v as Pagination
|
|
55
|
+
};
|
|
56
|
+
//# sourceMappingURL=Pagination.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pagination.js","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":";;;;;AAiBO,SAASA,EAAW;AAAA,EACzB,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,OAAAC,IAAQ;AAAA,EACR,UAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAUC,EAAA,GACVC,IAAQ,KAAK,IAAI,GAAG,KAAK,KAAKP,IAAQD,CAAQ,CAAC,GAC/CS,IAAM,CAAC,oBAAoBJ,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAC1E,SACE,gBAAAK,EAAC,OAAA,EAAI,WAAWD,GACd,UAAA;AAAA,IAAA,gBAAAE,EAAC,QAAA,EAAK,WAAU,2BACb,UAAAL,EAAQ,WAAWL,GAAOG,KAAQE,EAAQ,WAAW,EAAA,CACxD;AAAA,IACA,gBAAAK;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAOZ;AAAA,QACP,SAASG;AAAA,QACT,UAAU,CAACU,MAAS;AAClB,UAAAX,EAAS,GAAGW,CAAI;AAAA,QAClB;AAAA,MAAA;AAAA,IAAA;AAAA,IAEF,gBAAAF;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAUf,KAAQ;AAAA,QAClB,SAAS,MAAM;AACb,UAAAG,EAASH,IAAO,GAAGC,CAAQ;AAAA,QAC7B;AAAA,QAEC,UAAAM,EAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEX,gBAAAK,EAAC,QAAA,EAAK,WAAU,0BAA0B,UAAA,GAAG,OAAOZ,CAAI,CAAC,MAAM,OAAOS,CAAK,CAAC,GAAA,CAAG;AAAA,IAC/E,gBAAAG;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,UAAUf,KAAQS;AAAA,QAClB,SAAS,MAAM;AACb,UAAAN,EAASH,IAAO,GAAGC,CAAQ;AAAA,QAC7B;AAAA,QAEC,UAAAM,EAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,EACX,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),x=require("react"),N=require("../../agent/core/usePrimitiveSurface.cjs");;/* empty css */const k=require("./linkComponent.cjs");function q({title:s,description:a,extra:n,variant:t="solid",elevation:c="rest",padded:d=!0,to:i,linkComponent:p,className:u,style:g,children:_,surface:m}){const l=x.useRef(null),h=N.usePrimitiveSurface(m,null,"panel",l),j=p??k.DefaultLink,f=["aegis-panel",`aegis-panel--${t}`,`aegis-panel--${c}`,i===void 0?"":"aegis-panel--link",u??""].filter(Boolean).join(" "),v=!!(s??n??a),r=typeof s=="string"?e.jsx("span",{className:"aegis-panel__title",children:s}):s,o=i===void 0?r:e.jsx(j,{to:i,className:"aegis-panel__link",children:r});return e.jsxs("section",{ref:l,className:f,style:g,...h,children:[v&&e.jsxs("header",{className:"aegis-panel__header",children:[a===void 0?o:e.jsxs("div",{className:"aegis-panel__heading",children:[o,e.jsx("span",{className:"aegis-panel__description",children:a})]}),n&&e.jsx("div",{className:"aegis-panel__extra",children:n})]}),e.jsx("div",{className:`aegis-panel__body${d?" aegis-panel__body--padded":""}`,children:_})]})}exports.Panel=q;
|
|
2
|
+
//# sourceMappingURL=Panel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.cjs","sources":["../../../src/components/ui/Panel.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useRef } from 'react';\n\nimport {\n type ContainerSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './Panel.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\nexport type PanelSurface = ContainerSurface;\n\n/**\n * `tint` for showcase blocks on overview and article pages, `brand` for\n * featured content, `glass` for a panel laid over a gradient or image.\n */\nexport type PanelVariant = 'solid' | 'tint' | 'brand' | 'glass';\n\n/** `raised` lifts featured and hero cards above the resting cards. */\nexport type PanelElevation = 'rest' | 'raised';\n\ninterface PanelBaseProps {\n /** Muted line under the title, e.g. a chart's metric and direction. */\n description?: ReactNode;\n extra?: ReactNode;\n variant?: PanelVariant;\n elevation?: PanelElevation;\n /** False drops the body padding, e.g. for a table that fills the panel. */\n padded?: boolean;\n className?: string;\n style?: CSSProperties;\n children?: ReactNode;\n surface?: PanelSurface;\n}\n\ninterface PanelStaticProps extends PanelBaseProps {\n title?: ReactNode;\n to?: undefined;\n linkComponent?: undefined;\n}\n\ninterface PanelLinkProps extends PanelBaseProps {\n /** The link's text; the link covers the whole panel. */\n title: ReactNode;\n /**\n * Destination; the panel lifts on hover. Controls belong in `extra`,\n * which stays clickable above the link; the body is part of the link.\n */\n to: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n}\n\ntype PanelProps = PanelStaticProps | PanelLinkProps;\n\nexport function Panel({\n title,\n description,\n extra,\n variant = 'solid',\n elevation = 'rest',\n padded = true,\n to,\n linkComponent,\n className,\n style,\n children,\n surface,\n}: PanelProps) {\n const wrapRef = useRef<HTMLElement>(null);\n const agentAttrs = usePrimitiveSurface(surface, null, 'panel', wrapRef);\n const LinkImpl = linkComponent ?? DefaultLink;\n const rootClass = [\n 'aegis-panel',\n `aegis-panel--${variant}`,\n `aegis-panel--${elevation}`,\n to === undefined ? '' : 'aegis-panel--link',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const showHeader = Boolean(title ?? extra ?? description);\n const titleText =\n typeof title === 'string' ? (\n <span className=\"aegis-panel__title\">{title}</span>\n ) : (\n title\n );\n const titleNode =\n to === undefined ? (\n titleText\n ) : (\n <LinkImpl to={to} className=\"aegis-panel__link\">\n {titleText}\n </LinkImpl>\n );\n\n return (\n <section ref={wrapRef} className={rootClass} style={style} {...agentAttrs}>\n {showHeader && (\n <header className=\"aegis-panel__header\">\n {description === undefined ? (\n titleNode\n ) : (\n <div className=\"aegis-panel__heading\">\n {titleNode}\n <span className=\"aegis-panel__description\">{description}</span>\n </div>\n )}\n {extra && <div className=\"aegis-panel__extra\">{extra}</div>}\n </header>\n )}\n <div\n className={`aegis-panel__body${padded ? ' aegis-panel__body--padded' : ''}`}\n >\n {children}\n </div>\n </section>\n );\n}\n"],"names":["Panel","title","description","extra","variant","elevation","padded","to","linkComponent","className","style","children","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","LinkImpl","DefaultLink","rootClass","showHeader","titleText","titleNode","jsxs","jsx"],"mappings":"gQAsDO,SAASA,EAAM,CACpB,MAAAC,EACA,YAAAC,EACA,MAAAC,EACA,QAAAC,EAAU,QACV,UAAAC,EAAY,OACZ,OAAAC,EAAS,GACT,GAAAC,EAAA,cACAC,EACA,UAAAC,EACA,MAAAC,EACA,SAAAC,EACA,QAAAC,CACF,EAAe,CACb,MAAMC,EAAUC,EAAAA,OAAoB,IAAI,EAClCC,EAAaC,EAAAA,oBAAoBJ,EAAS,KAAM,QAASC,CAAO,EAChEI,EAAWT,GAAiBU,EAAAA,YAC5BC,EAAY,CAChB,cACA,gBAAgBf,CAAO,GACvB,gBAAgBC,CAAS,GACzBE,IAAO,OAAY,GAAK,oBACxBE,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAELW,EAAa,GAAQnB,GAASE,GAASD,GACvCmB,EACJ,OAAOpB,GAAU,eACd,OAAA,CAAK,UAAU,qBAAsB,SAAAA,CAAA,CAAM,EAE5CA,EAEEqB,EACJf,IAAO,OACLc,QAECJ,EAAA,CAAS,GAAAV,EAAQ,UAAU,oBACzB,SAAAc,CAAA,CACH,EAGJ,OACEE,OAAC,WAAQ,IAAKV,EAAS,UAAWM,EAAW,MAAAT,EAAe,GAAGK,EAC5D,SAAA,CAAAK,GACCG,EAAAA,KAAC,SAAA,CAAO,UAAU,sBACf,SAAA,CAAArB,IAAgB,OACfoB,EAEAC,EAAAA,KAAC,MAAA,CAAI,UAAU,uBACZ,SAAA,CAAAD,EACDE,EAAAA,IAAC,OAAA,CAAK,UAAU,2BAA4B,SAAAtB,CAAA,CAAY,CAAA,EAC1D,EAEDC,GAASqB,EAAAA,IAAC,MAAA,CAAI,UAAU,qBAAsB,SAAArB,CAAA,CAAM,CAAA,EACvD,EAEFqB,EAAAA,IAAC,MAAA,CACC,UAAW,oBAAoBlB,EAAS,6BAA+B,EAAE,GAExE,SAAAK,CAAA,CAAA,CACH,EACF,CAEJ"}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
|
-
import { ContainerSurface } from '../../agent/usePrimitiveSurface';
|
|
2
|
+
import { ContainerSurface } from '../../agent/core/usePrimitiveSurface';
|
|
3
3
|
import { LinkComponent } from './linkComponent';
|
|
4
4
|
export type PanelSurface = ContainerSurface;
|
|
5
5
|
/**
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { jsxs as l, jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as j } from "react";
|
|
3
|
+
import { usePrimitiveSurface as x } from "../../agent/core/usePrimitiveSurface.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { DefaultLink as y } from "./linkComponent.js";
|
|
6
|
+
function P({
|
|
7
|
+
title: a,
|
|
8
|
+
description: s,
|
|
9
|
+
extra: n,
|
|
10
|
+
variant: p = "solid",
|
|
11
|
+
elevation: t = "rest",
|
|
12
|
+
padded: d = !0,
|
|
13
|
+
to: i,
|
|
14
|
+
linkComponent: m,
|
|
15
|
+
className: _,
|
|
16
|
+
style: g,
|
|
17
|
+
children: f,
|
|
18
|
+
surface: h
|
|
19
|
+
}) {
|
|
20
|
+
const o = j(null), u = x(h, null, "panel", o), N = m ?? y, v = [
|
|
21
|
+
"aegis-panel",
|
|
22
|
+
`aegis-panel--${p}`,
|
|
23
|
+
`aegis-panel--${t}`,
|
|
24
|
+
i === void 0 ? "" : "aegis-panel--link",
|
|
25
|
+
_ ?? ""
|
|
26
|
+
].filter(Boolean).join(" "), k = !!(a ?? n ?? s), r = typeof a == "string" ? /* @__PURE__ */ e("span", { className: "aegis-panel__title", children: a }) : a, c = i === void 0 ? r : /* @__PURE__ */ e(N, { to: i, className: "aegis-panel__link", children: r });
|
|
27
|
+
return /* @__PURE__ */ l("section", { ref: o, className: v, style: g, ...u, children: [
|
|
28
|
+
k && /* @__PURE__ */ l("header", { className: "aegis-panel__header", children: [
|
|
29
|
+
s === void 0 ? c : /* @__PURE__ */ l("div", { className: "aegis-panel__heading", children: [
|
|
30
|
+
c,
|
|
31
|
+
/* @__PURE__ */ e("span", { className: "aegis-panel__description", children: s })
|
|
32
|
+
] }),
|
|
33
|
+
n && /* @__PURE__ */ e("div", { className: "aegis-panel__extra", children: n })
|
|
34
|
+
] }),
|
|
35
|
+
/* @__PURE__ */ e(
|
|
36
|
+
"div",
|
|
37
|
+
{
|
|
38
|
+
className: `aegis-panel__body${d ? " aegis-panel__body--padded" : ""}`,
|
|
39
|
+
children: f
|
|
40
|
+
}
|
|
41
|
+
)
|
|
42
|
+
] });
|
|
43
|
+
}
|
|
44
|
+
export {
|
|
45
|
+
P as Panel
|
|
46
|
+
};
|
|
47
|
+
//# sourceMappingURL=Panel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Panel.js","sources":["../../../src/components/ui/Panel.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode, useRef } from 'react';\n\nimport {\n type ContainerSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './Panel.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\nexport type PanelSurface = ContainerSurface;\n\n/**\n * `tint` for showcase blocks on overview and article pages, `brand` for\n * featured content, `glass` for a panel laid over a gradient or image.\n */\nexport type PanelVariant = 'solid' | 'tint' | 'brand' | 'glass';\n\n/** `raised` lifts featured and hero cards above the resting cards. */\nexport type PanelElevation = 'rest' | 'raised';\n\ninterface PanelBaseProps {\n /** Muted line under the title, e.g. a chart's metric and direction. */\n description?: ReactNode;\n extra?: ReactNode;\n variant?: PanelVariant;\n elevation?: PanelElevation;\n /** False drops the body padding, e.g. for a table that fills the panel. */\n padded?: boolean;\n className?: string;\n style?: CSSProperties;\n children?: ReactNode;\n surface?: PanelSurface;\n}\n\ninterface PanelStaticProps extends PanelBaseProps {\n title?: ReactNode;\n to?: undefined;\n linkComponent?: undefined;\n}\n\ninterface PanelLinkProps extends PanelBaseProps {\n /** The link's text; the link covers the whole panel. */\n title: ReactNode;\n /**\n * Destination; the panel lifts on hover. Controls belong in `extra`,\n * which stays clickable above the link; the body is part of the link.\n */\n to: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n}\n\ntype PanelProps = PanelStaticProps | PanelLinkProps;\n\nexport function Panel({\n title,\n description,\n extra,\n variant = 'solid',\n elevation = 'rest',\n padded = true,\n to,\n linkComponent,\n className,\n style,\n children,\n surface,\n}: PanelProps) {\n const wrapRef = useRef<HTMLElement>(null);\n const agentAttrs = usePrimitiveSurface(surface, null, 'panel', wrapRef);\n const LinkImpl = linkComponent ?? DefaultLink;\n const rootClass = [\n 'aegis-panel',\n `aegis-panel--${variant}`,\n `aegis-panel--${elevation}`,\n to === undefined ? '' : 'aegis-panel--link',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const showHeader = Boolean(title ?? extra ?? description);\n const titleText =\n typeof title === 'string' ? (\n <span className=\"aegis-panel__title\">{title}</span>\n ) : (\n title\n );\n const titleNode =\n to === undefined ? (\n titleText\n ) : (\n <LinkImpl to={to} className=\"aegis-panel__link\">\n {titleText}\n </LinkImpl>\n );\n\n return (\n <section ref={wrapRef} className={rootClass} style={style} {...agentAttrs}>\n {showHeader && (\n <header className=\"aegis-panel__header\">\n {description === undefined ? (\n titleNode\n ) : (\n <div className=\"aegis-panel__heading\">\n {titleNode}\n <span className=\"aegis-panel__description\">{description}</span>\n </div>\n )}\n {extra && <div className=\"aegis-panel__extra\">{extra}</div>}\n </header>\n )}\n <div\n className={`aegis-panel__body${padded ? ' aegis-panel__body--padded' : ''}`}\n >\n {children}\n </div>\n </section>\n );\n}\n"],"names":["Panel","title","description","extra","variant","elevation","padded","to","linkComponent","className","style","children","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","LinkImpl","DefaultLink","rootClass","showHeader","titleText","titleNode","jsxs","jsx"],"mappings":";;;;;AAsDO,SAASA,EAAM;AAAA,EACpB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,OAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,WAAAC,IAAY;AAAA,EACZ,QAAAC,IAAS;AAAA,EACT,IAAAC;AAAA,EACA,eAAAC;AAAA,EACA,WAAAC;AAAA,EACA,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,SAAAC;AACF,GAAe;AACb,QAAMC,IAAUC,EAAoB,IAAI,GAClCC,IAAaC,EAAoBJ,GAAS,MAAM,SAASC,CAAO,GAChEI,IAAWT,KAAiBU,GAC5BC,IAAY;AAAA,IAChB;AAAA,IACA,gBAAgBf,CAAO;AAAA,IACvB,gBAAgBC,CAAS;AAAA,IACzBE,MAAO,SAAY,KAAK;AAAA,IACxBE,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,GAELW,IAAa,GAAQnB,KAASE,KAASD,IACvCmB,IACJ,OAAOpB,KAAU,6BACd,QAAA,EAAK,WAAU,sBAAsB,UAAAA,EAAA,CAAM,IAE5CA,GAEEqB,IACJf,MAAO,SACLc,sBAECJ,GAAA,EAAS,IAAAV,GAAQ,WAAU,qBACzB,UAAAc,EAAA,CACH;AAGJ,SACE,gBAAAE,EAAC,aAAQ,KAAKV,GAAS,WAAWM,GAAW,OAAAT,GAAe,GAAGK,GAC5D,UAAA;AAAA,IAAAK,KACC,gBAAAG,EAAC,UAAA,EAAO,WAAU,uBACf,UAAA;AAAA,MAAArB,MAAgB,SACfoB,IAEA,gBAAAC,EAAC,OAAA,EAAI,WAAU,wBACZ,UAAA;AAAA,QAAAD;AAAA,QACD,gBAAAE,EAAC,QAAA,EAAK,WAAU,4BAA4B,UAAAtB,EAAA,CAAY;AAAA,MAAA,GAC1D;AAAA,MAEDC,KAAS,gBAAAqB,EAAC,OAAA,EAAI,WAAU,sBAAsB,UAAArB,EAAA,CAAM;AAAA,IAAA,GACvD;AAAA,IAEF,gBAAAqB;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAW,oBAAoBlB,IAAS,+BAA+B,EAAE;AAAA,QAExE,UAAAK;AAAA,MAAA;AAAA,IAAA;AAAA,EACH,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime");;/* empty css */const n={sm:"aegis-panel-title--sm",base:"aegis-panel-title--base",lg:"aegis-panel-title--lg",hero:"aegis-panel-title--hero"};function o({children:e,as:s="span",size:t="base",className:l}){const a=["aegis-panel-title",n[t],l??""].filter(Boolean).join(" ");return i.jsx(s,{className:a,children:e})}exports.PanelTitle=o;
|
|
2
|
+
//# sourceMappingURL=PanelTitle.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelTitle.cjs","sources":["../../../src/components/ui/PanelTitle.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './PanelTitle.css';\n\ninterface PanelTitleProps {\n children: ReactNode;\n as?: 'span' | 'h1' | 'h2' | 'h3' | 'h4';\n /** Type roles: sm Strong, base Heading, lg Title, hero Display. */\n size?: 'sm' | 'base' | 'lg' | 'hero';\n className?: string;\n}\n\nconst sizeClass: Record<NonNullable<PanelTitleProps['size']>, string> = {\n sm: 'aegis-panel-title--sm',\n base: 'aegis-panel-title--base',\n lg: 'aegis-panel-title--lg',\n hero: 'aegis-panel-title--hero',\n};\n\nexport function PanelTitle({\n children,\n as: Tag = 'span',\n size = 'base',\n className,\n}: PanelTitleProps) {\n const cls = ['aegis-panel-title', sizeClass[size], className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return <Tag className={cls}>{children}</Tag>;\n}\n"],"names":["sizeClass","PanelTitle","children","Tag","size","className","cls","jsx"],"mappings":"qJAYA,MAAMA,EAAkE,CACtE,GAAI,wBACJ,KAAM,0BACN,GAAI,wBACJ,KAAM,yBACR,EAEO,SAASC,EAAW,CACzB,SAAAC,EACA,GAAIC,EAAM,OACV,KAAAC,EAAO,OACP,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAM,CAAC,oBAAqBN,EAAUI,CAAI,EAAGC,GAAa,EAAE,EAC/D,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OAAOE,EAAAA,IAACJ,EAAA,CAAI,UAAWG,EAAM,SAAAJ,CAAA,CAAS,CACxC"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { jsx as i } from "react/jsx-runtime";
|
|
2
|
+
/* empty css */
|
|
3
|
+
const n = {
|
|
4
|
+
sm: "aegis-panel-title--sm",
|
|
5
|
+
base: "aegis-panel-title--base",
|
|
6
|
+
lg: "aegis-panel-title--lg",
|
|
7
|
+
hero: "aegis-panel-title--hero"
|
|
8
|
+
};
|
|
9
|
+
function r({
|
|
10
|
+
children: e,
|
|
11
|
+
as: s = "span",
|
|
12
|
+
size: a = "base",
|
|
13
|
+
className: l
|
|
14
|
+
}) {
|
|
15
|
+
const t = ["aegis-panel-title", n[a], l ?? ""].filter(Boolean).join(" ");
|
|
16
|
+
return /* @__PURE__ */ i(s, { className: t, children: e });
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
r as PanelTitle
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=PanelTitle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PanelTitle.js","sources":["../../../src/components/ui/PanelTitle.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './PanelTitle.css';\n\ninterface PanelTitleProps {\n children: ReactNode;\n as?: 'span' | 'h1' | 'h2' | 'h3' | 'h4';\n /** Type roles: sm Strong, base Heading, lg Title, hero Display. */\n size?: 'sm' | 'base' | 'lg' | 'hero';\n className?: string;\n}\n\nconst sizeClass: Record<NonNullable<PanelTitleProps['size']>, string> = {\n sm: 'aegis-panel-title--sm',\n base: 'aegis-panel-title--base',\n lg: 'aegis-panel-title--lg',\n hero: 'aegis-panel-title--hero',\n};\n\nexport function PanelTitle({\n children,\n as: Tag = 'span',\n size = 'base',\n className,\n}: PanelTitleProps) {\n const cls = ['aegis-panel-title', sizeClass[size], className ?? '']\n .filter(Boolean)\n .join(' ');\n\n return <Tag className={cls}>{children}</Tag>;\n}\n"],"names":["sizeClass","PanelTitle","children","Tag","size","className","cls","jsx"],"mappings":";;AAYA,MAAMA,IAAkE;AAAA,EACtE,IAAI;AAAA,EACJ,MAAM;AAAA,EACN,IAAI;AAAA,EACJ,MAAM;AACR;AAEO,SAASC,EAAW;AAAA,EACzB,UAAAC;AAAA,EACA,IAAIC,IAAM;AAAA,EACV,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAM,CAAC,qBAAqBN,EAAUI,CAAI,GAAGC,KAAa,EAAE,EAC/D,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SAAO,gBAAAE,EAACJ,GAAA,EAAI,WAAWG,GAAM,UAAAJ,EAAA,CAAS;AACxC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),G=require("react"),Q=require("../../hooks/useElementWidth.cjs"),V=require("./EmptyState.cjs");;/* empty css */const Z=require("../../locale/useStrings.cjs"),ee=320,C=220,te=56,se=16,ae=28,re=44,K=5,i=8,W=4;function j(a,n,m){return m==="lower"?a<n:a>n}function X(a){const n=Math.min(0,...a),m=Math.max(0,...a);return m===n?[n,n+1]:[n,m]}function ie({points:a,xLabel:n,yLabel:m,xDirection:f="lower",yDirection:N="higher",formatX:w=String,formatY:H=String,onSelect:c,legend:b,empty:$,emptyTitle:z,emptyDescription:F,className:U}){const I=Z.useStrings(),u=G.useRef(null),_=Q.useElementWidth(u),k=["aegis-pareto",U??""].filter(Boolean).join(" "),g=G.useMemo(()=>{if(a.length===0||_===0)return null;const e=Math.round(Math.min(ee,Math.max(C,_/2))),[r,x]=X(a.map(t=>t.x)),[y,P]=X(a.map(t=>t.y)),T=te,B=_-se,q=ae,M=e-re,L=t=>T+(t-r)/(x-r)*(B-T),O=t=>M-(t-y)/(P-y)*(M-q),R=a.filter(t=>!a.some(o=>o.key!==t.key&&(j(o.x,t.x,f)||o.x===t.x)&&(j(o.y,t.y,N)||o.y===t.y)&&(j(o.x,t.x,f)||j(o.y,t.y,N)))).sort((t,o)=>t.x-o.x),D=Array.from({length:W},(t,o)=>(o+1)/W);return{height:e,left:T,right:B,top:q,bottom:M,sx:L,sy:O,front:R,frontKeys:new Set(R.map(t=>t.key)),gridX:D.map(t=>L(r+(x-r)*t)),gridY:D.map(t=>O(y+(P-y)*t)),xLo:r,xHi:x,yLo:y,yHi:P}},[a,_,f,N]);if(a.length===0)return s.jsx("div",{ref:u,className:k,children:$===void 0?s.jsx(V.EmptyState,{title:z??I.paretoEmptyTitle,description:F}):s.jsx("div",{className:"aegis-pareto__empty",style:{"--aegis-pareto-min-height":`${C.toString()}px`},children:$})});if(!g)return s.jsx("div",{ref:u,className:k});const{height:A,left:l,right:d,top:p,bottom:h,sx:v,sy:S,front:E,frontKeys:Y}=g,J=(e,r)=>{(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),c?.(r))};return s.jsxs("div",{ref:u,className:k,children:[s.jsxs("svg",{className:"aegis-pareto__svg",width:_,height:A,viewBox:`0 0 ${_.toString()} ${A.toString()}`,role:c?"group":"img","aria-label":I.paretoChartLabel(n,m),style:{"--aegis-pareto-count":a.length},children:[g.gridY.map(e=>s.jsx("line",{className:"aegis-pareto__grid",x1:l,y1:e,x2:d,y2:e},`gy-${e.toString()}`)),g.gridX.map(e=>s.jsx("line",{className:"aegis-pareto__grid",x1:e,y1:p,x2:e,y2:h},`gx-${e.toString()}`)),s.jsx("line",{className:"aegis-pareto__axis",x1:l,y1:h,x2:d,y2:h}),s.jsx("line",{className:"aegis-pareto__axis",x1:l,y1:p,x2:l,y2:h}),E.length>1&&s.jsx("polyline",{className:"aegis-pareto__front",points:E.map(e=>`${v(e.x).toString()},${S(e.y).toString()}`).join(" ")}),a.map((e,r)=>s.jsx("circle",{className:["aegis-pareto__point",Y.has(e.key)?"":"aegis-pareto__point--dominated",c?"aegis-pareto__point--interactive":""].filter(Boolean).join(" "),style:{fill:e.color,"--aegis-pareto-index":r},cx:v(e.x),cy:S(e.y),r:K,role:c?"button":void 0,tabIndex:c?0:void 0,"aria-label":c?e.label:void 0,onClick:c?()=>{c(e.key)}:void 0,onKeyDown:c?x=>{J(x,e.key)}:void 0,children:s.jsx("title",{children:e.label})},e.key)),E.map(e=>{const r=v(e.x),x=S(e.y),y=r>l+(d-l)*.7;return s.jsx("text",{className:"aegis-pareto__point-label",x:y?r-i:r+i,y:x<p+i*2?x+i*2:x-i,textAnchor:y?"end":"start",children:e.label},`label-${e.key}`)}),s.jsx("text",{className:"aegis-pareto__tick",x:l,y:h+i*2,textAnchor:"middle",children:w(g.xLo)}),s.jsx("text",{className:"aegis-pareto__tick",x:d,y:h+i*2,textAnchor:"end",children:w(g.xHi)}),s.jsx("text",{className:"aegis-pareto__tick",x:l-i,y:h,textAnchor:"end",dominantBaseline:"middle",children:H(g.yLo)}),s.jsx("text",{className:"aegis-pareto__tick",x:l-i,y:p,textAnchor:"end",dominantBaseline:"middle",children:H(g.yHi)}),s.jsx("text",{className:"aegis-pareto__axis-label",x:d,y:A-i,textAnchor:"end",children:n}),s.jsx("text",{className:"aegis-pareto__axis-label",x:l-i,y:p-i*2,textAnchor:"start",children:m})]}),b!==void 0&&b.length>0?s.jsx("ul",{className:"aegis-pareto__legend",style:{"--aegis-pareto-swatch":`${(K*2).toString()}px`},children:b.map(e=>s.jsxs("li",{className:"aegis-pareto__legend-item",children:[s.jsx("span",{className:"aegis-pareto__swatch",style:e.color?{background:e.color}:void 0,"aria-hidden":"true"}),e.label]},e.key))}):null]})}exports.ParetoChart=ie;
|
|
2
|
+
//# sourceMappingURL=ParetoChart.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParetoChart.cjs","sources":["../../../src/components/ui/ParetoChart.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n useMemo,\n useRef,\n} from 'react';\n\nimport { useElementWidth } from '../../hooks/useElementWidth';\nimport { useStrings } from '../../locale';\nimport { EmptyState } from './EmptyState';\nimport './ParetoChart.css';\n\nexport interface ParetoPoint {\n key: string;\n label: string;\n x: number;\n y: number;\n /** Point fill, e.g. `var(--data-cat-2)` to match the series elsewhere. */\n color?: string;\n}\n\n/** One series in the legend under the plot, e.g. a model and its colour. */\nexport interface ParetoLegendItem {\n key: string;\n label: ReactNode;\n /** Swatch fill; the same value its points use. */\n color?: string;\n}\n\ninterface ParetoChartProps {\n points: ParetoPoint[];\n xLabel: string;\n yLabel: string;\n /** Which direction counts as better on each axis. */\n xDirection?: 'lower' | 'higher';\n yDirection?: 'lower' | 'higher';\n /** Formats the 0 and maximum labels of each axis. */\n formatX?: (value: number) => string;\n formatY?: (value: number) => string;\n onSelect?: (key: string) => void;\n /** Series swatches with labels, listed under the plot. */\n legend?: ParetoLegendItem[];\n /**\n * Shown in place of the plot, at its minimum height, while there are no\n * points — e.g. an EmptyState with an icon asking for both axes. Replaces\n * the default empty state built from `emptyTitle`.\n */\n empty?: ReactNode;\n emptyTitle?: string;\n emptyDescription?: string;\n className?: string;\n}\n\n// The SVG is drawn at its measured CSS width, so these are true px.\nconst MAX_HEIGHT = 320;\nconst MIN_HEIGHT = 220;\nconst PAD_LEFT = 56;\nconst PAD_RIGHT = 16;\nconst PAD_TOP = 28;\nconst PAD_BOTTOM = 44;\nconst POINT_RADIUS = 5;\nconst LABEL_GAP = 8;\nconst GRID_STEPS = 4;\n\ntype Direction = 'lower' | 'higher';\n\nfunction better(a: number, b: number, direction: Direction): boolean {\n return direction === 'lower' ? a < b : a > b;\n}\n\n/** Axis span from 0 (or the data minimum when negative) to the maximum. */\nfunction zeroAnchoredDomain(values: number[]): [number, number] {\n const lo = Math.min(0, ...values);\n const hi = Math.max(0, ...values);\n return hi === lo ? [lo, lo + 1] : [lo, hi];\n}\n\nexport function ParetoChart({\n points,\n xLabel,\n yLabel,\n xDirection = 'lower',\n yDirection = 'higher',\n formatX = String,\n formatY = String,\n onSelect,\n legend,\n empty,\n emptyTitle,\n emptyDescription,\n className,\n}: ParetoChartProps) {\n const strings = useStrings();\n const wrapRef = useRef<HTMLDivElement>(null);\n const width = useElementWidth(wrapRef);\n const cls = ['aegis-pareto', className ?? ''].filter(Boolean).join(' ');\n\n const geometry = useMemo(() => {\n if (points.length === 0 || width === 0) {\n return null;\n }\n const height = Math.round(\n Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, width / 2)),\n );\n const [xLo, xHi] = zeroAnchoredDomain(points.map((point) => point.x));\n const [yLo, yHi] = zeroAnchoredDomain(points.map((point) => point.y));\n const left = PAD_LEFT;\n const right = width - PAD_RIGHT;\n const top = PAD_TOP;\n const bottom = height - PAD_BOTTOM;\n const sx = (value: number): number =>\n left + ((value - xLo) / (xHi - xLo)) * (right - left);\n const sy = (value: number): number =>\n bottom - ((value - yLo) / (yHi - yLo)) * (bottom - top);\n const front = points\n .filter(\n (candidate) =>\n !points.some(\n (other) =>\n other.key !== candidate.key &&\n (better(other.x, candidate.x, xDirection) ||\n other.x === candidate.x) &&\n (better(other.y, candidate.y, yDirection) ||\n other.y === candidate.y) &&\n (better(other.x, candidate.x, xDirection) ||\n better(other.y, candidate.y, yDirection)),\n ),\n )\n .sort((a, b) => a.x - b.x);\n const steps = Array.from(\n { length: GRID_STEPS },\n (_, i) => (i + 1) / GRID_STEPS,\n );\n return {\n height,\n left,\n right,\n top,\n bottom,\n sx,\n sy,\n front,\n frontKeys: new Set(front.map((point) => point.key)),\n gridX: steps.map((t) => sx(xLo + (xHi - xLo) * t)),\n gridY: steps.map((t) => sy(yLo + (yHi - yLo) * t)),\n xLo,\n xHi,\n yLo,\n yHi,\n };\n }, [points, width, xDirection, yDirection]);\n\n if (points.length === 0) {\n return (\n <div ref={wrapRef} className={cls}>\n {empty === undefined ? (\n <EmptyState\n title={emptyTitle ?? strings.paretoEmptyTitle}\n description={emptyDescription}\n />\n ) : (\n <div\n className=\"aegis-pareto__empty\"\n style={\n {\n '--aegis-pareto-min-height': `${MIN_HEIGHT.toString()}px`,\n } as CSSProperties\n }\n >\n {empty}\n </div>\n )}\n </div>\n );\n }\n\n if (!geometry) {\n return <div ref={wrapRef} className={cls} />;\n }\n\n const { height, left, right, top, bottom, sx, sy, front, frontKeys } =\n geometry;\n const selectOnKey = (event: KeyboardEvent<SVGCircleElement>, key: string) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.(key);\n }\n };\n\n return (\n <div ref={wrapRef} className={cls}>\n <svg\n className=\"aegis-pareto__svg\"\n width={width}\n height={height}\n viewBox={`0 0 ${width.toString()} ${height.toString()}`}\n role={onSelect ? 'group' : 'img'}\n aria-label={strings.paretoChartLabel(xLabel, yLabel)}\n style={{ '--aegis-pareto-count': points.length } as CSSProperties}\n >\n {geometry.gridY.map((y) => (\n <line\n key={`gy-${y.toString()}`}\n className=\"aegis-pareto__grid\"\n x1={left}\n y1={y}\n x2={right}\n y2={y}\n />\n ))}\n {geometry.gridX.map((x) => (\n <line\n key={`gx-${x.toString()}`}\n className=\"aegis-pareto__grid\"\n x1={x}\n y1={top}\n x2={x}\n y2={bottom}\n />\n ))}\n <line\n className=\"aegis-pareto__axis\"\n x1={left}\n y1={bottom}\n x2={right}\n y2={bottom}\n />\n <line\n className=\"aegis-pareto__axis\"\n x1={left}\n y1={top}\n x2={left}\n y2={bottom}\n />\n {front.length > 1 && (\n <polyline\n className=\"aegis-pareto__front\"\n points={front\n .map(\n (point) =>\n `${sx(point.x).toString()},${sy(point.y).toString()}`,\n )\n .join(' ')}\n />\n )}\n {points.map((point, index) => (\n <circle\n key={point.key}\n className={[\n 'aegis-pareto__point',\n frontKeys.has(point.key) ? '' : 'aegis-pareto__point--dominated',\n onSelect ? 'aegis-pareto__point--interactive' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n {\n fill: point.color,\n '--aegis-pareto-index': index,\n } as CSSProperties\n }\n cx={sx(point.x)}\n cy={sy(point.y)}\n r={POINT_RADIUS}\n role={onSelect ? 'button' : undefined}\n tabIndex={onSelect ? 0 : undefined}\n aria-label={onSelect ? point.label : undefined}\n onClick={\n onSelect\n ? () => {\n onSelect(point.key);\n }\n : undefined\n }\n onKeyDown={\n onSelect\n ? (event) => {\n selectOnKey(event, point.key);\n }\n : undefined\n }\n >\n <title>{point.label}</title>\n </circle>\n ))}\n {front.map((point) => {\n const x = sx(point.x);\n const y = sy(point.y);\n const flip = x > left + (right - left) * 0.7;\n return (\n <text\n key={`label-${point.key}`}\n className=\"aegis-pareto__point-label\"\n x={flip ? x - LABEL_GAP : x + LABEL_GAP}\n y={y < top + LABEL_GAP * 2 ? y + LABEL_GAP * 2 : y - LABEL_GAP}\n textAnchor={flip ? 'end' : 'start'}\n >\n {point.label}\n </text>\n );\n })}\n <text\n className=\"aegis-pareto__tick\"\n x={left}\n y={bottom + LABEL_GAP * 2}\n textAnchor=\"middle\"\n >\n {formatX(geometry.xLo)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={right}\n y={bottom + LABEL_GAP * 2}\n textAnchor=\"end\"\n >\n {formatX(geometry.xHi)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={left - LABEL_GAP}\n y={bottom}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatY(geometry.yLo)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={left - LABEL_GAP}\n y={top}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatY(geometry.yHi)}\n </text>\n <text\n className=\"aegis-pareto__axis-label\"\n x={right}\n y={height - LABEL_GAP}\n textAnchor=\"end\"\n >\n {xLabel}\n </text>\n <text\n className=\"aegis-pareto__axis-label\"\n x={left - LABEL_GAP}\n y={top - LABEL_GAP * 2}\n textAnchor=\"start\"\n >\n {yLabel}\n </text>\n </svg>\n {legend !== undefined && legend.length > 0 ? (\n <ul\n className=\"aegis-pareto__legend\"\n style={\n {\n '--aegis-pareto-swatch': `${(POINT_RADIUS * 2).toString()}px`,\n } as CSSProperties\n }\n >\n {legend.map((item) => (\n <li key={item.key} className=\"aegis-pareto__legend-item\">\n <span\n className=\"aegis-pareto__swatch\"\n style={item.color ? { background: item.color } : undefined}\n aria-hidden=\"true\"\n />\n {item.label}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n"],"names":["MAX_HEIGHT","MIN_HEIGHT","PAD_LEFT","PAD_RIGHT","PAD_TOP","PAD_BOTTOM","POINT_RADIUS","LABEL_GAP","GRID_STEPS","better","b","direction","zeroAnchoredDomain","values","lo","hi","ParetoChart","points","xLabel","yLabel","xDirection","yDirection","formatX","formatY","onSelect","legend","empty","emptyTitle","emptyDescription","className","strings","useStrings","wrapRef","useRef","width","useElementWidth","cls","geometry","useMemo","height","xLo","xHi","point","yLo","yHi","left","right","top","bottom","sx","value","sy","front","candidate","other","a","steps","_","i","jsx","EmptyState","frontKeys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,CAAE,WAAYA,EAAK,OAAU,OACjD,cAAY,MAAA,CAAA,EAEbA,EAAK,KAAA,CAAA,EANCA,EAAK,GAOd,CACD,CAAA,CAAA,EAED,IAAA,EACN,CAEJ"}
|
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
import { jsx as a, jsxs as $ } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as Q, useMemo as V } from "react";
|
|
3
|
+
import { useElementWidth as Z } from "../../hooks/useElementWidth.js";
|
|
4
|
+
import { EmptyState as ee } from "./EmptyState.js";
|
|
5
|
+
/* empty css */
|
|
6
|
+
import { useStrings as te } from "../../locale/useStrings.js";
|
|
7
|
+
const ae = 320, C = 220, se = 56, re = 16, oe = 28, ie = 44, X = 5, o = 8, z = 4;
|
|
8
|
+
function u(s, n, y) {
|
|
9
|
+
return y === "lower" ? s < n : s > n;
|
|
10
|
+
}
|
|
11
|
+
function F(s) {
|
|
12
|
+
const n = Math.min(0, ...s), y = Math.max(0, ...s);
|
|
13
|
+
return y === n ? [n, n + 1] : [n, y];
|
|
14
|
+
}
|
|
15
|
+
function ye({
|
|
16
|
+
points: s,
|
|
17
|
+
xLabel: n,
|
|
18
|
+
yLabel: y,
|
|
19
|
+
xDirection: N = "lower",
|
|
20
|
+
yDirection: k = "higher",
|
|
21
|
+
formatX: I = String,
|
|
22
|
+
formatY: S = String,
|
|
23
|
+
onSelect: c,
|
|
24
|
+
legend: A,
|
|
25
|
+
empty: B,
|
|
26
|
+
emptyTitle: U,
|
|
27
|
+
emptyDescription: W,
|
|
28
|
+
className: Y
|
|
29
|
+
}) {
|
|
30
|
+
const L = te(), f = Q(null), _ = Z(f), b = ["aegis-pareto", Y ?? ""].filter(Boolean).join(" "), m = V(() => {
|
|
31
|
+
if (s.length === 0 || _ === 0)
|
|
32
|
+
return null;
|
|
33
|
+
const e = Math.round(
|
|
34
|
+
Math.min(ae, Math.max(C, _ / 2))
|
|
35
|
+
), [r, g] = F(s.map((t) => t.x)), [x, H] = F(s.map((t) => t.y)), M = se, j = _ - re, D = oe, P = e - ie, G = (t) => M + (t - r) / (g - r) * (j - M), O = (t) => P - (t - x) / (H - x) * (P - D), R = s.filter(
|
|
36
|
+
(t) => !s.some(
|
|
37
|
+
(i) => i.key !== t.key && (u(i.x, t.x, N) || i.x === t.x) && (u(i.y, t.y, k) || i.y === t.y) && (u(i.x, t.x, N) || u(i.y, t.y, k))
|
|
38
|
+
)
|
|
39
|
+
).sort((t, i) => t.x - i.x), K = Array.from(
|
|
40
|
+
{ length: z },
|
|
41
|
+
(t, i) => (i + 1) / z
|
|
42
|
+
);
|
|
43
|
+
return {
|
|
44
|
+
height: e,
|
|
45
|
+
left: M,
|
|
46
|
+
right: j,
|
|
47
|
+
top: D,
|
|
48
|
+
bottom: P,
|
|
49
|
+
sx: G,
|
|
50
|
+
sy: O,
|
|
51
|
+
front: R,
|
|
52
|
+
frontKeys: new Set(R.map((t) => t.key)),
|
|
53
|
+
gridX: K.map((t) => G(r + (g - r) * t)),
|
|
54
|
+
gridY: K.map((t) => O(x + (H - x) * t)),
|
|
55
|
+
xLo: r,
|
|
56
|
+
xHi: g,
|
|
57
|
+
yLo: x,
|
|
58
|
+
yHi: H
|
|
59
|
+
};
|
|
60
|
+
}, [s, _, N, k]);
|
|
61
|
+
if (s.length === 0)
|
|
62
|
+
return /* @__PURE__ */ a("div", { ref: f, className: b, children: B === void 0 ? /* @__PURE__ */ a(
|
|
63
|
+
ee,
|
|
64
|
+
{
|
|
65
|
+
title: U ?? L.paretoEmptyTitle,
|
|
66
|
+
description: W
|
|
67
|
+
}
|
|
68
|
+
) : /* @__PURE__ */ a(
|
|
69
|
+
"div",
|
|
70
|
+
{
|
|
71
|
+
className: "aegis-pareto__empty",
|
|
72
|
+
style: {
|
|
73
|
+
"--aegis-pareto-min-height": `${C.toString()}px`
|
|
74
|
+
},
|
|
75
|
+
children: B
|
|
76
|
+
}
|
|
77
|
+
) });
|
|
78
|
+
if (!m)
|
|
79
|
+
return /* @__PURE__ */ a("div", { ref: f, className: b });
|
|
80
|
+
const { height: v, left: l, right: d, top: p, bottom: h, sx: T, sy: w, front: E, frontKeys: q } = m, J = (e, r) => {
|
|
81
|
+
(e.key === "Enter" || e.key === " ") && (e.preventDefault(), c?.(r));
|
|
82
|
+
};
|
|
83
|
+
return /* @__PURE__ */ $("div", { ref: f, className: b, children: [
|
|
84
|
+
/* @__PURE__ */ $(
|
|
85
|
+
"svg",
|
|
86
|
+
{
|
|
87
|
+
className: "aegis-pareto__svg",
|
|
88
|
+
width: _,
|
|
89
|
+
height: v,
|
|
90
|
+
viewBox: `0 0 ${_.toString()} ${v.toString()}`,
|
|
91
|
+
role: c ? "group" : "img",
|
|
92
|
+
"aria-label": L.paretoChartLabel(n, y),
|
|
93
|
+
style: { "--aegis-pareto-count": s.length },
|
|
94
|
+
children: [
|
|
95
|
+
m.gridY.map((e) => /* @__PURE__ */ a(
|
|
96
|
+
"line",
|
|
97
|
+
{
|
|
98
|
+
className: "aegis-pareto__grid",
|
|
99
|
+
x1: l,
|
|
100
|
+
y1: e,
|
|
101
|
+
x2: d,
|
|
102
|
+
y2: e
|
|
103
|
+
},
|
|
104
|
+
`gy-${e.toString()}`
|
|
105
|
+
)),
|
|
106
|
+
m.gridX.map((e) => /* @__PURE__ */ a(
|
|
107
|
+
"line",
|
|
108
|
+
{
|
|
109
|
+
className: "aegis-pareto__grid",
|
|
110
|
+
x1: e,
|
|
111
|
+
y1: p,
|
|
112
|
+
x2: e,
|
|
113
|
+
y2: h
|
|
114
|
+
},
|
|
115
|
+
`gx-${e.toString()}`
|
|
116
|
+
)),
|
|
117
|
+
/* @__PURE__ */ a(
|
|
118
|
+
"line",
|
|
119
|
+
{
|
|
120
|
+
className: "aegis-pareto__axis",
|
|
121
|
+
x1: l,
|
|
122
|
+
y1: h,
|
|
123
|
+
x2: d,
|
|
124
|
+
y2: h
|
|
125
|
+
}
|
|
126
|
+
),
|
|
127
|
+
/* @__PURE__ */ a(
|
|
128
|
+
"line",
|
|
129
|
+
{
|
|
130
|
+
className: "aegis-pareto__axis",
|
|
131
|
+
x1: l,
|
|
132
|
+
y1: p,
|
|
133
|
+
x2: l,
|
|
134
|
+
y2: h
|
|
135
|
+
}
|
|
136
|
+
),
|
|
137
|
+
E.length > 1 && /* @__PURE__ */ a(
|
|
138
|
+
"polyline",
|
|
139
|
+
{
|
|
140
|
+
className: "aegis-pareto__front",
|
|
141
|
+
points: E.map(
|
|
142
|
+
(e) => `${T(e.x).toString()},${w(e.y).toString()}`
|
|
143
|
+
).join(" ")
|
|
144
|
+
}
|
|
145
|
+
),
|
|
146
|
+
s.map((e, r) => /* @__PURE__ */ a(
|
|
147
|
+
"circle",
|
|
148
|
+
{
|
|
149
|
+
className: [
|
|
150
|
+
"aegis-pareto__point",
|
|
151
|
+
q.has(e.key) ? "" : "aegis-pareto__point--dominated",
|
|
152
|
+
c ? "aegis-pareto__point--interactive" : ""
|
|
153
|
+
].filter(Boolean).join(" "),
|
|
154
|
+
style: {
|
|
155
|
+
fill: e.color,
|
|
156
|
+
"--aegis-pareto-index": r
|
|
157
|
+
},
|
|
158
|
+
cx: T(e.x),
|
|
159
|
+
cy: w(e.y),
|
|
160
|
+
r: X,
|
|
161
|
+
role: c ? "button" : void 0,
|
|
162
|
+
tabIndex: c ? 0 : void 0,
|
|
163
|
+
"aria-label": c ? e.label : void 0,
|
|
164
|
+
onClick: c ? () => {
|
|
165
|
+
c(e.key);
|
|
166
|
+
} : void 0,
|
|
167
|
+
onKeyDown: c ? (g) => {
|
|
168
|
+
J(g, e.key);
|
|
169
|
+
} : void 0,
|
|
170
|
+
children: /* @__PURE__ */ a("title", { children: e.label })
|
|
171
|
+
},
|
|
172
|
+
e.key
|
|
173
|
+
)),
|
|
174
|
+
E.map((e) => {
|
|
175
|
+
const r = T(e.x), g = w(e.y), x = r > l + (d - l) * 0.7;
|
|
176
|
+
return /* @__PURE__ */ a(
|
|
177
|
+
"text",
|
|
178
|
+
{
|
|
179
|
+
className: "aegis-pareto__point-label",
|
|
180
|
+
x: x ? r - o : r + o,
|
|
181
|
+
y: g < p + o * 2 ? g + o * 2 : g - o,
|
|
182
|
+
textAnchor: x ? "end" : "start",
|
|
183
|
+
children: e.label
|
|
184
|
+
},
|
|
185
|
+
`label-${e.key}`
|
|
186
|
+
);
|
|
187
|
+
}),
|
|
188
|
+
/* @__PURE__ */ a(
|
|
189
|
+
"text",
|
|
190
|
+
{
|
|
191
|
+
className: "aegis-pareto__tick",
|
|
192
|
+
x: l,
|
|
193
|
+
y: h + o * 2,
|
|
194
|
+
textAnchor: "middle",
|
|
195
|
+
children: I(m.xLo)
|
|
196
|
+
}
|
|
197
|
+
),
|
|
198
|
+
/* @__PURE__ */ a(
|
|
199
|
+
"text",
|
|
200
|
+
{
|
|
201
|
+
className: "aegis-pareto__tick",
|
|
202
|
+
x: d,
|
|
203
|
+
y: h + o * 2,
|
|
204
|
+
textAnchor: "end",
|
|
205
|
+
children: I(m.xHi)
|
|
206
|
+
}
|
|
207
|
+
),
|
|
208
|
+
/* @__PURE__ */ a(
|
|
209
|
+
"text",
|
|
210
|
+
{
|
|
211
|
+
className: "aegis-pareto__tick",
|
|
212
|
+
x: l - o,
|
|
213
|
+
y: h,
|
|
214
|
+
textAnchor: "end",
|
|
215
|
+
dominantBaseline: "middle",
|
|
216
|
+
children: S(m.yLo)
|
|
217
|
+
}
|
|
218
|
+
),
|
|
219
|
+
/* @__PURE__ */ a(
|
|
220
|
+
"text",
|
|
221
|
+
{
|
|
222
|
+
className: "aegis-pareto__tick",
|
|
223
|
+
x: l - o,
|
|
224
|
+
y: p,
|
|
225
|
+
textAnchor: "end",
|
|
226
|
+
dominantBaseline: "middle",
|
|
227
|
+
children: S(m.yHi)
|
|
228
|
+
}
|
|
229
|
+
),
|
|
230
|
+
/* @__PURE__ */ a(
|
|
231
|
+
"text",
|
|
232
|
+
{
|
|
233
|
+
className: "aegis-pareto__axis-label",
|
|
234
|
+
x: d,
|
|
235
|
+
y: v - o,
|
|
236
|
+
textAnchor: "end",
|
|
237
|
+
children: n
|
|
238
|
+
}
|
|
239
|
+
),
|
|
240
|
+
/* @__PURE__ */ a(
|
|
241
|
+
"text",
|
|
242
|
+
{
|
|
243
|
+
className: "aegis-pareto__axis-label",
|
|
244
|
+
x: l - o,
|
|
245
|
+
y: p - o * 2,
|
|
246
|
+
textAnchor: "start",
|
|
247
|
+
children: y
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
]
|
|
251
|
+
}
|
|
252
|
+
),
|
|
253
|
+
A !== void 0 && A.length > 0 ? /* @__PURE__ */ a(
|
|
254
|
+
"ul",
|
|
255
|
+
{
|
|
256
|
+
className: "aegis-pareto__legend",
|
|
257
|
+
style: {
|
|
258
|
+
"--aegis-pareto-swatch": `${(X * 2).toString()}px`
|
|
259
|
+
},
|
|
260
|
+
children: A.map((e) => /* @__PURE__ */ $("li", { className: "aegis-pareto__legend-item", children: [
|
|
261
|
+
/* @__PURE__ */ a(
|
|
262
|
+
"span",
|
|
263
|
+
{
|
|
264
|
+
className: "aegis-pareto__swatch",
|
|
265
|
+
style: e.color ? { background: e.color } : void 0,
|
|
266
|
+
"aria-hidden": "true"
|
|
267
|
+
}
|
|
268
|
+
),
|
|
269
|
+
e.label
|
|
270
|
+
] }, e.key))
|
|
271
|
+
}
|
|
272
|
+
) : null
|
|
273
|
+
] });
|
|
274
|
+
}
|
|
275
|
+
export {
|
|
276
|
+
ye as ParetoChart
|
|
277
|
+
};
|
|
278
|
+
//# sourceMappingURL=ParetoChart.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ParetoChart.js","sources":["../../../src/components/ui/ParetoChart.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n useMemo,\n useRef,\n} from 'react';\n\nimport { useElementWidth } from '../../hooks/useElementWidth';\nimport { useStrings } from '../../locale';\nimport { EmptyState } from './EmptyState';\nimport './ParetoChart.css';\n\nexport interface ParetoPoint {\n key: string;\n label: string;\n x: number;\n y: number;\n /** Point fill, e.g. `var(--data-cat-2)` to match the series elsewhere. */\n color?: string;\n}\n\n/** One series in the legend under the plot, e.g. a model and its colour. */\nexport interface ParetoLegendItem {\n key: string;\n label: ReactNode;\n /** Swatch fill; the same value its points use. */\n color?: string;\n}\n\ninterface ParetoChartProps {\n points: ParetoPoint[];\n xLabel: string;\n yLabel: string;\n /** Which direction counts as better on each axis. */\n xDirection?: 'lower' | 'higher';\n yDirection?: 'lower' | 'higher';\n /** Formats the 0 and maximum labels of each axis. */\n formatX?: (value: number) => string;\n formatY?: (value: number) => string;\n onSelect?: (key: string) => void;\n /** Series swatches with labels, listed under the plot. */\n legend?: ParetoLegendItem[];\n /**\n * Shown in place of the plot, at its minimum height, while there are no\n * points — e.g. an EmptyState with an icon asking for both axes. Replaces\n * the default empty state built from `emptyTitle`.\n */\n empty?: ReactNode;\n emptyTitle?: string;\n emptyDescription?: string;\n className?: string;\n}\n\n// The SVG is drawn at its measured CSS width, so these are true px.\nconst MAX_HEIGHT = 320;\nconst MIN_HEIGHT = 220;\nconst PAD_LEFT = 56;\nconst PAD_RIGHT = 16;\nconst PAD_TOP = 28;\nconst PAD_BOTTOM = 44;\nconst POINT_RADIUS = 5;\nconst LABEL_GAP = 8;\nconst GRID_STEPS = 4;\n\ntype Direction = 'lower' | 'higher';\n\nfunction better(a: number, b: number, direction: Direction): boolean {\n return direction === 'lower' ? a < b : a > b;\n}\n\n/** Axis span from 0 (or the data minimum when negative) to the maximum. */\nfunction zeroAnchoredDomain(values: number[]): [number, number] {\n const lo = Math.min(0, ...values);\n const hi = Math.max(0, ...values);\n return hi === lo ? [lo, lo + 1] : [lo, hi];\n}\n\nexport function ParetoChart({\n points,\n xLabel,\n yLabel,\n xDirection = 'lower',\n yDirection = 'higher',\n formatX = String,\n formatY = String,\n onSelect,\n legend,\n empty,\n emptyTitle,\n emptyDescription,\n className,\n}: ParetoChartProps) {\n const strings = useStrings();\n const wrapRef = useRef<HTMLDivElement>(null);\n const width = useElementWidth(wrapRef);\n const cls = ['aegis-pareto', className ?? ''].filter(Boolean).join(' ');\n\n const geometry = useMemo(() => {\n if (points.length === 0 || width === 0) {\n return null;\n }\n const height = Math.round(\n Math.min(MAX_HEIGHT, Math.max(MIN_HEIGHT, width / 2)),\n );\n const [xLo, xHi] = zeroAnchoredDomain(points.map((point) => point.x));\n const [yLo, yHi] = zeroAnchoredDomain(points.map((point) => point.y));\n const left = PAD_LEFT;\n const right = width - PAD_RIGHT;\n const top = PAD_TOP;\n const bottom = height - PAD_BOTTOM;\n const sx = (value: number): number =>\n left + ((value - xLo) / (xHi - xLo)) * (right - left);\n const sy = (value: number): number =>\n bottom - ((value - yLo) / (yHi - yLo)) * (bottom - top);\n const front = points\n .filter(\n (candidate) =>\n !points.some(\n (other) =>\n other.key !== candidate.key &&\n (better(other.x, candidate.x, xDirection) ||\n other.x === candidate.x) &&\n (better(other.y, candidate.y, yDirection) ||\n other.y === candidate.y) &&\n (better(other.x, candidate.x, xDirection) ||\n better(other.y, candidate.y, yDirection)),\n ),\n )\n .sort((a, b) => a.x - b.x);\n const steps = Array.from(\n { length: GRID_STEPS },\n (_, i) => (i + 1) / GRID_STEPS,\n );\n return {\n height,\n left,\n right,\n top,\n bottom,\n sx,\n sy,\n front,\n frontKeys: new Set(front.map((point) => point.key)),\n gridX: steps.map((t) => sx(xLo + (xHi - xLo) * t)),\n gridY: steps.map((t) => sy(yLo + (yHi - yLo) * t)),\n xLo,\n xHi,\n yLo,\n yHi,\n };\n }, [points, width, xDirection, yDirection]);\n\n if (points.length === 0) {\n return (\n <div ref={wrapRef} className={cls}>\n {empty === undefined ? (\n <EmptyState\n title={emptyTitle ?? strings.paretoEmptyTitle}\n description={emptyDescription}\n />\n ) : (\n <div\n className=\"aegis-pareto__empty\"\n style={\n {\n '--aegis-pareto-min-height': `${MIN_HEIGHT.toString()}px`,\n } as CSSProperties\n }\n >\n {empty}\n </div>\n )}\n </div>\n );\n }\n\n if (!geometry) {\n return <div ref={wrapRef} className={cls} />;\n }\n\n const { height, left, right, top, bottom, sx, sy, front, frontKeys } =\n geometry;\n const selectOnKey = (event: KeyboardEvent<SVGCircleElement>, key: string) => {\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.(key);\n }\n };\n\n return (\n <div ref={wrapRef} className={cls}>\n <svg\n className=\"aegis-pareto__svg\"\n width={width}\n height={height}\n viewBox={`0 0 ${width.toString()} ${height.toString()}`}\n role={onSelect ? 'group' : 'img'}\n aria-label={strings.paretoChartLabel(xLabel, yLabel)}\n style={{ '--aegis-pareto-count': points.length } as CSSProperties}\n >\n {geometry.gridY.map((y) => (\n <line\n key={`gy-${y.toString()}`}\n className=\"aegis-pareto__grid\"\n x1={left}\n y1={y}\n x2={right}\n y2={y}\n />\n ))}\n {geometry.gridX.map((x) => (\n <line\n key={`gx-${x.toString()}`}\n className=\"aegis-pareto__grid\"\n x1={x}\n y1={top}\n x2={x}\n y2={bottom}\n />\n ))}\n <line\n className=\"aegis-pareto__axis\"\n x1={left}\n y1={bottom}\n x2={right}\n y2={bottom}\n />\n <line\n className=\"aegis-pareto__axis\"\n x1={left}\n y1={top}\n x2={left}\n y2={bottom}\n />\n {front.length > 1 && (\n <polyline\n className=\"aegis-pareto__front\"\n points={front\n .map(\n (point) =>\n `${sx(point.x).toString()},${sy(point.y).toString()}`,\n )\n .join(' ')}\n />\n )}\n {points.map((point, index) => (\n <circle\n key={point.key}\n className={[\n 'aegis-pareto__point',\n frontKeys.has(point.key) ? '' : 'aegis-pareto__point--dominated',\n onSelect ? 'aegis-pareto__point--interactive' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n {\n fill: point.color,\n '--aegis-pareto-index': index,\n } as CSSProperties\n }\n cx={sx(point.x)}\n cy={sy(point.y)}\n r={POINT_RADIUS}\n role={onSelect ? 'button' : undefined}\n tabIndex={onSelect ? 0 : undefined}\n aria-label={onSelect ? point.label : undefined}\n onClick={\n onSelect\n ? () => {\n onSelect(point.key);\n }\n : undefined\n }\n onKeyDown={\n onSelect\n ? (event) => {\n selectOnKey(event, point.key);\n }\n : undefined\n }\n >\n <title>{point.label}</title>\n </circle>\n ))}\n {front.map((point) => {\n const x = sx(point.x);\n const y = sy(point.y);\n const flip = x > left + (right - left) * 0.7;\n return (\n <text\n key={`label-${point.key}`}\n className=\"aegis-pareto__point-label\"\n x={flip ? x - LABEL_GAP : x + LABEL_GAP}\n y={y < top + LABEL_GAP * 2 ? y + LABEL_GAP * 2 : y - LABEL_GAP}\n textAnchor={flip ? 'end' : 'start'}\n >\n {point.label}\n </text>\n );\n })}\n <text\n className=\"aegis-pareto__tick\"\n x={left}\n y={bottom + LABEL_GAP * 2}\n textAnchor=\"middle\"\n >\n {formatX(geometry.xLo)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={right}\n y={bottom + LABEL_GAP * 2}\n textAnchor=\"end\"\n >\n {formatX(geometry.xHi)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={left - LABEL_GAP}\n y={bottom}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatY(geometry.yLo)}\n </text>\n <text\n className=\"aegis-pareto__tick\"\n x={left - LABEL_GAP}\n y={top}\n textAnchor=\"end\"\n dominantBaseline=\"middle\"\n >\n {formatY(geometry.yHi)}\n </text>\n <text\n className=\"aegis-pareto__axis-label\"\n x={right}\n y={height - LABEL_GAP}\n textAnchor=\"end\"\n >\n {xLabel}\n </text>\n <text\n className=\"aegis-pareto__axis-label\"\n x={left - LABEL_GAP}\n y={top - LABEL_GAP * 2}\n textAnchor=\"start\"\n >\n {yLabel}\n </text>\n </svg>\n {legend !== undefined && legend.length > 0 ? (\n <ul\n className=\"aegis-pareto__legend\"\n style={\n {\n '--aegis-pareto-swatch': `${(POINT_RADIUS * 2).toString()}px`,\n } as CSSProperties\n }\n >\n {legend.map((item) => (\n <li key={item.key} className=\"aegis-pareto__legend-item\">\n <span\n className=\"aegis-pareto__swatch\"\n style={item.color ? { background: item.color } : undefined}\n aria-hidden=\"true\"\n />\n {item.label}\n </li>\n ))}\n </ul>\n ) : null}\n </div>\n );\n}\n"],"names":["MAX_HEIGHT","MIN_HEIGHT","PAD_LEFT","PAD_RIGHT","PAD_TOP","PAD_BOTTOM","POINT_RADIUS","LABEL_GAP","GRID_STEPS","better","a","b","direction","zeroAnchoredDomain","values","lo","hi","ParetoChart","points","xLabel","yLabel","xDirection","yDirection","formatX","formatY","onSelect","legend","empty","emptyTitle","emptyDescription","className","strings","useStrings","wrapRef","useRef","width","useElementWidth","cls","geometry","useMemo","height","xLo","xHi","point","yLo","yHi","left","right","top","bottom","sx","value","sy","front","candidate","other","steps","_","jsx","EmptyState","frontKeys","selectOnKey","event","key","jsxs","y","x","index","flip","item"],"mappings":";;;;;;AAuDA,MAAMA,KAAa,KACbC,IAAa,KACbC,KAAW,IACXC,KAAY,IACZC,KAAU,IACVC,KAAa,IACbC,IAAe,GACfC,IAAY,GACZC,IAAa;AAInB,SAASC,EAAOC,GAAWC,GAAWC,GAA+B;AACnE,SAAOA,MAAc,UAAUF,IAAIC,IAAID,IAAIC;AAC7C;AAGA,SAASE,EAAmBC,GAAoC;AAC9D,QAAMC,IAAK,KAAK,IAAI,GAAG,GAAGD,CAAM,GAC1BE,IAAK,KAAK,IAAI,GAAG,GAAGF,CAAM;AAChC,SAAOE,MAAOD,IAAK,CAACA,GAAIA,IAAK,CAAC,IAAI,CAACA,GAAIC,CAAE;AAC3C;AAEO,SAASC,GAAY;AAAA,EAC1B,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,YAAAC,IAAa;AAAA,EACb,SAAAC,IAAU;AAAA,EACV,SAAAC,IAAU;AAAA,EACV,UAAAC;AAAA,EACA,QAAAC;AAAA,EACA,OAAAC;AAAA,EACA,YAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,WAAAC;AACF,GAAqB;AACnB,QAAMC,IAAUC,GAAA,GACVC,IA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AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,GAAGX;AAAA,cACH,GAAGP,IAASjC;AAAA,cACZ,YAAW;AAAA,cAEV,UAAAY;AAAA,YAAA;AAAA,UAAA;AAAA,UAEH,gBAAAuC;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,GAAGZ,IAAOvC;AAAA,cACV,GAAGyC,IAAMzC,IAAY;AAAA,cACrB,YAAW;AAAA,cAEV,UAAAa;AAAA,YAAA;AAAA,UAAA;AAAA,QACH;AAAA,MAAA;AAAA,IAAA;AAAA,IAEDM,MAAW,UAAaA,EAAO,SAAS,IACvC,gBAAAgC;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,OACE;AAAA,UACE,yBAAyB,IAAIpD,IAAe,GAAG,UAAU;AAAA,QAAA;AAAA,QAI5D,YAAO,IAAI,CAAC+D,MACX,gBAAAL,EAAC,MAAA,EAAkB,WAAU,6BAC3B,UAAA;AAAA,UAAA,gBAAAN;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,WAAU;AAAA,cACV,OAAOW,EAAK,QAAQ,EAAE,YAAYA,EAAK,UAAU;AAAA,cACjD,eAAY;AAAA,YAAA;AAAA,UAAA;AAAA,UAEbA,EAAK;AAAA,QAAA,EAAA,GANCA,EAAK,GAOd,CACD;AAAA,MAAA;AAAA,IAAA,IAED;AAAA,EAAA,GACN;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";var M=Object.create;var N=Object.defineProperty;var C=Object.getOwnPropertyDescriptor;var T=Object.getOwnPropertyNames;var B=Object.getPrototypeOf,A=Object.prototype.hasOwnProperty;var F=(e,t,i,d)=>{if(t&&typeof t=="object"||typeof t=="function")for(let o of T(t))!A.call(e,o)&&o!==i&&N(e,o,{get:()=>t[o],enumerable:!(d=C(t,o))||d.enumerable});return e};var S=(e,t,i)=>(i=e!=null?M(B(e)):{},F(t||!e||!e.__esModule?N(i,"default",{value:e,enumerable:!0}):i,e));Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),l=require("react"),L=require("../../agent/core/usePrimitiveSurface.cjs"),O=require("./Chip.cjs"),D=require("./DataTable.cjs");;/* empty css */async function Y(){const[e,{compressors:t}]=await Promise.all([import("hyparquet"),import("hyparquet-compressors")]);return{...e,compressors:t}}function k(e){return{byteLength:e.size,slice(t,i){return e.slice(t,i).arrayBuffer()}}}function U(e,t){return{name:e,type:t??"—"}}function I(e){return e.schema.filter(t=>t.type!==void 0).map(t=>U(t.name,t.type))}function J(e){const t=e.num_rows;return typeof t=="bigint"?Number(t):t}function V(e){for(const t of e.schema)t.type&&t.type!=="BYTE_ARRAY"&&t.type!=="FIXED_LEN_BYTE_ARRAY"&&t.converted_type==="UTF8"&&(t.converted_type=void 0)}function $(e,t){if(e==null)return"";if(typeof e=="bigint")return e.toString();if(e instanceof Date)return e.toISOString();if(typeof e=="object")try{return JSON.stringify(t.toJson(e))}catch{return String(e)}return String(e)}function K({file:e,src:t,pageSize:i=50,title:d,className:o,style:g,surface:R}){const m=l.useRef(null),[s,v]=l.useState(null),[P,x]=l.useState([]),[u,_]=l.useState(0),[w,p]=l.useState(!1),[b,y]=l.useState(null),q=L.usePrimitiveSurface(R,{src:t,file:e,totalRows:s?.totalRows??0,columns:s?.columns.map(r=>r.name)??[]},"table",m);l.useEffect(()=>{if(v(null),x([]),_(0),y(null),!e&&!t)return;p(!0);const r={cancelled:!1};return(async()=>{try{const n=await Y(),h=e?k(e):await n.asyncBufferFromUrl({url:t??""}),c=await n.parquetMetadataAsync(h);if(r.cancelled)return;V(c),v({parquet:n,buffer:h,metadata:c,columns:I(c),totalRows:J(c)})}catch(n){if(r.cancelled)return;y(n instanceof Error?n.message:"failed to read parquet")}finally{r.cancelled||p(!1)}})(),()=>{r.cancelled=!0}},[e,t]),l.useEffect(()=>{if(!s)return;const r={cancelled:!1};p(!0);const n=u*i,h=Math.min(n+i,s.totalRows);return(async()=>{try{const c=await s.parquet.parquetReadObjects({file:s.buffer,metadata:s.metadata,rowStart:n,rowEnd:h,compressors:s.parquet.compressors});if(r.cancelled)return;x(c)}catch(c){if(r.cancelled)return;y(c instanceof Error?c.message:"failed to read rows")}finally{r.cancelled||p(!1)}})(),()=>{r.cancelled=!0}},[s,u,i]);const E=l.useMemo(()=>s?s.columns.map(r=>({key:r.name,header:a.jsxs("span",{className:"aegis-parquet-viewer__col-header",children:[a.jsx("span",{className:"aegis-parquet-viewer__col-name",children:r.name}),a.jsx("span",{className:"aegis-parquet-viewer__col-type",children:r.type})]}),minWidth:120,resizable:!0,render:n=>a.jsx("span",{className:"aegis-parquet-viewer__cell",children:$(n[r.name],s.parquet)})})):[],[s]),f=s?Math.max(1,Math.ceil(s.totalRows/i)):0,j=["aegis-parquet-viewer",o??""].filter(Boolean).join(" ");return!e&&!t?a.jsx("div",{ref:m,className:j,style:g,...q,children:a.jsx("div",{className:"aegis-parquet-viewer__empty",children:"No parquet source — pass a `file` or `src` URL to inspect."})}):b!==null?a.jsx("div",{ref:m,className:j,style:g,...q,children:a.jsx("div",{className:"aegis-parquet-viewer__error",children:b})}):a.jsxs("div",{ref:m,className:j,style:g,...q,children:[a.jsxs("header",{className:"aegis-parquet-viewer__header",children:[a.jsx("div",{className:"aegis-parquet-viewer__title",children:d??"Parquet"}),s?a.jsxs("div",{className:"aegis-parquet-viewer__summary",children:[a.jsxs("span",{children:[s.totalRows.toLocaleString()," rows"]}),a.jsx("span",{className:"aegis-parquet-viewer__dot",children:"·"}),a.jsxs("span",{children:[s.columns.length," cols"]}),s.metadata.created_by?a.jsxs(a.Fragment,{children:[a.jsx("span",{className:"aegis-parquet-viewer__dot",children:"·"}),a.jsx("span",{className:"aegis-parquet-viewer__created-by",children:s.metadata.created_by})]}):null]}):null]}),s?a.jsx("div",{className:"aegis-parquet-viewer__schema",children:s.columns.map(r=>a.jsxs(O.Chip,{tone:"ghost",children:[a.jsx("span",{className:"aegis-parquet-viewer__chip-name",children:r.name}),a.jsx("span",{className:"aegis-parquet-viewer__chip-type",children:r.type})]},r.name))}):null,a.jsx("div",{className:"aegis-parquet-viewer__table",children:a.jsx(D.DataTable,{framed:!1,columns:E,data:P,rowKey:(r,n)=>`${u.toString()}-${n.toString()}`,loading:w,emptyTitle:"No rows in this page"})}),s&&f>1?a.jsxs("footer",{className:"aegis-parquet-viewer__pager",children:[a.jsx("button",{type:"button",className:"aegis-parquet-viewer__page-btn",onClick:()=>{_(r=>Math.max(0,r-1))},disabled:u===0||w,children:"← Prev"}),a.jsxs("span",{className:"aegis-parquet-viewer__page-label",children:["Page ",(u+1).toString()," / ",f.toString()]}),a.jsx("button",{type:"button",className:"aegis-parquet-viewer__page-btn",onClick:()=>{_(r=>Math.min(f-1,r+1))},disabled:u>=f-1||w,children:"Next →"})]}):null]})}exports.ParquetViewer=K;
|
|
2
|
+
//# sourceMappingURL=ParquetViewer.cjs.map
|