@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,20 +1,6 @@
|
|
|
1
|
-
import { createContext as
|
|
2
|
-
const
|
|
3
|
-
commands: [],
|
|
4
|
-
allCommands: [],
|
|
5
|
-
register: () => () => {
|
|
6
|
-
},
|
|
7
|
-
setActiveScope: () => {
|
|
8
|
-
},
|
|
9
|
-
execute: () => Promise.reject(new Error("No <CommandProvider> mounted above caller.")),
|
|
10
|
-
setPaletteOpen: () => {
|
|
11
|
-
},
|
|
12
|
-
paletteOpen: !1
|
|
13
|
-
}, a = e(
|
|
14
|
-
o
|
|
15
|
-
);
|
|
1
|
+
import { createContext as t } from "react";
|
|
2
|
+
const e = t(null);
|
|
16
3
|
export {
|
|
17
|
-
|
|
18
|
-
o as defaultCommandContextValue
|
|
4
|
+
e as CommandContext
|
|
19
5
|
};
|
|
20
6
|
//# sourceMappingURL=commandContext.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"commandContext.js","sources":["../../src/commands/commandContext.ts"],"sourcesContent":["import { type ReactNode, createContext } from 'react';\n\
|
|
1
|
+
{"version":3,"file":"commandContext.js","sources":["../../src/commands/commandContext.ts"],"sourcesContent":["import { type ReactNode, createContext } from 'react';\n\n/**\n * A single executable action surfaced through the command palette and,\n * eventually, agent tool-calls. Commands are presentational contracts —\n * the host owns the side-effect inside `handler`.\n */\nexport interface Command<TArgs = unknown> {\n /** Globally unique id. Convention: 'app.action' e.g. 'projects.create'. */\n id: string;\n /** Human label shown in the palette. */\n label: string;\n /** Longer description — also shown to agents as tool description. */\n description?: string;\n /** Search keywords (lowercase). */\n keywords?: string[];\n /** Icon node shown in the palette row. */\n icon?: ReactNode;\n /** UI grouping (e.g. 'Quick actions', 'Navigate'). Default: 'Other'. */\n group?: string;\n /** Keybinding using 'mod' for Cmd/Ctrl, e.g. 'mod+shift+p'. */\n shortcut?: string;\n /** When set, command is only available while this AegisApp is active. */\n scope?: string;\n /** Hide from palette UI; still callable via execute() (used by agents). */\n agentOnly?: boolean;\n /** JSON-schema-ish param description for agents. Library doesn't parse it. */\n schema?: Record<string, unknown>;\n /** The actual side-effect. */\n handler: (args?: TArgs) => void | Promise<void>;\n /** Optional undo callback for hosts that offer Undo; CommandPalette never calls it. */\n undo?: () => void | Promise<void>;\n}\n\n/**\n * Contract exposed by the CommandProvider. Unlike auth/notifications,\n * the library owns this state — the registry only makes sense as a\n * library-managed runtime.\n */\nexport interface CommandContextValue {\n /** All registered commands, scope-filtered for the current active app. */\n commands: Command[];\n /** All registered commands regardless of scope (for agents). */\n allCommands: Command[];\n /** Register a batch of commands. Returns an unregister function. */\n register: (cmds: Command[]) => () => void;\n /** Set the active scope (called by AegisShell — apps don't touch this). */\n setActiveScope: (scope: string | undefined) => void;\n /** Execute by id. Throws if no command with that id. */\n execute: (id: string, args?: unknown) => Promise<void>;\n /** Open or close the palette. */\n setPaletteOpen: (open: boolean) => void;\n paletteOpen: boolean;\n}\n\n/** Null until a `<CommandProvider>` is mounted; `useCommands` reads it. */\nexport const CommandContext = createContext<CommandContextValue | null>(null);\n"],"names":["CommandContext","createContext"],"mappings":";AAwDO,MAAMA,IAAiBC,EAA0C,IAAI;"}
|
package/dist/commands/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
export { CommandProvider } from './CommandProvider';
|
|
2
|
-
export { useCommands } from './useCommands';
|
|
2
|
+
export { useCommands, useHasCommandProvider } from './useCommands';
|
|
3
3
|
export { useRegisterCommands } from './useRegisterCommands';
|
|
4
4
|
export { formatShortcut } from './shortcut';
|
|
5
5
|
export type { Command, CommandContextValue } from './commandContext';
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react"),o=require("./commandContext.cjs"),t={commands:[],allCommands:[],register:()=>()=>{},setActiveScope:()=>{},execute:()=>Promise.reject(new Error("No <CommandProvider> mounted above caller.")),setPaletteOpen:()=>{},paletteOpen:!1};function n(){return e.useContext(o.CommandContext)??t}function r(){return e.useContext(o.CommandContext)!==null}exports.useCommands=n;exports.useHasCommandProvider=r;
|
|
2
2
|
//# sourceMappingURL=useCommands.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommands.cjs","sources":["../../src/commands/useCommands.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { CommandContext, type CommandContextValue } from './commandContext';\n\n/**\n * Read the command registry context. Returns
|
|
1
|
+
{"version":3,"file":"useCommands.cjs","sources":["../../src/commands/useCommands.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { CommandContext, type CommandContextValue } from './commandContext';\n\nconst noProviderValue: CommandContextValue = {\n commands: [],\n allCommands: [],\n register: () => () => undefined,\n setActiveScope: () => undefined,\n execute: () =>\n Promise.reject(new Error('No <CommandProvider> mounted above caller.')),\n setPaletteOpen: () => undefined,\n paletteOpen: false,\n};\n\n/**\n * Read the command registry context. Returns a no-op value when no\n * <CommandProvider> is mounted above the caller.\n */\nexport function useCommands(): CommandContextValue {\n return useContext(CommandContext) ?? noProviderValue;\n}\n\n/** Whether a <CommandProvider> is mounted above the caller. */\nexport function useHasCommandProvider(): boolean {\n return useContext(CommandContext) !== null;\n}\n"],"names":["noProviderValue","useCommands","useContext","CommandContext","useHasCommandProvider"],"mappings":"2IAIMA,EAAuC,CAC3C,SAAU,CAAA,EACV,YAAa,CAAA,EACb,SAAU,IAAM,IAAA,GAChB,eAAgB,IAAA,GAChB,QAAS,IACP,QAAQ,OAAO,IAAI,MAAM,4CAA4C,CAAC,EACxE,eAAgB,IAAA,GAChB,YAAa,EACf,EAMO,SAASC,GAAmC,CACjD,OAAOC,EAAAA,WAAWC,EAAAA,cAAc,GAAKH,CACvC,CAGO,SAASI,GAAiC,CAC/C,OAAOF,EAAAA,WAAWC,EAAAA,cAAc,IAAM,IACxC"}
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { CommandContextValue } from './commandContext';
|
|
2
2
|
/**
|
|
3
|
-
* Read the command registry context. Returns
|
|
4
|
-
*
|
|
3
|
+
* Read the command registry context. Returns a no-op value when no
|
|
4
|
+
* <CommandProvider> is mounted above the caller.
|
|
5
5
|
*/
|
|
6
6
|
export declare function useCommands(): CommandContextValue;
|
|
7
|
+
/** Whether a <CommandProvider> is mounted above the caller. */
|
|
8
|
+
export declare function useHasCommandProvider(): boolean;
|
|
@@ -1,9 +1,25 @@
|
|
|
1
|
-
import { useContext as
|
|
2
|
-
import { CommandContext as
|
|
3
|
-
|
|
4
|
-
|
|
1
|
+
import { useContext as e } from "react";
|
|
2
|
+
import { CommandContext as o } from "./commandContext.js";
|
|
3
|
+
const r = {
|
|
4
|
+
commands: [],
|
|
5
|
+
allCommands: [],
|
|
6
|
+
register: () => () => {
|
|
7
|
+
},
|
|
8
|
+
setActiveScope: () => {
|
|
9
|
+
},
|
|
10
|
+
execute: () => Promise.reject(new Error("No <CommandProvider> mounted above caller.")),
|
|
11
|
+
setPaletteOpen: () => {
|
|
12
|
+
},
|
|
13
|
+
paletteOpen: !1
|
|
14
|
+
};
|
|
15
|
+
function m() {
|
|
16
|
+
return e(o) ?? r;
|
|
17
|
+
}
|
|
18
|
+
function a() {
|
|
19
|
+
return e(o) !== null;
|
|
5
20
|
}
|
|
6
21
|
export {
|
|
7
|
-
|
|
22
|
+
m as useCommands,
|
|
23
|
+
a as useHasCommandProvider
|
|
8
24
|
};
|
|
9
25
|
//# sourceMappingURL=useCommands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useCommands.js","sources":["../../src/commands/useCommands.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { CommandContext, type CommandContextValue } from './commandContext';\n\n/**\n * Read the command registry context. Returns
|
|
1
|
+
{"version":3,"file":"useCommands.js","sources":["../../src/commands/useCommands.ts"],"sourcesContent":["import { useContext } from 'react';\n\nimport { CommandContext, type CommandContextValue } from './commandContext';\n\nconst noProviderValue: CommandContextValue = {\n commands: [],\n allCommands: [],\n register: () => () => undefined,\n setActiveScope: () => undefined,\n execute: () =>\n Promise.reject(new Error('No <CommandProvider> mounted above caller.')),\n setPaletteOpen: () => undefined,\n paletteOpen: false,\n};\n\n/**\n * Read the command registry context. Returns a no-op value when no\n * <CommandProvider> is mounted above the caller.\n */\nexport function useCommands(): CommandContextValue {\n return useContext(CommandContext) ?? noProviderValue;\n}\n\n/** Whether a <CommandProvider> is mounted above the caller. */\nexport function useHasCommandProvider(): boolean {\n return useContext(CommandContext) !== null;\n}\n"],"names":["noProviderValue","useCommands","useContext","CommandContext","useHasCommandProvider"],"mappings":";;AAIA,MAAMA,IAAuC;AAAA,EAC3C,UAAU,CAAA;AAAA,EACV,aAAa,CAAA;AAAA,EACb,UAAU,MAAM,MAAA;AAAA;AAAA,EAChB,gBAAgB,MAAA;AAAA;AAAA,EAChB,SAAS,MACP,QAAQ,OAAO,IAAI,MAAM,4CAA4C,CAAC;AAAA,EACxE,gBAAgB,MAAA;AAAA;AAAA,EAChB,aAAa;AACf;AAMO,SAASC,IAAmC;AACjD,SAAOC,EAAWC,CAAc,KAAKH;AACvC;AAGO,SAASI,IAAiC;AAC/C,SAAOF,EAAWC,CAAc,MAAM;AACxC;"}
|
|
@@ -1,2 +1,3 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("react"),f=require("../hooks/useIsomorphicLayoutEffect.cjs"),c=require("./useCommands.cjs");function g(e){return JSON.stringify([e.id,e.label,e.description,e.keywords,e.group,e.shortcut,e.scope,e.agentOnly,e.schema,e.undo!==void 0])}function l(e){const{register:o}=c.useCommands(),r=u.useRef(e);f.useIsomorphicLayoutEffect(()=>{r.current=e});const i=e.map(g).join(`
|
|
2
|
+
`);u.useEffect(()=>{const s=t=>r.current.find(n=>n.id===t),a=r.current.map(t=>({...t,handler:n=>(s(t.id)??t).handler(n),undo:t.undo&&(()=>(s(t.id)??t).undo?.())}));return o(a)},[o,i])}exports.useRegisterCommands=l;
|
|
2
3
|
//# sourceMappingURL=useRegisterCommands.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRegisterCommands.cjs","sources":["../../src/commands/useRegisterCommands.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { Command } from './commandContext';\nimport { useCommands } from './useCommands';\n\n/**\n * Register a batch of commands while the calling component is mounted.\n *
|
|
1
|
+
{"version":3,"file":"useRegisterCommands.cjs","sources":["../../src/commands/useRegisterCommands.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect';\nimport type { Command } from './commandContext';\nimport { useCommands } from './useCommands';\n\n/** Every field the palette, the shortcuts and agents read, except the icon and the functions' identity. */\nfunction describe(cmd: Command): string {\n return JSON.stringify([\n cmd.id,\n cmd.label,\n cmd.description,\n cmd.keywords,\n cmd.group,\n cmd.shortcut,\n cmd.scope,\n cmd.agentOnly,\n cmd.schema,\n cmd.undo !== undefined,\n ]);\n}\n\n/**\n * Register a batch of commands while the calling component is mounted.\n * A new array literal every render does not thrash the registry: the\n * commands re-register only when a described field changes, and `handler`\n * and `undo` always run the latest render's functions.\n */\nexport function useRegisterCommands(cmds: Command[]): void {\n const { register } = useCommands();\n const cmdsRef = useRef(cmds);\n useIsomorphicLayoutEffect(() => {\n cmdsRef.current = cmds;\n });\n\n const key = cmds.map(describe).join('\\n');\n\n useEffect(() => {\n const latest = (id: string): Command | undefined =>\n cmdsRef.current.find((c) => c.id === id);\n const registered = cmdsRef.current.map(\n (cmd): Command => ({\n ...cmd,\n handler: (args) => (latest(cmd.id) ?? cmd).handler(args),\n undo: cmd.undo && (() => (latest(cmd.id) ?? cmd).undo?.()),\n }),\n );\n return register(registered);\n }, [register, key]);\n}\n"],"names":["describe","cmd","useRegisterCommands","cmds","register","useCommands","cmdsRef","useRef","useIsomorphicLayoutEffect","key","useEffect","latest","id","c","registered","args"],"mappings":"4LAOA,SAASA,EAASC,EAAsB,CACtC,OAAO,KAAK,UAAU,CACpBA,EAAI,GACJA,EAAI,MACJA,EAAI,YACJA,EAAI,SACJA,EAAI,MACJA,EAAI,SACJA,EAAI,MACJA,EAAI,UACJA,EAAI,OACJA,EAAI,OAAS,MAAA,CACd,CACH,CAQO,SAASC,EAAoBC,EAAuB,CACzD,KAAM,CAAE,SAAAC,CAAA,EAAaC,cAAA,EACfC,EAAUC,EAAAA,OAAOJ,CAAI,EAC3BK,EAAAA,0BAA0B,IAAM,CAC9BF,EAAQ,QAAUH,CACpB,CAAC,EAED,MAAMM,EAAMN,EAAK,IAAIH,CAAQ,EAAE,KAAK;AAAA,CAAI,EAExCU,EAAAA,UAAU,IAAM,CACd,MAAMC,EAAUC,GACdN,EAAQ,QAAQ,KAAMO,GAAMA,EAAE,KAAOD,CAAE,EACnCE,EAAaR,EAAQ,QAAQ,IAChCL,IAAkB,CACjB,GAAGA,EACH,QAAUc,IAAUJ,EAAOV,EAAI,EAAE,GAAKA,GAAK,QAAQc,CAAI,EACvD,KAAMd,EAAI,OAAS,KAAOU,EAAOV,EAAI,EAAE,GAAKA,GAAK,OAAA,EAAO,EAC1D,EAEF,OAAOG,EAASU,CAAU,CAC5B,EAAG,CAACV,EAAUK,CAAG,CAAC,CACpB"}
|
|
@@ -1,7 +1,8 @@
|
|
|
1
1
|
import { Command } from './commandContext';
|
|
2
2
|
/**
|
|
3
3
|
* Register a batch of commands while the calling component is mounted.
|
|
4
|
-
*
|
|
5
|
-
*
|
|
4
|
+
* A new array literal every render does not thrash the registry: the
|
|
5
|
+
* commands re-register only when a described field changes, and `handler`
|
|
6
|
+
* and `undo` always run the latest render's functions.
|
|
6
7
|
*/
|
|
7
8
|
export declare function useRegisterCommands(cmds: Command[]): void;
|
|
@@ -1,12 +1,39 @@
|
|
|
1
|
-
import { useRef as
|
|
2
|
-
import {
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
import { useRef as f, useEffect as a } from "react";
|
|
2
|
+
import { useIsomorphicLayoutEffect as p } from "../hooks/useIsomorphicLayoutEffect.js";
|
|
3
|
+
import { useCommands as g } from "./useCommands.js";
|
|
4
|
+
function l(e) {
|
|
5
|
+
return JSON.stringify([
|
|
6
|
+
e.id,
|
|
7
|
+
e.label,
|
|
8
|
+
e.description,
|
|
9
|
+
e.keywords,
|
|
10
|
+
e.group,
|
|
11
|
+
e.shortcut,
|
|
12
|
+
e.scope,
|
|
13
|
+
e.agentOnly,
|
|
14
|
+
e.schema,
|
|
15
|
+
e.undo !== void 0
|
|
16
|
+
]);
|
|
17
|
+
}
|
|
18
|
+
function d(e) {
|
|
19
|
+
const { register: t } = g(), o = f(e);
|
|
20
|
+
p(() => {
|
|
21
|
+
o.current = e;
|
|
22
|
+
});
|
|
23
|
+
const i = e.map(l).join(`
|
|
24
|
+
`);
|
|
25
|
+
a(() => {
|
|
26
|
+
const s = (r) => o.current.find((n) => n.id === r), u = o.current.map(
|
|
27
|
+
(r) => ({
|
|
28
|
+
...r,
|
|
29
|
+
handler: (n) => (s(r.id) ?? r).handler(n),
|
|
30
|
+
undo: r.undo && (() => (s(r.id) ?? r).undo?.())
|
|
31
|
+
})
|
|
32
|
+
);
|
|
33
|
+
return t(u);
|
|
34
|
+
}, [t, i]);
|
|
8
35
|
}
|
|
9
36
|
export {
|
|
10
|
-
|
|
37
|
+
d as useRegisterCommands
|
|
11
38
|
};
|
|
12
39
|
//# sourceMappingURL=useRegisterCommands.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useRegisterCommands.js","sources":["../../src/commands/useRegisterCommands.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport type { Command } from './commandContext';\nimport { useCommands } from './useCommands';\n\n/**\n * Register a batch of commands while the calling component is mounted.\n *
|
|
1
|
+
{"version":3,"file":"useRegisterCommands.js","sources":["../../src/commands/useRegisterCommands.ts"],"sourcesContent":["import { useEffect, useRef } from 'react';\n\nimport { useIsomorphicLayoutEffect } from '../hooks/useIsomorphicLayoutEffect';\nimport type { Command } from './commandContext';\nimport { useCommands } from './useCommands';\n\n/** Every field the palette, the shortcuts and agents read, except the icon and the functions' identity. */\nfunction describe(cmd: Command): string {\n return JSON.stringify([\n cmd.id,\n cmd.label,\n cmd.description,\n cmd.keywords,\n cmd.group,\n cmd.shortcut,\n cmd.scope,\n cmd.agentOnly,\n cmd.schema,\n cmd.undo !== undefined,\n ]);\n}\n\n/**\n * Register a batch of commands while the calling component is mounted.\n * A new array literal every render does not thrash the registry: the\n * commands re-register only when a described field changes, and `handler`\n * and `undo` always run the latest render's functions.\n */\nexport function useRegisterCommands(cmds: Command[]): void {\n const { register } = useCommands();\n const cmdsRef = useRef(cmds);\n useIsomorphicLayoutEffect(() => {\n cmdsRef.current = cmds;\n });\n\n const key = cmds.map(describe).join('\\n');\n\n useEffect(() => {\n const latest = (id: string): Command | undefined =>\n cmdsRef.current.find((c) => c.id === id);\n const registered = cmdsRef.current.map(\n (cmd): Command => ({\n ...cmd,\n handler: (args) => (latest(cmd.id) ?? cmd).handler(args),\n undo: cmd.undo && (() => (latest(cmd.id) ?? cmd).undo?.()),\n }),\n );\n return register(registered);\n }, [register, key]);\n}\n"],"names":["describe","cmd","useRegisterCommands","cmds","register","useCommands","cmdsRef","useRef","useIsomorphicLayoutEffect","key","useEffect","latest","id","c","registered","args"],"mappings":";;;AAOA,SAASA,EAASC,GAAsB;AACtC,SAAO,KAAK,UAAU;AAAA,IACpBA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI;AAAA,IACJA,EAAI,SAAS;AAAA,EAAA,CACd;AACH;AAQO,SAASC,EAAoBC,GAAuB;AACzD,QAAM,EAAE,UAAAC,EAAA,IAAaC,EAAA,GACfC,IAAUC,EAAOJ,CAAI;AAC3B,EAAAK,EAA0B,MAAM;AAC9B,IAAAF,EAAQ,UAAUH;AAAA,EACpB,CAAC;AAED,QAAMM,IAAMN,EAAK,IAAIH,CAAQ,EAAE,KAAK;AAAA,CAAI;AAExC,EAAAU,EAAU,MAAM;AACd,UAAMC,IAAS,CAACC,MACdN,EAAQ,QAAQ,KAAK,CAACO,MAAMA,EAAE,OAAOD,CAAE,GACnCE,IAAaR,EAAQ,QAAQ;AAAA,MACjC,CAACL,OAAkB;AAAA,QACjB,GAAGA;AAAA,QACH,SAAS,CAACc,OAAUJ,EAAOV,EAAI,EAAE,KAAKA,GAAK,QAAQc,CAAI;AAAA,QACvD,MAAMd,EAAI,SAAS,OAAOU,EAAOV,EAAI,EAAE,KAAKA,GAAK,OAAA;AAAA,MAAO;AAAA,IAC1D;AAEF,WAAOG,EAASU,CAAU;AAAA,EAC5B,GAAG,CAACV,GAAUK,CAAG,CAAC;AACpB;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */const c=require("../../locale/useStrings.cjs");function o({tone:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */const c=require("../../locale/useStrings.cjs");function o({tone:s="info",title:a,icon:r,children:t,className:i}){const l=c.useStrings(),n=["aegis-alert",`aegis-alert--${s}`,a===void 0?"":"aegis-alert--titled",i??""].filter(Boolean).join(" ");return e.jsxs("div",{className:n,role:s==="error"?"alert":"status",children:[e.jsx("span",{className:"aegis-alert__marker","aria-hidden":"true",children:r??e.jsx("span",{className:"aegis-alert__dot"})}),e.jsxs("div",{className:"aegis-alert__content",children:[e.jsx("span",{className:"aegis-alert__tone",children:l.alertTone(s)}),a!==void 0&&e.jsx("span",{className:"aegis-alert__title",children:a}),e.jsx("span",{className:"aegis-alert__body",children:t})]})]})}exports.Alert=o;
|
|
2
2
|
//# sourceMappingURL=Alert.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.cjs","sources":["../../../src/components/ui/Alert.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './Alert.css';\n\ntype AlertTone = 'info' | 'success' | 'warning' | 'error';\n\ninterface AlertProps {\n /** `error` is the anomaly tone — only for failures, never for emphasis. */\n tone?: AlertTone;\n /** Strong heading over a muted body, e.g. a verdict and its summary. */\n title?: ReactNode;\n /** Leading icon in place of the tone dot, e.g. a verdict glyph. */\n icon?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function Alert({\n tone = 'info',\n title,\n icon,\n children,\n className,\n}: AlertProps) {\n const strings = useStrings();\n const cls = [\n 'aegis-alert',\n `aegis-alert--${tone}`,\n title === undefined ? '' : 'aegis-alert--titled',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls} role
|
|
1
|
+
{"version":3,"file":"Alert.cjs","sources":["../../../src/components/ui/Alert.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './Alert.css';\n\ntype AlertTone = 'info' | 'success' | 'warning' | 'error';\n\ninterface AlertProps {\n /** `error` is the anomaly tone — only for failures, never for emphasis. */\n tone?: AlertTone;\n /** Strong heading over a muted body, e.g. a verdict and its summary. */\n title?: ReactNode;\n /** Leading icon in place of the tone dot, e.g. a verdict glyph. */\n icon?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function Alert({\n tone = 'info',\n title,\n icon,\n children,\n className,\n}: AlertProps) {\n const strings = useStrings();\n const cls = [\n 'aegis-alert',\n `aegis-alert--${tone}`,\n title === undefined ? '' : 'aegis-alert--titled',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls} role={tone === 'error' ? 'alert' : 'status'}>\n <span className=\"aegis-alert__marker\" aria-hidden=\"true\">\n {icon ?? <span className=\"aegis-alert__dot\" />}\n </span>\n <div className=\"aegis-alert__content\">\n <span className=\"aegis-alert__tone\">{strings.alertTone(tone)}</span>\n {title !== undefined && (\n <span className=\"aegis-alert__title\">{title}</span>\n )}\n <span className=\"aegis-alert__body\">{children}</span>\n </div>\n </div>\n );\n}\n"],"names":["Alert","tone","title","icon","children","className","strings","useStrings","cls","jsxs","jsx"],"mappings":"+LAkBO,SAASA,EAAM,CACpB,KAAAC,EAAO,OACP,MAAAC,EACA,KAAAC,EACA,SAAAC,EACA,UAAAC,CACF,EAAe,CACb,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EAAM,CACV,cACA,gBAAgBP,CAAI,GACpBC,IAAU,OAAY,GAAK,sBAC3BG,GAAa,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG,EACX,OACEI,OAAC,OAAI,UAAWD,EAAK,KAAMP,IAAS,QAAU,QAAU,SACtD,SAAA,CAAAS,EAAAA,IAAC,OAAA,CAAK,UAAU,sBAAsB,cAAY,OAC/C,YAAQA,EAAAA,IAAC,OAAA,CAAK,UAAU,kBAAA,CAAmB,CAAA,CAC9C,EACAD,EAAAA,KAAC,MAAA,CAAI,UAAU,uBACb,SAAA,CAAAC,MAAC,QAAK,UAAU,oBAAqB,SAAAJ,EAAQ,UAAUL,CAAI,EAAE,EAC5DC,IAAU,QACTQ,EAAAA,IAAC,OAAA,CAAK,UAAU,qBAAsB,SAAAR,EAAM,EAE9CQ,EAAAA,IAAC,OAAA,CAAK,UAAU,oBAAqB,SAAAN,CAAA,CAAS,CAAA,CAAA,CAChD,CAAA,EACF,CAEJ"}
|
|
@@ -2,24 +2,24 @@ import { jsxs as r, jsx as a } from "react/jsx-runtime";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { useStrings as c } from "../../locale/useStrings.js";
|
|
4
4
|
function g({
|
|
5
|
-
tone:
|
|
6
|
-
title:
|
|
5
|
+
tone: e = "info",
|
|
6
|
+
title: s,
|
|
7
7
|
icon: i,
|
|
8
|
-
children:
|
|
9
|
-
className:
|
|
8
|
+
children: l,
|
|
9
|
+
className: t
|
|
10
10
|
}) {
|
|
11
11
|
const n = c(), o = [
|
|
12
12
|
"aegis-alert",
|
|
13
|
-
`aegis-alert--${
|
|
14
|
-
|
|
15
|
-
|
|
13
|
+
`aegis-alert--${e}`,
|
|
14
|
+
s === void 0 ? "" : "aegis-alert--titled",
|
|
15
|
+
t ?? ""
|
|
16
16
|
].filter(Boolean).join(" ");
|
|
17
|
-
return /* @__PURE__ */ r("div", { className: o, role: "status", children: [
|
|
17
|
+
return /* @__PURE__ */ r("div", { className: o, role: e === "error" ? "alert" : "status", children: [
|
|
18
18
|
/* @__PURE__ */ a("span", { className: "aegis-alert__marker", "aria-hidden": "true", children: i ?? /* @__PURE__ */ a("span", { className: "aegis-alert__dot" }) }),
|
|
19
19
|
/* @__PURE__ */ r("div", { className: "aegis-alert__content", children: [
|
|
20
|
-
/* @__PURE__ */ a("span", { className: "aegis-alert__tone", children: n.alertTone(
|
|
21
|
-
|
|
22
|
-
/* @__PURE__ */ a("span", { className: "aegis-alert__body", children:
|
|
20
|
+
/* @__PURE__ */ a("span", { className: "aegis-alert__tone", children: n.alertTone(e) }),
|
|
21
|
+
s !== void 0 && /* @__PURE__ */ a("span", { className: "aegis-alert__title", children: s }),
|
|
22
|
+
/* @__PURE__ */ a("span", { className: "aegis-alert__body", children: l })
|
|
23
23
|
] })
|
|
24
24
|
] });
|
|
25
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Alert.js","sources":["../../../src/components/ui/Alert.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './Alert.css';\n\ntype AlertTone = 'info' | 'success' | 'warning' | 'error';\n\ninterface AlertProps {\n /** `error` is the anomaly tone — only for failures, never for emphasis. */\n tone?: AlertTone;\n /** Strong heading over a muted body, e.g. a verdict and its summary. */\n title?: ReactNode;\n /** Leading icon in place of the tone dot, e.g. a verdict glyph. */\n icon?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function Alert({\n tone = 'info',\n title,\n icon,\n children,\n className,\n}: AlertProps) {\n const strings = useStrings();\n const cls = [\n 'aegis-alert',\n `aegis-alert--${tone}`,\n title === undefined ? '' : 'aegis-alert--titled',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls} role
|
|
1
|
+
{"version":3,"file":"Alert.js","sources":["../../../src/components/ui/Alert.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './Alert.css';\n\ntype AlertTone = 'info' | 'success' | 'warning' | 'error';\n\ninterface AlertProps {\n /** `error` is the anomaly tone — only for failures, never for emphasis. */\n tone?: AlertTone;\n /** Strong heading over a muted body, e.g. a verdict and its summary. */\n title?: ReactNode;\n /** Leading icon in place of the tone dot, e.g. a verdict glyph. */\n icon?: ReactNode;\n children: ReactNode;\n className?: string;\n}\n\nexport function Alert({\n tone = 'info',\n title,\n icon,\n children,\n className,\n}: AlertProps) {\n const strings = useStrings();\n const cls = [\n 'aegis-alert',\n `aegis-alert--${tone}`,\n title === undefined ? '' : 'aegis-alert--titled',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n return (\n <div className={cls} role={tone === 'error' ? 'alert' : 'status'}>\n <span className=\"aegis-alert__marker\" aria-hidden=\"true\">\n {icon ?? <span className=\"aegis-alert__dot\" />}\n </span>\n <div className=\"aegis-alert__content\">\n <span className=\"aegis-alert__tone\">{strings.alertTone(tone)}</span>\n {title !== undefined && (\n <span className=\"aegis-alert__title\">{title}</span>\n )}\n <span className=\"aegis-alert__body\">{children}</span>\n </div>\n </div>\n );\n}\n"],"names":["Alert","tone","title","icon","children","className","strings","useStrings","cls","jsxs","jsx"],"mappings":";;;AAkBO,SAASA,EAAM;AAAA,EACpB,MAAAC,IAAO;AAAA,EACP,OAAAC;AAAA,EACA,MAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAe;AACb,QAAMC,IAAUC,EAAA,GACVC,IAAM;AAAA,IACV;AAAA,IACA,gBAAgBP,CAAI;AAAA,IACpBC,MAAU,SAAY,KAAK;AAAA,IAC3BG,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AACX,SACE,gBAAAI,EAAC,SAAI,WAAWD,GAAK,MAAMP,MAAS,UAAU,UAAU,UACtD,UAAA;AAAA,IAAA,gBAAAS,EAAC,QAAA,EAAK,WAAU,uBAAsB,eAAY,QAC/C,eAAQ,gBAAAA,EAAC,QAAA,EAAK,WAAU,mBAAA,CAAmB,EAAA,CAC9C;AAAA,IACA,gBAAAD,EAAC,OAAA,EAAI,WAAU,wBACb,UAAA;AAAA,MAAA,gBAAAC,EAAC,UAAK,WAAU,qBAAqB,UAAAJ,EAAQ,UAAUL,CAAI,GAAE;AAAA,MAC5DC,MAAU,UACT,gBAAAQ,EAAC,QAAA,EAAK,WAAU,sBAAsB,UAAAR,GAAM;AAAA,MAE9C,gBAAAQ,EAAC,QAAA,EAAK,WAAU,qBAAqB,UAAAN,EAAA,CAAS;AAAA,IAAA,EAAA,CAChD;AAAA,EAAA,GACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const a=require("react/jsx-runtime"),m=require("react"),o=require("../../agent/core/usePrimitiveSurface.cjs");;/* empty css */function _({value:e,label:t,centerLabel:s,hideTicks:l=!1,className:c,surface:u}){const r=m.useRef(null),n=o.usePrimitiveSurface(u,{value:e,centerLabel:s},"metric",r),i=Math.max(0,Math.min(100,e)),d=["aegis-blast-radius",c??""].filter(Boolean).join(" ");return a.jsxs("div",{ref:r,className:d,...n,children:[a.jsx("div",{className:"aegis-blast-radius__track",role:"meter","aria-label":t,"aria-valuenow":i,"aria-valuemin":0,"aria-valuemax":100,"aria-valuetext":s??`${i.toString()}%`,children:a.jsx("div",{className:"aegis-blast-radius__fill",style:{width:`${i}%`}})}),!l&&a.jsxs("div",{className:"aegis-blast-radius__ticks",children:[a.jsx("span",{className:"aegis-blast-radius__tick",children:"0%"}),s&&a.jsx("span",{className:"aegis-blast-radius__tick aegis-blast-radius__tick--center",children:s}),a.jsx("span",{className:"aegis-blast-radius__tick",children:"100%"})]})]})}exports.BlastRadiusBar=_;
|
|
2
2
|
//# sourceMappingURL=BlastRadiusBar.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlastRadiusBar.cjs","sources":["../../../src/components/ui/BlastRadiusBar.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './BlastRadiusBar.css';\n\nexport type BlastRadiusBarSurface = PrimitiveSurface<{\n value: number;\n centerLabel?: string;\n}>;\n\ninterface BlastRadiusBarProps {\n /** 0 – 100 */\n value: number;\n /** Optional descriptive label for the current value (right-aligned, mid). */\n centerLabel?: string;\n /** Hide the 0 / 100 endpoints. */\n hideTicks?: boolean;\n className?: string;\n surface?: BlastRadiusBarSurface;\n}\n\nexport function BlastRadiusBar({\n value,\n centerLabel,\n hideTicks = false,\n className,\n surface,\n}: BlastRadiusBarProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { value, centerLabel },\n 'metric',\n wrapRef,\n );\n const clamped = Math.max(0, Math.min(100, value));\n const cls = ['aegis-blast-radius', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div\n className=\"aegis-blast-radius__track\"\n role=\"
|
|
1
|
+
{"version":3,"file":"BlastRadiusBar.cjs","sources":["../../../src/components/ui/BlastRadiusBar.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './BlastRadiusBar.css';\n\nexport type BlastRadiusBarSurface = PrimitiveSurface<{\n value: number;\n centerLabel?: string;\n}>;\n\ninterface BlastRadiusBarProps {\n /** 0 – 100 */\n value: number;\n /** Names the measure for assistive technology, e.g. \"Estimated blast radius\". */\n label: string;\n /** Optional descriptive label for the current value (right-aligned, mid). */\n centerLabel?: string;\n /** Hide the 0 / 100 endpoints. */\n hideTicks?: boolean;\n className?: string;\n surface?: BlastRadiusBarSurface;\n}\n\nexport function BlastRadiusBar({\n value,\n label,\n centerLabel,\n hideTicks = false,\n className,\n surface,\n}: BlastRadiusBarProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { value, centerLabel },\n 'metric',\n wrapRef,\n );\n const clamped = Math.max(0, Math.min(100, value));\n const cls = ['aegis-blast-radius', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div\n className=\"aegis-blast-radius__track\"\n role=\"meter\"\n aria-label={label}\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuetext={centerLabel ?? `${clamped.toString()}%`}\n >\n <div\n className=\"aegis-blast-radius__fill\"\n style={{ width: `${clamped}%` }}\n />\n </div>\n {!hideTicks && (\n <div className=\"aegis-blast-radius__ticks\">\n <span className=\"aegis-blast-radius__tick\">0%</span>\n {centerLabel && (\n <span className=\"aegis-blast-radius__tick aegis-blast-radius__tick--center\">\n {centerLabel}\n </span>\n )}\n <span className=\"aegis-blast-radius__tick\">100%</span>\n </div>\n )}\n </div>\n );\n}\n"],"names":["BlastRadiusBar","value","label","centerLabel","hideTicks","className","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","clamped","cls","jsx","jsxs"],"mappings":"kOA0BO,SAASA,EAAe,CAC7B,MAAAC,EACA,MAAAC,EACA,YAAAC,EACA,UAAAC,EAAY,GACZ,UAAAC,EACA,QAAAC,CACF,EAAwB,CACtB,MAAMC,EAAUC,EAAAA,OAAuB,IAAI,EACrCC,EAAaC,EAAAA,oBACjBJ,EACA,CAAE,MAAAL,EAAO,YAAAE,CAAA,EACT,SACAI,CAAA,EAEII,EAAU,KAAK,IAAI,EAAG,KAAK,IAAI,IAAKV,CAAK,CAAC,EAC1CW,EAAM,CAAC,qBAAsBP,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAE5E,cACG,MAAA,CAAI,IAAKE,EAAS,UAAWK,EAAM,GAAGH,EACrC,SAAA,CAAAI,EAAAA,IAAC,MAAA,CACC,UAAU,4BACV,KAAK,QACL,aAAYX,EACZ,gBAAeS,EACf,gBAAe,EACf,gBAAe,IACf,iBAAgBR,GAAe,GAAGQ,EAAQ,UAAU,IAEpD,SAAAE,EAAAA,IAAC,MAAA,CACC,UAAU,2BACV,MAAO,CAAE,MAAO,GAAGF,CAAO,GAAA,CAAI,CAAA,CAChC,CAAA,EAED,CAACP,GACAU,EAAAA,KAAC,MAAA,CAAI,UAAU,4BACb,SAAA,CAAAD,EAAAA,IAAC,OAAA,CAAK,UAAU,2BAA2B,SAAA,KAAE,EAC5CV,GACCU,EAAAA,IAAC,OAAA,CAAK,UAAU,4DACb,SAAAV,EACH,EAEFU,EAAAA,IAAC,OAAA,CAAK,UAAU,2BAA2B,SAAA,MAAA,CAAI,CAAA,CAAA,CACjD,CAAA,EAEJ,CAEJ"}
|
|
@@ -6,6 +6,8 @@ export type BlastRadiusBarSurface = PrimitiveSurface<{
|
|
|
6
6
|
interface BlastRadiusBarProps {
|
|
7
7
|
/** 0 – 100 */
|
|
8
8
|
value: number;
|
|
9
|
+
/** Names the measure for assistive technology, e.g. "Estimated blast radius". */
|
|
10
|
+
label: string;
|
|
9
11
|
/** Optional descriptive label for the current value (right-aligned, mid). */
|
|
10
12
|
centerLabel?: string;
|
|
11
13
|
/** Hide the 0 / 100 endpoints. */
|
|
@@ -13,5 +15,5 @@ interface BlastRadiusBarProps {
|
|
|
13
15
|
className?: string;
|
|
14
16
|
surface?: BlastRadiusBarSurface;
|
|
15
17
|
}
|
|
16
|
-
export declare function BlastRadiusBar({ value, centerLabel, hideTicks, className, surface, }: BlastRadiusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
+
export declare function BlastRadiusBar({ value, label, centerLabel, hideTicks, className, surface, }: BlastRadiusBarProps): import("react/jsx-runtime").JSX.Element;
|
|
17
19
|
export {};
|
|
@@ -1,39 +1,42 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
3
|
-
import { usePrimitiveSurface as
|
|
1
|
+
import { jsxs as e, jsx as a } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as u } from "react";
|
|
3
|
+
import { usePrimitiveSurface as _ } from "../../agent/core/usePrimitiveSurface.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
function
|
|
6
|
-
value:
|
|
5
|
+
function v({
|
|
6
|
+
value: r,
|
|
7
|
+
label: l,
|
|
7
8
|
centerLabel: s,
|
|
8
|
-
hideTicks:
|
|
9
|
-
className:
|
|
9
|
+
hideTicks: c = !1,
|
|
10
|
+
className: m,
|
|
10
11
|
surface: n
|
|
11
12
|
}) {
|
|
12
|
-
const
|
|
13
|
+
const t = u(null), d = _(
|
|
13
14
|
n,
|
|
14
|
-
{ value:
|
|
15
|
+
{ value: r, centerLabel: s },
|
|
15
16
|
"metric",
|
|
16
|
-
|
|
17
|
-
),
|
|
18
|
-
return /* @__PURE__ */
|
|
17
|
+
t
|
|
18
|
+
), i = Math.max(0, Math.min(100, r)), o = ["aegis-blast-radius", m ?? ""].filter(Boolean).join(" ");
|
|
19
|
+
return /* @__PURE__ */ e("div", { ref: t, className: o, ...d, children: [
|
|
19
20
|
/* @__PURE__ */ a(
|
|
20
21
|
"div",
|
|
21
22
|
{
|
|
22
23
|
className: "aegis-blast-radius__track",
|
|
23
|
-
role: "
|
|
24
|
-
"aria-
|
|
24
|
+
role: "meter",
|
|
25
|
+
"aria-label": l,
|
|
26
|
+
"aria-valuenow": i,
|
|
25
27
|
"aria-valuemin": 0,
|
|
26
28
|
"aria-valuemax": 100,
|
|
29
|
+
"aria-valuetext": s ?? `${i.toString()}%`,
|
|
27
30
|
children: /* @__PURE__ */ a(
|
|
28
31
|
"div",
|
|
29
32
|
{
|
|
30
33
|
className: "aegis-blast-radius__fill",
|
|
31
|
-
style: { width: `${
|
|
34
|
+
style: { width: `${i}%` }
|
|
32
35
|
}
|
|
33
36
|
)
|
|
34
37
|
}
|
|
35
38
|
),
|
|
36
|
-
!
|
|
39
|
+
!c && /* @__PURE__ */ e("div", { className: "aegis-blast-radius__ticks", children: [
|
|
37
40
|
/* @__PURE__ */ a("span", { className: "aegis-blast-radius__tick", children: "0%" }),
|
|
38
41
|
s && /* @__PURE__ */ a("span", { className: "aegis-blast-radius__tick aegis-blast-radius__tick--center", children: s }),
|
|
39
42
|
/* @__PURE__ */ a("span", { className: "aegis-blast-radius__tick", children: "100%" })
|
|
@@ -41,6 +44,6 @@ function h({
|
|
|
41
44
|
] });
|
|
42
45
|
}
|
|
43
46
|
export {
|
|
44
|
-
|
|
47
|
+
v as BlastRadiusBar
|
|
45
48
|
};
|
|
46
49
|
//# sourceMappingURL=BlastRadiusBar.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"BlastRadiusBar.js","sources":["../../../src/components/ui/BlastRadiusBar.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './BlastRadiusBar.css';\n\nexport type BlastRadiusBarSurface = PrimitiveSurface<{\n value: number;\n centerLabel?: string;\n}>;\n\ninterface BlastRadiusBarProps {\n /** 0 – 100 */\n value: number;\n /** Optional descriptive label for the current value (right-aligned, mid). */\n centerLabel?: string;\n /** Hide the 0 / 100 endpoints. */\n hideTicks?: boolean;\n className?: string;\n surface?: BlastRadiusBarSurface;\n}\n\nexport function BlastRadiusBar({\n value,\n centerLabel,\n hideTicks = false,\n className,\n surface,\n}: BlastRadiusBarProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { value, centerLabel },\n 'metric',\n wrapRef,\n );\n const clamped = Math.max(0, Math.min(100, value));\n const cls = ['aegis-blast-radius', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div\n className=\"aegis-blast-radius__track\"\n role=\"
|
|
1
|
+
{"version":3,"file":"BlastRadiusBar.js","sources":["../../../src/components/ui/BlastRadiusBar.tsx"],"sourcesContent":["import { useRef } from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport './BlastRadiusBar.css';\n\nexport type BlastRadiusBarSurface = PrimitiveSurface<{\n value: number;\n centerLabel?: string;\n}>;\n\ninterface BlastRadiusBarProps {\n /** 0 – 100 */\n value: number;\n /** Names the measure for assistive technology, e.g. \"Estimated blast radius\". */\n label: string;\n /** Optional descriptive label for the current value (right-aligned, mid). */\n centerLabel?: string;\n /** Hide the 0 / 100 endpoints. */\n hideTicks?: boolean;\n className?: string;\n surface?: BlastRadiusBarSurface;\n}\n\nexport function BlastRadiusBar({\n value,\n label,\n centerLabel,\n hideTicks = false,\n className,\n surface,\n}: BlastRadiusBarProps) {\n const wrapRef = useRef<HTMLDivElement>(null);\n const agentAttrs = usePrimitiveSurface(\n surface,\n { value, centerLabel },\n 'metric',\n wrapRef,\n );\n const clamped = Math.max(0, Math.min(100, value));\n const cls = ['aegis-blast-radius', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <div ref={wrapRef} className={cls} {...agentAttrs}>\n <div\n className=\"aegis-blast-radius__track\"\n role=\"meter\"\n aria-label={label}\n aria-valuenow={clamped}\n aria-valuemin={0}\n aria-valuemax={100}\n aria-valuetext={centerLabel ?? `${clamped.toString()}%`}\n >\n <div\n className=\"aegis-blast-radius__fill\"\n style={{ width: `${clamped}%` }}\n />\n </div>\n {!hideTicks && (\n <div className=\"aegis-blast-radius__ticks\">\n <span className=\"aegis-blast-radius__tick\">0%</span>\n {centerLabel && (\n <span className=\"aegis-blast-radius__tick aegis-blast-radius__tick--center\">\n {centerLabel}\n </span>\n )}\n <span className=\"aegis-blast-radius__tick\">100%</span>\n </div>\n )}\n </div>\n );\n}\n"],"names":["BlastRadiusBar","value","label","centerLabel","hideTicks","className","surface","wrapRef","useRef","agentAttrs","usePrimitiveSurface","clamped","cls","jsx","jsxs"],"mappings":";;;;AA0BO,SAASA,EAAe;AAAA,EAC7B,OAAAC;AAAA,EACA,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,WAAAC,IAAY;AAAA,EACZ,WAAAC;AAAA,EACA,SAAAC;AACF,GAAwB;AACtB,QAAMC,IAAUC,EAAuB,IAAI,GACrCC,IAAaC;AAAA,IACjBJ;AAAA,IACA,EAAE,OAAAL,GAAO,aAAAE,EAAA;AAAA,IACT;AAAA,IACAI;AAAA,EAAA,GAEII,IAAU,KAAK,IAAI,GAAG,KAAK,IAAI,KAAKV,CAAK,CAAC,GAC1CW,IAAM,CAAC,sBAAsBP,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE5E,2BACG,OAAA,EAAI,KAAKE,GAAS,WAAWK,GAAM,GAAGH,GACrC,UAAA;AAAA,IAAA,gBAAAI;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,WAAU;AAAA,QACV,MAAK;AAAA,QACL,cAAYX;AAAA,QACZ,iBAAeS;AAAA,QACf,iBAAe;AAAA,QACf,iBAAe;AAAA,QACf,kBAAgBR,KAAe,GAAGQ,EAAQ,UAAU;AAAA,QAEpD,UAAA,gBAAAE;AAAA,UAAC;AAAA,UAAA;AAAA,YACC,WAAU;AAAA,YACV,OAAO,EAAE,OAAO,GAAGF,CAAO,IAAA;AAAA,UAAI;AAAA,QAAA;AAAA,MAChC;AAAA,IAAA;AAAA,IAED,CAACP,KACA,gBAAAU,EAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,MAAA,gBAAAD,EAAC,QAAA,EAAK,WAAU,4BAA2B,UAAA,MAAE;AAAA,MAC5CV,KACC,gBAAAU,EAAC,QAAA,EAAK,WAAU,6DACb,UAAAV,GACH;AAAA,MAEF,gBAAAU,EAAC,QAAA,EAAK,WAAU,4BAA2B,UAAA,OAAA,CAAI;AAAA,IAAA,EAAA,CACjD;AAAA,EAAA,GAEJ;AAEJ;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.cjs","sources":["../../../src/components/ui/Button.tsx"],"sourcesContent":["import {\n type ButtonHTMLAttributes,\n type MouseEvent,\n type ReactNode,\n forwardRef,\n useCallback,\n} from 'react';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport './Button.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\
|
|
1
|
+
{"version":3,"file":"Button.cjs","sources":["../../../src/components/ui/Button.tsx"],"sourcesContent":["import {\n type ButtonHTMLAttributes,\n type MouseEvent,\n type ReactNode,\n forwardRef,\n useCallback,\n} from 'react';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport './Button.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\nexport type ButtonTone = 'primary' | 'secondary' | 'ghost' | 'glass';\n\ntype ButtonIconPosition = 'start' | 'end';\n\ninterface ButtonLookProps {\n children: ReactNode;\n /**\n * Visual treatment. `glass` is the secondary button frosted for a tinted,\n * gradient or image background.\n */\n tone?: ButtonTone;\n /** Icon beside the label, sized to the button's icon slot. */\n icon?: ReactNode;\n /** Side of the label the icon sits on. */\n iconPosition?: ButtonIconPosition;\n}\n\nfunction buttonClassName(\n tone: ButtonTone,\n className: string | undefined,\n): string {\n return ['aegis-button', `aegis-button--${tone}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n}\n\nfunction ButtonContent({\n children,\n icon,\n iconPosition,\n}: Pick<ButtonLookProps, 'children' | 'icon'> & {\n iconPosition: ButtonIconPosition;\n}) {\n const iconSlot =\n icon === undefined ? null : (\n <span className=\"aegis-button__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n );\n return (\n <>\n {iconPosition === 'start' && iconSlot}\n {children}\n {iconPosition === 'end' && iconSlot}\n </>\n );\n}\n\ntype NativeButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'type' | 'children'\n>;\n\ninterface ButtonProps extends NativeButtonProps, ButtonLookProps {\n /** Optional aegis-ui agent action — also wires the agent runtime. */\n action?: AegisAction<void, unknown>;\n /** Native HTML button type. */\n type?: 'button' | 'submit' | 'reset';\n}\n\n/** A toggle button passes `aria-pressed`; the pressed state is the inverted fill. */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n tone = 'primary',\n icon,\n iconPosition = 'start',\n action,\n onClick,\n disabled,\n className,\n type = 'button',\n title,\n ...rest\n },\n ref,\n ) => {\n const bound = useAegisAction<void, unknown>(action);\n const isUnavailable = action ? !bound.available : false;\n\n const handleClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>): void => {\n onClick?.(event);\n if (event.defaultPrevented) {\n return;\n }\n if (action) {\n void bound.invoke();\n }\n },\n [onClick, action, bound],\n );\n\n const resolvedTitle =\n title ?? (isUnavailable ? bound.unavailableReason : undefined);\n\n return (\n <button\n ref={ref}\n type={type}\n className={buttonClassName(tone, className)}\n disabled={disabled ?? isUnavailable}\n title={resolvedTitle}\n data-agent-action-id={action?.id}\n onClick={handleClick}\n {...rest}\n >\n <ButtonContent icon={icon} iconPosition={iconPosition}>\n {children}\n </ButtonContent>\n </button>\n );\n },\n);\nButton.displayName = 'Button';\n\ninterface ButtonLinkProps extends ButtonLookProps {\n /** Destination; the control navigates instead of firing a handler. */\n to: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n className?: string;\n}\n\n/** A link that looks like a Button, for actions that open another page. */\nexport function ButtonLink({\n to,\n children,\n tone = 'primary',\n icon,\n iconPosition = 'start',\n linkComponent,\n className,\n}: ButtonLinkProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n return (\n <LinkImpl to={to} className={buttonClassName(tone, className)}>\n <ButtonContent icon={icon} iconPosition={iconPosition}>\n {children}\n </ButtonContent>\n </LinkImpl>\n );\n}\n"],"names":["buttonClassName","tone","className","ButtonContent","children","icon","iconPosition","iconSlot","jsx","jsxs","Fragment","Button","forwardRef","action","onClick","disabled","type","title","rest","ref","bound","useAegisAction","isUnavailable","handleClick","useCallback","event","resolvedTitle","ButtonLink","to","linkComponent","LinkImpl","DefaultLink"],"mappings":"mPA8BA,SAASA,EACPC,EACAC,EACQ,CACR,MAAO,CAAC,eAAgB,iBAAiBD,CAAI,GAAIC,GAAa,EAAE,EAC7D,OAAO,OAAO,EACd,KAAK,GAAG,CACb,CAEA,SAASC,EAAc,CACrB,SAAAC,EACA,KAAAC,EACA,aAAAC,CACF,EAEG,CACD,MAAMC,EACJF,IAAS,OAAY,KACnBG,EAAAA,IAAC,QAAK,UAAU,qBAAqB,cAAY,OAC9C,SAAAH,CAAA,CACH,EAEJ,OACEI,EAAAA,KAAAC,WAAA,CACG,SAAA,CAAAJ,IAAiB,SAAWC,EAC5BH,EACAE,IAAiB,OAASC,CAAA,EAC7B,CAEJ,CAeO,MAAMI,EAASC,EAAAA,WACpB,CACE,CACE,SAAAR,EACA,KAAAH,EAAO,UACP,KAAAI,EACA,aAAAC,EAAe,QACf,OAAAO,EACA,QAAAC,EACA,SAAAC,EACA,UAAAb,EACA,KAAAc,EAAO,SACP,MAAAC,EACA,GAAGC,CAAA,EAELC,IACG,CACH,MAAMC,EAAQC,EAAAA,eAA8BR,CAAM,EAC5CS,EAAgBT,EAAS,CAACO,EAAM,UAAY,GAE5CG,EAAcC,EAAAA,YACjBC,GAA+C,CAC9CX,IAAUW,CAAK,EACX,CAAAA,EAAM,kBAGNZ,GACGO,EAAM,OAAA,CAEf,EACA,CAACN,EAASD,EAAQO,CAAK,CAAA,EAGnBM,EACJT,IAAUK,EAAgBF,EAAM,kBAAoB,QAEtD,OACEZ,EAAAA,IAAC,SAAA,CACC,IAAAW,EACA,KAAAH,EACA,UAAWhB,EAAgBC,EAAMC,CAAS,EAC1C,SAAUa,GAAYO,EACtB,MAAOI,EACP,uBAAsBb,GAAQ,GAC9B,QAASU,EACR,GAAGL,EAEJ,SAAAV,EAAAA,IAACL,EAAA,CAAc,KAAAE,EAAY,aAAAC,EACxB,SAAAF,CAAA,CACH,CAAA,CAAA,CAGN,CACF,EACAO,EAAO,YAAc,SAWd,SAASgB,EAAW,CACzB,GAAAC,EACA,SAAAxB,EACA,KAAAH,EAAO,UACP,KAAAI,EACA,aAAAC,EAAe,QAAA,cACfuB,EACA,UAAA3B,CACF,EAAoB,CAClB,MAAM4B,EAAWD,GAAiBE,EAAAA,YAClC,OACEvB,EAAAA,IAACsB,EAAA,CAAS,GAAAF,EAAQ,UAAW5B,EAAgBC,EAAMC,CAAS,EAC1D,SAAAM,EAAAA,IAACL,EAAA,CAAc,KAAAE,EAAY,aAAAC,EACxB,SAAAF,EACH,EACF,CAEJ"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { ButtonHTMLAttributes, ReactNode } from 'react';
|
|
2
2
|
import { AegisAction } from '../../agent/core/types';
|
|
3
3
|
import { LinkComponent } from './linkComponent';
|
|
4
|
-
type ButtonTone = 'primary' | 'secondary' | 'ghost' | 'glass';
|
|
4
|
+
export type ButtonTone = 'primary' | 'secondary' | 'ghost' | 'glass';
|
|
5
5
|
type ButtonIconPosition = 'start' | 'end';
|
|
6
6
|
interface ButtonLookProps {
|
|
7
7
|
children: ReactNode;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Button.js","sources":["../../../src/components/ui/Button.tsx"],"sourcesContent":["import {\n type ButtonHTMLAttributes,\n type MouseEvent,\n type ReactNode,\n forwardRef,\n useCallback,\n} from 'react';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport './Button.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\
|
|
1
|
+
{"version":3,"file":"Button.js","sources":["../../../src/components/ui/Button.tsx"],"sourcesContent":["import {\n type ButtonHTMLAttributes,\n type MouseEvent,\n type ReactNode,\n forwardRef,\n useCallback,\n} from 'react';\n\nimport { useAegisAction } from '../../agent/core/hooks';\nimport type { AegisAction } from '../../agent/core/types';\nimport './Button.css';\nimport { DefaultLink, type LinkComponent } from './linkComponent';\n\nexport type ButtonTone = 'primary' | 'secondary' | 'ghost' | 'glass';\n\ntype ButtonIconPosition = 'start' | 'end';\n\ninterface ButtonLookProps {\n children: ReactNode;\n /**\n * Visual treatment. `glass` is the secondary button frosted for a tinted,\n * gradient or image background.\n */\n tone?: ButtonTone;\n /** Icon beside the label, sized to the button's icon slot. */\n icon?: ReactNode;\n /** Side of the label the icon sits on. */\n iconPosition?: ButtonIconPosition;\n}\n\nfunction buttonClassName(\n tone: ButtonTone,\n className: string | undefined,\n): string {\n return ['aegis-button', `aegis-button--${tone}`, className ?? '']\n .filter(Boolean)\n .join(' ');\n}\n\nfunction ButtonContent({\n children,\n icon,\n iconPosition,\n}: Pick<ButtonLookProps, 'children' | 'icon'> & {\n iconPosition: ButtonIconPosition;\n}) {\n const iconSlot =\n icon === undefined ? null : (\n <span className=\"aegis-button__icon\" aria-hidden=\"true\">\n {icon}\n </span>\n );\n return (\n <>\n {iconPosition === 'start' && iconSlot}\n {children}\n {iconPosition === 'end' && iconSlot}\n </>\n );\n}\n\ntype NativeButtonProps = Omit<\n ButtonHTMLAttributes<HTMLButtonElement>,\n 'type' | 'children'\n>;\n\ninterface ButtonProps extends NativeButtonProps, ButtonLookProps {\n /** Optional aegis-ui agent action — also wires the agent runtime. */\n action?: AegisAction<void, unknown>;\n /** Native HTML button type. */\n type?: 'button' | 'submit' | 'reset';\n}\n\n/** A toggle button passes `aria-pressed`; the pressed state is the inverted fill. */\nexport const Button = forwardRef<HTMLButtonElement, ButtonProps>(\n (\n {\n children,\n tone = 'primary',\n icon,\n iconPosition = 'start',\n action,\n onClick,\n disabled,\n className,\n type = 'button',\n title,\n ...rest\n },\n ref,\n ) => {\n const bound = useAegisAction<void, unknown>(action);\n const isUnavailable = action ? !bound.available : false;\n\n const handleClick = useCallback(\n (event: MouseEvent<HTMLButtonElement>): void => {\n onClick?.(event);\n if (event.defaultPrevented) {\n return;\n }\n if (action) {\n void bound.invoke();\n }\n },\n [onClick, action, bound],\n );\n\n const resolvedTitle =\n title ?? (isUnavailable ? bound.unavailableReason : undefined);\n\n return (\n <button\n ref={ref}\n type={type}\n className={buttonClassName(tone, className)}\n disabled={disabled ?? isUnavailable}\n title={resolvedTitle}\n data-agent-action-id={action?.id}\n onClick={handleClick}\n {...rest}\n >\n <ButtonContent icon={icon} iconPosition={iconPosition}>\n {children}\n </ButtonContent>\n </button>\n );\n },\n);\nButton.displayName = 'Button';\n\ninterface ButtonLinkProps extends ButtonLookProps {\n /** Destination; the control navigates instead of firing a handler. */\n to: string;\n /** Renders the link. Defaults to an `<a href>`; routed apps pass their Link adapter. */\n linkComponent?: LinkComponent;\n className?: string;\n}\n\n/** A link that looks like a Button, for actions that open another page. */\nexport function ButtonLink({\n to,\n children,\n tone = 'primary',\n icon,\n iconPosition = 'start',\n linkComponent,\n className,\n}: ButtonLinkProps) {\n const LinkImpl = linkComponent ?? DefaultLink;\n return (\n <LinkImpl to={to} className={buttonClassName(tone, className)}>\n <ButtonContent icon={icon} iconPosition={iconPosition}>\n {children}\n </ButtonContent>\n </LinkImpl>\n );\n}\n"],"names":["buttonClassName","tone","className","ButtonContent","children","icon","iconPosition","iconSlot","jsx","jsxs","Fragment","Button","forwardRef","action","onClick","disabled","type","title","rest","ref","bound","useAegisAction","isUnavailable","handleClick","useCallback","event","resolvedTitle","ButtonLink","to","linkComponent","DefaultLink"],"mappings":";;;;;AA8BA,SAASA,EACPC,GACAC,GACQ;AACR,SAAO,CAAC,gBAAgB,iBAAiBD,CAAI,IAAIC,KAAa,EAAE,EAC7D,OAAO,OAAO,EACd,KAAK,GAAG;AACb;AAEA,SAASC,EAAc;AAAA,EACrB,UAAAC;AAAA,EACA,MAAAC;AAAA,EACA,cAAAC;AACF,GAEG;AACD,QAAMC,IACJF,MAAS,SAAY,OACnB,gBAAAG,EAAC,UAAK,WAAU,sBAAqB,eAAY,QAC9C,UAAAH,EAAA,CACH;AAEJ,SACE,gBAAAI,EAAAC,GAAA,EACG,UAAA;AAAA,IAAAJ,MAAiB,WAAWC;AAAA,IAC5BH;AAAA,IACAE,MAAiB,SAASC;AAAA,EAAA,GAC7B;AAEJ;AAeO,MAAMI,IAASC;AAAA,EACpB,CACE;AAAA,IACE,UAAAR;AAAA,IACA,MAAAH,IAAO;AAAA,IACP,MAAAI;AAAA,IACA,cAAAC,IAAe;AAAA,IACf,QAAAO;AAAA,IACA,SAAAC;AAAA,IACA,UAAAC;AAAA,IACA,WAAAb;AAAA,IACA,MAAAc,IAAO;AAAA,IACP,OAAAC;AAAA,IACA,GAAGC;AAAA,EAAA,GAELC,MACG;AACH,UAAMC,IAAQC,EAA8BR,CAAM,GAC5CS,IAAgBT,IAAS,CAACO,EAAM,YAAY,IAE5CG,IAAcC;AAAA,MAClB,CAACC,MAA+C;AAE9C,QADAX,IAAUW,CAAK,GACX,CAAAA,EAAM,oBAGNZ,KACGO,EAAM,OAAA;AAAA,MAEf;AAAA,MACA,CAACN,GAASD,GAAQO,CAAK;AAAA,IAAA,GAGnBM,IACJT,MAAUK,IAAgBF,EAAM,oBAAoB;AAEtD,WACE,gBAAAZ;AAAA,MAAC;AAAA,MAAA;AAAA,QACC,KAAAW;AAAA,QACA,MAAAH;AAAA,QACA,WAAWhB,EAAgBC,GAAMC,CAAS;AAAA,QAC1C,UAAUa,KAAYO;AAAA,QACtB,OAAOI;AAAA,QACP,wBAAsBb,GAAQ;AAAA,QAC9B,SAASU;AAAA,QACR,GAAGL;AAAA,QAEJ,UAAA,gBAAAV,EAACL,GAAA,EAAc,MAAAE,GAAY,cAAAC,GACxB,UAAAF,EAAA,CACH;AAAA,MAAA;AAAA,IAAA;AAAA,EAGN;AACF;AACAO,EAAO,cAAc;AAWd,SAASgB,EAAW;AAAA,EACzB,IAAAC;AAAA,EACA,UAAAxB;AAAA,EACA,MAAAH,IAAO;AAAA,EACP,MAAAI;AAAA,EACA,cAAAC,IAAe;AAAA,EACf,eAAAuB;AAAA,EACA,WAAA3B;AACF,GAAoB;AAElB,SACE,gBAAAM,EAFeqB,KAAiBC,GAE/B,EAAS,IAAAF,GAAQ,WAAW5B,EAAgBC,GAAMC,CAAS,GAC1D,UAAA,gBAAAM,EAACL,GAAA,EAAc,MAAAE,GAAY,cAAAC,GACxB,UAAAF,GACH,GACF;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("react");;/* empty css */function f({onSend:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const s=require("react/jsx-runtime"),m=require("react");;/* empty css */function f({onSend:r,sending:n=!1,placeholder:u="Ask the assistant…",disabledReason:t,className:d}){const[a,i]=m.useState(""),l=!!t,o=!n&&!l&&a.trim().length>0,c=m.useCallback(()=>{if(!o)return;const e=a.trim();i(""),Promise.resolve(r(e))},[o,r,a]),h=e=>{i(e.target.value)},g=e=>{e.nativeEvent.isComposing||e.keyCode===229||e.key==="Enter"&&!e.shiftKey&&(e.preventDefault(),c())},p=["aegis-composer",d??""].filter(Boolean).join(" ");return s.jsxs("form",{className:p,onSubmit:e=>{e.preventDefault(),c()},children:[t&&s.jsx("div",{className:"aegis-composer__banner",role:"status",children:t}),s.jsxs("div",{className:"aegis-composer__row",children:[s.jsx("textarea",{className:"aegis-composer__input",value:a,onChange:h,onKeyDown:g,placeholder:u,disabled:l,rows:2,"aria-label":"Message"}),s.jsx("button",{type:"submit",className:"aegis-composer__send",disabled:!o,"aria-label":"Send message",children:n?s.jsx("span",{className:"aegis-composer__sending","aria-hidden":"true"}):"Send"})]}),s.jsx("div",{className:"aegis-composer__hint",children:"Enter to send · Shift+Enter for newline"})]})}exports.ChatComposer=f;
|
|
2
2
|
//# sourceMappingURL=ChatComposer.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ChatComposer.cjs","sources":["../../../src/components/ui/ChatComposer.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type KeyboardEvent,\n useCallback,\n useState,\n} from 'react';\n\nimport './ChatComposer.css';\n\ninterface ChatComposerProps {\n onSend: (content: string) => void | Promise<void>;\n sending?: boolean;\n placeholder?: string;\n /** Optional disabled state with a reason shown in a small banner. */\n disabledReason?: string;\n className?: string;\n}\n\nexport function ChatComposer({\n onSend,\n sending = false,\n placeholder = 'Ask the assistant…',\n disabledReason,\n className,\n}: ChatComposerProps) {\n const [value, setValue] = useState('');\n const disabled = Boolean(disabledReason);\n const canSend = !sending && !disabled && value.trim().length > 0;\n\n const submit = useCallback((): void => {\n if (!canSend) {\n return;\n }\n const text = value.trim();\n setValue('');\n void Promise.resolve(onSend(text));\n }, [canSend, onSend, value]);\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>): void => {\n setValue(event.target.value);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>): void => {\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n };\n\n const cls = ['aegis-composer', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <form\n className={cls}\n onSubmit={(event) => {\n event.preventDefault();\n submit();\n }}\n >\n {disabledReason && (\n <div className=\"aegis-composer__banner\" role=\"status\">\n {disabledReason}\n </div>\n )}\n <div className=\"aegis-composer__row\">\n <textarea\n className=\"aegis-composer__input\"\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n disabled={disabled}\n rows={2}\n aria-label=\"Message\"\n />\n <button\n type=\"submit\"\n className=\"aegis-composer__send\"\n disabled={!canSend}\n aria-label=\"Send message\"\n >\n {sending ? (\n <span className=\"aegis-composer__sending\" aria-hidden=\"true\" />\n ) : (\n 'Send'\n )}\n </button>\n </div>\n <div className=\"aegis-composer__hint\">\n Enter to send · Shift+Enter for newline\n </div>\n </form>\n );\n}\n"],"names":["ChatComposer","onSend","sending","placeholder","disabledReason","className","value","setValue","useState","disabled","canSend","submit","useCallback","text","handleChange","event","handleKeyDown","cls","jsxs","jsx"],"mappings":"0KAkBO,SAASA,EAAa,CAC3B,OAAAC,EACA,QAAAC,EAAU,GACV,YAAAC,EAAc,qBACd,eAAAC,EACA,UAAAC,CACF,EAAsB,CACpB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,EAAE,EAC/BC,EAAW,EAAQL,EACnBM,EAAU,CAACR,GAAW,CAACO,GAAYH,EAAM,KAAA,EAAO,OAAS,EAEzDK,EAASC,EAAAA,YAAY,IAAY,CACrC,GAAI,CAACF,EACH,OAEF,MAAMG,EAAOP,EAAM,KAAA,EACnBC,EAAS,EAAE,EACN,QAAQ,QAAQN,EAAOY,CAAI,CAAC,CACnC,EAAG,CAACH,EAAST,EAAQK,CAAK,CAAC,EAErBQ,EAAgBC,GAAkD,CACtER,EAASQ,EAAM,OAAO,KAAK,CAC7B,EAEMC,EAAiBD,GAAoD,
|
|
1
|
+
{"version":3,"file":"ChatComposer.cjs","sources":["../../../src/components/ui/ChatComposer.tsx"],"sourcesContent":["import {\n type ChangeEvent,\n type KeyboardEvent,\n useCallback,\n useState,\n} from 'react';\n\nimport './ChatComposer.css';\n\ninterface ChatComposerProps {\n onSend: (content: string) => void | Promise<void>;\n sending?: boolean;\n placeholder?: string;\n /** Optional disabled state with a reason shown in a small banner. */\n disabledReason?: string;\n className?: string;\n}\n\nexport function ChatComposer({\n onSend,\n sending = false,\n placeholder = 'Ask the assistant…',\n disabledReason,\n className,\n}: ChatComposerProps) {\n const [value, setValue] = useState('');\n const disabled = Boolean(disabledReason);\n const canSend = !sending && !disabled && value.trim().length > 0;\n\n const submit = useCallback((): void => {\n if (!canSend) {\n return;\n }\n const text = value.trim();\n setValue('');\n void Promise.resolve(onSend(text));\n }, [canSend, onSend, value]);\n\n const handleChange = (event: ChangeEvent<HTMLTextAreaElement>): void => {\n setValue(event.target.value);\n };\n\n const handleKeyDown = (event: KeyboardEvent<HTMLTextAreaElement>): void => {\n // The Enter that confirms an IME candidate belongs to the composition.\n // Safari reports it after compositionend, so only its keyCode 229 tells.\n if (event.nativeEvent.isComposing || event.keyCode === 229) {\n return;\n }\n if (event.key === 'Enter' && !event.shiftKey) {\n event.preventDefault();\n submit();\n }\n };\n\n const cls = ['aegis-composer', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <form\n className={cls}\n onSubmit={(event) => {\n event.preventDefault();\n submit();\n }}\n >\n {disabledReason && (\n <div className=\"aegis-composer__banner\" role=\"status\">\n {disabledReason}\n </div>\n )}\n <div className=\"aegis-composer__row\">\n <textarea\n className=\"aegis-composer__input\"\n value={value}\n onChange={handleChange}\n onKeyDown={handleKeyDown}\n placeholder={placeholder}\n disabled={disabled}\n rows={2}\n aria-label=\"Message\"\n />\n <button\n type=\"submit\"\n className=\"aegis-composer__send\"\n disabled={!canSend}\n aria-label=\"Send message\"\n >\n {sending ? (\n <span className=\"aegis-composer__sending\" aria-hidden=\"true\" />\n ) : (\n 'Send'\n )}\n </button>\n </div>\n <div className=\"aegis-composer__hint\">\n Enter to send · Shift+Enter for newline\n </div>\n </form>\n );\n}\n"],"names":["ChatComposer","onSend","sending","placeholder","disabledReason","className","value","setValue","useState","disabled","canSend","submit","useCallback","text","handleChange","event","handleKeyDown","cls","jsxs","jsx"],"mappings":"0KAkBO,SAASA,EAAa,CAC3B,OAAAC,EACA,QAAAC,EAAU,GACV,YAAAC,EAAc,qBACd,eAAAC,EACA,UAAAC,CACF,EAAsB,CACpB,KAAM,CAACC,EAAOC,CAAQ,EAAIC,EAAAA,SAAS,EAAE,EAC/BC,EAAW,EAAQL,EACnBM,EAAU,CAACR,GAAW,CAACO,GAAYH,EAAM,KAAA,EAAO,OAAS,EAEzDK,EAASC,EAAAA,YAAY,IAAY,CACrC,GAAI,CAACF,EACH,OAEF,MAAMG,EAAOP,EAAM,KAAA,EACnBC,EAAS,EAAE,EACN,QAAQ,QAAQN,EAAOY,CAAI,CAAC,CACnC,EAAG,CAACH,EAAST,EAAQK,CAAK,CAAC,EAErBQ,EAAgBC,GAAkD,CACtER,EAASQ,EAAM,OAAO,KAAK,CAC7B,EAEMC,EAAiBD,GAAoD,CAGrEA,EAAM,YAAY,aAAeA,EAAM,UAAY,KAGnDA,EAAM,MAAQ,SAAW,CAACA,EAAM,WAClCA,EAAM,eAAA,EACNJ,EAAA,EAEJ,EAEMM,EAAM,CAAC,iBAAkBZ,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAExE,OACEa,EAAAA,KAAC,OAAA,CACC,UAAWD,EACX,SAAWF,GAAU,CACnBA,EAAM,eAAA,EACNJ,EAAA,CACF,EAEC,SAAA,CAAAP,SACE,MAAA,CAAI,UAAU,yBAAyB,KAAK,SAC1C,SAAAA,EACH,EAEFc,EAAAA,KAAC,MAAA,CAAI,UAAU,sBACb,SAAA,CAAAC,EAAAA,IAAC,WAAA,CACC,UAAU,wBACV,MAAAb,EACA,SAAUQ,EACV,UAAWE,EACX,YAAAb,EACA,SAAAM,EACA,KAAM,EACN,aAAW,SAAA,CAAA,EAEbU,EAAAA,IAAC,SAAA,CACC,KAAK,SACL,UAAU,uBACV,SAAU,CAACT,EACX,aAAW,eAEV,WACCS,EAAAA,IAAC,OAAA,CAAK,UAAU,0BAA0B,cAAY,OAAO,EAE7D,MAAA,CAAA,CAEJ,EACF,EACAA,EAAAA,IAAC,MAAA,CAAI,UAAU,uBAAuB,SAAA,yCAAA,CAEtC,CAAA,CAAA,CAAA,CAGN"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsxs as m, jsx as s } from "react/jsx-runtime";
|
|
2
2
|
import { useState as g, useCallback as _ } from "react";
|
|
3
3
|
/* empty css */
|
|
4
|
-
function
|
|
4
|
+
function N({
|
|
5
5
|
onSend: n,
|
|
6
6
|
sending: r = !1,
|
|
7
7
|
placeholder: d = "Ask the assistant…",
|
|
@@ -16,7 +16,7 @@ function w({
|
|
|
16
16
|
}, [o, n, a]), u = (e) => {
|
|
17
17
|
i(e.target.value);
|
|
18
18
|
}, h = (e) => {
|
|
19
|
-
e.key === "Enter" && !e.shiftKey && (e.preventDefault(), c());
|
|
19
|
+
e.nativeEvent.isComposing || e.keyCode === 229 || e.key === "Enter" && !e.shiftKey && (e.preventDefault(), c());
|
|
20
20
|
}, f = ["aegis-composer", p ?? ""].filter(Boolean).join(" ");
|
|
21
21
|
return /* @__PURE__ */ m(
|
|
22
22
|
"form",
|
|
@@ -58,6 +58,6 @@ function w({
|
|
|
58
58
|
);
|
|
59
59
|
}
|
|
60
60
|
export {
|
|
61
|
-
|
|
61
|
+
N as ChatComposer
|
|
62
62
|
};
|
|
63
63
|
//# sourceMappingURL=ChatComposer.js.map
|