@lincyaw/aegis-ui 0.9.4 → 0.11.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 +3 -1
- package/dist/agent/ask/AskOverlay.cjs.map +1 -1
- package/dist/agent/ask/AskOverlay.d.ts +17 -1
- package/dist/agent/ask/AskOverlay.js +115 -58
- package/dist/agent/ask/AskOverlay.js.map +1 -1
- package/dist/agent/ask/AskPanel.cjs +1 -1
- package/dist/agent/ask/AskPanel.cjs.map +1 -1
- package/dist/agent/ask/AskPanel.d.ts +18 -3
- package/dist/agent/ask/AskPanel.js +147 -119
- package/dist/agent/ask/AskPanel.js.map +1 -1
- package/dist/agent/chat/chat.cjs +1 -1
- package/dist/agent/chat/chat.cjs.map +1 -1
- package/dist/agent/chat/chat.d.ts +1 -1
- package/dist/agent/chat/chat.js +3 -5
- package/dist/agent/chat/chat.js.map +1 -1
- package/dist/agent/chat/useAgentChat.cjs +1 -1
- package/dist/agent/chat/useAgentChat.cjs.map +1 -1
- package/dist/agent/chat/useAgentChat.d.ts +2 -0
- package/dist/agent/chat/useAgentChat.js +8 -4
- package/dist/agent/chat/useAgentChat.js.map +1 -1
- package/dist/agent/core/AegisRuntimeProvider.cjs.map +1 -1
- package/dist/agent/core/AegisRuntimeProvider.d.ts +2 -2
- package/dist/agent/core/AegisRuntimeProvider.js.map +1 -1
- package/dist/agent/core/hooks.cjs +1 -1
- package/dist/agent/core/hooks.cjs.map +1 -1
- package/dist/agent/core/hooks.js +21 -20
- package/dist/agent/core/hooks.js.map +1 -1
- package/dist/agent/core/runtime.cjs +1 -1
- package/dist/agent/core/runtime.cjs.map +1 -1
- package/dist/agent/core/runtime.d.ts +28 -9
- package/dist/agent/core/runtime.js +435 -268
- package/dist/agent/core/runtime.js.map +1 -1
- package/dist/agent/core/types.d.ts +65 -10
- package/dist/agent/index.d.ts +4 -3
- package/dist/commands/CommandProvider.cjs +1 -1
- package/dist/commands/CommandProvider.cjs.map +1 -1
- package/dist/commands/CommandProvider.js +33 -37
- package/dist/commands/CommandProvider.js.map +1 -1
- package/dist/commands/commandContext.cjs +1 -1
- package/dist/commands/commandContext.cjs.map +1 -1
- package/dist/commands/commandContext.d.ts +6 -6
- package/dist/commands/commandContext.js +3 -17
- package/dist/commands/commandContext.js.map +1 -1
- package/dist/commands/index.d.ts +1 -1
- package/dist/commands/useCommands.cjs +1 -1
- package/dist/commands/useCommands.cjs.map +1 -1
- package/dist/commands/useCommands.d.ts +4 -2
- package/dist/commands/useCommands.js +21 -5
- package/dist/commands/useCommands.js.map +1 -1
- package/dist/commands/useRegisterCommands.cjs +2 -1
- package/dist/commands/useRegisterCommands.cjs.map +1 -1
- package/dist/commands/useRegisterCommands.d.ts +3 -2
- package/dist/commands/useRegisterCommands.js +35 -8
- package/dist/commands/useRegisterCommands.js.map +1 -1
- package/dist/components/ui/AgentPanel.cjs +1 -1
- package/dist/components/ui/AgentPanel.cjs.map +1 -1
- package/dist/components/ui/AgentPanel.js +15 -14
- package/dist/components/ui/AgentPanel.js.map +1 -1
- package/dist/components/ui/Alert.cjs +1 -1
- package/dist/components/ui/Alert.cjs.map +1 -1
- package/dist/components/ui/Alert.js +11 -11
- package/dist/components/ui/Alert.js.map +1 -1
- package/dist/components/ui/Avatar.cjs +1 -1
- package/dist/components/ui/Avatar.cjs.map +1 -1
- package/dist/components/ui/Avatar.js +21 -19
- package/dist/components/ui/Avatar.js.map +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
- package/dist/components/ui/BlastRadiusBar.d.ts +16 -2
- package/dist/components/ui/BlastRadiusBar.js +27 -20
- package/dist/components/ui/BlastRadiusBar.js.map +1 -1
- package/dist/components/ui/Button.cjs.map +1 -1
- package/dist/components/ui/Button.d.ts +1 -1
- package/dist/components/ui/Button.js.map +1 -1
- package/dist/components/ui/ChatComposer.cjs +1 -1
- package/dist/components/ui/ChatComposer.cjs.map +1 -1
- package/dist/components/ui/ChatComposer.js +30 -29
- package/dist/components/ui/ChatComposer.js.map +1 -1
- package/dist/components/ui/ChatSessionList.cjs +1 -1
- package/dist/components/ui/ChatSessionList.cjs.map +1 -1
- package/dist/components/ui/ChatSessionList.js +136 -157
- package/dist/components/ui/ChatSessionList.js.map +1 -1
- package/dist/components/ui/Checkbox.cjs +1 -1
- package/dist/components/ui/Checkbox.cjs.map +1 -1
- package/dist/components/ui/Checkbox.d.ts +7 -1
- package/dist/components/ui/Checkbox.js +26 -20
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/Chip.cjs +1 -1
- package/dist/components/ui/Chip.cjs.map +1 -1
- package/dist/components/ui/Chip.d.ts +6 -1
- package/dist/components/ui/Chip.js +20 -18
- package/dist/components/ui/Chip.js.map +1 -1
- package/dist/components/ui/ChoiceCardGroup.cjs +2 -0
- package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -0
- package/dist/components/ui/ChoiceCardGroup.d.ts +34 -0
- package/dist/components/ui/ChoiceCardGroup.js +56 -0
- package/dist/components/ui/ChoiceCardGroup.js.map +1 -0
- package/dist/components/ui/CodeBlock.cjs +2 -2
- package/dist/components/ui/CodeBlock.cjs.map +1 -1
- package/dist/components/ui/CodeBlock.js +31 -27
- package/dist/components/ui/CodeBlock.js.map +1 -1
- package/dist/components/ui/CodeEditor.cjs +1 -1
- package/dist/components/ui/CodeEditor.cjs.map +1 -1
- package/dist/components/ui/CodeEditor.d.ts +15 -4
- package/dist/components/ui/CodeEditor.js +243 -70
- package/dist/components/ui/CodeEditor.js.map +1 -1
- package/dist/components/ui/Collapse.cjs +1 -1
- package/dist/components/ui/Collapse.cjs.map +1 -1
- package/dist/components/ui/Collapse.js +23 -23
- package/dist/components/ui/Collapse.js.map +1 -1
- package/dist/components/ui/ColumnChart.cjs +1 -1
- package/dist/components/ui/ColumnChart.cjs.map +1 -1
- package/dist/components/ui/ColumnChart.js +21 -20
- package/dist/components/ui/ColumnChart.js.map +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
- package/dist/components/ui/CommandInvocationCard.js +28 -31
- package/dist/components/ui/CommandInvocationCard.js.map +1 -1
- package/dist/components/ui/CommandPalette.cjs +1 -1
- package/dist/components/ui/CommandPalette.cjs.map +1 -1
- package/dist/components/ui/CommandPalette.d.ts +23 -1
- package/dist/components/ui/CommandPalette.js +146 -121
- package/dist/components/ui/CommandPalette.js.map +1 -1
- package/dist/components/ui/CommitGraph.cjs +2 -0
- package/dist/components/ui/CommitGraph.cjs.map +1 -0
- package/dist/components/ui/CommitGraph.d.ts +79 -0
- package/dist/components/ui/CommitGraph.js +383 -0
- package/dist/components/ui/CommitGraph.js.map +1 -0
- package/dist/components/ui/ContentInspectorDialog.cjs +1 -3
- package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
- package/dist/components/ui/ContentInspectorDialog.d.ts +4 -10
- package/dist/components/ui/ContentInspectorDialog.js +42 -201
- package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
- package/dist/components/ui/ContentPreview.cjs +3 -0
- package/dist/components/ui/ContentPreview.cjs.map +1 -0
- package/dist/components/ui/ContentPreview.d.ts +13 -0
- package/dist/components/ui/ContentPreview.js +133 -0
- package/dist/components/ui/ContentPreview.js.map +1 -0
- package/dist/components/ui/CopyGlyph.cjs +2 -0
- package/dist/components/ui/CopyGlyph.cjs.map +1 -0
- package/dist/components/ui/CopyGlyph.d.ts +7 -0
- package/dist/components/ui/CopyGlyph.js +48 -0
- package/dist/components/ui/CopyGlyph.js.map +1 -0
- package/dist/components/ui/DangerZone.cjs +1 -1
- package/dist/components/ui/DangerZone.cjs.map +1 -1
- package/dist/components/ui/DangerZone.js +13 -12
- package/dist/components/ui/DangerZone.js.map +1 -1
- package/dist/components/ui/DataList.cjs +1 -1
- package/dist/components/ui/DataList.cjs.map +1 -1
- package/dist/components/ui/DataList.d.ts +7 -1
- package/dist/components/ui/DataList.js +89 -33
- package/dist/components/ui/DataList.js.map +1 -1
- package/dist/components/ui/DataTable.cjs +1 -1
- package/dist/components/ui/DataTable.cjs.map +1 -1
- package/dist/components/ui/DataTable.d.ts +22 -18
- package/dist/components/ui/DataTable.js +279 -341
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DropdownMenu.cjs +1 -1
- package/dist/components/ui/DropdownMenu.cjs.map +1 -1
- package/dist/components/ui/DropdownMenu.d.ts +8 -1
- package/dist/components/ui/DropdownMenu.js +63 -46
- package/dist/components/ui/DropdownMenu.js.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.js +26 -24
- package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
- package/dist/components/ui/ErrorState.cjs +1 -1
- package/dist/components/ui/ErrorState.cjs.map +1 -1
- package/dist/components/ui/ErrorState.d.ts +1 -0
- package/dist/components/ui/ErrorState.js +1 -1
- package/dist/components/ui/ErrorState.js.map +1 -1
- package/dist/components/ui/EventTable.cjs +1 -1
- package/dist/components/ui/EventTable.cjs.map +1 -1
- package/dist/components/ui/EventTable.d.ts +16 -2
- package/dist/components/ui/EventTable.js +198 -165
- package/dist/components/ui/EventTable.js.map +1 -1
- package/dist/components/ui/FileDropzone.cjs +1 -1
- package/dist/components/ui/FileDropzone.cjs.map +1 -1
- package/dist/components/ui/FileDropzone.d.ts +3 -21
- package/dist/components/ui/FileDropzone.js +42 -67
- package/dist/components/ui/FileDropzone.js.map +1 -1
- package/dist/components/ui/FilePreview.cjs +1 -1
- package/dist/components/ui/FilePreview.cjs.map +1 -1
- package/dist/components/ui/FilePreview.d.ts +4 -1
- package/dist/components/ui/FilePreview.js +62 -60
- package/dist/components/ui/FilePreview.js.map +1 -1
- package/dist/components/ui/FileTree.cjs +1 -1
- package/dist/components/ui/FileTree.cjs.map +1 -1
- package/dist/components/ui/FileTree.d.ts +18 -2
- package/dist/components/ui/FileTree.js +141 -110
- package/dist/components/ui/FileTree.js.map +1 -1
- package/dist/components/ui/FolderDropzone.cjs +1 -1
- package/dist/components/ui/FolderDropzone.cjs.map +1 -1
- package/dist/components/ui/FolderDropzone.d.ts +10 -1
- package/dist/components/ui/FolderDropzone.js +140 -130
- package/dist/components/ui/FolderDropzone.js.map +1 -1
- package/dist/components/ui/ForgotPasswordForm.cjs +1 -1
- package/dist/components/ui/ForgotPasswordForm.cjs.map +1 -1
- package/dist/components/ui/ForgotPasswordForm.d.ts +1 -0
- package/dist/components/ui/ForgotPasswordForm.js +23 -20
- package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
- package/dist/components/ui/FormRow.cjs +1 -1
- package/dist/components/ui/FormRow.cjs.map +1 -1
- package/dist/components/ui/FormRow.d.ts +32 -2
- package/dist/components/ui/FormRow.js +33 -13
- package/dist/components/ui/FormRow.js.map +1 -1
- package/dist/components/ui/HeadlineStat.cjs +1 -1
- package/dist/components/ui/HeadlineStat.cjs.map +1 -1
- package/dist/components/ui/HeadlineStat.js +6 -5
- package/dist/components/ui/HeadlineStat.js.map +1 -1
- package/dist/components/ui/InboxPage.cjs +1 -1
- package/dist/components/ui/InboxPage.cjs.map +1 -1
- package/dist/components/ui/InboxPage.d.ts +25 -2
- package/dist/components/ui/InboxPage.js +93 -77
- package/dist/components/ui/InboxPage.js.map +1 -1
- package/dist/components/ui/KeyValueList.cjs +1 -1
- package/dist/components/ui/KeyValueList.cjs.map +1 -1
- package/dist/components/ui/KeyValueList.d.ts +6 -5
- package/dist/components/ui/KeyValueList.js +14 -17
- package/dist/components/ui/KeyValueList.js.map +1 -1
- package/dist/components/ui/LoginForm.cjs +1 -1
- package/dist/components/ui/LoginForm.cjs.map +1 -1
- package/dist/components/ui/LoginForm.d.ts +1 -0
- package/dist/components/ui/LoginForm.js +63 -55
- package/dist/components/ui/LoginForm.js.map +1 -1
- package/dist/components/ui/Markdown.cjs +1 -1
- package/dist/components/ui/Markdown.cjs.map +1 -1
- package/dist/components/ui/Markdown.d.ts +3 -2
- package/dist/components/ui/Markdown.js +57 -49
- package/dist/components/ui/Markdown.js.map +1 -1
- package/dist/components/ui/MdxDocument.cjs +1 -1
- package/dist/components/ui/MdxDocument.cjs.map +1 -1
- package/dist/components/ui/MdxDocument.d.ts +7 -2
- package/dist/components/ui/MdxDocument.js +34 -49
- package/dist/components/ui/MdxDocument.js.map +1 -1
- package/dist/components/ui/MetadataList.cjs +1 -1
- package/dist/components/ui/MetadataList.cjs.map +1 -1
- package/dist/components/ui/MetadataList.d.ts +7 -1
- package/dist/components/ui/MetadataList.js +29 -20
- package/dist/components/ui/MetadataList.js.map +1 -1
- package/dist/components/ui/MetricCard.cjs +1 -1
- package/dist/components/ui/MetricCard.cjs.map +1 -1
- package/dist/components/ui/MetricCard.js +16 -16
- package/dist/components/ui/MetricCard.js.map +1 -1
- package/dist/components/ui/MonoValue.cjs +1 -1
- package/dist/components/ui/MonoValue.cjs.map +1 -1
- package/dist/components/ui/MonoValue.d.ts +12 -1
- package/dist/components/ui/MonoValue.js +19 -17
- package/dist/components/ui/MonoValue.js.map +1 -1
- package/dist/components/ui/NotificationBell.cjs +1 -1
- package/dist/components/ui/NotificationBell.cjs.map +1 -1
- package/dist/components/ui/NotificationBell.d.ts +31 -3
- package/dist/components/ui/NotificationBell.js +127 -71
- package/dist/components/ui/NotificationBell.js.map +1 -1
- package/dist/components/ui/NumberField.cjs +2 -0
- package/dist/components/ui/NumberField.cjs.map +1 -0
- package/dist/components/ui/NumberField.d.ts +34 -0
- package/dist/components/ui/NumberField.js +80 -0
- package/dist/components/ui/NumberField.js.map +1 -0
- package/dist/components/ui/ObjectBrowser.cjs +1 -1
- package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
- package/dist/components/ui/ObjectBrowser.js +107 -94
- package/dist/components/ui/ObjectBrowser.js.map +1 -1
- package/dist/components/ui/ObjectInspector.cjs +1 -1
- package/dist/components/ui/ObjectInspector.cjs.map +1 -1
- package/dist/components/ui/ObjectInspector.d.ts +5 -0
- package/dist/components/ui/ObjectInspector.js +61 -69
- package/dist/components/ui/ObjectInspector.js.map +1 -1
- package/dist/components/ui/PageSizeSelect.cjs +1 -1
- package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
- package/dist/components/ui/PageSizeSelect.d.ts +3 -4
- package/dist/components/ui/PageSizeSelect.js +30 -29
- package/dist/components/ui/PageSizeSelect.js.map +1 -1
- package/dist/components/ui/Pagination.cjs +1 -1
- package/dist/components/ui/Pagination.cjs.map +1 -1
- package/dist/components/ui/Pagination.d.ts +16 -6
- package/dist/components/ui/Pagination.js +58 -45
- package/dist/components/ui/Pagination.js.map +1 -1
- package/dist/components/ui/Panel.cjs +1 -1
- package/dist/components/ui/Panel.cjs.map +1 -1
- package/dist/components/ui/Panel.d.ts +17 -4
- package/dist/components/ui/Panel.js +53 -40
- package/dist/components/ui/Panel.js.map +1 -1
- package/dist/components/ui/ParquetViewer.cjs +1 -1
- package/dist/components/ui/ParquetViewer.cjs.map +1 -1
- package/dist/components/ui/ParquetViewer.d.ts +1 -1
- package/dist/components/ui/ParquetViewer.js +121 -120
- package/dist/components/ui/ParquetViewer.js.map +1 -1
- package/dist/components/ui/PasswordField.cjs +1 -1
- package/dist/components/ui/PasswordField.cjs.map +1 -1
- package/dist/components/ui/PasswordField.js +28 -27
- package/dist/components/ui/PasswordField.js.map +1 -1
- package/dist/components/ui/PickerField.cjs +1 -1
- package/dist/components/ui/PickerField.cjs.map +1 -1
- package/dist/components/ui/PickerField.d.ts +25 -6
- package/dist/components/ui/PickerField.js +20 -17
- package/dist/components/ui/PickerField.js.map +1 -1
- package/dist/components/ui/ProjectSelector.cjs +1 -1
- package/dist/components/ui/ProjectSelector.cjs.map +1 -1
- package/dist/components/ui/ProjectSelector.js +39 -36
- package/dist/components/ui/ProjectSelector.js.map +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
- package/dist/components/ui/QueryAutocomplete.d.ts +7 -1
- package/dist/components/ui/QueryAutocomplete.js +150 -127
- package/dist/components/ui/QueryAutocomplete.js.map +1 -1
- package/dist/components/ui/RegisterForm.cjs +1 -1
- package/dist/components/ui/RegisterForm.cjs.map +1 -1
- package/dist/components/ui/RegisterForm.d.ts +1 -0
- package/dist/components/ui/RegisterForm.js +52 -43
- package/dist/components/ui/RegisterForm.js.map +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
- package/dist/components/ui/ResizableSidePanel.js +41 -40
- package/dist/components/ui/ResizableSidePanel.js.map +1 -1
- package/dist/components/ui/RollingValue.cjs +2 -0
- package/dist/components/ui/RollingValue.cjs.map +1 -0
- package/dist/components/ui/RollingValue.d.ts +14 -0
- package/dist/components/ui/RollingValue.js +39 -0
- package/dist/components/ui/RollingValue.js.map +1 -0
- package/dist/components/ui/SavedQueryBar.cjs +1 -1
- package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
- package/dist/components/ui/SavedQueryBar.d.ts +9 -3
- package/dist/components/ui/SavedQueryBar.js +390 -291
- package/dist/components/ui/SavedQueryBar.js.map +1 -1
- package/dist/components/ui/ScrollStory.cjs +1 -2
- package/dist/components/ui/ScrollStory.cjs.map +1 -1
- package/dist/components/ui/ScrollStory.js +57 -75
- package/dist/components/ui/ScrollStory.js.map +1 -1
- package/dist/components/ui/SearchInput.cjs +1 -1
- package/dist/components/ui/SearchInput.cjs.map +1 -1
- package/dist/components/ui/SearchInput.d.ts +5 -1
- package/dist/components/ui/SearchInput.js +28 -24
- package/dist/components/ui/SearchInput.js.map +1 -1
- package/dist/components/ui/Select.cjs +1 -1
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.ts +4 -2
- package/dist/components/ui/Select.js +34 -31
- package/dist/components/ui/Select.js.map +1 -1
- package/dist/components/ui/ServiceMap.cjs +1 -1
- package/dist/components/ui/ServiceMap.cjs.map +1 -1
- package/dist/components/ui/ServiceMap.d.ts +57 -2
- package/dist/components/ui/ServiceMap.js +374 -117
- package/dist/components/ui/ServiceMap.js.map +1 -1
- package/dist/components/ui/ShareLinkDialog.cjs +1 -1
- package/dist/components/ui/ShareLinkDialog.cjs.map +1 -1
- package/dist/components/ui/ShareLinkDialog.d.ts +5 -3
- package/dist/components/ui/ShareLinkDialog.js +107 -98
- package/dist/components/ui/ShareLinkDialog.js.map +1 -1
- package/dist/components/ui/Slider.cjs +2 -0
- package/dist/components/ui/Slider.cjs.map +1 -0
- package/dist/components/ui/Slider.d.ts +24 -0
- package/dist/components/ui/Slider.js +55 -0
- package/dist/components/ui/Slider.js.map +1 -0
- package/dist/components/ui/SparkLine.cjs +1 -1
- package/dist/components/ui/SparkLine.cjs.map +1 -1
- package/dist/components/ui/SparkLine.d.ts +4 -1
- package/dist/components/ui/SparkLine.js +29 -23
- package/dist/components/ui/SparkLine.js.map +1 -1
- package/dist/components/ui/StatBlock.cjs +1 -1
- package/dist/components/ui/StatBlock.cjs.map +1 -1
- package/dist/components/ui/StatBlock.js +17 -16
- package/dist/components/ui/StatBlock.js.map +1 -1
- package/dist/components/ui/StatusDot.cjs.map +1 -1
- package/dist/components/ui/StatusDot.d.ts +5 -1
- package/dist/components/ui/StatusDot.js.map +1 -1
- package/dist/components/ui/Steps.cjs +2 -0
- package/dist/components/ui/Steps.cjs.map +1 -0
- package/dist/components/ui/Steps.d.ts +19 -0
- package/dist/components/ui/Steps.js +53 -0
- package/dist/components/ui/Steps.js.map +1 -0
- package/dist/components/ui/TableOfContents.cjs +1 -1
- package/dist/components/ui/TableOfContents.cjs.map +1 -1
- package/dist/components/ui/TableOfContents.d.ts +3 -3
- package/dist/components/ui/TableOfContents.js +47 -28
- package/dist/components/ui/TableOfContents.js.map +1 -1
- package/dist/components/ui/Tabs.cjs +2 -2
- package/dist/components/ui/Tabs.cjs.map +1 -1
- package/dist/components/ui/Tabs.d.ts +37 -3
- package/dist/components/ui/Tabs.js +169 -109
- package/dist/components/ui/Tabs.js.map +1 -1
- package/dist/components/ui/Terminal.cjs +1 -1
- package/dist/components/ui/Terminal.cjs.map +1 -1
- package/dist/components/ui/Terminal.js +18 -17
- package/dist/components/ui/Terminal.js.map +1 -1
- package/dist/components/ui/TextField.cjs +1 -1
- package/dist/components/ui/TextField.cjs.map +1 -1
- package/dist/components/ui/TextField.js +19 -18
- package/dist/components/ui/TextField.js.map +1 -1
- package/dist/components/ui/ThemeToggle.cjs +1 -1
- package/dist/components/ui/ThemeToggle.cjs.map +1 -1
- package/dist/components/ui/ThemeToggle.js +15 -18
- package/dist/components/ui/ThemeToggle.js.map +1 -1
- package/dist/components/ui/TimeDisplay.cjs +1 -1
- package/dist/components/ui/TimeDisplay.cjs.map +1 -1
- package/dist/components/ui/TimeDisplay.d.ts +14 -4
- package/dist/components/ui/TimeDisplay.js +43 -44
- package/dist/components/ui/TimeDisplay.js.map +1 -1
- package/dist/components/ui/TimeRangePicker.cjs +1 -1
- package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
- package/dist/components/ui/TimeRangePicker.js +128 -111
- package/dist/components/ui/TimeRangePicker.js.map +1 -1
- package/dist/components/ui/TimelineChart.cjs +2 -1
- package/dist/components/ui/TimelineChart.cjs.map +1 -1
- package/dist/components/ui/TimelineChart.d.ts +1 -0
- package/dist/components/ui/TimelineChart.js +221 -169
- package/dist/components/ui/TimelineChart.js.map +1 -1
- package/dist/components/ui/ToolCallCard.cjs +1 -1
- package/dist/components/ui/ToolCallCard.cjs.map +1 -1
- package/dist/components/ui/ToolCallCard.js +22 -22
- package/dist/components/ui/ToolCallCard.js.map +1 -1
- package/dist/components/ui/Toolbar.cjs +1 -1
- package/dist/components/ui/Toolbar.cjs.map +1 -1
- package/dist/components/ui/Toolbar.d.ts +4 -16
- package/dist/components/ui/Toolbar.js +8 -62
- package/dist/components/ui/Toolbar.js.map +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs +1 -1
- package/dist/components/ui/TraceSpanInspector.cjs.map +1 -1
- package/dist/components/ui/TraceSpanInspector.js +94 -76
- package/dist/components/ui/TraceSpanInspector.js.map +1 -1
- package/dist/components/ui/TraceTree.cjs +1 -1
- package/dist/components/ui/TraceTree.cjs.map +1 -1
- package/dist/components/ui/TraceTree.d.ts +36 -2
- package/dist/components/ui/TraceTree.js +278 -170
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/TrajectoryStep.cjs +1 -1
- package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
- package/dist/components/ui/TrajectoryStep.js +39 -43
- package/dist/components/ui/TrajectoryStep.js.map +1 -1
- package/dist/components/ui/TrajectoryTimeline.cjs +1 -1
- package/dist/components/ui/TrajectoryTimeline.cjs.map +1 -1
- package/dist/components/ui/TrajectoryTimeline.js +31 -28
- package/dist/components/ui/TrajectoryTimeline.js.map +1 -1
- package/dist/components/ui/UploadQueue.cjs +1 -1
- package/dist/components/ui/UploadQueue.cjs.map +1 -1
- package/dist/components/ui/UploadQueue.d.ts +18 -2
- package/dist/components/ui/UploadQueue.js +53 -71
- package/dist/components/ui/UploadQueue.js.map +1 -1
- package/dist/components/ui/authValidation.cjs +2 -0
- package/dist/components/ui/authValidation.cjs.map +1 -0
- package/dist/components/ui/authValidation.d.ts +3 -0
- package/dist/components/ui/authValidation.js +8 -0
- package/dist/components/ui/authValidation.js.map +1 -0
- package/dist/components/ui/classifyContent.cjs +6 -0
- package/dist/components/ui/classifyContent.cjs.map +1 -0
- package/dist/components/ui/classifyContent.d.ts +40 -0
- package/dist/components/ui/classifyContent.js +167 -0
- package/dist/components/ui/classifyContent.js.map +1 -0
- package/dist/components/ui/dropFiles.cjs +2 -0
- package/dist/components/ui/dropFiles.cjs.map +1 -0
- package/dist/components/ui/dropFiles.d.ts +7 -0
- package/dist/components/ui/dropFiles.js +16 -0
- package/dist/components/ui/dropFiles.js.map +1 -0
- package/dist/components/ui/index.d.ts +23 -10
- package/dist/components/ui/linkComponent.cjs +1 -1
- package/dist/components/ui/linkComponent.cjs.map +1 -1
- package/dist/components/ui/linkComponent.d.ts +4 -2
- package/dist/components/ui/linkComponent.js +15 -5
- package/dist/components/ui/linkComponent.js.map +1 -1
- package/dist/components/ui/markdownDocument.cjs +2 -0
- package/dist/components/ui/markdownDocument.cjs.map +1 -0
- package/dist/components/ui/markdownDocument.d.ts +40 -0
- package/dist/components/ui/markdownDocument.js +39 -0
- package/dist/components/ui/markdownDocument.js.map +1 -0
- package/dist/components/ui/relativeTime.cjs +1 -1
- package/dist/components/ui/relativeTime.cjs.map +1 -1
- package/dist/components/ui/relativeTime.d.ts +5 -3
- package/dist/components/ui/relativeTime.js +15 -6
- package/dist/components/ui/relativeTime.js.map +1 -1
- package/dist/components/ui/traceStatus.cjs +2 -0
- package/dist/components/ui/traceStatus.cjs.map +1 -0
- package/dist/components/ui/{traceFormat.d.ts → traceStatus.d.ts} +0 -1
- package/dist/components/ui/traceStatus.js +7 -0
- package/dist/components/ui/traceStatus.js.map +1 -0
- package/dist/components/ui/useColumnWidths.cjs +2 -0
- package/dist/components/ui/useColumnWidths.cjs.map +1 -0
- package/dist/components/ui/useColumnWidths.d.ts +60 -0
- package/dist/components/ui/useColumnWidths.js +196 -0
- package/dist/components/ui/useColumnWidths.js.map +1 -0
- package/dist/hooks/popoverOverflow.cjs +2 -0
- package/dist/hooks/popoverOverflow.cjs.map +1 -0
- package/dist/hooks/popoverOverflow.d.ts +8 -0
- package/dist/hooks/popoverOverflow.js +9 -0
- package/dist/hooks/popoverOverflow.js.map +1 -0
- package/dist/hooks/useDevelopAfterLoad.cjs +2 -0
- package/dist/hooks/useDevelopAfterLoad.cjs.map +1 -0
- package/dist/hooks/useDevelopAfterLoad.d.ts +8 -0
- package/dist/hooks/useDevelopAfterLoad.js +9 -0
- package/dist/hooks/useDevelopAfterLoad.js.map +1 -0
- package/dist/hooks/useDialogPopover.cjs +2 -0
- package/dist/hooks/useDialogPopover.cjs.map +1 -0
- package/dist/hooks/useDialogPopover.d.ts +23 -0
- package/dist/hooks/useDialogPopover.js +48 -0
- package/dist/hooks/useDialogPopover.js.map +1 -0
- package/dist/hooks/useMenuPopover.cjs +1 -1
- package/dist/hooks/useMenuPopover.cjs.map +1 -1
- package/dist/hooks/useMenuPopover.d.ts +0 -8
- package/dist/hooks/useMenuPopover.js +17 -22
- package/dist/hooks/useMenuPopover.js.map +1 -1
- package/dist/hooks/useResizable.cjs +1 -1
- package/dist/hooks/useResizable.cjs.map +1 -1
- package/dist/hooks/useResizable.js +87 -78
- package/dist/hooks/useResizable.js.map +1 -1
- package/dist/hooks/useSavedQueries.cjs +1 -1
- package/dist/hooks/useSavedQueries.cjs.map +1 -1
- package/dist/hooks/useSavedQueries.d.ts +6 -0
- package/dist/hooks/useSavedQueries.js +52 -60
- package/dist/hooks/useSavedQueries.js.map +1 -1
- package/dist/hooks/useSectionSpy.cjs +1 -1
- package/dist/hooks/useSectionSpy.cjs.map +1 -1
- package/dist/hooks/useSectionSpy.d.ts +6 -1
- package/dist/hooks/useSectionSpy.js +87 -57
- package/dist/hooks/useSectionSpy.js.map +1 -1
- package/dist/hooks/useStorageItem.cjs +2 -0
- package/dist/hooks/useStorageItem.cjs.map +1 -0
- package/dist/hooks/useStorageItem.d.ts +6 -0
- package/dist/hooks/useStorageItem.js +36 -0
- package/dist/hooks/useStorageItem.js.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +5 -5
- package/dist/index.js +321 -313
- package/dist/index.js.map +1 -1
- package/dist/layouts/shell/AegisShell.cjs +1 -1
- package/dist/layouts/shell/AegisShell.cjs.map +1 -1
- package/dist/layouts/shell/AegisShell.d.ts +4 -2
- package/dist/layouts/shell/AegisShell.js +150 -243
- package/dist/layouts/shell/AegisShell.js.map +1 -1
- package/dist/layouts/shell/AppRoutes.cjs +2 -0
- package/dist/layouts/shell/AppRoutes.cjs.map +1 -0
- package/dist/layouts/shell/AppRoutes.d.ts +5 -0
- package/dist/layouts/shell/AppRoutes.js +8 -0
- package/dist/layouts/shell/AppRoutes.js.map +1 -0
- package/dist/layouts/shell/AppSwitcher.cjs +1 -1
- package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
- package/dist/layouts/shell/AppSwitcher.js +53 -36
- package/dist/layouts/shell/AppSwitcher.js.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.js +24 -22
- package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
- package/dist/layouts/shell/BreadcrumbBar.cjs +1 -1
- package/dist/layouts/shell/BreadcrumbBar.cjs.map +1 -1
- package/dist/layouts/shell/BreadcrumbBar.d.ts +1 -2
- package/dist/layouts/shell/BreadcrumbBar.js +19 -26
- package/dist/layouts/shell/BreadcrumbBar.js.map +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.cjs +2 -0
- package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -0
- package/dist/layouts/shell/RouteErrorBoundary.d.ts +26 -0
- package/dist/layouts/shell/RouteErrorBoundary.js +40 -0
- package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -0
- package/dist/layouts/shell/RouterLink.cjs +2 -0
- package/dist/layouts/shell/RouterLink.cjs.map +1 -0
- package/dist/layouts/shell/RouterLink.d.ts +3 -0
- package/dist/layouts/shell/RouterLink.js +22 -0
- package/dist/layouts/shell/RouterLink.js.map +1 -0
- package/dist/layouts/shell/ShellCommandPalette.cjs +2 -0
- package/dist/layouts/shell/ShellCommandPalette.cjs.map +1 -0
- package/dist/layouts/shell/ShellCommandPalette.d.ts +7 -0
- package/dist/layouts/shell/ShellCommandPalette.js +32 -0
- package/dist/layouts/shell/ShellCommandPalette.js.map +1 -0
- package/dist/layouts/shell/ShellInboxPage.cjs +2 -0
- package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -0
- package/dist/layouts/shell/ShellInboxPage.d.ts +12 -0
- package/dist/layouts/shell/ShellInboxPage.js +33 -0
- package/dist/layouts/shell/ShellInboxPage.js.map +1 -0
- package/dist/layouts/shell/ShellNotificationBell.cjs +2 -0
- package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -0
- package/dist/layouts/shell/ShellNotificationBell.d.ts +5 -0
- package/dist/layouts/shell/ShellNotificationBell.js +30 -0
- package/dist/layouts/shell/ShellNotificationBell.js.map +1 -0
- package/dist/layouts/shell/Sidebar.cjs +1 -1
- package/dist/layouts/shell/Sidebar.cjs.map +1 -1
- package/dist/layouts/shell/Sidebar.d.ts +4 -2
- package/dist/layouts/shell/Sidebar.js +14 -11
- package/dist/layouts/shell/Sidebar.js.map +1 -1
- package/dist/layouts/shell/TopHeader.cjs +1 -1
- package/dist/layouts/shell/TopHeader.cjs.map +1 -1
- package/dist/layouts/shell/TopHeader.d.ts +6 -2
- package/dist/layouts/shell/TopHeader.js +87 -75
- package/dist/layouts/shell/TopHeader.js.map +1 -1
- package/dist/layouts/shell/apps.cjs +2 -0
- package/dist/layouts/shell/apps.cjs.map +1 -0
- package/dist/layouts/shell/apps.d.ts +12 -0
- package/dist/layouts/shell/apps.js +34 -0
- package/dist/layouts/shell/apps.js.map +1 -0
- package/dist/layouts/shell/buildRouteTree.cjs +2 -0
- package/dist/layouts/shell/buildRouteTree.cjs.map +1 -0
- package/dist/layouts/shell/buildRouteTree.d.ts +22 -0
- package/dist/layouts/shell/buildRouteTree.js +49 -0
- package/dist/layouts/shell/buildRouteTree.js.map +1 -0
- package/dist/layouts/shell/environments/EnvironmentProvider.cjs +2 -0
- package/dist/layouts/shell/environments/EnvironmentProvider.cjs.map +1 -0
- package/dist/layouts/shell/environments/EnvironmentProvider.d.ts +13 -0
- package/dist/layouts/shell/environments/EnvironmentProvider.js +90 -0
- package/dist/layouts/shell/environments/EnvironmentProvider.js.map +1 -0
- package/dist/layouts/shell/environments/{context.cjs → environmentContext.cjs} +2 -2
- package/dist/layouts/shell/environments/environmentContext.cjs.map +1 -0
- package/dist/layouts/shell/environments/environmentContext.d.ts +6 -0
- package/dist/layouts/shell/environments/environmentContext.js +8 -0
- package/dist/layouts/shell/environments/environmentContext.js.map +1 -0
- package/dist/layouts/shell/environments/index.d.ts +2 -3
- package/dist/layouts/shell/environments/types.cjs.map +1 -1
- package/dist/layouts/shell/environments/types.d.ts +23 -15
- package/dist/layouts/shell/environments/types.js.map +1 -1
- package/dist/layouts/shell/environments/useEnvironment.cjs +2 -0
- package/dist/layouts/shell/environments/useEnvironment.cjs.map +1 -0
- package/dist/layouts/shell/environments/{hooks.d.ts → useEnvironment.d.ts} +3 -2
- package/dist/layouts/shell/environments/useEnvironment.js +25 -0
- package/dist/layouts/shell/environments/useEnvironment.js.map +1 -0
- package/dist/layouts/shell/index.d.ts +3 -1
- package/dist/layouts/shell/types.d.ts +14 -14
- package/dist/layouts/shell/useAgentPanel.cjs +2 -0
- package/dist/layouts/shell/useAgentPanel.cjs.map +1 -0
- package/dist/layouts/shell/useAgentPanel.d.ts +13 -0
- package/dist/layouts/shell/useAgentPanel.js +21 -0
- package/dist/layouts/shell/useAgentPanel.js.map +1 -0
- package/dist/layouts/shell/useAppCommands.cjs +2 -0
- package/dist/layouts/shell/useAppCommands.cjs.map +1 -0
- package/dist/layouts/shell/useAppCommands.d.ts +6 -0
- package/dist/layouts/shell/useAppCommands.js +19 -0
- package/dist/layouts/shell/useAppCommands.js.map +1 -0
- package/dist/layouts/shell/useMobileNav.cjs +2 -0
- package/dist/layouts/shell/useMobileNav.cjs.map +1 -0
- package/dist/layouts/shell/useMobileNav.d.ts +20 -0
- package/dist/layouts/shell/useMobileNav.js +54 -0
- package/dist/layouts/shell/useMobileNav.js.map +1 -0
- package/dist/layouts/shell/useOpenNotification.cjs +2 -0
- package/dist/layouts/shell/useOpenNotification.cjs.map +1 -0
- package/dist/layouts/shell/useOpenNotification.d.ts +3 -0
- package/dist/layouts/shell/useOpenNotification.js +16 -0
- package/dist/layouts/shell/useOpenNotification.js.map +1 -0
- package/dist/layouts/shell/useShellUser.cjs +2 -0
- package/dist/layouts/shell/useShellUser.cjs.map +1 -0
- package/dist/layouts/shell/useShellUser.d.ts +7 -0
- package/dist/layouts/shell/useShellUser.js +23 -0
- package/dist/layouts/shell/useShellUser.js.map +1 -0
- package/dist/layouts/shell/useWarnOnce.cjs +2 -0
- package/dist/layouts/shell/useWarnOnce.cjs.map +1 -0
- package/dist/layouts/shell/useWarnOnce.d.ts +1 -0
- package/dist/layouts/shell/useWarnOnce.js +11 -0
- package/dist/layouts/shell/useWarnOnce.js.map +1 -0
- package/dist/lib/chart.cjs +1 -1
- package/dist/lib/chart.cjs.map +1 -1
- package/dist/lib/chart.d.ts +5 -7
- package/dist/lib/chart.js +49 -34
- package/dist/lib/chart.js.map +1 -1
- package/dist/lib/format.cjs +1 -1
- package/dist/lib/format.cjs.map +1 -1
- package/dist/lib/format.d.ts +34 -0
- package/dist/lib/format.js +98 -9
- package/dist/lib/format.js.map +1 -1
- package/dist/lib/luceneQuery/tokenizeAtCursor.cjs +1 -1
- package/dist/lib/luceneQuery/tokenizeAtCursor.cjs.map +1 -1
- package/dist/lib/luceneQuery/tokenizeAtCursor.js +29 -29
- package/dist/lib/luceneQuery/tokenizeAtCursor.js.map +1 -1
- package/dist/lib/storage.cjs +1 -1
- package/dist/lib/storage.cjs.map +1 -1
- package/dist/lib/storage.js +19 -12
- package/dist/lib/storage.js.map +1 -1
- package/dist/lib/timeRange.cjs +1 -1
- package/dist/lib/timeRange.cjs.map +1 -1
- package/dist/lib/timeRange.d.ts +14 -4
- package/dist/lib/timeRange.js +43 -39
- package/dist/lib/timeRange.js.map +1 -1
- package/dist/locale/strings.cjs +1 -1
- package/dist/locale/strings.cjs.map +1 -1
- package/dist/locale/strings.d.ts +243 -2
- package/dist/locale/strings.js +545 -26
- package/dist/locale/strings.js.map +1 -1
- package/dist/notifications/notificationContext.cjs.map +1 -1
- package/dist/notifications/notificationContext.d.ts +15 -0
- package/dist/notifications/notificationContext.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/ThemeProvider.cjs +1 -1
- package/dist/theme/ThemeProvider.cjs.map +1 -1
- package/dist/theme/ThemeProvider.d.ts +2 -1
- package/dist/theme/ThemeProvider.js +47 -33
- package/dist/theme/ThemeProvider.js.map +1 -1
- package/dist/theme/antdTheme.cjs +1 -1
- package/dist/theme/antdTheme.cjs.map +1 -1
- package/dist/theme/antdTheme.d.ts +0 -2
- package/dist/theme/antdTheme.js +28 -20
- package/dist/theme/antdTheme.js.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
- package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
- package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
- package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
- package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
- package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
- package/dist/transports/agentm/agentmChannelClient.js +133 -89
- package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
- package/dist/transports/index.d.ts +2 -2
- package/dist/transports/mcpBridge.cjs +2 -0
- package/dist/transports/mcpBridge.cjs.map +1 -0
- package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
- package/dist/transports/mcpBridge.js +144 -0
- package/dist/transports/mcpBridge.js.map +1 -0
- package/dist/transports/mcpTools.cjs +2 -0
- package/dist/transports/mcpTools.cjs.map +1 -0
- package/dist/transports/mcpTools.d.ts +15 -0
- package/dist/transports/mcpTools.js +283 -0
- package/dist/transports/mcpTools.js.map +1 -0
- package/dist/transports.cjs +1 -1
- package/dist/transports.js +1 -1
- package/package.json +5 -4
- package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
- package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
- package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
- package/dist/agent/core/mcpToolCatalogue.js +0 -101
- package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
- package/dist/components/ui/BucketCard.cjs +0 -2
- package/dist/components/ui/BucketCard.cjs.map +0 -1
- package/dist/components/ui/BucketCard.d.ts +0 -24
- package/dist/components/ui/BucketCard.js +0 -73
- package/dist/components/ui/BucketCard.js.map +0 -1
- package/dist/components/ui/ContentInspectorContent.cjs +0 -5
- package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
- package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
- package/dist/components/ui/ContentInspectorContent.js +0 -101
- package/dist/components/ui/ContentInspectorContent.js.map +0 -1
- package/dist/components/ui/traceFormat.cjs +0 -2
- package/dist/components/ui/traceFormat.cjs.map +0 -1
- package/dist/components/ui/traceFormat.js +0 -11
- package/dist/components/ui/traceFormat.js.map +0 -1
- package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
- package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
- package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
- package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
- package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
- package/dist/layouts/shell/environments/context.cjs.map +0 -1
- package/dist/layouts/shell/environments/context.d.ts +0 -6
- package/dist/layouts/shell/environments/context.js +0 -6
- package/dist/layouts/shell/environments/context.js.map +0 -1
- package/dist/layouts/shell/environments/hooks.cjs +0 -2
- package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
- package/dist/layouts/shell/environments/hooks.js +0 -24
- package/dist/layouts/shell/environments/hooks.js.map +0 -1
- package/dist/layouts/shell/environments/manifest.cjs +0 -2
- package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
- package/dist/layouts/shell/environments/manifest.d.ts +0 -26
- package/dist/layouts/shell/environments/manifest.js +0 -82
- package/dist/layouts/shell/environments/manifest.js.map +0 -1
- package/dist/transports/bridge.cjs +0 -2
- package/dist/transports/bridge.cjs.map +0 -1
- package/dist/transports/bridge.js +0 -143
- package/dist/transports/bridge.js.map +0 -1
|
@@ -1,184 +1,217 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
4
|
-
import {
|
|
5
|
-
import {
|
|
1
|
+
import { jsx as r, jsxs as X } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as c, useState as G, useCallback as N, useEffect as K, useMemo as D } from "react";
|
|
3
|
+
import { useVirtualizer as Y } from "@tanstack/react-virtual";
|
|
4
|
+
import { useDevelopAfterLoad as q } from "../../hooks/useDevelopAfterLoad.js";
|
|
5
|
+
import { useIsomorphicLayoutEffect as J } from "../../hooks/useIsomorphicLayoutEffect.js";
|
|
6
|
+
import { EmptyState as P } from "./EmptyState.js";
|
|
6
7
|
/* empty css */
|
|
7
8
|
import { Skeleton as Q } from "./Skeleton.js";
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
9
|
+
import { useStrings as Z } from "../../locale/useStrings.js";
|
|
10
|
+
const ee = 32, te = 20, re = 200, O = 80, ne = 6, ie = 8, le = 120;
|
|
11
|
+
function A(n) {
|
|
12
|
+
return n.numeric ? "right" : n.align ?? "left";
|
|
13
|
+
}
|
|
14
|
+
function _e({
|
|
15
|
+
columns: n,
|
|
16
|
+
data: d,
|
|
17
|
+
rowKey: k,
|
|
18
|
+
onRowClick: o,
|
|
19
|
+
selectedKey: f,
|
|
20
|
+
loading: u = !1,
|
|
21
|
+
emptyTitle: H,
|
|
22
|
+
emptyDescription: L,
|
|
23
|
+
estimatedRowHeight: _ = ee,
|
|
24
|
+
maxVisibleRows: R = te,
|
|
25
|
+
onLoadMore: h,
|
|
26
|
+
loadMoreThresholdPx: b = re,
|
|
27
|
+
className: $
|
|
23
28
|
}) {
|
|
24
|
-
const
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
29
|
+
const C = Z(), w = c(null), S = c(null), v = c(/* @__PURE__ */ new Map()), [m, I] = G(0), s = o !== void 0;
|
|
30
|
+
J(() => {
|
|
31
|
+
const e = S.current;
|
|
32
|
+
if (!e)
|
|
33
|
+
return;
|
|
34
|
+
const t = () => {
|
|
35
|
+
I(e.offsetHeight);
|
|
36
|
+
};
|
|
37
|
+
t();
|
|
38
|
+
const i = new ResizeObserver(t);
|
|
39
|
+
return i.observe(e), () => {
|
|
40
|
+
i.disconnect();
|
|
41
|
+
};
|
|
42
|
+
}, []);
|
|
43
|
+
const y = Y({
|
|
44
|
+
count: d.length,
|
|
45
|
+
getScrollElement: () => w.current,
|
|
46
|
+
estimateSize: () => _,
|
|
47
|
+
overscan: ie,
|
|
48
|
+
scrollMargin: m
|
|
49
|
+
}), g = c(!1), a = c(null), M = N(
|
|
42
50
|
(e) => {
|
|
43
|
-
if (!
|
|
51
|
+
if (!h)
|
|
44
52
|
return;
|
|
45
53
|
const t = e.currentTarget;
|
|
46
|
-
if (t.scrollHeight - t.scrollTop - t.clientHeight <=
|
|
47
|
-
if (
|
|
54
|
+
if (t.scrollHeight - t.scrollTop - t.clientHeight <= b) {
|
|
55
|
+
if (g.current)
|
|
48
56
|
return;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
},
|
|
53
|
-
},
|
|
57
|
+
g.current = !0, a.current !== null && clearTimeout(a.current), a.current = setTimeout(() => {
|
|
58
|
+
h(), a.current = setTimeout(() => {
|
|
59
|
+
g.current = !1;
|
|
60
|
+
}, O);
|
|
61
|
+
}, O);
|
|
54
62
|
} else
|
|
55
|
-
|
|
63
|
+
g.current = !1;
|
|
56
64
|
},
|
|
57
|
-
[
|
|
65
|
+
[h, b]
|
|
58
66
|
);
|
|
59
|
-
|
|
60
|
-
|
|
67
|
+
K(() => () => {
|
|
68
|
+
a.current !== null && clearTimeout(a.current);
|
|
61
69
|
}, []);
|
|
62
|
-
const
|
|
63
|
-
() =>
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
e.preventDefault();
|
|
79
|
-
const l = c.current.get(t - 1);
|
|
80
|
-
l && l.focus();
|
|
81
|
-
}
|
|
70
|
+
const p = D(
|
|
71
|
+
() => n.map(
|
|
72
|
+
(e) => e.width === "flex" || e.width === void 0 ? "minmax(0, 1fr)" : `${e.width.toString()}px`
|
|
73
|
+
).join(" "),
|
|
74
|
+
[n]
|
|
75
|
+
), x = D(
|
|
76
|
+
() => ({
|
|
77
|
+
minWidth: `${n.reduce(
|
|
78
|
+
(e, t) => e + (typeof t.width == "number" ? t.width : le),
|
|
79
|
+
0
|
|
80
|
+
).toString()}px`
|
|
81
|
+
}),
|
|
82
|
+
[n]
|
|
83
|
+
), U = N(
|
|
84
|
+
(e, t, i) => {
|
|
85
|
+
e.target === e.currentTarget && (e.key === "Enter" || e.key === " " ? (e.preventDefault(), o?.(i)) : (e.key === "ArrowDown" || e.key === "ArrowUp") && (e.preventDefault(), v.current.get(t + (e.key === "ArrowDown" ? 1 : -1))?.focus()));
|
|
82
86
|
},
|
|
83
|
-
[
|
|
84
|
-
), z =
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
"
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
style: H,
|
|
118
|
-
onScroll: k,
|
|
119
|
-
children: h ? /* @__PURE__ */ r("div", { className: "aegis-event-table__skeleton-list", children: Array.from({ length: te }).map((e, t) => /* @__PURE__ */ r(
|
|
120
|
-
"div",
|
|
121
|
-
{
|
|
122
|
-
className: "aegis-event-table__row aegis-event-table__row--skeleton",
|
|
123
|
-
style: {
|
|
124
|
-
height: `${m}px`,
|
|
125
|
-
gridTemplateColumns: _
|
|
126
|
-
},
|
|
127
|
-
children: i.map((n) => /* @__PURE__ */ r("div", { className: "aegis-event-table__td", children: /* @__PURE__ */ r(Q, { width: "80%", height: "var(--space-3)" }) }, n.key))
|
|
128
|
-
},
|
|
129
|
-
t
|
|
130
|
-
)) }) : U ? /* @__PURE__ */ r("div", { className: "aegis-event-table__empty", children: /* @__PURE__ */ r(J, { title: O, description: R }) }) : /* @__PURE__ */ r(
|
|
131
|
-
"div",
|
|
132
|
-
{
|
|
133
|
-
className: "aegis-event-table__virtual",
|
|
134
|
-
style: { height: `${w.getTotalSize()}px` },
|
|
135
|
-
children: w.getVirtualItems().map((e) => {
|
|
136
|
-
const t = g[e.index], n = t.original, l = D(n), B = [
|
|
137
|
-
"aegis-event-table__row",
|
|
138
|
-
C === l ? "aegis-event-table__row--selected" : ""
|
|
139
|
-
].filter(Boolean).join(" ");
|
|
140
|
-
return /* @__PURE__ */ r(
|
|
141
|
-
"div",
|
|
142
|
-
{
|
|
143
|
-
ref: (s) => {
|
|
144
|
-
s ? c.current.set(e.index, s) : c.current.delete(e.index);
|
|
145
|
-
},
|
|
146
|
-
role: "row",
|
|
147
|
-
tabIndex: 0,
|
|
148
|
-
className: B,
|
|
149
|
-
style: {
|
|
150
|
-
transform: `translateY(${e.start}px)`,
|
|
151
|
-
height: `${e.size}px`,
|
|
152
|
-
gridTemplateColumns: _
|
|
87
|
+
[o]
|
|
88
|
+
), j = ["aegis-event-table", $ ?? ""].filter(Boolean).join(" "), z = {
|
|
89
|
+
maxHeight: `${(_ * R + m).toString()}px`,
|
|
90
|
+
scrollPaddingTop: `${m.toString()}px`
|
|
91
|
+
}, E = !u && d.length === 0, B = q(u), T = s ? "gridcell" : "cell";
|
|
92
|
+
return /* @__PURE__ */ r(
|
|
93
|
+
"div",
|
|
94
|
+
{
|
|
95
|
+
className: j,
|
|
96
|
+
role: s ? "grid" : "table",
|
|
97
|
+
"aria-rowcount": d.length + (E ? 2 : 1),
|
|
98
|
+
"aria-busy": u || void 0,
|
|
99
|
+
children: /* @__PURE__ */ X(
|
|
100
|
+
"div",
|
|
101
|
+
{
|
|
102
|
+
ref: w,
|
|
103
|
+
className: "aegis-event-table__scroll",
|
|
104
|
+
style: z,
|
|
105
|
+
onScroll: M,
|
|
106
|
+
children: [
|
|
107
|
+
/* @__PURE__ */ r(
|
|
108
|
+
"div",
|
|
109
|
+
{
|
|
110
|
+
ref: S,
|
|
111
|
+
className: "aegis-event-table__header",
|
|
112
|
+
style: { ...x, gridTemplateColumns: p },
|
|
113
|
+
role: "row",
|
|
114
|
+
"aria-rowindex": 1,
|
|
115
|
+
children: n.map((e) => /* @__PURE__ */ r(
|
|
116
|
+
"div",
|
|
117
|
+
{
|
|
118
|
+
role: "columnheader",
|
|
119
|
+
className: `aegis-event-table__th aegis-event-table__th--${A(e)}`,
|
|
120
|
+
children: e.header
|
|
153
121
|
},
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
122
|
+
e.key
|
|
123
|
+
))
|
|
124
|
+
}
|
|
125
|
+
),
|
|
126
|
+
/* @__PURE__ */ r("div", { "data-aegis-develop": B || void 0, style: x, children: u ? /* @__PURE__ */ r(
|
|
127
|
+
"div",
|
|
128
|
+
{
|
|
129
|
+
className: "aegis-event-table__skeleton-list",
|
|
130
|
+
"aria-hidden": "true",
|
|
131
|
+
children: Array.from({ length: ne }).map((e, t) => /* @__PURE__ */ r(
|
|
132
|
+
"div",
|
|
133
|
+
{
|
|
134
|
+
className: "aegis-event-table__row aegis-event-table__row--skeleton",
|
|
135
|
+
style: {
|
|
136
|
+
height: `${_.toString()}px`,
|
|
137
|
+
gridTemplateColumns: p
|
|
138
|
+
},
|
|
139
|
+
children: n.map((i) => /* @__PURE__ */ r("div", { className: "aegis-event-table__td", children: /* @__PURE__ */ r(Q, { width: "80%", height: "var(--space-3)" }) }, i.key))
|
|
159
140
|
},
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
141
|
+
t
|
|
142
|
+
))
|
|
143
|
+
}
|
|
144
|
+
) : E ? /* @__PURE__ */ r(
|
|
145
|
+
"div",
|
|
146
|
+
{
|
|
147
|
+
className: "aegis-event-table__empty",
|
|
148
|
+
role: "row",
|
|
149
|
+
"aria-rowindex": 2,
|
|
150
|
+
children: /* @__PURE__ */ r("div", { role: T, "aria-colspan": n.length, children: /* @__PURE__ */ r(
|
|
151
|
+
P,
|
|
152
|
+
{
|
|
153
|
+
title: H ?? C.noEvents,
|
|
154
|
+
description: L
|
|
155
|
+
}
|
|
156
|
+
) })
|
|
157
|
+
}
|
|
158
|
+
) : /* @__PURE__ */ r(
|
|
159
|
+
"div",
|
|
160
|
+
{
|
|
161
|
+
className: "aegis-event-table__virtual",
|
|
162
|
+
style: {
|
|
163
|
+
height: `${y.getTotalSize().toString()}px`
|
|
171
164
|
},
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
165
|
+
children: y.getVirtualItems().map((e) => {
|
|
166
|
+
const t = d[e.index], i = k(t), F = [
|
|
167
|
+
"aegis-event-table__row",
|
|
168
|
+
s ? "aegis-event-table__row--clickable" : "",
|
|
169
|
+
f === i ? "aegis-event-table__row--selected" : ""
|
|
170
|
+
].filter(Boolean).join(" ");
|
|
171
|
+
return /* @__PURE__ */ r(
|
|
172
|
+
"div",
|
|
173
|
+
{
|
|
174
|
+
ref: (l) => {
|
|
175
|
+
l ? v.current.set(e.index, l) : v.current.delete(e.index);
|
|
176
|
+
},
|
|
177
|
+
role: "row",
|
|
178
|
+
"aria-rowindex": e.index + 2,
|
|
179
|
+
"aria-selected": s && f !== void 0 ? f === i : void 0,
|
|
180
|
+
tabIndex: s ? 0 : void 0,
|
|
181
|
+
className: F,
|
|
182
|
+
style: {
|
|
183
|
+
transform: `translateY(${(e.start - m).toString()}px)`,
|
|
184
|
+
height: `${e.size.toString()}px`,
|
|
185
|
+
gridTemplateColumns: p
|
|
186
|
+
},
|
|
187
|
+
onClick: o ? () => {
|
|
188
|
+
o(t);
|
|
189
|
+
} : void 0,
|
|
190
|
+
onKeyDown: s ? (l) => {
|
|
191
|
+
U(l, e.index, t);
|
|
192
|
+
} : void 0,
|
|
193
|
+
children: n.map((l) => {
|
|
194
|
+
const W = l.truncate !== !1, V = [
|
|
195
|
+
"aegis-event-table__td",
|
|
196
|
+
`aegis-event-table__td--${A(l)}`,
|
|
197
|
+
l.numeric ? "aegis-event-table__td--numeric" : "",
|
|
198
|
+
W ? "aegis-event-table__td--truncate" : ""
|
|
199
|
+
].filter(Boolean).join(" ");
|
|
200
|
+
return /* @__PURE__ */ r("div", { role: T, className: V, children: l.render(t) }, l.key);
|
|
201
|
+
})
|
|
202
|
+
},
|
|
203
|
+
i
|
|
204
|
+
);
|
|
205
|
+
})
|
|
206
|
+
}
|
|
207
|
+
) })
|
|
208
|
+
]
|
|
209
|
+
}
|
|
210
|
+
)
|
|
211
|
+
}
|
|
212
|
+
);
|
|
180
213
|
}
|
|
181
214
|
export {
|
|
182
|
-
|
|
215
|
+
_e as EventTable
|
|
183
216
|
};
|
|
184
217
|
//# sourceMappingURL=EventTable.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"EventTable.js","sources":["../../../src/components/ui/EventTable.tsx"],"sourcesContent":["// Virtualized table mechanics adapted from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/components/DBRowTable.tsx\nimport {\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n type UIEvent as ReactUIEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n} from 'react';\n\nimport {\n type ColumnDef,\n flexRender,\n getCoreRowModel,\n useReactTable,\n} from '@tanstack/react-table';\nimport { useVirtualizer } from '@tanstack/react-virtual';\n\nimport { EmptyState } from './EmptyState';\nimport './EventTable.css';\nimport { Skeleton } from './Skeleton';\n\nexport interface EventTableColumn<T> {\n key: string;\n header: ReactNode;\n /** Column width in px. Use 'flex' to take remaining space. Default 'flex'. */\n width?: number | 'flex';\n /** Align cell content. Default 'left'. */\n align?: 'left' | 'right' | 'center';\n /** Cell renderer. */\n render: (row: T) => ReactNode;\n /** When true, do not ellipsize overflowing text. */\n truncate?: boolean;\n}\n\nexport interface EventTableProps<T> {\n columns: Array<EventTableColumn<T>>;\n data: T[];\n /** Stable row key. */\n rowKey: (row: T) => string;\n /** Optional row-click handler — caller mounts a side panel. */\n onRowClick?: (row: T) => void;\n /** Visually mark a row as selected/highlighted. */\n selectedKey?: string;\n /** Loading skeleton above the (possibly empty) body. */\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n /** Approximate row height in px — used by the virtualizer. Default 32. */\n estimatedRowHeight?: number;\n /** Max visible rows before vertical scroll kicks in. Default 20. */\n maxVisibleRows?: number;\n /** When provided, append-on-bottom: invoked when the user scrolls within `loadMoreThresholdPx` of the bottom. */\n onLoadMore?: () => void;\n /** Distance from bottom that triggers onLoadMore. Default 200. */\n loadMoreThresholdPx?: number;\n /** ClassName appended to the root. */\n className?: string;\n}\n\nconst DEFAULT_ROW_HEIGHT = 32;\nconst DEFAULT_MAX_VISIBLE_ROWS = 20;\nconst DEFAULT_LOAD_MORE_THRESHOLD = 200;\nconst LOAD_MORE_DEBOUNCE_MS = 80;\nconst SKELETON_ROW_COUNT = 6;\nconst OVERSCAN = 8;\n\nexport function EventTable<T>({\n columns,\n data,\n rowKey,\n onRowClick,\n selectedKey,\n loading,\n emptyTitle = 'No events',\n emptyDescription,\n estimatedRowHeight = DEFAULT_ROW_HEIGHT,\n maxVisibleRows = DEFAULT_MAX_VISIBLE_ROWS,\n onLoadMore,\n loadMoreThresholdPx = DEFAULT_LOAD_MORE_THRESHOLD,\n className,\n}: EventTableProps<T>) {\n const tableColumns = useMemo<Array<ColumnDef<T>>>(\n () =>\n columns.map((c) => ({\n id: c.key,\n header: () => c.header,\n cell: ({ row }) => c.render(row.original),\n size: c.width === 'flex' || c.width === undefined ? undefined : c.width,\n })),\n [columns],\n );\n\n const table = useReactTable<T>({\n data,\n columns: tableColumns,\n getCoreRowModel: getCoreRowModel(),\n });\n\n const rows = table.getRowModel().rows;\n const scrollRef = useRef<HTMLDivElement>(null);\n const rowRefs = useRef(new Map<number, HTMLDivElement>());\n\n const virtualizer = useVirtualizer({\n count: rows.length,\n getScrollElement: () => scrollRef.current,\n estimateSize: () => estimatedRowHeight,\n overscan: OVERSCAN,\n });\n\n const loadMoreFiredRef = useRef(false);\n const loadMoreTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleScroll = useCallback(\n (e: ReactUIEvent<HTMLDivElement>) => {\n if (!onLoadMore) {\n return;\n }\n const el = e.currentTarget;\n const distance = el.scrollHeight - el.scrollTop - el.clientHeight;\n if (distance <= loadMoreThresholdPx) {\n if (loadMoreFiredRef.current) {\n return;\n }\n loadMoreFiredRef.current = true;\n if (loadMoreTimerRef.current !== null) {\n clearTimeout(loadMoreTimerRef.current);\n }\n loadMoreTimerRef.current = setTimeout(() => {\n onLoadMore();\n loadMoreTimerRef.current = setTimeout(() => {\n loadMoreFiredRef.current = false;\n }, LOAD_MORE_DEBOUNCE_MS);\n }, LOAD_MORE_DEBOUNCE_MS);\n } else {\n loadMoreFiredRef.current = false;\n }\n },\n [onLoadMore, loadMoreThresholdPx],\n );\n\n useEffect(() => {\n return () => {\n if (loadMoreTimerRef.current !== null) {\n clearTimeout(loadMoreTimerRef.current);\n }\n };\n }, []);\n\n const gridTemplate = useMemo(\n () =>\n columns\n .map((c) => {\n if (c.width === 'flex' || c.width === undefined) {\n return 'minmax(0, 1fr)';\n }\n return `${c.width}px`;\n })\n .join(' '),\n [columns],\n );\n\n const handleRowKeyDown = useCallback(\n (e: ReactKeyboardEvent<HTMLDivElement>, index: number, row: T) => {\n if (e.key === 'Enter' || e.key === ' ') {\n if (onRowClick) {\n e.preventDefault();\n onRowClick(row);\n }\n return;\n }\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n const next = rowRefs.current.get(index + 1);\n if (next) {\n next.focus();\n }\n return;\n }\n if (e.key === 'ArrowUp') {\n e.preventDefault();\n const prev = rowRefs.current.get(index - 1);\n if (prev) {\n prev.focus();\n }\n }\n },\n [onRowClick],\n );\n\n const rootCls = [\n 'aegis-event-table',\n className ?? '',\n onRowClick ? 'aegis-event-table--interactive' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const scrollStyle: CSSProperties = {\n maxHeight: `${estimatedRowHeight * maxVisibleRows}px`,\n };\n\n const headerCells = table.getHeaderGroups()[0]?.headers ?? [];\n\n const showEmpty = !loading && rows.length === 0;\n\n return (\n <div className={rootCls} role=\"grid\">\n <div\n className=\"aegis-event-table__header\"\n style={{ gridTemplateColumns: gridTemplate }}\n role=\"row\"\n >\n {headerCells.map((header, i) => {\n const col = columns[i];\n const align = col.align ?? 'left';\n return (\n <div\n key={header.id}\n role=\"columnheader\"\n className={`aegis-event-table__th aegis-event-table__th--${align}`}\n >\n {flexRender(header.column.columnDef.header, header.getContext())}\n </div>\n );\n })}\n </div>\n\n <div\n ref={scrollRef}\n className=\"aegis-event-table__scroll\"\n style={scrollStyle}\n onScroll={handleScroll}\n >\n {loading ? (\n <div className=\"aegis-event-table__skeleton-list\">\n {Array.from({ length: SKELETON_ROW_COUNT }).map((_, i) => (\n <div\n key={i}\n className=\"aegis-event-table__row aegis-event-table__row--skeleton\"\n style={{\n height: `${estimatedRowHeight}px`,\n gridTemplateColumns: gridTemplate,\n }}\n >\n {columns.map((c) => (\n <div key={c.key} className=\"aegis-event-table__td\">\n <Skeleton width=\"80%\" height=\"var(--space-3)\" />\n </div>\n ))}\n </div>\n ))}\n </div>\n ) : showEmpty ? (\n <div className=\"aegis-event-table__empty\">\n <EmptyState title={emptyTitle} description={emptyDescription} />\n </div>\n ) : (\n <div\n className=\"aegis-event-table__virtual\"\n style={{ height: `${virtualizer.getTotalSize()}px` }}\n >\n {virtualizer.getVirtualItems().map((vi) => {\n const row = rows[vi.index];\n const original = row.original;\n const key = rowKey(original);\n const isSelected = selectedKey === key;\n const rowCls = [\n 'aegis-event-table__row',\n isSelected ? 'aegis-event-table__row--selected' : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div\n key={key}\n ref={(el) => {\n if (el) {\n rowRefs.current.set(vi.index, el);\n } else {\n rowRefs.current.delete(vi.index);\n }\n }}\n role=\"row\"\n tabIndex={0}\n className={rowCls}\n style={{\n transform: `translateY(${vi.start}px)`,\n height: `${vi.size}px`,\n gridTemplateColumns: gridTemplate,\n }}\n onClick={\n onRowClick\n ? () => {\n onRowClick(original);\n }\n : undefined\n }\n onKeyDown={(e) => {\n handleRowKeyDown(e, vi.index, original);\n }}\n >\n {row.getVisibleCells().map((cell, i) => {\n const col = columns[i];\n const align = col.align ?? 'left';\n const truncate = col.truncate !== false;\n const cellCls = [\n 'aegis-event-table__td',\n `aegis-event-table__td--${align}`,\n truncate ? 'aegis-event-table__td--truncate' : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div key={cell.id} role=\"gridcell\" className={cellCls}>\n {flexRender(\n cell.column.columnDef.cell,\n cell.getContext(),\n )}\n </div>\n );\n })}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n );\n}\n"],"names":["DEFAULT_ROW_HEIGHT","DEFAULT_MAX_VISIBLE_ROWS","DEFAULT_LOAD_MORE_THRESHOLD","LOAD_MORE_DEBOUNCE_MS","SKELETON_ROW_COUNT","OVERSCAN","EventTable","columns","data","rowKey","onRowClick","selectedKey","loading","emptyTitle","emptyDescription","estimatedRowHeight","maxVisibleRows","onLoadMore","loadMoreThresholdPx","className","tableColumns","useMemo","c","row","table","useReactTable","getCoreRowModel","rows","scrollRef","useRef","rowRefs","virtualizer","useVirtualizer","loadMoreFiredRef","loadMoreTimerRef","handleScroll","useCallback","el","useEffect","gridTemplate","handleRowKeyDown","index","next","prev","rootCls","scrollStyle","headerCells","showEmpty","jsxs","jsx","header","i","align","_","Skeleton","EmptyState","vi","original","key","rowCls","e","cell","col","truncate","cellCls","flexRender"],"mappings":";;;;;;;AA+DA,MAAMA,IAAqB,IACrBC,IAA2B,IAC3BC,KAA8B,KAC9BC,IAAwB,IACxBC,KAAqB,GACrBC,KAAW;AAEV,SAASC,GAAc;AAAA,EAC5B,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC;AAAA,EACA,YAAAC,IAAa;AAAA,EACb,kBAAAC;AAAA,EACA,oBAAAC,IAAqBf;AAAA,EACrB,gBAAAgB,IAAiBf;AAAA,EACjB,YAAAgB;AAAA,EACA,qBAAAC,IAAsBhB;AAAA,EACtB,WAAAiB;AACF,GAAuB;AACrB,QAAMC,IAAeC;AAAA,IACnB,MACEd,EAAQ,IAAI,CAACe,OAAO;AAAA,MAClB,IAAIA,EAAE;AAAA,MACN,QAAQ,MAAMA,EAAE;AAAA,MAChB,MAAM,CAAC,EAAE,KAAAC,EAAA,MAAUD,EAAE,OAAOC,EAAI,QAA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A,QAAA;AAAA,MACH;AAAA,IAAA;AAAA,EAEJ,GACF;AAEJ;"}
|
|
1
|
+
{"version":3,"file":"EventTable.js","sources":["../../../src/components/ui/EventTable.tsx"],"sourcesContent":["// Virtualized table mechanics adapted from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/components/DBRowTable.tsx\nimport {\n type CSSProperties,\n type KeyboardEvent as ReactKeyboardEvent,\n type ReactNode,\n type UIEvent as ReactUIEvent,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { useVirtualizer } from '@tanstack/react-virtual';\n\nimport { useDevelopAfterLoad } from '../../hooks/useDevelopAfterLoad';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { useStrings } from '../../locale';\nimport { EmptyState } from './EmptyState';\nimport './EventTable.css';\nimport { Skeleton } from './Skeleton';\n\nexport interface EventTableColumn<T> {\n key: string;\n header: ReactNode;\n /**\n * Column width in px, or 'flex' (the default) to share the remaining\n * space, never below 120 px. When the columns don't fit, the table\n * scrolls sideways, header and rows together.\n */\n width?: number | 'flex';\n /** Align cell content. Default 'left'. */\n align?: 'left' | 'right' | 'center';\n /**\n * Number column: header and cells right-aligned, figures in\n * `--font-numeric` with tabular widths so digits and decimal points line\n * up. Overrides `align`.\n */\n numeric?: boolean;\n /** Cell renderer. */\n render: (row: T) => ReactNode;\n /** When true, do not ellipsize overflowing text. */\n truncate?: boolean;\n}\n\nexport interface EventTableProps<T> {\n columns: Array<EventTableColumn<T>>;\n data: T[];\n /** Stable row key. */\n rowKey: (row: T) => string;\n /**\n * Makes rows clickable: focusable, a muted hover background, Enter or\n * Space on a focused row and the arrow keys between rows. Without it\n * rows are plain, and links inside cells keep their own behaviour.\n */\n onRowClick?: (row: T) => void;\n /** Visually mark a row as selected/highlighted. */\n selectedKey?: string;\n /** Loading skeleton above the (possibly empty) body. */\n loading?: boolean;\n emptyTitle?: string;\n emptyDescription?: string;\n /** Approximate row height in px — used by the virtualizer. Default 32. */\n estimatedRowHeight?: number;\n /** Max visible rows before vertical scroll kicks in. Default 20. */\n maxVisibleRows?: number;\n /** When provided, append-on-bottom: invoked when the user scrolls within `loadMoreThresholdPx` of the bottom. */\n onLoadMore?: () => void;\n /** Distance from bottom that triggers onLoadMore. Default 200. */\n loadMoreThresholdPx?: number;\n /** ClassName appended to the root. */\n className?: string;\n}\n\nconst DEFAULT_ROW_HEIGHT = 32;\nconst DEFAULT_MAX_VISIBLE_ROWS = 20;\nconst DEFAULT_LOAD_MORE_THRESHOLD = 200;\nconst LOAD_MORE_DEBOUNCE_MS = 80;\nconst SKELETON_ROW_COUNT = 6;\nconst OVERSCAN = 8;\nconst FLEX_COLUMN_MIN_WIDTH = 120;\n\nfunction columnAlign<T>(col: EventTableColumn<T>): 'left' | 'right' | 'center' {\n return col.numeric ? 'right' : (col.align ?? 'left');\n}\n\nexport function EventTable<T>({\n columns,\n data,\n rowKey,\n onRowClick,\n selectedKey,\n loading = false,\n emptyTitle,\n emptyDescription,\n estimatedRowHeight = DEFAULT_ROW_HEIGHT,\n maxVisibleRows = DEFAULT_MAX_VISIBLE_ROWS,\n onLoadMore,\n loadMoreThresholdPx = DEFAULT_LOAD_MORE_THRESHOLD,\n className,\n}: EventTableProps<T>) {\n const strings = useStrings();\n const scrollRef = useRef<HTMLDivElement>(null);\n const headerRef = useRef<HTMLDivElement>(null);\n const rowRefs = useRef(new Map<number, HTMLDivElement>());\n const [headerHeight, setHeaderHeight] = useState(0);\n const clickable = onRowClick !== undefined;\n\n // The header scrolls with the rows, so both share the scrollbar's gutter\n // and their columns line up; the rows start below it.\n useIsomorphicLayoutEffect(() => {\n const header = headerRef.current;\n if (!header) {\n return undefined;\n }\n const measure = (): void => {\n setHeaderHeight(header.offsetHeight);\n };\n measure();\n const observer = new ResizeObserver(measure);\n observer.observe(header);\n return () => {\n observer.disconnect();\n };\n }, []);\n\n const virtualizer = useVirtualizer({\n count: data.length,\n getScrollElement: () => scrollRef.current,\n estimateSize: () => estimatedRowHeight,\n overscan: OVERSCAN,\n scrollMargin: headerHeight,\n });\n\n const loadMoreFiredRef = useRef(false);\n const loadMoreTimerRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n const handleScroll = useCallback(\n (e: ReactUIEvent<HTMLDivElement>) => {\n if (!onLoadMore) {\n return;\n }\n const el = e.currentTarget;\n const distance = el.scrollHeight - el.scrollTop - el.clientHeight;\n if (distance <= loadMoreThresholdPx) {\n if (loadMoreFiredRef.current) {\n return;\n }\n loadMoreFiredRef.current = true;\n if (loadMoreTimerRef.current !== null) {\n clearTimeout(loadMoreTimerRef.current);\n }\n loadMoreTimerRef.current = setTimeout(() => {\n onLoadMore();\n loadMoreTimerRef.current = setTimeout(() => {\n loadMoreFiredRef.current = false;\n }, LOAD_MORE_DEBOUNCE_MS);\n }, LOAD_MORE_DEBOUNCE_MS);\n } else {\n loadMoreFiredRef.current = false;\n }\n },\n [onLoadMore, loadMoreThresholdPx],\n );\n\n useEffect(() => {\n return () => {\n if (loadMoreTimerRef.current !== null) {\n clearTimeout(loadMoreTimerRef.current);\n }\n };\n }, []);\n\n const gridTemplate = useMemo(\n () =>\n columns\n .map((c) =>\n c.width === 'flex' || c.width === undefined\n ? 'minmax(0, 1fr)'\n : `${c.width.toString()}px`,\n )\n .join(' '),\n [columns],\n );\n\n const contentStyle = useMemo(\n (): CSSProperties => ({\n minWidth: `${columns\n .reduce(\n (sum, c) =>\n sum +\n (typeof c.width === 'number' ? c.width : FLEX_COLUMN_MIN_WIDTH),\n 0,\n )\n .toString()}px`,\n }),\n [columns],\n );\n\n const handleRowKeyDown = useCallback(\n (e: ReactKeyboardEvent<HTMLDivElement>, index: number, row: T) => {\n if (e.target !== e.currentTarget) {\n return;\n }\n if (e.key === 'Enter' || e.key === ' ') {\n e.preventDefault();\n onRowClick?.(row);\n } else if (e.key === 'ArrowDown' || e.key === 'ArrowUp') {\n e.preventDefault();\n // Overscan keeps the neighbouring rows mounted.\n rowRefs.current.get(index + (e.key === 'ArrowDown' ? 1 : -1))?.focus();\n }\n },\n [onRowClick],\n );\n\n const rootCls = ['aegis-event-table', className ?? '']\n .filter(Boolean)\n .join(' ');\n\n const scrollStyle: CSSProperties = {\n maxHeight: `${(estimatedRowHeight * maxVisibleRows + headerHeight).toString()}px`,\n scrollPaddingTop: `${headerHeight.toString()}px`,\n };\n\n const showEmpty = !loading && data.length === 0;\n const develop = useDevelopAfterLoad(loading);\n const cellRole = clickable ? 'gridcell' : 'cell';\n\n return (\n <div\n className={rootCls}\n role={clickable ? 'grid' : 'table'}\n aria-rowcount={data.length + (showEmpty ? 2 : 1)}\n aria-busy={loading || undefined}\n >\n <div\n ref={scrollRef}\n className=\"aegis-event-table__scroll\"\n style={scrollStyle}\n onScroll={handleScroll}\n >\n <div\n ref={headerRef}\n className=\"aegis-event-table__header\"\n style={{ ...contentStyle, gridTemplateColumns: gridTemplate }}\n role=\"row\"\n aria-rowindex={1}\n >\n {columns.map((col) => (\n <div\n key={col.key}\n role=\"columnheader\"\n className={`aegis-event-table__th aegis-event-table__th--${columnAlign(col)}`}\n >\n {col.header}\n </div>\n ))}\n </div>\n\n <div data-aegis-develop={develop || undefined} style={contentStyle}>\n {loading ? (\n <div\n className=\"aegis-event-table__skeleton-list\"\n aria-hidden=\"true\"\n >\n {Array.from({ length: SKELETON_ROW_COUNT }).map((_, i) => (\n <div\n key={i}\n className=\"aegis-event-table__row aegis-event-table__row--skeleton\"\n style={{\n height: `${estimatedRowHeight.toString()}px`,\n gridTemplateColumns: gridTemplate,\n }}\n >\n {columns.map((c) => (\n <div key={c.key} className=\"aegis-event-table__td\">\n <Skeleton width=\"80%\" height=\"var(--space-3)\" />\n </div>\n ))}\n </div>\n ))}\n </div>\n ) : showEmpty ? (\n <div\n className=\"aegis-event-table__empty\"\n role=\"row\"\n aria-rowindex={2}\n >\n <div role={cellRole} aria-colspan={columns.length}>\n <EmptyState\n title={emptyTitle ?? strings.noEvents}\n description={emptyDescription}\n />\n </div>\n </div>\n ) : (\n <div\n className=\"aegis-event-table__virtual\"\n style={{\n height: `${virtualizer.getTotalSize().toString()}px`,\n }}\n >\n {virtualizer.getVirtualItems().map((vi) => {\n const row = data[vi.index];\n const key = rowKey(row);\n const rowCls = [\n 'aegis-event-table__row',\n clickable ? 'aegis-event-table__row--clickable' : '',\n selectedKey === key ? 'aegis-event-table__row--selected' : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div\n key={key}\n ref={(el) => {\n if (el) {\n rowRefs.current.set(vi.index, el);\n } else {\n rowRefs.current.delete(vi.index);\n }\n }}\n role=\"row\"\n aria-rowindex={vi.index + 2}\n aria-selected={\n clickable && selectedKey !== undefined\n ? selectedKey === key\n : undefined\n }\n tabIndex={clickable ? 0 : undefined}\n className={rowCls}\n style={{\n transform: `translateY(${(vi.start - headerHeight).toString()}px)`,\n height: `${vi.size.toString()}px`,\n gridTemplateColumns: gridTemplate,\n }}\n onClick={\n onRowClick\n ? () => {\n onRowClick(row);\n }\n : undefined\n }\n onKeyDown={\n clickable\n ? (e) => {\n handleRowKeyDown(e, vi.index, row);\n }\n : undefined\n }\n >\n {columns.map((col) => {\n const truncate = col.truncate !== false;\n const cellCls = [\n 'aegis-event-table__td',\n `aegis-event-table__td--${columnAlign(col)}`,\n col.numeric ? 'aegis-event-table__td--numeric' : '',\n truncate ? 'aegis-event-table__td--truncate' : '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div key={col.key} role={cellRole} className={cellCls}>\n {col.render(row)}\n </div>\n );\n })}\n </div>\n );\n })}\n </div>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["DEFAULT_ROW_HEIGHT","DEFAULT_MAX_VISIBLE_ROWS","DEFAULT_LOAD_MORE_THRESHOLD","LOAD_MORE_DEBOUNCE_MS","SKELETON_ROW_COUNT","OVERSCAN","FLEX_COLUMN_MIN_WIDTH","columnAlign","col","EventTable","columns","data","rowKey","onRowClick","selectedKey","loading","emptyTitle","emptyDescription","estimatedRowHeight","maxVisibleRows","onLoadMore","loadMoreThresholdPx","className","strings","useStrings","scrollRef","useRef","headerRef","rowRefs","headerHeight","setHeaderHeight","useState","clickable","useIsomorphicLayoutEffect","header","measure","observer","virtualizer","useVirtualizer","loadMoreFiredRef","loadMoreTimerRef","handleScroll","useCallback","el","useEffect","gridTemplate","useMemo","c","contentStyle","sum","handleRowKeyDown","index","row","rootCls","scrollStyle","showEmpty","develop","useDevelopAfterLoad","cellRole","jsx","jsxs","_","i","Skeleton","EmptyState","vi","key","rowCls","e","truncate","cellCls"],"mappings":";;;;;;;;;AA2EA,MAAMA,KAAqB,IACrBC,KAA2B,IAC3BC,KAA8B,KAC9BC,IAAwB,IACxBC,KAAqB,GACrBC,KAAW,GACXC,KAAwB;AAE9B,SAASC,EAAeC,GAAuD;AAC7E,SAAOA,EAAI,UAAU,UAAWA,EAAI,SAAS;AAC/C;AAEO,SAASC,GAAc;AAAA,EAC5B,SAAAC;AAAA,EACA,MAAAC;AAAA,EACA,QAAAC;AAAA,EACA,YAAAC;AAAA,EACA,aAAAC;AAAA,EACA,SAAAC,IAAU;AAAA,EACV,YAAAC;AAAA,EACA,kBAAAC;AAAA,EACA,oBAAAC,IAAqBlB;AAAA,EACrB,gBAAAmB,IAAiBlB;AAAA,EACjB,YAAAmB;AAAA,EACA,qBAAAC,IAAsBnB;AAAA,EACtB,WAAAoB;AACF,GAAuB;AACrB,QAAMC,IAAUC,EAAA,GACVC,IAAYC,EAAuB,IAAI,GACvCC,IAAYD,EAAuB,IAAI,GACvCE,IAAUF,EAAO,oBAAI,KAA6B,GAClD,CAACG,GAAcC,CAAe,IAAIC,EAAS,CAAC,GAC5CC,IAAYnB,MAAe;AAIjC,EAAAoB,EAA0B,MAAM;AAC9B,UAAMC,IAASP,EAAU;AACzB,QAAI,CAACO;AACH;AAEF,UAAMC,IAAU,MAAY;AAC1B,MAAAL,EAAgBI,EAAO,YAAY;AAAA,IACrC;AACA,IAAA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AAAA,sBACnC,IACA;AAAA,sBAGL,UAAA1C,EAAQ,IAAI,CAACF,MAAQ;AACpB,8BAAM6D,IAAW7D,EAAI,aAAa,IAC5B8D,IAAU;AAAA,0BACd;AAAA,0BACA,0BAA0B/D,EAAYC,CAAG,CAAC;AAAA,0BAC1CA,EAAI,UAAU,mCAAmC;AAAA,0BACjD6D,IAAW,oCAAoC;AAAA,wBAAA,EAE9C,OAAO,OAAO,EACd,KAAK,GAAG;AACX,+BACE,gBAAAV,EAAC,OAAA,EAAkB,MAAMD,GAAU,WAAWY,GAC3C,UAAA9D,EAAI,OAAO4C,CAAG,EAAA,GADP5C,EAAI,GAEd;AAAA,sBAEJ,CAAC;AAAA,oBAAA;AAAA,oBApDI0D;AAAA,kBAAA;AAAA,gBAuDX,CAAC;AAAA,cAAA;AAAA,YAAA,EACH,CAEJ;AAAA,UAAA;AAAA,QAAA;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react-dropzone"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),v=require("react-dropzone"),F=require("../../lib/format.cjs");;/* empty css */const y=require("./dropFiles.cjs"),h=require("../../locale/useStrings.cjs");function x({onDrop:a,accept:r,multiple:d=!0,disabled:n=!1,maxSize:s,directory:i=!1,variant:p="inline",hint:c,className:g,style:u}){const o=h.useStrings(),{getRootProps:z,getInputProps:f,isDragActive:l,isDragReject:j}=v.useDropzone({onDrop:a,accept:r,multiple:d,disabled:n,maxSize:s,getFilesFromEvent:y.filesFromEvent}),t=p==="overlay",m=["aegis-file-dropzone",t?"aegis-file-dropzone--overlay":"",l?"aegis-file-dropzone--active":"",j?"aegis-file-dropzone--reject":"",n?"aegis-file-dropzone--disabled":"",g??""].filter(Boolean).join(" "),_=f();return e.jsx("div",{className:t?"aegis-file-dropzone__root aegis-file-dropzone__root--overlay":"aegis-file-dropzone__root",style:u,children:e.jsxs("div",{...z({className:m}),children:[e.jsx("input",{..._,...i?{webkitdirectory:"",mozdirectory:""}:{}}),e.jsx("div",{className:"aegis-file-dropzone__hint",children:c??e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"aegis-file-dropzone__primary",children:l?i?o.dropzoneDropFolder:o.dropzoneDropFiles:i?o.dropzoneBrowseFolder:o.dropzoneBrowseFiles}),r?e.jsx("span",{className:"aegis-file-dropzone__meta",children:Object.keys(r).join(", ")}):null,s!==void 0?e.jsx("span",{className:"aegis-file-dropzone__meta",children:o.dropzoneMaxSize(F.formatBytes(s))}):null]})})]})})}exports.FileDropzone=x;
|
|
2
2
|
//# sourceMappingURL=FileDropzone.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FileDropzone.cjs","sources":["../../../src/components/ui/FileDropzone.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nimport { type Accept, useDropzone } from 'react-dropzone';\n\nimport { formatBytes } from '../../lib/format';\nimport
|
|
1
|
+
{"version":3,"file":"FileDropzone.cjs","sources":["../../../src/components/ui/FileDropzone.tsx"],"sourcesContent":["import type { CSSProperties, ReactNode } from 'react';\n\nimport { type Accept, useDropzone } from 'react-dropzone';\n\nimport { formatBytes } from '../../lib/format';\nimport { useStrings } from '../../locale';\nimport './FileDropzone.css';\nimport { filesFromEvent } from './dropFiles';\n\ninterface FileDropzoneProps {\n onDrop: (files: File[]) => void;\n /** Accept map per react-dropzone, e.g. `{ 'image/*': ['.png'] }`. */\n accept?: Accept;\n multiple?: boolean;\n disabled?: boolean;\n /** Reject files bigger than this many bytes (forwarded to react-dropzone). */\n maxSize?: number;\n /**\n * When true, the `<input>` gets `webkitdirectory` so the user can select\n * an entire folder. Files of a picked or dropped folder carry their path\n * inside it in `webkitRelativePath`.\n */\n directory?: boolean;\n /**\n * `'inline'` (default) — standard dashed-border dropzone block.\n * `'overlay'` — fixed/absolute fullscreen overlay with a dashed border and\n * centred hint; use inside a `position: relative` container.\n */\n variant?: 'inline' | 'overlay';\n /** Override the body text in the drop area. */\n hint?: ReactNode;\n className?: string;\n style?: CSSProperties;\n}\n\nexport function FileDropzone({\n onDrop,\n accept,\n multiple = true,\n disabled = false,\n maxSize,\n directory = false,\n variant = 'inline',\n hint,\n className,\n style,\n}: FileDropzoneProps) {\n const strings = useStrings();\n const { getRootProps, getInputProps, isDragActive, isDragReject } =\n useDropzone({\n onDrop,\n accept,\n multiple,\n disabled,\n maxSize,\n getFilesFromEvent: filesFromEvent,\n });\n\n const isOverlay = variant === 'overlay';\n\n const rootClass = [\n 'aegis-file-dropzone',\n isOverlay ? 'aegis-file-dropzone--overlay' : '',\n isDragActive ? 'aegis-file-dropzone--active' : '',\n isDragReject ? 'aegis-file-dropzone--reject' : '',\n disabled ? 'aegis-file-dropzone--disabled' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n const inputProps = getInputProps();\n\n return (\n <div\n className={\n isOverlay\n ? 'aegis-file-dropzone__root aegis-file-dropzone__root--overlay'\n : 'aegis-file-dropzone__root'\n }\n style={style}\n >\n <div {...getRootProps({ className: rootClass })}>\n <input\n {...inputProps}\n {...(directory ? { webkitdirectory: '', mozdirectory: '' } : {})}\n />\n <div className=\"aegis-file-dropzone__hint\">\n {hint ?? (\n <>\n <span className=\"aegis-file-dropzone__primary\">\n {isDragActive\n ? directory\n ? strings.dropzoneDropFolder\n : strings.dropzoneDropFiles\n : directory\n ? strings.dropzoneBrowseFolder\n : strings.dropzoneBrowseFiles}\n </span>\n {accept ? (\n <span className=\"aegis-file-dropzone__meta\">\n {Object.keys(accept).join(', ')}\n </span>\n ) : null}\n {maxSize !== undefined ? (\n <span className=\"aegis-file-dropzone__meta\">\n {strings.dropzoneMaxSize(formatBytes(maxSize))}\n </span>\n ) : null}\n </>\n )}\n </div>\n </div>\n </div>\n );\n}\n"],"names":["FileDropzone","onDrop","accept","multiple","disabled","maxSize","directory","variant","hint","className","style","strings","useStrings","getRootProps","getInputProps","isDragActive","isDragReject","useDropzone","filesFromEvent","isOverlay","rootClass","inputProps","jsx","jsxs","Fragment","formatBytes"],"mappings":"iSAmCO,SAASA,EAAa,CAC3B,OAAAC,EACA,OAAAC,EACA,SAAAC,EAAW,GACX,SAAAC,EAAW,GACX,QAAAC,EACA,UAAAC,EAAY,GACZ,QAAAC,EAAU,SACV,KAAAC,EACA,UAAAC,EACA,MAAAC,CACF,EAAsB,CACpB,MAAMC,EAAUC,EAAAA,WAAA,EACV,CAAE,aAAAC,EAAc,cAAAC,EAAe,aAAAC,EAAc,aAAAC,CAAA,EACjDC,EAAAA,YAAY,CACV,OAAAhB,EACA,OAAAC,EACA,SAAAC,EACA,SAAAC,EACA,QAAAC,EACA,kBAAmBa,EAAAA,cAAA,CACpB,EAEGC,EAAYZ,IAAY,UAExBa,EAAY,CAChB,sBACAD,EAAY,+BAAiC,GAC7CJ,EAAe,8BAAgC,GAC/CC,EAAe,8BAAgC,GAC/CZ,EAAW,gCAAkC,GAC7CK,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAELY,EAAaP,EAAA,EAEnB,OACEQ,EAAAA,IAAC,MAAA,CACC,UACEH,EACI,+DACA,4BAEN,MAAAT,EAEA,SAAAa,EAAAA,KAAC,OAAK,GAAGV,EAAa,CAAE,UAAWO,EAAW,EAC5C,SAAA,CAAAE,EAAAA,IAAC,QAAA,CACE,GAAGD,EACH,GAAIf,EAAY,CAAE,gBAAiB,GAAI,aAAc,EAAA,EAAO,CAAA,CAAC,CAAA,EAEhEgB,MAAC,MAAA,CAAI,UAAU,4BACZ,YACCC,EAAAA,KAAAC,WAAA,CACE,SAAA,CAAAF,EAAAA,IAAC,OAAA,CAAK,UAAU,+BACb,SAAAP,EACGT,EACEK,EAAQ,mBACRA,EAAQ,kBACVL,EACEK,EAAQ,qBACRA,EAAQ,oBAChB,EACCT,EACCoB,EAAAA,IAAC,OAAA,CAAK,UAAU,4BACb,SAAA,OAAO,KAAKpB,CAAM,EAAE,KAAK,IAAI,CAAA,CAChC,EACE,KACHG,IAAY,OACXiB,EAAAA,IAAC,OAAA,CAAK,UAAU,4BACb,SAAAX,EAAQ,gBAAgBc,EAAAA,YAAYpB,CAAO,CAAC,CAAA,CAC/C,EACE,IAAA,CAAA,CACN,CAAA,CAEJ,CAAA,CAAA,CACF,CAAA,CAAA,CAGN"}
|
|
@@ -1,22 +1,5 @@
|
|
|
1
1
|
import { CSSProperties, ReactNode } from 'react';
|
|
2
2
|
import { Accept } from 'react-dropzone';
|
|
3
|
-
export interface FileDropzoneItem {
|
|
4
|
-
/** Stable id so progress / errors can update in place. */
|
|
5
|
-
id: string;
|
|
6
|
-
file: File;
|
|
7
|
-
/** 0–100; omit for indeterminate. */
|
|
8
|
-
progress?: number;
|
|
9
|
-
status: 'queued' | 'uploading' | 'done' | 'error';
|
|
10
|
-
error?: string;
|
|
11
|
-
/** Bytes transferred so far. */
|
|
12
|
-
bytesUploaded?: number;
|
|
13
|
-
/** Transfer speed in bytes per second. */
|
|
14
|
-
speedBps?: number;
|
|
15
|
-
/** Estimated seconds remaining. */
|
|
16
|
-
etaSeconds?: number;
|
|
17
|
-
/** Called when the user cancels an in-progress upload. */
|
|
18
|
-
onCancel?: () => void;
|
|
19
|
-
}
|
|
20
3
|
interface FileDropzoneProps {
|
|
21
4
|
onDrop: (files: File[]) => void;
|
|
22
5
|
/** Accept map per react-dropzone, e.g. `{ 'image/*': ['.png'] }`. */
|
|
@@ -27,7 +10,8 @@ interface FileDropzoneProps {
|
|
|
27
10
|
maxSize?: number;
|
|
28
11
|
/**
|
|
29
12
|
* When true, the `<input>` gets `webkitdirectory` so the user can select
|
|
30
|
-
* an entire folder.
|
|
13
|
+
* an entire folder. Files of a picked or dropped folder carry their path
|
|
14
|
+
* inside it in `webkitRelativePath`.
|
|
31
15
|
*/
|
|
32
16
|
directory?: boolean;
|
|
33
17
|
/**
|
|
@@ -36,12 +20,10 @@ interface FileDropzoneProps {
|
|
|
36
20
|
* centred hint; use inside a `position: relative` container.
|
|
37
21
|
*/
|
|
38
22
|
variant?: 'inline' | 'overlay';
|
|
39
|
-
/** Optional in-flight queue rendered under the drop area. */
|
|
40
|
-
items?: FileDropzoneItem[];
|
|
41
23
|
/** Override the body text in the drop area. */
|
|
42
24
|
hint?: ReactNode;
|
|
43
25
|
className?: string;
|
|
44
26
|
style?: CSSProperties;
|
|
45
27
|
}
|
|
46
|
-
export declare function FileDropzone({ onDrop, accept, multiple, disabled, maxSize, directory, variant,
|
|
28
|
+
export declare function FileDropzone({ onDrop, accept, multiple, disabled, maxSize, directory, variant, hint, className, style, }: FileDropzoneProps): import("react/jsx-runtime").JSX.Element;
|
|
47
29
|
export {};
|