@lincyaw/aegis-ui 0.6.0 → 0.8.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/ChartLegend.cjs +2 -0
- package/dist/components/ui/ChartLegend.cjs.map +1 -0
- package/dist/components/ui/ChartLegend.d.ts +15 -0
- package/dist/components/ui/ChartLegend.js +36 -0
- package/dist/components/ui/ChartLegend.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 +26 -2
- package/dist/components/ui/DataTable.js +493 -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.d.ts +11 -4
- package/dist/components/ui/ParetoChart.js +292 -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.d.ts +17 -2
- package/dist/components/ui/RankBar.js +105 -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/ReplayScrubber.cjs +2 -0
- package/dist/components/ui/ReplayScrubber.cjs.map +1 -0
- package/dist/components/ui/ReplayScrubber.d.ts +35 -0
- package/dist/components/ui/ReplayScrubber.js +119 -0
- package/dist/components/ui/ReplayScrubber.js.map +1 -0
- package/dist/components/ui/ReplayStepStrip.cjs +2 -0
- package/dist/components/ui/ReplayStepStrip.cjs.map +1 -0
- package/dist/components/ui/ReplayStepStrip.d.ts +33 -0
- package/dist/components/ui/ReplayStepStrip.js +119 -0
- package/dist/components/ui/ReplayStepStrip.js.map +1 -0
- package/dist/components/ui/ReplayTransport.cjs +2 -0
- package/dist/components/ui/ReplayTransport.cjs.map +1 -0
- package/dist/components/ui/ReplayTransport.d.ts +25 -0
- package/dist/components/ui/ReplayTransport.js +103 -0
- package/dist/components/ui/ReplayTransport.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/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.d.ts +9 -8
- package/dist/components/ui/StackedBar.js +125 -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.d.ts +12 -15
- package/dist/components/ui/TimelineChart.js +291 -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 +14 -3
- 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 +13 -5
- 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.d.ts +0 -2
- package/dist/components/ui/traceFormat.js +11 -0
- package/dist/components/ui/traceFormat.js.map +1 -0
- package/dist/hooks/index.d.ts +4 -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/useReplayPlayback.cjs +2 -0
- package/dist/hooks/useReplayPlayback.cjs.map +1 -0
- package/dist/hooks/useReplayPlayback.d.ts +44 -0
- package/dist/hooks/useReplayPlayback.js +73 -0
- package/dist/hooks/useReplayPlayback.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 +13 -8
- package/dist/index.js +319 -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/SkipLink.cjs +2 -0
- package/dist/layouts/SkipLink.cjs.map +1 -0
- package/dist/layouts/SkipLink.d.ts +13 -0
- package/dist/layouts/SkipLink.js +21 -0
- package/dist/layouts/SkipLink.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 +292 -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 +34 -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 +115 -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/chart.cjs +2 -0
- package/dist/lib/chart.cjs.map +1 -0
- package/dist/lib/chart.d.ts +33 -0
- package/dist/lib/chart.js +47 -0
- package/dist/lib/chart.js.map +1 -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 +13 -8
- package/dist/locale/strings.js +204 -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/components/ui/SessionRunView.d.ts +0 -50
- 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
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
|
+
import { ChartColor } from '../../lib/chart';
|
|
2
3
|
export interface RankBarItem {
|
|
3
4
|
key: string;
|
|
4
5
|
label: ReactNode;
|
|
@@ -9,17 +10,31 @@ export interface RankBarItem {
|
|
|
9
10
|
value: number | null;
|
|
10
11
|
/** Trailing slot for a per-row link, e.g. "逐题表现". */
|
|
11
12
|
action?: ReactNode;
|
|
13
|
+
/**
|
|
14
|
+
* The bar's colour, e.g. the series colour of the model's vendor.
|
|
15
|
+
* Defaults to `--rank-bar-fill`.
|
|
16
|
+
*/
|
|
17
|
+
color?: ChartColor;
|
|
12
18
|
}
|
|
13
19
|
interface RankBarProps {
|
|
14
20
|
items: RankBarItem[];
|
|
15
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* Upper bound of the scale. Defaults to the largest value, or 1 when all
|
|
23
|
+
* are 0; pass `1` for a share or a 0–1 score.
|
|
24
|
+
*/
|
|
16
25
|
max?: number;
|
|
17
26
|
/** Scale hint rendered at the bottom, e.g. "越高越好". */
|
|
18
27
|
direction?: ReactNode;
|
|
19
28
|
format?: (value: number) => string;
|
|
20
29
|
/** Makes each row's label and bar track select that row. */
|
|
21
30
|
onSelect?: (key: string) => void;
|
|
31
|
+
/**
|
|
32
|
+
* How far the bars are drawn, 0 to 1, for a chart that draws as its
|
|
33
|
+
* section scrolls in (`useScrollProgress`). Omitted, the bars draw in
|
|
34
|
+
* once when they mount.
|
|
35
|
+
*/
|
|
36
|
+
progress?: number;
|
|
22
37
|
className?: string;
|
|
23
38
|
}
|
|
24
|
-
export declare function RankBar({ items, max, direction, format, onSelect, className, }: RankBarProps): import("react/jsx-runtime").JSX.Element;
|
|
39
|
+
export declare function RankBar({ items, max, direction, format, onSelect, progress, className, }: RankBarProps): import("react/jsx-runtime").JSX.Element;
|
|
25
40
|
export {};
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
import { jsxs as c, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { zeroAnchoredDomain as h, staggeredProgress as v, chartColorValue as N } from "../../lib/chart.js";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useStrings as m } from "../../locale/useStrings.js";
|
|
5
|
+
function B({
|
|
6
|
+
items: o,
|
|
7
|
+
max: g,
|
|
8
|
+
direction: _,
|
|
9
|
+
format: n = (s) => s.toFixed(2),
|
|
10
|
+
onSelect: e,
|
|
11
|
+
progress: k,
|
|
12
|
+
className: t
|
|
13
|
+
}) {
|
|
14
|
+
const s = m(), u = o.flatMap(
|
|
15
|
+
(a) => a.value === null ? [] : [a.value]
|
|
16
|
+
), [, i] = h(u, g), p = [
|
|
17
|
+
"aegis-rank-bar",
|
|
18
|
+
k === void 0 ? "" : "aegis-rank-bar--scroll",
|
|
19
|
+
t ?? ""
|
|
20
|
+
].filter(Boolean).join(" ");
|
|
21
|
+
return /* @__PURE__ */ c("div", { className: p, children: [
|
|
22
|
+
o.map((a, b) => {
|
|
23
|
+
const { value: l } = a, d = l === null ? null : /* @__PURE__ */ r(
|
|
24
|
+
"div",
|
|
25
|
+
{
|
|
26
|
+
className: [
|
|
27
|
+
"aegis-rank-bar__fill",
|
|
28
|
+
l === 0 ? "aegis-rank-bar__fill--zero" : ""
|
|
29
|
+
].filter(Boolean).join(" "),
|
|
30
|
+
style: {
|
|
31
|
+
width: `${(i > 0 ? l / i * 100 : 0).toString()}%`,
|
|
32
|
+
"--aegis-rank-bar-index": b,
|
|
33
|
+
...a.color === void 0 || l === 0 ? {} : { background: N(a.color) },
|
|
34
|
+
...k === void 0 ? {} : {
|
|
35
|
+
"--aegis-rank-bar-progress": v(
|
|
36
|
+
k,
|
|
37
|
+
b,
|
|
38
|
+
o.length
|
|
39
|
+
)
|
|
40
|
+
}
|
|
41
|
+
},
|
|
42
|
+
children: /* @__PURE__ */ r("span", { className: "aegis-rank-bar__ink" })
|
|
43
|
+
}
|
|
44
|
+
);
|
|
45
|
+
return /* @__PURE__ */ c("div", { className: "aegis-rank-bar__row", children: [
|
|
46
|
+
e ? /* @__PURE__ */ r(
|
|
47
|
+
"button",
|
|
48
|
+
{
|
|
49
|
+
type: "button",
|
|
50
|
+
className: "aegis-rank-bar__label aegis-rank-bar__label--link",
|
|
51
|
+
onClick: () => {
|
|
52
|
+
e(a.key);
|
|
53
|
+
},
|
|
54
|
+
children: a.label
|
|
55
|
+
}
|
|
56
|
+
) : /* @__PURE__ */ r("span", { className: "aegis-rank-bar__label", children: a.label }),
|
|
57
|
+
e ? (
|
|
58
|
+
// The label button is the keyboard and screen-reader target;
|
|
59
|
+
// the track only widens the pointer target.
|
|
60
|
+
/* @__PURE__ */ r(
|
|
61
|
+
"button",
|
|
62
|
+
{
|
|
63
|
+
type: "button",
|
|
64
|
+
tabIndex: -1,
|
|
65
|
+
"aria-hidden": "true",
|
|
66
|
+
className: "aegis-rank-bar__track aegis-rank-bar__track--link",
|
|
67
|
+
onClick: () => {
|
|
68
|
+
e(a.key);
|
|
69
|
+
},
|
|
70
|
+
children: d
|
|
71
|
+
}
|
|
72
|
+
)
|
|
73
|
+
) : /* @__PURE__ */ r(
|
|
74
|
+
"div",
|
|
75
|
+
{
|
|
76
|
+
className: "aegis-rank-bar__track",
|
|
77
|
+
role: "img",
|
|
78
|
+
"aria-label": l === null ? s.noValue : s.barValue(n(l), n(i)),
|
|
79
|
+
children: d
|
|
80
|
+
}
|
|
81
|
+
),
|
|
82
|
+
/* @__PURE__ */ r(
|
|
83
|
+
"span",
|
|
84
|
+
{
|
|
85
|
+
className: l === null ? "aegis-rank-bar__value aegis-rank-bar__value--empty" : "aegis-rank-bar__value",
|
|
86
|
+
children: l === null ? "—" : n(l)
|
|
87
|
+
}
|
|
88
|
+
),
|
|
89
|
+
/* @__PURE__ */ r("span", { className: "aegis-rank-bar__action", children: a.action })
|
|
90
|
+
] }, a.key);
|
|
91
|
+
}),
|
|
92
|
+
/* @__PURE__ */ c("div", { className: "aegis-rank-bar__scale", children: [
|
|
93
|
+
/* @__PURE__ */ r("span", { className: "aegis-rank-bar__spacer" }),
|
|
94
|
+
/* @__PURE__ */ c("div", { className: "aegis-rank-bar__ticks", children: [
|
|
95
|
+
/* @__PURE__ */ r("span", { children: "0" }),
|
|
96
|
+
_ !== void 0 && /* @__PURE__ */ r("span", { className: "aegis-rank-bar__direction", children: _ }),
|
|
97
|
+
/* @__PURE__ */ r("span", { children: n(i) })
|
|
98
|
+
] })
|
|
99
|
+
] })
|
|
100
|
+
] });
|
|
101
|
+
}
|
|
102
|
+
export {
|
|
103
|
+
B as RankBar
|
|
104
|
+
};
|
|
105
|
+
//# sourceMappingURL=RankBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RankBar.js","sources":["../../../src/components/ui/RankBar.tsx"],"sourcesContent":["import { type CSSProperties, type ReactNode } from 'react';\n\nimport {\n type ChartColor,\n chartColorValue,\n staggeredProgress,\n zeroAnchoredDomain,\n} from '../../lib/chart';\nimport { useStrings } from '../../locale';\nimport './RankBar.css';\n\nexport interface RankBarItem {\n key: string;\n label: ReactNode;\n /**\n * `null` is a missing value: an em dash over an empty track, distinct\n * from a real 0, which keeps a visible endpoint.\n */\n value: number | null;\n /** Trailing slot for a per-row link, e.g. \"逐题表现\". */\n action?: ReactNode;\n /**\n * The bar's colour, e.g. the series colour of the model's vendor.\n * Defaults to `--rank-bar-fill`.\n */\n color?: ChartColor;\n}\n\ninterface RankBarProps {\n items: RankBarItem[];\n /**\n * Upper bound of the scale. Defaults to the largest value, or 1 when all\n * are 0; pass `1` for a share or a 0–1 score.\n */\n max?: number;\n /** Scale hint rendered at the bottom, e.g. \"越高越好\". */\n direction?: ReactNode;\n format?: (value: number) => string;\n /** Makes each row's label and bar track select that row. */\n onSelect?: (key: string) => void;\n /**\n * How far the bars are drawn, 0 to 1, for a chart that draws as its\n * section scrolls in (`useScrollProgress`). Omitted, the bars draw in\n * once when they mount.\n */\n progress?: number;\n className?: string;\n}\n\nexport function RankBar({\n items,\n max,\n direction,\n format = (value) => value.toFixed(2),\n onSelect,\n progress,\n className,\n}: RankBarProps) {\n const strings = useStrings();\n const values = items.flatMap((item) =>\n item.value === null ? [] : [item.value],\n );\n const [, upperBound] = zeroAnchoredDomain(values, max);\n const cls = [\n 'aegis-rank-bar',\n progress === undefined ? '' : 'aegis-rank-bar--scroll',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls}>\n {items.map((item, index) => {\n const { value } = item;\n const fill =\n value === null ? null : (\n <div\n className={[\n 'aegis-rank-bar__fill',\n value === 0 ? 'aegis-rank-bar__fill--zero' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n style={\n {\n width: `${(upperBound > 0 ? (value / upperBound) * 100 : 0).toString()}%`,\n '--aegis-rank-bar-index': index,\n ...(item.color === undefined || value === 0\n ? {}\n : { background: chartColorValue(item.color) }),\n ...(progress === undefined\n ? {}\n : {\n '--aegis-rank-bar-progress': staggeredProgress(\n progress,\n index,\n items.length,\n ),\n }),\n } as CSSProperties\n }\n >\n <span className=\"aegis-rank-bar__ink\" />\n </div>\n );\n return (\n <div className=\"aegis-rank-bar__row\" key={item.key}>\n {onSelect ? (\n <button\n type=\"button\"\n className=\"aegis-rank-bar__label aegis-rank-bar__label--link\"\n onClick={() => {\n onSelect(item.key);\n }}\n >\n {item.label}\n </button>\n ) : (\n <span className=\"aegis-rank-bar__label\">{item.label}</span>\n )}\n {onSelect ? (\n // The label button is the keyboard and screen-reader target;\n // the track only widens the pointer target.\n <button\n type=\"button\"\n tabIndex={-1}\n aria-hidden=\"true\"\n className=\"aegis-rank-bar__track aegis-rank-bar__track--link\"\n onClick={() => {\n onSelect(item.key);\n }}\n >\n {fill}\n </button>\n ) : (\n <div\n className=\"aegis-rank-bar__track\"\n role=\"img\"\n aria-label={\n value === null\n ? strings.noValue\n : strings.barValue(format(value), format(upperBound))\n }\n >\n {fill}\n </div>\n )}\n <span\n className={\n value === null\n ? 'aegis-rank-bar__value aegis-rank-bar__value--empty'\n : 'aegis-rank-bar__value'\n }\n >\n {value === null ? '—' : format(value)}\n </span>\n <span className=\"aegis-rank-bar__action\">{item.action}</span>\n </div>\n );\n })}\n <div className=\"aegis-rank-bar__scale\">\n <span className=\"aegis-rank-bar__spacer\" />\n <div className=\"aegis-rank-bar__ticks\">\n <span>0</span>\n {direction !== undefined && (\n <span className=\"aegis-rank-bar__direction\">{direction}</span>\n )}\n <span>{format(upperBound)}</span>\n </div>\n </div>\n </div>\n );\n}\n"],"names":["RankBar","items","max","direction","format","value","onSelect","progress","className","strings","useStrings","values","item","upperBound","zeroAnchoredDomain","cls","jsxs","index","fill","jsx","chartColorValue","staggeredProgress"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),a=require("react");;/* empty css */const b=require("./Button.cjs"),f=require("./PasswordField.cjs"),c=require("./TextField.cjs");function q({onSubmit:n,submitting:t=!1,error:l,minPasswordLength:s=8}){const[u,m]=a.useState(""),[i,h]=a.useState(""),[o,p]=a.useState(""),[g,v]=a.useState(!1),d=o.length<s,x=g&&d,S=e=>{e.preventDefault(),v(!0),!d&&n({name:u,email:i,password:o})};return r.jsxs("form",{className:"aegis-registerform",onSubmit:S,noValidate:!0,children:[l&&r.jsx("div",{className:"aegis-registerform__error",role:"alert",children:l}),r.jsx(c.TextField,{label:"Name",autoComplete:"name",placeholder:"Ada Lovelace",value:u,onChange:e=>m(e.target.value),disabled:t,required:!0}),r.jsx(c.TextField,{label:"Email",type:"email",autoComplete:"email",placeholder:"you@example.com",value:i,onChange:e=>h(e.target.value),disabled:t,required:!0}),r.jsx(f.PasswordField,{label:"Password",autoComplete:"new-password",placeholder:"••••••••",value:o,onChange:e=>p(e.target.value),disabled:t,required:!0,helperText:`At least ${String(s)} characters.`,error:x?`Password must be at least ${String(s)} characters.`:void 0}),r.jsx(b.Button,{tone:"primary",type:"submit",className:"aegis-registerform__submit",disabled:t,children:t?"Creating account…":"Create account"})]})}exports.RegisterForm=q;
|
|
2
|
+
//# sourceMappingURL=RegisterForm.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegisterForm.cjs","sources":["../../../src/components/ui/RegisterForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport './AuthForm.css';\nimport { Button } from './Button';\nimport { PasswordField } from './PasswordField';\nimport { TextField } from './TextField';\n\ninterface RegisterFormValues {\n name: string;\n email: string;\n password: string;\n}\n\ninterface RegisterFormProps {\n onSubmit: (values: RegisterFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n minPasswordLength?: number;\n}\n\nexport function RegisterForm({\n onSubmit,\n submitting = false,\n error,\n minPasswordLength = 8,\n}: RegisterFormProps): ReactElement {\n const [name, setName] = useState('');\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [touched, setTouched] = useState(false);\n\n const passwordTooShort = password.length < minPasswordLength;\n const showPasswordError = touched && passwordTooShort;\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setTouched(true);\n if (passwordTooShort) {\n return;\n }\n void onSubmit({ name, email, password });\n };\n\n return (\n <form className=\"aegis-registerform\" onSubmit={handleSubmit} noValidate>\n {error && (\n <div className=\"aegis-registerform__error\" role=\"alert\">\n {error}\n </div>\n )}\n <TextField\n label=\"Name\"\n autoComplete=\"name\"\n placeholder=\"Ada Lovelace\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={submitting}\n required\n />\n <TextField\n label=\"Email\"\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n disabled={submitting}\n required\n />\n <PasswordField\n label=\"Password\"\n autoComplete=\"new-password\"\n placeholder=\"••••••••\"\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n disabled={submitting}\n required\n helperText={`At least ${String(minPasswordLength)} characters.`}\n error={\n showPasswordError\n ? `Password must be at least ${String(minPasswordLength)} characters.`\n : undefined\n }\n />\n <Button\n tone=\"primary\"\n type=\"submit\"\n className=\"aegis-registerform__submit\"\n disabled={submitting}\n >\n {submitting ? 'Creating account…' : 'Create account'}\n </Button>\n </form>\n );\n}\n"],"names":["RegisterForm","onSubmit","submitting","error","minPasswordLength","name","setName","useState","email","setEmail","password","setPassword","touched","setTouched","passwordTooShort","showPasswordError","handleSubmit","jsx","TextField","PasswordField","Button"],"mappings":"oQAoBO,SAASA,EAAa,CAC3B,SAAAC,EACA,WAAAC,EAAa,GACb,MAAAC,EACA,kBAAAC,EAAoB,CACtB,EAAoC,CAClC,KAAM,CAACC,EAAMC,CAAO,EAAIC,EAAAA,SAAS,EAAE,EAC7B,CAACC,EAAOC,CAAQ,EAAIF,EAAAA,SAAS,EAAE,EAC/B,CAACG,EAAUC,CAAW,EAAIJ,EAAAA,SAAS,EAAE,EACrC,CAACK,EAASC,CAAU,EAAIN,EAAAA,SAAS,EAAK,EAEtCO,EAAmBJ,EAAS,OAASN,EACrCW,EAAoBH,GAAWE,EAE/BE,EAAgB,GAAwC,CAC5D,EAAE,eAAA,EACFH,EAAW,EAAI,EACX,CAAAC,GAGCb,EAAS,CAAE,KAAAI,EAAM,MAAAG,EAAO,SAAAE,EAAU,CACzC,EAEA,cACG,OAAA,CAAK,UAAU,qBAAqB,SAAUM,EAAc,WAAU,GACpE,SAAA,CAAAb,SACE,MAAA,CAAI,UAAU,4BAA4B,KAAK,QAC7C,SAAAA,EACH,EAEFc,EAAAA,IAACC,EAAAA,UAAA,CACC,MAAM,OACN,aAAa,OACb,YAAY,eACZ,MAAOb,EACP,SAAW,GAAMC,EAAQ,EAAE,OAAO,KAAK,EACvC,SAAUJ,EACV,SAAQ,EAAA,CAAA,EAEVe,EAAAA,IAACC,EAAAA,UAAA,CACC,MAAM,QACN,KAAK,QACL,aAAa,QACb,YAAY,kBACZ,MAAOV,EACP,SAAW,GAAMC,EAAS,EAAE,OAAO,KAAK,EACxC,SAAUP,EACV,SAAQ,EAAA,CAAA,EAEVe,EAAAA,IAACE,EAAAA,cAAA,CACC,MAAM,WACN,aAAa,eACb,YAAY,WACZ,MAAOT,EACP,SAAW,GAAMC,EAAY,EAAE,OAAO,KAAK,EAC3C,SAAUT,EACV,SAAQ,GACR,WAAY,YAAY,OAAOE,CAAiB,CAAC,eACjD,MACEW,EACI,6BAA6B,OAAOX,CAAiB,CAAC,eACtD,MAAA,CAAA,EAGRa,EAAAA,IAACG,EAAAA,OAAA,CACC,KAAK,UACL,KAAK,SACL,UAAU,6BACV,SAAUlB,EAET,WAAa,oBAAsB,gBAAA,CAAA,CACtC,EACF,CAEJ"}
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import { jsxs as b, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useState as t } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { Button as w } from "./Button.js";
|
|
5
|
+
import { PasswordField as C } from "./PasswordField.js";
|
|
6
|
+
import { TextField as u } from "./TextField.js";
|
|
7
|
+
function E({
|
|
8
|
+
onSubmit: c,
|
|
9
|
+
submitting: r = !1,
|
|
10
|
+
error: s,
|
|
11
|
+
minPasswordLength: o = 8
|
|
12
|
+
}) {
|
|
13
|
+
const [i, n] = t(""), [d, p] = t(""), [l, h] = t(""), [f, g] = t(!1), m = l.length < o, v = f && m;
|
|
14
|
+
return /* @__PURE__ */ b("form", { className: "aegis-registerform", onSubmit: (e) => {
|
|
15
|
+
e.preventDefault(), g(!0), !m && c({ name: i, email: d, password: l });
|
|
16
|
+
}, noValidate: !0, children: [
|
|
17
|
+
s && /* @__PURE__ */ a("div", { className: "aegis-registerform__error", role: "alert", children: s }),
|
|
18
|
+
/* @__PURE__ */ a(
|
|
19
|
+
u,
|
|
20
|
+
{
|
|
21
|
+
label: "Name",
|
|
22
|
+
autoComplete: "name",
|
|
23
|
+
placeholder: "Ada Lovelace",
|
|
24
|
+
value: i,
|
|
25
|
+
onChange: (e) => n(e.target.value),
|
|
26
|
+
disabled: r,
|
|
27
|
+
required: !0
|
|
28
|
+
}
|
|
29
|
+
),
|
|
30
|
+
/* @__PURE__ */ a(
|
|
31
|
+
u,
|
|
32
|
+
{
|
|
33
|
+
label: "Email",
|
|
34
|
+
type: "email",
|
|
35
|
+
autoComplete: "email",
|
|
36
|
+
placeholder: "you@example.com",
|
|
37
|
+
value: d,
|
|
38
|
+
onChange: (e) => p(e.target.value),
|
|
39
|
+
disabled: r,
|
|
40
|
+
required: !0
|
|
41
|
+
}
|
|
42
|
+
),
|
|
43
|
+
/* @__PURE__ */ a(
|
|
44
|
+
C,
|
|
45
|
+
{
|
|
46
|
+
label: "Password",
|
|
47
|
+
autoComplete: "new-password",
|
|
48
|
+
placeholder: "••••••••",
|
|
49
|
+
value: l,
|
|
50
|
+
onChange: (e) => h(e.target.value),
|
|
51
|
+
disabled: r,
|
|
52
|
+
required: !0,
|
|
53
|
+
helperText: `At least ${String(o)} characters.`,
|
|
54
|
+
error: v ? `Password must be at least ${String(o)} characters.` : void 0
|
|
55
|
+
}
|
|
56
|
+
),
|
|
57
|
+
/* @__PURE__ */ a(
|
|
58
|
+
w,
|
|
59
|
+
{
|
|
60
|
+
tone: "primary",
|
|
61
|
+
type: "submit",
|
|
62
|
+
className: "aegis-registerform__submit",
|
|
63
|
+
disabled: r,
|
|
64
|
+
children: r ? "Creating account…" : "Create account"
|
|
65
|
+
}
|
|
66
|
+
)
|
|
67
|
+
] });
|
|
68
|
+
}
|
|
69
|
+
export {
|
|
70
|
+
E as RegisterForm
|
|
71
|
+
};
|
|
72
|
+
//# sourceMappingURL=RegisterForm.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RegisterForm.js","sources":["../../../src/components/ui/RegisterForm.tsx"],"sourcesContent":["import { type FormEvent, type ReactElement, useState } from 'react';\n\nimport './AuthForm.css';\nimport { Button } from './Button';\nimport { PasswordField } from './PasswordField';\nimport { TextField } from './TextField';\n\ninterface RegisterFormValues {\n name: string;\n email: string;\n password: string;\n}\n\ninterface RegisterFormProps {\n onSubmit: (values: RegisterFormValues) => void | Promise<void>;\n submitting?: boolean;\n error?: string;\n minPasswordLength?: number;\n}\n\nexport function RegisterForm({\n onSubmit,\n submitting = false,\n error,\n minPasswordLength = 8,\n}: RegisterFormProps): ReactElement {\n const [name, setName] = useState('');\n const [email, setEmail] = useState('');\n const [password, setPassword] = useState('');\n const [touched, setTouched] = useState(false);\n\n const passwordTooShort = password.length < minPasswordLength;\n const showPasswordError = touched && passwordTooShort;\n\n const handleSubmit = (e: FormEvent<HTMLFormElement>): void => {\n e.preventDefault();\n setTouched(true);\n if (passwordTooShort) {\n return;\n }\n void onSubmit({ name, email, password });\n };\n\n return (\n <form className=\"aegis-registerform\" onSubmit={handleSubmit} noValidate>\n {error && (\n <div className=\"aegis-registerform__error\" role=\"alert\">\n {error}\n </div>\n )}\n <TextField\n label=\"Name\"\n autoComplete=\"name\"\n placeholder=\"Ada Lovelace\"\n value={name}\n onChange={(e) => setName(e.target.value)}\n disabled={submitting}\n required\n />\n <TextField\n label=\"Email\"\n type=\"email\"\n autoComplete=\"email\"\n placeholder=\"you@example.com\"\n value={email}\n onChange={(e) => setEmail(e.target.value)}\n disabled={submitting}\n required\n />\n <PasswordField\n label=\"Password\"\n autoComplete=\"new-password\"\n placeholder=\"••••••••\"\n value={password}\n onChange={(e) => setPassword(e.target.value)}\n disabled={submitting}\n required\n helperText={`At least ${String(minPasswordLength)} characters.`}\n error={\n showPasswordError\n ? `Password must be at least ${String(minPasswordLength)} characters.`\n : undefined\n }\n />\n <Button\n tone=\"primary\"\n type=\"submit\"\n className=\"aegis-registerform__submit\"\n disabled={submitting}\n >\n {submitting ? 'Creating account…' : 'Create account'}\n </Button>\n </form>\n );\n}\n"],"names":["RegisterForm","onSubmit","submitting","error","minPasswordLength","name","setName","useState","email","setEmail","password","setPassword","touched","setTouched","passwordTooShort","showPasswordError","jsx","TextField","PasswordField","Button"],"mappings":";;;;;;AAoBO,SAASA,EAAa;AAAA,EAC3B,UAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,OAAAC;AAAA,EACA,mBAAAC,IAAoB;AACtB,GAAoC;AAClC,QAAM,CAACC,GAAMC,CAAO,IAAIC,EAAS,EAAE,GAC7B,CAACC,GAAOC,CAAQ,IAAIF,EAAS,EAAE,GAC/B,CAACG,GAAUC,CAAW,IAAIJ,EAAS,EAAE,GACrC,CAACK,GAASC,CAAU,IAAIN,EAAS,EAAK,GAEtCO,IAAmBJ,EAAS,SAASN,GACrCW,IAAoBH,KAAWE;AAWrC,2BACG,QAAA,EAAK,WAAU,sBAAqB,UAVlB,CAAC,MAAwC;AAG5D,IAFA,EAAE,eAAA,GACFD,EAAW,EAAI,GACX,CAAAC,KAGCb,EAAS,EAAE,MAAAI,GAAM,OAAAG,GAAO,UAAAE,GAAU;AAAA,EACzC,GAG+D,YAAU,IACpE,UAAA;AAAA,IAAAP,uBACE,OAAA,EAAI,WAAU,6BAA4B,MAAK,SAC7C,UAAAA,GACH;AAAA,IAEF,gBAAAa;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,cAAa;AAAA,QACb,aAAY;AAAA,QACZ,OAAOZ;AAAA,QACP,UAAU,CAAC,MAAMC,EAAQ,EAAE,OAAO,KAAK;AAAA,QACvC,UAAUJ;AAAA,QACV,UAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEV,gBAAAc;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,MAAK;AAAA,QACL,cAAa;AAAA,QACb,aAAY;AAAA,QACZ,OAAOT;AAAA,QACP,UAAU,CAAC,MAAMC,EAAS,EAAE,OAAO,KAAK;AAAA,QACxC,UAAUP;AAAA,QACV,UAAQ;AAAA,MAAA;AAAA,IAAA;AAAA,IAEV,gBAAAc;AAAA,MAACE;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,cAAa;AAAA,QACb,aAAY;AAAA,QACZ,OAAOR;AAAA,QACP,UAAU,CAAC,MAAMC,EAAY,EAAE,OAAO,KAAK;AAAA,QAC3C,UAAUT;AAAA,QACV,UAAQ;AAAA,QACR,YAAY,YAAY,OAAOE,CAAiB,CAAC;AAAA,QACjD,OACEW,IACI,6BAA6B,OAAOX,CAAiB,CAAC,iBACtD;AAAA,MAAA;AAAA,IAAA;AAAA,IAGR,gBAAAY;AAAA,MAACG;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,MAAK;AAAA,QACL,WAAU;AAAA,QACV,UAAUjB;AAAA,QAET,cAAa,sBAAsB;AAAA,MAAA;AAAA,IAAA;AAAA,EACtC,GACF;AAEJ;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),D=require("react"),E=require("../../lib/chart.cjs");;/* empty css */const q=require("../../locale/useStrings.cjs"),y=.08;function v({count:i,index:r,onIndexChange:b,markers:p=[],formatStep:u=o=>o+1,ariaLabel:m,onScrubStart:d,onScrubEnd:f,className:j}){const o=q.useStrings(),g=D.useRef(null),a=Math.max(i-1,0),c=e=>a===0?0:Math.min(Math.max(e/a,0),1),_=e=>{const t=g.current;if(!t)return;const l=t.getBoundingClientRect(),C=(e-l.left)/Math.max(l.width,1);b(Math.round(Math.min(Math.max(C,0),1)*a))},M=e=>{e.button===0&&(e.currentTarget.setPointerCapture(e.pointerId),d?.(),_(e.clientX))},N=e=>{e.currentTarget.hasPointerCapture(e.pointerId)&&_(e.clientX)},h=()=>{f?.()},P=e=>{const t=Math.max(Math.round(i/10),1),l={ArrowLeft:r-1,ArrowDown:r-1,ArrowRight:r+1,ArrowUp:r+1,PageDown:r-t,PageUp:r+t,Home:0,End:a};e.key in l&&(e.preventDefault(),b(Math.min(Math.max(l[e.key],0),a)))},w={"--aegis-replay-scrubber-position":c(r)},n=Math.max(i,0),R=p.filter(e=>e.index===r).map(e=>e.label),S=[o.replayStepOf(n===0?0:r+1,n),...R].join(" · "),k=r>0&&c(r)<y,A=r<a&&c(r)>1-y;return s.jsxs("div",{className:["aegis-replay-scrubber",j??""].filter(Boolean).join(" "),style:w,children:[s.jsx("div",{className:"aegis-replay-scrubber__markers","aria-hidden":"true",children:p.map((e,t)=>s.jsx("span",{className:"aegis-replay-scrubber__marker",title:e.label,style:{left:`${(c(e.index)*100).toString()}%`,background:E.chartColorValue(e.color)}},t))}),s.jsxs("div",{ref:g,className:"aegis-replay-scrubber__track",role:"slider",tabIndex:0,"aria-label":m??o.replayPosition,"aria-valuemin":n===0?0:1,"aria-valuemax":n,"aria-valuenow":n===0?0:r+1,"aria-valuetext":S,onPointerDown:M,onPointerMove:N,onPointerUp:h,onPointerCancel:h,onKeyDown:P,children:[s.jsx("span",{className:"aegis-replay-scrubber__played"}),s.jsx("span",{className:"aegis-replay-scrubber__thumb"})]}),s.jsxs("div",{className:"aegis-replay-scrubber__labels","aria-hidden":"true",children:[s.jsx("span",{className:["aegis-replay-scrubber__end",r===0?"aegis-replay-scrubber__label--current":"",k?"aegis-replay-scrubber__end--hidden":""].filter(Boolean).join(" "),children:n===0?null:u(0)}),r>0&&r<a&&s.jsx("span",{className:"aegis-replay-scrubber__at aegis-replay-scrubber__label--current",children:u(r)}),a>0&&s.jsx("span",{className:["aegis-replay-scrubber__end aegis-replay-scrubber__end--last",r===a?"aegis-replay-scrubber__label--current":"",A?"aegis-replay-scrubber__end--hidden":""].filter(Boolean).join(" "),children:u(a)})]})]})}exports.ReplayScrubber=v;
|
|
2
|
+
//# sourceMappingURL=ReplayScrubber.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplayScrubber.cjs","sources":["../../../src/components/ui/ReplayScrubber.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n useRef,\n} from 'react';\n\nimport { type ChartColor, chartColorValue } from '../../lib/chart';\nimport { useStrings } from '../../locale';\nimport './ReplayScrubber.css';\n\nexport interface ReplayScrubberMarker {\n /** The step the marker sits over. */\n index: number;\n color: ChartColor;\n /** Names the event, e.g. \"T17 · 夺取 C4\"; shown as the marker's tooltip. */\n label: string;\n}\n\nexport interface ReplayScrubberProps {\n /** How many steps the replay has. */\n count: number;\n index: number;\n onIndexChange: (index: number) => void;\n /** Events above the track, each a dot in its colour. */\n markers?: ReplayScrubberMarker[];\n /** The label of a step under the track, e.g. `T42`. Defaults to its number. */\n formatStep?: (index: number) => ReactNode;\n /** Names the slider; defaults to \"Replay position\". */\n ariaLabel?: string;\n /**\n * A pointer drag starts and ends: hold playback in between, e.g. with\n * `useReplayPlayback`'s `hold` and `release`.\n */\n onScrubStart?: () => void;\n onScrubEnd?: () => void;\n className?: string;\n}\n\n/** A label within this share of the track from an end hides that end's label. */\nconst END_CLEARANCE = 0.08;\n\n/**\n * The replay's position: a track from the first step to the last with a\n * thumb at the current one and event markers above it. Drag or click to\n * seek; arrow keys step by one, Page Up / Down by a tenth, Home / End to\n * the ends.\n */\nexport function ReplayScrubber({\n count,\n index,\n onIndexChange,\n markers = [],\n formatStep = (step) => step + 1,\n ariaLabel,\n onScrubStart,\n onScrubEnd,\n className,\n}: ReplayScrubberProps): ReactElement {\n const strings = useStrings();\n const trackRef = useRef<HTMLDivElement>(null);\n const last = Math.max(count - 1, 0);\n const share = (step: number): number =>\n last === 0 ? 0 : Math.min(Math.max(step / last, 0), 1);\n\n const seekToPointer = (clientX: number): void => {\n const track = trackRef.current;\n if (!track) {\n return;\n }\n const rect = track.getBoundingClientRect();\n const ratio = (clientX - rect.left) / Math.max(rect.width, 1);\n onIndexChange(Math.round(Math.min(Math.max(ratio, 0), 1) * last));\n };\n\n const onPointerDown = (event: PointerEvent<HTMLDivElement>): void => {\n if (event.button !== 0) {\n return;\n }\n event.currentTarget.setPointerCapture(event.pointerId);\n onScrubStart?.();\n seekToPointer(event.clientX);\n };\n const onPointerMove = (event: PointerEvent<HTMLDivElement>): void => {\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n seekToPointer(event.clientX);\n }\n };\n const onPointerEnd = (): void => {\n onScrubEnd?.();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {\n const page = Math.max(Math.round(count / 10), 1);\n const target: Record<string, number> = {\n ArrowLeft: index - 1,\n ArrowDown: index - 1,\n ArrowRight: index + 1,\n ArrowUp: index + 1,\n PageDown: index - page,\n PageUp: index + page,\n Home: 0,\n End: last,\n };\n if (event.key in target) {\n event.preventDefault();\n onIndexChange(Math.min(Math.max(target[event.key], 0), last));\n }\n };\n\n const position = { '--aegis-replay-scrubber-position': share(index) };\n const total = Math.max(count, 0);\n const here = markers\n .filter((marker) => marker.index === index)\n .map((marker) => marker.label);\n const valueText = [\n strings.replayStepOf(total === 0 ? 0 : index + 1, total),\n ...here,\n ].join(' · ');\n const nearStart = index > 0 && share(index) < END_CLEARANCE;\n const nearEnd = index < last && share(index) > 1 - END_CLEARANCE;\n return (\n <div\n className={['aegis-replay-scrubber', className ?? '']\n .filter(Boolean)\n .join(' ')}\n style={position as CSSProperties}\n >\n <div className=\"aegis-replay-scrubber__markers\" aria-hidden=\"true\">\n {markers.map((marker, position) => (\n <span\n key={position}\n className=\"aegis-replay-scrubber__marker\"\n title={marker.label}\n style={\n {\n left: `${(share(marker.index) * 100).toString()}%`,\n background: chartColorValue(marker.color),\n } as CSSProperties\n }\n />\n ))}\n </div>\n <div\n ref={trackRef}\n className=\"aegis-replay-scrubber__track\"\n role=\"slider\"\n tabIndex={0}\n aria-label={ariaLabel ?? strings.replayPosition}\n aria-valuemin={total === 0 ? 0 : 1}\n aria-valuemax={total}\n aria-valuenow={total === 0 ? 0 : index + 1}\n aria-valuetext={valueText}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerEnd}\n onPointerCancel={onPointerEnd}\n onKeyDown={onKeyDown}\n >\n <span className=\"aegis-replay-scrubber__played\" />\n <span className=\"aegis-replay-scrubber__thumb\" />\n </div>\n <div className=\"aegis-replay-scrubber__labels\" aria-hidden=\"true\">\n <span\n className={[\n 'aegis-replay-scrubber__end',\n index === 0 ? 'aegis-replay-scrubber__label--current' : '',\n nearStart ? 'aegis-replay-scrubber__end--hidden' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {total === 0 ? null : formatStep(0)}\n </span>\n {index > 0 && index < last && (\n <span className=\"aegis-replay-scrubber__at aegis-replay-scrubber__label--current\">\n {formatStep(index)}\n </span>\n )}\n {last > 0 && (\n <span\n className={[\n 'aegis-replay-scrubber__end aegis-replay-scrubber__end--last',\n index === last ? 'aegis-replay-scrubber__label--current' : '',\n nearEnd ? 'aegis-replay-scrubber__end--hidden' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {formatStep(last)}\n </span>\n )}\n </div>\n </div>\n );\n}\n"],"names":["END_CLEARANCE","ReplayScrubber","count","index","onIndexChange","markers","formatStep","step","ariaLabel","onScrubStart","onScrubEnd","className","strings","useStrings","trackRef","useRef","last","share","seekToPointer","clientX","track","rect","ratio","onPointerDown","event","onPointerMove","onPointerEnd","onKeyDown","page","target","position","total","here","marker","valueText","nearStart","nearEnd","jsxs","jsx","chartColorValue"],"mappings":"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"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ChartColor } from '../../lib/chart';
|
|
3
|
+
export interface ReplayScrubberMarker {
|
|
4
|
+
/** The step the marker sits over. */
|
|
5
|
+
index: number;
|
|
6
|
+
color: ChartColor;
|
|
7
|
+
/** Names the event, e.g. "T17 · 夺取 C4"; shown as the marker's tooltip. */
|
|
8
|
+
label: string;
|
|
9
|
+
}
|
|
10
|
+
export interface ReplayScrubberProps {
|
|
11
|
+
/** How many steps the replay has. */
|
|
12
|
+
count: number;
|
|
13
|
+
index: number;
|
|
14
|
+
onIndexChange: (index: number) => void;
|
|
15
|
+
/** Events above the track, each a dot in its colour. */
|
|
16
|
+
markers?: ReplayScrubberMarker[];
|
|
17
|
+
/** The label of a step under the track, e.g. `T42`. Defaults to its number. */
|
|
18
|
+
formatStep?: (index: number) => ReactNode;
|
|
19
|
+
/** Names the slider; defaults to "Replay position". */
|
|
20
|
+
ariaLabel?: string;
|
|
21
|
+
/**
|
|
22
|
+
* A pointer drag starts and ends: hold playback in between, e.g. with
|
|
23
|
+
* `useReplayPlayback`'s `hold` and `release`.
|
|
24
|
+
*/
|
|
25
|
+
onScrubStart?: () => void;
|
|
26
|
+
onScrubEnd?: () => void;
|
|
27
|
+
className?: string;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* The replay's position: a track from the first step to the last with a
|
|
31
|
+
* thumb at the current one and event markers above it. Drag or click to
|
|
32
|
+
* seek; arrow keys step by one, Page Up / Down by a tenth, Home / End to
|
|
33
|
+
* the ends.
|
|
34
|
+
*/
|
|
35
|
+
export declare function ReplayScrubber({ count, index, onIndexChange, markers, formatStep, ariaLabel, onScrubStart, onScrubEnd, className, }: ReplayScrubberProps): ReactElement;
|
|
@@ -0,0 +1,119 @@
|
|
|
1
|
+
import { jsxs as u, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as v } from "react";
|
|
3
|
+
import { chartColorValue as B } from "../../lib/chart.js";
|
|
4
|
+
/* empty css */
|
|
5
|
+
import { useStrings as T } from "../../locale/useStrings.js";
|
|
6
|
+
const y = 0.08;
|
|
7
|
+
function H({
|
|
8
|
+
count: c,
|
|
9
|
+
index: a,
|
|
10
|
+
onIndexChange: p,
|
|
11
|
+
markers: m = [],
|
|
12
|
+
formatStep: b = (o) => o + 1,
|
|
13
|
+
ariaLabel: d,
|
|
14
|
+
onScrubStart: f,
|
|
15
|
+
onScrubEnd: M,
|
|
16
|
+
className: N
|
|
17
|
+
}) {
|
|
18
|
+
const o = T(), _ = v(null), e = Math.max(c - 1, 0), i = (r) => e === 0 ? 0 : Math.min(Math.max(r / e, 0), 1), g = (r) => {
|
|
19
|
+
const t = _.current;
|
|
20
|
+
if (!t)
|
|
21
|
+
return;
|
|
22
|
+
const n = t.getBoundingClientRect(), R = (r - n.left) / Math.max(n.width, 1);
|
|
23
|
+
p(Math.round(Math.min(Math.max(R, 0), 1) * e));
|
|
24
|
+
}, P = (r) => {
|
|
25
|
+
r.button === 0 && (r.currentTarget.setPointerCapture(r.pointerId), f?.(), g(r.clientX));
|
|
26
|
+
}, w = (r) => {
|
|
27
|
+
r.currentTarget.hasPointerCapture(r.pointerId) && g(r.clientX);
|
|
28
|
+
}, h = () => {
|
|
29
|
+
M?.();
|
|
30
|
+
}, j = (r) => {
|
|
31
|
+
const t = Math.max(Math.round(c / 10), 1), n = {
|
|
32
|
+
ArrowLeft: a - 1,
|
|
33
|
+
ArrowDown: a - 1,
|
|
34
|
+
ArrowRight: a + 1,
|
|
35
|
+
ArrowUp: a + 1,
|
|
36
|
+
PageDown: a - t,
|
|
37
|
+
PageUp: a + t,
|
|
38
|
+
Home: 0,
|
|
39
|
+
End: e
|
|
40
|
+
};
|
|
41
|
+
r.key in n && (r.preventDefault(), p(Math.min(Math.max(n[r.key], 0), e)));
|
|
42
|
+
}, k = { "--aegis-replay-scrubber-position": i(a) }, l = Math.max(c, 0), A = m.filter((r) => r.index === a).map((r) => r.label), C = [
|
|
43
|
+
o.replayStepOf(l === 0 ? 0 : a + 1, l),
|
|
44
|
+
...A
|
|
45
|
+
].join(" · "), D = a > 0 && i(a) < y, E = a < e && i(a) > 1 - y;
|
|
46
|
+
return /* @__PURE__ */ u(
|
|
47
|
+
"div",
|
|
48
|
+
{
|
|
49
|
+
className: ["aegis-replay-scrubber", N ?? ""].filter(Boolean).join(" "),
|
|
50
|
+
style: k,
|
|
51
|
+
children: [
|
|
52
|
+
/* @__PURE__ */ s("div", { className: "aegis-replay-scrubber__markers", "aria-hidden": "true", children: m.map((r, t) => /* @__PURE__ */ s(
|
|
53
|
+
"span",
|
|
54
|
+
{
|
|
55
|
+
className: "aegis-replay-scrubber__marker",
|
|
56
|
+
title: r.label,
|
|
57
|
+
style: {
|
|
58
|
+
left: `${(i(r.index) * 100).toString()}%`,
|
|
59
|
+
background: B(r.color)
|
|
60
|
+
}
|
|
61
|
+
},
|
|
62
|
+
t
|
|
63
|
+
)) }),
|
|
64
|
+
/* @__PURE__ */ u(
|
|
65
|
+
"div",
|
|
66
|
+
{
|
|
67
|
+
ref: _,
|
|
68
|
+
className: "aegis-replay-scrubber__track",
|
|
69
|
+
role: "slider",
|
|
70
|
+
tabIndex: 0,
|
|
71
|
+
"aria-label": d ?? o.replayPosition,
|
|
72
|
+
"aria-valuemin": l === 0 ? 0 : 1,
|
|
73
|
+
"aria-valuemax": l,
|
|
74
|
+
"aria-valuenow": l === 0 ? 0 : a + 1,
|
|
75
|
+
"aria-valuetext": C,
|
|
76
|
+
onPointerDown: P,
|
|
77
|
+
onPointerMove: w,
|
|
78
|
+
onPointerUp: h,
|
|
79
|
+
onPointerCancel: h,
|
|
80
|
+
onKeyDown: j,
|
|
81
|
+
children: [
|
|
82
|
+
/* @__PURE__ */ s("span", { className: "aegis-replay-scrubber__played" }),
|
|
83
|
+
/* @__PURE__ */ s("span", { className: "aegis-replay-scrubber__thumb" })
|
|
84
|
+
]
|
|
85
|
+
}
|
|
86
|
+
),
|
|
87
|
+
/* @__PURE__ */ u("div", { className: "aegis-replay-scrubber__labels", "aria-hidden": "true", children: [
|
|
88
|
+
/* @__PURE__ */ s(
|
|
89
|
+
"span",
|
|
90
|
+
{
|
|
91
|
+
className: [
|
|
92
|
+
"aegis-replay-scrubber__end",
|
|
93
|
+
a === 0 ? "aegis-replay-scrubber__label--current" : "",
|
|
94
|
+
D ? "aegis-replay-scrubber__end--hidden" : ""
|
|
95
|
+
].filter(Boolean).join(" "),
|
|
96
|
+
children: l === 0 ? null : b(0)
|
|
97
|
+
}
|
|
98
|
+
),
|
|
99
|
+
a > 0 && a < e && /* @__PURE__ */ s("span", { className: "aegis-replay-scrubber__at aegis-replay-scrubber__label--current", children: b(a) }),
|
|
100
|
+
e > 0 && /* @__PURE__ */ s(
|
|
101
|
+
"span",
|
|
102
|
+
{
|
|
103
|
+
className: [
|
|
104
|
+
"aegis-replay-scrubber__end aegis-replay-scrubber__end--last",
|
|
105
|
+
a === e ? "aegis-replay-scrubber__label--current" : "",
|
|
106
|
+
E ? "aegis-replay-scrubber__end--hidden" : ""
|
|
107
|
+
].filter(Boolean).join(" "),
|
|
108
|
+
children: b(e)
|
|
109
|
+
}
|
|
110
|
+
)
|
|
111
|
+
] })
|
|
112
|
+
]
|
|
113
|
+
}
|
|
114
|
+
);
|
|
115
|
+
}
|
|
116
|
+
export {
|
|
117
|
+
H as ReplayScrubber
|
|
118
|
+
};
|
|
119
|
+
//# sourceMappingURL=ReplayScrubber.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplayScrubber.js","sources":["../../../src/components/ui/ReplayScrubber.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type PointerEvent,\n type ReactElement,\n type ReactNode,\n useRef,\n} from 'react';\n\nimport { type ChartColor, chartColorValue } from '../../lib/chart';\nimport { useStrings } from '../../locale';\nimport './ReplayScrubber.css';\n\nexport interface ReplayScrubberMarker {\n /** The step the marker sits over. */\n index: number;\n color: ChartColor;\n /** Names the event, e.g. \"T17 · 夺取 C4\"; shown as the marker's tooltip. */\n label: string;\n}\n\nexport interface ReplayScrubberProps {\n /** How many steps the replay has. */\n count: number;\n index: number;\n onIndexChange: (index: number) => void;\n /** Events above the track, each a dot in its colour. */\n markers?: ReplayScrubberMarker[];\n /** The label of a step under the track, e.g. `T42`. Defaults to its number. */\n formatStep?: (index: number) => ReactNode;\n /** Names the slider; defaults to \"Replay position\". */\n ariaLabel?: string;\n /**\n * A pointer drag starts and ends: hold playback in between, e.g. with\n * `useReplayPlayback`'s `hold` and `release`.\n */\n onScrubStart?: () => void;\n onScrubEnd?: () => void;\n className?: string;\n}\n\n/** A label within this share of the track from an end hides that end's label. */\nconst END_CLEARANCE = 0.08;\n\n/**\n * The replay's position: a track from the first step to the last with a\n * thumb at the current one and event markers above it. Drag or click to\n * seek; arrow keys step by one, Page Up / Down by a tenth, Home / End to\n * the ends.\n */\nexport function ReplayScrubber({\n count,\n index,\n onIndexChange,\n markers = [],\n formatStep = (step) => step + 1,\n ariaLabel,\n onScrubStart,\n onScrubEnd,\n className,\n}: ReplayScrubberProps): ReactElement {\n const strings = useStrings();\n const trackRef = useRef<HTMLDivElement>(null);\n const last = Math.max(count - 1, 0);\n const share = (step: number): number =>\n last === 0 ? 0 : Math.min(Math.max(step / last, 0), 1);\n\n const seekToPointer = (clientX: number): void => {\n const track = trackRef.current;\n if (!track) {\n return;\n }\n const rect = track.getBoundingClientRect();\n const ratio = (clientX - rect.left) / Math.max(rect.width, 1);\n onIndexChange(Math.round(Math.min(Math.max(ratio, 0), 1) * last));\n };\n\n const onPointerDown = (event: PointerEvent<HTMLDivElement>): void => {\n if (event.button !== 0) {\n return;\n }\n event.currentTarget.setPointerCapture(event.pointerId);\n onScrubStart?.();\n seekToPointer(event.clientX);\n };\n const onPointerMove = (event: PointerEvent<HTMLDivElement>): void => {\n if (event.currentTarget.hasPointerCapture(event.pointerId)) {\n seekToPointer(event.clientX);\n }\n };\n const onPointerEnd = (): void => {\n onScrubEnd?.();\n };\n\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {\n const page = Math.max(Math.round(count / 10), 1);\n const target: Record<string, number> = {\n ArrowLeft: index - 1,\n ArrowDown: index - 1,\n ArrowRight: index + 1,\n ArrowUp: index + 1,\n PageDown: index - page,\n PageUp: index + page,\n Home: 0,\n End: last,\n };\n if (event.key in target) {\n event.preventDefault();\n onIndexChange(Math.min(Math.max(target[event.key], 0), last));\n }\n };\n\n const position = { '--aegis-replay-scrubber-position': share(index) };\n const total = Math.max(count, 0);\n const here = markers\n .filter((marker) => marker.index === index)\n .map((marker) => marker.label);\n const valueText = [\n strings.replayStepOf(total === 0 ? 0 : index + 1, total),\n ...here,\n ].join(' · ');\n const nearStart = index > 0 && share(index) < END_CLEARANCE;\n const nearEnd = index < last && share(index) > 1 - END_CLEARANCE;\n return (\n <div\n className={['aegis-replay-scrubber', className ?? '']\n .filter(Boolean)\n .join(' ')}\n style={position as CSSProperties}\n >\n <div className=\"aegis-replay-scrubber__markers\" aria-hidden=\"true\">\n {markers.map((marker, position) => (\n <span\n key={position}\n className=\"aegis-replay-scrubber__marker\"\n title={marker.label}\n style={\n {\n left: `${(share(marker.index) * 100).toString()}%`,\n background: chartColorValue(marker.color),\n } as CSSProperties\n }\n />\n ))}\n </div>\n <div\n ref={trackRef}\n className=\"aegis-replay-scrubber__track\"\n role=\"slider\"\n tabIndex={0}\n aria-label={ariaLabel ?? strings.replayPosition}\n aria-valuemin={total === 0 ? 0 : 1}\n aria-valuemax={total}\n aria-valuenow={total === 0 ? 0 : index + 1}\n aria-valuetext={valueText}\n onPointerDown={onPointerDown}\n onPointerMove={onPointerMove}\n onPointerUp={onPointerEnd}\n onPointerCancel={onPointerEnd}\n onKeyDown={onKeyDown}\n >\n <span className=\"aegis-replay-scrubber__played\" />\n <span className=\"aegis-replay-scrubber__thumb\" />\n </div>\n <div className=\"aegis-replay-scrubber__labels\" aria-hidden=\"true\">\n <span\n className={[\n 'aegis-replay-scrubber__end',\n index === 0 ? 'aegis-replay-scrubber__label--current' : '',\n nearStart ? 'aegis-replay-scrubber__end--hidden' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {total === 0 ? null : formatStep(0)}\n </span>\n {index > 0 && index < last && (\n <span className=\"aegis-replay-scrubber__at aegis-replay-scrubber__label--current\">\n {formatStep(index)}\n </span>\n )}\n {last > 0 && (\n <span\n className={[\n 'aegis-replay-scrubber__end aegis-replay-scrubber__end--last',\n index === last ? 'aegis-replay-scrubber__label--current' : '',\n nearEnd ? 'aegis-replay-scrubber__end--hidden' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {formatStep(last)}\n </span>\n )}\n </div>\n </div>\n );\n}\n"],"names":["END_CLEARANCE","ReplayScrubber","count","index","onIndexChange","markers","formatStep","step","ariaLabel","onScrubStart","onScrubEnd","className","strings","useStrings","trackRef","useRef","last","share","seekToPointer","clientX","track","rect","ratio","onPointerDown","event","onPointerMove","onPointerEnd","onKeyDown","page","target","position","total","here","marker","valueText","nearStart","nearEnd","jsxs","jsx","chartColorValue"],"mappings":"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"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const l=require("react/jsx-runtime"),b=require("react"),w=require("../../lib/chart.cjs");;/* empty css */const q=require("../../locale/useStrings.cjs");function R(n,s){const a=n-1,p=new Set(n>0?[0,a]:[]);for(let o=s-1;o<a;o+=s)a-o>=s/2&&p.add(o);return p}function x({steps:n,currentIndex:s,onSelect:a,keyMoments:p=[],formatStep:o=c=>`#${String(c+1)}`,tickEvery:k,className:d}){const c=q.useStrings(),y=b.useRef(null),r=n.length,j=k??Math.max(1,Math.ceil(r/20)*5),S=R(r,j),g=new Map(p.map((t,e)=>[t,e+1])),[M,_]=b.useState(0),m=Math.min(s??M,Math.max(r-1,0)),N=t=>{if(!a||r===0)return;const e={ArrowLeft:m-1,ArrowRight:m+1,Home:0,End:r-1};if(!(t.key in e))return;t.preventDefault();const i=Math.min(Math.max(e[t.key],0),r-1);_(i),a(i),y.current?.querySelectorAll(".aegis-replay-step-strip__step").item(i).focus()},v={"--aegis-replay-step-strip-count":Math.max(r,1)};return l.jsxs("div",{className:["aegis-replay-step-strip",d??""].filter(Boolean).join(" "),style:v,children:[l.jsx("div",{className:"aegis-replay-step-strip__moments","aria-hidden":"true",children:n.map((t,e)=>{const i=g.get(e);return i===void 0?l.jsx("span",{},t.key):l.jsx("span",{className:["aegis-replay-step-strip__moment",e===s?"aegis-replay-step-strip__moment--current":""].filter(Boolean).join(" "),children:i},t.key)})}),l.jsx("div",{ref:y,className:"aegis-replay-step-strip__bars",role:a?"toolbar":"list","aria-label":c.replaySteps,onKeyDown:N,children:n.map((t,e)=>{const i=g.get(e),u=i===void 0?t.label:`${t.label} · ${c.replayKeyMoment(i)}`,h={"--aegis-replay-step-strip-color":w.chartColorValue(t.color)},f=["aegis-replay-step-strip__step",t.emphasis?"aegis-replay-step-strip__step--emphasis":"",e===s?"aegis-replay-step-strip__step--current":""].filter(Boolean).join(" ");return a?l.jsx("button",{type:"button",className:f,style:h,title:u,"aria-label":u,"aria-current":e===s?"step":void 0,tabIndex:e===m?0:-1,onClick:()=>{_(e),a(e)}},t.key):l.jsx("span",{role:"listitem",className:f,style:h,title:u,"aria-label":u,"aria-current":e===s?"step":void 0},t.key)})}),l.jsx("div",{className:"aegis-replay-step-strip__ticks","aria-hidden":"true",children:n.map((t,e)=>l.jsx("span",{className:e===r-1&&r>1?"aegis-replay-step-strip__tick aegis-replay-step-strip__tick--last":"aegis-replay-step-strip__tick",children:S.has(e)?o(e):null},t.key))})]})}exports.ReplayStepStrip=x;
|
|
2
|
+
//# sourceMappingURL=ReplayStepStrip.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ReplayStepStrip.cjs","sources":["../../../src/components/ui/ReplayStepStrip.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type ReactElement,\n type ReactNode,\n useRef,\n useState,\n} from 'react';\n\nimport { type ChartColor, chartColorValue } from '../../lib/chart';\nimport { useStrings } from '../../locale';\nimport './ReplayStepStrip.css';\n\nexport interface ReplayStepStripItem {\n key: string;\n /** The step kind's colour, e.g. thinking, tool call, failure. */\n color: ChartColor;\n /** Names the step for screen readers and its tooltip, e.g. \"#12 · 验证\". */\n label: string;\n /** A step that changes the course (a check, a failure, the goal): taller. */\n emphasis?: boolean;\n}\n\nexport interface ReplayStepStripProps {\n steps: ReplayStepStripItem[];\n /** The step shown elsewhere on the page; outlined. */\n currentIndex?: number;\n /** Makes each step a button that selects it. */\n onSelect?: (index: number) => void;\n /** Step indices of the key moments, numbered above the strip in order. */\n keyMoments?: number[];\n /** The tick label of a step under the strip. Defaults to `#n`. */\n formatStep?: (index: number) => ReactNode;\n /** A tick every this many steps; defaults to about five ticks. */\n tickEvery?: number;\n className?: string;\n}\n\n/**\n * The steps that get a tick: the first, the last, and every `every`\n * steps between, leaving out one that would crowd the last.\n */\nfunction tickedSteps(count: number, every: number): Set<number> {\n const last = count - 1;\n const ticks = new Set<number>(count > 0 ? [0, last] : []);\n for (let index = every - 1; index < last; index += every) {\n if (last - index >= every / 2) {\n ticks.add(index);\n }\n }\n return ticks;\n}\n\n/**\n * Every step of a run as a bar coloured by its kind, with the key\n * moments numbered above it and step ticks below. With `onSelect`, a bar\n * selects its step; arrow keys move between steps with one tab stop.\n * The gap between bars narrows as steps are added, so a long run still\n * draws every step.\n */\nexport function ReplayStepStrip({\n steps,\n currentIndex,\n onSelect,\n keyMoments = [],\n formatStep = (index) => `#${String(index + 1)}`,\n tickEvery,\n className,\n}: ReplayStepStripProps): ReactElement {\n const strings = useStrings();\n const barsRef = useRef<HTMLDivElement>(null);\n const count = steps.length;\n const every = tickEvery ?? Math.max(1, Math.ceil(count / 20) * 5);\n const ticks = tickedSteps(count, every);\n const momentNumber = new Map(keyMoments.map((step, n) => [step, n + 1]));\n\n // The roving tab stop follows the current step, or the last step the\n // keyboard reached when the host does not mark one.\n const [ownFocus, setOwnFocus] = useState(0);\n const focusIndex = Math.min(currentIndex ?? ownFocus, Math.max(count - 1, 0));\n\n const onKeyDown = (event: KeyboardEvent<HTMLDivElement>): void => {\n if (!onSelect || count === 0) {\n return;\n }\n const target: Record<string, number> = {\n ArrowLeft: focusIndex - 1,\n ArrowRight: focusIndex + 1,\n Home: 0,\n End: count - 1,\n };\n if (!(event.key in target)) {\n return;\n }\n event.preventDefault();\n const next = Math.min(Math.max(target[event.key], 0), count - 1);\n setOwnFocus(next);\n onSelect(next);\n barsRef.current\n ?.querySelectorAll<HTMLButtonElement>('.aegis-replay-step-strip__step')\n .item(next)\n .focus();\n };\n\n const style = {\n '--aegis-replay-step-strip-count': Math.max(count, 1),\n } as CSSProperties;\n return (\n <div\n className={['aegis-replay-step-strip', className ?? '']\n .filter(Boolean)\n .join(' ')}\n style={style}\n >\n <div className=\"aegis-replay-step-strip__moments\" aria-hidden=\"true\">\n {steps.map((step, index) => {\n const n = momentNumber.get(index);\n return n === undefined ? (\n <span key={step.key} />\n ) : (\n <span\n key={step.key}\n className={[\n 'aegis-replay-step-strip__moment',\n index === currentIndex\n ? 'aegis-replay-step-strip__moment--current'\n : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n {n}\n </span>\n );\n })}\n </div>\n <div\n ref={barsRef}\n className=\"aegis-replay-step-strip__bars\"\n role={onSelect ? 'toolbar' : 'list'}\n aria-label={strings.replaySteps}\n onKeyDown={onKeyDown}\n >\n {steps.map((step, index) => {\n const n = momentNumber.get(index);\n const label =\n n === undefined\n ? step.label\n : `${step.label} · ${strings.replayKeyMoment(n)}`;\n const barStyle = {\n '--aegis-replay-step-strip-color': chartColorValue(step.color),\n } as CSSProperties;\n const cls = [\n 'aegis-replay-step-strip__step',\n step.emphasis ? 'aegis-replay-step-strip__step--emphasis' : '',\n index === currentIndex\n ? 'aegis-replay-step-strip__step--current'\n : '',\n ]\n .filter(Boolean)\n .join(' ');\n return onSelect ? (\n <button\n key={step.key}\n type=\"button\"\n className={cls}\n style={barStyle}\n title={label}\n aria-label={label}\n aria-current={index === currentIndex ? 'step' : undefined}\n tabIndex={index === focusIndex ? 0 : -1}\n onClick={() => {\n setOwnFocus(index);\n onSelect(index);\n }}\n />\n ) : (\n <span\n key={step.key}\n role=\"listitem\"\n className={cls}\n style={barStyle}\n title={label}\n aria-label={label}\n aria-current={index === currentIndex ? 'step' : undefined}\n />\n );\n })}\n </div>\n <div className=\"aegis-replay-step-strip__ticks\" aria-hidden=\"true\">\n {steps.map((step, index) => (\n <span\n key={step.key}\n className={\n index === count - 1 && count > 1\n ? 'aegis-replay-step-strip__tick aegis-replay-step-strip__tick--last'\n : 'aegis-replay-step-strip__tick'\n }\n >\n {ticks.has(index) ? formatStep(index) : null}\n </span>\n ))}\n </div>\n </div>\n );\n}\n"],"names":["tickedSteps","count","every","last","ticks","index","ReplayStepStrip","steps","currentIndex","onSelect","keyMoments","formatStep","tickEvery","className","strings","useStrings","barsRef","useRef","momentNumber","step","n","ownFocus","setOwnFocus","useState","focusIndex","onKeyDown","event","target","next","style","jsxs","jsx","label","barStyle","chartColorValue","cls"],"mappings":"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"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { ChartColor } from '../../lib/chart';
|
|
3
|
+
export interface ReplayStepStripItem {
|
|
4
|
+
key: string;
|
|
5
|
+
/** The step kind's colour, e.g. thinking, tool call, failure. */
|
|
6
|
+
color: ChartColor;
|
|
7
|
+
/** Names the step for screen readers and its tooltip, e.g. "#12 · 验证". */
|
|
8
|
+
label: string;
|
|
9
|
+
/** A step that changes the course (a check, a failure, the goal): taller. */
|
|
10
|
+
emphasis?: boolean;
|
|
11
|
+
}
|
|
12
|
+
export interface ReplayStepStripProps {
|
|
13
|
+
steps: ReplayStepStripItem[];
|
|
14
|
+
/** The step shown elsewhere on the page; outlined. */
|
|
15
|
+
currentIndex?: number;
|
|
16
|
+
/** Makes each step a button that selects it. */
|
|
17
|
+
onSelect?: (index: number) => void;
|
|
18
|
+
/** Step indices of the key moments, numbered above the strip in order. */
|
|
19
|
+
keyMoments?: number[];
|
|
20
|
+
/** The tick label of a step under the strip. Defaults to `#n`. */
|
|
21
|
+
formatStep?: (index: number) => ReactNode;
|
|
22
|
+
/** A tick every this many steps; defaults to about five ticks. */
|
|
23
|
+
tickEvery?: number;
|
|
24
|
+
className?: string;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Every step of a run as a bar coloured by its kind, with the key
|
|
28
|
+
* moments numbered above it and step ticks below. With `onSelect`, a bar
|
|
29
|
+
* selects its step; arrow keys move between steps with one tab stop.
|
|
30
|
+
* The gap between bars narrows as steps are added, so a long run still
|
|
31
|
+
* draws every step.
|
|
32
|
+
*/
|
|
33
|
+
export declare function ReplayStepStrip({ steps, currentIndex, onSelect, keyMoments, formatStep, tickEvery, className, }: ReplayStepStripProps): ReactElement;
|