@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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AegisShell.js","sources":["../../../src/layouts/shell/AegisShell.tsx"],"sourcesContent":["import {\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport {\n Navigate,\n type RouteObject,\n useLocation,\n useNavigate,\n useRoutes,\n} from 'react-router-dom';\n\nimport {\n AegisRuntimeProvider,\n AskOverlay,\n type ShellSnapshot,\n useAgentChat,\n} from '../../agent';\nimport { defaultAgentChatValue } from '../../agent/chat/chat';\nimport { type AegisAuthUser, type AuthStatus, useAuth } from '../../auth';\nimport { type Command, useCommands } from '../../commands';\nimport { defaultCommandContextValue } from '../../commands/commandContext';\nimport { AmbientBackground } from '../../components/ui/AmbientBackground';\nimport { Chip } from '../../components/ui/Chip';\nimport { CommandPalette } from '../../components/ui/CommandPalette';\nimport { useWindowScrolled } from '../../hooks/useWindowScrolled';\nimport { readStorage, writeStorage } from '../../lib/storage';\nimport { useStrings } from '../../locale';\nimport { ThemeContext } from '../../theme/themeContext';\nimport { PageWrapper } from '../PageWrapper';\nimport { SkipLink } from '../SkipLink';\nimport './AegisShell.css';\nimport { AuthRequiredCard } from './AuthRequiredCard';\nimport { BreadcrumbBar } from './BreadcrumbBar';\nimport { Sidebar } from './Sidebar';\nimport { TopHeader } from './TopHeader';\nimport { ActiveAppContext } from './activeAppContext';\nimport { ActiveAppEnvironmentProvider } from './environments';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp, AegisShellProps, AegisUser } from './types';\n\nconst SIDEBAR_COLLAPSED_KEY = 'aegis-shell.sidebar-collapsed';\n\n/**\n * Top-level layout: top header, two-section sidebar, breadcrumb bar, and\n * a routed content area composed from `apps`.\n *\n * Each app's `routes` is mounted under its `basePath`. The shell renders\n * the chrome around every app — apps themselves only render page content\n * inside a `<PageWrapper>` (the shell wraps the outlet automatically).\n */\nexport function AegisShell({\n brand,\n apps,\n rootRoutes = [],\n fallbackPath,\n notFoundElement,\n user,\n userMenu,\n headerCenter,\n headerActions,\n appSwitcher = true,\n elevateHeaderOnScroll = false,\n ambient,\n inboxPath,\n onAppSwitch,\n enableCommandPalette = false,\n agentPanel,\n agentRuntime,\n}: AegisShellProps): ReactElement {\n const location = useLocation();\n const navigate = useNavigate();\n const strings = useStrings();\n const { pathname } = location;\n const auth = useAuth();\n const themeCtx = useContext(ThemeContext);\n const [mobileNavOpen, setMobileNavOpen] = useState(false);\n const [sidebarCollapsed, setSidebarCollapsed] = useState<boolean>(\n () => readStorage(SIDEBAR_COLLAPSED_KEY) === '1',\n );\n const [inlineSlot, setInlineSlot] = useState<HTMLDivElement | null>(null);\n const windowScrolled = useWindowScrolled();\n const headerScrolled = elevateHeaderOnScroll && windowScrolled;\n const mainRef = useRef<HTMLElement>(null);\n\n const resolvedUser = useMemo<AegisUser | undefined>(() => {\n if (user) {\n return user;\n }\n if (auth.status !== 'authenticated' || !auth.user) {\n return undefined;\n }\n const menu = [...(userMenu ?? [])];\n if (auth.signOut) {\n menu.push({\n key: 'sign-out',\n label: 'Sign out',\n onClick: () => {\n void auth.signOut?.();\n },\n });\n }\n return { name: auth.user.name, menu };\n }, [user, userMenu, auth]);\n\n const visibleApps = useMemo(\n () => apps.filter((app) => isAppVisible(app, auth.status, auth.user)),\n [apps, auth.status, auth.user],\n );\n\n const activeApp = useMemo(\n () => findActiveApp(apps, pathname),\n [apps, pathname],\n );\n\n const activeAppValue = useMemo(\n () =>\n activeApp\n ? { id: activeApp.id, basePath: normalizeBasePath(activeApp.basePath) }\n : null,\n [activeApp],\n );\n\n useEffect(() => {\n assertUniqueBasePaths(apps);\n }, [apps]);\n\n const commandRegistry = useCommands();\n const hasCommandProvider = commandRegistry !== defaultCommandContextValue;\n const { register, setActiveScope } = commandRegistry;\n const activeAppId = activeApp?.id;\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 const showCommandPalette = enableCommandPalette && hasCommandProvider;\n useWarnOnce(\n enableCommandPalette && !hasCommandProvider,\n 'AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.',\n );\n\n const agent = useAgentChat();\n const hasAgentProvider = agent !== defaultAgentChatValue;\n const hasAgentPanel = Boolean(agentPanel);\n useWarnOnce(\n hasAgentPanel && !hasAgentProvider,\n 'AegisShell: agentPanel needs an <AgentChatProvider> above the shell; the agent panel is not rendered.',\n );\n const agentPanelEnabled = hasAgentPanel && hasAgentProvider;\n const agentPanelOpen = agentPanelEnabled && agent.panelOpen === true;\n const { setPanelOpen } = agent;\n const toggleAgentPanel = useCallback(() => {\n setPanelOpen?.(!agentPanelOpen);\n }, [setPanelOpen, agentPanelOpen]);\n\n // Auto-close the drawer on navigation.\n useEffect(() => {\n setMobileNavOpen(false);\n }, [pathname]);\n\n const closeMobileNav = useCallback(() => setMobileNavOpen(false), []);\n const toggleMobileNav = useCallback(\n () => setMobileNavOpen((open) => !open),\n [],\n );\n const toggleSidebar = useCallback(() => {\n setSidebarCollapsed((collapsed) => {\n const next = !collapsed;\n writeStorage(SIDEBAR_COLLAPSED_KEY, next ? '1' : '0');\n return next;\n });\n }, []);\n\n const routeTree = useMemo<RouteObject[]>(() => {\n const appRoutes: RouteObject[] = apps.map((app) => ({\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={\n auth.signIn\n ? () => {\n void auth.signIn?.({});\n }\n : undefined\n }\n />\n )}\n </PageWrapper>\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 bareRootRoutes = 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 ...bareRootRoutes,\n ...inShellRootRoutes,\n ...appRoutes,\n ...(fallback ? [fallback] : []),\n ];\n }, [apps, rootRoutes, fallbackPath, notFoundElement, auth]);\n\n const element = useRoutes(routeTree);\n\n const shellSnapshot = useCallback((): ShellSnapshot => {\n const w = typeof window !== 'undefined' ? window : null;\n return {\n currentAppId: activeApp?.id ?? null,\n route: {\n pathname,\n search: location.search,\n params: {},\n },\n breadcrumbs: [],\n theme: themeCtx?.resolved ?? 'light',\n viewport: {\n width: w?.innerWidth ?? 0,\n height: w?.innerHeight ?? 0,\n },\n };\n }, [activeApp, pathname, location.search, themeCtx]);\n\n // Bare routes (e.g. /login) render without the shell chrome.\n const isBareRoute = rootRoutes.some(\n (r) => r.bare && r.path && pathname === r.path,\n );\n if (isBareRoute) {\n return <div>{element}</div>;\n }\n\n const appHasSidebar = Boolean(\n activeApp?.sidebar && activeApp.sidebar.length > 0,\n );\n const hasSidebar = appHasSidebar && !sidebarCollapsed;\n\n const shellClass = [\n 'aegis-shell',\n hasSidebar ? 'aegis-shell--with-sidebar' : 'aegis-shell--no-sidebar',\n mobileNavOpen ? 'aegis-shell--mobile-nav-open' : '',\n agentPanelOpen ? 'aegis-shell--with-agent-panel' : '',\n ambient ? 'aegis-shell--ambient' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <AegisRuntimeProvider\n runtime={agentRuntime}\n appId={activeApp?.id ?? null}\n shellSnapshot={shellSnapshot}\n navigate={navigate}\n >\n <ActiveAppEnvironmentProvider app={activeApp}>\n <div className={shellClass}>\n <SkipLink targetId=\"aegis-main\" targetRef={mainRef} />\n {ambient && <AmbientBackground variant={ambient} />}\n <TopHeader\n brand={brand}\n apps={visibleApps}\n activeAppId={activeApp?.id}\n onAppSwitch={onAppSwitch}\n appSwitcher={appSwitcher}\n scrolled={headerScrolled}\n user={resolvedUser}\n headerCenter={headerCenter}\n headerActions={\n <>\n {headerActions}\n {auth.status === 'unauthenticated' && auth.signIn && (\n <Chip\n tone=\"ink\"\n onClick={() => {\n void auth.signIn?.({});\n }}\n >\n Sign in\n </Chip>\n )}\n </>\n }\n inboxPath={auth.status === 'authenticated' ? inboxPath : undefined}\n onMobileMenuToggle={toggleMobileNav}\n showMobileMenu={appHasSidebar}\n sidebarCollapsible={appHasSidebar}\n sidebarCollapsed={sidebarCollapsed}\n onSidebarToggle={toggleSidebar}\n inlineSlotRef={setInlineSlot}\n inlineSlotActive={Boolean(activeApp?.header)}\n agentPanelOpen={agentPanelOpen}\n onAgentPanelToggle={\n agentPanelEnabled && setPanelOpen ? toggleAgentPanel : undefined\n }\n />\n {appHasSidebar && <Sidebar activeApp={activeApp} />}\n <button\n type=\"button\"\n className=\"aegis-shell__backdrop\"\n aria-label={strings.closeNavigation}\n onClick={closeMobileNav}\n />\n <main\n id=\"aegis-main\"\n ref={mainRef}\n tabIndex={-1}\n className=\"aegis-shell__main\"\n >\n {renderAppRegion(\n activeApp,\n activeAppValue,\n <>\n {activeApp?.header &&\n inlineSlot &&\n createPortal(activeApp.header, inlineSlot)}\n {activeApp?.breadcrumbBar !== false && (\n <BreadcrumbBar apps={apps} activeApp={activeApp} />\n )}\n <div className=\"aegis-shell__content\">{element}</div>\n </>,\n )}\n </main>\n {agentPanelOpen && (\n <div className=\"aegis-shell__agent-panel\">{agentPanel}</div>\n )}\n <AskOverlay />\n {showCommandPalette && <CommandPalette />}\n </div>\n </ActiveAppEnvironmentProvider>\n </AegisRuntimeProvider>\n );\n}\n\nfunction useWarnOnce(shouldWarn: boolean, message: string): void {\n const warnedRef = useRef(false);\n useEffect(() => {\n if (shouldWarn && !warnedRef.current) {\n warnedRef.current = true;\n console.warn(message);\n }\n }, [shouldWarn, message]);\n}\n\nfunction AppRoutes({ app }: { app: AegisApp }): ReactElement | null {\n return useRoutes(app.routes);\n}\n\nfunction renderAppRegion(\n app: AegisApp | undefined,\n appValue: { id: string; basePath: string } | null,\n children: ReactElement,\n): ReactElement {\n if (!app || !appValue) {\n return children;\n }\n const inner = (\n <ActiveAppContext.Provider value={appValue}>\n {children}\n </ActiveAppContext.Provider>\n );\n return app.wrap ? <>{app.wrap(inner)}</> : inner;\n}\n\nfunction assertUniqueBasePaths(apps: AegisApp[]): void {\n const seen = new Map<string, string>();\n for (const app of apps) {\n const key = normalizeBasePath(app.basePath);\n const prev = seen.get(key);\n if (prev) {\n console.error(\n `AegisShell: duplicate basePath \"${key}\" on apps \"${prev}\" and \"${app.id}\". ` +\n `Routing will collide — give each app a unique basePath.`,\n );\n }\n seen.set(key, app.id);\n }\n}\n\nfunction findActiveApp(\n apps: AegisApp[],\n pathname: string,\n): AegisApp | undefined {\n // Longest-prefix wins so that nested basePaths still work.\n const candidates = apps\n .filter((app) => {\n const base = normalizeBasePath(app.basePath);\n return pathname === base || pathname.startsWith(`${base}/`);\n })\n .sort(\n (a, b) =>\n normalizeBasePath(b.basePath).length -\n normalizeBasePath(a.basePath).length,\n );\n return candidates[0];\n}\n\nfunction isAppVisible(\n app: AegisApp,\n status: AuthStatus,\n user: AegisAuthUser | null,\n): boolean {\n if (app.requiresAuth === false) {\n return true;\n }\n if (status !== 'authenticated') {\n return false;\n }\n if (!app.requiredRoles || app.requiredRoles.length === 0) {\n return true;\n }\n const userRoles = user?.roles ?? [];\n return app.requiredRoles.some((r) => userRoles.includes(r));\n}\n"],"names":["SIDEBAR_COLLAPSED_KEY","AegisShell","brand","apps","rootRoutes","fallbackPath","notFoundElement","user","userMenu","headerCenter","headerActions","appSwitcher","elevateHeaderOnScroll","ambient","inboxPath","onAppSwitch","enableCommandPalette","agentPanel","agentRuntime","location","useLocation","navigate","useNavigate","strings","useStrings","pathname","auth","useAuth","themeCtx","useContext","ThemeContext","mobileNavOpen","setMobileNavOpen","useState","sidebarCollapsed","setSidebarCollapsed","readStorage","inlineSlot","setInlineSlot","windowScrolled","useWindowScrolled","headerScrolled","mainRef","useRef","resolvedUser","useMemo","menu","visibleApps","app","isAppVisible","activeApp","findActiveApp","activeAppValue","normalizeBasePath","useEffect","assertUniqueBasePaths","commandRegistry","useCommands","hasCommandProvider","defaultCommandContextValue","register","setActiveScope","activeAppId","appCommands","cmd","showCommandPalette","useWarnOnce","agent","useAgentChat","hasAgentProvider","defaultAgentChatValue","hasAgentPanel","agentPanelEnabled","agentPanelOpen","setPanelOpen","toggleAgentPanel","useCallback","closeMobileNav","toggleMobileNav","open","toggleSidebar","collapsed","next","writeStorage","routeTree","appRoutes","jsx","PageWrapper","AppRoutes","AuthRequiredCard","inShellRootRoutes","r","_bare","element","rest","bareRootRoutes","fallback","Navigate","useRoutes","shellSnapshot","w","appHasSidebar","shellClass","AegisRuntimeProvider","ActiveAppEnvironmentProvider","jsxs","SkipLink","AmbientBackground","TopHeader","Fragment","Chip","Sidebar","renderAppRegion","createPortal","BreadcrumbBar","AskOverlay","CommandPalette","shouldWarn","message","warnedRef","appValue","children","inner","ActiveAppContext","seen","key","prev","base","b","status","userRoles"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiDA,MAAMA,IAAwB;AAUvB,SAASC,GAAW;AAAA,EACzB,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC,IAAa,CAAA;AAAA,EACb,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC,KAAc;AAAA,EACd,uBAAAC,KAAwB;AAAA,EACxB,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,YAAAC;AAAA,EACA,cAAAC;AACF,GAAkC;AAChC,QAAMC,IAAWC,GAAA,GACXC,KAAWC,GAAA,GACXC,KAAUC,GAAA,GACV,EAAE,UAAAC,MAAaN,GACfO,IAAOC,GAAA,GACPC,IAAWC,GAAWC,EAAY,GAClC,CAACC,IAAeC,CAAgB,IAAIC,EAAS,EAAK,GAClD,CAACC,GAAkBC,EAAmB,IAAIF;AAAA,IAC9C,MAAMG,GAAYpC,CAAqB,MAAM;AAAA,EAAA,GAEzC,CAACqC,GAAYC,EAAa,IAAIL,EAAgC,IA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8E,IAAOF,EAAK,IAAIC,CAAG;AACzB,IAAIC,KACF,QAAQ;AAAA,MACN,mCAAmCD,CAAG,cAAcC,CAAI,UAAU9E,EAAI,EAAE;AAAA,IAAA,GAI5E4E,EAAK,IAAIC,GAAK7E,EAAI,EAAE;AAAA,EACtB;AACF;AAEA,SAASG,GACPhD,GACAsB,GACsB;AAYtB,SAVmBtB,EAChB,OAAO,CAAC6C,MAAQ;AACf,UAAM+E,IAAO1E,EAAkBL,EAAI,QAAQ;AAC3C,WAAOvB,MAAasG,KAAQtG,EAAS,WAAW,GAAGsG,CAAI,GAAG;AAAA,EAC5D,CAAC,EACA;AAAA,IACC,CAAC,GAAGC,MACF3E,EAAkB2E,EAAE,QAAQ,EAAE,SAC9B3E,EAAkB,EAAE,QAAQ,EAAE;AAAA,EAAA,EAElB,CAAC;AACrB;AAEA,SAASJ,EACPD,GACAiF,GACA1H,GACS;AACT,MAAIyC,EAAI,iBAAiB;AACvB,WAAO;AAET,MAAIiF,MAAW;AACb,WAAO;AAET,MAAI,CAACjF,EAAI,iBAAiBA,EAAI,cAAc,WAAW;AACrD,WAAO;AAET,QAAMkF,IAAY3H,GAAM,SAAS,CAAA;AACjC,SAAOyC,EAAI,cAAc,KAAK,CAAC2C,MAAMuC,EAAU,SAASvC,CAAC,CAAC;AAC5D;"}
|
|
1
|
+
{"version":3,"file":"AegisShell.js","sources":["../../../src/layouts/shell/AegisShell.tsx"],"sourcesContent":["import {\n type ReactElement,\n useCallback,\n useContext,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\n\nimport { createPortal } from 'react-dom';\n\nimport {\n matchRoutes,\n useHref,\n useLocation,\n useNavigate,\n useRoutes,\n} from 'react-router-dom';\n\nimport {\n AegisRuntimeProvider,\n AskOverlay,\n type ShellSnapshot,\n} from '../../agent';\nimport { useAuth } from '../../auth';\nimport { useHasCommandProvider } from '../../commands';\nimport { AmbientBackground } from '../../components/ui/AmbientBackground';\nimport { Chip } from '../../components/ui/Chip';\nimport { useStorageItem } from '../../hooks/useStorageItem';\nimport { useWindowScrolled } from '../../hooks/useWindowScrolled';\nimport { useStrings } from '../../locale';\nimport { ThemeContext } from '../../theme/themeContext';\nimport { SkipLink } from '../SkipLink';\nimport './AegisShell.css';\nimport { BreadcrumbBar } from './BreadcrumbBar';\nimport { RouteErrorBoundary } from './RouteErrorBoundary';\nimport { ShellCommandPalette } from './ShellCommandPalette';\nimport { Sidebar } from './Sidebar';\nimport { TopHeader } from './TopHeader';\nimport { ActiveAppContext } from './activeAppContext';\nimport { assertUniqueBasePaths, findActiveApp, isAppVisible } from './apps';\nimport { buildRouteTree } from './buildRouteTree';\nimport { EnvironmentProvider } from './environments';\nimport { normalizeBasePath } from './paths';\nimport type { AegisApp, AegisShellProps } from './types';\nimport { useAgentPanel } from './useAgentPanel';\nimport { useAppCommands } from './useAppCommands';\nimport { useMobileNav } from './useMobileNav';\nimport { useShellUser } from './useShellUser';\nimport { useWarnOnce } from './useWarnOnce';\n\nconst SIDEBAR_COLLAPSED_KEY = 'aegis-shell.sidebar-collapsed';\n\n/**\n * Top-level layout: top header, two-section sidebar, breadcrumb bar, and\n * a routed content area composed from `apps`.\n *\n * Each app's `routes` is mounted under its `basePath`. The shell renders\n * the chrome around every app — apps themselves only render page content\n * inside a `<PageWrapper>` (the shell wraps the outlet automatically). A\n * page that throws while rendering shows an error with a retry in the page\n * area; the chrome stays up.\n */\nexport function AegisShell({\n brand,\n apps,\n rootRoutes = [],\n fallbackPath,\n notFoundElement,\n user,\n userMenu,\n headerCenter,\n headerActions,\n appSwitcher = true,\n elevateHeaderOnScroll = false,\n ambient,\n inboxPath,\n onAppSwitch,\n enableCommandPalette = false,\n commandGroupOrder,\n agentPanel,\n agentRuntime,\n}: AegisShellProps): ReactElement {\n const location = useLocation();\n const navigate = useNavigate();\n const strings = useStrings();\n const { pathname } = location;\n const auth = useAuth();\n const themeCtx = useContext(ThemeContext);\n const [sidebarCollapsedValue, setSidebarCollapsedValue] = useStorageItem(\n SIDEBAR_COLLAPSED_KEY,\n );\n const sidebarCollapsed = sidebarCollapsedValue === '1';\n const [inlineSlot, setInlineSlot] = useState<HTMLDivElement | null>(null);\n const windowScrolled = useWindowScrolled();\n const headerScrolled = elevateHeaderOnScroll && windowScrolled;\n const mainRef = useRef<HTMLElement>(null);\n\n const resolvedUser = useShellUser(user, userMenu, auth);\n\n const visibleApps = useMemo(\n () => apps.filter((app) => isAppVisible(app, auth.status, auth.user)),\n [apps, auth.status, auth.user],\n );\n\n const activeApp = useMemo(\n () => findActiveApp(apps, pathname),\n [apps, pathname],\n );\n\n const activeAppValue = useMemo(\n () =>\n activeApp\n ? { id: activeApp.id, basePath: normalizeBasePath(activeApp.basePath) }\n : null,\n [activeApp],\n );\n\n useEffect(() => {\n assertUniqueBasePaths(apps);\n }, [apps]);\n\n useAppCommands(visibleApps, activeApp?.id);\n const hasCommandProvider = useHasCommandProvider();\n useWarnOnce(\n enableCommandPalette && !hasCommandProvider,\n 'AegisShell: enableCommandPalette needs a <CommandProvider> above the shell; the command palette is not mounted.',\n );\n\n const agent = useAgentPanel(agentPanel);\n const mobileNav = useMobileNav(pathname);\n\n const toggleSidebar = useCallback(() => {\n setSidebarCollapsedValue(sidebarCollapsed ? '0' : '1');\n }, [setSidebarCollapsedValue, sidebarCollapsed]);\n\n const routeTree = useMemo(\n () =>\n buildRouteTree({ apps, rootRoutes, fallbackPath, notFoundElement, auth }),\n [apps, rootRoutes, fallbackPath, notFoundElement, auth],\n );\n const element = useRoutes(routeTree.routes);\n const matches = matchRoutes(routeTree.routes, location);\n const topRoute = matches ? matches[0].route : undefined;\n const page = (\n <RouteErrorBoundary resetKey={location.key}>{element}</RouteErrorBoundary>\n );\n\n const rootHref = useHref('/');\n // A hash router's href is not a path prefix, so it reports none.\n const basename = rootHref.startsWith('/')\n ? rootHref.replace(/\\/+$/, '')\n : undefined;\n\n const shellSnapshot = useCallback((): ShellSnapshot => {\n const w = typeof window !== 'undefined' ? window : null;\n return {\n currentAppId: activeApp?.id ?? null,\n route: {\n pathname,\n search: location.search,\n params: {},\n basename,\n },\n breadcrumbs: [],\n theme: themeCtx?.resolved ?? 'light',\n viewport: {\n width: w?.innerWidth ?? 0,\n height: w?.innerHeight ?? 0,\n },\n };\n }, [activeApp, pathname, location.search, basename, themeCtx]);\n\n // Bare routes (e.g. /login) render without the shell chrome.\n if (topRoute && routeTree.bareRoutes.has(topRoute)) {\n return <div>{page}</div>;\n }\n\n const appHasSidebar = Boolean(\n activeApp?.sidebar && activeApp.sidebar.length > 0,\n );\n const hasSidebar = appHasSidebar && !sidebarCollapsed;\n\n const shellClass = [\n 'aegis-shell',\n hasSidebar ? 'aegis-shell--with-sidebar' : 'aegis-shell--no-sidebar',\n mobileNav.open ? 'aegis-shell--mobile-nav-open' : '',\n agent.open ? 'aegis-shell--with-agent-panel' : '',\n ambient ? 'aegis-shell--ambient' : '',\n ]\n .filter(Boolean)\n .join(' ');\n\n return (\n <AegisRuntimeProvider\n runtime={agentRuntime}\n appId={activeApp?.id ?? null}\n shellSnapshot={shellSnapshot}\n navigate={navigate}\n >\n <EnvironmentProvider app={activeApp}>\n <div ref={mobileNav.shellRef} className={shellClass}>\n <SkipLink targetId=\"aegis-main\" targetRef={mainRef} />\n {ambient && <AmbientBackground variant={ambient} />}\n <TopHeader\n brand={brand}\n apps={visibleApps}\n activeAppId={activeApp?.id}\n onAppSwitch={onAppSwitch}\n appSwitcher={appSwitcher}\n scrolled={headerScrolled}\n user={resolvedUser}\n headerCenter={headerCenter}\n headerActions={\n <>\n {headerActions}\n {auth.status === 'unauthenticated' && auth.signIn && (\n <Chip\n tone=\"ink\"\n onClick={() => {\n void auth.signIn?.({});\n }}\n >\n Sign in\n </Chip>\n )}\n </>\n }\n inboxPath={auth.status === 'authenticated' ? inboxPath : undefined}\n onMobileMenuToggle={mobileNav.toggle}\n mobileMenuOpen={mobileNav.open}\n menuToggleRef={mobileNav.toggleRef}\n showMobileMenu={appHasSidebar}\n sidebarCollapsible={appHasSidebar}\n sidebarCollapsed={sidebarCollapsed}\n onSidebarToggle={toggleSidebar}\n inlineSlotRef={setInlineSlot}\n inlineSlotActive={Boolean(activeApp?.header)}\n agentPanelOpen={agent.open}\n onAgentPanelToggle={agent.toggle}\n />\n {appHasSidebar && (\n <Sidebar activeApp={activeApp} drawerRef={mobileNav.drawerRef} />\n )}\n <button\n ref={mobileNav.backdropRef}\n type=\"button\"\n className=\"aegis-shell__backdrop\"\n aria-label={strings.closeNavigation}\n tabIndex={-1}\n onClick={mobileNav.dismiss}\n />\n <main\n id=\"aegis-main\"\n ref={mainRef}\n tabIndex={-1}\n className=\"aegis-shell__main\"\n >\n {renderAppRegion(\n activeApp,\n activeAppValue,\n <>\n {activeApp?.header &&\n inlineSlot &&\n createPortal(activeApp.header, inlineSlot)}\n {activeApp?.breadcrumbBar !== false && (\n <BreadcrumbBar activeApp={activeApp} />\n )}\n <div className=\"aegis-shell__content\">{page}</div>\n </>,\n )}\n </main>\n {agent.open && (\n <div className=\"aegis-shell__agent-panel\">{agentPanel}</div>\n )}\n <AskOverlay />\n {enableCommandPalette && hasCommandProvider && (\n <ShellCommandPalette groupOrder={commandGroupOrder} />\n )}\n </div>\n </EnvironmentProvider>\n </AegisRuntimeProvider>\n );\n}\n\nfunction renderAppRegion(\n app: AegisApp | undefined,\n appValue: { id: string; basePath: string } | null,\n children: ReactElement,\n): ReactElement {\n if (!app || !appValue) {\n return children;\n }\n const inner = (\n <ActiveAppContext.Provider value={appValue}>\n {children}\n </ActiveAppContext.Provider>\n );\n return app.wrap ? <>{app.wrap(inner)}</> : inner;\n}\n"],"names":["SIDEBAR_COLLAPSED_KEY","AegisShell","brand","apps","rootRoutes","fallbackPath","notFoundElement","user","userMenu","headerCenter","headerActions","appSwitcher","elevateHeaderOnScroll","ambient","inboxPath","onAppSwitch","enableCommandPalette","commandGroupOrder","agentPanel","agentRuntime","location","useLocation","navigate","useNavigate","strings","useStrings","pathname","auth","useAuth","themeCtx","useContext","ThemeContext","sidebarCollapsedValue","setSidebarCollapsedValue","useStorageItem","sidebarCollapsed","inlineSlot","setInlineSlot","useState","windowScrolled","useWindowScrolled","headerScrolled","mainRef","useRef","resolvedUser","useShellUser","visibleApps","useMemo","app","isAppVisible","activeApp","findActiveApp","activeAppValue","normalizeBasePath","useEffect","assertUniqueBasePaths","useAppCommands","hasCommandProvider","useHasCommandProvider","useWarnOnce","agent","useAgentPanel","mobileNav","useMobileNav","toggleSidebar","useCallback","routeTree","buildRouteTree","element","useRoutes","matches","matchRoutes","topRoute","page","jsx","RouteErrorBoundary","rootHref","useHref","basename","shellSnapshot","w","appHasSidebar","shellClass","AegisRuntimeProvider","EnvironmentProvider","jsxs","SkipLink","AmbientBackground","TopHeader","Fragment","Chip","Sidebar","renderAppRegion","createPortal","BreadcrumbBar","AskOverlay","ShellCommandPalette","appValue","children","inner","ActiveAppContext"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAoDA,MAAMA,KAAwB;AAYvB,SAASC,GAAW;AAAA,EACzB,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,YAAAC,IAAa,CAAA;AAAA,EACb,cAAAC;AAAA,EACA,iBAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,cAAAC;AAAA,EACA,eAAAC;AAAA,EACA,aAAAC,IAAc;AAAA,EACd,uBAAAC,IAAwB;AAAA,EACxB,SAAAC;AAAA,EACA,WAAAC;AAAA,EACA,aAAAC;AAAA,EACA,sBAAAC,IAAuB;AAAA,EACvB,mBAAAC;AAAA,EACA,YAAAC;AAAA,EACA,cAAAC;AACF,GAAkC;AAChC,QAAMC,IAAWC,GAAA,GACXC,IAAWC,GAAA,GACXC,IAAUC,GAAA,GACV,EAAE,UAAAC,MAAaN,GACfO,IAAOC,GAAA,GACPC,IAAWC,GAAWC,EAAY,GAClC,CAACC,GAAuBC,CAAwB,IAAIC;AAAA,IACxDlC;AAAA,EAAA,GAEImC,IAAmBH,MAA0B,KAC7C,CAAC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utes.cjs","sources":["../../../src/layouts/shell/AppRoutes.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { useRoutes } from 'react-router-dom';\n\nimport type { AegisApp } from './types';\n\nexport function AppRoutes({ app }: { app: AegisApp }): ReactElement | null {\n return useRoutes(app.routes);\n}\n"],"names":["AppRoutes","app","useRoutes"],"mappings":"oHAMO,SAASA,EAAU,CAAE,IAAAC,GAA+C,CACzE,OAAOC,EAAAA,UAAUD,EAAI,MAAM,CAC7B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"AppRoutes.js","sources":["../../../src/layouts/shell/AppRoutes.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { useRoutes } from 'react-router-dom';\n\nimport type { AegisApp } from './types';\n\nexport function AppRoutes({ app }: { app: AegisApp }): ReactElement | null {\n return useRoutes(app.routes);\n}\n"],"names":["AppRoutes","app","useRoutes"],"mappings":";AAMO,SAASA,EAAU,EAAE,KAAAC,KAA+C;AACzE,SAAOC,EAAUD,EAAI,MAAM;AAC7B;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("react/jsx-runtime"),m=require("react"),b=require("react-router-dom"),d=require("../../components/ui/Breadcrumb.cjs"),h=require("./RouterLink.cjs"),n=require("./paths.cjs");function f({activeApp:e}){const{pathname:t}=b.useLocation(),l=m.useMemo(()=>{if(!e)return[];const s=(e.sidebar??[]).flatMap(r=>r.items),c=s.find(r=>n.pathOf(r.to).replace(/^\/+/,"")===""),a=[{label:e.label,to:n.joinPath(e.basePath,c?.to??"")}],u=s.find(r=>{const o=n.joinPath(e.basePath,n.pathOf(r.to));return r.end?t===o:t===o||t.startsWith(`${o}/`)});return u&&a.push({label:u.label}),a},[e,t]);return e?i.jsx("div",{className:"aegis-shell__breadcrumb",children:i.jsx(d.Breadcrumb,{items:l,linkComponent:h.RouterLink})}):null}exports.BreadcrumbBar=f;
|
|
2
2
|
//# sourceMappingURL=BreadcrumbBar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbBar.cjs","sources":["../../../src/layouts/shell/BreadcrumbBar.tsx"],"sourcesContent":["import { type ReactElement,
|
|
1
|
+
{"version":3,"file":"BreadcrumbBar.cjs","sources":["../../../src/layouts/shell/BreadcrumbBar.tsx"],"sourcesContent":["import { type ReactElement, useMemo } from 'react';\n\nimport { useLocation } from 'react-router-dom';\n\nimport {\n Breadcrumb,\n type BreadcrumbItem,\n} from '../../components/ui/Breadcrumb';\nimport { RouterLink } from './RouterLink';\nimport { joinPath, pathOf } from './paths';\nimport type { AegisApp } from './types';\n\ninterface BreadcrumbBarProps {\n activeApp: AegisApp | undefined;\n}\n\n/**\n * Derives breadcrumbs from the active app + current URL by matching the\n * URL against the app's declared sidebar nav. Pages that want a richer\n * trail should render their own `<Breadcrumb>` and ignore this default.\n */\nexport function BreadcrumbBar({\n activeApp,\n}: BreadcrumbBarProps): ReactElement | null {\n const { pathname } = useLocation();\n\n const items = useMemo<BreadcrumbItem[]>(() => {\n if (!activeApp) {\n return [];\n }\n const navItems = (activeApp.sidebar ?? []).flatMap((group) => group.items);\n // The app-root link keeps the root item's query, e.g. a selected scope.\n const rootItem = navItems.find(\n (item) => pathOf(item.to).replace(/^\\/+/, '') === '',\n );\n const trail: BreadcrumbItem[] = [\n {\n label: activeApp.label,\n to: joinPath(activeApp.basePath, rootItem?.to ?? ''),\n },\n ];\n\n const match = navItems.find((item) => {\n const full = joinPath(activeApp.basePath, pathOf(item.to));\n if (item.end) {\n return pathname === full;\n }\n return pathname === full || pathname.startsWith(`${full}/`);\n });\n if (match) {\n trail.push({ label: match.label });\n }\n return trail;\n }, [activeApp, pathname]);\n\n if (!activeApp) {\n return null;\n }\n\n return (\n <div className=\"aegis-shell__breadcrumb\">\n <Breadcrumb items={items} linkComponent={RouterLink} />\n </div>\n );\n}\n"],"names":["BreadcrumbBar","activeApp","pathname","useLocation","items","useMemo","navItems","group","rootItem","item","pathOf","trail","joinPath","match","full","jsx","Breadcrumb","RouterLink"],"mappings":"6QAqBO,SAASA,EAAc,CAC5B,UAAAC,CACF,EAA4C,CAC1C,KAAM,CAAE,SAAAC,CAAA,EAAaC,cAAA,EAEfC,EAAQC,EAAAA,QAA0B,IAAM,CAC5C,GAAI,CAACJ,EACH,MAAO,CAAA,EAET,MAAMK,GAAYL,EAAU,SAAW,CAAA,GAAI,QAASM,GAAUA,EAAM,KAAK,EAEnEC,EAAWF,EAAS,KACvBG,GAASC,EAAAA,OAAOD,EAAK,EAAE,EAAE,QAAQ,OAAQ,EAAE,IAAM,EAAA,EAE9CE,EAA0B,CAC9B,CACE,MAAOV,EAAU,MACjB,GAAIW,EAAAA,SAASX,EAAU,SAAUO,GAAU,IAAM,EAAE,CAAA,CACrD,EAGIK,EAAQP,EAAS,KAAMG,GAAS,CACpC,MAAMK,EAAOF,EAAAA,SAASX,EAAU,SAAUS,SAAOD,EAAK,EAAE,CAAC,EACzD,OAAIA,EAAK,IACAP,IAAaY,EAEfZ,IAAaY,GAAQZ,EAAS,WAAW,GAAGY,CAAI,GAAG,CAC5D,CAAC,EACD,OAAID,GACFF,EAAM,KAAK,CAAE,MAAOE,EAAM,MAAO,EAE5BF,CACT,EAAG,CAACV,EAAWC,CAAQ,CAAC,EAExB,OAAKD,EAKHc,EAAAA,IAAC,OAAI,UAAU,0BACb,eAACC,EAAAA,WAAA,CAAW,MAAAZ,EAAc,cAAea,EAAAA,UAAA,CAAY,CAAA,CACvD,EANO,IAQX"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { ReactElement } from 'react';
|
|
2
2
|
import { AegisApp } from './types';
|
|
3
3
|
interface BreadcrumbBarProps {
|
|
4
|
-
apps: AegisApp[];
|
|
5
4
|
activeApp: AegisApp | undefined;
|
|
6
5
|
}
|
|
7
6
|
/**
|
|
@@ -9,5 +8,5 @@ interface BreadcrumbBarProps {
|
|
|
9
8
|
* URL against the app's declared sidebar nav. Pages that want a richer
|
|
10
9
|
* trail should render their own `<Breadcrumb>` and ignore this default.
|
|
11
10
|
*/
|
|
12
|
-
export declare function BreadcrumbBar({
|
|
11
|
+
export declare function BreadcrumbBar({ activeApp, }: BreadcrumbBarProps): ReactElement | null;
|
|
13
12
|
export {};
|
|
@@ -1,38 +1,31 @@
|
|
|
1
1
|
import { jsx as a } from "react/jsx-runtime";
|
|
2
2
|
import { useMemo as b } from "react";
|
|
3
|
-
import { useLocation as c
|
|
4
|
-
import { Breadcrumb as
|
|
5
|
-
import {
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
activeApp:
|
|
3
|
+
import { useLocation as c } from "react-router-dom";
|
|
4
|
+
import { Breadcrumb as h } from "../../components/ui/Breadcrumb.js";
|
|
5
|
+
import { RouterLink as d } from "./RouterLink.js";
|
|
6
|
+
import { pathOf as l, joinPath as i } from "./paths.js";
|
|
7
|
+
function L({
|
|
8
|
+
activeApp: r
|
|
9
9
|
}) {
|
|
10
|
-
const { pathname:
|
|
11
|
-
if (!
|
|
10
|
+
const { pathname: o } = c(), f = b(() => {
|
|
11
|
+
if (!r)
|
|
12
12
|
return [];
|
|
13
|
-
const
|
|
14
|
-
(
|
|
13
|
+
const e = (r.sidebar ?? []).flatMap((t) => t.items), u = e.find(
|
|
14
|
+
(t) => l(t.to).replace(/^\/+/, "") === ""
|
|
15
15
|
), m = [
|
|
16
16
|
{
|
|
17
|
-
label:
|
|
18
|
-
to:
|
|
17
|
+
label: r.label,
|
|
18
|
+
to: i(r.basePath, u?.to ?? "")
|
|
19
19
|
}
|
|
20
|
-
],
|
|
21
|
-
const
|
|
22
|
-
return
|
|
20
|
+
], s = e.find((t) => {
|
|
21
|
+
const n = i(r.basePath, l(t.to));
|
|
22
|
+
return t.end ? o === n : o === n || o.startsWith(`${n}/`);
|
|
23
23
|
});
|
|
24
|
-
return
|
|
25
|
-
}, [
|
|
26
|
-
return
|
|
27
|
-
}
|
|
28
|
-
function k({
|
|
29
|
-
to: o,
|
|
30
|
-
className: t,
|
|
31
|
-
children: r
|
|
32
|
-
}) {
|
|
33
|
-
return /* @__PURE__ */ a(d, { to: o, className: t, children: r });
|
|
24
|
+
return s && m.push({ label: s.label }), m;
|
|
25
|
+
}, [r, o]);
|
|
26
|
+
return r ? /* @__PURE__ */ a("div", { className: "aegis-shell__breadcrumb", children: /* @__PURE__ */ a(h, { items: f, linkComponent: d }) }) : null;
|
|
34
27
|
}
|
|
35
28
|
export {
|
|
36
|
-
|
|
29
|
+
L as BreadcrumbBar
|
|
37
30
|
};
|
|
38
31
|
//# sourceMappingURL=BreadcrumbBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BreadcrumbBar.js","sources":["../../../src/layouts/shell/BreadcrumbBar.tsx"],"sourcesContent":["import { type ReactElement,
|
|
1
|
+
{"version":3,"file":"BreadcrumbBar.js","sources":["../../../src/layouts/shell/BreadcrumbBar.tsx"],"sourcesContent":["import { type ReactElement, useMemo } from 'react';\n\nimport { useLocation } from 'react-router-dom';\n\nimport {\n Breadcrumb,\n type BreadcrumbItem,\n} from '../../components/ui/Breadcrumb';\nimport { RouterLink } from './RouterLink';\nimport { joinPath, pathOf } from './paths';\nimport type { AegisApp } from './types';\n\ninterface BreadcrumbBarProps {\n activeApp: AegisApp | undefined;\n}\n\n/**\n * Derives breadcrumbs from the active app + current URL by matching the\n * URL against the app's declared sidebar nav. Pages that want a richer\n * trail should render their own `<Breadcrumb>` and ignore this default.\n */\nexport function BreadcrumbBar({\n activeApp,\n}: BreadcrumbBarProps): ReactElement | null {\n const { pathname } = useLocation();\n\n const items = useMemo<BreadcrumbItem[]>(() => {\n if (!activeApp) {\n return [];\n }\n const navItems = (activeApp.sidebar ?? []).flatMap((group) => group.items);\n // The app-root link keeps the root item's query, e.g. a selected scope.\n const rootItem = navItems.find(\n (item) => pathOf(item.to).replace(/^\\/+/, '') === '',\n );\n const trail: BreadcrumbItem[] = [\n {\n label: activeApp.label,\n to: joinPath(activeApp.basePath, rootItem?.to ?? ''),\n },\n ];\n\n const match = navItems.find((item) => {\n const full = joinPath(activeApp.basePath, pathOf(item.to));\n if (item.end) {\n return pathname === full;\n }\n return pathname === full || pathname.startsWith(`${full}/`);\n });\n if (match) {\n trail.push({ label: match.label });\n }\n return trail;\n }, [activeApp, pathname]);\n\n if (!activeApp) {\n return null;\n }\n\n return (\n <div className=\"aegis-shell__breadcrumb\">\n <Breadcrumb items={items} linkComponent={RouterLink} />\n </div>\n );\n}\n"],"names":["BreadcrumbBar","activeApp","pathname","useLocation","items","useMemo","navItems","group","rootItem","item","pathOf","trail","joinPath","match","full","jsx","Breadcrumb","RouterLink"],"mappings":";;;;;;AAqBO,SAASA,EAAc;AAAA,EAC5B,WAAAC;AACF,GAA4C;AAC1C,QAAM,EAAE,UAAAC,EAAA,IAAaC,EAAA,GAEfC,IAAQC,EAA0B,MAAM;AAC5C,QAAI,CAACJ;AACH,aAAO,CAAA;AAET,UAAMK,KAAYL,EAAU,WAAW,CAAA,GAAI,QAAQ,CAACM,MAAUA,EAAM,KAAK,GAEnEC,IAAWF,EAAS;AAAA,MACxB,CAACG,MAASC,EAAOD,EAAK,EAAE,EAAE,QAAQ,QAAQ,EAAE,MAAM;AAAA,IAAA,GAE9CE,IAA0B;AAAA,MAC9B;AAAA,QACE,OAAOV,EAAU;AAAA,QACjB,IAAIW,EAASX,EAAU,UAAUO,GAAU,MAAM,EAAE;AAAA,MAAA;AAAA,IACrD,GAGIK,IAAQP,EAAS,KAAK,CAACG,MAAS;AACpC,YAAMK,IAAOF,EAASX,EAAU,UAAUS,EAAOD,EAAK,EAAE,CAAC;AACzD,aAAIA,EAAK,MACAP,MAAaY,IAEfZ,MAAaY,KAAQZ,EAAS,WAAW,GAAGY,CAAI,GAAG;AAAA,IAC5D,CAAC;AACD,WAAID,KACFF,EAAM,KAAK,EAAE,OAAOE,EAAM,OAAO,GAE5BF;AAAA,EACT,GAAG,CAACV,GAAWC,CAAQ,CAAC;AAExB,SAAKD,IAKH,gBAAAc,EAAC,SAAI,WAAU,2BACb,4BAACC,GAAA,EAAW,OAAAZ,GAAc,eAAea,EAAA,CAAY,EAAA,CACvD,IANO;AAQX;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const r=require("react/jsx-runtime"),n=require("react"),o=require("../../components/ui/Button.cjs"),s=require("../../components/ui/ErrorState.cjs"),i=require("../PageWrapper.cjs");class a extends n.Component{state={error:null,resetKey:this.props.resetKey};static getDerivedStateFromError(e){return{error:e instanceof Error?e:new Error(String(e))}}static getDerivedStateFromProps(e,t){return e.resetKey===t.resetKey?null:{error:null,resetKey:e.resetKey}}retry=()=>{this.setState({error:null})};render(){const{error:e}=this.state;return e?r.jsx(i.PageWrapper,{children:r.jsx(s.ErrorState,{title:"This page failed to render",description:e.message,action:r.jsx(o.Button,{tone:"secondary",onClick:this.retry,children:"Try again"})})}):this.props.children}}exports.RouteErrorBoundary=a;
|
|
2
|
+
//# sourceMappingURL=RouteErrorBoundary.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteErrorBoundary.cjs","sources":["../../../src/layouts/shell/RouteErrorBoundary.tsx"],"sourcesContent":["import { Component, type ReactNode } from 'react';\n\nimport { Button } from '../../components/ui/Button';\nimport { ErrorState } from '../../components/ui/ErrorState';\nimport { PageWrapper } from '../PageWrapper';\n\ninterface RouteErrorBoundaryProps {\n /** A new key — the next location — clears the error and renders the route again. */\n resetKey: string;\n children: ReactNode;\n}\n\ninterface RouteErrorBoundaryState {\n error: Error | null;\n resetKey: string;\n}\n\n/**\n * Catches a render error in the routed page, so the shell around it stays\n * up. Shows the error in the page area with a retry; navigating elsewhere\n * clears it.\n */\nexport class RouteErrorBoundary extends Component<\n RouteErrorBoundaryProps,\n RouteErrorBoundaryState\n> {\n override state: RouteErrorBoundaryState = {\n error: null,\n resetKey: this.props.resetKey,\n };\n\n static getDerivedStateFromError(\n error: unknown,\n ): Partial<RouteErrorBoundaryState> {\n return { error: error instanceof Error ? error : new Error(String(error)) };\n }\n\n static getDerivedStateFromProps(\n props: RouteErrorBoundaryProps,\n state: RouteErrorBoundaryState,\n ): Partial<RouteErrorBoundaryState> | null {\n return props.resetKey === state.resetKey\n ? null\n : { error: null, resetKey: props.resetKey };\n }\n\n private readonly retry = (): void => {\n this.setState({ error: null });\n };\n\n override render(): ReactNode {\n const { error } = this.state;\n if (!error) {\n return this.props.children;\n }\n return (\n <PageWrapper>\n <ErrorState\n title=\"This page failed to render\"\n description={error.message}\n action={\n <Button tone=\"secondary\" onClick={this.retry}>\n Try again\n </Button>\n }\n />\n </PageWrapper>\n );\n }\n}\n"],"names":["RouteErrorBoundary","Component","error","props","state","PageWrapper","jsx","ErrorState","Button"],"mappings":"oQAsBO,MAAMA,UAA2BC,EAAAA,SAGtC,CACS,MAAiC,CACxC,MAAO,KACP,SAAU,KAAK,MAAM,QAAA,EAGvB,OAAO,yBACLC,EACkC,CAClC,MAAO,CAAE,MAAOA,aAAiB,MAAQA,EAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,CAAA,CAC1E,CAEA,OAAO,yBACLC,EACAC,EACyC,CACzC,OAAOD,EAAM,WAAaC,EAAM,SAC5B,KACA,CAAE,MAAO,KAAM,SAAUD,EAAM,QAAA,CACrC,CAEiB,MAAQ,IAAY,CACnC,KAAK,SAAS,CAAE,MAAO,IAAA,CAAM,CAC/B,EAES,QAAoB,CAC3B,KAAM,CAAE,MAAAD,GAAU,KAAK,MACvB,OAAKA,QAIFG,EAAAA,YAAA,CACC,SAAAC,EAAAA,IAACC,EAAAA,WAAA,CACC,MAAM,6BACN,YAAaL,EAAM,QACnB,aACGM,SAAA,CAAO,KAAK,YAAY,QAAS,KAAK,MAAO,SAAA,WAAA,CAE9C,CAAA,CAAA,EAGN,EAbO,KAAK,MAAM,QAetB,CACF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import { Component, ReactNode } from 'react';
|
|
2
|
+
interface RouteErrorBoundaryProps {
|
|
3
|
+
/** A new key — the next location — clears the error and renders the route again. */
|
|
4
|
+
resetKey: string;
|
|
5
|
+
children: ReactNode;
|
|
6
|
+
}
|
|
7
|
+
interface RouteErrorBoundaryState {
|
|
8
|
+
error: Error | null;
|
|
9
|
+
resetKey: string;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Catches a render error in the routed page, so the shell around it stays
|
|
13
|
+
* up. Shows the error in the page area with a retry; navigating elsewhere
|
|
14
|
+
* clears it.
|
|
15
|
+
*/
|
|
16
|
+
export declare class RouteErrorBoundary extends Component<RouteErrorBoundaryProps, RouteErrorBoundaryState> {
|
|
17
|
+
state: RouteErrorBoundaryState;
|
|
18
|
+
static getDerivedStateFromError(error: unknown): Partial<RouteErrorBoundaryState>;
|
|
19
|
+
static getDerivedStateFromProps(props: RouteErrorBoundaryProps, state: RouteErrorBoundaryState): Partial<RouteErrorBoundaryState> | null;
|
|
20
|
+
private readonly retry;
|
|
21
|
+
render(): ReactNode;
|
|
22
|
+
}
|
|
23
|
+
export {};
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
import { jsx as e } from "react/jsx-runtime";
|
|
2
|
+
import { Component as o } from "react";
|
|
3
|
+
import { Button as n } from "../../components/ui/Button.js";
|
|
4
|
+
import { ErrorState as s } from "../../components/ui/ErrorState.js";
|
|
5
|
+
import { PageWrapper as i } from "../PageWrapper.js";
|
|
6
|
+
class u extends o {
|
|
7
|
+
state = {
|
|
8
|
+
error: null,
|
|
9
|
+
resetKey: this.props.resetKey
|
|
10
|
+
};
|
|
11
|
+
static getDerivedStateFromError(r) {
|
|
12
|
+
return { error: r instanceof Error ? r : new Error(String(r)) };
|
|
13
|
+
}
|
|
14
|
+
static getDerivedStateFromProps(r, t) {
|
|
15
|
+
return r.resetKey === t.resetKey ? null : { error: null, resetKey: r.resetKey };
|
|
16
|
+
}
|
|
17
|
+
retry = () => {
|
|
18
|
+
this.setState({ error: null });
|
|
19
|
+
};
|
|
20
|
+
render() {
|
|
21
|
+
const { error: r } = this.state;
|
|
22
|
+
return r ? /* @__PURE__ */ e(i, { children: /* @__PURE__ */ e(
|
|
23
|
+
s,
|
|
24
|
+
{
|
|
25
|
+
title: "This page failed to render",
|
|
26
|
+
description: r.message,
|
|
27
|
+
action: /* @__PURE__ */ e(n, { tone: "secondary", onClick: this.retry, children: "Try again" })
|
|
28
|
+
}
|
|
29
|
+
) }) : this.props.children;
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
export {
|
|
33
|
+
u as RouteErrorBoundary
|
|
34
|
+
};
|
|
35
|
+
//# sourceMappingURL=RouteErrorBoundary.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouteErrorBoundary.js","sources":["../../../src/layouts/shell/RouteErrorBoundary.tsx"],"sourcesContent":["import { Component, type ReactNode } from 'react';\n\nimport { Button } from '../../components/ui/Button';\nimport { ErrorState } from '../../components/ui/ErrorState';\nimport { PageWrapper } from '../PageWrapper';\n\ninterface RouteErrorBoundaryProps {\n /** A new key — the next location — clears the error and renders the route again. */\n resetKey: string;\n children: ReactNode;\n}\n\ninterface RouteErrorBoundaryState {\n error: Error | null;\n resetKey: string;\n}\n\n/**\n * Catches a render error in the routed page, so the shell around it stays\n * up. Shows the error in the page area with a retry; navigating elsewhere\n * clears it.\n */\nexport class RouteErrorBoundary extends Component<\n RouteErrorBoundaryProps,\n RouteErrorBoundaryState\n> {\n override state: RouteErrorBoundaryState = {\n error: null,\n resetKey: this.props.resetKey,\n };\n\n static getDerivedStateFromError(\n error: unknown,\n ): Partial<RouteErrorBoundaryState> {\n return { error: error instanceof Error ? error : new Error(String(error)) };\n }\n\n static getDerivedStateFromProps(\n props: RouteErrorBoundaryProps,\n state: RouteErrorBoundaryState,\n ): Partial<RouteErrorBoundaryState> | null {\n return props.resetKey === state.resetKey\n ? null\n : { error: null, resetKey: props.resetKey };\n }\n\n private readonly retry = (): void => {\n this.setState({ error: null });\n };\n\n override render(): ReactNode {\n const { error } = this.state;\n if (!error) {\n return this.props.children;\n }\n return (\n <PageWrapper>\n <ErrorState\n title=\"This page failed to render\"\n description={error.message}\n action={\n <Button tone=\"secondary\" onClick={this.retry}>\n Try again\n </Button>\n }\n />\n </PageWrapper>\n );\n }\n}\n"],"names":["RouteErrorBoundary","Component","error","props","state","PageWrapper","jsx","ErrorState","Button"],"mappings":";;;;;AAsBO,MAAMA,UAA2BC,EAGtC;AAAA,EACS,QAAiC;AAAA,IACxC,OAAO;AAAA,IACP,UAAU,KAAK,MAAM;AAAA,EAAA;AAAA,EAGvB,OAAO,yBACLC,GACkC;AAClC,WAAO,EAAE,OAAOA,aAAiB,QAAQA,IAAQ,IAAI,MAAM,OAAOA,CAAK,CAAC,EAAA;AAAA,EAC1E;AAAA,EAEA,OAAO,yBACLC,GACAC,GACyC;AACzC,WAAOD,EAAM,aAAaC,EAAM,WAC5B,OACA,EAAE,OAAO,MAAM,UAAUD,EAAM,SAAA;AAAA,EACrC;AAAA,EAEiB,QAAQ,MAAY;AACnC,SAAK,SAAS,EAAE,OAAO,KAAA,CAAM;AAAA,EAC/B;AAAA,EAES,SAAoB;AAC3B,UAAM,EAAE,OAAAD,MAAU,KAAK;AACvB,WAAKA,sBAIFG,GAAA,EACC,UAAA,gBAAAC;AAAA,MAACC;AAAA,MAAA;AAAA,QACC,OAAM;AAAA,QACN,aAAaL,EAAM;AAAA,QACnB,0BACGM,GAAA,EAAO,MAAK,aAAY,SAAS,KAAK,OAAO,UAAA,YAAA,CAE9C;AAAA,MAAA;AAAA,IAAA,GAGN,IAbO,KAAK,MAAM;AAAA,EAetB;AACF;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("react/jsx-runtime"),u=require("react-router-dom"),c=({to:e,className:r,"aria-current":t,tabIndex:i,children:n})=>o.jsx(u.Link,{to:e,className:r,"aria-current":t,tabIndex:i,children:n});exports.RouterLink=c;
|
|
2
|
+
//# sourceMappingURL=RouterLink.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterLink.cjs","sources":["../../../src/layouts/shell/RouterLink.tsx"],"sourcesContent":["import { Link } from 'react-router-dom';\n\nimport type { LinkComponent } from '../../components/ui/linkComponent';\n\n/** `LinkComponent` adapter over react-router's `<Link>`. */\nexport const RouterLink: LinkComponent = ({\n to,\n className,\n 'aria-current': ariaCurrent,\n tabIndex,\n children,\n}) => (\n <Link\n to={to}\n className={className}\n aria-current={ariaCurrent}\n tabIndex={tabIndex}\n >\n {children}\n </Link>\n);\n"],"names":["RouterLink","to","className","ariaCurrent","tabIndex","children","jsx","Link"],"mappings":"mJAKaA,EAA4B,CAAC,CACxC,GAAAC,EACA,UAAAC,EACA,eAAgBC,EAChB,SAAAC,EACA,SAAAC,CACF,IACEC,EAAAA,IAACC,EAAAA,KAAA,CACC,GAAAN,EACA,UAAAC,EACA,eAAcC,EACd,SAAAC,EAEC,SAAAC,CAAA,CACH"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import { jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { Link as e } from "react-router-dom";
|
|
3
|
+
const p = ({
|
|
4
|
+
to: r,
|
|
5
|
+
className: o,
|
|
6
|
+
"aria-current": t,
|
|
7
|
+
tabIndex: i,
|
|
8
|
+
children: n
|
|
9
|
+
}) => /* @__PURE__ */ a(
|
|
10
|
+
e,
|
|
11
|
+
{
|
|
12
|
+
to: r,
|
|
13
|
+
className: o,
|
|
14
|
+
"aria-current": t,
|
|
15
|
+
tabIndex: i,
|
|
16
|
+
children: n
|
|
17
|
+
}
|
|
18
|
+
);
|
|
19
|
+
export {
|
|
20
|
+
p as RouterLink
|
|
21
|
+
};
|
|
22
|
+
//# sourceMappingURL=RouterLink.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RouterLink.js","sources":["../../../src/layouts/shell/RouterLink.tsx"],"sourcesContent":["import { Link } from 'react-router-dom';\n\nimport type { LinkComponent } from '../../components/ui/linkComponent';\n\n/** `LinkComponent` adapter over react-router's `<Link>`. */\nexport const RouterLink: LinkComponent = ({\n to,\n className,\n 'aria-current': ariaCurrent,\n tabIndex,\n children,\n}) => (\n <Link\n to={to}\n className={className}\n aria-current={ariaCurrent}\n tabIndex={tabIndex}\n >\n {children}\n </Link>\n);\n"],"names":["RouterLink","to","className","ariaCurrent","tabIndex","children","jsx","Link"],"mappings":";;AAKO,MAAMA,IAA4B,CAAC;AAAA,EACxC,IAAAC;AAAA,EACA,WAAAC;AAAA,EACA,gBAAgBC;AAAA,EAChB,UAAAC;AAAA,EACA,UAAAC;AACF,MACE,gBAAAC;AAAA,EAACC;AAAA,EAAA;AAAA,IACC,IAAAN;AAAA,IACA,WAAAC;AAAA,IACA,gBAAcC;AAAA,IACd,UAAAC;AAAA,IAEC,UAAAC;AAAA,EAAA;AACH;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react/jsx-runtime"),o=require("react"),d=require("../../components/ui/CommandPalette.cjs"),i=require("../../commands/useCommands.cjs");function C({groupOrder:a}){const{commands:l,paletteOpen:s,setPaletteOpen:e,execute:t}=i.useCommands(),c=o.useCallback(()=>{e(!1)},[e]),r=o.useCallback(n=>{t(n.id).catch(m=>{console.error(`Command "${n.id}" failed.`,m)})},[t]);return u.jsx(d.CommandPalette,{open:s,commands:l,onSelect:r,onClose:c,groupOrder:a})}exports.ShellCommandPalette=C;
|
|
2
|
+
//# sourceMappingURL=ShellCommandPalette.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellCommandPalette.cjs","sources":["../../../src/layouts/shell/ShellCommandPalette.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from 'react';\n\nimport { type Command, useCommands } from '../../commands';\nimport { CommandPalette } from '../../components/ui/CommandPalette';\n\ninterface ShellCommandPaletteProps {\n groupOrder?: string[];\n}\n\n/** The CommandPalette filled from `<CommandProvider>` and opened by its mod+k. */\nexport function ShellCommandPalette({\n groupOrder,\n}: ShellCommandPaletteProps): ReactElement {\n const { commands, paletteOpen, setPaletteOpen, execute } = useCommands();\n const close = useCallback(() => {\n setPaletteOpen(false);\n }, [setPaletteOpen]);\n const run = useCallback(\n (cmd: Command) => {\n execute(cmd.id).catch((error: unknown) => {\n console.error(`Command \"${cmd.id}\" failed.`, error);\n });\n },\n [execute],\n );\n return (\n <CommandPalette\n open={paletteOpen}\n commands={commands}\n onSelect={run}\n onClose={close}\n groupOrder={groupOrder}\n />\n );\n}\n"],"names":["ShellCommandPalette","groupOrder","commands","paletteOpen","setPaletteOpen","execute","useCommands","close","useCallback","run","cmd","error","jsx","CommandPalette"],"mappings":"wOAUO,SAASA,EAAoB,CAClC,WAAAC,CACF,EAA2C,CACzC,KAAM,CAAE,SAAAC,EAAU,YAAAC,EAAa,eAAAC,EAAgB,QAAAC,CAAA,EAAYC,EAAAA,YAAA,EACrDC,EAAQC,EAAAA,YAAY,IAAM,CAC9BJ,EAAe,EAAK,CACtB,EAAG,CAACA,CAAc,CAAC,EACbK,EAAMD,EAAAA,YACTE,GAAiB,CAChBL,EAAQK,EAAI,EAAE,EAAE,MAAOC,GAAmB,CACxC,QAAQ,MAAM,YAAYD,EAAI,EAAE,YAAaC,CAAK,CACpD,CAAC,CACH,EACA,CAACN,CAAO,CAAA,EAEV,OACEO,EAAAA,IAACC,EAAAA,eAAA,CACC,KAAMV,EACN,SAAAD,EACA,SAAUO,EACV,QAASF,EACT,WAAAN,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
interface ShellCommandPaletteProps {
|
|
3
|
+
groupOrder?: string[];
|
|
4
|
+
}
|
|
5
|
+
/** The CommandPalette filled from `<CommandProvider>` and opened by its mod+k. */
|
|
6
|
+
export declare function ShellCommandPalette({ groupOrder, }: ShellCommandPaletteProps): ReactElement;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as p } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as n } from "react";
|
|
3
|
+
import { CommandPalette as i } from "../../components/ui/CommandPalette.js";
|
|
4
|
+
import { useCommands as d } from "../../commands/useCommands.js";
|
|
5
|
+
function P({
|
|
6
|
+
groupOrder: m
|
|
7
|
+
}) {
|
|
8
|
+
const { commands: r, paletteOpen: a, setPaletteOpen: e, execute: o } = d(), l = n(() => {
|
|
9
|
+
e(!1);
|
|
10
|
+
}, [e]), s = n(
|
|
11
|
+
(t) => {
|
|
12
|
+
o(t.id).catch((c) => {
|
|
13
|
+
console.error(`Command "${t.id}" failed.`, c);
|
|
14
|
+
});
|
|
15
|
+
},
|
|
16
|
+
[o]
|
|
17
|
+
);
|
|
18
|
+
return /* @__PURE__ */ p(
|
|
19
|
+
i,
|
|
20
|
+
{
|
|
21
|
+
open: a,
|
|
22
|
+
commands: r,
|
|
23
|
+
onSelect: s,
|
|
24
|
+
onClose: l,
|
|
25
|
+
groupOrder: m
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
P as ShellCommandPalette
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ShellCommandPalette.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellCommandPalette.js","sources":["../../../src/layouts/shell/ShellCommandPalette.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from 'react';\n\nimport { type Command, useCommands } from '../../commands';\nimport { CommandPalette } from '../../components/ui/CommandPalette';\n\ninterface ShellCommandPaletteProps {\n groupOrder?: string[];\n}\n\n/** The CommandPalette filled from `<CommandProvider>` and opened by its mod+k. */\nexport function ShellCommandPalette({\n groupOrder,\n}: ShellCommandPaletteProps): ReactElement {\n const { commands, paletteOpen, setPaletteOpen, execute } = useCommands();\n const close = useCallback(() => {\n setPaletteOpen(false);\n }, [setPaletteOpen]);\n const run = useCallback(\n (cmd: Command) => {\n execute(cmd.id).catch((error: unknown) => {\n console.error(`Command \"${cmd.id}\" failed.`, error);\n });\n },\n [execute],\n );\n return (\n <CommandPalette\n open={paletteOpen}\n commands={commands}\n onSelect={run}\n onClose={close}\n groupOrder={groupOrder}\n />\n );\n}\n"],"names":["ShellCommandPalette","groupOrder","commands","paletteOpen","setPaletteOpen","execute","useCommands","close","useCallback","run","cmd","error","jsx","CommandPalette"],"mappings":";;;;AAUO,SAASA,EAAoB;AAAA,EAClC,YAAAC;AACF,GAA2C;AACzC,QAAM,EAAE,UAAAC,GAAU,aAAAC,GAAa,gBAAAC,GAAgB,SAAAC,EAAA,IAAYC,EAAA,GACrDC,IAAQC,EAAY,MAAM;AAC9B,IAAAJ,EAAe,EAAK;AAAA,EACtB,GAAG,CAACA,CAAc,CAAC,GACbK,IAAMD;AAAA,IACV,CAACE,MAAiB;AAChB,MAAAL,EAAQK,EAAI,EAAE,EAAE,MAAM,CAACC,MAAmB;AACxC,gBAAQ,MAAM,YAAYD,EAAI,EAAE,aAAaC,CAAK;AAAA,MACpD,CAAC;AAAA,IACH;AAAA,IACA,CAACN,CAAO;AAAA,EAAA;AAEV,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,MAAMV;AAAA,MACN,UAAAD;AAAA,MACA,UAAUO;AAAA,MACV,SAASF;AAAA,MACT,YAAAN;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=require("react/jsx-runtime"),n=require("react"),b=require("../../components/ui/InboxPage.cjs"),f=require("./useOpenNotification.cjs"),g=require("../../notifications/useNotifications.cjs");function x({defaultFilter:t,surface:r}){const{items:i,unreadCount:s,markAllRead:e,error:a,refetch:o}=g.useNotifications(),c=f.useOpenNotification(),u=n.useCallback(()=>{e?.()},[e]),l=n.useCallback(()=>{o?.()},[o]);return d.jsx(b.InboxPage,{items:i,unreadCount:s,onOpen:c,onMarkAllRead:e?u:void 0,error:a,onRetry:o?l:void 0,defaultFilter:t,surface:r})}exports.ShellInboxPage=x;
|
|
2
|
+
//# sourceMappingURL=ShellInboxPage.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellInboxPage.cjs","sources":["../../../src/layouts/shell/ShellInboxPage.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from 'react';\n\nimport {\n InboxPage,\n type InboxPageSurface,\n} from '../../components/ui/InboxPage';\nimport { useNotifications } from '../../notifications';\nimport { useOpenNotification } from './useOpenNotification';\n\ninterface ShellInboxPageProps {\n defaultFilter?: 'all' | 'unread';\n surface?: InboxPageSurface;\n}\n\n/**\n * The InboxPage filled from `<NotificationProvider>`: opening an item marks\n * it read and follows its `to`. Mount it on the route `inboxPath` names.\n */\nexport function ShellInboxPage({\n defaultFilter,\n surface,\n}: ShellInboxPageProps): ReactElement {\n const { items, unreadCount, markAllRead, error, refetch } =\n useNotifications();\n const open = useOpenNotification();\n const markAll = useCallback(() => {\n void markAllRead?.();\n }, [markAllRead]);\n const retry = useCallback(() => {\n void refetch?.();\n }, [refetch]);\n return (\n <InboxPage\n items={items}\n unreadCount={unreadCount}\n onOpen={open}\n onMarkAllRead={markAllRead ? markAll : undefined}\n error={error}\n onRetry={refetch ? retry : undefined}\n defaultFilter={defaultFilter}\n surface={surface}\n />\n );\n}\n"],"names":["ShellInboxPage","defaultFilter","surface","items","unreadCount","markAllRead","error","refetch","useNotifications","open","useOpenNotification","markAll","useCallback","retry","jsx","InboxPage"],"mappings":"oRAkBO,SAASA,EAAe,CAC7B,cAAAC,EACA,QAAAC,CACF,EAAsC,CACpC,KAAM,CAAE,MAAAC,EAAO,YAAAC,EAAa,YAAAC,EAAa,MAAAC,EAAO,QAAAC,CAAA,EAC9CC,mBAAA,EACIC,EAAOC,EAAAA,oBAAA,EACPC,EAAUC,EAAAA,YAAY,IAAM,CAC3BP,IAAA,CACP,EAAG,CAACA,CAAW,CAAC,EACVQ,EAAQD,EAAAA,YAAY,IAAM,CACzBL,IAAA,CACP,EAAG,CAACA,CAAO,CAAC,EACZ,OACEO,EAAAA,IAACC,EAAAA,UAAA,CACC,MAAAZ,EACA,YAAAC,EACA,OAAQK,EACR,cAAeJ,EAAcM,EAAU,OACvC,MAAAL,EACA,QAASC,EAAUM,EAAQ,OAC3B,cAAAZ,EACA,QAAAC,CAAA,CAAA,CAGN"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import { ReactElement } from 'react';
|
|
2
|
+
import { InboxPageSurface } from '../../components/ui/InboxPage';
|
|
3
|
+
interface ShellInboxPageProps {
|
|
4
|
+
defaultFilter?: 'all' | 'unread';
|
|
5
|
+
surface?: InboxPageSurface;
|
|
6
|
+
}
|
|
7
|
+
/**
|
|
8
|
+
* The InboxPage filled from `<NotificationProvider>`: opening an item marks
|
|
9
|
+
* it read and follows its `to`. Mount it on the route `inboxPath` names.
|
|
10
|
+
*/
|
|
11
|
+
export declare function ShellInboxPage({ defaultFilter, surface, }: ShellInboxPageProps): ReactElement;
|
|
12
|
+
export {};
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { jsx as f } from "react/jsx-runtime";
|
|
2
|
+
import { useCallback as t } from "react";
|
|
3
|
+
import { InboxPage as p } from "../../components/ui/InboxPage.js";
|
|
4
|
+
import { useOpenNotification as d } from "./useOpenNotification.js";
|
|
5
|
+
import { useNotifications as u } from "../../notifications/useNotifications.js";
|
|
6
|
+
function R({
|
|
7
|
+
defaultFilter: e,
|
|
8
|
+
surface: n
|
|
9
|
+
}) {
|
|
10
|
+
const { items: i, unreadCount: m, markAllRead: o, error: a, refetch: r } = u(), l = d(), s = t(() => {
|
|
11
|
+
o?.();
|
|
12
|
+
}, [o]), c = t(() => {
|
|
13
|
+
r?.();
|
|
14
|
+
}, [r]);
|
|
15
|
+
return /* @__PURE__ */ f(
|
|
16
|
+
p,
|
|
17
|
+
{
|
|
18
|
+
items: i,
|
|
19
|
+
unreadCount: m,
|
|
20
|
+
onOpen: l,
|
|
21
|
+
onMarkAllRead: o ? s : void 0,
|
|
22
|
+
error: a,
|
|
23
|
+
onRetry: r ? c : void 0,
|
|
24
|
+
defaultFilter: e,
|
|
25
|
+
surface: n
|
|
26
|
+
}
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
export {
|
|
30
|
+
R as ShellInboxPage
|
|
31
|
+
};
|
|
32
|
+
//# sourceMappingURL=ShellInboxPage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellInboxPage.js","sources":["../../../src/layouts/shell/ShellInboxPage.tsx"],"sourcesContent":["import { type ReactElement, useCallback } from 'react';\n\nimport {\n InboxPage,\n type InboxPageSurface,\n} from '../../components/ui/InboxPage';\nimport { useNotifications } from '../../notifications';\nimport { useOpenNotification } from './useOpenNotification';\n\ninterface ShellInboxPageProps {\n defaultFilter?: 'all' | 'unread';\n surface?: InboxPageSurface;\n}\n\n/**\n * The InboxPage filled from `<NotificationProvider>`: opening an item marks\n * it read and follows its `to`. Mount it on the route `inboxPath` names.\n */\nexport function ShellInboxPage({\n defaultFilter,\n surface,\n}: ShellInboxPageProps): ReactElement {\n const { items, unreadCount, markAllRead, error, refetch } =\n useNotifications();\n const open = useOpenNotification();\n const markAll = useCallback(() => {\n void markAllRead?.();\n }, [markAllRead]);\n const retry = useCallback(() => {\n void refetch?.();\n }, [refetch]);\n return (\n <InboxPage\n items={items}\n unreadCount={unreadCount}\n onOpen={open}\n onMarkAllRead={markAllRead ? markAll : undefined}\n error={error}\n onRetry={refetch ? retry : undefined}\n defaultFilter={defaultFilter}\n surface={surface}\n />\n );\n}\n"],"names":["ShellInboxPage","defaultFilter","surface","items","unreadCount","markAllRead","error","refetch","useNotifications","open","useOpenNotification","markAll","useCallback","retry","jsx","InboxPage"],"mappings":";;;;;AAkBO,SAASA,EAAe;AAAA,EAC7B,eAAAC;AAAA,EACA,SAAAC;AACF,GAAsC;AACpC,QAAM,EAAE,OAAAC,GAAO,aAAAC,GAAa,aAAAC,GAAa,OAAAC,GAAO,SAAAC,EAAA,IAC9CC,EAAA,GACIC,IAAOC,EAAA,GACPC,IAAUC,EAAY,MAAM;AAChC,IAAKP,IAAA;AAAA,EACP,GAAG,CAACA,CAAW,CAAC,GACVQ,IAAQD,EAAY,MAAM;AAC9B,IAAKL,IAAA;AAAA,EACP,GAAG,CAACA,CAAO,CAAC;AACZ,SACE,gBAAAO;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAZ;AAAA,MACA,aAAAC;AAAA,MACA,QAAQK;AAAA,MACR,eAAeJ,IAAcM,IAAU;AAAA,MACvC,OAAAL;AAAA,MACA,SAASC,IAAUM,IAAQ;AAAA,MAC3B,eAAAZ;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA;AAGN;"}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("react/jsx-runtime"),r=require("../../components/ui/NotificationBell.cjs"),u=require("./RouterLink.cjs"),c=require("./useOpenNotification.cjs"),s=require("../../notifications/useNotifications.cjs");function l({inboxPath:e}){const{items:i,unreadCount:t}=s.useNotifications(),o=c.useOpenNotification();return n.jsx(r.NotificationBell,{items:i,unreadCount:t,onOpen:o,inboxPath:e,linkComponent:u.RouterLink})}exports.ShellNotificationBell=l;
|
|
2
|
+
//# sourceMappingURL=ShellNotificationBell.cjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellNotificationBell.cjs","sources":["../../../src/layouts/shell/ShellNotificationBell.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { NotificationBell } from '../../components/ui/NotificationBell';\nimport { useNotifications } from '../../notifications';\nimport { RouterLink } from './RouterLink';\nimport { useOpenNotification } from './useOpenNotification';\n\n/** The NotificationBell filled from `<NotificationProvider>`. */\nexport function ShellNotificationBell({\n inboxPath,\n}: {\n inboxPath: string;\n}): ReactElement {\n const { items, unreadCount } = useNotifications();\n const open = useOpenNotification();\n return (\n <NotificationBell\n items={items}\n unreadCount={unreadCount}\n onOpen={open}\n inboxPath={inboxPath}\n linkComponent={RouterLink}\n />\n );\n}\n"],"names":["ShellNotificationBell","inboxPath","items","unreadCount","useNotifications","open","useOpenNotification","jsx","NotificationBell","RouterLink"],"mappings":"sSAQO,SAASA,EAAsB,CACpC,UAAAC,CACF,EAEiB,CACf,KAAM,CAAE,MAAAC,EAAO,YAAAC,CAAA,EAAgBC,mBAAA,EACzBC,EAAOC,EAAAA,oBAAA,EACb,OACEC,EAAAA,IAACC,EAAAA,iBAAA,CACC,MAAAN,EACA,YAAAC,EACA,OAAQE,EACR,UAAAJ,EACA,cAAeQ,EAAAA,UAAA,CAAA,CAGrB"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { jsx as r } from "react/jsx-runtime";
|
|
2
|
+
import { NotificationBell as e } from "../../components/ui/NotificationBell.js";
|
|
3
|
+
import { RouterLink as m } from "./RouterLink.js";
|
|
4
|
+
import { useOpenNotification as f } from "./useOpenNotification.js";
|
|
5
|
+
import { useNotifications as p } from "../../notifications/useNotifications.js";
|
|
6
|
+
function N({
|
|
7
|
+
inboxPath: o
|
|
8
|
+
}) {
|
|
9
|
+
const { items: t, unreadCount: i } = p(), n = f();
|
|
10
|
+
return /* @__PURE__ */ r(
|
|
11
|
+
e,
|
|
12
|
+
{
|
|
13
|
+
items: t,
|
|
14
|
+
unreadCount: i,
|
|
15
|
+
onOpen: n,
|
|
16
|
+
inboxPath: o,
|
|
17
|
+
linkComponent: m
|
|
18
|
+
}
|
|
19
|
+
);
|
|
20
|
+
}
|
|
21
|
+
export {
|
|
22
|
+
N as ShellNotificationBell
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=ShellNotificationBell.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ShellNotificationBell.js","sources":["../../../src/layouts/shell/ShellNotificationBell.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { NotificationBell } from '../../components/ui/NotificationBell';\nimport { useNotifications } from '../../notifications';\nimport { RouterLink } from './RouterLink';\nimport { useOpenNotification } from './useOpenNotification';\n\n/** The NotificationBell filled from `<NotificationProvider>`. */\nexport function ShellNotificationBell({\n inboxPath,\n}: {\n inboxPath: string;\n}): ReactElement {\n const { items, unreadCount } = useNotifications();\n const open = useOpenNotification();\n return (\n <NotificationBell\n items={items}\n unreadCount={unreadCount}\n onOpen={open}\n inboxPath={inboxPath}\n linkComponent={RouterLink}\n />\n );\n}\n"],"names":["ShellNotificationBell","inboxPath","items","unreadCount","useNotifications","open","useOpenNotification","jsx","NotificationBell","RouterLink"],"mappings":";;;;;AAQO,SAASA,EAAsB;AAAA,EACpC,WAAAC;AACF,GAEiB;AACf,QAAM,EAAE,OAAAC,GAAO,aAAAC,EAAA,IAAgBC,EAAA,GACzBC,IAAOC,EAAA;AACb,SACE,gBAAAC;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAAN;AAAA,MACA,aAAAC;AAAA,MACA,QAAQE;AAAA,MACR,WAAAJ;AAAA,MACA,eAAeQ;AAAA,IAAA;AAAA,EAAA;AAGrB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),c=require("react-router-dom"),h=require("./paths.cjs");function t({activeApp:s,drawerRef:n}){return!s?.sidebar||s.sidebar.length===0?null:e.jsx("aside",{ref:n,className:"aegis-shell__sidebar",children:e.jsxs("section",{className:"aegis-shell__sidebar-section",children:[e.jsx("div",{className:"aegis-shell__sidebar-heading",children:s.label}),s.sidebar.map((l,r)=>e.jsxs("div",{children:[l.label&&e.jsx("div",{className:"aegis-shell__sidebar-heading",children:l.label}),l.items.map(a=>{const i=h.joinPath(s.basePath,a.to);return e.jsxs(c.NavLink,{to:i,end:a.end,className:({isActive:d})=>["aegis-shell__nav-link",d?"aegis-shell__nav-link--active":""].filter(Boolean).join(" "),children:[a.icon&&e.jsx("span",{className:"aegis-shell__nav-icon",children:a.icon}),e.jsx("span",{children:a.label})]},i)})]},r))]})})}exports.Sidebar=t;
|
|
2
2
|
//# sourceMappingURL=Sidebar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Sidebar.cjs","sources":["../../../src/layouts/shell/Sidebar.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { NavLink } from 'react-router-dom';\n\nimport { joinPath } from './paths';\nimport type { AegisApp } from './types';\n\ninterface SidebarProps {\n activeApp: AegisApp | undefined;\n}\n\n/**\n * Per-app inner nav. The global app list lives in the header's\n * `AppSwitcher`, not here — sidebar only ever shows the current app.\n */\nexport function Sidebar({
|
|
1
|
+
{"version":3,"file":"Sidebar.cjs","sources":["../../../src/layouts/shell/Sidebar.tsx"],"sourcesContent":["import type { ReactElement, Ref } from 'react';\n\nimport { NavLink } from 'react-router-dom';\n\nimport { joinPath } from './paths';\nimport type { AegisApp } from './types';\n\ninterface SidebarProps {\n activeApp: AegisApp | undefined;\n /** The sidebar element, which is the navigation drawer at 768 px and below. */\n drawerRef?: Ref<HTMLElement>;\n}\n\n/**\n * Per-app inner nav. The global app list lives in the header's\n * `AppSwitcher`, not here — sidebar only ever shows the current app.\n */\nexport function Sidebar({\n activeApp,\n drawerRef,\n}: SidebarProps): ReactElement | null {\n if (!activeApp?.sidebar || activeApp.sidebar.length === 0) {\n return null;\n }\n\n return (\n <aside ref={drawerRef} className=\"aegis-shell__sidebar\">\n <section className=\"aegis-shell__sidebar-section\">\n <div className=\"aegis-shell__sidebar-heading\">{activeApp.label}</div>\n {activeApp.sidebar.map((group, idx) => (\n <div key={idx}>\n {group.label && (\n <div className=\"aegis-shell__sidebar-heading\">{group.label}</div>\n )}\n {group.items.map((item) => {\n const path = joinPath(activeApp.basePath, item.to);\n return (\n <NavLink\n key={path}\n to={path}\n end={item.end}\n className={({ isActive }) =>\n [\n 'aegis-shell__nav-link',\n isActive ? 'aegis-shell__nav-link--active' : '',\n ]\n .filter(Boolean)\n .join(' ')\n }\n >\n {item.icon && (\n <span className=\"aegis-shell__nav-icon\">{item.icon}</span>\n )}\n <span>{item.label}</span>\n </NavLink>\n );\n })}\n </div>\n ))}\n </section>\n </aside>\n );\n}\n"],"names":["Sidebar","activeApp","drawerRef","jsx","jsxs","group","idx","item","path","joinPath","NavLink","isActive"],"mappings":"4KAiBO,SAASA,EAAQ,CACtB,UAAAC,EACA,UAAAC,CACF,EAAsC,CACpC,MAAI,CAACD,GAAW,SAAWA,EAAU,QAAQ,SAAW,EAC/C,KAIPE,EAAAA,IAAC,SAAM,IAAKD,EAAW,UAAU,uBAC/B,SAAAE,EAAAA,KAAC,UAAA,CAAQ,UAAU,+BACjB,SAAA,CAAAD,EAAAA,IAAC,MAAA,CAAI,UAAU,+BAAgC,SAAAF,EAAU,MAAM,EAC9DA,EAAU,QAAQ,IAAI,CAACI,EAAOC,WAC5B,MAAA,CACE,SAAA,CAAAD,EAAM,OACLF,EAAAA,IAAC,MAAA,CAAI,UAAU,+BAAgC,WAAM,MAAM,EAE5DE,EAAM,MAAM,IAAKE,GAAS,CACzB,MAAMC,EAAOC,EAAAA,SAASR,EAAU,SAAUM,EAAK,EAAE,EACjD,OACEH,EAAAA,KAACM,EAAAA,QAAA,CAEC,GAAIF,EACJ,IAAKD,EAAK,IACV,UAAW,CAAC,CAAE,SAAAI,KACZ,CACE,wBACAA,EAAW,gCAAkC,EAAA,EAE5C,OAAO,OAAO,EACd,KAAK,GAAG,EAGZ,SAAA,CAAAJ,EAAK,MACJJ,EAAAA,IAAC,OAAA,CAAK,UAAU,wBAAyB,WAAK,KAAK,EAErDA,EAAAA,IAAC,OAAA,CAAM,SAAAI,EAAK,KAAA,CAAM,CAAA,CAAA,EAfbC,CAAA,CAkBX,CAAC,CAAA,CAAA,EA1BOF,CA2BV,CACD,CAAA,CAAA,CACH,CAAA,CACF,CAEJ"}
|