@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
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
interface SliderProps {
|
|
2
|
+
value: number;
|
|
3
|
+
onChange: (value: number) => void;
|
|
4
|
+
min: number;
|
|
5
|
+
max: number;
|
|
6
|
+
step?: number;
|
|
7
|
+
label?: string;
|
|
8
|
+
/** Accessible name for a slider shown without a visible label. */
|
|
9
|
+
ariaLabel?: string;
|
|
10
|
+
/** How the value reads beside the label and to assistive tech, e.g. `${v}%`. */
|
|
11
|
+
formatValue?: (value: number) => string;
|
|
12
|
+
disabled?: boolean;
|
|
13
|
+
id?: string;
|
|
14
|
+
/** Ids of the text that describes the slider, such as a FormRow's description. */
|
|
15
|
+
'aria-describedby'?: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
/**
|
|
19
|
+
* One number picked along a range, on a native range input: arrow keys,
|
|
20
|
+
* PageUp / PageDown and Home / End move it, and the current value is shown
|
|
21
|
+
* above the track.
|
|
22
|
+
*/
|
|
23
|
+
export declare function Slider({ value, onChange, min, max, step, label, ariaLabel, formatValue, disabled, id, 'aria-describedby': describedBy, className, }: SliderProps): import("react/jsx-runtime").JSX.Element;
|
|
24
|
+
export {};
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsxs as n, jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { useId as N } from "react";
|
|
3
|
+
/* empty css */
|
|
4
|
+
function I({
|
|
5
|
+
value: i,
|
|
6
|
+
onChange: o,
|
|
7
|
+
min: e,
|
|
8
|
+
max: s,
|
|
9
|
+
step: c = 1,
|
|
10
|
+
label: a,
|
|
11
|
+
ariaLabel: g,
|
|
12
|
+
formatValue: h = String,
|
|
13
|
+
disabled: l = !1,
|
|
14
|
+
id: u,
|
|
15
|
+
"aria-describedby": m,
|
|
16
|
+
className: p
|
|
17
|
+
}) {
|
|
18
|
+
const f = N(), d = u ?? `aegis-slider-${f}`, t = h(i), _ = s > e ? (i - e) / (s - e) * 100 : 0, b = [
|
|
19
|
+
"aegis-slider",
|
|
20
|
+
l ? "aegis-slider--disabled" : "",
|
|
21
|
+
p ?? ""
|
|
22
|
+
].filter(Boolean).join(" ");
|
|
23
|
+
return /* @__PURE__ */ n("div", { className: b, "data-aegis-field": !0, children: [
|
|
24
|
+
/* @__PURE__ */ n("div", { className: "aegis-slider__head", children: [
|
|
25
|
+
a !== void 0 && /* @__PURE__ */ r("label", { htmlFor: d, className: "aegis-slider__label", children: a }),
|
|
26
|
+
/* @__PURE__ */ r("span", { className: "aegis-slider__value", "aria-hidden": "true", children: t })
|
|
27
|
+
] }),
|
|
28
|
+
/* @__PURE__ */ r(
|
|
29
|
+
"input",
|
|
30
|
+
{
|
|
31
|
+
type: "range",
|
|
32
|
+
id: d,
|
|
33
|
+
className: "aegis-slider__input",
|
|
34
|
+
min: e,
|
|
35
|
+
max: s,
|
|
36
|
+
step: c,
|
|
37
|
+
value: i,
|
|
38
|
+
disabled: l,
|
|
39
|
+
"aria-label": a === void 0 ? g : void 0,
|
|
40
|
+
"aria-valuetext": t,
|
|
41
|
+
"aria-describedby": m,
|
|
42
|
+
style: {
|
|
43
|
+
"--aegis-slider-fill": `${String(Math.min(100, Math.max(0, _)))}%`
|
|
44
|
+
},
|
|
45
|
+
onChange: (v) => {
|
|
46
|
+
o(Number(v.target.value));
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
)
|
|
50
|
+
] });
|
|
51
|
+
}
|
|
52
|
+
export {
|
|
53
|
+
I as Slider
|
|
54
|
+
};
|
|
55
|
+
//# sourceMappingURL=Slider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Slider.js","sources":["../../../src/components/ui/Slider.tsx"],"sourcesContent":["import { type CSSProperties, useId } from 'react';\n\nimport './Slider.css';\n\ninterface SliderProps {\n value: number;\n onChange: (value: number) => void;\n min: number;\n max: number;\n step?: number;\n label?: string;\n /** Accessible name for a slider shown without a visible label. */\n ariaLabel?: string;\n /** How the value reads beside the label and to assistive tech, e.g. `${v}%`. */\n formatValue?: (value: number) => string;\n disabled?: boolean;\n id?: string;\n /** Ids of the text that describes the slider, such as a FormRow's description. */\n 'aria-describedby'?: string;\n className?: string;\n}\n\n/**\n * One number picked along a range, on a native range input: arrow keys,\n * PageUp / PageDown and Home / End move it, and the current value is shown\n * above the track.\n */\nexport function Slider({\n value,\n onChange,\n min,\n max,\n step = 1,\n label,\n ariaLabel,\n formatValue = String,\n disabled = false,\n id,\n 'aria-describedby': describedBy,\n className,\n}: SliderProps) {\n const reactId = useId();\n const inputId = id ?? `aegis-slider-${reactId}`;\n const shown = formatValue(value);\n const fill = max > min ? ((value - min) / (max - min)) * 100 : 0;\n const cls = [\n 'aegis-slider',\n disabled ? 'aegis-slider--disabled' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls} data-aegis-field>\n <div className=\"aegis-slider__head\">\n {label !== undefined && (\n <label htmlFor={inputId} className=\"aegis-slider__label\">\n {label}\n </label>\n )}\n <span className=\"aegis-slider__value\" aria-hidden=\"true\">\n {shown}\n </span>\n </div>\n <input\n type=\"range\"\n id={inputId}\n className=\"aegis-slider__input\"\n min={min}\n max={max}\n step={step}\n value={value}\n disabled={disabled}\n aria-label={label === undefined ? ariaLabel : undefined}\n aria-valuetext={shown}\n aria-describedby={describedBy}\n style={\n {\n '--aegis-slider-fill': `${String(Math.min(100, Math.max(0, fill)))}%`,\n } as CSSProperties\n }\n onChange={(event) => {\n onChange(Number(event.target.value));\n }}\n />\n </div>\n );\n}\n"],"names":["Slider","value","onChange","min","max","step","label","ariaLabel","formatValue","disabled","id","describedBy","className","reactId","useId","inputId","shown","fill","cls","jsxs","jsx","event"],"mappings":";;;AA2BO,SAASA,EAAO;AAAA,EACrB,OAAAC;AAAA,EACA,UAAAC;AAAA,EACA,KAAAC;AAAA,EACA,KAAAC;AAAA,EACA,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,UAAAC,IAAW;AAAA,EACX,IAAAC;AAAA,EACA,oBAAoBC;AAAA,EACpB,WAAAC;AACF,GAAgB;AACd,QAAMC,IAAUC,EAAA,GACVC,IAAUL,KAAM,gBAAgBG,CAAO,IACvCG,IAAQR,EAAYP,CAAK,GACzBgB,IAAOb,IAAMD,KAAQF,IAAQE,MAAQC,IAAMD,KAAQ,MAAM,GACzDe,IAAM;AAAA,IACV;AAAA,IACAT,IAAW,2BAA2B;AAAA,IACtCG,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAO,EAAC,OAAA,EAAI,WAAWD,GAAK,oBAAgB,IACnC,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,sBACZ,UAAA;AAAA,MAAAb,MAAU,UACT,gBAAAc,EAAC,SAAA,EAAM,SAASL,GAAS,WAAU,uBAChC,UAAAT,EAAA,CACH;AAAA,wBAED,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAAU,EAAA,CACH;AAAA,IAAA,GACF;AAAA,IACA,gBAAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,MAAK;AAAA,QACL,IAAIL;AAAA,QACJ,WAAU;AAAA,QACV,KAAAZ;AAAA,QACA,KAAAC;AAAA,QACA,MAAAC;AAAA,QACA,OAAAJ;AAAA,QACA,UAAAQ;AAAA,QACA,cAAYH,MAAU,SAAYC,IAAY;AAAA,QAC9C,kBAAgBS;AAAA,QAChB,oBAAkBL;AAAA,QAClB,OACE;AAAA,UACE,uBAAuB,GAAG,OAAO,KAAK,IAAI,KAAK,KAAK,IAAI,GAAGM,CAAI,CAAC,CAAC,CAAC;AAAA,QAAA;AAAA,QAGtE,UAAU,CAACI,MAAU;AACnB,UAAAnB,EAAS,OAAOmB,EAAM,OAAO,KAAK,CAAC;AAAA,QACrC;AAAA,MAAA;AAAA,IAAA;AAAA,EACF,GACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),p=require("react"),x=require("../../agent/core/usePrimitiveSurface.cjs");;/* empty css */const k=require("../../locale/useStrings.cjs");function v(e,s,n){if(e.length===0)return"";const t=Math.min(...e),a=Math.max(...e)-t,i=r=>a===0?n/2:n-(r-t)/a*n;if(e.length===1){const r=i(e[0]).toFixed(2);return`M0,${r} L${s.toFixed(2)},${r}`}const l=s/(e.length-1);return e.map((r,c)=>{const o=c*l;return`${c===0?"M":"L"}${o.toFixed(2)},${i(r).toFixed(2)}`}).join(" ")}function S({points:e,width:s=100,height:n=40,strokeWidth:t=1.5,withBackdrop:a=!0,inverted:i=!1,className:l,ariaLabel:r,surface:c}){const o=k.useStrings(),g=p.useRef(null),f=x.usePrimitiveSurface(c,e,"chart",g),m=v(e,s,n),d=["aegis-sparkline",i?"aegis-sparkline--inverted":"",a?"aegis-sparkline--backdrop":"",l??""].filter(Boolean).join(" ");return u.jsx("span",{ref:g,className:d,"aria-label":r??o.sparkline,role:"img",...f,children:u.jsx("svg",{viewBox:`0 0 ${s} ${n}`,preserveAspectRatio:"none",className:"aegis-sparkline__svg",children:u.jsx("path",{d:m,className:"aegis-sparkline__line",strokeWidth:t})})})}exports.SparkLine=S;
|
|
2
2
|
//# sourceMappingURL=SparkLine.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparkLine.cjs","sources":["../../../src/components/ui/SparkLine.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './SparkLine.css';\n\nexport type SparkLineSurface = PrimitiveSurface<number[]>;\n\ninterface SparkLineProps {\n
|
|
1
|
+
{"version":3,"file":"SparkLine.cjs","sources":["../../../src/components/ui/SparkLine.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useStrings } from '../../locale';\nimport './SparkLine.css';\n\nexport type SparkLineSurface = PrimitiveSurface<number[]>;\n\ninterface SparkLineProps {\n /**\n * Sample values, spread evenly across the width. A series that does not\n * vary, a single value included, draws a level line through the middle.\n */\n points: number[];\n /** Display dimensions (defaults give a strip-style sparkline). */\n width?: number;\n height?: number;\n /** Stroke thickness. */\n strokeWidth?: number;\n /** Gradient backdrop (panel → page). */\n withBackdrop?: boolean;\n /** Use white stroke for inverted panels. */\n inverted?: boolean;\n className?: string;\n ariaLabel?: string;\n surface?: SparkLineSurface;\n}\n\nfunction buildPath(points: number[], w: number, h: number): string {\n if (points.length === 0) {\n return '';\n }\n const min = Math.min(...points);\n const range = Math.max(...points) - min;\n const yOf = (p: number): number =>\n range === 0 ? h / 2 : h - ((p - min) / range) * h;\n if (points.length === 1) {\n const y = yOf(points[0]).toFixed(2);\n return `M0,${y} L${w.toFixed(2)},${y}`;\n }\n const step = w / (points.length - 1);\n return points\n .map((p, i) => {\n const x = i * step;\n return `${i === 0 ? 'M' : 'L'}${x.toFixed(2)},${yOf(p).toFixed(2)}`;\n })\n .join(' ');\n}\n\nexport function SparkLine({\n points,\n width = 100,\n height = 40,\n strokeWidth = 1.5,\n withBackdrop = true,\n inverted = false,\n className,\n ariaLabel,\n surface,\n}: SparkLineProps) {\n const strings = useStrings();\n const wrapRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(surface, points, 'chart', wrapRef);\n const path = buildPath(points, width, height);\n const cls = [\n 'aegis-sparkline',\n inverted ? 'aegis-sparkline--inverted' : '',\n withBackdrop ? 'aegis-sparkline--backdrop' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n ref={wrapRef}\n className={cls}\n aria-label={ariaLabel ?? strings.sparkline}\n role=\"img\"\n {...agentAttrs}\n >\n <svg\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"none\"\n className=\"aegis-sparkline__svg\"\n >\n <path\n d={path}\n className=\"aegis-sparkline__line\"\n strokeWidth={strokeWidth}\n />\n </svg>\n </span>\n );\n}\n"],"names":["buildPath","points","w","h","min","range","yOf","p","y","step","i","x","SparkLine","width","height","strokeWidth","withBackdrop","inverted","className","ariaLabel","surface","strings","useStrings","wrapRef","useRef","agentAttrs","usePrimitiveSurface","path","cls","jsx"],"mappings":"4QA+BA,SAASA,EAAUC,EAAkBC,EAAWC,EAAmB,CACjE,GAAIF,EAAO,SAAW,EACpB,MAAO,GAET,MAAMG,EAAM,KAAK,IAAI,GAAGH,CAAM,EACxBI,EAAQ,KAAK,IAAI,GAAGJ,CAAM,EAAIG,EAC9BE,EAAOC,GACXF,IAAU,EAAIF,EAAI,EAAIA,GAAMI,EAAIH,GAAOC,EAASF,EAClD,GAAIF,EAAO,SAAW,EAAG,CACvB,MAAMO,EAAIF,EAAIL,EAAO,CAAC,CAAC,EAAE,QAAQ,CAAC,EAClC,MAAO,MAAMO,CAAC,KAAKN,EAAE,QAAQ,CAAC,CAAC,IAAIM,CAAC,EACtC,CACA,MAAMC,EAAOP,GAAKD,EAAO,OAAS,GAClC,OAAOA,EACJ,IAAI,CAACM,EAAGG,IAAM,CACb,MAAMC,EAAID,EAAID,EACd,MAAO,GAAGC,IAAM,EAAI,IAAM,GAAG,GAAGC,EAAE,QAAQ,CAAC,CAAC,IAAIL,EAAIC,CAAC,EAAE,QAAQ,CAAC,CAAC,EACnE,CAAC,EACA,KAAK,GAAG,CACb,CAEO,SAASK,EAAU,CACxB,OAAAX,EACA,MAAAY,EAAQ,IACR,OAAAC,EAAS,GACT,YAAAC,EAAc,IACd,aAAAC,EAAe,GACf,SAAAC,EAAW,GACX,UAAAC,EACA,UAAAC,EACA,QAAAC,CACF,EAAmB,CACjB,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EAAUC,EAAAA,OAAwB,IAAI,EACtCC,EAAaC,EAAAA,oBAAoBN,EAASnB,EAAQ,QAASsB,CAAO,EAClEI,EAAO3B,EAAUC,EAAQY,EAAOC,CAAM,EACtCc,EAAM,CACV,kBACAX,EAAW,4BAA8B,GACzCD,EAAe,4BAA8B,GAC7CE,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EAEX,OACEW,EAAAA,IAAC,OAAA,CACC,IAAKN,EACL,UAAWK,EACX,aAAYT,GAAaE,EAAQ,UACjC,KAAK,MACJ,GAAGI,EAEJ,SAAAI,EAAAA,IAAC,MAAA,CACC,QAAS,OAAOhB,CAAK,IAAIC,CAAM,GAC/B,oBAAoB,OACpB,UAAU,uBAEV,SAAAe,EAAAA,IAAC,OAAA,CACC,EAAGF,EACH,UAAU,wBACV,YAAAZ,CAAA,CAAA,CACF,CAAA,CACF,CAAA,CAGN"}
|
|
@@ -1,7 +1,10 @@
|
|
|
1
1
|
import { PrimitiveSurface } from '../../agent/core/usePrimitiveSurface';
|
|
2
2
|
export type SparkLineSurface = PrimitiveSurface<number[]>;
|
|
3
3
|
interface SparkLineProps {
|
|
4
|
-
/**
|
|
4
|
+
/**
|
|
5
|
+
* Sample values, spread evenly across the width. A series that does not
|
|
6
|
+
* vary, a single value included, draws a level line through the middle.
|
|
7
|
+
*/
|
|
5
8
|
points: number[];
|
|
6
9
|
/** Display dimensions (defaults give a strip-style sparkline). */
|
|
7
10
|
width?: number;
|
|
@@ -1,53 +1,59 @@
|
|
|
1
1
|
import { jsx as m } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as
|
|
2
|
+
import { useRef as d } from "react";
|
|
3
3
|
import { usePrimitiveSurface as x } from "../../agent/core/usePrimitiveSurface.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
|
|
5
|
+
import { useStrings as k } from "../../locale/useStrings.js";
|
|
6
|
+
function $(e, t, n) {
|
|
6
7
|
if (e.length === 0)
|
|
7
8
|
return "";
|
|
8
|
-
const
|
|
9
|
-
|
|
10
|
-
const
|
|
11
|
-
return
|
|
9
|
+
const a = Math.min(...e), s = Math.max(...e) - a, i = (r) => s === 0 ? n / 2 : n - (r - a) / s * n;
|
|
10
|
+
if (e.length === 1) {
|
|
11
|
+
const r = i(e[0]).toFixed(2);
|
|
12
|
+
return `M0,${r} L${t.toFixed(2)},${r}`;
|
|
13
|
+
}
|
|
14
|
+
const l = t / (e.length - 1);
|
|
15
|
+
return e.map((r, o) => {
|
|
16
|
+
const c = o * l;
|
|
17
|
+
return `${o === 0 ? "M" : "L"}${c.toFixed(2)},${i(r).toFixed(2)}`;
|
|
12
18
|
}).join(" ");
|
|
13
19
|
}
|
|
14
|
-
function
|
|
20
|
+
function b({
|
|
15
21
|
points: e,
|
|
16
|
-
width:
|
|
17
|
-
height:
|
|
18
|
-
strokeWidth:
|
|
19
|
-
withBackdrop:
|
|
22
|
+
width: t = 100,
|
|
23
|
+
height: n = 40,
|
|
24
|
+
strokeWidth: a = 1.5,
|
|
25
|
+
withBackdrop: s = !0,
|
|
20
26
|
inverted: i = !1,
|
|
21
27
|
className: l,
|
|
22
|
-
ariaLabel:
|
|
23
|
-
surface:
|
|
28
|
+
ariaLabel: r,
|
|
29
|
+
surface: o
|
|
24
30
|
}) {
|
|
25
|
-
const
|
|
31
|
+
const c = k(), f = d(null), p = x(o, e, "chart", f), g = $(e, t, n), u = [
|
|
26
32
|
"aegis-sparkline",
|
|
27
33
|
i ? "aegis-sparkline--inverted" : "",
|
|
28
|
-
|
|
34
|
+
s ? "aegis-sparkline--backdrop" : "",
|
|
29
35
|
l ?? ""
|
|
30
36
|
].filter(Boolean).join(" ");
|
|
31
37
|
return /* @__PURE__ */ m(
|
|
32
38
|
"span",
|
|
33
39
|
{
|
|
34
|
-
ref:
|
|
35
|
-
className:
|
|
36
|
-
"aria-label":
|
|
40
|
+
ref: f,
|
|
41
|
+
className: u,
|
|
42
|
+
"aria-label": r ?? c.sparkline,
|
|
37
43
|
role: "img",
|
|
38
|
-
...
|
|
44
|
+
...p,
|
|
39
45
|
children: /* @__PURE__ */ m(
|
|
40
46
|
"svg",
|
|
41
47
|
{
|
|
42
|
-
viewBox: `0 0 ${
|
|
48
|
+
viewBox: `0 0 ${t} ${n}`,
|
|
43
49
|
preserveAspectRatio: "none",
|
|
44
50
|
className: "aegis-sparkline__svg",
|
|
45
51
|
children: /* @__PURE__ */ m(
|
|
46
52
|
"path",
|
|
47
53
|
{
|
|
48
|
-
d:
|
|
54
|
+
d: g,
|
|
49
55
|
className: "aegis-sparkline__line",
|
|
50
|
-
strokeWidth:
|
|
56
|
+
strokeWidth: a
|
|
51
57
|
}
|
|
52
58
|
)
|
|
53
59
|
}
|
|
@@ -56,6 +62,6 @@ function _({
|
|
|
56
62
|
);
|
|
57
63
|
}
|
|
58
64
|
export {
|
|
59
|
-
|
|
65
|
+
b as SparkLine
|
|
60
66
|
};
|
|
61
67
|
//# sourceMappingURL=SparkLine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SparkLine.js","sources":["../../../src/components/ui/SparkLine.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './SparkLine.css';\n\nexport type SparkLineSurface = PrimitiveSurface<number[]>;\n\ninterface SparkLineProps {\n
|
|
1
|
+
{"version":3,"file":"SparkLine.js","sources":["../../../src/components/ui/SparkLine.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useStrings } from '../../locale';\nimport './SparkLine.css';\n\nexport type SparkLineSurface = PrimitiveSurface<number[]>;\n\ninterface SparkLineProps {\n /**\n * Sample values, spread evenly across the width. A series that does not\n * vary, a single value included, draws a level line through the middle.\n */\n points: number[];\n /** Display dimensions (defaults give a strip-style sparkline). */\n width?: number;\n height?: number;\n /** Stroke thickness. */\n strokeWidth?: number;\n /** Gradient backdrop (panel → page). */\n withBackdrop?: boolean;\n /** Use white stroke for inverted panels. */\n inverted?: boolean;\n className?: string;\n ariaLabel?: string;\n surface?: SparkLineSurface;\n}\n\nfunction buildPath(points: number[], w: number, h: number): string {\n if (points.length === 0) {\n return '';\n }\n const min = Math.min(...points);\n const range = Math.max(...points) - min;\n const yOf = (p: number): number =>\n range === 0 ? h / 2 : h - ((p - min) / range) * h;\n if (points.length === 1) {\n const y = yOf(points[0]).toFixed(2);\n return `M0,${y} L${w.toFixed(2)},${y}`;\n }\n const step = w / (points.length - 1);\n return points\n .map((p, i) => {\n const x = i * step;\n return `${i === 0 ? 'M' : 'L'}${x.toFixed(2)},${yOf(p).toFixed(2)}`;\n })\n .join(' ');\n}\n\nexport function SparkLine({\n points,\n width = 100,\n height = 40,\n strokeWidth = 1.5,\n withBackdrop = true,\n inverted = false,\n className,\n ariaLabel,\n surface,\n}: SparkLineProps) {\n const strings = useStrings();\n const wrapRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(surface, points, 'chart', wrapRef);\n const path = buildPath(points, width, height);\n const cls = [\n 'aegis-sparkline',\n inverted ? 'aegis-sparkline--inverted' : '',\n withBackdrop ? 'aegis-sparkline--backdrop' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <span\n ref={wrapRef}\n className={cls}\n aria-label={ariaLabel ?? strings.sparkline}\n role=\"img\"\n {...agentAttrs}\n >\n <svg\n viewBox={`0 0 ${width} ${height}`}\n preserveAspectRatio=\"none\"\n className=\"aegis-sparkline__svg\"\n >\n <path\n d={path}\n className=\"aegis-sparkline__line\"\n strokeWidth={strokeWidth}\n />\n </svg>\n </span>\n );\n}\n"],"names":["buildPath","points","w","h","min","range","yOf","p","y","step","i","x","SparkLine","width","height","strokeWidth","withBackdrop","inverted","className","ariaLabel","surface","strings","useStrings","wrapRef","useRef","agentAttrs","usePrimitiveSurface","path","cls","jsx"],"mappings":";;;;;AA+BA,SAASA,EAAUC,GAAkBC,GAAWC,GAAmB;AACjE,MAAIF,EAAO,WAAW;AACpB,WAAO;AAET,QAAMG,IAAM,KAAK,IAAI,GAAGH,CAAM,GACxBI,IAAQ,KAAK,IAAI,GAAGJ,CAAM,IAAIG,GAC9BE,IAAM,CAACC,MACXF,MAAU,IAAIF,IAAI,IAAIA,KAAMI,IAAIH,KAAOC,IAASF;AAClD,MAAIF,EAAO,WAAW,GAAG;AACvB,UAAMO,IAAIF,EAAIL,EAAO,CAAC,CAAC,EAAE,QAAQ,CAAC;AAClC,WAAO,MAAMO,CAAC,KAAKN,EAAE,QAAQ,CAAC,CAAC,IAAIM,CAAC;AAAA,EACtC;AACA,QAAMC,IAAOP,KAAKD,EAAO,SAAS;AAClC,SAAOA,EACJ,IAAI,CAACM,GAAGG,MAAM;AACb,UAAMC,IAAID,IAAID;AACd,WAAO,GAAGC,MAAM,IAAI,MAAM,GAAG,GAAGC,EAAE,QAAQ,CAAC,CAAC,IAAIL,EAAIC,CAAC,EAAE,QAAQ,CAAC,CAAC;AAAA,EACnE,CAAC,EACA,KAAK,GAAG;AACb;AAEO,SAASK,EAAU;AAAA,EACxB,QAAAX;AAAA,EACA,OAAAY,IAAQ;AAAA,EACR,QAAAC,IAAS;AAAA,EACT,aAAAC,IAAc;AAAA,EACd,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,WAAAC;AAAA,EACA,SAAAC;AACF,GAAmB;AACjB,QAAMC,IAAUC,EAAA,GACVC,IAAUC,EAAwB,IAAI,GACtCC,IAAaC,EAAoBN,GAASnB,GAAQ,SAASsB,CAAO,GAClEI,IAAO3B,EAAUC,GAAQY,GAAOC,CAAM,GACtCc,IAAM;AAAA,IACV;AAAA,IACAX,IAAW,8BAA8B;AAAA,IACzCD,IAAe,8BAA8B;AAAA,IAC7CE,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SACE,gBAAAW;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,KAAKN;AAAA,MACL,WAAWK;AAAA,MACX,cAAYT,KAAaE,EAAQ;AAAA,MACjC,MAAK;AAAA,MACJ,GAAGI;AAAA,MAEJ,UAAA,gBAAAI;AAAA,QAAC;AAAA,QAAA;AAAA,UACC,SAAS,OAAOhB,CAAK,IAAIC,CAAM;AAAA,UAC/B,qBAAoB;AAAA,UACpB,WAAU;AAAA,UAEV,UAAA,gBAAAe;AAAA,YAAC;AAAA,YAAA;AAAA,cACC,GAAGF;AAAA,cACH,WAAU;AAAA,cACV,aAAAZ;AAAA,YAAA;AAAA,UAAA;AAAA,QACF;AAAA,MAAA;AAAA,IACF;AAAA,EAAA;AAGN;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),u=require("react"),j=require("../../agent/core/usePrimitiveSurface.cjs"),q=require("../../hooks/useIsomorphicLayoutEffect.cjs"),d=require("./MetricLabel.cjs"),x=require("./RollingValue.cjs");;/* empty css */const R="--aegis-stat-count-progress",N="(prefers-reduced-motion: reduce)";function y(n,e,t){const[s,l]=u.useState(!1),[m,a]=u.useState(0);return q.useIsomorphicLayoutEffect(()=>{e&&!window.matchMedia(N).matches&&l(!0)},[e]),u.useEffect(()=>{const f=t.current;if(!s||f===null)return;let i=0;const c=()=>{const o=Number.parseFloat(getComputedStyle(f).getPropertyValue(R));o<1?(a(o),i=requestAnimationFrame(c)):l(!1)};return i=requestAnimationFrame(c),()=>{cancelAnimationFrame(i)}},[s,t]),{counting:s,current:s?n*m:n}}function b({label:n,value:e,unit:t,direction:s="horizontal",emphasized:l=!1,animateValue:m=!1,inverted:a=!1,className:f,surface:i}){const c=u.useRef(null),o=u.useRef(null),S=j.usePrimitiveSurface(i,{label:n,value:e,unit:t},"metric",c),g=typeof e=="number",{counting:p,current:h}=y(g?e:0,m&&g,o),_=["aegis-stat",`aegis-stat--${s}`,l?"aegis-stat--emphasized":"",p?"aegis-stat--counting":"",a?"aegis-stat--inverted":"",f??""].filter(Boolean).join(" ");return r.jsxs("div",{ref:c,className:_,...S,children:[r.jsx(d.MetricLabel,{inverted:a,className:"aegis-stat__label",children:n}),r.jsxs("span",{className:"aegis-stat__measure",children:[r.jsx("span",{ref:o,className:"aegis-stat__value",children:p?h.toFixed((String(e).split(".")[1]??"").length):r.jsx(x.RollingValue,{value:e})}),t&&r.jsx(d.MetricLabel,{inverted:a,className:"aegis-stat__unit",children:t})]})]})}exports.StatBlock=b;
|
|
2
2
|
//# sourceMappingURL=StatBlock.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatBlock.cjs","sources":["../../../src/components/ui/StatBlock.tsx"],"sourcesContent":["import {\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { MetricLabel } from './MetricLabel';\nimport './StatBlock.css';\n\nexport type StatBlockSurface = PrimitiveSurface<{\n label: ReactNode;\n value: ReactNode;\n unit?: ReactNode;\n}>;\n\ninterface StatBlockProps {\n label: ReactNode;\n value: ReactNode;\n /** Optional unit displayed after the value. */\n unit?: ReactNode;\n /** Layout direction. Default: horizontal (label · value, baseline). */\n direction?: 'horizontal' | 'vertical';\n /** Value in the number type role instead of the numeric role. */\n emphasized?: boolean;\n /**\n * When `value` is a number, counts it up from 0 once on mount over\n * `--motion-chart`, keeping its decimal places. Shows the final value at\n * once under prefers-reduced-motion.\n */\n animateValue?: boolean;\n inverted?: boolean;\n className?: string;\n surface?: StatBlockSurface;\n}\n\nconst COUNT_PROGRESS = '--aegis-stat-count-progress';\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * Counts from 0 to `target` once, on mount. The pace comes from the CSS\n * animation of COUNT_PROGRESS on `valueRef` (timed by `--motion-chart`\n * while `counting` is true); the count ends when that progress reads 1.\n * The first render shows `target`, so a prerendered page carries the real\n * number; the count starts before the browser paints.\n */\nfunction useStatCountUp(\n target: number,\n enabled: boolean,\n valueRef: RefObject<HTMLSpanElement | null>,\n): { counting: boolean; current: number } {\n const [counting, setCounting] = useState(false);\n const [progress, setProgress] = useState(0);\n\n useIsomorphicLayoutEffect(() => {\n if (enabled && !window.matchMedia(REDUCED_MOTION).matches) {\n setCounting(true);\n }\n }, [enabled]);\n\n useEffect(() => {\n const node = valueRef.current;\n if (!counting || node === null) {\n return undefined;\n }\n let frame = 0;\n const step = (): void => {\n const next = Number.parseFloat(\n getComputedStyle(node).getPropertyValue(COUNT_PROGRESS),\n );\n if (next < 1) {\n setProgress(next);\n frame = requestAnimationFrame(step);\n } else {\n setCounting(false);\n }\n };\n frame = requestAnimationFrame(step);\n return () => {\n cancelAnimationFrame(frame);\n };\n }, [counting, valueRef]);\n\n return { counting, current: counting ? target * progress : target };\n}\n\nexport function StatBlock({\n label,\n value,\n unit,\n direction = 'horizontal',\n emphasized = false,\n animateValue = false,\n inverted = false,\n className,\n surface,\n}: StatBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const valueRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { label, value, unit },\n 'metric',\n wrapRef,\n );\n const numeric = typeof value === 'number';\n const { counting, current } = useStatCountUp(\n numeric ? value : 0,\n animateValue && numeric,\n valueRef,\n );\n const
|
|
1
|
+
{"version":3,"file":"StatBlock.cjs","sources":["../../../src/components/ui/StatBlock.tsx"],"sourcesContent":["import {\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { MetricLabel } from './MetricLabel';\nimport { RollingValue } from './RollingValue';\nimport './StatBlock.css';\n\nexport type StatBlockSurface = PrimitiveSurface<{\n label: ReactNode;\n value: ReactNode;\n unit?: ReactNode;\n}>;\n\ninterface StatBlockProps {\n label: ReactNode;\n value: ReactNode;\n /** Optional unit displayed after the value. */\n unit?: ReactNode;\n /** Layout direction. Default: horizontal (label · value, baseline). */\n direction?: 'horizontal' | 'vertical';\n /** Value in the number type role instead of the numeric role. */\n emphasized?: boolean;\n /**\n * When `value` is a number, counts it up from 0 once on mount over\n * `--motion-chart`, keeping its decimal places. Shows the final value at\n * once under prefers-reduced-motion.\n */\n animateValue?: boolean;\n inverted?: boolean;\n className?: string;\n surface?: StatBlockSurface;\n}\n\nconst COUNT_PROGRESS = '--aegis-stat-count-progress';\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * Counts from 0 to `target` once, on mount. The pace comes from the CSS\n * animation of COUNT_PROGRESS on `valueRef` (timed by `--motion-chart`\n * while `counting` is true); the count ends when that progress reads 1.\n * The first render shows `target`, so a prerendered page carries the real\n * number; the count starts before the browser paints.\n */\nfunction useStatCountUp(\n target: number,\n enabled: boolean,\n valueRef: RefObject<HTMLSpanElement | null>,\n): { counting: boolean; current: number } {\n const [counting, setCounting] = useState(false);\n const [progress, setProgress] = useState(0);\n\n useIsomorphicLayoutEffect(() => {\n if (enabled && !window.matchMedia(REDUCED_MOTION).matches) {\n setCounting(true);\n }\n }, [enabled]);\n\n useEffect(() => {\n const node = valueRef.current;\n if (!counting || node === null) {\n return undefined;\n }\n let frame = 0;\n const step = (): void => {\n const next = Number.parseFloat(\n getComputedStyle(node).getPropertyValue(COUNT_PROGRESS),\n );\n if (next < 1) {\n setProgress(next);\n frame = requestAnimationFrame(step);\n } else {\n setCounting(false);\n }\n };\n frame = requestAnimationFrame(step);\n return () => {\n cancelAnimationFrame(frame);\n };\n }, [counting, valueRef]);\n\n return { counting, current: counting ? target * progress : target };\n}\n\nexport function StatBlock({\n label,\n value,\n unit,\n direction = 'horizontal',\n emphasized = false,\n animateValue = false,\n inverted = false,\n className,\n surface,\n}: StatBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const valueRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { label, value, unit },\n 'metric',\n wrapRef,\n );\n const numeric = typeof value === 'number';\n const { counting, current } = useStatCountUp(\n numeric ? value : 0,\n animateValue && numeric,\n valueRef,\n );\n const cls = [\n 'aegis-stat',\n `aegis-stat--${direction}`,\n emphasized ? 'aegis-stat--emphasized' : '',\n counting ? 'aegis-stat--counting' : '',\n inverted ? 'aegis-stat--inverted' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <MetricLabel inverted={inverted} className=\"aegis-stat__label\">\n {label}\n </MetricLabel>\n <span className=\"aegis-stat__measure\">\n <span ref={valueRef} className=\"aegis-stat__value\">\n {counting ? (\n current.toFixed((String(value).split('.')[1] ?? '').length)\n ) : (\n <RollingValue value={value} />\n )}\n </span>\n {unit && (\n <MetricLabel inverted={inverted} className=\"aegis-stat__unit\">\n {unit}\n </MetricLabel>\n )}\n </span>\n </div>\n );\n}\n"],"names":["COUNT_PROGRESS","REDUCED_MOTION","useStatCountUp","target","enabled","valueRef","counting","setCounting","useState","progress","setProgress","useIsomorphicLayoutEffect","useEffect","node","frame","step","next","StatBlock","label","value","unit","direction","emphasized","animateValue","inverted","className","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","numeric","current","cls","jsx","MetricLabel","jsxs","RollingValue"],"mappings":"mVA2CA,MAAMA,EAAiB,8BACjBC,EAAiB,mCASvB,SAASC,EACPC,EACAC,EACAC,EACwC,CACxC,KAAM,CAACC,EAAUC,CAAW,EAAIC,EAAAA,SAAS,EAAK,EACxC,CAACC,EAAUC,CAAW,EAAIF,EAAAA,SAAS,CAAC,EAE1CG,OAAAA,EAAAA,0BAA0B,IAAM,CAC1BP,GAAW,CAAC,OAAO,WAAWH,CAAc,EAAE,SAChDM,EAAY,EAAI,CAEpB,EAAG,CAACH,CAAO,CAAC,EAEZQ,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAOR,EAAS,QACtB,GAAI,CAACC,GAAYO,IAAS,KACxB,OAEF,IAAIC,EAAQ,EACZ,MAAMC,EAAO,IAAY,CACvB,MAAMC,EAAO,OAAO,WAClB,iBAAiBH,CAAI,EAAE,iBAAiBb,CAAc,CAAA,EAEpDgB,EAAO,GACTN,EAAYM,CAAI,EAChBF,EAAQ,sBAAsBC,CAAI,GAElCR,EAAY,EAAK,CAErB,EACA,OAAAO,EAAQ,sBAAsBC,CAAI,EAC3B,IAAM,CACX,qBAAqBD,CAAK,CAC5B,CACF,EAAG,CAACR,EAAUD,CAAQ,CAAC,EAEhB,CAAE,SAAAC,EAAU,QAASA,EAAWH,EAASM,EAAWN,CAAA,CAC7D,CAEO,SAASc,EAAU,CACxB,MAAAC,EACA,MAAAC,EACA,KAAAC,EACA,UAAAC,EAAY,aACZ,WAAAC,EAAa,GACb,aAAAC,EAAe,GACf,SAAAC,EAAW,GACX,UAAAC,EACA,QAAAC,CACF,EAAmB,CACjB,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrCvB,EAAWuB,EAAAA,OAAwB,IAAI,EACvCC,EAAaC,EAAAA,oBACjBJ,EACA,CAAE,MAAAR,EAAO,MAAAC,EAAO,KAAAC,CAAA,EAChB,SACAO,CAAA,EAEII,EAAU,OAAOZ,GAAU,SAC3B,CAAE,SAAAb,EAAU,QAAA0B,CAAA,EAAY9B,EAC5B6B,EAAUZ,EAAQ,EAClBI,GAAgBQ,EAChB1B,CAAA,EAEI4B,EAAM,CACV,aACA,eAAeZ,CAAS,GACxBC,EAAa,yBAA2B,GACxChB,EAAW,uBAAyB,GACpCkB,EAAW,uBAAyB,GACpCC,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,cACG,MAAA,CAAI,IAAKE,EAAS,UAAWM,EAAM,GAAGJ,EACrC,SAAA,CAAAK,EAAAA,IAACC,EAAAA,YAAA,CAAY,SAAAX,EAAoB,UAAU,oBACxC,SAAAN,EACH,EACAkB,EAAAA,KAAC,OAAA,CAAK,UAAU,sBACd,SAAA,CAAAF,EAAAA,IAAC,OAAA,CAAK,IAAK7B,EAAU,UAAU,oBAC5B,SAAAC,EACC0B,EAAQ,SAAS,OAAOb,CAAK,EAAE,MAAM,GAAG,EAAE,CAAC,GAAK,IAAI,MAAM,EAE1De,EAAAA,IAACG,EAAAA,aAAA,CAAa,MAAAlB,CAAA,CAAc,CAAA,CAEhC,EACCC,GACCc,EAAAA,IAACC,EAAAA,YAAA,CAAY,SAAAX,EAAoB,UAAU,mBACxC,SAAAJ,CAAA,CACH,CAAA,CAAA,CAEJ,CAAA,EACF,CAEJ"}
|
|
@@ -1,22 +1,23 @@
|
|
|
1
1
|
import { jsxs as g, jsx as l } from "react/jsx-runtime";
|
|
2
|
-
import { useRef as d, useState as h, useEffect as
|
|
3
|
-
import { usePrimitiveSurface as
|
|
4
|
-
import { useIsomorphicLayoutEffect as
|
|
2
|
+
import { useRef as d, useState as h, useEffect as x } from "react";
|
|
3
|
+
import { usePrimitiveSurface as C } from "../../agent/core/usePrimitiveSurface.js";
|
|
4
|
+
import { useIsomorphicLayoutEffect as E } from "../../hooks/useIsomorphicLayoutEffect.js";
|
|
5
5
|
import { MetricLabel as _ } from "./MetricLabel.js";
|
|
6
|
+
import { RollingValue as F } from "./RollingValue.js";
|
|
6
7
|
/* empty css */
|
|
7
|
-
const
|
|
8
|
-
function
|
|
8
|
+
const y = "--aegis-stat-count-progress", A = "(prefers-reduced-motion: reduce)";
|
|
9
|
+
function O(r, t, e) {
|
|
9
10
|
const [s, c] = h(!1), [u, n] = h(0);
|
|
10
|
-
return
|
|
11
|
-
t && !window.matchMedia(
|
|
12
|
-
}, [t]),
|
|
11
|
+
return E(() => {
|
|
12
|
+
t && !window.matchMedia(A).matches && c(!0);
|
|
13
|
+
}, [t]), x(() => {
|
|
13
14
|
const m = e.current;
|
|
14
15
|
if (!s || m === null)
|
|
15
16
|
return;
|
|
16
17
|
let o = 0;
|
|
17
18
|
const a = () => {
|
|
18
19
|
const i = Number.parseFloat(
|
|
19
|
-
getComputedStyle(m).getPropertyValue(
|
|
20
|
+
getComputedStyle(m).getPropertyValue(y)
|
|
20
21
|
);
|
|
21
22
|
i < 1 ? (n(i), o = requestAnimationFrame(a)) : c(!1);
|
|
22
23
|
};
|
|
@@ -25,7 +26,7 @@ function A(r, t, e) {
|
|
|
25
26
|
};
|
|
26
27
|
}, [s, e]), { counting: s, current: s ? r * u : r };
|
|
27
28
|
}
|
|
28
|
-
function
|
|
29
|
+
function z({
|
|
29
30
|
label: r,
|
|
30
31
|
value: t,
|
|
31
32
|
unit: e,
|
|
@@ -36,16 +37,16 @@ function q({
|
|
|
36
37
|
className: m,
|
|
37
38
|
surface: o
|
|
38
39
|
}) {
|
|
39
|
-
const a = d(null), i = d(null), N =
|
|
40
|
+
const a = d(null), i = d(null), N = C(
|
|
40
41
|
o,
|
|
41
42
|
{ label: r, value: t, unit: e },
|
|
42
43
|
"metric",
|
|
43
44
|
a
|
|
44
|
-
), f = typeof t == "number", { counting: p, current: S } =
|
|
45
|
+
), f = typeof t == "number", { counting: p, current: S } = O(
|
|
45
46
|
f ? t : 0,
|
|
46
47
|
u && f,
|
|
47
48
|
i
|
|
48
|
-
),
|
|
49
|
+
), R = [
|
|
49
50
|
"aegis-stat",
|
|
50
51
|
`aegis-stat--${s}`,
|
|
51
52
|
c ? "aegis-stat--emphasized" : "",
|
|
@@ -53,15 +54,15 @@ function q({
|
|
|
53
54
|
n ? "aegis-stat--inverted" : "",
|
|
54
55
|
m ?? ""
|
|
55
56
|
].filter(Boolean).join(" ");
|
|
56
|
-
return /* @__PURE__ */ g("div", { ref: a, className:
|
|
57
|
+
return /* @__PURE__ */ g("div", { ref: a, className: R, ...N, children: [
|
|
57
58
|
/* @__PURE__ */ l(_, { inverted: n, className: "aegis-stat__label", children: r }),
|
|
58
59
|
/* @__PURE__ */ g("span", { className: "aegis-stat__measure", children: [
|
|
59
|
-
/* @__PURE__ */ l("span", { ref: i, className: "aegis-stat__value", children:
|
|
60
|
+
/* @__PURE__ */ l("span", { ref: i, className: "aegis-stat__value", children: p ? S.toFixed((String(t).split(".")[1] ?? "").length) : /* @__PURE__ */ l(F, { value: t }) }),
|
|
60
61
|
e && /* @__PURE__ */ l(_, { inverted: n, className: "aegis-stat__unit", children: e })
|
|
61
62
|
] })
|
|
62
63
|
] });
|
|
63
64
|
}
|
|
64
65
|
export {
|
|
65
|
-
|
|
66
|
+
z as StatBlock
|
|
66
67
|
};
|
|
67
68
|
//# sourceMappingURL=StatBlock.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatBlock.js","sources":["../../../src/components/ui/StatBlock.tsx"],"sourcesContent":["import {\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { MetricLabel } from './MetricLabel';\nimport './StatBlock.css';\n\nexport type StatBlockSurface = PrimitiveSurface<{\n label: ReactNode;\n value: ReactNode;\n unit?: ReactNode;\n}>;\n\ninterface StatBlockProps {\n label: ReactNode;\n value: ReactNode;\n /** Optional unit displayed after the value. */\n unit?: ReactNode;\n /** Layout direction. Default: horizontal (label · value, baseline). */\n direction?: 'horizontal' | 'vertical';\n /** Value in the number type role instead of the numeric role. */\n emphasized?: boolean;\n /**\n * When `value` is a number, counts it up from 0 once on mount over\n * `--motion-chart`, keeping its decimal places. Shows the final value at\n * once under prefers-reduced-motion.\n */\n animateValue?: boolean;\n inverted?: boolean;\n className?: string;\n surface?: StatBlockSurface;\n}\n\nconst COUNT_PROGRESS = '--aegis-stat-count-progress';\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * Counts from 0 to `target` once, on mount. The pace comes from the CSS\n * animation of COUNT_PROGRESS on `valueRef` (timed by `--motion-chart`\n * while `counting` is true); the count ends when that progress reads 1.\n * The first render shows `target`, so a prerendered page carries the real\n * number; the count starts before the browser paints.\n */\nfunction useStatCountUp(\n target: number,\n enabled: boolean,\n valueRef: RefObject<HTMLSpanElement | null>,\n): { counting: boolean; current: number } {\n const [counting, setCounting] = useState(false);\n const [progress, setProgress] = useState(0);\n\n useIsomorphicLayoutEffect(() => {\n if (enabled && !window.matchMedia(REDUCED_MOTION).matches) {\n setCounting(true);\n }\n }, [enabled]);\n\n useEffect(() => {\n const node = valueRef.current;\n if (!counting || node === null) {\n return undefined;\n }\n let frame = 0;\n const step = (): void => {\n const next = Number.parseFloat(\n getComputedStyle(node).getPropertyValue(COUNT_PROGRESS),\n );\n if (next < 1) {\n setProgress(next);\n frame = requestAnimationFrame(step);\n } else {\n setCounting(false);\n }\n };\n frame = requestAnimationFrame(step);\n return () => {\n cancelAnimationFrame(frame);\n };\n }, [counting, valueRef]);\n\n return { counting, current: counting ? target * progress : target };\n}\n\nexport function StatBlock({\n label,\n value,\n unit,\n direction = 'horizontal',\n emphasized = false,\n animateValue = false,\n inverted = false,\n className,\n surface,\n}: StatBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const valueRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { label, value, unit },\n 'metric',\n wrapRef,\n );\n const numeric = typeof value === 'number';\n const { counting, current } = useStatCountUp(\n numeric ? value : 0,\n animateValue && numeric,\n valueRef,\n );\n const
|
|
1
|
+
{"version":3,"file":"StatBlock.js","sources":["../../../src/components/ui/StatBlock.tsx"],"sourcesContent":["import {\n type ReactNode,\n type RefObject,\n useEffect,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useIsomorphicLayoutEffect } from '../../hooks/useIsomorphicLayoutEffect';\nimport { MetricLabel } from './MetricLabel';\nimport { RollingValue } from './RollingValue';\nimport './StatBlock.css';\n\nexport type StatBlockSurface = PrimitiveSurface<{\n label: ReactNode;\n value: ReactNode;\n unit?: ReactNode;\n}>;\n\ninterface StatBlockProps {\n label: ReactNode;\n value: ReactNode;\n /** Optional unit displayed after the value. */\n unit?: ReactNode;\n /** Layout direction. Default: horizontal (label · value, baseline). */\n direction?: 'horizontal' | 'vertical';\n /** Value in the number type role instead of the numeric role. */\n emphasized?: boolean;\n /**\n * When `value` is a number, counts it up from 0 once on mount over\n * `--motion-chart`, keeping its decimal places. Shows the final value at\n * once under prefers-reduced-motion.\n */\n animateValue?: boolean;\n inverted?: boolean;\n className?: string;\n surface?: StatBlockSurface;\n}\n\nconst COUNT_PROGRESS = '--aegis-stat-count-progress';\nconst REDUCED_MOTION = '(prefers-reduced-motion: reduce)';\n\n/**\n * Counts from 0 to `target` once, on mount. The pace comes from the CSS\n * animation of COUNT_PROGRESS on `valueRef` (timed by `--motion-chart`\n * while `counting` is true); the count ends when that progress reads 1.\n * The first render shows `target`, so a prerendered page carries the real\n * number; the count starts before the browser paints.\n */\nfunction useStatCountUp(\n target: number,\n enabled: boolean,\n valueRef: RefObject<HTMLSpanElement | null>,\n): { counting: boolean; current: number } {\n const [counting, setCounting] = useState(false);\n const [progress, setProgress] = useState(0);\n\n useIsomorphicLayoutEffect(() => {\n if (enabled && !window.matchMedia(REDUCED_MOTION).matches) {\n setCounting(true);\n }\n }, [enabled]);\n\n useEffect(() => {\n const node = valueRef.current;\n if (!counting || node === null) {\n return undefined;\n }\n let frame = 0;\n const step = (): void => {\n const next = Number.parseFloat(\n getComputedStyle(node).getPropertyValue(COUNT_PROGRESS),\n );\n if (next < 1) {\n setProgress(next);\n frame = requestAnimationFrame(step);\n } else {\n setCounting(false);\n }\n };\n frame = requestAnimationFrame(step);\n return () => {\n cancelAnimationFrame(frame);\n };\n }, [counting, valueRef]);\n\n return { counting, current: counting ? target * progress : target };\n}\n\nexport function StatBlock({\n label,\n value,\n unit,\n direction = 'horizontal',\n emphasized = false,\n animateValue = false,\n inverted = false,\n className,\n surface,\n}: StatBlockProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const valueRef = useRef<HTMLSpanElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { label, value, unit },\n 'metric',\n wrapRef,\n );\n const numeric = typeof value === 'number';\n const { counting, current } = useStatCountUp(\n numeric ? value : 0,\n animateValue && numeric,\n valueRef,\n );\n const cls = [\n 'aegis-stat',\n `aegis-stat--${direction}`,\n emphasized ? 'aegis-stat--emphasized' : '',\n counting ? 'aegis-stat--counting' : '',\n inverted ? 'aegis-stat--inverted' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <MetricLabel inverted={inverted} className=\"aegis-stat__label\">\n {label}\n </MetricLabel>\n <span className=\"aegis-stat__measure\">\n <span ref={valueRef} className=\"aegis-stat__value\">\n {counting ? (\n current.toFixed((String(value).split('.')[1] ?? '').length)\n ) : (\n <RollingValue value={value} />\n )}\n </span>\n {unit && (\n <MetricLabel inverted={inverted} className=\"aegis-stat__unit\">\n {unit}\n </MetricLabel>\n )}\n </span>\n </div>\n );\n}\n"],"names":["COUNT_PROGRESS","REDUCED_MOTION","useStatCountUp","target","enabled","valueRef","counting","setCounting","useState","progress","setProgress","useIsomorphicLayoutEffect","useEffect","node","frame","step","next","StatBlock","label","value","unit","direction","emphasized","animateValue","inverted","className","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","numeric","current","cls","jsx","MetricLabel","jsxs","RollingValue"],"mappings":";;;;;;;AA2CA,MAAMA,IAAiB,+BACjBC,IAAiB;AASvB,SAASC,EACPC,GACAC,GACAC,GACwC;AACxC,QAAM,CAACC,GAAUC,CAAW,IAAIC,EAAS,EAAK,GACxC,CAACC,GAAUC,CAAW,IAAIF,EAAS,CAAC;AAE1C,SAAAG,EAA0B,MAAM;AAC9B,IAAIP,KAAW,CAAC,OAAO,WAAWH,CAAc,EAAE,WAChDM,EAAY,EAAI;AAAA,EAEpB,GAAG,CAACH,CAAO,CAAC,GAEZQ,EAAU,MAAM;AACd,UAAMC,IAAOR,EAAS;AACtB,QAAI,CAACC,KAAYO,MAAS;AACxB;AAEF,QAAIC,IAAQ;AACZ,UAAMC,IAAO,MAAY;AACvB,YAAMC,IAAO,OAAO;AAAA,QAClB,iBAAiBH,CAAI,EAAE,iBAAiBb,CAAc;AAAA,MAAA;AAExD,MAAIgB,IAAO,KACTN,EAAYM,CAAI,GAChBF,IAAQ,sBAAsBC,CAAI,KAElCR,EAAY,EAAK;AAAA,IAErB;AACA,WAAAO,IAAQ,sBAAsBC,CAAI,GAC3B,MAAM;AACX,2BAAqBD,CAAK;AAAA,IAC5B;AAAA,EACF,GAAG,CAACR,GAAUD,CAAQ,CAAC,GAEhB,EAAE,UAAAC,GAAU,SAASA,IAAWH,IAASM,IAAWN,EAAA;AAC7D;AAEO,SAASc,EAAU;AAAA,EACxB,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,YAAAC,IAAa;AAAA,EACb,cAAAC,IAAe;AAAA,EACf,UAAAC,IAAW;AAAA,EACX,WAAAC;AAAA,EACA,SAAAC;AACF,GAAmB;AACjB,QAAMC,IAAUC,EAAuB,IAAI,GACrCvB,IAAWuB,EAAwB,IAAI,GACvCC,IAAaC;AAAA,IACjBJ;AAAA,IACA,EAAE,OAAAR,GAAO,OAAAC,GAAO,MAAAC,EAAA;AAAA,IAChB;AAAA,IACAO;AAAA,EAAA,GAEII,IAAU,OAAOZ,KAAU,UAC3B,EAAE,UAAAb,GAAU,SAAA0B,EAAA,IAAY9B;AAAA,IAC5B6B,IAAUZ,IAAQ;AAAA,IAClBI,KAAgBQ;AAAA,IAChB1B;AAAA,EAAA,GAEI4B,IAAM;AAAA,IACV;AAAA,IACA,eAAeZ,CAAS;AAAA,IACxBC,IAAa,2BAA2B;AAAA,IACxChB,IAAW,yBAAyB;AAAA,IACpCkB,IAAW,yBAAyB;AAAA,IACpCC,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,2BACG,OAAA,EAAI,KAAKE,GAAS,WAAWM,GAAM,GAAGJ,GACrC,UAAA;AAAA,IAAA,gBAAAK,EAACC,GAAA,EAAY,UAAAX,GAAoB,WAAU,qBACxC,UAAAN,GACH;AAAA,IACA,gBAAAkB,EAAC,QAAA,EAAK,WAAU,uBACd,UAAA;AAAA,MAAA,gBAAAF,EAAC,QAAA,EAAK,KAAK7B,GAAU,WAAU,qBAC5B,UAAAC,IACC0B,EAAQ,SAAS,OAAOb,CAAK,EAAE,MAAM,GAAG,EAAE,CAAC,KAAK,IAAI,MAAM,IAE1D,gBAAAe,EAACG,GAAA,EAAa,OAAAlB,EAAA,CAAc,EAAA,CAEhC;AAAA,MACCC,KACC,gBAAAc,EAACC,GAAA,EAAY,UAAAX,GAAoB,WAAU,oBACxC,UAAAJ,EAAA,CACH;AAAA,IAAA,EAAA,CAEJ;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.cjs","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n tone?: 'ink' | 'inverted' | 'warning' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":"
|
|
1
|
+
{"version":3,"file":"StatusDot.cjs","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed.\n */\n tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":"oJAaO,SAASA,EAAU,CACxB,MAAAC,EAAQ,GACR,KAAAC,EAAO,MACP,KAAAC,EAAO,EACP,UAAAC,CACF,EAAmB,CACjB,MAAMC,EAAM,CACV,mBACA,qBAAqBH,CAAI,GACzBD,EAAQ,0BAA4B,GACpCG,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEE,EAAAA,IAAC,OAAA,CACC,UAAWD,EACX,MAAO,CAAE,MAAOF,EAAM,OAAQA,CAAA,EAC9B,cAAY,MAAA,CAAA,CAGlB"}
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
interface StatusDotProps {
|
|
2
2
|
pulse?: boolean;
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Fill colour. `warning` is the anomaly red, for failures only; `caution`
|
|
5
|
+
* is `--ink-warn`, for what needs attention but has not failed.
|
|
6
|
+
*/
|
|
7
|
+
tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';
|
|
4
8
|
size?: number;
|
|
5
9
|
className?: string;
|
|
6
10
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"StatusDot.js","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n tone?: 'ink' | 'inverted' | 'warning' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":";;
|
|
1
|
+
{"version":3,"file":"StatusDot.js","sources":["../../../src/components/ui/StatusDot.tsx"],"sourcesContent":["import './StatusDot.css';\n\ninterface StatusDotProps {\n pulse?: boolean;\n /**\n * Fill colour. `warning` is the anomaly red, for failures only; `caution`\n * is `--ink-warn`, for what needs attention but has not failed.\n */\n tone?: 'ink' | 'inverted' | 'warning' | 'caution' | 'muted' | 'success';\n size?: number;\n className?: string;\n}\n\nexport function StatusDot({\n pulse = false,\n tone = 'ink',\n size = 6,\n className,\n}: StatusDotProps) {\n const cls = [\n 'aegis-status-dot',\n `aegis-status-dot--${tone}`,\n pulse ? 'aegis-status-dot--pulse' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <span\n className={cls}\n style={{ width: size, height: size }}\n aria-hidden=\"true\"\n />\n );\n}\n"],"names":["StatusDot","pulse","tone","size","className","cls","jsx"],"mappings":";;AAaO,SAASA,EAAU;AAAA,EACxB,OAAAC,IAAQ;AAAA,EACR,MAAAC,IAAO;AAAA,EACP,MAAAC,IAAO;AAAA,EACP,WAAAC;AACF,GAAmB;AACjB,QAAMC,IAAM;AAAA,IACV;AAAA,IACA,qBAAqBH,CAAI;AAAA,IACzBD,IAAQ,4BAA4B;AAAA,IACpCG,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,WAAWD;AAAA,MACX,OAAO,EAAE,OAAOF,GAAM,QAAQA,EAAA;AAAA,MAC9B,eAAY;AAAA,IAAA;AAAA,EAAA;AAGlB;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("@ant-design/icons");;/* empty css */const _=require("../../locale/useStrings.cjs");function h(t,a){return t<a?"complete":t===a?"current":"upcoming"}function j({items:t,current:a,onStepClick:r,ariaLabel:u,className:p}){const c=_.useStrings(),d=["aegis-steps",p??""].filter(Boolean).join(" ");return s.jsx("ol",{className:d,"aria-label":u,children:t.map((n,i)=>{const e=h(i,a),l=e!=="upcoming"?c.stepStatus(e):n.disabled===!0?c.stepStatus("unavailable"):void 0,o=s.jsxs(s.Fragment,{children:[s.jsx("span",{className:"aegis-steps__marker","aria-hidden":"true",children:e==="complete"?s.jsx(m.CheckOutlined,{}):i+1}),s.jsx("span",{className:"aegis-steps__hidden",children:`${String(i+1)}. `}),s.jsx("span",{className:"aegis-steps__label",children:n.label}),l!==void 0&&s.jsx("span",{className:"aegis-steps__hidden",children:` ${l}`})]}),g=r!==void 0&&e!=="current"&&n.disabled!==!0;return s.jsx("li",{className:`aegis-steps__item aegis-steps__item--${e}`,children:g?s.jsx("button",{type:"button",className:"aegis-steps__step",onClick:()=>{r(i)},children:o}):s.jsx("span",{className:"aegis-steps__step","aria-current":e==="current"?"step":void 0,children:o})},n.key)})})}exports.Steps=j;
|
|
2
|
+
//# sourceMappingURL=Steps.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.cjs","sources":["../../../src/components/ui/Steps.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { CheckOutlined } from '@ant-design/icons';\n\nimport { useStrings } from '../../locale';\nimport './Steps.css';\n\nexport interface StepsItem {\n key: string;\n label: ReactNode;\n /** Keeps the step from being clicked, e.g. a later step whose earlier steps are incomplete. */\n disabled?: boolean;\n}\n\ninterface StepsProps {\n items: StepsItem[];\n /** Index of the current step; the steps before it show as complete. */\n current: number;\n /** Makes every step but the current one a button that reports its index. */\n onStepClick?: (index: number) => void;\n /** Accessible name of the list, e.g. `Install steps`. */\n ariaLabel: string;\n className?: string;\n}\n\ntype StepState = 'complete' | 'current' | 'upcoming';\n\nfunction stepState(index: number, current: number): StepState {\n if (index < current) {\n return 'complete';\n }\n return index === current ? 'current' : 'upcoming';\n}\n\nexport function Steps({\n items,\n current,\n onStepClick,\n ariaLabel,\n className,\n}: StepsProps) {\n const strings = useStrings();\n const cls = ['aegis-steps', className ?? ''].filter(Boolean).join(' ');\n return (\n <ol className={cls} aria-label={ariaLabel}>\n {items.map((item, index) => {\n const state = stepState(index, current);\n // The state the marker shows, put into words for assistive tech.\n const spoken =\n state !== 'upcoming'\n ? strings.stepStatus(state)\n : item.disabled === true\n ? strings.stepStatus('unavailable')\n : undefined;\n const content = (\n <>\n <span className=\"aegis-steps__marker\" aria-hidden=\"true\">\n {state === 'complete' ? <CheckOutlined /> : index + 1}\n </span>\n <span className=\"aegis-steps__hidden\">{`${String(index + 1)}. `}</span>\n <span className=\"aegis-steps__label\">{item.label}</span>\n {spoken !== undefined && (\n <span className=\"aegis-steps__hidden\">{` ${spoken}`}</span>\n )}\n </>\n );\n const clickable =\n onStepClick !== undefined &&\n state !== 'current' &&\n item.disabled !== true;\n return (\n <li\n key={item.key}\n className={`aegis-steps__item aegis-steps__item--${state}`}\n >\n {clickable ? (\n <button\n type=\"button\"\n className=\"aegis-steps__step\"\n onClick={() => {\n onStepClick(index);\n }}\n >\n {content}\n </button>\n ) : (\n <span\n className=\"aegis-steps__step\"\n aria-current={state === 'current' ? 'step' : undefined}\n >\n {content}\n </span>\n )}\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["stepState","index","current","Steps","items","onStepClick","ariaLabel","className","strings","useStrings","cls","jsx","item","state","spoken","content","jsxs","Fragment","CheckOutlined","clickable"],"mappings":"8NA2BA,SAASA,EAAUC,EAAeC,EAA4B,CAC5D,OAAID,EAAQC,EACH,WAEFD,IAAUC,EAAU,UAAY,UACzC,CAEO,SAASC,EAAM,CACpB,MAAAC,EACA,QAAAF,EACA,YAAAG,EACA,UAAAC,EACA,UAAAC,CACF,EAAe,CACb,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EAAM,CAAC,cAAeH,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EACrE,OACEI,EAAAA,IAAC,KAAA,CAAG,UAAWD,EAAK,aAAYJ,EAC7B,SAAAF,EAAM,IAAI,CAACQ,EAAMX,IAAU,CAC1B,MAAMY,EAAQb,EAAUC,EAAOC,CAAO,EAEhCY,EACJD,IAAU,WACNL,EAAQ,WAAWK,CAAK,EACxBD,EAAK,WAAa,GAChBJ,EAAQ,WAAW,aAAa,EAChC,OACFO,EACJC,EAAAA,KAAAC,EAAAA,SAAA,CACE,SAAA,CAAAN,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAsB,cAAY,OAC/C,SAAAE,IAAU,WAAaF,EAAAA,IAACO,EAAAA,cAAA,CAAA,CAAc,EAAKjB,EAAQ,EACtD,EACAU,EAAAA,IAAC,QAAK,UAAU,sBAAuB,YAAG,OAAOV,EAAQ,CAAC,CAAC,IAAA,CAAK,EAChEU,EAAAA,IAAC,OAAA,CAAK,UAAU,qBAAsB,WAAK,MAAM,EAChDG,IAAW,QACVH,MAAC,OAAA,CAAK,UAAU,sBAAuB,SAAA,IAAIG,CAAM,EAAA,CAAG,CAAA,EAExD,EAEIK,EACJd,IAAgB,QAChBQ,IAAU,WACVD,EAAK,WAAa,GACpB,OACED,EAAAA,IAAC,KAAA,CAEC,UAAW,wCAAwCE,CAAK,GAEvD,SAAAM,EACCR,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAU,oBACV,QAAS,IAAM,CACbN,EAAYJ,CAAK,CACnB,EAEC,SAAAc,CAAA,CAAA,EAGHJ,EAAAA,IAAC,OAAA,CACC,UAAU,oBACV,eAAcE,IAAU,UAAY,OAAS,OAE5C,SAAAE,CAAA,CAAA,CACH,EAnBGH,EAAK,GAAA,CAuBhB,CAAC,CAAA,CACH,CAEJ"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
export interface StepsItem {
|
|
3
|
+
key: string;
|
|
4
|
+
label: ReactNode;
|
|
5
|
+
/** Keeps the step from being clicked, e.g. a later step whose earlier steps are incomplete. */
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
}
|
|
8
|
+
interface StepsProps {
|
|
9
|
+
items: StepsItem[];
|
|
10
|
+
/** Index of the current step; the steps before it show as complete. */
|
|
11
|
+
current: number;
|
|
12
|
+
/** Makes every step but the current one a button that reports its index. */
|
|
13
|
+
onStepClick?: (index: number) => void;
|
|
14
|
+
/** Accessible name of the list, e.g. `Install steps`. */
|
|
15
|
+
ariaLabel: string;
|
|
16
|
+
className?: string;
|
|
17
|
+
}
|
|
18
|
+
export declare function Steps({ items, current, onStepClick, ariaLabel, className, }: StepsProps): import("react/jsx-runtime").JSX.Element;
|
|
19
|
+
export {};
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
import { jsx as s, jsxs as _, Fragment as g } from "react/jsx-runtime";
|
|
2
|
+
import { CheckOutlined as h } from "@ant-design/icons";
|
|
3
|
+
/* empty css */
|
|
4
|
+
import { useStrings as b } from "../../locale/useStrings.js";
|
|
5
|
+
function N(t, a) {
|
|
6
|
+
return t < a ? "complete" : t === a ? "current" : "upcoming";
|
|
7
|
+
}
|
|
8
|
+
function j({
|
|
9
|
+
items: t,
|
|
10
|
+
current: a,
|
|
11
|
+
onStepClick: i,
|
|
12
|
+
ariaLabel: p,
|
|
13
|
+
className: m
|
|
14
|
+
}) {
|
|
15
|
+
const c = b(), u = ["aegis-steps", m ?? ""].filter(Boolean).join(" ");
|
|
16
|
+
return /* @__PURE__ */ s("ol", { className: u, "aria-label": p, children: t.map((n, r) => {
|
|
17
|
+
const e = N(r, a), l = e !== "upcoming" ? c.stepStatus(e) : n.disabled === !0 ? c.stepStatus("unavailable") : void 0, o = /* @__PURE__ */ _(g, { children: [
|
|
18
|
+
/* @__PURE__ */ s("span", { className: "aegis-steps__marker", "aria-hidden": "true", children: e === "complete" ? /* @__PURE__ */ s(h, {}) : r + 1 }),
|
|
19
|
+
/* @__PURE__ */ s("span", { className: "aegis-steps__hidden", children: `${String(r + 1)}. ` }),
|
|
20
|
+
/* @__PURE__ */ s("span", { className: "aegis-steps__label", children: n.label }),
|
|
21
|
+
l !== void 0 && /* @__PURE__ */ s("span", { className: "aegis-steps__hidden", children: ` ${l}` })
|
|
22
|
+
] }), d = i !== void 0 && e !== "current" && n.disabled !== !0;
|
|
23
|
+
return /* @__PURE__ */ s(
|
|
24
|
+
"li",
|
|
25
|
+
{
|
|
26
|
+
className: `aegis-steps__item aegis-steps__item--${e}`,
|
|
27
|
+
children: d ? /* @__PURE__ */ s(
|
|
28
|
+
"button",
|
|
29
|
+
{
|
|
30
|
+
type: "button",
|
|
31
|
+
className: "aegis-steps__step",
|
|
32
|
+
onClick: () => {
|
|
33
|
+
i(r);
|
|
34
|
+
},
|
|
35
|
+
children: o
|
|
36
|
+
}
|
|
37
|
+
) : /* @__PURE__ */ s(
|
|
38
|
+
"span",
|
|
39
|
+
{
|
|
40
|
+
className: "aegis-steps__step",
|
|
41
|
+
"aria-current": e === "current" ? "step" : void 0,
|
|
42
|
+
children: o
|
|
43
|
+
}
|
|
44
|
+
)
|
|
45
|
+
},
|
|
46
|
+
n.key
|
|
47
|
+
);
|
|
48
|
+
}) });
|
|
49
|
+
}
|
|
50
|
+
export {
|
|
51
|
+
j as Steps
|
|
52
|
+
};
|
|
53
|
+
//# sourceMappingURL=Steps.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Steps.js","sources":["../../../src/components/ui/Steps.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { CheckOutlined } from '@ant-design/icons';\n\nimport { useStrings } from '../../locale';\nimport './Steps.css';\n\nexport interface StepsItem {\n key: string;\n label: ReactNode;\n /** Keeps the step from being clicked, e.g. a later step whose earlier steps are incomplete. */\n disabled?: boolean;\n}\n\ninterface StepsProps {\n items: StepsItem[];\n /** Index of the current step; the steps before it show as complete. */\n current: number;\n /** Makes every step but the current one a button that reports its index. */\n onStepClick?: (index: number) => void;\n /** Accessible name of the list, e.g. `Install steps`. */\n ariaLabel: string;\n className?: string;\n}\n\ntype StepState = 'complete' | 'current' | 'upcoming';\n\nfunction stepState(index: number, current: number): StepState {\n if (index < current) {\n return 'complete';\n }\n return index === current ? 'current' : 'upcoming';\n}\n\nexport function Steps({\n items,\n current,\n onStepClick,\n ariaLabel,\n className,\n}: StepsProps) {\n const strings = useStrings();\n const cls = ['aegis-steps', className ?? ''].filter(Boolean).join(' ');\n return (\n <ol className={cls} aria-label={ariaLabel}>\n {items.map((item, index) => {\n const state = stepState(index, current);\n // The state the marker shows, put into words for assistive tech.\n const spoken =\n state !== 'upcoming'\n ? strings.stepStatus(state)\n : item.disabled === true\n ? strings.stepStatus('unavailable')\n : undefined;\n const content = (\n <>\n <span className=\"aegis-steps__marker\" aria-hidden=\"true\">\n {state === 'complete' ? <CheckOutlined /> : index + 1}\n </span>\n <span className=\"aegis-steps__hidden\">{`${String(index + 1)}. `}</span>\n <span className=\"aegis-steps__label\">{item.label}</span>\n {spoken !== undefined && (\n <span className=\"aegis-steps__hidden\">{` ${spoken}`}</span>\n )}\n </>\n );\n const clickable =\n onStepClick !== undefined &&\n state !== 'current' &&\n item.disabled !== true;\n return (\n <li\n key={item.key}\n className={`aegis-steps__item aegis-steps__item--${state}`}\n >\n {clickable ? (\n <button\n type=\"button\"\n className=\"aegis-steps__step\"\n onClick={() => {\n onStepClick(index);\n }}\n >\n {content}\n </button>\n ) : (\n <span\n className=\"aegis-steps__step\"\n aria-current={state === 'current' ? 'step' : undefined}\n >\n {content}\n </span>\n )}\n </li>\n );\n })}\n </ol>\n );\n}\n"],"names":["stepState","index","current","Steps","items","onStepClick","ariaLabel","className","strings","useStrings","cls","jsx","item","state","spoken","content","jsxs","Fragment","CheckOutlined","clickable"],"mappings":";;;;AA2BA,SAASA,EAAUC,GAAeC,GAA4B;AAC5D,SAAID,IAAQC,IACH,aAEFD,MAAUC,IAAU,YAAY;AACzC;AAEO,SAASC,EAAM;AAAA,EACpB,OAAAC;AAAA,EACA,SAAAF;AAAA,EACA,aAAAG;AAAA,EACA,WAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAAUC,EAAA,GACVC,IAAM,CAAC,eAAeH,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AACrE,SACE,gBAAAI,EAAC,MAAA,EAAG,WAAWD,GAAK,cAAYJ,GAC7B,UAAAF,EAAM,IAAI,CAACQ,GAAMX,MAAU;AAC1B,UAAMY,IAAQb,EAAUC,GAAOC,CAAO,GAEhCY,IACJD,MAAU,aACNL,EAAQ,WAAWK,CAAK,IACxBD,EAAK,aAAa,KAChBJ,EAAQ,WAAW,aAAa,IAChC,QACFO,IACJ,gBAAAC,EAAAC,GAAA,EACE,UAAA;AAAA,MAAA,gBAAAN,EAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,UAAAE,MAAU,aAAa,gBAAAF,EAACO,GAAA,CAAA,CAAc,IAAKjB,IAAQ,GACtD;AAAA,MACA,gBAAAU,EAAC,UAAK,WAAU,uBAAuB,aAAG,OAAOV,IAAQ,CAAC,CAAC,KAAA,CAAK;AAAA,MAChE,gBAAAU,EAAC,QAAA,EAAK,WAAU,sBAAsB,YAAK,OAAM;AAAA,MAChDG,MAAW,UACV,gBAAAH,EAAC,QAAA,EAAK,WAAU,uBAAuB,UAAA,IAAIG,CAAM,GAAA,CAAG;AAAA,IAAA,GAExD,GAEIK,IACJd,MAAgB,UAChBQ,MAAU,aACVD,EAAK,aAAa;AACpB,WACE,gBAAAD;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAW,wCAAwCE,CAAK;AAAA,QAEvD,UAAAM,IACC,gBAAAR;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,MAAK;AAAA,YACL,WAAU;AAAA,YACV,SAAS,MAAM;AACb,cAAAN,EAAYJ,CAAK;AAAA,YACnB;AAAA,YAEC,UAAAc;AAAA,UAAA;AAAA,QAAA,IAGH,gBAAAJ;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,gBAAcE,MAAU,YAAY,SAAS;AAAA,YAE5C,UAAAE;AAAA,UAAA;AAAA,QAAA;AAAA,MACH;AAAA,MAnBGH,EAAK;AAAA,IAAA;AAAA,EAuBhB,CAAC,EAAA,CACH;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react/jsx-runtime"),f=require("react"),S=require("../../hooks/useSectionSpy.cjs");;/* empty css */const p=require("../../locale/useStrings.cjs"),h=25;function g(n){return n.map(s=>document.getElementById(s))}function x(n){const[s,a]=f.useState(0);return f.useEffect(()=>{const c=n.split(" ");let r=g(c);const l=new MutationObserver(()=>{const i=g(c);i.some((o,u)=>o!==r[u])&&(r=i,a(o=>o+1))});return l.observe(document.body,{childList:!0,subtree:!0}),()=>{l.disconnect()}},[n]),s}function C({items:n,currentId:s,onCurrentChange:a,scrollContainer:c=null,className:r}){const l=p.useStrings(),i=n.map(e=>e.id),o=x(i.join(" ")),{activeId:u,onLinkClick:_}=S.useSectionSpy({ids:i,activationPercent:h,currentId:s,onCurrentChange:a,scrollContainer:c,sectionsVersion:o}),v=["aegis-toc",r??""].filter(Boolean).join(" ");return t.jsx("nav",{"aria-label":l.tableOfContents,className:v,children:t.jsx("ol",{className:"aegis-toc__list",children:n.map(e=>{const d=e.id===u,b=e.level??1,j=["aegis-toc__link",d?"aegis-toc__link--current":"",b>1?`aegis-toc__link--level-${b}`:""].filter(Boolean).join(" ");return t.jsx("li",{children:t.jsxs("a",{href:`#${e.id}`,className:j,"aria-current":d?"location":void 0,onClick:m=>{_(m,e.id)},children:[t.jsx("span",{className:"aegis-toc__indicator","aria-hidden":"true"}),t.jsx("span",{className:"aegis-toc__label",children:e.label})]})},e.id)})})})}exports.TableOfContents=C;
|
|
2
2
|
//# sourceMappingURL=TableOfContents.cjs.map
|