@lincyaw/aegis-ui 0.9.3 → 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 +29 -26
- 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
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildRouteTree.cjs","sources":["../../../src/layouts/shell/buildRouteTree.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Navigate, type RouteObject } from 'react-router-dom';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport { PageWrapper } from '../PageWrapper';\nimport { AppRoutes } from './AppRoutes';\nimport { AuthRequiredCard } from './AuthRequiredCard';\nimport { isAppVisible } from './apps';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp, AegisShellProps } from './types';\n\ninterface RouteTreeOptions {\n apps: AegisApp[];\n rootRoutes: NonNullable<AegisShellProps['rootRoutes']>;\n fallbackPath?: string;\n notFoundElement?: ReactNode;\n auth: AuthContextValue<AegisAuthUser>;\n}\n\nexport interface RouteTree {\n routes: RouteObject[];\n /** The top-level routes that render without the shell chrome. */\n bareRoutes: ReadonlySet<RouteObject>;\n}\n\n/**\n * The shell's route tree: bare root routes, root routes and every app under\n * its basePath, each page in a PageWrapper, then the not-found fallback.\n */\nexport function buildRouteTree({\n apps,\n rootRoutes,\n fallbackPath,\n notFoundElement,\n auth,\n}: RouteTreeOptions): RouteTree {\n const signIn = auth.signIn\n ? () => {\n void auth.signIn?.({});\n }\n : undefined;\n\n const appRoutes = apps.map(\n (app): RouteObject => ({\n path: `${normalizeBasePath(app.basePath)}/*`,\n element: (\n <PageWrapper>\n {isAppVisible(app, auth.status, auth.user) ? (\n <AppRoutes app={app} />\n ) : (\n <AuthRequiredCard\n app={app}\n status={auth.status}\n user={auth.user}\n onSignIn={signIn}\n />\n )}\n </PageWrapper>\n ),\n }),\n );\n\n const inShellRootRoutes = rootRoutes\n .filter((r) => !r.bare)\n .map(\n ({ bare: _bare, element, ...rest }): RouteObject => ({\n ...rest,\n element: <PageWrapper>{element}</PageWrapper>,\n }),\n );\n\n const bareRoutes = rootRoutes\n .filter((r) => r.bare)\n .map(({ bare: _bare, ...rest }): RouteObject => rest);\n\n const fallback: RouteObject | null = notFoundElement\n ? { path: '*', element: <PageWrapper>{notFoundElement}</PageWrapper> }\n : fallbackPath\n ? { path: '*', element: <Navigate to={fallbackPath} replace /> }\n : null;\n\n return {\n routes: [\n ...bareRoutes,\n ...inShellRootRoutes,\n ...appRoutes,\n ...(fallback ? [fallback] : []),\n ],\n bareRoutes: new Set(bareRoutes),\n };\n}\n"],"names":["buildRouteTree","apps","rootRoutes","fallbackPath","notFoundElement","auth","signIn","appRoutes","app","normalizeBasePath","jsx","PageWrapper","isAppVisible","AppRoutes","AuthRequiredCard","inShellRootRoutes","r","_bare","element","rest","bareRoutes","fallback","Navigate"],"mappings":"qSA8BO,SAASA,EAAe,CAAA,KAC7BC,EACA,WAAAC,EACA,aAAAC,EACA,gBAAAC,EACA,KAAAC,CACF,EAAgC,CAC9B,MAAMC,EAASD,EAAK,OAChB,IAAM,CACCA,EAAK,SAAS,EAAE,CACvB,EACA,OAEEE,EAAYN,EAAK,IACpBO,IAAsB,CACrB,KAAM,GAAGC,EAAAA,kBAAkBD,EAAI,QAAQ,CAAC,KACxC,QACEE,EAAAA,IAACC,EAAAA,YAAA,CACE,SAAAC,EAAAA,aAAaJ,EAAKH,EAAK,OAAQA,EAAK,IAAI,EACvCK,EAAAA,IAACG,EAAAA,UAAA,CAAU,IAAAL,EAAU,EAErBE,EAAAA,IAACI,EAAAA,iBAAA,CACC,IAAAN,EACA,OAAQH,EAAK,OACb,KAAMA,EAAK,KACX,SAAUC,CAAA,CAAA,CACZ,CAEJ,CAAA,EAEJ,EAGIS,EAAoBb,EACvB,OAAQc,GAAM,CAACA,EAAE,IAAI,EACrB,IACC,CAAC,CAAE,KAAMC,EAAO,QAAAC,EAAS,GAAGC,MAAyB,CACnD,GAAGA,EACH,QAAST,EAAAA,IAACC,EAAAA,YAAA,CAAa,SAAAO,CAAA,CAAQ,CAAA,EACjC,EAGEE,EAAalB,EAChB,OAAQc,GAAMA,EAAE,IAAI,EACpB,IAAI,CAAC,CAAE,KAAMC,EAAO,GAAGE,CAAA,IAAwBA,CAAI,EAEhDE,EAA+BjB,EACjC,CAAE,KAAM,IAAK,QAASM,EAAAA,IAACC,cAAA,CAAa,SAAAP,CAAA,CAAgB,CAAA,EACpDD,EACE,CAAE,KAAM,IAAK,QAASO,EAAAA,IAACY,EAAAA,SAAA,CAAS,GAAInB,EAAc,QAAO,EAAA,CAAC,CAAA,EAC1D,KAEN,MAAO,CACL,OAAQ,CACN,GAAGiB,EACH,GAAGL,EACH,GAAGR,EACH,GAAIc,EAAW,CAACA,CAAQ,EAAI,CAAA,CAAC,EAE/B,WAAY,IAAI,IAAID,CAAU,CAAA,CAElC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
import { RouteObject } from 'react-router-dom';
|
|
3
|
+
import { AegisAuthUser, AuthContextValue } from '../../auth';
|
|
4
|
+
import { AegisApp, AegisShellProps } from './types';
|
|
5
|
+
interface RouteTreeOptions {
|
|
6
|
+
apps: AegisApp[];
|
|
7
|
+
rootRoutes: NonNullable<AegisShellProps['rootRoutes']>;
|
|
8
|
+
fallbackPath?: string;
|
|
9
|
+
notFoundElement?: ReactNode;
|
|
10
|
+
auth: AuthContextValue<AegisAuthUser>;
|
|
11
|
+
}
|
|
12
|
+
export interface RouteTree {
|
|
13
|
+
routes: RouteObject[];
|
|
14
|
+
/** The top-level routes that render without the shell chrome. */
|
|
15
|
+
bareRoutes: ReadonlySet<RouteObject>;
|
|
16
|
+
}
|
|
17
|
+
/**
|
|
18
|
+
* The shell's route tree: bare root routes, root routes and every app under
|
|
19
|
+
* its basePath, each page in a PageWrapper, then the not-found fallback.
|
|
20
|
+
*/
|
|
21
|
+
export declare function buildRouteTree({ apps, rootRoutes, fallbackPath, notFoundElement, auth, }: RouteTreeOptions): RouteTree;
|
|
22
|
+
export {};
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import { jsx as t } from "react/jsx-runtime";
|
|
2
|
+
import { Navigate as d } from "react-router-dom";
|
|
3
|
+
import { PageWrapper as i } from "../PageWrapper.js";
|
|
4
|
+
import { AppRoutes as R } from "./AppRoutes.js";
|
|
5
|
+
import { AuthRequiredCard as g } from "./AuthRequiredCard.js";
|
|
6
|
+
import { isAppVisible as h } from "./apps.js";
|
|
7
|
+
import { normalizeBasePath as I } from "./paths.js";
|
|
8
|
+
function q({
|
|
9
|
+
apps: l,
|
|
10
|
+
rootRoutes: s,
|
|
11
|
+
fallbackPath: n,
|
|
12
|
+
notFoundElement: m,
|
|
13
|
+
auth: r
|
|
14
|
+
}) {
|
|
15
|
+
const u = r.signIn ? () => {
|
|
16
|
+
r.signIn?.({});
|
|
17
|
+
} : void 0, b = l.map(
|
|
18
|
+
(e) => ({
|
|
19
|
+
path: `${I(e.basePath)}/*`,
|
|
20
|
+
element: /* @__PURE__ */ t(i, { children: h(e, r.status, r.user) ? /* @__PURE__ */ t(R, { app: e }) : /* @__PURE__ */ t(
|
|
21
|
+
g,
|
|
22
|
+
{
|
|
23
|
+
app: e,
|
|
24
|
+
status: r.status,
|
|
25
|
+
user: r.user,
|
|
26
|
+
onSignIn: u
|
|
27
|
+
}
|
|
28
|
+
) })
|
|
29
|
+
})
|
|
30
|
+
), c = s.filter((e) => !e.bare).map(
|
|
31
|
+
({ bare: e, element: o, ...f }) => ({
|
|
32
|
+
...f,
|
|
33
|
+
element: /* @__PURE__ */ t(i, { children: o })
|
|
34
|
+
})
|
|
35
|
+
), a = s.filter((e) => e.bare).map(({ bare: e, ...o }) => o), p = m ? { path: "*", element: /* @__PURE__ */ t(i, { children: m }) } : n ? { path: "*", element: /* @__PURE__ */ t(d, { to: n, replace: !0 }) } : null;
|
|
36
|
+
return {
|
|
37
|
+
routes: [
|
|
38
|
+
...a,
|
|
39
|
+
...c,
|
|
40
|
+
...b,
|
|
41
|
+
...p ? [p] : []
|
|
42
|
+
],
|
|
43
|
+
bareRoutes: new Set(a)
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
export {
|
|
47
|
+
q as buildRouteTree
|
|
48
|
+
};
|
|
49
|
+
//# sourceMappingURL=buildRouteTree.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"buildRouteTree.js","sources":["../../../src/layouts/shell/buildRouteTree.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { Navigate, type RouteObject } from 'react-router-dom';\n\nimport type { AegisAuthUser, AuthContextValue } from '../../auth';\nimport { PageWrapper } from '../PageWrapper';\nimport { AppRoutes } from './AppRoutes';\nimport { AuthRequiredCard } from './AuthRequiredCard';\nimport { isAppVisible } from './apps';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp, AegisShellProps } from './types';\n\ninterface RouteTreeOptions {\n apps: AegisApp[];\n rootRoutes: NonNullable<AegisShellProps['rootRoutes']>;\n fallbackPath?: string;\n notFoundElement?: ReactNode;\n auth: AuthContextValue<AegisAuthUser>;\n}\n\nexport interface RouteTree {\n routes: RouteObject[];\n /** The top-level routes that render without the shell chrome. */\n bareRoutes: ReadonlySet<RouteObject>;\n}\n\n/**\n * The shell's route tree: bare root routes, root routes and every app under\n * its basePath, each page in a PageWrapper, then the not-found fallback.\n */\nexport function buildRouteTree({\n apps,\n rootRoutes,\n fallbackPath,\n notFoundElement,\n auth,\n}: RouteTreeOptions): RouteTree {\n const signIn = auth.signIn\n ? () => {\n void auth.signIn?.({});\n }\n : undefined;\n\n const appRoutes = apps.map(\n (app): RouteObject => ({\n path: `${normalizeBasePath(app.basePath)}/*`,\n element: (\n <PageWrapper>\n {isAppVisible(app, auth.status, auth.user) ? (\n <AppRoutes app={app} />\n ) : (\n <AuthRequiredCard\n app={app}\n status={auth.status}\n user={auth.user}\n onSignIn={signIn}\n />\n )}\n </PageWrapper>\n ),\n }),\n );\n\n const inShellRootRoutes = rootRoutes\n .filter((r) => !r.bare)\n .map(\n ({ bare: _bare, element, ...rest }): RouteObject => ({\n ...rest,\n element: <PageWrapper>{element}</PageWrapper>,\n }),\n );\n\n const bareRoutes = rootRoutes\n .filter((r) => r.bare)\n .map(({ bare: _bare, ...rest }): RouteObject => rest);\n\n const fallback: RouteObject | null = notFoundElement\n ? { path: '*', element: <PageWrapper>{notFoundElement}</PageWrapper> }\n : fallbackPath\n ? { path: '*', element: <Navigate to={fallbackPath} replace /> }\n : null;\n\n return {\n routes: [\n ...bareRoutes,\n ...inShellRootRoutes,\n ...appRoutes,\n ...(fallback ? [fallback] : []),\n ],\n bareRoutes: new Set(bareRoutes),\n };\n}\n"],"names":["buildRouteTree","apps","rootRoutes","fallbackPath","notFoundElement","auth","signIn","appRoutes","app","normalizeBasePath","jsx","PageWrapper","isAppVisible","AppRoutes","AuthRequiredCard","inShellRootRoutes","r","_bare","element","rest","bareRoutes","fallback","Navigate"],"mappings":";;;;;;;AA8BO,SAASA,EAAe;AAAA,EAC7B,MAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,MAAAC;AACF,GAAgC;AAC9B,QAAMC,IAASD,EAAK,SAChB,MAAM;AACJ,IAAKA,EAAK,SAAS,EAAE;AAAA,EACvB,IACA,QAEEE,IAAYN,EAAK;AAAA,IACrB,CAACO,OAAsB;AAAA,MACrB,MAAM,GAAGC,EAAkBD,EAAI,QAAQ,CAAC;AAAA,MACxC,SACE,gBAAAE,EAACC,GAAA,EACE,UAAAC,EAAaJ,GAAKH,EAAK,QAAQA,EAAK,IAAI,IACvC,gBAAAK,EAACG,GAAA,EAAU,KAAAL,GAAU,IAErB,gBAAAE;AAAA,QAACI;AAAA,QAAA;AAAA,UACC,KAAAN;AAAA,UACA,QAAQH,EAAK;AAAA,UACb,MAAMA,EAAK;AAAA,UACX,UAAUC;AAAA,QAAA;AAAA,MAAA,EACZ,CAEJ;AAAA,IAAA;AAAA,EAEJ,GAGIS,IAAoBb,EACvB,OAAO,CAACc,MAAM,CAACA,EAAE,IAAI,EACrB;AAAA,IACC,CAAC,EAAE,MAAMC,GAAO,SAAAC,GAAS,GAAGC,SAAyB;AAAA,MACnD,GAAGA;AAAA,MACH,SAAS,gBAAAT,EAACC,GAAA,EAAa,UAAAO,EAAA,CAAQ;AAAA,IAAA;AAAA,EACjC,GAGEE,IAAalB,EAChB,OAAO,CAACc,MAAMA,EAAE,IAAI,EACpB,IAAI,CAAC,EAAE,MAAMC,GAAO,GAAGE,EAAA,MAAwBA,CAAI,GAEhDE,IAA+BjB,IACjC,EAAE,MAAM,KAAK,SAAS,gBAAAM,EAACC,GAAA,EAAa,UAAAP,EAAA,CAAgB,EAAA,IACpDD,IACE,EAAE,MAAM,KAAK,SAAS,gBAAAO,EAACY,GAAA,EAAS,IAAInB,GAAc,SAAO,GAAA,CAAC,EAAA,IAC1D;AAEN,SAAO;AAAA,IACL,QAAQ;AAAA,MACN,GAAGiB;AAAA,MACH,GAAGL;AAAA,MACH,GAAGR;AAAA,MACH,GAAIc,IAAW,CAACA,CAAQ,IAAI,CAAA;AAAA,IAAC;AAAA,IAE/B,YAAY,IAAI,IAAID,CAAU;AAAA,EAAA;AAElC;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("react/jsx-runtime"),l=require("react"),b=require("../../../lib/storage.cjs"),p=require("./environmentContext.cjs"),q=require("./types.cjs");function x(s){return s.environments?.storageKey??`aegis.env.${s.id}`}function N({app:s,children:M}){const[y,v]=l.useState(()=>new Map),[f,C]=l.useState(()=>new Map),e=s?.id,i=s?.environments,d=s?x(s):null,u=e===void 0?void 0:y.get(e),E=i!==void 0&&u===void 0;l.useEffect(()=>{if(!E||e===void 0||d===null)return;const n=new AbortController,a=t=>{n.signal.aborted||v(r=>new Map(r).set(e,t))};return i.load(n.signal).then(t=>{const r=b.readStorage(d);a({status:"loaded",manifest:t,initialEnvId:t===null?null:t.environments.some(o=>o.id===r)?r:t.default})},t=>{const r=t instanceof Error?t:new Error(String(t));n.signal.aborted||console.error(`AegisShell: loading the environments of app "${e}" failed.`,r),a({status:"error",error:r})}),()=>{n.abort()}},[E,i,e,d]);const g=l.useCallback(()=>{e!==void 0&&v(n=>{const a=new Map(n);return a.delete(e),a})},[e]),m=l.useMemo(()=>{if(e===void 0||d===null||!i)return{status:"idle"};if(!u)return{status:"loading"};if(u.status==="error")return{status:"error",error:u.error,retry:g};const{manifest:n}=u;if(!n)return i.fallback?{status:"unsupported",currentEnv:i.fallback}:{status:"idle"};const a=f.get(e)??u.initialEnvId,t=n.environments.find(o=>o.id===a)??n.environments[0],r=o=>{const w=n.environments.find(c=>c.id===o);if(!w||o===t.id)return;C(c=>new Map(c).set(e,o)),b.writeStorage(d,o);const I={appId:e,fromEnvId:t.id,toEnvId:o,env:w};window.dispatchEvent(new CustomEvent(q.ENVIRONMENT_CHANGED_EVENT,{detail:I}))};return{status:"ready",manifest:n,currentEnvId:t.id,currentEnv:t,setCurrentEnv:r}},[e,d,i,u,f,g]),S=l.useMemo(()=>e===void 0?null:{appId:e,state:m},[e,m]);return h.jsx(p.EnvironmentContext.Provider,{value:S,children:M})}exports.EnvironmentProvider=N;
|
|
2
|
+
//# sourceMappingURL=EnvironmentProvider.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentProvider.cjs","sources":["../../../../src/layouts/shell/environments/EnvironmentProvider.tsx"],"sourcesContent":["import {\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { readStorage, writeStorage } from '../../../lib/storage';\nimport type { AegisApp } from '../types';\nimport {\n EnvironmentContext,\n type EnvironmentContextValue,\n} from './environmentContext';\nimport {\n ENVIRONMENT_CHANGED_EVENT,\n type EnvironmentChangedEventDetail,\n type EnvironmentManifest,\n type EnvironmentManifestStatus,\n} from './types';\n\ntype LoadResult =\n | {\n status: 'loaded';\n manifest: EnvironmentManifest | null;\n /** The stored choice when it is still listed, else the default. */\n initialEnvId: string | null;\n }\n | { status: 'error'; error: Error };\n\nfunction storageKeyFor(app: AegisApp): string {\n return app.environments?.storageKey ?? `aegis.env.${app.id}`;\n}\n\ninterface EnvironmentProviderProps {\n app: AegisApp | undefined;\n children: ReactNode;\n}\n\n/**\n * Loads and holds the environments of the active app. The shell mounts\n * it; consumers read it with `useCurrentEnvironment()`. Each app's\n * manifest loads once a session, the first time the app is active.\n */\nexport function EnvironmentProvider({\n app,\n children,\n}: EnvironmentProviderProps): ReactElement {\n const [results, setResults] = useState<ReadonlyMap<string, LoadResult>>(\n () => new Map(),\n );\n const [chosen, setChosen] = useState<ReadonlyMap<string, string>>(\n () => new Map(),\n );\n\n const appId = app?.id;\n const config = app?.environments;\n const storageKey = app ? storageKeyFor(app) : null;\n const result = appId === undefined ? undefined : results.get(appId);\n const needsLoad = config !== undefined && result === undefined;\n\n useEffect(() => {\n if (!needsLoad || appId === undefined || storageKey === null) {\n return undefined;\n }\n const controller = new AbortController();\n const settle = (next: LoadResult): void => {\n if (!controller.signal.aborted) {\n setResults((prev) => new Map(prev).set(appId, next));\n }\n };\n config.load(controller.signal).then(\n (manifest) => {\n const stored = readStorage(storageKey);\n settle({\n status: 'loaded',\n manifest,\n initialEnvId:\n manifest === null\n ? null\n : manifest.environments.some((e) => e.id === stored)\n ? stored\n : manifest.default,\n });\n },\n (reason: unknown) => {\n const error =\n reason instanceof Error ? reason : new Error(String(reason));\n if (!controller.signal.aborted) {\n console.error(\n `AegisShell: loading the environments of app \"${appId}\" failed.`,\n error,\n );\n }\n settle({ status: 'error', error });\n },\n );\n return () => {\n controller.abort();\n };\n }, [needsLoad, config, appId, storageKey]);\n\n const retry = useCallback(() => {\n if (appId === undefined) {\n return;\n }\n setResults((prev) => {\n const next = new Map(prev);\n next.delete(appId);\n return next;\n });\n }, [appId]);\n\n const state = useMemo<EnvironmentManifestStatus>(() => {\n if (appId === undefined || storageKey === null || !config) {\n return { status: 'idle' };\n }\n if (!result) {\n return { status: 'loading' };\n }\n if (result.status === 'error') {\n return { status: 'error', error: result.error, retry };\n }\n const { manifest } = result;\n if (!manifest) {\n return config.fallback\n ? { status: 'unsupported', currentEnv: config.fallback }\n : { status: 'idle' };\n }\n const wanted = chosen.get(appId) ?? result.initialEnvId;\n const currentEnv =\n manifest.environments.find((e) => e.id === wanted) ??\n manifest.environments[0];\n const setCurrentEnv = (id: string): void => {\n const env = manifest.environments.find((e) => e.id === id);\n if (!env || id === currentEnv.id) {\n return;\n }\n setChosen((prev) => new Map(prev).set(appId, id));\n writeStorage(storageKey, id);\n const detail: EnvironmentChangedEventDetail = {\n appId,\n fromEnvId: currentEnv.id,\n toEnvId: id,\n env,\n };\n window.dispatchEvent(\n new CustomEvent(ENVIRONMENT_CHANGED_EVENT, { detail }),\n );\n };\n return {\n status: 'ready',\n manifest,\n currentEnvId: currentEnv.id,\n currentEnv,\n setCurrentEnv,\n };\n }, [appId, storageKey, config, result, chosen, retry]);\n\n const value = useMemo<EnvironmentContextValue | null>(\n () => (appId === undefined ? null : { appId, state }),\n [appId, state],\n );\n\n return (\n <EnvironmentContext.Provider value={value}>\n {children}\n </EnvironmentContext.Provider>\n );\n}\n"],"names":["storageKeyFor","app","EnvironmentProvider","children","results","setResults","useState","chosen","setChosen","appId","config","storageKey","result","needsLoad","useEffect","controller","settle","next","prev","manifest","stored","readStorage","e","reason","error","retry","useCallback","state","useMemo","wanted","currentEnv","setCurrentEnv","id","env","writeStorage","detail","ENVIRONMENT_CHANGED_EVENT","value","jsx","EnvironmentContext"],"mappings":"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"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactElement, ReactNode } from 'react';
|
|
2
|
+
import { AegisApp } from '../types';
|
|
3
|
+
interface EnvironmentProviderProps {
|
|
4
|
+
app: AegisApp | undefined;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* Loads and holds the environments of the active app. The shell mounts
|
|
9
|
+
* it; consumers read it with `useCurrentEnvironment()`. Each app's
|
|
10
|
+
* manifest loads once a session, the first time the app is active.
|
|
11
|
+
*/
|
|
12
|
+
export declare function EnvironmentProvider({ app, children, }: EnvironmentProviderProps): ReactElement;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
import { jsx as y } from "react/jsx-runtime";
|
|
2
|
+
import { useState as w, useEffect as N, useCallback as S, useMemo as p } from "react";
|
|
3
|
+
import { readStorage as x, writeStorage as k } from "../../../lib/storage.js";
|
|
4
|
+
import { EnvironmentContext as A } from "./environmentContext.js";
|
|
5
|
+
import { ENVIRONMENT_CHANGED_EVENT as K } from "./types.js";
|
|
6
|
+
function P(s) {
|
|
7
|
+
return s.environments?.storageKey ?? `aegis.env.${s.id}`;
|
|
8
|
+
}
|
|
9
|
+
function j({
|
|
10
|
+
app: s,
|
|
11
|
+
children: b
|
|
12
|
+
}) {
|
|
13
|
+
const [C, c] = w(
|
|
14
|
+
() => /* @__PURE__ */ new Map()
|
|
15
|
+
), [v, I] = w(
|
|
16
|
+
() => /* @__PURE__ */ new Map()
|
|
17
|
+
), t = s?.id, i = s?.environments, u = s ? P(s) : null, d = t === void 0 ? void 0 : C.get(t), f = i !== void 0 && d === void 0;
|
|
18
|
+
N(() => {
|
|
19
|
+
if (!f || t === void 0 || u === null)
|
|
20
|
+
return;
|
|
21
|
+
const e = new AbortController(), l = (n) => {
|
|
22
|
+
e.signal.aborted || c((r) => new Map(r).set(t, n));
|
|
23
|
+
};
|
|
24
|
+
return i.load(e.signal).then(
|
|
25
|
+
(n) => {
|
|
26
|
+
const r = x(u);
|
|
27
|
+
l({
|
|
28
|
+
status: "loaded",
|
|
29
|
+
manifest: n,
|
|
30
|
+
initialEnvId: n === null ? null : n.environments.some((o) => o.id === r) ? r : n.default
|
|
31
|
+
});
|
|
32
|
+
},
|
|
33
|
+
(n) => {
|
|
34
|
+
const r = n instanceof Error ? n : new Error(String(n));
|
|
35
|
+
e.signal.aborted || console.error(
|
|
36
|
+
`AegisShell: loading the environments of app "${t}" failed.`,
|
|
37
|
+
r
|
|
38
|
+
), l({ status: "error", error: r });
|
|
39
|
+
}
|
|
40
|
+
), () => {
|
|
41
|
+
e.abort();
|
|
42
|
+
};
|
|
43
|
+
}, [f, i, t, u]);
|
|
44
|
+
const m = S(() => {
|
|
45
|
+
t !== void 0 && c((e) => {
|
|
46
|
+
const l = new Map(e);
|
|
47
|
+
return l.delete(t), l;
|
|
48
|
+
});
|
|
49
|
+
}, [t]), E = p(() => {
|
|
50
|
+
if (t === void 0 || u === null || !i)
|
|
51
|
+
return { status: "idle" };
|
|
52
|
+
if (!d)
|
|
53
|
+
return { status: "loading" };
|
|
54
|
+
if (d.status === "error")
|
|
55
|
+
return { status: "error", error: d.error, retry: m };
|
|
56
|
+
const { manifest: e } = d;
|
|
57
|
+
if (!e)
|
|
58
|
+
return i.fallback ? { status: "unsupported", currentEnv: i.fallback } : { status: "idle" };
|
|
59
|
+
const l = v.get(t) ?? d.initialEnvId, n = e.environments.find((o) => o.id === l) ?? e.environments[0], r = (o) => {
|
|
60
|
+
const g = e.environments.find((a) => a.id === o);
|
|
61
|
+
if (!g || o === n.id)
|
|
62
|
+
return;
|
|
63
|
+
I((a) => new Map(a).set(t, o)), k(u, o);
|
|
64
|
+
const h = {
|
|
65
|
+
appId: t,
|
|
66
|
+
fromEnvId: n.id,
|
|
67
|
+
toEnvId: o,
|
|
68
|
+
env: g
|
|
69
|
+
};
|
|
70
|
+
window.dispatchEvent(
|
|
71
|
+
new CustomEvent(K, { detail: h })
|
|
72
|
+
);
|
|
73
|
+
};
|
|
74
|
+
return {
|
|
75
|
+
status: "ready",
|
|
76
|
+
manifest: e,
|
|
77
|
+
currentEnvId: n.id,
|
|
78
|
+
currentEnv: n,
|
|
79
|
+
setCurrentEnv: r
|
|
80
|
+
};
|
|
81
|
+
}, [t, u, i, d, v, m]), M = p(
|
|
82
|
+
() => t === void 0 ? null : { appId: t, state: E },
|
|
83
|
+
[t, E]
|
|
84
|
+
);
|
|
85
|
+
return /* @__PURE__ */ y(A.Provider, { value: M, children: b });
|
|
86
|
+
}
|
|
87
|
+
export {
|
|
88
|
+
j as EnvironmentProvider
|
|
89
|
+
};
|
|
90
|
+
//# sourceMappingURL=EnvironmentProvider.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentProvider.js","sources":["../../../../src/layouts/shell/environments/EnvironmentProvider.tsx"],"sourcesContent":["import {\n type ReactElement,\n type ReactNode,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\n\nimport { readStorage, writeStorage } from '../../../lib/storage';\nimport type { AegisApp } from '../types';\nimport {\n EnvironmentContext,\n type EnvironmentContextValue,\n} from './environmentContext';\nimport {\n ENVIRONMENT_CHANGED_EVENT,\n type EnvironmentChangedEventDetail,\n type EnvironmentManifest,\n type EnvironmentManifestStatus,\n} from './types';\n\ntype LoadResult =\n | {\n status: 'loaded';\n manifest: EnvironmentManifest | null;\n /** The stored choice when it is still listed, else the default. */\n initialEnvId: string | null;\n }\n | { status: 'error'; error: Error };\n\nfunction storageKeyFor(app: AegisApp): string {\n return app.environments?.storageKey ?? `aegis.env.${app.id}`;\n}\n\ninterface EnvironmentProviderProps {\n app: AegisApp | undefined;\n children: ReactNode;\n}\n\n/**\n * Loads and holds the environments of the active app. The shell mounts\n * it; consumers read it with `useCurrentEnvironment()`. Each app's\n * manifest loads once a session, the first time the app is active.\n */\nexport function EnvironmentProvider({\n app,\n children,\n}: EnvironmentProviderProps): ReactElement {\n const [results, setResults] = useState<ReadonlyMap<string, LoadResult>>(\n () => new Map(),\n );\n const [chosen, setChosen] = useState<ReadonlyMap<string, string>>(\n () => new Map(),\n );\n\n const appId = app?.id;\n const config = app?.environments;\n const storageKey = app ? storageKeyFor(app) : null;\n const result = appId === undefined ? undefined : results.get(appId);\n const needsLoad = config !== undefined && result === undefined;\n\n useEffect(() => {\n if (!needsLoad || appId === undefined || storageKey === null) {\n return undefined;\n }\n const controller = new AbortController();\n const settle = (next: LoadResult): void => {\n if (!controller.signal.aborted) {\n setResults((prev) => new Map(prev).set(appId, next));\n }\n };\n config.load(controller.signal).then(\n (manifest) => {\n const stored = readStorage(storageKey);\n settle({\n status: 'loaded',\n manifest,\n initialEnvId:\n manifest === null\n ? null\n : manifest.environments.some((e) => e.id === stored)\n ? stored\n : manifest.default,\n });\n },\n (reason: unknown) => {\n const error =\n reason instanceof Error ? reason : new Error(String(reason));\n if (!controller.signal.aborted) {\n console.error(\n `AegisShell: loading the environments of app \"${appId}\" failed.`,\n error,\n );\n }\n settle({ status: 'error', error });\n },\n );\n return () => {\n controller.abort();\n };\n }, [needsLoad, config, appId, storageKey]);\n\n const retry = useCallback(() => {\n if (appId === undefined) {\n return;\n }\n setResults((prev) => {\n const next = new Map(prev);\n next.delete(appId);\n return next;\n });\n }, [appId]);\n\n const state = useMemo<EnvironmentManifestStatus>(() => {\n if (appId === undefined || storageKey === null || !config) {\n return { status: 'idle' };\n }\n if (!result) {\n return { status: 'loading' };\n }\n if (result.status === 'error') {\n return { status: 'error', error: result.error, retry };\n }\n const { manifest } = result;\n if (!manifest) {\n return config.fallback\n ? { status: 'unsupported', currentEnv: config.fallback }\n : { status: 'idle' };\n }\n const wanted = chosen.get(appId) ?? result.initialEnvId;\n const currentEnv =\n manifest.environments.find((e) => e.id === wanted) ??\n manifest.environments[0];\n const setCurrentEnv = (id: string): void => {\n const env = manifest.environments.find((e) => e.id === id);\n if (!env || id === currentEnv.id) {\n return;\n }\n setChosen((prev) => new Map(prev).set(appId, id));\n writeStorage(storageKey, id);\n const detail: EnvironmentChangedEventDetail = {\n appId,\n fromEnvId: currentEnv.id,\n toEnvId: id,\n env,\n };\n window.dispatchEvent(\n new CustomEvent(ENVIRONMENT_CHANGED_EVENT, { detail }),\n );\n };\n return {\n status: 'ready',\n manifest,\n currentEnvId: currentEnv.id,\n currentEnv,\n setCurrentEnv,\n };\n }, [appId, storageKey, config, result, chosen, retry]);\n\n const value = useMemo<EnvironmentContextValue | null>(\n () => (appId === undefined ? null : { appId, state }),\n [appId, state],\n );\n\n return (\n <EnvironmentContext.Provider value={value}>\n {children}\n </EnvironmentContext.Provider>\n );\n}\n"],"names":["storageKeyFor","app","EnvironmentProvider","children","results","setResults","useState","chosen","setChosen","appId","config","storageKey","result","needsLoad","useEffect","controller","settle","next","prev","manifest","stored","readStorage","e","reason","error","retry","useCallback","state","useMemo","wanted","currentEnv","setCurrentEnv","id","env","writeStorage","detail","ENVIRONMENT_CHANGED_EVENT","value","jsx","EnvironmentContext"],"mappings":"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"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(null);exports.
|
|
2
|
-
//# sourceMappingURL=
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),e=t.createContext(null);exports.EnvironmentContext=e;
|
|
2
|
+
//# sourceMappingURL=environmentContext.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environmentContext.cjs","sources":["../../../../src/layouts/shell/environments/environmentContext.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { EnvironmentManifestStatus } from './types';\n\nexport interface EnvironmentContextValue {\n appId: string;\n state: EnvironmentManifestStatus;\n}\n\nexport const EnvironmentContext = createContext<EnvironmentContextValue | null>(\n null,\n);\n"],"names":["EnvironmentContext","createContext"],"mappings":"yGASaA,EAAqBC,EAAAA,cAChC,IACF"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"environmentContext.js","sources":["../../../../src/layouts/shell/environments/environmentContext.ts"],"sourcesContent":["import { createContext } from 'react';\n\nimport type { EnvironmentManifestStatus } from './types';\n\nexport interface EnvironmentContextValue {\n appId: string;\n state: EnvironmentManifestStatus;\n}\n\nexport const EnvironmentContext = createContext<EnvironmentContextValue | null>(\n null,\n);\n"],"names":["EnvironmentContext","createContext"],"mappings":";AASO,MAAMA,IAAqBC;AAAA,EAChC;AACF;"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
export {
|
|
2
|
-
export { useCurrentEnvironment, useEnvironmentManifest } from './
|
|
3
|
-
export { clearManifestCache, fetchManifest, manifestUrl, validateManifest, } from './manifest';
|
|
1
|
+
export { EnvironmentProvider } from './EnvironmentProvider';
|
|
2
|
+
export { useCurrentEnvironment, useEnvironmentManifest, } from './useEnvironment';
|
|
4
3
|
export { ENVIRONMENT_CHANGED_EVENT, type AegisAppEnvironmentsConfig, type EnvironmentBadge, type EnvironmentChangedEventDetail, type EnvironmentDescriptor, type EnvironmentManifest, type EnvironmentManifestStatus, } from './types';
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.cjs","sources":["../../../../src/layouts/shell/environments/types.ts"],"sourcesContent":["/**\n * Backend-declared
|
|
1
|
+
{"version":3,"file":"types.cjs","sources":["../../../../src/layouts/shell/environments/types.ts"],"sourcesContent":["/**\n * Backend-declared environments — public types.\n *\n * An AegisApp opts in by setting `environments`. When the app becomes\n * active the shell calls `environments.load()` and surfaces the result\n * through the `<EnvironmentSwitcher>` in the top header. Apps read the\n * choice with `useCurrentEnvironment()` or listen for the\n * `app.environmentChanged` window event.\n */\n\nexport type EnvironmentBadge = 'default' | 'info' | 'warning' | 'danger';\n\nexport interface EnvironmentDescriptor {\n id: string;\n label: string;\n baseUrl: string;\n badge?: EnvironmentBadge;\n}\n\nexport interface EnvironmentManifest {\n /** Id of the environment chosen until the user picks another. */\n default: string;\n environments: EnvironmentDescriptor[];\n}\n\nexport interface AegisAppEnvironmentsConfig {\n /**\n * Loads the app's manifest. Called once a session when the app first\n * becomes active, and again on retry. Resolve `null` when the backend\n * declares no environments; reject when loading fails, and the header\n * reports the failure.\n */\n load: (signal: AbortSignal) => Promise<EnvironmentManifest | null>;\n /**\n * The environment reported while the backend declares none. Omitted,\n * `useCurrentEnvironment()` returns null then.\n */\n fallback?: EnvironmentDescriptor;\n /** localStorage key of the user's choice. Default `aegis.env.${app.id}`. */\n storageKey?: string;\n}\n\nexport type EnvironmentManifestStatus =\n | { status: 'idle' }\n | { status: 'loading' }\n | {\n status: 'ready';\n manifest: EnvironmentManifest;\n currentEnvId: string;\n currentEnv: EnvironmentDescriptor;\n setCurrentEnv: (id: string) => void;\n }\n | {\n status: 'unsupported';\n currentEnv: EnvironmentDescriptor;\n }\n | {\n status: 'error';\n error: Error;\n retry: () => void;\n };\n\nexport interface EnvironmentChangedEventDetail {\n appId: string;\n fromEnvId: string;\n toEnvId: string;\n env: EnvironmentDescriptor;\n}\n\n/** Window-level event name for env switch broadcasts. */\nexport const ENVIRONMENT_CHANGED_EVENT = 'app.environmentChanged';\n"],"names":["ENVIRONMENT_CHANGED_EVENT"],"mappings":"gFAsEO,MAAMA,EAA4B"}
|
|
@@ -1,12 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* Backend-declared
|
|
2
|
+
* Backend-declared environments — public types.
|
|
3
3
|
*
|
|
4
|
-
*
|
|
5
|
-
*
|
|
6
|
-
* `<
|
|
7
|
-
*
|
|
8
|
-
*
|
|
9
|
-
* event (or read `useCurrentEnvironment()`) to react to switches.
|
|
4
|
+
* An AegisApp opts in by setting `environments`. When the app becomes
|
|
5
|
+
* active the shell calls `environments.load()` and surfaces the result
|
|
6
|
+
* through the `<EnvironmentSwitcher>` in the top header. Apps read the
|
|
7
|
+
* choice with `useCurrentEnvironment()` or listen for the
|
|
8
|
+
* `app.environmentChanged` window event.
|
|
10
9
|
*/
|
|
11
10
|
export type EnvironmentBadge = 'default' | 'info' | 'warning' | 'danger';
|
|
12
11
|
export interface EnvironmentDescriptor {
|
|
@@ -16,19 +15,24 @@ export interface EnvironmentDescriptor {
|
|
|
16
15
|
badge?: EnvironmentBadge;
|
|
17
16
|
}
|
|
18
17
|
export interface EnvironmentManifest {
|
|
18
|
+
/** Id of the environment chosen until the user picks another. */
|
|
19
19
|
default: string;
|
|
20
20
|
environments: EnvironmentDescriptor[];
|
|
21
21
|
}
|
|
22
22
|
export interface AegisAppEnvironmentsConfig {
|
|
23
|
-
/** Path appended to `apiBaseUrl`. Default `/.well-known/aegis-environments.json`. */
|
|
24
|
-
discoveryPath?: string;
|
|
25
23
|
/**
|
|
26
|
-
*
|
|
27
|
-
*
|
|
28
|
-
*
|
|
24
|
+
* Loads the app's manifest. Called once a session when the app first
|
|
25
|
+
* becomes active, and again on retry. Resolve `null` when the backend
|
|
26
|
+
* declares no environments; reject when loading fails, and the header
|
|
27
|
+
* reports the failure.
|
|
29
28
|
*/
|
|
30
|
-
|
|
31
|
-
/**
|
|
29
|
+
load: (signal: AbortSignal) => Promise<EnvironmentManifest | null>;
|
|
30
|
+
/**
|
|
31
|
+
* The environment reported while the backend declares none. Omitted,
|
|
32
|
+
* `useCurrentEnvironment()` returns null then.
|
|
33
|
+
*/
|
|
34
|
+
fallback?: EnvironmentDescriptor;
|
|
35
|
+
/** localStorage key of the user's choice. Default `aegis.env.${app.id}`. */
|
|
32
36
|
storageKey?: string;
|
|
33
37
|
}
|
|
34
38
|
export type EnvironmentManifestStatus = {
|
|
@@ -44,10 +48,14 @@ export type EnvironmentManifestStatus = {
|
|
|
44
48
|
} | {
|
|
45
49
|
status: 'unsupported';
|
|
46
50
|
currentEnv: EnvironmentDescriptor;
|
|
51
|
+
} | {
|
|
52
|
+
status: 'error';
|
|
53
|
+
error: Error;
|
|
54
|
+
retry: () => void;
|
|
47
55
|
};
|
|
48
56
|
export interface EnvironmentChangedEventDetail {
|
|
49
57
|
appId: string;
|
|
50
|
-
fromEnvId: string
|
|
58
|
+
fromEnvId: string;
|
|
51
59
|
toEnvId: string;
|
|
52
60
|
env: EnvironmentDescriptor;
|
|
53
61
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.js","sources":["../../../../src/layouts/shell/environments/types.ts"],"sourcesContent":["/**\n * Backend-declared
|
|
1
|
+
{"version":3,"file":"types.js","sources":["../../../../src/layouts/shell/environments/types.ts"],"sourcesContent":["/**\n * Backend-declared environments — public types.\n *\n * An AegisApp opts in by setting `environments`. When the app becomes\n * active the shell calls `environments.load()` and surfaces the result\n * through the `<EnvironmentSwitcher>` in the top header. Apps read the\n * choice with `useCurrentEnvironment()` or listen for the\n * `app.environmentChanged` window event.\n */\n\nexport type EnvironmentBadge = 'default' | 'info' | 'warning' | 'danger';\n\nexport interface EnvironmentDescriptor {\n id: string;\n label: string;\n baseUrl: string;\n badge?: EnvironmentBadge;\n}\n\nexport interface EnvironmentManifest {\n /** Id of the environment chosen until the user picks another. */\n default: string;\n environments: EnvironmentDescriptor[];\n}\n\nexport interface AegisAppEnvironmentsConfig {\n /**\n * Loads the app's manifest. Called once a session when the app first\n * becomes active, and again on retry. Resolve `null` when the backend\n * declares no environments; reject when loading fails, and the header\n * reports the failure.\n */\n load: (signal: AbortSignal) => Promise<EnvironmentManifest | null>;\n /**\n * The environment reported while the backend declares none. Omitted,\n * `useCurrentEnvironment()` returns null then.\n */\n fallback?: EnvironmentDescriptor;\n /** localStorage key of the user's choice. Default `aegis.env.${app.id}`. */\n storageKey?: string;\n}\n\nexport type EnvironmentManifestStatus =\n | { status: 'idle' }\n | { status: 'loading' }\n | {\n status: 'ready';\n manifest: EnvironmentManifest;\n currentEnvId: string;\n currentEnv: EnvironmentDescriptor;\n setCurrentEnv: (id: string) => void;\n }\n | {\n status: 'unsupported';\n currentEnv: EnvironmentDescriptor;\n }\n | {\n status: 'error';\n error: Error;\n retry: () => void;\n };\n\nexport interface EnvironmentChangedEventDetail {\n appId: string;\n fromEnvId: string;\n toEnvId: string;\n env: EnvironmentDescriptor;\n}\n\n/** Window-level event name for env switch broadcasts. */\nexport const ENVIRONMENT_CHANGED_EVENT = 'app.environmentChanged';\n"],"names":["ENVIRONMENT_CHANGED_EVENT"],"mappings":"AAsEO,MAAMA,IAA4B;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("react"),n=require("./environmentContext.cjs");function r(){const e=t.useContext(n.EnvironmentContext);if(!e)return null;switch(e.state.status){case"ready":case"unsupported":return e.state.currentEnv;case"idle":case"loading":case"error":return null}}function s(){const e=t.useContext(n.EnvironmentContext);return e?e.state:{status:"idle"}}exports.useCurrentEnvironment=r;exports.useEnvironmentManifest=s;
|
|
2
|
+
//# sourceMappingURL=useEnvironment.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnvironment.cjs","sources":["../../../../src/layouts/shell/environments/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { EnvironmentContext } from './environmentContext';\nimport type { EnvironmentDescriptor, EnvironmentManifestStatus } from './types';\n\n/**\n * Read the active app's current environment selection. Returns `null`\n * when no app is active, while the manifest loads, when loading failed,\n * and when the backend declares none and the app gives no fallback.\n */\nexport function useCurrentEnvironment(): EnvironmentDescriptor | null {\n const ctx = useContext(EnvironmentContext);\n if (!ctx) {\n return null;\n }\n switch (ctx.state.status) {\n case 'ready':\n case 'unsupported':\n return ctx.state.currentEnv;\n case 'idle':\n case 'loading':\n case 'error':\n return null;\n }\n}\n\n/** Read the full status object — useful for the switcher itself. */\nexport function useEnvironmentManifest(): EnvironmentManifestStatus {\n const ctx = useContext(EnvironmentContext);\n if (!ctx) {\n return { status: 'idle' };\n }\n return ctx.state;\n}\n"],"names":["useCurrentEnvironment","ctx","useContext","EnvironmentContext","useEnvironmentManifest"],"mappings":"+IAUO,SAASA,GAAsD,CACpE,MAAMC,EAAMC,EAAAA,WAAWC,oBAAkB,EACzC,GAAI,CAACF,EACH,OAAO,KAET,OAAQA,EAAI,MAAM,OAAA,CAChB,IAAK,QACL,IAAK,cACH,OAAOA,EAAI,MAAM,WACnB,IAAK,OACL,IAAK,UACL,IAAK,QACH,OAAO,IAAA,CAEb,CAGO,SAASG,GAAoD,CAClE,MAAMH,EAAMC,EAAAA,WAAWC,oBAAkB,EACzC,OAAKF,EAGEA,EAAI,MAFF,CAAE,OAAQ,MAAA,CAGrB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { EnvironmentDescriptor, EnvironmentManifestStatus } from './types';
|
|
2
2
|
/**
|
|
3
|
-
* Read the active app's current environment selection. Returns `null`
|
|
4
|
-
* no app is active
|
|
3
|
+
* Read the active app's current environment selection. Returns `null`
|
|
4
|
+
* when no app is active, while the manifest loads, when loading failed,
|
|
5
|
+
* and when the backend declares none and the app gives no fallback.
|
|
5
6
|
*/
|
|
6
7
|
export declare function useCurrentEnvironment(): EnvironmentDescriptor | null;
|
|
7
8
|
/** Read the full status object — useful for the switcher itself. */
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { useContext as e } from "react";
|
|
2
|
+
import { EnvironmentContext as n } from "./environmentContext.js";
|
|
3
|
+
function u() {
|
|
4
|
+
const t = e(n);
|
|
5
|
+
if (!t)
|
|
6
|
+
return null;
|
|
7
|
+
switch (t.state.status) {
|
|
8
|
+
case "ready":
|
|
9
|
+
case "unsupported":
|
|
10
|
+
return t.state.currentEnv;
|
|
11
|
+
case "idle":
|
|
12
|
+
case "loading":
|
|
13
|
+
case "error":
|
|
14
|
+
return null;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
function o() {
|
|
18
|
+
const t = e(n);
|
|
19
|
+
return t ? t.state : { status: "idle" };
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
u as useCurrentEnvironment,
|
|
23
|
+
o as useEnvironmentManifest
|
|
24
|
+
};
|
|
25
|
+
//# sourceMappingURL=useEnvironment.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useEnvironment.js","sources":["../../../../src/layouts/shell/environments/useEnvironment.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { EnvironmentContext } from './environmentContext';\nimport type { EnvironmentDescriptor, EnvironmentManifestStatus } from './types';\n\n/**\n * Read the active app's current environment selection. Returns `null`\n * when no app is active, while the manifest loads, when loading failed,\n * and when the backend declares none and the app gives no fallback.\n */\nexport function useCurrentEnvironment(): EnvironmentDescriptor | null {\n const ctx = useContext(EnvironmentContext);\n if (!ctx) {\n return null;\n }\n switch (ctx.state.status) {\n case 'ready':\n case 'unsupported':\n return ctx.state.currentEnv;\n case 'idle':\n case 'loading':\n case 'error':\n return null;\n }\n}\n\n/** Read the full status object — useful for the switcher itself. */\nexport function useEnvironmentManifest(): EnvironmentManifestStatus {\n const ctx = useContext(EnvironmentContext);\n if (!ctx) {\n return { status: 'idle' };\n }\n return ctx.state;\n}\n"],"names":["useCurrentEnvironment","ctx","useContext","EnvironmentContext","useEnvironmentManifest"],"mappings":";;AAUO,SAASA,IAAsD;AACpE,QAAMC,IAAMC,EAAWC,CAAkB;AACzC,MAAI,CAACF;AACH,WAAO;AAET,UAAQA,EAAI,MAAM,QAAA;AAAA,IAChB,KAAK;AAAA,IACL,KAAK;AACH,aAAOA,EAAI,MAAM;AAAA,IACnB,KAAK;AAAA,IACL,KAAK;AAAA,IACL,KAAK;AACH,aAAO;AAAA,EAAA;AAEb;AAGO,SAASG,IAAoD;AAClE,QAAMH,IAAMC,EAAWC,CAAkB;AACzC,SAAKF,IAGEA,EAAI,QAFF,EAAE,QAAQ,OAAA;AAGrB;"}
|
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
export { AegisShell } from './AegisShell';
|
|
2
|
+
export { ShellInboxPage } from './ShellInboxPage';
|
|
3
|
+
export { isAppVisible } from './apps';
|
|
2
4
|
export { useActiveApp } from './activeAppContext';
|
|
3
5
|
export type { ActiveAppContextValue } from './activeAppContext';
|
|
4
6
|
export { useAppHref, useAppNavigate } from './useAppNavigate';
|
|
5
7
|
export type { AegisApp, AegisAppNavGroup, AegisAppNavItem, AegisBrand, AegisShellProps, AegisUser, AegisUserMenuItem, } from './types';
|
|
6
|
-
export { ENVIRONMENT_CHANGED_EVENT,
|
|
8
|
+
export { ENVIRONMENT_CHANGED_EVENT, useCurrentEnvironment, useEnvironmentManifest, } from './environments';
|
|
7
9
|
export type { AegisAppEnvironmentsConfig, EnvironmentBadge, EnvironmentChangedEventDetail, EnvironmentDescriptor, EnvironmentManifest, EnvironmentManifestStatus, } from './environments';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { ReactNode } from 'react';
|
|
2
2
|
import { RouteObject } from 'react-router-dom';
|
|
3
|
-
import { AegisRuntime } from '../../agent
|
|
3
|
+
import { AegisRuntime } from '../../agent';
|
|
4
4
|
import { Command } from '../../commands';
|
|
5
5
|
import { AmbientBackgroundVariant } from '../../components/ui/AmbientBackground';
|
|
6
6
|
import { AegisAppEnvironmentsConfig } from './environments/types';
|
|
@@ -97,17 +97,13 @@ export interface AegisApp {
|
|
|
97
97
|
*/
|
|
98
98
|
requiredRoles?: string[];
|
|
99
99
|
/**
|
|
100
|
-
*
|
|
101
|
-
*
|
|
102
|
-
*
|
|
103
|
-
*
|
|
104
|
-
*
|
|
105
|
-
*
|
|
106
|
-
* The shell does not rewrite axios base URLs — it surfaces the choice;
|
|
100
|
+
* The app's backend-declared environments. While the app is active the
|
|
101
|
+
* shell loads them with `environments.load()` and renders an
|
|
102
|
+
* `<EnvironmentSwitcher>` in the top header; apps read the choice with
|
|
103
|
+
* `useCurrentEnvironment()` or the `app.environmentChanged` window event.
|
|
104
|
+
* The shell does not rewrite API base URLs — it surfaces the choice;
|
|
107
105
|
* apps consume it.
|
|
108
106
|
*/
|
|
109
|
-
apiBaseUrl?: string;
|
|
110
|
-
/** Optional knobs for environment discovery. See AegisAppEnvironmentsConfig. */
|
|
111
107
|
environments?: AegisAppEnvironmentsConfig;
|
|
112
108
|
}
|
|
113
109
|
export interface AegisUserMenuItem {
|
|
@@ -173,10 +169,12 @@ export interface AegisShellProps {
|
|
|
173
169
|
*/
|
|
174
170
|
ambient?: AmbientBackgroundVariant;
|
|
175
171
|
/**
|
|
176
|
-
* When set, a notification bell
|
|
177
|
-
* `headerActions` and the user menu)
|
|
178
|
-
*
|
|
179
|
-
*
|
|
172
|
+
* When set, a notification bell filled from `<NotificationProvider>` is
|
|
173
|
+
* rendered in the top header (between `headerActions` and the user menu)
|
|
174
|
+
* and clicking "View all" routes to this path; mount
|
|
175
|
+
* `<ShellInboxPage>` there. When omitted, the bell is not
|
|
176
|
+
* rendered — apps without a notification provider don't show an empty
|
|
177
|
+
* bell.
|
|
180
178
|
*/
|
|
181
179
|
inboxPath?: string;
|
|
182
180
|
/** Fired when the user navigates between apps. */
|
|
@@ -189,6 +187,8 @@ export interface AegisShellProps {
|
|
|
189
187
|
* Don't also render <CommandPalette/> yourself.
|
|
190
188
|
*/
|
|
191
189
|
enableCommandPalette?: boolean;
|
|
190
|
+
/** The palette's group labels in display order; see CommandPalette's `groupOrder`. */
|
|
191
|
+
commandGroupOrder?: string[];
|
|
192
192
|
/**
|
|
193
193
|
* When provided, AegisShell renders the node (typically <AgentPanel/>
|
|
194
194
|
* filled from useAgentChat()) as a right-side column while the agent
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),c=require("./useWarnOnce.cjs"),a=require("../../agent/chat/useAgentChat.cjs");function g(r){const{panelOpen:o,setPanelOpen:e}=a.useAgentChat(),n=a.useHasAgentChatProvider(),t=r!=null;c.useWarnOnce(t&&!n,"AegisShell: agentPanel needs an <AgentChatProvider> above the shell; the agent panel is not rendered.");const s=t&&n&&o===!0,l=u.useCallback(()=>{e?.(!s)},[e,s]);return{open:s,toggle:t&&n&&e?l:void 0}}exports.useAgentPanel=g;
|
|
2
|
+
//# sourceMappingURL=useAgentPanel.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentPanel.cjs","sources":["../../../src/layouts/shell/useAgentPanel.ts"],"sourcesContent":["import { type ReactNode, useCallback } from 'react';\n\nimport { useAgentChat, useHasAgentChatProvider } from '../../agent';\nimport { useWarnOnce } from './useWarnOnce';\n\ninterface AgentPanelState {\n open: boolean;\n /** Set while the panel can be shown and the agent context can toggle it. */\n toggle: (() => void) | undefined;\n}\n\n/**\n * The shell's agent panel, driven by the agent context's `panelOpen`.\n * Without an `<AgentChatProvider>` the panel stays closed and a warning\n * is logged.\n */\nexport function useAgentPanel(agentPanel: ReactNode): AgentPanelState {\n const { panelOpen, setPanelOpen } = useAgentChat();\n const hasProvider = useHasAgentChatProvider();\n const hasPanel = agentPanel !== undefined && agentPanel !== null;\n useWarnOnce(\n hasPanel && !hasProvider,\n 'AegisShell: agentPanel needs an <AgentChatProvider> above the shell; the agent panel is not rendered.',\n );\n const open = hasPanel && hasProvider && panelOpen === true;\n const toggle = useCallback(() => {\n setPanelOpen?.(!open);\n }, [setPanelOpen, open]);\n return {\n open,\n toggle: hasPanel && hasProvider && setPanelOpen ? toggle : undefined,\n };\n}\n"],"names":["useAgentPanel","agentPanel","panelOpen","setPanelOpen","useAgentChat","hasProvider","useHasAgentChatProvider","hasPanel","useWarnOnce","open","toggle","useCallback"],"mappings":"uLAgBO,SAASA,EAAcC,EAAwC,CACpE,KAAM,CAAE,UAAAC,EAAW,aAAAC,CAAA,EAAiBC,eAAA,EAC9BC,EAAcC,EAAAA,wBAAA,EACdC,EAAuCN,GAAe,KAC5DO,EAAAA,YACED,GAAY,CAACF,EACb,uGAAA,EAEF,MAAMI,EAAOF,GAAYF,GAAeH,IAAc,GAChDQ,EAASC,EAAAA,YAAY,IAAM,CAC/BR,IAAe,CAACM,CAAI,CACtB,EAAG,CAACN,EAAcM,CAAI,CAAC,EACvB,MAAO,CACL,KAAAA,EACA,OAAQF,GAAYF,GAAeF,EAAeO,EAAS,MAAA,CAE/D"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { ReactNode } from 'react';
|
|
2
|
+
interface AgentPanelState {
|
|
3
|
+
open: boolean;
|
|
4
|
+
/** Set while the panel can be shown and the agent context can toggle it. */
|
|
5
|
+
toggle: (() => void) | undefined;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The shell's agent panel, driven by the agent context's `panelOpen`.
|
|
9
|
+
* Without an `<AgentChatProvider>` the panel stays closed and a warning
|
|
10
|
+
* is logged.
|
|
11
|
+
*/
|
|
12
|
+
export declare function useAgentPanel(agentPanel: ReactNode): AgentPanelState;
|
|
13
|
+
export {};
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { useCallback as l } from "react";
|
|
2
|
+
import { useWarnOnce as i } from "./useWarnOnce.js";
|
|
3
|
+
import { useAgentChat as g, useHasAgentChatProvider as h } from "../../agent/chat/useAgentChat.js";
|
|
4
|
+
function d(r) {
|
|
5
|
+
const { panelOpen: s, setPanelOpen: e } = g(), n = h(), t = r != null;
|
|
6
|
+
i(
|
|
7
|
+
t && !n,
|
|
8
|
+
"AegisShell: agentPanel needs an <AgentChatProvider> above the shell; the agent panel is not rendered."
|
|
9
|
+
);
|
|
10
|
+
const o = t && n && s === !0, a = l(() => {
|
|
11
|
+
e?.(!o);
|
|
12
|
+
}, [e, o]);
|
|
13
|
+
return {
|
|
14
|
+
open: o,
|
|
15
|
+
toggle: t && n && e ? a : void 0
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export {
|
|
19
|
+
d as useAgentPanel
|
|
20
|
+
};
|
|
21
|
+
//# sourceMappingURL=useAgentPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAgentPanel.js","sources":["../../../src/layouts/shell/useAgentPanel.ts"],"sourcesContent":["import { type ReactNode, useCallback } from 'react';\n\nimport { useAgentChat, useHasAgentChatProvider } from '../../agent';\nimport { useWarnOnce } from './useWarnOnce';\n\ninterface AgentPanelState {\n open: boolean;\n /** Set while the panel can be shown and the agent context can toggle it. */\n toggle: (() => void) | undefined;\n}\n\n/**\n * The shell's agent panel, driven by the agent context's `panelOpen`.\n * Without an `<AgentChatProvider>` the panel stays closed and a warning\n * is logged.\n */\nexport function useAgentPanel(agentPanel: ReactNode): AgentPanelState {\n const { panelOpen, setPanelOpen } = useAgentChat();\n const hasProvider = useHasAgentChatProvider();\n const hasPanel = agentPanel !== undefined && agentPanel !== null;\n useWarnOnce(\n hasPanel && !hasProvider,\n 'AegisShell: agentPanel needs an <AgentChatProvider> above the shell; the agent panel is not rendered.',\n );\n const open = hasPanel && hasProvider && panelOpen === true;\n const toggle = useCallback(() => {\n setPanelOpen?.(!open);\n }, [setPanelOpen, open]);\n return {\n open,\n toggle: hasPanel && hasProvider && setPanelOpen ? toggle : undefined,\n };\n}\n"],"names":["useAgentPanel","agentPanel","panelOpen","setPanelOpen","useAgentChat","hasProvider","useHasAgentChatProvider","hasPanel","useWarnOnce","open","toggle","useCallback"],"mappings":";;;AAgBO,SAASA,EAAcC,GAAwC;AACpE,QAAM,EAAE,WAAAC,GAAW,cAAAC,EAAA,IAAiBC,EAAA,GAC9BC,IAAcC,EAAA,GACdC,IAAuCN,KAAe;AAC5D,EAAAO;AAAA,IACED,KAAY,CAACF;AAAA,IACb;AAAA,EAAA;AAEF,QAAMI,IAAOF,KAAYF,KAAeH,MAAc,IAChDQ,IAASC,EAAY,MAAM;AAC/B,IAAAR,IAAe,CAACM,CAAI;AAAA,EACtB,GAAG,CAACN,GAAcM,CAAI,CAAC;AACvB,SAAO;AAAA,IACL,MAAAA;AAAA,IACA,QAAQF,KAAYF,KAAeF,IAAeO,IAAS;AAAA,EAAA;AAE/D;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),a=require("../../commands/useCommands.cjs");function r(s,o){const{register:t,setActiveScope:m}=a.useCommands();e.useEffect(()=>{m(o)},[m,o]);const n=e.useMemo(()=>s.flatMap(c=>(c.commands??[]).map(u=>({...u,scope:c.id}))),[s]);e.useEffect(()=>t(n),[t,n])}exports.useAppCommands=r;
|
|
2
|
+
//# sourceMappingURL=useAppCommands.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useAppCommands.cjs","sources":["../../../src/layouts/shell/useAppCommands.ts"],"sourcesContent":["import { useEffect, useMemo } from 'react';\n\nimport { type Command, useCommands } from '../../commands';\nimport type { AegisApp } from './types';\n\n/**\n * Registers each visible app's `commands`, scoped to that app, and points\n * the registry's active scope at the active app.\n */\nexport function useAppCommands(\n visibleApps: AegisApp[],\n activeAppId: string | undefined,\n): void {\n const { register, setActiveScope } = useCommands();\n\n useEffect(() => {\n setActiveScope(activeAppId);\n }, [setActiveScope, activeAppId]);\n\n const appCommands = useMemo<Command[]>(\n () =>\n visibleApps.flatMap((app) =>\n (app.commands ?? []).map((cmd) => ({ ...cmd, scope: app.id })),\n ),\n [visibleApps],\n );\n useEffect(() => register(appCommands), [register, appCommands]);\n}\n"],"names":["useAppCommands","visibleApps","activeAppId","register","setActiveScope","useCommands","useEffect","appCommands","useMemo","app","cmd"],"mappings":"qJASO,SAASA,EACdC,EACAC,EACM,CACN,KAAM,CAAE,SAAAC,EAAU,eAAAC,CAAA,EAAmBC,cAAA,EAErCC,EAAAA,UAAU,IAAM,CACdF,EAAeF,CAAW,CAC5B,EAAG,CAACE,EAAgBF,CAAW,CAAC,EAEhC,MAAMK,EAAcC,EAAAA,QAClB,IACEP,EAAY,QAASQ,IAClBA,EAAI,UAAY,CAAA,GAAI,IAAKC,IAAS,CAAE,GAAGA,EAAK,MAAOD,EAAI,IAAK,CAAA,EAEjE,CAACR,CAAW,CAAA,EAEdK,EAAAA,UAAU,IAAMH,EAASI,CAAW,EAAG,CAACJ,EAAUI,CAAW,CAAC,CAChE"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { AegisApp } from './types';
|
|
2
|
+
/**
|
|
3
|
+
* Registers each visible app's `commands`, scoped to that app, and points
|
|
4
|
+
* the registry's active scope at the active app.
|
|
5
|
+
*/
|
|
6
|
+
export declare function useAppCommands(visibleApps: AegisApp[], activeAppId: string | undefined): void;
|