@lincyaw/aegis-ui 0.9.4 → 0.10.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 +13 -3
- package/dist/agent/ask/AskPanel.js +130 -109
- 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 +2 -5
- 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/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/BlastRadiusBar.cjs +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
- package/dist/components/ui/BlastRadiusBar.d.ts +3 -1
- package/dist/components/ui/BlastRadiusBar.js +20 -17
- 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 +3 -3
- 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 +127 -150
- 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 +3 -1
- package/dist/components/ui/Checkbox.js +19 -17
- 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 +25 -0
- package/dist/components/ui/ChoiceCardGroup.js +44 -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 +5 -4
- package/dist/components/ui/CodeEditor.js +210 -63
- 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/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 +145 -120
- 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 +77 -0
- package/dist/components/ui/CommitGraph.js +380 -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 +40 -193
- 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 +134 -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/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 +87 -32
- 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 +66 -50
- package/dist/components/ui/DropdownMenu.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 +190 -164
- 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 +41 -64
- 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 +45 -42
- 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 +108 -128
- 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 +21 -19
- 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 +10 -1
- package/dist/components/ui/FormRow.js +22 -11
- 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 +16 -2
- package/dist/components/ui/InboxPage.js +54 -52
- 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 +56 -48
- 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 +8 -1
- package/dist/components/ui/MonoValue.js +15 -13
- 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 +15 -3
- package/dist/components/ui/NotificationBell.js +41 -39
- 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 +32 -0
- package/dist/components/ui/NumberField.js +77 -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 +38 -30
- 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.map +1 -1
- package/dist/components/ui/PageSizeSelect.d.ts +3 -4
- 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 +12 -2
- 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 +124 -118
- package/dist/components/ui/ParquetViewer.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 +9 -9
- 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.js +123 -107
- 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 +46 -38
- package/dist/components/ui/RegisterForm.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 +8 -2
- package/dist/components/ui/SavedQueryBar.js +162 -161
- 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/Select.cjs +1 -1
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.ts +1 -1
- package/dist/components/ui/Select.js +33 -32
- 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 +51 -2
- package/dist/components/ui/ServiceMap.js +314 -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 +22 -0
- package/dist/components/ui/Slider.js +53 -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 +30 -25
- 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 +57 -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/TextField.cjs +1 -1
- package/dist/components/ui/TextField.cjs.map +1 -1
- package/dist/components/ui/TextField.js +16 -15
- package/dist/components/ui/TextField.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/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 +93 -72
- 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 +56 -63
- 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 +9 -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 +39 -0
- package/dist/components/ui/classifyContent.js +169 -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/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/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/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 +49 -58
- 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 +4 -4
- 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 +149 -242
- 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/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 +23 -0
- package/dist/layouts/shell/RouteErrorBoundary.js +35 -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 +32 -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 +24 -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 +77 -65
- 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 +21 -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/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.js +4 -1
- 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 +2 -0
- package/dist/locale/strings.js +2 -0
- package/dist/locale/strings.js.map +1 -1
- package/dist/notifications/notificationContext.cjs.map +1 -1
- package/dist/notifications/notificationContext.d.ts +5 -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 +26 -20
- package/dist/theme/antdTheme.js.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.cjs.map +1 -1
- package/dist/transports/agentm/AgentmChannelProvider.d.ts +1 -0
- package/dist/transports/agentm/AgentmChannelProvider.js +119 -131
- package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
- package/dist/transports/agentm/agentmChannelClient.cjs +1 -1
- package/dist/transports/agentm/agentmChannelClient.cjs.map +1 -1
- package/dist/transports/agentm/agentmChannelClient.d.ts +8 -3
- package/dist/transports/agentm/agentmChannelClient.js +133 -89
- package/dist/transports/agentm/agentmChannelClient.js.map +1 -1
- package/dist/transports/index.d.ts +2 -2
- package/dist/transports/mcpBridge.cjs +2 -0
- package/dist/transports/mcpBridge.cjs.map +1 -0
- package/dist/transports/{bridge.d.ts → mcpBridge.d.ts} +2 -1
- package/dist/transports/mcpBridge.js +144 -0
- package/dist/transports/mcpBridge.js.map +1 -0
- package/dist/transports/mcpTools.cjs +2 -0
- package/dist/transports/mcpTools.cjs.map +1 -0
- package/dist/transports/mcpTools.d.ts +15 -0
- package/dist/transports/mcpTools.js +283 -0
- package/dist/transports/mcpTools.js.map +1 -0
- package/dist/transports.cjs +1 -1
- package/dist/transports.js +1 -1
- package/package.json +5 -4
- package/dist/agent/core/mcpToolCatalogue.cjs +0 -2
- package/dist/agent/core/mcpToolCatalogue.cjs.map +0 -1
- package/dist/agent/core/mcpToolCatalogue.d.ts +0 -2
- package/dist/agent/core/mcpToolCatalogue.js +0 -101
- package/dist/agent/core/mcpToolCatalogue.js.map +0 -1
- package/dist/components/ui/BucketCard.cjs +0 -2
- package/dist/components/ui/BucketCard.cjs.map +0 -1
- package/dist/components/ui/BucketCard.d.ts +0 -24
- package/dist/components/ui/BucketCard.js +0 -73
- package/dist/components/ui/BucketCard.js.map +0 -1
- package/dist/components/ui/ContentInspectorContent.cjs +0 -5
- package/dist/components/ui/ContentInspectorContent.cjs.map +0 -1
- package/dist/components/ui/ContentInspectorContent.d.ts +0 -14
- package/dist/components/ui/ContentInspectorContent.js +0 -101
- package/dist/components/ui/ContentInspectorContent.js.map +0 -1
- package/dist/components/ui/traceFormat.cjs +0 -2
- package/dist/components/ui/traceFormat.cjs.map +0 -1
- package/dist/components/ui/traceFormat.js +0 -11
- package/dist/components/ui/traceFormat.js.map +0 -1
- package/dist/layouts/shell/environments/EnvironmentContext.cjs +0 -2
- package/dist/layouts/shell/environments/EnvironmentContext.cjs.map +0 -1
- package/dist/layouts/shell/environments/EnvironmentContext.d.ts +0 -12
- package/dist/layouts/shell/environments/EnvironmentContext.js +0 -94
- package/dist/layouts/shell/environments/EnvironmentContext.js.map +0 -1
- package/dist/layouts/shell/environments/context.cjs.map +0 -1
- package/dist/layouts/shell/environments/context.d.ts +0 -6
- package/dist/layouts/shell/environments/context.js +0 -6
- package/dist/layouts/shell/environments/context.js.map +0 -1
- package/dist/layouts/shell/environments/hooks.cjs +0 -2
- package/dist/layouts/shell/environments/hooks.cjs.map +0 -1
- package/dist/layouts/shell/environments/hooks.js +0 -24
- package/dist/layouts/shell/environments/hooks.js.map +0 -1
- package/dist/layouts/shell/environments/manifest.cjs +0 -2
- package/dist/layouts/shell/environments/manifest.cjs.map +0 -1
- package/dist/layouts/shell/environments/manifest.d.ts +0 -26
- package/dist/layouts/shell/environments/manifest.js +0 -82
- package/dist/layouts/shell/environments/manifest.js.map +0 -1
- package/dist/transports/bridge.cjs +0 -2
- package/dist/transports/bridge.cjs.map +0 -1
- package/dist/transports/bridge.js +0 -143
- package/dist/transports/bridge.js.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ServiceMap.cjs","sources":["../../../src/components/ui/ServiceMap.tsx"],"sourcesContent":["// Service-map composition adapted from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/components/ServiceMap/ServiceMap.tsx\nimport { type CSSProperties, useCallback, useMemo } from 'react';\n\nimport {\n type EdgeLabel,\n type GraphLabel,\n type NodeLabel,\n layout as dagreLayout,\n graphlib,\n} from '@dagrejs/dagre';\nimport {\n Background,\n BackgroundVariant,\n Controls,\n type Edge,\n type EdgeProps,\n Handle,\n MiniMap,\n type Node,\n type NodeProps,\n Position,\n ReactFlow,\n ReactFlowProvider,\n} from '@xyflow/react';\n\nimport './ServiceMap.css';\n\nexport type ServiceMapStatus = 'ok' | 'warn' | 'error' | 'muted';\nexport type ServiceMapDirection = 'LR' | 'TB';\n\nexport interface ServiceMapNode {\n id: string;\n label: string;\n sublabel?: string;\n status?: ServiceMapStatus;\n badge?: number | string;\n data?: Record<string, unknown>;\n}\n\nexport interface ServiceMapEdge {\n id: string;\n source: string;\n target: string;\n label?: string;\n status?: ServiceMapStatus;\n}\n\nexport interface ServiceMapProps {\n nodes: ServiceMapNode[];\n edges: ServiceMapEdge[];\n direction?: ServiceMapDirection;\n height?: number;\n onNodeClick?: (node: ServiceMapNode) => void;\n onEdgeClick?: (edge: ServiceMapEdge) => void;\n selectedNodeId?: string;\n className?: string;\n}\n\ninterface ServiceNodeData extends Record<string, unknown> {\n node: ServiceMapNode;\n selected: boolean;\n}\n\ninterface ServiceEdgeData extends Record<string, unknown> {\n edge: ServiceMapEdge;\n}\n\nconst NODE_WIDTH = 180;\nconst NODE_HEIGHT = 64;\n\n// dagre lays nodes out at these sizes, so the CSS node box reads them too.\nconst NODE_SIZE_VARS = {\n '--aegis-service-map-node-w': `${String(NODE_WIDTH)}px`,\n '--aegis-service-map-node-h': `${String(NODE_HEIGHT)}px`,\n};\n\ninterface LayoutResult {\n nodes: Array<Node<ServiceNodeData>>;\n edges: Array<Edge<ServiceEdgeData>>;\n}\n\nfunction computeLayout(\n nodes: ServiceMapNode[],\n edges: ServiceMapEdge[],\n direction: ServiceMapDirection,\n selectedNodeId: string | undefined,\n): LayoutResult {\n const g = new graphlib.Graph<GraphLabel, NodeLabel, EdgeLabel>();\n g.setDefaultEdgeLabel(() => ({}));\n g.setGraph({\n rankdir: direction,\n nodesep: 40,\n ranksep: 80,\n marginx: 16,\n marginy: 16,\n });\n\n for (const n of nodes) {\n g.setNode(n.id, { width: NODE_WIDTH, height: NODE_HEIGHT });\n }\n for (const e of edges) {\n g.setEdge(e.source, e.target);\n }\n dagreLayout(g);\n\n const isHorizontal = direction === 'LR';\n const rfNodes: Array<Node<ServiceNodeData>> = nodes.map((n) => {\n const p = g.node(n.id) as { x?: number; y?: number } | undefined;\n return {\n id: n.id,\n type: 'service',\n position: {\n x: (p?.x ?? 0) - NODE_WIDTH / 2,\n y: (p?.y ?? 0) - NODE_HEIGHT / 2,\n },\n initialWidth: NODE_WIDTH,\n initialHeight: NODE_HEIGHT,\n data: { node: n, selected: selectedNodeId === n.id },\n sourcePosition: isHorizontal ? Position.Right : Position.Bottom,\n targetPosition: isHorizontal ? Position.Left : Position.Top,\n draggable: false,\n connectable: false,\n selectable: true,\n };\n });\n\n const rfEdges: Array<Edge<ServiceEdgeData>> = edges.map((e) => {\n const status = e.status ?? 'ok';\n return {\n id: e.id,\n source: e.source,\n target: e.target,\n type: 'service',\n data: { edge: e },\n label: e.label,\n className: `aegis-service-map__edge aegis-service-map__edge--${status}`,\n };\n });\n\n return { nodes: rfNodes, edges: rfEdges };\n}\n\nfunction ServiceNode({ data }: NodeProps<Node<ServiceNodeData>>): JSX.Element {\n const { node, selected } = data;\n const status = node.status ?? 'ok';\n return (\n <div\n className={[\n 'aegis-service-map__node',\n `aegis-service-map__node--${status}`,\n selected ? 'aegis-service-map__node--selected' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <Handle\n type=\"target\"\n position={Position.Left}\n className=\"aegis-service-map__handle\"\n />\n <span className=\"aegis-service-map__node-stripe\" aria-hidden=\"true\" />\n <div className=\"aegis-service-map__node-body\">\n <div className=\"aegis-service-map__node-label\">{node.label}</div>\n {node.sublabel !== undefined && (\n <div className=\"aegis-service-map__node-sublabel\">\n {node.sublabel}\n </div>\n )}\n </div>\n {node.badge !== undefined && node.badge !== '' && (\n <span\n className={`aegis-service-map__node-badge aegis-service-map__node-badge--${status}`}\n >\n {node.badge}\n </span>\n )}\n <Handle\n type=\"source\"\n position={Position.Right}\n className=\"aegis-service-map__handle\"\n />\n </div>\n );\n}\n\nfunction ServiceEdge(props: EdgeProps<Edge<ServiceEdgeData>>): JSX.Element {\n const { sourceX, sourceY, targetX, targetY, id, label, markerEnd, style } =\n props;\n const midX = (sourceX + targetX) / 2;\n const path = `M${sourceX},${sourceY} C${midX},${sourceY} ${midX},${targetY} ${targetX},${targetY}`;\n return (\n <>\n <path\n id={id}\n d={path}\n className=\"aegis-service-map__edge-path\"\n markerEnd={markerEnd}\n style={style}\n fill=\"none\"\n />\n {label !== undefined && label !== '' && (\n <text className=\"aegis-service-map__edge-label\">\n <textPath href={`#${id}`} startOffset=\"50%\" textAnchor=\"middle\">\n {label}\n </textPath>\n </text>\n )}\n </>\n );\n}\n\nconst NODE_TYPES = { service: ServiceNode };\nconst EDGE_TYPES = { service: ServiceEdge };\n\nfunction ServiceMapInner({\n nodes,\n edges,\n direction = 'LR',\n height,\n onNodeClick,\n onEdgeClick,\n selectedNodeId,\n className,\n}: ServiceMapProps): JSX.Element {\n const layoutKey = useMemo(\n () => JSON.stringify({ direction, nodes, edges, selectedNodeId }),\n [direction, nodes, edges, selectedNodeId],\n );\n const layout = useMemo(\n () => computeLayout(nodes, edges, direction, selectedNodeId),\n // Layout is keyed by the JSON-stringified inputs so structural-equality\n // changes recompute; including the raw arrays would re-run on every parent render.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [layoutKey],\n );\n\n const handleNodeClick = useCallback(\n (_: unknown, n: Node<ServiceNodeData>) => {\n onNodeClick?.(n.data.node);\n },\n [onNodeClick],\n );\n const handleEdgeClick = useCallback(\n (_: unknown, e: Edge<ServiceEdgeData>) => {\n if (e.data) {\n onEdgeClick?.(e.data.edge);\n }\n },\n [onEdgeClick],\n );\n\n const style = {\n ...NODE_SIZE_VARS,\n height: height === undefined ? undefined : `${String(height)}px`,\n } as CSSProperties;\n\n return (\n <div\n className={['aegis-service-map', className].filter(Boolean).join(' ')}\n style={style}\n >\n <ReactFlow\n nodes={layout.nodes}\n edges={layout.edges}\n nodeTypes={NODE_TYPES}\n edgeTypes={EDGE_TYPES}\n nodesDraggable={false}\n nodesConnectable={false}\n elementsSelectable\n panOnDrag\n zoomOnScroll\n fitView\n proOptions={{ hideAttribution: true }}\n onNodeClick={handleNodeClick}\n onEdgeClick={handleEdgeClick}\n >\n <Background variant={BackgroundVariant.Dots} gap={16} size={1} />\n <Controls showInteractive={false} position=\"top-left\" />\n <MiniMap pannable zoomable position=\"bottom-right\" />\n </ReactFlow>\n </div>\n );\n}\n\nexport function ServiceMap(props: ServiceMapProps): JSX.Element {\n return (\n <ReactFlowProvider>\n <ServiceMapInner {...props} />\n </ReactFlowProvider>\n );\n}\n"],"names":["NODE_WIDTH","NODE_HEIGHT","NODE_SIZE_VARS","computeLayout","nodes","edges","direction","selectedNodeId","g","graphlib","n","dagreLayout","isHorizontal","rfNodes","p","Position","rfEdges","status","ServiceNode","data","node","selected","jsxs","jsx","Handle","ServiceEdge","props","sourceX","sourceY","targetX","targetY","id","label","markerEnd","style","midX","path","Fragment","NODE_TYPES","EDGE_TYPES","ServiceMapInner","height","onNodeClick","onEdgeClick","className","layoutKey","useMemo","layout","handleNodeClick","useCallback","_","handleEdgeClick","e","ReactFlow","Background","BackgroundVariant","Controls","MiniMap","ServiceMap","ReactFlowProvider"],"mappings":"+NAoEA,MAAMA,EAAa,IACbC,EAAc,GAGdC,EAAiB,CACrB,6BAA8B,GAAG,OAAOF,CAAU,CAAC,KACnD,6BAA8B,GAAG,OAAOC,CAAW,CAAC,IACtD,EAOA,SAASE,EACPC,EACAC,EACAC,EACAC,EACc,CACd,MAAMC,EAAI,IAAIC,EAAAA,SAAS,MACvBD,EAAE,oBAAoB,KAAO,CAAA,EAAG,EAChCA,EAAE,SAAS,CACT,QAASF,EACT,QAAS,GACT,QAAS,GACT,QAAS,GACT,QAAS,EAAA,CACV,EAED,UAAWI,KAAKN,EACdI,EAAE,QAAQE,EAAE,GAAI,CAAE,MAAOV,EAAY,OAAQC,EAAa,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AAA,QAAA,CAAQ,SAAQ,GAAC,SAAQ,GAAC,SAAS,cAAA,CAAe,CAAA,CAAA,CAAA,CACrD,CAAA,CAGN,CAEO,SAASC,EAAWhC,EAAqC,CAC9D,aACGiC,oBAAA,CACC,SAAApC,EAAAA,IAACiB,EAAA,CAAiB,GAAGd,EAAO,EAC9B,CAEJ"}
|
|
1
|
+
{"version":3,"file":"ServiceMap.cjs","sources":["../../../src/components/ui/ServiceMap.tsx"],"sourcesContent":["// Service-map composition adapted from HyperDX (MIT, DeploySentinel Inc. 2023):\n// https://github.com/hyperdxio/hyperdx/blob/main/packages/app/src/components/ServiceMap/ServiceMap.tsx\nimport {\n type CSSProperties,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport {\n type EdgeLabel,\n type GraphLabel,\n type NodeLabel,\n layout as dagreLayout,\n graphlib,\n} from '@dagrejs/dagre';\nimport {\n Background,\n BackgroundVariant,\n Controls,\n type Edge,\n type EdgeProps,\n Handle,\n MiniMap,\n type Node,\n type NodeChange,\n type NodeProps,\n Position,\n ReactFlow,\n ReactFlowProvider,\n type XYPosition,\n getViewportForBounds,\n useReactFlow,\n useStore,\n useStoreApi,\n} from '@xyflow/react';\n\nimport { useMediaQuery } from '../../hooks/useMediaQuery';\nimport './ServiceMap.css';\nimport { StatusDot } from './StatusDot';\n\n/** `active` is work in progress, e.g. a running task: an ink stripe and a pulsing dot. */\nexport type ServiceMapStatus = 'ok' | 'active' | 'warn' | 'error' | 'muted';\nexport type ServiceMapDirection = 'LR' | 'TB';\n\nexport interface ServiceMapNode {\n id: string;\n label: string;\n sublabel?: string;\n status?: ServiceMapStatus;\n badge?: number | string;\n data?: Record<string, unknown>;\n}\n\n/**\n * A labelled box around some nodes, e.g. the tasks of one phase. Its id may\n * also be a node's id.\n */\nexport interface ServiceMapGroup {\n id: string;\n label: string;\n nodeIds: string[];\n}\n\n/** For assistive technology, a `group` named `<source label> → <target label>`. */\nexport interface ServiceMapEdge {\n id: string;\n source: string;\n target: string;\n label?: string;\n /** `active` is a node's state only. */\n status?: Exclude<ServiceMapStatus, 'active'>;\n}\n\nexport interface ServiceMapProps {\n nodes: ServiceMapNode[];\n edges: ServiceMapEdge[];\n /**\n * Boxes drawn around groups of nodes, e.g. the phases of a pipeline. The\n * groups follow one another along `direction` in the order given, each\n * laid out on its own; nodes in no group come after the last group. A\n * node belongs to the first group that lists it.\n */\n groups?: ServiceMapGroup[];\n direction?: ServiceMapDirection;\n /** Height in px. Default: the container's height, at least `--service-map-min-height`. */\n height?: number;\n /**\n * Fill the viewport's height below the shell header\n * (`--service-map-viewport-height`), for a page whose main view is the\n * map. At 768 px and below the map keeps its default height, so a touch\n * can still scroll the page past it. `height` overrides it.\n */\n fillViewport?: boolean;\n onNodeClick?: (node: ServiceMapNode) => void;\n onEdgeClick?: (edge: ServiceMapEdge) => void;\n /** Drawn inverted, and `aria-current` for assistive technology. */\n selectedNodeId?: string;\n /**\n * Opens at actual size on this node instead of fitting the whole map, and\n * again whenever it changes: fitted to the node and the nodes it has a\n * direct edge to or from when they fit at actual size, otherwise centred\n * on the node alone. Large maps stay readable when they open. An id that\n * is not on the map is ignored.\n */\n focusNodeId?: string;\n /**\n * Show the minimap in the bottom-right corner. A fit keeps its strip on\n * the right clear, so a map fitted whole opens with no node under it.\n * Default: shown unless `focusNodeId` is given, since a focused view runs\n * past every edge of the map and the minimap would cover nodes there. It\n * is not shown at 768 px and below.\n */\n minimap?: boolean;\n /**\n * The map's accessible name. Each node is a `group` named by its label;\n * a group's box is not.\n */\n ariaLabel?: string;\n className?: string;\n}\n\ninterface ServiceNodeData extends Record<string, unknown> {\n node: ServiceMapNode;\n selected: boolean;\n}\n\ninterface ServiceGroupData extends Record<string, unknown> {\n label: string;\n}\n\ntype ServiceFlowNode =\n | Node<ServiceNodeData, 'service'>\n | Node<ServiceGroupData, 'serviceGroup'>;\n\ninterface ServiceEdgeData extends Record<string, unknown> {\n edge: ServiceMapEdge;\n}\n\n/** A node is at least this size; it widens with its label up to NODE_MAX_WIDTH, then wraps it. */\nconst NODE_WIDTH = 180;\nconst NODE_HEIGHT = 64;\nconst NODE_MAX_WIDTH = 320;\n/** Room above a group's nodes for its label. */\nconst GROUP_LABEL_HEIGHT = 28;\n/** Space between consecutive groups along the direction. */\nconst GROUP_GAP = 64;\n\n// The layout reads these sizes, so the CSS node and group boxes read them too.\nconst SIZE_VARS = {\n '--aegis-service-map-node-w': `${String(NODE_WIDTH)}px`,\n '--aegis-service-map-node-h': `${String(NODE_HEIGHT)}px`,\n '--aegis-service-map-node-max-w': `${String(NODE_MAX_WIDTH)}px`,\n '--aegis-service-map-group-label-h': `${String(GROUP_LABEL_HEIGHT)}px`,\n};\n\ninterface Size {\n width: number;\n height: number;\n}\n\nconst DEFAULT_SIZE: Size = { width: NODE_WIDTH, height: NODE_HEIGHT };\n\n/** A stretch of the map laid out on its own: a group's nodes, or the nodes in no group. */\ninterface Part {\n group?: ServiceMapGroup;\n ids: string[];\n}\n\n/** What the layout and the fit read: the map without its nodes' and edges' content. */\ninterface MapShape {\n direction: ServiceMapDirection;\n ids: string[];\n /** The endpoints of each edge between two nodes on the map. */\n links: Array<[string, string]>;\n groups: ServiceMapGroup[];\n}\n\nfunction shapeOf(\n nodes: ServiceMapNode[],\n edges: ServiceMapEdge[],\n groups: ServiceMapGroup[],\n direction: ServiceMapDirection,\n): MapShape {\n const ids = nodes.map((n) => n.id);\n const present = new Set(ids);\n return {\n direction,\n ids,\n links: edges\n .filter((e) => present.has(e.source) && present.has(e.target))\n .map((e) => [e.source, e.target]),\n groups,\n };\n}\n\n/** Each group with the nodes it claims, in the order given, then the nodes in no group. */\nfunction partsOf(ids: string[], groups: ServiceMapGroup[]): Part[] {\n const present = new Set(ids);\n const claimed = new Set<string>();\n const grouped = groups.map((group) => {\n const ids = [...new Set(group.nodeIds)].filter(\n (id) => present.has(id) && !claimed.has(id),\n );\n ids.forEach((id) => claimed.add(id));\n return { group, ids };\n });\n const rest = ids.filter((id) => !claimed.has(id));\n return [...grouped, { ids: rest }].filter((part) => part.ids.length > 0);\n}\n\n/** Lays out one part with dagre: its nodes and the edges between them. Positions are top-left corners. */\nfunction layoutPart(\n ids: string[],\n links: MapShape['links'],\n direction: ServiceMapDirection,\n sizeOf: (id: string) => Size,\n): { positions: Map<string, XYPosition>; width: number; height: number } {\n const g = new graphlib.Graph<GraphLabel, NodeLabel, EdgeLabel>();\n g.setDefaultEdgeLabel(() => ({}));\n g.setGraph({\n rankdir: direction,\n nodesep: 40,\n ranksep: 80,\n marginx: 16,\n marginy: 16,\n });\n for (const id of ids) {\n g.setNode(id, { ...sizeOf(id) });\n }\n for (const [source, target] of links) {\n if (g.hasNode(source) && g.hasNode(target)) {\n g.setEdge(source, target);\n }\n }\n dagreLayout(g);\n const positions = new Map(\n ids.map((id) => {\n const { x = 0, y = 0 } = g.node(id) as { x?: number; y?: number };\n const size = sizeOf(id);\n return [id, { x: x - size.width / 2, y: y - size.height / 2 }];\n }),\n );\n const { width = 0, height = 0 } = g.graph();\n return { positions, width, height };\n}\n\ninterface MapLayout {\n /** The group boxes. */\n groups: ServiceFlowNode[];\n /** Each node's top-left corner. */\n positions: Map<string, XYPosition>;\n}\n\n/**\n * Lays the parts out one after another along the direction, each centred\n * across it, with dagre inside each part.\n */\nfunction computeLayout(\n shape: MapShape,\n sizes: ReadonlyMap<string, Size>,\n): MapLayout {\n const horizontal = shape.direction === 'LR';\n const parts = partsOf(shape.ids, shape.groups).map((part) => {\n const laid = layoutPart(part.ids, shape.links, shape.direction, (id) => {\n return sizes.get(id) ?? DEFAULT_SIZE;\n });\n const labelHeight = part.group === undefined ? 0 : GROUP_LABEL_HEIGHT;\n return {\n ...part,\n ...laid,\n labelHeight,\n boxHeight: laid.height + labelHeight,\n };\n });\n const across = Math.max(\n 0,\n ...parts.map((part) => (horizontal ? part.boxHeight : part.width)),\n );\n let along = 0;\n const placed = parts.map((part) => {\n const origin = horizontal\n ? { x: along, y: (across - part.boxHeight) / 2 }\n : { x: (across - part.width) / 2, y: along };\n along += (horizontal ? part.width : part.boxHeight) + GROUP_GAP;\n return { ...part, origin };\n });\n return {\n groups: placed.flatMap((part): ServiceFlowNode[] =>\n part.group === undefined\n ? []\n : [\n {\n // Prefixed, so a group may share an id with a node.\n id: `group:${part.group.id}`,\n type: 'serviceGroup',\n position: part.origin,\n width: part.width,\n height: part.boxHeight,\n data: { label: part.group.label },\n // Not a group for assistive technology: the box contains no\n // nodes in the DOM, so its label is plain text.\n domAttributes: { 'aria-roledescription': undefined },\n // Under the edges, and letting clicks through to them: React\n // Flow gives every node's wrapper pointer events once the map\n // has onNodeClick.\n zIndex: -1,\n style: { pointerEvents: 'none' },\n draggable: false,\n connectable: false,\n selectable: false,\n focusable: false,\n },\n ],\n ),\n positions: new Map(\n placed.flatMap((part) =>\n [...part.positions].map(([id, p]) => [\n id,\n {\n x: part.origin.x + p.x,\n y: part.origin.y + part.labelHeight + p.y,\n },\n ]),\n ),\n ),\n };\n}\n\nfunction ServiceGroup({\n data,\n}: NodeProps<Node<ServiceGroupData, 'serviceGroup'>>): JSX.Element {\n return (\n <div className=\"aegis-service-map__group\">\n <span className=\"aegis-service-map__group-label\">{data.label}</span>\n </div>\n );\n}\n\nfunction ServiceNode({\n data,\n}: NodeProps<Node<ServiceNodeData, 'service'>>): JSX.Element {\n const { node, selected } = data;\n const status = node.status ?? 'ok';\n return (\n <div\n className={[\n 'aegis-service-map__node',\n `aegis-service-map__node--${status}`,\n selected ? 'aegis-service-map__node--selected' : '',\n ]\n .filter(Boolean)\n .join(' ')}\n >\n <Handle\n type=\"target\"\n position={Position.Left}\n className=\"aegis-service-map__handle\"\n />\n <span className=\"aegis-service-map__node-stripe\" aria-hidden=\"true\" />\n <div className=\"aegis-service-map__node-body\">\n <div className=\"aegis-service-map__node-label\">\n {status === 'active' && (\n <StatusDot pulse tone={selected ? 'inverted' : 'ink'} />\n )}\n <span className=\"aegis-service-map__node-label-text\">\n {node.label}\n </span>\n </div>\n {node.sublabel !== undefined && (\n <div className=\"aegis-service-map__node-sublabel\">\n {node.sublabel}\n </div>\n )}\n </div>\n {node.badge !== undefined && node.badge !== '' && (\n <span\n className={`aegis-service-map__node-badge aegis-service-map__node-badge--${status}`}\n >\n {node.badge}\n </span>\n )}\n <Handle\n type=\"source\"\n position={Position.Right}\n className=\"aegis-service-map__handle\"\n />\n </div>\n );\n}\n\nfunction ServiceEdge(props: EdgeProps<Edge<ServiceEdgeData>>): JSX.Element {\n const { sourceX, sourceY, targetX, targetY, id, label, markerEnd, style } =\n props;\n const midX = (sourceX + targetX) / 2;\n const path = `M${sourceX},${sourceY} C${midX},${sourceY} ${midX},${targetY} ${targetX},${targetY}`;\n return (\n <>\n <path\n id={id}\n d={path}\n className=\"aegis-service-map__edge-path\"\n markerEnd={markerEnd}\n style={style}\n fill=\"none\"\n />\n {label !== undefined && label !== '' && (\n <text className=\"aegis-service-map__edge-label\">\n <textPath href={`#${id}`} startOffset=\"50%\" textAnchor=\"middle\">\n {label}\n </textPath>\n </text>\n )}\n </>\n );\n}\n\nconst NODE_TYPES = { service: ServiceNode, serviceGroup: ServiceGroup };\nconst EDGE_TYPES = { service: ServiceEdge };\n\nconst NARROW_QUERY = '(max-width: 768px)';\n/** Space kept clear around fitted nodes, in px. */\nconst FIT_MARGIN = 24;\n/** Low enough that fitting the whole map fits it, so the minimap's strip stays clear. */\nconst MIN_ZOOM = 0.1;\n/** A focused map opens at this zoom, so its labels are readable. */\nconst FOCUS_ZOOM = 1;\n// React Flow draws the controls and the minimap in panels inset by 15 px. A\n// control button is 26 px, 28 inside the controls' hairline border.\nconst PANEL_INSET = 15;\nconst CONTROLS_WIDTH = 28;\nconst MINIMAP_WIDTH = 200;\n\n/** A fit padding in px; React Flow reads a bare number as a fraction of the view. */\nconst px = (value: number): `${number}px` => `${value}px`;\n\n/** A node with the nodes it has a direct edge to or from. */\nfunction neighbourhood(id: string, links: MapShape['links']): string[] {\n return [\n ...new Set([\n id,\n ...links.filter(([source]) => source === id).map(([, target]) => target),\n ...links.filter(([, target]) => target === id).map(([source]) => source),\n ]),\n ];\n}\n\n/** The minimap draws groups as outlines, so the nodes inside them stay visible. */\nfunction minimapNodeClass(node: Node): string {\n return node.type === 'serviceGroup' ? 'aegis-service-map__minimap-group' : '';\n}\n\n/**\n * Fits the view once the layout uses every node's measured size, and again\n * when the layout or the focus changes. Nothing else moves the view, so a\n * new status or selection keeps the user's pan and zoom.\n */\nfunction useFit(\n shape: MapShape,\n layout: MapLayout,\n laidOut: boolean,\n focusNodeId: string | undefined,\n showMinimap: boolean,\n): void {\n const { fitView, getNodesBounds } = useReactFlow();\n const store = useStoreApi();\n const paneSized = useStore((state) => state.width > 0 && state.height > 0);\n const focus = useMemo(\n () =>\n focusNodeId !== undefined && shape.ids.includes(focusNodeId)\n ? { id: focusNodeId, near: neighbourhood(focusNodeId, shape.links) }\n : undefined,\n [focusNodeId, shape],\n );\n useEffect(() => {\n if (paneSized && laidOut) {\n const padding = {\n top: px(FIT_MARGIN),\n bottom: px(FIT_MARGIN),\n left: px(PANEL_INSET + CONTROLS_WIDTH + FIT_MARGIN),\n right: px(\n showMinimap ? PANEL_INSET + MINIMAP_WIDTH + FIT_MARGIN : FIT_MARGIN,\n ),\n };\n if (focus === undefined) {\n void fitView({ maxZoom: 1, padding });\n } else {\n const { width, height } = store.getState();\n const nearFits =\n getViewportForBounds(\n getNodesBounds(focus.near),\n width,\n height,\n MIN_ZOOM,\n FOCUS_ZOOM,\n padding,\n ).zoom >= FOCUS_ZOOM;\n void fitView({\n nodes: (nearFits ? focus.near : [focus.id]).map((id) => ({ id })),\n minZoom: FOCUS_ZOOM,\n maxZoom: FOCUS_ZOOM,\n padding,\n });\n }\n }\n }, [\n paneSized,\n laidOut,\n layout,\n focus,\n showMinimap,\n store,\n fitView,\n getNodesBounds,\n ]);\n}\n\nfunction ServiceMapInner({\n nodes,\n edges,\n groups = [],\n direction = 'LR',\n height,\n fillViewport = false,\n onNodeClick,\n onEdgeClick,\n selectedNodeId,\n focusNodeId,\n minimap = focusNodeId === undefined,\n ariaLabel,\n className,\n}: ServiceMapProps): JSX.Element {\n // Node sizes as React Flow measured them; the layout reads them, so a\n // node can be as wide as its label.\n const [measured, setMeasured] = useState<ReadonlyMap<string, Size>>(\n () => new Map(),\n );\n const shapeJson = useMemo(\n () => JSON.stringify(shapeOf(nodes, edges, groups, direction)),\n [nodes, edges, groups, direction],\n );\n // Parsed back from its JSON, so the shape is a new object only when it\n // changes, not when the parent passes equal arrays again.\n const shape = useMemo(() => JSON.parse(shapeJson) as MapShape, [shapeJson]);\n const layout = useMemo(\n () => computeLayout(shape, measured),\n [shape, measured],\n );\n const isHorizontal = direction === 'LR';\n const flowNodes = useMemo(\n (): ServiceFlowNode[] => [\n ...layout.groups,\n ...nodes.map(\n (n): ServiceFlowNode => ({\n id: n.id,\n type: 'service',\n position: layout.positions.get(n.id) ?? { x: 0, y: 0 },\n // Handed back as applyNodeChanges would, so React Flow keeps the\n // size it measured instead of measuring the node again.\n measured: measured.get(n.id),\n ariaLabel: n.label,\n // A group takes no aria-selected.\n domAttributes:\n selectedNodeId === n.id ? { 'aria-current': true } : undefined,\n data: { node: n, selected: selectedNodeId === n.id },\n sourcePosition: isHorizontal ? Position.Right : Position.Bottom,\n targetPosition: isHorizontal ? Position.Left : Position.Top,\n draggable: false,\n connectable: false,\n selectable: true,\n }),\n ),\n ],\n [layout, nodes, measured, selectedNodeId, isHorizontal],\n );\n const flowEdges = useMemo((): Array<Edge<ServiceEdgeData>> => {\n const labelOf = new Map(nodes.map((n) => [n.id, n.label]));\n return edges.map((e) => ({\n id: e.id,\n source: e.source,\n target: e.target,\n ariaLabel: `${labelOf.get(e.source) ?? e.source} → ${labelOf.get(e.target) ?? e.target}`,\n type: 'service',\n data: { edge: e },\n label: e.label,\n className: `aegis-service-map__edge aegis-service-map__edge--${e.status ?? 'ok'}`,\n }));\n }, [nodes, edges]);\n\n const { getNode } = useReactFlow();\n const handleNodesChange = useCallback(\n (changes: Array<NodeChange<ServiceFlowNode>>) => {\n const resized = changes.flatMap((change) =>\n change.type === 'dimensions' &&\n change.dimensions !== undefined &&\n getNode(change.id)?.type === 'service'\n ? [[change.id, change.dimensions] as const]\n : [],\n );\n setMeasured((previous) =>\n resized.every(\n ([id, size]) =>\n previous.get(id)?.width === size.width &&\n previous.get(id)?.height === size.height,\n )\n ? previous\n : new Map([...previous, ...resized]),\n );\n },\n [getNode],\n );\n\n const narrow = useMediaQuery(NARROW_QUERY);\n const showMinimap = minimap && !narrow;\n useFit(\n shape,\n layout,\n nodes.every((n) => measured.has(n.id)),\n focusNodeId,\n showMinimap,\n );\n\n const handleNodeClick = useCallback(\n (_: unknown, n: ServiceFlowNode) => {\n if (n.type === 'service') {\n onNodeClick?.(n.data.node);\n }\n },\n [onNodeClick],\n );\n const handleEdgeClick = useCallback(\n (_: unknown, e: Edge<ServiceEdgeData>) => {\n if (e.data) {\n onEdgeClick?.(e.data.edge);\n }\n },\n [onEdgeClick],\n );\n\n const style = {\n ...SIZE_VARS,\n height: height === undefined ? undefined : `${String(height)}px`,\n } as CSSProperties;\n\n return (\n <div\n className={[\n 'aegis-service-map',\n fillViewport ? 'aegis-service-map--fill-viewport' : '',\n className,\n ]\n .filter(Boolean)\n .join(' ')}\n style={style}\n >\n {/* Positioned over the whole box, so React Flow has a definite height\n even when the box only has its min-height. */}\n <div className=\"aegis-service-map__pane\">\n <ReactFlow\n aria-label={ariaLabel}\n nodes={flowNodes}\n edges={flowEdges}\n nodeTypes={NODE_TYPES}\n edgeTypes={EDGE_TYPES}\n minZoom={MIN_ZOOM}\n nodesDraggable={false}\n nodesConnectable={false}\n elementsSelectable\n panOnDrag\n zoomOnScroll\n proOptions={{ hideAttribution: true }}\n onNodesChange={handleNodesChange}\n onNodeClick={handleNodeClick}\n onEdgeClick={handleEdgeClick}\n >\n <Background variant={BackgroundVariant.Dots} gap={16} size={1} />\n <Controls showInteractive={false} position=\"top-left\" />\n {showMinimap && (\n <MiniMap\n pannable\n zoomable\n position=\"bottom-right\"\n style={{ width: MINIMAP_WIDTH }}\n nodeClassName={minimapNodeClass}\n />\n )}\n </ReactFlow>\n </div>\n </div>\n );\n}\n\nexport function ServiceMap(props: ServiceMapProps): JSX.Element {\n return (\n <ReactFlowProvider>\n <ServiceMapInner {...props} />\n </ReactFlowProvider>\n );\n}\n"],"names":["NODE_WIDTH","NODE_HEIGHT","NODE_MAX_WIDTH","GROUP_LABEL_HEIGHT","GROUP_GAP","SIZE_VARS","DEFAULT_SIZE","shapeOf","nodes","edges","groups","direction","ids","n","present","e","partsOf","claimed","grouped","group","id","rest","part","layoutPart","links","sizeOf","g","graphlib","source","target","dagreLayout","positions","x","y","size","width","height","computeLayout","shape","sizes","horizontal","parts","laid","labelHeight","across","along","placed","origin","p","ServiceGroup","data","jsx","ServiceNode","node","selected","status","jsxs","Handle","Position","StatusDot","ServiceEdge","props","sourceX","sourceY","targetX","targetY","label","markerEnd","style","midX","path","Fragment","NODE_TYPES","EDGE_TYPES","NARROW_QUERY","FIT_MARGIN","MIN_ZOOM","FOCUS_ZOOM","PANEL_INSET","CONTROLS_WIDTH","MINIMAP_WIDTH","px","value","neighbourhood","minimapNodeClass","useFit","layout","laidOut","focusNodeId","showMinimap","fitView","getNodesBounds","useReactFlow","store","useStoreApi","paneSized","useStore","state","focus","useMemo","useEffect","padding","nearFits","getViewportForBounds","ServiceMapInner","fillViewport","onNodeClick","onEdgeClick","selectedNodeId","minimap","ariaLabel","className","measured","setMeasured","useState","shapeJson","isHorizontal","flowNodes","flowEdges","labelOf","getNode","handleNodesChange","useCallback","changes","resized","change","previous","narrow","useMediaQuery","handleNodeClick","_","handleEdgeClick","ReactFlow","Background","BackgroundVariant","Controls","MiniMap","ServiceMap","ReactFlowProvider"],"mappings":"6SA6IMA,EAAa,IACbC,EAAc,GACdC,EAAiB,IAEjBC,EAAqB,GAErBC,EAAY,GAGZC,EAAY,CAChB,6BAA8B,GAAG,OAAOL,CAAU,CAAC,KACnD,6BAA8B,GAAG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Z,MAAOO,EACP,MAAOC,EACP,UAAW9C,GACX,UAAWC,GACX,QAASG,EACT,eAAgB,GAChB,iBAAkB,GAClB,mBAAkB,GAClB,UAAS,GACT,aAAY,GACZ,WAAY,CAAE,gBAAiB,EAAA,EAC/B,cAAe6C,EACf,YAAaQ,EACb,YAAaE,EAEb,SAAA,CAAAhF,MAACkF,EAAAA,YAAW,QAASC,EAAAA,kBAAkB,KAAM,IAAK,GAAI,KAAM,EAAG,EAC/DnF,EAAAA,IAACoF,EAAAA,SAAA,CAAS,gBAAiB,GAAO,SAAS,WAAW,EACrD9C,GACCtC,EAAAA,IAACqF,EAAAA,QAAA,CACC,SAAQ,GACR,SAAQ,GACR,SAAS,eACT,MAAO,CAAE,MAAOxD,CAAA,EAChB,cAAeI,EAAA,CAAA,CACjB,CAAA,CAAA,CAEJ,CACF,CAAA,CAAA,CAGN,CAEO,SAASqD,GAAW5E,EAAqC,CAC9D,aACG6E,oBAAA,CACC,SAAAvF,EAAAA,IAACqD,GAAA,CAAiB,GAAG3C,EAAO,EAC9B,CAEJ"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** `active` is work in progress, e.g. a running task: an ink stripe and a pulsing dot. */
|
|
2
|
+
export type ServiceMapStatus = 'ok' | 'active' | 'warn' | 'error' | 'muted';
|
|
2
3
|
export type ServiceMapDirection = 'LR' | 'TB';
|
|
3
4
|
export interface ServiceMapNode {
|
|
4
5
|
id: string;
|
|
@@ -8,21 +9,69 @@ export interface ServiceMapNode {
|
|
|
8
9
|
badge?: number | string;
|
|
9
10
|
data?: Record<string, unknown>;
|
|
10
11
|
}
|
|
12
|
+
/**
|
|
13
|
+
* A labelled box around some nodes, e.g. the tasks of one phase. Its id may
|
|
14
|
+
* also be a node's id.
|
|
15
|
+
*/
|
|
16
|
+
export interface ServiceMapGroup {
|
|
17
|
+
id: string;
|
|
18
|
+
label: string;
|
|
19
|
+
nodeIds: string[];
|
|
20
|
+
}
|
|
21
|
+
/** For assistive technology, a `group` named `<source label> → <target label>`. */
|
|
11
22
|
export interface ServiceMapEdge {
|
|
12
23
|
id: string;
|
|
13
24
|
source: string;
|
|
14
25
|
target: string;
|
|
15
26
|
label?: string;
|
|
16
|
-
|
|
27
|
+
/** `active` is a node's state only. */
|
|
28
|
+
status?: Exclude<ServiceMapStatus, 'active'>;
|
|
17
29
|
}
|
|
18
30
|
export interface ServiceMapProps {
|
|
19
31
|
nodes: ServiceMapNode[];
|
|
20
32
|
edges: ServiceMapEdge[];
|
|
33
|
+
/**
|
|
34
|
+
* Boxes drawn around groups of nodes, e.g. the phases of a pipeline. The
|
|
35
|
+
* groups follow one another along `direction` in the order given, each
|
|
36
|
+
* laid out on its own; nodes in no group come after the last group. A
|
|
37
|
+
* node belongs to the first group that lists it.
|
|
38
|
+
*/
|
|
39
|
+
groups?: ServiceMapGroup[];
|
|
21
40
|
direction?: ServiceMapDirection;
|
|
41
|
+
/** Height in px. Default: the container's height, at least `--service-map-min-height`. */
|
|
22
42
|
height?: number;
|
|
43
|
+
/**
|
|
44
|
+
* Fill the viewport's height below the shell header
|
|
45
|
+
* (`--service-map-viewport-height`), for a page whose main view is the
|
|
46
|
+
* map. At 768 px and below the map keeps its default height, so a touch
|
|
47
|
+
* can still scroll the page past it. `height` overrides it.
|
|
48
|
+
*/
|
|
49
|
+
fillViewport?: boolean;
|
|
23
50
|
onNodeClick?: (node: ServiceMapNode) => void;
|
|
24
51
|
onEdgeClick?: (edge: ServiceMapEdge) => void;
|
|
52
|
+
/** Drawn inverted, and `aria-current` for assistive technology. */
|
|
25
53
|
selectedNodeId?: string;
|
|
54
|
+
/**
|
|
55
|
+
* Opens at actual size on this node instead of fitting the whole map, and
|
|
56
|
+
* again whenever it changes: fitted to the node and the nodes it has a
|
|
57
|
+
* direct edge to or from when they fit at actual size, otherwise centred
|
|
58
|
+
* on the node alone. Large maps stay readable when they open. An id that
|
|
59
|
+
* is not on the map is ignored.
|
|
60
|
+
*/
|
|
61
|
+
focusNodeId?: string;
|
|
62
|
+
/**
|
|
63
|
+
* Show the minimap in the bottom-right corner. A fit keeps its strip on
|
|
64
|
+
* the right clear, so a map fitted whole opens with no node under it.
|
|
65
|
+
* Default: shown unless `focusNodeId` is given, since a focused view runs
|
|
66
|
+
* past every edge of the map and the minimap would cover nodes there. It
|
|
67
|
+
* is not shown at 768 px and below.
|
|
68
|
+
*/
|
|
69
|
+
minimap?: boolean;
|
|
70
|
+
/**
|
|
71
|
+
* The map's accessible name. Each node is a `group` named by its label;
|
|
72
|
+
* a group's box is not.
|
|
73
|
+
*/
|
|
74
|
+
ariaLabel?: string;
|
|
26
75
|
className?: string;
|
|
27
76
|
}
|
|
28
77
|
export declare function ServiceMap(props: ServiceMapProps): JSX.Element;
|