@lincyaw/aegis-ui 0.10.0 → 0.12.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/AskPanel.cjs +1 -1
- package/dist/agent/ask/AskPanel.cjs.map +1 -1
- package/dist/agent/ask/AskPanel.d.ts +5 -0
- package/dist/agent/ask/AskPanel.js +105 -98
- package/dist/agent/ask/AskPanel.js.map +1 -1
- package/dist/commands/commandContext.cjs.map +1 -1
- package/dist/commands/commandContext.d.ts +4 -1
- package/dist/commands/commandContext.js.map +1 -1
- package/dist/components/ui/AgentPanel.cjs +1 -1
- package/dist/components/ui/AgentPanel.cjs.map +1 -1
- package/dist/components/ui/AgentPanel.js +15 -14
- package/dist/components/ui/AgentPanel.js.map +1 -1
- package/dist/components/ui/Avatar.cjs +1 -1
- package/dist/components/ui/Avatar.cjs.map +1 -1
- package/dist/components/ui/Avatar.js +21 -19
- package/dist/components/ui/Avatar.js.map +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs +1 -1
- package/dist/components/ui/BlastRadiusBar.cjs.map +1 -1
- package/dist/components/ui/BlastRadiusBar.d.ts +16 -4
- package/dist/components/ui/BlastRadiusBar.js +27 -23
- 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 +4 -2
- 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 +32 -31
- 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 +68 -66
- package/dist/components/ui/ChatSessionList.js.map +1 -1
- package/dist/components/ui/CheckGrid.cjs +1 -1
- package/dist/components/ui/CheckGrid.cjs.map +1 -1
- package/dist/components/ui/CheckGrid.js +18 -17
- package/dist/components/ui/CheckGrid.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 +6 -2
- package/dist/components/ui/Checkbox.js +21 -17
- package/dist/components/ui/Checkbox.js.map +1 -1
- package/dist/components/ui/ChoiceCardGroup.cjs +1 -1
- package/dist/components/ui/ChoiceCardGroup.cjs.map +1 -1
- package/dist/components/ui/ChoiceCardGroup.d.ts +13 -4
- package/dist/components/ui/ChoiceCardGroup.js +47 -35
- package/dist/components/ui/ChoiceCardGroup.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 +11 -1
- package/dist/components/ui/CodeEditor.js +108 -74
- package/dist/components/ui/CodeEditor.js.map +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs +1 -1
- package/dist/components/ui/CommandInvocationCard.cjs.map +1 -1
- package/dist/components/ui/CommandInvocationCard.js +23 -26
- package/dist/components/ui/CommandInvocationCard.js.map +1 -1
- package/dist/components/ui/CommandPalette.cjs +1 -1
- package/dist/components/ui/CommandPalette.cjs.map +1 -1
- package/dist/components/ui/CommandPalette.d.ts +3 -3
- package/dist/components/ui/CommandPalette.js +75 -75
- package/dist/components/ui/CommandPalette.js.map +1 -1
- package/dist/components/ui/CommitGraph.cjs +1 -1
- package/dist/components/ui/CommitGraph.cjs.map +1 -1
- package/dist/components/ui/CommitGraph.d.ts +3 -1
- package/dist/components/ui/CommitGraph.js +77 -74
- package/dist/components/ui/CommitGraph.js.map +1 -1
- package/dist/components/ui/ContentInspectorDialog.cjs +1 -1
- package/dist/components/ui/ContentInspectorDialog.cjs.map +1 -1
- package/dist/components/ui/ContentInspectorDialog.js +25 -31
- package/dist/components/ui/ContentInspectorDialog.js.map +1 -1
- package/dist/components/ui/ContentPreview.cjs +2 -2
- package/dist/components/ui/ContentPreview.cjs.map +1 -1
- package/dist/components/ui/ContentPreview.js +55 -56
- package/dist/components/ui/ContentPreview.js.map +1 -1
- package/dist/components/ui/DangerZone.cjs +1 -1
- package/dist/components/ui/DangerZone.cjs.map +1 -1
- package/dist/components/ui/DangerZone.js +9 -8
- package/dist/components/ui/DangerZone.js.map +1 -1
- package/dist/components/ui/DataList.cjs +1 -1
- package/dist/components/ui/DataList.cjs.map +1 -1
- package/dist/components/ui/DataList.js +27 -25
- 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 +2 -1
- package/dist/components/ui/DataTable.js +141 -124
- package/dist/components/ui/DataTable.js.map +1 -1
- package/dist/components/ui/DiffViewer.cjs +1 -1
- package/dist/components/ui/DiffViewer.cjs.map +1 -1
- package/dist/components/ui/DiffViewer.js +29 -25
- package/dist/components/ui/DiffViewer.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 +1 -0
- package/dist/components/ui/DropdownMenu.js +41 -40
- package/dist/components/ui/DropdownMenu.js.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs +1 -1
- package/dist/components/ui/EnvironmentSwitcher.cjs.map +1 -1
- package/dist/components/ui/EnvironmentSwitcher.js +26 -24
- package/dist/components/ui/EnvironmentSwitcher.js.map +1 -1
- package/dist/components/ui/EventTable.cjs +1 -1
- package/dist/components/ui/EventTable.cjs.map +1 -1
- package/dist/components/ui/EventTable.js +60 -53
- 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.js +40 -42
- 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.js +63 -61
- package/dist/components/ui/FilePreview.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.js +114 -84
- 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.js +22 -21
- package/dist/components/ui/ForgotPasswordForm.js.map +1 -1
- package/dist/components/ui/FormRow.cjs +1 -1
- package/dist/components/ui/FormRow.cjs.map +1 -1
- package/dist/components/ui/FormRow.d.ts +32 -11
- package/dist/components/ui/FormRow.js +24 -15
- package/dist/components/ui/FormRow.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 +12 -3
- package/dist/components/ui/InboxPage.js +91 -77
- package/dist/components/ui/InboxPage.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.js +43 -43
- package/dist/components/ui/LoginForm.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 +5 -1
- package/dist/components/ui/MonoValue.js +17 -17
- package/dist/components/ui/MonoValue.js.map +1 -1
- package/dist/components/ui/NotificationBell.cjs +1 -1
- package/dist/components/ui/NotificationBell.cjs.map +1 -1
- package/dist/components/ui/NotificationBell.d.ts +17 -1
- package/dist/components/ui/NotificationBell.js +129 -75
- package/dist/components/ui/NotificationBell.js.map +1 -1
- package/dist/components/ui/NumberField.cjs +1 -1
- package/dist/components/ui/NumberField.cjs.map +1 -1
- package/dist/components/ui/NumberField.d.ts +3 -1
- package/dist/components/ui/NumberField.js +52 -49
- package/dist/components/ui/NumberField.js.map +1 -1
- package/dist/components/ui/ObjectBrowser.cjs +1 -1
- package/dist/components/ui/ObjectBrowser.cjs.map +1 -1
- package/dist/components/ui/ObjectBrowser.js +83 -78
- package/dist/components/ui/ObjectBrowser.js.map +1 -1
- package/dist/components/ui/PageSizeSelect.cjs +1 -1
- package/dist/components/ui/PageSizeSelect.cjs.map +1 -1
- package/dist/components/ui/PageSizeSelect.js +30 -29
- package/dist/components/ui/PageSizeSelect.js.map +1 -1
- package/dist/components/ui/Panel.cjs.map +1 -1
- package/dist/components/ui/Panel.d.ts +5 -2
- package/dist/components/ui/Panel.js.map +1 -1
- package/dist/components/ui/ParetoChart.cjs +1 -1
- package/dist/components/ui/ParetoChart.cjs.map +1 -1
- package/dist/components/ui/ParetoChart.js +247 -212
- package/dist/components/ui/ParetoChart.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.js +69 -74
- package/dist/components/ui/ParquetViewer.js.map +1 -1
- package/dist/components/ui/PasswordField.cjs +1 -1
- package/dist/components/ui/PasswordField.cjs.map +1 -1
- package/dist/components/ui/PasswordField.js +28 -27
- package/dist/components/ui/PasswordField.js.map +1 -1
- package/dist/components/ui/PickerField.cjs +1 -1
- package/dist/components/ui/PickerField.cjs.map +1 -1
- package/dist/components/ui/PickerField.d.ts +25 -6
- package/dist/components/ui/PickerField.js +20 -17
- package/dist/components/ui/PickerField.js.map +1 -1
- package/dist/components/ui/ProjectSelector.cjs +1 -1
- package/dist/components/ui/ProjectSelector.cjs.map +1 -1
- package/dist/components/ui/ProjectSelector.js +40 -37
- package/dist/components/ui/ProjectSelector.js.map +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs +1 -1
- package/dist/components/ui/QueryAutocomplete.cjs.map +1 -1
- package/dist/components/ui/QueryAutocomplete.d.ts +11 -2
- package/dist/components/ui/QueryAutocomplete.js +146 -126
- package/dist/components/ui/QueryAutocomplete.js.map +1 -1
- package/dist/components/ui/RankBar.cjs +1 -1
- package/dist/components/ui/RankBar.cjs.map +1 -1
- package/dist/components/ui/RankBar.js +9 -9
- package/dist/components/ui/RankBar.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.js +41 -40
- package/dist/components/ui/RegisterForm.js.map +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs +1 -1
- package/dist/components/ui/ReplayStepStrip.cjs.map +1 -1
- package/dist/components/ui/ReplayStepStrip.d.ts +6 -3
- package/dist/components/ui/ReplayStepStrip.js +71 -61
- package/dist/components/ui/ReplayStepStrip.js.map +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs +1 -1
- package/dist/components/ui/ResizableSidePanel.cjs.map +1 -1
- package/dist/components/ui/ResizableSidePanel.js +41 -40
- package/dist/components/ui/ResizableSidePanel.js.map +1 -1
- package/dist/components/ui/SavedQueryBar.cjs +1 -1
- package/dist/components/ui/SavedQueryBar.cjs.map +1 -1
- package/dist/components/ui/SavedQueryBar.d.ts +1 -1
- package/dist/components/ui/SavedQueryBar.js +375 -277
- package/dist/components/ui/SavedQueryBar.js.map +1 -1
- package/dist/components/ui/SearchInput.cjs +1 -1
- package/dist/components/ui/SearchInput.cjs.map +1 -1
- package/dist/components/ui/SearchInput.d.ts +5 -1
- package/dist/components/ui/SearchInput.js +28 -24
- package/dist/components/ui/SearchInput.js.map +1 -1
- package/dist/components/ui/Select.cjs +1 -1
- package/dist/components/ui/Select.cjs.map +1 -1
- package/dist/components/ui/Select.d.ts +3 -1
- package/dist/components/ui/Select.js +21 -19
- 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 +18 -4
- package/dist/components/ui/ServiceMap.js +353 -228
- package/dist/components/ui/ServiceMap.js.map +1 -1
- package/dist/components/ui/Slider.cjs +1 -1
- package/dist/components/ui/Slider.cjs.map +1 -1
- package/dist/components/ui/Slider.d.ts +3 -1
- package/dist/components/ui/Slider.js +11 -9
- package/dist/components/ui/Slider.js.map +1 -1
- package/dist/components/ui/SparkLine.cjs +1 -1
- package/dist/components/ui/SparkLine.cjs.map +1 -1
- package/dist/components/ui/SparkLine.d.ts +5 -2
- package/dist/components/ui/SparkLine.js +36 -31
- package/dist/components/ui/SparkLine.js.map +1 -1
- package/dist/components/ui/Steps.cjs +1 -1
- package/dist/components/ui/Steps.cjs.map +1 -1
- package/dist/components/ui/Steps.js +25 -29
- package/dist/components/ui/Steps.js.map +1 -1
- package/dist/components/ui/TableOfContents.cjs +1 -1
- package/dist/components/ui/TableOfContents.cjs.map +1 -1
- package/dist/components/ui/TableOfContents.js +16 -19
- 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.js +107 -87
- package/dist/components/ui/Tabs.js.map +1 -1
- package/dist/components/ui/Terminal.cjs +1 -1
- package/dist/components/ui/Terminal.cjs.map +1 -1
- package/dist/components/ui/Terminal.js +18 -17
- package/dist/components/ui/Terminal.js.map +1 -1
- package/dist/components/ui/TextField.cjs +1 -1
- package/dist/components/ui/TextField.cjs.map +1 -1
- package/dist/components/ui/TextField.js +6 -6
- package/dist/components/ui/TextField.js.map +1 -1
- package/dist/components/ui/ThemeToggle.cjs +1 -1
- package/dist/components/ui/ThemeToggle.cjs.map +1 -1
- package/dist/components/ui/ThemeToggle.js +15 -18
- package/dist/components/ui/ThemeToggle.js.map +1 -1
- package/dist/components/ui/TimeDisplay.cjs +1 -1
- package/dist/components/ui/TimeDisplay.cjs.map +1 -1
- package/dist/components/ui/TimeDisplay.js +12 -12
- package/dist/components/ui/TimeDisplay.js.map +1 -1
- package/dist/components/ui/TimeRangePicker.cjs +1 -1
- package/dist/components/ui/TimeRangePicker.cjs.map +1 -1
- package/dist/components/ui/TimeRangePicker.d.ts +12 -1
- package/dist/components/ui/TimeRangePicker.js +136 -113
- package/dist/components/ui/TimeRangePicker.js.map +1 -1
- package/dist/components/ui/Timeline.cjs.map +1 -1
- package/dist/components/ui/Timeline.d.ts +4 -4
- package/dist/components/ui/Timeline.js.map +1 -1
- package/dist/components/ui/TimelineChart.cjs +2 -2
- package/dist/components/ui/TimelineChart.cjs.map +1 -1
- package/dist/components/ui/TimelineChart.d.ts +1 -0
- package/dist/components/ui/TimelineChart.js +131 -137
- package/dist/components/ui/TimelineChart.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 +43 -46
- 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 +5 -1
- package/dist/components/ui/TraceTree.js +98 -97
- package/dist/components/ui/TraceTree.js.map +1 -1
- package/dist/components/ui/TrajectoryStep.cjs +2 -1
- package/dist/components/ui/TrajectoryStep.cjs.map +1 -1
- package/dist/components/ui/TrajectoryStep.js +64 -43
- package/dist/components/ui/TrajectoryStep.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.js +59 -70
- package/dist/components/ui/UploadQueue.js.map +1 -1
- package/dist/components/ui/authValidation.cjs +1 -1
- package/dist/components/ui/authValidation.cjs.map +1 -1
- package/dist/components/ui/authValidation.d.ts +2 -2
- package/dist/components/ui/authValidation.js +4 -5
- package/dist/components/ui/authValidation.js.map +1 -1
- package/dist/components/ui/classifyContent.cjs +3 -3
- package/dist/components/ui/classifyContent.cjs.map +1 -1
- package/dist/components/ui/classifyContent.d.ts +2 -1
- package/dist/components/ui/classifyContent.js +52 -54
- package/dist/components/ui/classifyContent.js.map +1 -1
- package/dist/components/ui/relativeTime.cjs +1 -1
- package/dist/components/ui/relativeTime.cjs.map +1 -1
- package/dist/components/ui/relativeTime.d.ts +5 -3
- package/dist/components/ui/relativeTime.js +15 -6
- package/dist/components/ui/relativeTime.js.map +1 -1
- package/dist/components/ui/useColumnWidths.cjs +1 -1
- package/dist/components/ui/useColumnWidths.cjs.map +1 -1
- package/dist/components/ui/useColumnWidths.d.ts +6 -1
- package/dist/components/ui/useColumnWidths.js +139 -123
- package/dist/components/ui/useColumnWidths.js.map +1 -1
- package/dist/hooks/popoverOverflow.cjs +2 -0
- package/dist/hooks/popoverOverflow.cjs.map +1 -0
- package/dist/hooks/popoverOverflow.d.ts +8 -0
- package/dist/hooks/popoverOverflow.js +9 -0
- package/dist/hooks/popoverOverflow.js.map +1 -0
- package/dist/hooks/useDialogPopover.cjs +2 -0
- package/dist/hooks/useDialogPopover.cjs.map +1 -0
- package/dist/hooks/useDialogPopover.d.ts +23 -0
- package/dist/hooks/useDialogPopover.js +48 -0
- package/dist/hooks/useDialogPopover.js.map +1 -0
- package/dist/hooks/useMenuPopover.cjs +1 -1
- package/dist/hooks/useMenuPopover.cjs.map +1 -1
- package/dist/hooks/useMenuPopover.d.ts +0 -8
- package/dist/hooks/useMenuPopover.js +17 -22
- package/dist/hooks/useMenuPopover.js.map +1 -1
- package/dist/hooks/useSavedQueries.cjs +1 -1
- package/dist/hooks/useSavedQueries.cjs.map +1 -1
- package/dist/hooks/useSavedQueries.js +29 -28
- package/dist/hooks/useSavedQueries.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/layouts/shell/AegisShell.cjs +1 -1
- package/dist/layouts/shell/AegisShell.cjs.map +1 -1
- package/dist/layouts/shell/AegisShell.js +58 -59
- package/dist/layouts/shell/AegisShell.js.map +1 -1
- package/dist/layouts/shell/AppSwitcher.cjs +1 -1
- package/dist/layouts/shell/AppSwitcher.cjs.map +1 -1
- package/dist/layouts/shell/AppSwitcher.js +53 -36
- package/dist/layouts/shell/AppSwitcher.js.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs +1 -1
- package/dist/layouts/shell/AuthRequiredCard.cjs.map +1 -1
- package/dist/layouts/shell/AuthRequiredCard.js +24 -22
- package/dist/layouts/shell/AuthRequiredCard.js.map +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.cjs +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.cjs.map +1 -1
- package/dist/layouts/shell/RouteErrorBoundary.d.ts +4 -1
- package/dist/layouts/shell/RouteErrorBoundary.js +15 -10
- package/dist/layouts/shell/RouteErrorBoundary.js.map +1 -1
- package/dist/layouts/shell/ShellInboxPage.cjs +1 -1
- package/dist/layouts/shell/ShellInboxPage.cjs.map +1 -1
- package/dist/layouts/shell/ShellInboxPage.js +17 -16
- package/dist/layouts/shell/ShellInboxPage.js.map +1 -1
- package/dist/layouts/shell/ShellNotificationBell.cjs +1 -1
- package/dist/layouts/shell/ShellNotificationBell.cjs.map +1 -1
- package/dist/layouts/shell/ShellNotificationBell.js +20 -14
- package/dist/layouts/shell/ShellNotificationBell.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.js +74 -74
- package/dist/layouts/shell/TopHeader.js.map +1 -1
- package/dist/layouts/shell/useShellUser.cjs +1 -1
- package/dist/layouts/shell/useShellUser.cjs.map +1 -1
- package/dist/layouts/shell/useShellUser.js +15 -13
- package/dist/layouts/shell/useShellUser.js.map +1 -1
- package/dist/lib/breakAtSeparators.cjs +2 -0
- package/dist/lib/breakAtSeparators.cjs.map +1 -0
- package/dist/lib/breakAtSeparators.d.ts +6 -0
- package/dist/lib/breakAtSeparators.js +10 -0
- package/dist/lib/breakAtSeparators.js.map +1 -0
- package/dist/lib/chart.cjs +1 -1
- package/dist/lib/chart.cjs.map +1 -1
- package/dist/lib/chart.d.ts +5 -7
- package/dist/lib/chart.js +49 -34
- package/dist/lib/chart.js.map +1 -1
- package/dist/lib/timeRange.cjs +1 -1
- package/dist/lib/timeRange.cjs.map +1 -1
- package/dist/lib/timeRange.d.ts +14 -4
- package/dist/lib/timeRange.js +41 -40
- 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 +247 -2
- package/dist/locale/strings.js +562 -37
- package/dist/locale/strings.js.map +1 -1
- package/dist/notifications/notificationContext.cjs.map +1 -1
- package/dist/notifications/notificationContext.d.ts +12 -2
- package/dist/notifications/notificationContext.js.map +1 -1
- package/dist/style.css +1 -1
- package/dist/theme/antdTheme.cjs +1 -1
- package/dist/theme/antdTheme.cjs.map +1 -1
- package/dist/theme/antdTheme.js +52 -29
- 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.js +66 -61
- package/dist/transports/agentm/AgentmChannelProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentInspectorDialog.js","sources":["../../../src/components/ui/ContentInspectorDialog.tsx"],"sourcesContent":["import { type ReactElement, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { CodeBlock } from './CodeBlock';\nimport { ContentPreview } from './ContentPreview';\nimport { Dialog } from './Dialog';\nimport { type TabItem, Tabs } from './Tabs';\nimport {\n type InspectableContent,\n type
|
|
1
|
+
{"version":3,"file":"ContentInspectorDialog.js","sources":["../../../src/components/ui/ContentInspectorDialog.tsx"],"sourcesContent":["import { type ReactElement, useState } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { CodeBlock } from './CodeBlock';\nimport { ContentPreview } from './ContentPreview';\nimport { Dialog } from './Dialog';\nimport { type TabItem, Tabs } from './Tabs';\nimport {\n type InspectableContent,\n type InspectableContentOptions,\n codeLanguage,\n prepareInspectableContent,\n} from './classifyContent';\n\nexport interface ContentInspectorDialogProps extends InspectableContentOptions {\n open: boolean;\n content: InspectableContent | null;\n onClose: () => void;\n}\n\n/** Shows one piece of content full size, rendered or raw. */\nexport function ContentInspectorDialog({\n open,\n content,\n onClose,\n markdownPatterns,\n}: ContentInspectorDialogProps): ReactElement | null {\n const strings = useStrings();\n const [activeTab, setActiveTab] = useState('rendered');\n // The dialog animates out after the host clears `content`, so it keeps\n // showing the last content. Every opening starts on the rendered tab.\n const [shown, setShown] = useState(content);\n const current = open ? content : null;\n const [openedFor, setOpenedFor] = useState(current);\n if (current !== openedFor) {\n setOpenedFor(current);\n if (current !== null) {\n setShown(current);\n setActiveTab('rendered');\n }\n }\n\n if (shown === null) {\n return null;\n }\n\n const prepared = prepareInspectableContent(shown, { markdownPatterns });\n const tabItems: TabItem[] = [\n { key: 'rendered', label: strings.inspectorRendered },\n { key: 'raw', label: strings.inspectorRaw },\n ];\n\n return (\n <Dialog\n open={current !== null}\n title={shown.title}\n description={strings.inspectorContentKind(prepared.kind)}\n onClose={onClose}\n width=\"lg\"\n className=\"aegis-content-inspector\"\n >\n <Tabs items={tabItems} activeKey={activeTab} onChange={setActiveTab}>\n {activeTab === 'rendered' ? (\n <ContentPreview\n content={shown}\n markdownPatterns={markdownPatterns}\n expanded\n />\n ) : (\n <CodeBlock\n code={prepared.rawText}\n language={codeLanguage(prepared.kind)}\n showLineNumbers={\n prepared.kind === 'json' || prepared.kind === 'sql'\n }\n />\n )}\n </Tabs>\n </Dialog>\n );\n}\n"],"names":["ContentInspectorDialog","open","content","onClose","markdownPatterns","strings","useStrings","activeTab","setActiveTab","useState","shown","setShown","current","openedFor","setOpenedFor","prepared","prepareInspectableContent","tabItems","jsx","Dialog","Tabs","ContentPreview","CodeBlock","codeLanguage"],"mappings":";;;;;;;;AAqBO,SAASA,EAAuB;AAAA,EACrC,MAAAC;AAAA,EACA,SAAAC;AAAA,EACA,SAAAC;AAAA,EACA,kB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runtime"),l=require("./CodeBlock.cjs");;/* empty css */const
|
|
2
|
-
`),children:
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime"),l=require("./CodeBlock.cjs");;/* empty css */const u=require("./Markdown.cjs"),c=require("./classifyContent.cjs"),d=require("../../locale/useStrings.cjs");function x(n){try{return JSON.stringify(n,null,2)}catch{return String(n)}}function g({value:n,expanded:r,options:t}){const s=c.prepareInspectableContent({value:n},t);return s.kind==="json"&&s.value!==n?e.jsx(j,{value:s.value,expanded:r,options:t}):s.kind==="markdown"?e.jsx(u.Markdown,{className:"aegis-content-json__markdown",children:s.text}):s.kind==="sql"?e.jsx(l.CodeBlock,{className:"aegis-content-json__code",code:s.text,language:"sql",showLineNumbers:r}):e.jsx("p",{className:"aegis-content-json__text",children:s.text})}function m({section:n,expanded:r,options:t}){const s=d.useStrings();return e.jsxs("section",{className:"aegis-content-json__section",children:[e.jsxs("div",{className:"aegis-content-json__section-head",children:[e.jsx("span",{className:"aegis-content-json__path",children:n.paths[0]}),n.paths.length>1?e.jsx("span",{className:"aegis-content-json__duplicates",title:n.paths.slice(1).join(`
|
|
2
|
+
`),children:s.contentDuplicates(n.paths.length-1)}):null,e.jsx("span",{className:"aegis-content-json__kind",children:n.kind==="text"?s.plainTextLanguage:n.kind})]}),e.jsx(g,{value:n.value,expanded:r,options:t})]})}function j({value:n,expanded:r,options:t}){const s=d.useStrings(),a=c.collectContentSections(n,s.contentRoot,t);return a.length>0?e.jsx("div",{className:"aegis-content-json",children:a.map(i=>e.jsx(m,{section:i,expanded:r,options:t},i.id))}):e.jsx(l.CodeBlock,{className:"aegis-content-preview__code",code:x(n),language:"json",showLineNumbers:r})}function h({content:n,className:r,expanded:t=!1,markdownPatterns:s}){const a={markdownPatterns:s},i=c.prepareInspectableContent(n,a),o=["aegis-content-preview",`aegis-content-preview--${i.kind}`,t?"aegis-content-preview--expanded":"",r??""].filter(Boolean).join(" ");return i.kind==="json"?e.jsx("div",{className:o,children:e.jsx(j,{value:i.value,expanded:t,options:a})}):i.kind==="markdown"?e.jsx("div",{className:o,children:e.jsx(u.Markdown,{className:"aegis-content-preview__markdown",children:i.text})}):i.kind==="text"?e.jsx("div",{className:o,children:e.jsx(g,{value:i.text,expanded:t,options:a})}):e.jsx("div",{className:o,children:e.jsx(l.CodeBlock,{className:"aegis-content-preview__code",code:i.text,language:c.codeLanguage(i.kind),showLineNumbers:t})})}exports.ContentPreview=h;
|
|
3
3
|
//# sourceMappingURL=ContentPreview.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPreview.cjs","sources":["../../../src/components/ui/ContentPreview.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { CodeBlock } from './CodeBlock';\nimport './ContentPreview.css';\nimport { Markdown } from './Markdown';\nimport {\n type ContentSection,\n type InspectableContent,\n type InspectableContentOptions,\n codeLanguage,\n collectContentSections,\n prepareInspectableContent,\n} from './classifyContent';\n\nexport interface ContentPreviewProps extends InspectableContentOptions {\n content: InspectableContent;\n className?: string;\n /** Full height with line numbers, as in the inspector dialog. */\n expanded?: boolean;\n}\n\nfunction stringifyJson(value: unknown): string {\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\
|
|
1
|
+
{"version":3,"file":"ContentPreview.cjs","sources":["../../../src/components/ui/ContentPreview.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { CodeBlock } from './CodeBlock';\nimport './ContentPreview.css';\nimport { Markdown } from './Markdown';\nimport {\n type ContentSection,\n type InspectableContent,\n type InspectableContentOptions,\n codeLanguage,\n collectContentSections,\n prepareInspectableContent,\n} from './classifyContent';\n\nexport interface ContentPreviewProps extends InspectableContentOptions {\n content: InspectableContent;\n className?: string;\n /** Full height with line numbers, as in the inspector dialog. */\n expanded?: boolean;\n}\n\nfunction stringifyJson(value: unknown): string {\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\ninterface PartProps {\n expanded: boolean;\n options: InspectableContentOptions;\n}\n\nfunction StringValuePreview({\n value,\n expanded,\n options,\n}: PartProps & { value: string }): ReactElement {\n const prepared = prepareInspectableContent(\n { title: 'string', value },\n options,\n );\n\n if (prepared.kind === 'json' && prepared.value !== value) {\n return (\n <JsonCompactPreview\n value={prepared.value}\n expanded={expanded}\n options={options}\n />\n );\n }\n if (prepared.kind === 'markdown') {\n return (\n <Markdown className=\"aegis-content-json__markdown\">\n {prepared.text}\n </Markdown>\n );\n }\n if (prepared.kind === 'sql') {\n return (\n <CodeBlock\n className=\"aegis-content-json__code\"\n code={prepared.text}\n language=\"sql\"\n showLineNumbers={expanded}\n />\n );\n }\n return <p className=\"aegis-content-json__text\">{prepared.text}</p>;\n}\n\nfunction JsonContentSectionPreview({\n section,\n expanded,\n options,\n}: PartProps & { section: ContentSection }): ReactElement {\n const strings = useStrings();\n return (\n <section className=\"aegis-content-json__section\">\n <div className=\"aegis-content-json__section-head\">\n <span className=\"aegis-content-json__path\">{section.paths[0]}</span>\n {section.paths.length > 1 ? (\n <span\n className=\"aegis-content-json__duplicates\"\n title={section.paths.slice(1).join('\\n')}\n >\n {strings.contentDuplicates(section.paths.length - 1)}\n </span>\n ) : null}\n <span className=\"aegis-content-json__kind\">\n {section.kind === 'text' ? strings.plainTextLanguage : section.kind}\n </span>\n </div>\n <StringValuePreview\n value={section.value}\n expanded={expanded}\n options={options}\n />\n </section>\n );\n}\n\nfunction JsonCompactPreview({\n value,\n expanded,\n options,\n}: PartProps & { value: unknown }): ReactElement {\n const strings = useStrings();\n const sections = collectContentSections(value, strings.contentRoot, options);\n\n if (sections.length > 0) {\n return (\n <div className=\"aegis-content-json\">\n {sections.map((section) => (\n <JsonContentSectionPreview\n key={section.id}\n section={section}\n expanded={expanded}\n options={options}\n />\n ))}\n </div>\n );\n }\n\n return (\n <CodeBlock\n className=\"aegis-content-preview__code\"\n code={stringifyJson(value)}\n language=\"json\"\n showLineNumbers={expanded}\n />\n );\n}\n\n/**\n * Renders inspectable content by its kind: the rich-text strings inside\n * JSON as sections, Markdown rendered, SQL and other JSON as code.\n */\nexport function ContentPreview({\n content,\n className,\n expanded = false,\n markdownPatterns,\n}: ContentPreviewProps): ReactElement {\n const options: InspectableContentOptions = { markdownPatterns };\n const prepared = prepareInspectableContent(content, options);\n const cls = [\n 'aegis-content-preview',\n `aegis-content-preview--${prepared.kind}`,\n expanded ? 'aegis-content-preview--expanded' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n if (prepared.kind === 'json') {\n return (\n <div className={cls}>\n <JsonCompactPreview\n value={prepared.value}\n expanded={expanded}\n options={options}\n />\n </div>\n );\n }\n if (prepared.kind === 'markdown') {\n return (\n <div className={cls}>\n <Markdown className=\"aegis-content-preview__markdown\">\n {prepared.text}\n </Markdown>\n </div>\n );\n }\n if (prepared.kind === 'text') {\n return (\n <div className={cls}>\n <StringValuePreview\n value={prepared.text}\n expanded={expanded}\n options={options}\n />\n </div>\n );\n }\n return (\n <div className={cls}>\n <CodeBlock\n className=\"aegis-content-preview__code\"\n code={prepared.text}\n language={codeLanguage(prepared.kind)}\n showLineNumbers={expanded}\n />\n </div>\n );\n}\n"],"names":["stringifyJson","value","StringValuePreview","expanded","options","prepared","prepareInspectableContent","jsx","JsonCompactPreview","Markdown","CodeBlock","JsonContentSectionPreview","section","strings","useStrings","jsxs","sections","collectContentSections","ContentPreview","content","className","markdownPatterns","cls","codeLanguage"],"mappings":"oSAsBA,SAASA,EAAcC,EAAwB,CAC7C,GAAI,CACF,OAAO,KAAK,UAAUA,EAAO,KAAM,CAAC,CACtC,MAAQ,CACN,OAAO,OAAOA,CAAK,CACrB,CACF,CAOA,SAASC,EAAmB,CAC1B,MAAAD,EACA,SAAAE,EACA,QAAAC,CACF,EAAgD,CAC9C,MAAMC,EAAWC,EAAAA,0BACf,CAAmB,MAAAL,CAAA,EACnBG,CAAA,EAGF,OAAIC,EAAS,OAA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AAA,EAErB,CAEJ"}
|
|
@@ -1,134 +1,133 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as e, jsxs as l } from "react/jsx-runtime";
|
|
2
2
|
import { CodeBlock as c } from "./CodeBlock.js";
|
|
3
3
|
/* empty css */
|
|
4
4
|
import { Markdown as d } from "./Markdown.js";
|
|
5
|
-
import { prepareInspectableContent as u, codeLanguage as
|
|
6
|
-
|
|
5
|
+
import { prepareInspectableContent as u, codeLanguage as h, collectContentSections as _ } from "./classifyContent.js";
|
|
6
|
+
import { useStrings as m } from "../../locale/useStrings.js";
|
|
7
|
+
function f(n) {
|
|
7
8
|
try {
|
|
8
|
-
return JSON.stringify(
|
|
9
|
+
return JSON.stringify(n, null, 2);
|
|
9
10
|
} catch {
|
|
10
|
-
return String(
|
|
11
|
+
return String(n);
|
|
11
12
|
}
|
|
12
13
|
}
|
|
13
|
-
function
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
function m({
|
|
17
|
-
value: e,
|
|
18
|
-
expanded: i,
|
|
14
|
+
function g({
|
|
15
|
+
value: n,
|
|
16
|
+
expanded: a,
|
|
19
17
|
options: s
|
|
20
18
|
}) {
|
|
21
19
|
const t = u(
|
|
22
|
-
{ value:
|
|
20
|
+
{ value: n },
|
|
23
21
|
s
|
|
24
22
|
);
|
|
25
|
-
return t.kind === "json" && t.value !==
|
|
26
|
-
|
|
23
|
+
return t.kind === "json" && t.value !== n ? /* @__PURE__ */ e(
|
|
24
|
+
p,
|
|
27
25
|
{
|
|
28
26
|
value: t.value,
|
|
29
|
-
expanded:
|
|
27
|
+
expanded: a,
|
|
30
28
|
options: s
|
|
31
29
|
}
|
|
32
|
-
) : t.kind === "markdown" ? /* @__PURE__ */
|
|
30
|
+
) : t.kind === "markdown" ? /* @__PURE__ */ e(d, { className: "aegis-content-json__markdown", children: t.text }) : t.kind === "sql" ? /* @__PURE__ */ e(
|
|
33
31
|
c,
|
|
34
32
|
{
|
|
35
33
|
className: "aegis-content-json__code",
|
|
36
34
|
code: t.text,
|
|
37
35
|
language: "sql",
|
|
38
|
-
showLineNumbers:
|
|
36
|
+
showLineNumbers: a
|
|
39
37
|
}
|
|
40
|
-
) : /* @__PURE__ */
|
|
38
|
+
) : /* @__PURE__ */ e("p", { className: "aegis-content-json__text", children: t.text });
|
|
41
39
|
}
|
|
42
40
|
function v({
|
|
43
|
-
section:
|
|
44
|
-
expanded:
|
|
41
|
+
section: n,
|
|
42
|
+
expanded: a,
|
|
45
43
|
options: s
|
|
46
44
|
}) {
|
|
45
|
+
const t = m();
|
|
47
46
|
return /* @__PURE__ */ l("section", { className: "aegis-content-json__section", children: [
|
|
48
47
|
/* @__PURE__ */ l("div", { className: "aegis-content-json__section-head", children: [
|
|
49
|
-
/* @__PURE__ */
|
|
50
|
-
|
|
48
|
+
/* @__PURE__ */ e("span", { className: "aegis-content-json__path", children: n.paths[0] }),
|
|
49
|
+
n.paths.length > 1 ? /* @__PURE__ */ e(
|
|
51
50
|
"span",
|
|
52
51
|
{
|
|
53
52
|
className: "aegis-content-json__duplicates",
|
|
54
|
-
title:
|
|
53
|
+
title: n.paths.slice(1).join(`
|
|
55
54
|
`),
|
|
56
|
-
children:
|
|
55
|
+
children: t.contentDuplicates(n.paths.length - 1)
|
|
57
56
|
}
|
|
58
57
|
) : null,
|
|
59
|
-
/* @__PURE__ */
|
|
58
|
+
/* @__PURE__ */ e("span", { className: "aegis-content-json__kind", children: n.kind === "text" ? t.plainTextLanguage : n.kind })
|
|
60
59
|
] }),
|
|
61
|
-
/* @__PURE__ */
|
|
62
|
-
|
|
60
|
+
/* @__PURE__ */ e(
|
|
61
|
+
g,
|
|
63
62
|
{
|
|
64
|
-
value:
|
|
65
|
-
expanded:
|
|
63
|
+
value: n.value,
|
|
64
|
+
expanded: a,
|
|
66
65
|
options: s
|
|
67
66
|
}
|
|
68
67
|
)
|
|
69
68
|
] });
|
|
70
69
|
}
|
|
71
|
-
function
|
|
72
|
-
value:
|
|
73
|
-
expanded:
|
|
70
|
+
function p({
|
|
71
|
+
value: n,
|
|
72
|
+
expanded: a,
|
|
74
73
|
options: s
|
|
75
74
|
}) {
|
|
76
|
-
const t =
|
|
77
|
-
return
|
|
75
|
+
const t = m(), r = _(n, t.contentRoot, s);
|
|
76
|
+
return r.length > 0 ? /* @__PURE__ */ e("div", { className: "aegis-content-json", children: r.map((i) => /* @__PURE__ */ e(
|
|
78
77
|
v,
|
|
79
78
|
{
|
|
80
|
-
section:
|
|
81
|
-
expanded:
|
|
79
|
+
section: i,
|
|
80
|
+
expanded: a,
|
|
82
81
|
options: s
|
|
83
82
|
},
|
|
84
|
-
|
|
85
|
-
)) }) : /* @__PURE__ */
|
|
83
|
+
i.id
|
|
84
|
+
)) }) : /* @__PURE__ */ e(
|
|
86
85
|
c,
|
|
87
86
|
{
|
|
88
87
|
className: "aegis-content-preview__code",
|
|
89
|
-
code:
|
|
88
|
+
code: f(n),
|
|
90
89
|
language: "json",
|
|
91
|
-
showLineNumbers:
|
|
90
|
+
showLineNumbers: a
|
|
92
91
|
}
|
|
93
92
|
);
|
|
94
93
|
}
|
|
95
|
-
function
|
|
96
|
-
content:
|
|
97
|
-
className:
|
|
94
|
+
function S({
|
|
95
|
+
content: n,
|
|
96
|
+
className: a,
|
|
98
97
|
expanded: s = !1,
|
|
99
98
|
markdownPatterns: t
|
|
100
99
|
}) {
|
|
101
|
-
const r = { markdownPatterns: t },
|
|
100
|
+
const r = { markdownPatterns: t }, i = u(n, r), o = [
|
|
102
101
|
"aegis-content-preview",
|
|
103
|
-
`aegis-content-preview--${
|
|
102
|
+
`aegis-content-preview--${i.kind}`,
|
|
104
103
|
s ? "aegis-content-preview--expanded" : "",
|
|
105
|
-
|
|
104
|
+
a ?? ""
|
|
106
105
|
].filter(Boolean).join(" ");
|
|
107
|
-
return
|
|
108
|
-
|
|
106
|
+
return i.kind === "json" ? /* @__PURE__ */ e("div", { className: o, children: /* @__PURE__ */ e(
|
|
107
|
+
p,
|
|
109
108
|
{
|
|
110
|
-
value:
|
|
109
|
+
value: i.value,
|
|
111
110
|
expanded: s,
|
|
112
111
|
options: r
|
|
113
112
|
}
|
|
114
|
-
) }) :
|
|
115
|
-
|
|
113
|
+
) }) : i.kind === "markdown" ? /* @__PURE__ */ e("div", { className: o, children: /* @__PURE__ */ e(d, { className: "aegis-content-preview__markdown", children: i.text }) }) : i.kind === "text" ? /* @__PURE__ */ e("div", { className: o, children: /* @__PURE__ */ e(
|
|
114
|
+
g,
|
|
116
115
|
{
|
|
117
|
-
value:
|
|
116
|
+
value: i.text,
|
|
118
117
|
expanded: s,
|
|
119
118
|
options: r
|
|
120
119
|
}
|
|
121
|
-
) }) : /* @__PURE__ */
|
|
120
|
+
) }) : /* @__PURE__ */ e("div", { className: o, children: /* @__PURE__ */ e(
|
|
122
121
|
c,
|
|
123
122
|
{
|
|
124
123
|
className: "aegis-content-preview__code",
|
|
125
|
-
code:
|
|
126
|
-
language:
|
|
124
|
+
code: i.text,
|
|
125
|
+
language: h(i.kind),
|
|
127
126
|
showLineNumbers: s
|
|
128
127
|
}
|
|
129
128
|
) });
|
|
130
129
|
}
|
|
131
130
|
export {
|
|
132
|
-
|
|
131
|
+
S as ContentPreview
|
|
133
132
|
};
|
|
134
133
|
//# sourceMappingURL=ContentPreview.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ContentPreview.js","sources":["../../../src/components/ui/ContentPreview.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { CodeBlock } from './CodeBlock';\nimport './ContentPreview.css';\nimport { Markdown } from './Markdown';\nimport {\n type ContentSection,\n type InspectableContent,\n type InspectableContentOptions,\n codeLanguage,\n collectContentSections,\n prepareInspectableContent,\n} from './classifyContent';\n\nexport interface ContentPreviewProps extends InspectableContentOptions {\n content: InspectableContent;\n className?: string;\n /** Full height with line numbers, as in the inspector dialog. */\n expanded?: boolean;\n}\n\nfunction stringifyJson(value: unknown): string {\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\
|
|
1
|
+
{"version":3,"file":"ContentPreview.js","sources":["../../../src/components/ui/ContentPreview.tsx"],"sourcesContent":["import type { ReactElement } from 'react';\n\nimport { useStrings } from '../../locale';\nimport { CodeBlock } from './CodeBlock';\nimport './ContentPreview.css';\nimport { Markdown } from './Markdown';\nimport {\n type ContentSection,\n type InspectableContent,\n type InspectableContentOptions,\n codeLanguage,\n collectContentSections,\n prepareInspectableContent,\n} from './classifyContent';\n\nexport interface ContentPreviewProps extends InspectableContentOptions {\n content: InspectableContent;\n className?: string;\n /** Full height with line numbers, as in the inspector dialog. */\n expanded?: boolean;\n}\n\nfunction stringifyJson(value: unknown): string {\n try {\n return JSON.stringify(value, null, 2);\n } catch {\n return String(value);\n }\n}\n\ninterface PartProps {\n expanded: boolean;\n options: InspectableContentOptions;\n}\n\nfunction StringValuePreview({\n value,\n expanded,\n options,\n}: PartProps & { value: string }): ReactElement {\n const prepared = prepareInspectableContent(\n { title: 'string', value },\n options,\n );\n\n if (prepared.kind === 'json' && prepared.value !== value) {\n return (\n <JsonCompactPreview\n value={prepared.value}\n expanded={expanded}\n options={options}\n />\n );\n }\n if (prepared.kind === 'markdown') {\n return (\n <Markdown className=\"aegis-content-json__markdown\">\n {prepared.text}\n </Markdown>\n );\n }\n if (prepared.kind === 'sql') {\n return (\n <CodeBlock\n className=\"aegis-content-json__code\"\n code={prepared.text}\n language=\"sql\"\n showLineNumbers={expanded}\n />\n );\n }\n return <p className=\"aegis-content-json__text\">{prepared.text}</p>;\n}\n\nfunction JsonContentSectionPreview({\n section,\n expanded,\n options,\n}: PartProps & { section: ContentSection }): ReactElement {\n const strings = useStrings();\n return (\n <section className=\"aegis-content-json__section\">\n <div className=\"aegis-content-json__section-head\">\n <span className=\"aegis-content-json__path\">{section.paths[0]}</span>\n {section.paths.length > 1 ? (\n <span\n className=\"aegis-content-json__duplicates\"\n title={section.paths.slice(1).join('\\n')}\n >\n {strings.contentDuplicates(section.paths.length - 1)}\n </span>\n ) : null}\n <span className=\"aegis-content-json__kind\">\n {section.kind === 'text' ? strings.plainTextLanguage : section.kind}\n </span>\n </div>\n <StringValuePreview\n value={section.value}\n expanded={expanded}\n options={options}\n />\n </section>\n );\n}\n\nfunction JsonCompactPreview({\n value,\n expanded,\n options,\n}: PartProps & { value: unknown }): ReactElement {\n const strings = useStrings();\n const sections = collectContentSections(value, strings.contentRoot, options);\n\n if (sections.length > 0) {\n return (\n <div className=\"aegis-content-json\">\n {sections.map((section) => (\n <JsonContentSectionPreview\n key={section.id}\n section={section}\n expanded={expanded}\n options={options}\n />\n ))}\n </div>\n );\n }\n\n return (\n <CodeBlock\n className=\"aegis-content-preview__code\"\n code={stringifyJson(value)}\n language=\"json\"\n showLineNumbers={expanded}\n />\n );\n}\n\n/**\n * Renders inspectable content by its kind: the rich-text strings inside\n * JSON as sections, Markdown rendered, SQL and other JSON as code.\n */\nexport function ContentPreview({\n content,\n className,\n expanded = false,\n markdownPatterns,\n}: ContentPreviewProps): ReactElement {\n const options: InspectableContentOptions = { markdownPatterns };\n const prepared = prepareInspectableContent(content, options);\n const cls = [\n 'aegis-content-preview',\n `aegis-content-preview--${prepared.kind}`,\n expanded ? 'aegis-content-preview--expanded' : '',\n className ?? '',\n ]\n .filter(Boolean)\n .join(' ');\n\n if (prepared.kind === 'json') {\n return (\n <div className={cls}>\n <JsonCompactPreview\n value={prepared.value}\n expanded={expanded}\n options={options}\n />\n </div>\n );\n }\n if (prepared.kind === 'markdown') {\n return (\n <div className={cls}>\n <Markdown className=\"aegis-content-preview__markdown\">\n {prepared.text}\n </Markdown>\n </div>\n );\n }\n if (prepared.kind === 'text') {\n return (\n <div className={cls}>\n <StringValuePreview\n value={prepared.text}\n expanded={expanded}\n options={options}\n />\n </div>\n );\n }\n return (\n <div className={cls}>\n <CodeBlock\n className=\"aegis-content-preview__code\"\n code={prepared.text}\n language={codeLanguage(prepared.kind)}\n showLineNumbers={expanded}\n />\n </div>\n );\n}\n"],"names":["stringifyJson","value","StringValuePreview","expanded","options","prepared","prepareInspectableContent","jsx","JsonCompactPreview","Markdown","CodeBlock","JsonContentSectionPreview","section","strings","useStrings","jsxs","sections","collectContentSections","ContentPreview","content","className","markdownPatterns","cls","codeLanguage"],"mappings":";;;;;;AAsBA,SAASA,EAAcC,GAAwB;AAC7C,MAAI;AACF,WAAO,KAAK,UAAUA,GAAO,MAAM,CAAC;AAAA,EACtC,QAAQ;AACN,WAAO,OAAOA,CAAK;AAAA,EACrB;AACF;AAOA,SAASC,EAAmB;AAAA,EAC1B,OAAAD;AAAA,EACA,UAAAE;AAAA,EACA,SAAAC;AACF,GAAgD;AAC9C,QAAMC,IAAWC;AAAA,IACf,EAAmB,OAAAL,EAAA;AAAA,IACnBG;AAAA,EAAA;AAGF,SAAIC,EAAS,SAAS,UAAUA,EAAS,UAAUJ,IAE/C,gBAAAM;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOH,EAAS;AAAA,MAChB,UAAAF;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA,IAIFC,EAAS,SAAS,aAElB,gBAAAE,EAACE,GAAA,EAAS,WAAU,gCACjB,YAAS,MACZ,IAGAJ,EAAS,SAAS,QAElB,gBAAAE;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAML,EAAS;AAAA,MACf,UAAS;AAAA,MACT,iBAAiBF;AAAA,IAAA;AAAA,EAAA,IAIhB,gBAAAI,EAAC,KAAA,EAAE,WAAU,4BAA4B,YAAS,MAAK;AAChE;AAEA,SAASI,EAA0B;AAAA,EACjC,SAAAC;AAAA,EACA,UAAAT;AAAA,EACA,SAAAC;AACF,GAA0D;AACxD,QAAMS,IAAUC,EAAA;AAChB,SACE,gBAAAC,EAAC,WAAA,EAAQ,WAAU,+BACjB,UAAA;AAAA,IAAA,gBAAAA,EAAC,OAAA,EAAI,WAAU,oCACb,UAAA;AAAA,MAAA,gBAAAR,EAAC,UAAK,WAAU,4BAA4B,UAAAK,EAAQ,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AMjB,IAAqC,EAAE,kBAAAiB,EAAA,GACvChB,IAAWC,EAA0Ba,GAASf,CAAO,GACrDkB,IAAM;AAAA,IACV;AAAA,IACA,0BAA0BjB,EAAS,IAAI;AAAA,IACvCF,IAAW,oCAAoC;AAAA,IAC/CiB,KAAa;AAAA,EAAA,EAEZ,OAAO,OAAO,EACd,KAAK,GAAG;AAEX,SAAIf,EAAS,SAAS,SAElB,gBAAAE,EAAC,OAAA,EAAI,WAAWe,GACd,UAAA,gBAAAf;AAAA,IAACC;AAAA,IAAA;AAAA,MACC,OAAOH,EAAS;AAAA,MAChB,UAAAF;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA,GAEJ,IAGAC,EAAS,SAAS,aAElB,gBAAAE,EAAC,OAAA,EAAI,WAAWe,GACd,UAAA,gBAAAf,EAACE,KAAS,WAAU,mCACjB,UAAAJ,EAAS,KAAA,CACZ,GACF,IAGAA,EAAS,SAAS,SAElB,gBAAAE,EAAC,OAAA,EAAI,WAAWe,GACd,UAAA,gBAAAf;AAAA,IAACL;AAAA,IAAA;AAAA,MACC,OAAOG,EAAS;AAAA,MAChB,UAAAF;AAAA,MACA,SAAAC;AAAA,IAAA;AAAA,EAAA,GAEJ,IAIF,gBAAAG,EAAC,OAAA,EAAI,WAAWe,GACd,UAAA,gBAAAf;AAAA,IAACG;AAAA,IAAA;AAAA,MACC,WAAU;AAAA,MACV,MAAML,EAAS;AAAA,MACf,UAAUkB,EAAalB,EAAS,IAAI;AAAA,MACpC,iBAAiBF;AAAA,IAAA;AAAA,EAAA,GAErB;AAEJ;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */const
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("react/jsx-runtime");;/* empty css */const o=require("./MetricLabel.cjs"),l=require("./PanelTitle.cjs"),c=require("../../locale/useStrings.cjs");function g({title:n,description:s,children:r,className:i}){const a=c.useStrings(),t=["aegis-danger-zone",i??""].filter(Boolean).join(" ");return e.jsxs("section",{className:t,children:[e.jsxs("div",{className:"aegis-danger-zone__header",children:[e.jsx(l.PanelTitle,{size:"base",as:"h3",className:"aegis-danger-zone__title",children:n??a.dangerZone}),s&&e.jsx(o.MetricLabel,{children:s})]}),e.jsx("div",{className:"aegis-danger-zone__body",children:r})]})}exports.DangerZone=g;
|
|
2
2
|
//# sourceMappingURL=DangerZone.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DangerZone.cjs","sources":["../../../src/components/ui/DangerZone.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './DangerZone.css';\nimport { MetricLabel } from './MetricLabel';\nimport { PanelTitle } from './PanelTitle';\n\ninterface DangerZoneProps {\n title?: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport function DangerZone({\n title
|
|
1
|
+
{"version":3,"file":"DangerZone.cjs","sources":["../../../src/components/ui/DangerZone.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './DangerZone.css';\nimport { MetricLabel } from './MetricLabel';\nimport { PanelTitle } from './PanelTitle';\n\ninterface DangerZoneProps {\n title?: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport function DangerZone({\n title,\n description,\n children,\n className,\n}: DangerZoneProps) {\n const strings = useStrings();\n const cls = ['aegis-danger-zone', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <section className={cls}>\n <div className=\"aegis-danger-zone__header\">\n <PanelTitle size=\"base\" as=\"h3\" className=\"aegis-danger-zone__title\">\n {title ?? strings.dangerZone}\n </PanelTitle>\n {description && <MetricLabel>{description}</MetricLabel>}\n </div>\n <div className=\"aegis-danger-zone__body\">{children}</div>\n </section>\n );\n}\n"],"names":["DangerZone","title","description","children","className","strings","useStrings","cls","jsxs","jsx","PanelTitle","MetricLabel"],"mappings":"iQAcO,SAASA,EAAW,CACzB,MAAAC,EACA,YAAAC,EACA,SAAAC,EACA,UAAAC,CACF,EAAoB,CAClB,MAAMC,EAAUC,EAAAA,WAAA,EACVC,EAAM,CAAC,oBAAqBH,GAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG,EAE3E,OACEI,EAAAA,KAAC,UAAA,CAAQ,UAAWD,EAClB,SAAA,CAAAC,EAAAA,KAAC,MAAA,CAAI,UAAU,4BACb,SAAA,CAAAC,EAAAA,IAACC,EAAAA,WAAA,CAAW,KAAK,OAAO,GAAG,KAAK,UAAU,2BACvC,SAAAT,GAASI,EAAQ,UAAA,CACpB,EACCH,GAAeO,EAAAA,IAACE,EAAAA,YAAA,CAAa,SAAAT,CAAA,CAAY,CAAA,EAC5C,EACAO,EAAAA,IAAC,MAAA,CAAI,UAAU,0BAA2B,SAAAN,CAAA,CAAS,CAAA,EACrD,CAEJ"}
|
|
@@ -2,22 +2,23 @@ import { jsxs as r, jsx as e } from "react/jsx-runtime";
|
|
|
2
2
|
/* empty css */
|
|
3
3
|
import { MetricLabel as l } from "./MetricLabel.js";
|
|
4
4
|
import { PanelTitle as c } from "./PanelTitle.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
import { useStrings as m } from "../../locale/useStrings.js";
|
|
6
|
+
function p({
|
|
7
|
+
title: s,
|
|
7
8
|
description: n,
|
|
8
|
-
children:
|
|
9
|
+
children: a,
|
|
9
10
|
className: i
|
|
10
11
|
}) {
|
|
11
|
-
const
|
|
12
|
-
return /* @__PURE__ */ r("section", { className:
|
|
12
|
+
const o = m(), t = ["aegis-danger-zone", i ?? ""].filter(Boolean).join(" ");
|
|
13
|
+
return /* @__PURE__ */ r("section", { className: t, children: [
|
|
13
14
|
/* @__PURE__ */ r("div", { className: "aegis-danger-zone__header", children: [
|
|
14
|
-
/* @__PURE__ */ e(c, { size: "base", as: "h3", children:
|
|
15
|
+
/* @__PURE__ */ e(c, { size: "base", as: "h3", className: "aegis-danger-zone__title", children: s ?? o.dangerZone }),
|
|
15
16
|
n && /* @__PURE__ */ e(l, { children: n })
|
|
16
17
|
] }),
|
|
17
|
-
/* @__PURE__ */ e("div", { className: "aegis-danger-zone__body", children:
|
|
18
|
+
/* @__PURE__ */ e("div", { className: "aegis-danger-zone__body", children: a })
|
|
18
19
|
] });
|
|
19
20
|
}
|
|
20
21
|
export {
|
|
21
|
-
|
|
22
|
+
p as DangerZone
|
|
22
23
|
};
|
|
23
24
|
//# sourceMappingURL=DangerZone.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DangerZone.js","sources":["../../../src/components/ui/DangerZone.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport './DangerZone.css';\nimport { MetricLabel } from './MetricLabel';\nimport { PanelTitle } from './PanelTitle';\n\ninterface DangerZoneProps {\n title?: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport function DangerZone({\n title
|
|
1
|
+
{"version":3,"file":"DangerZone.js","sources":["../../../src/components/ui/DangerZone.tsx"],"sourcesContent":["import type { ReactNode } from 'react';\n\nimport { useStrings } from '../../locale';\nimport './DangerZone.css';\nimport { MetricLabel } from './MetricLabel';\nimport { PanelTitle } from './PanelTitle';\n\ninterface DangerZoneProps {\n title?: string;\n description?: string;\n children: ReactNode;\n className?: string;\n}\n\nexport function DangerZone({\n title,\n description,\n children,\n className,\n}: DangerZoneProps) {\n const strings = useStrings();\n const cls = ['aegis-danger-zone', className ?? ''].filter(Boolean).join(' ');\n\n return (\n <section className={cls}>\n <div className=\"aegis-danger-zone__header\">\n <PanelTitle size=\"base\" as=\"h3\" className=\"aegis-danger-zone__title\">\n {title ?? strings.dangerZone}\n </PanelTitle>\n {description && <MetricLabel>{description}</MetricLabel>}\n </div>\n <div className=\"aegis-danger-zone__body\">{children}</div>\n </section>\n );\n}\n"],"names":["DangerZone","title","description","children","className","strings","useStrings","cls","jsxs","jsx","PanelTitle","MetricLabel"],"mappings":";;;;;AAcO,SAASA,EAAW;AAAA,EACzB,OAAAC;AAAA,EACA,aAAAC;AAAA,EACA,UAAAC;AAAA,EACA,WAAAC;AACF,GAAoB;AAClB,QAAMC,IAAUC,EAAA,GACVC,IAAM,CAAC,qBAAqBH,KAAa,EAAE,EAAE,OAAO,OAAO,EAAE,KAAK,GAAG;AAE3E,SACE,gBAAAI,EAAC,WAAA,EAAQ,WAAWD,GAClB,UAAA;AAAA,IAAA,gBAAAC,EAAC,OAAA,EAAI,WAAU,6BACb,UAAA;AAAA,MAAA,gBAAAC,EAACC,GAAA,EAAW,MAAK,QAAO,IAAG,MAAK,WAAU,4BACvC,UAAAT,KAASI,EAAQ,WAAA,CACpB;AAAA,MACCH,KAAe,gBAAAO,EAACE,GAAA,EAAa,UAAAT,EAAA,CAAY;AAAA,IAAA,GAC5C;AAAA,IACA,gBAAAO,EAAC,OAAA,EAAI,WAAU,2BAA2B,UAAAN,EAAA,CAAS;AAAA,EAAA,GACrD;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 s=require("react/jsx-runtime"),o=require("react"),b=require("../../agent/core/usePrimitiveSurface.cjs");;/* empty css */const q=require("../../locale/useStrings.cjs");function w({items:t,columns:d,selectedId:n,onSelect:l,surface:j,emptyText:p,className:m}){const k=q.useStrings(),u=o.useRef(null),c=o.useRef(new Map),[g,x]=o.useState(),v=b.usePrimitiveSurface(j,t,"list",u),D=["aegis-data-list",m??""].filter(Boolean).join(" "),f=l?"gridcell":"cell",h=e=>t.some(r=>r.id===e),N=h(g)?g:h(n)?n:t.length>0?t[0].id:void 0,R=(e,r)=>{if(e.target!==e.currentTarget)return;if(e.key==="Enter"||e.key===" "){e.preventDefault(),l?.(t[r].id);return}let a;e.key==="ArrowDown"?a=Math.min(r+1,t.length-1):e.key==="ArrowUp"?a=Math.max(r-1,0):e.key==="Home"?a=0:e.key==="End"&&(a=t.length-1),a!==void 0&&(e.preventDefault(),c.current.get(t[a].id)?.focus())};return s.jsxs("div",{ref:u,className:D,role:l?"grid":"table",style:{"--aegis-data-list-columns":d.length},...v,children:[s.jsx("div",{className:"aegis-data-list__head",role:"row",children:d.map(e=>s.jsx("div",{className:"aegis-data-list__head-cell",role:"columnheader",children:e.header},e.key))}),t.length===0?s.jsx("div",{className:"aegis-data-list__empty",role:"row",children:s.jsx("div",{role:f,"aria-colspan":d.length,children:p??k.noItems})}):t.map((e,r)=>{const a=n===e.id,y=["aegis-data-list__row",a?"aegis-data-list__row--selected":"",l?"aegis-data-list__row--interactive":""].filter(Boolean).join(" "),_=d.map(i=>s.jsx("div",{className:"aegis-data-list__cell",role:f,children:i.render?i.render(e):String(e[i.key]??"")},i.key));return l?s.jsx("div",{ref:i=>{i?c.current.set(e.id,i):c.current.delete(e.id)},className:y,role:"row",tabIndex:e.id===N?0:-1,"aria-selected":a,"data-agent-entity-id":e.id,onClick:()=>{l(e.id)},onFocus:()=>{x(e.id)},onKeyDown:i=>{R(i,r)},children:_},e.id):s.jsx("div",{className:y,role:"row","data-agent-entity-id":e.id,children:_},e.id)})]})}exports.DataList=w;
|
|
2
2
|
//# sourceMappingURL=DataList.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"DataList.cjs","sources":["../../../src/components/ui/DataList.tsx"],"sourcesContent":["import { type KeyboardEvent
|
|
1
|
+
{"version":3,"file":"DataList.cjs","sources":["../../../src/components/ui/DataList.tsx"],"sourcesContent":["import {\n type CSSProperties,\n type KeyboardEvent,\n type ReactNode,\n useRef,\n useState,\n} from 'react';\n\nimport {\n type PrimitiveSurface,\n usePrimitiveSurface,\n} from '../../agent/core/usePrimitiveSurface';\nimport { useStrings } from '../../locale';\nimport './DataList.css';\n\nexport interface DataListColumn<T> {\n key: string;\n header: ReactNode;\n /** Defaults to the row's `key` field as text. */\n render?: (row: T) => ReactNode;\n}\n\nexport interface DataListItem {\n id: string;\n}\n\nexport type DataListSurface<T> = PrimitiveSurface<T[]>;\n\ninterface DataListProps<T extends DataListItem> {\n items: T[];\n columns: Array<DataListColumn<T>>;\n selectedId?: string;\n /**\n * Makes rows selectable: one tab stop (the selected row, else the first),\n * ↑ ↓ Home End between rows, a muted hover background, and Enter or\n * Space on a focused row. Without it rows are plain.\n */\n onSelect?: (id: string) => void;\n surface?: DataListSurface<T>;\n emptyText?: string;\n className?: string;\n}\n\nexport function DataList<T extends DataListItem>({\n items,\n columns,\n selectedId,\n onSelect,\n surface,\n emptyText,\n className,\n}: DataListProps<T>) {\n const strings = useStrings();\n const wrapRef = useRef<HTMLDivElement>(null);\n const rowRefs = useRef(new Map<string, HTMLDivElement>());\n const [focusedId, setFocusedId] = useState<string>();\n\n // Hook called unconditionally; `enabled: false` skips registration.\n const agentAttrs = usePrimitiveSurface(surface, items, 'list', wrapRef);\n\n const cls = ['aegis-data-list', className ?? ''].filter(Boolean).join(' ');\n const cellRole = onSelect ? 'gridcell' : 'cell';\n\n const hasItem = (id: string | undefined): boolean =>\n items.some((item) => item.id === id);\n const tabStopId = hasItem(focusedId)\n ? focusedId\n : hasItem(selectedId)\n ? selectedId\n : items.length > 0\n ? items[0].id\n : undefined;\n\n const handleKeyDown = (\n event: KeyboardEvent<HTMLDivElement>,\n index: number,\n ): void => {\n if (event.target !== event.currentTarget) {\n return;\n }\n if (event.key === 'Enter' || event.key === ' ') {\n event.preventDefault();\n onSelect?.(items[index].id);\n return;\n }\n let next: number | undefined;\n if (event.key === 'ArrowDown') {\n next = Math.min(index + 1, items.length - 1);\n } else if (event.key === 'ArrowUp') {\n next = Math.max(index - 1, 0);\n } else if (event.key === 'Home') {\n next = 0;\n } else if (event.key === 'End') {\n next = items.length - 1;\n }\n if (next !== undefined) {\n event.preventDefault();\n rowRefs.current.get(items[next].id)?.focus();\n }\n };\n\n return (\n <div\n ref={wrapRef}\n className={cls}\n role={onSelect ? 'grid' : 'table'}\n style={{ '--aegis-data-list-columns': columns.length } as CSSProperties}\n {...agentAttrs}\n >\n <div className=\"aegis-data-list__head\" role=\"row\">\n {columns.map((col) => (\n <div\n key={col.key}\n className=\"aegis-data-list__head-cell\"\n role=\"columnheader\"\n >\n {col.header}\n </div>\n ))}\n </div>\n {items.length === 0 ? (\n <div className=\"aegis-data-list__empty\" role=\"row\">\n <div role={cellRole} aria-colspan={columns.length}>\n {emptyText ?? strings.noItems}\n </div>\n </div>\n ) : (\n items.map((row, index) => {\n const isSelected = selectedId === row.id;\n const rowCls = [\n 'aegis-data-list__row',\n isSelected ? 'aegis-data-list__row--selected' : '',\n onSelect ? 'aegis-data-list__row--interactive' : '',\n ]\n .filter(Boolean)\n .join(' ');\n const cells = columns.map((col) => (\n <div\n key={col.key}\n className=\"aegis-data-list__cell\"\n role={cellRole}\n >\n {col.render\n ? col.render(row)\n : String((row as Record<string, unknown>)[col.key] ?? '')}\n </div>\n ));\n return onSelect ? (\n <div\n key={row.id}\n ref={(el) => {\n if (el) {\n rowRefs.current.set(row.id, el);\n } else {\n rowRefs.current.delete(row.id);\n }\n }}\n className={rowCls}\n role=\"row\"\n tabIndex={row.id === tabStopId ? 0 : -1}\n aria-selected={isSelected}\n data-agent-entity-id={row.id}\n onClick={() => {\n onSelect(row.id);\n }}\n onFocus={() => {\n setFocusedId(row.id);\n }}\n onKeyDown={(event) => {\n handleKeyDown(event, index);\n }}\n >\n {cells}\n </div>\n ) : (\n <div\n key={row.id}\n className={rowCls}\n role=\"row\"\n data-agent-entity-id={row.id}\n >\n {cells}\n </div>\n );\n })\n )}\n </div>\n );\n}\n"],"names":["DataList","items","columns","selectedId","onSelect","surface","emptyText","className","strings","useStrings","wrapRef","useRef","rowRefs","focusedId","setFocusedId","useState","agentAttrs","usePrimitiveSurface","cls","cellRole","hasItem","id","item","tabStopId","handleKeyDown","event","index","next","jsxs","jsx","col","row","isSelected","rowCls","cells","el"],"mappings":"2QA2CO,SAASA,EAAiC,CAC/C,MAAAC,EACA,QAA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AAI,EAAA,EA0BXF,EAAAA,IAAC,MAAA,CAEC,UAAWI,EACX,KAAK,MACL,uBAAsBF,EAAI,GAEzB,SAAAG,CAAA,EALIH,EAAI,EAAA,CAQf,CAAC,CAAA,CAAA,CAAA,CAIT"}
|
|
@@ -1,35 +1,37 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { useRef as
|
|
1
|
+
import { jsxs as I, jsx as s } from "react/jsx-runtime";
|
|
2
|
+
import { useRef as p, useState as R } from "react";
|
|
3
3
|
import { usePrimitiveSurface as b } from "../../agent/core/usePrimitiveSurface.js";
|
|
4
4
|
/* empty css */
|
|
5
|
-
|
|
5
|
+
import { useStrings as A } from "../../locale/useStrings.js";
|
|
6
|
+
function K({
|
|
6
7
|
items: a,
|
|
7
8
|
columns: d,
|
|
8
9
|
selectedId: n,
|
|
9
|
-
onSelect:
|
|
10
|
+
onSelect: l,
|
|
10
11
|
surface: y,
|
|
11
|
-
emptyText: _
|
|
12
|
+
emptyText: _,
|
|
12
13
|
className: k
|
|
13
14
|
}) {
|
|
14
|
-
const c =
|
|
15
|
+
const N = A(), c = p(null), o = p(/* @__PURE__ */ new Map()), [g, D] = R(), v = b(y, a, "list", c), w = ["aegis-data-list", k ?? ""].filter(Boolean).join(" "), f = l ? "gridcell" : "cell", h = (e) => a.some((r) => r.id === e), j = h(g) ? g : h(n) ? n : a.length > 0 ? a[0].id : void 0, x = (e, r) => {
|
|
15
16
|
if (e.target !== e.currentTarget)
|
|
16
17
|
return;
|
|
17
18
|
if (e.key === "Enter" || e.key === " ") {
|
|
18
|
-
e.preventDefault(),
|
|
19
|
+
e.preventDefault(), l?.(a[r].id);
|
|
19
20
|
return;
|
|
20
21
|
}
|
|
21
22
|
let i;
|
|
22
23
|
e.key === "ArrowDown" ? i = Math.min(r + 1, a.length - 1) : e.key === "ArrowUp" ? i = Math.max(r - 1, 0) : e.key === "Home" ? i = 0 : e.key === "End" && (i = a.length - 1), i !== void 0 && (e.preventDefault(), o.current.get(a[i].id)?.focus());
|
|
23
24
|
};
|
|
24
|
-
return /* @__PURE__ */
|
|
25
|
+
return /* @__PURE__ */ I(
|
|
25
26
|
"div",
|
|
26
27
|
{
|
|
27
28
|
ref: c,
|
|
28
|
-
className:
|
|
29
|
-
role:
|
|
30
|
-
|
|
29
|
+
className: w,
|
|
30
|
+
role: l ? "grid" : "table",
|
|
31
|
+
style: { "--aegis-data-list-columns": d.length },
|
|
32
|
+
...v,
|
|
31
33
|
children: [
|
|
32
|
-
/* @__PURE__ */
|
|
34
|
+
/* @__PURE__ */ s("div", { className: "aegis-data-list__head", role: "row", children: d.map((e) => /* @__PURE__ */ s(
|
|
33
35
|
"div",
|
|
34
36
|
{
|
|
35
37
|
className: "aegis-data-list__head-cell",
|
|
@@ -38,21 +40,21 @@ function C({
|
|
|
38
40
|
},
|
|
39
41
|
e.key
|
|
40
42
|
)) }),
|
|
41
|
-
a.length === 0 ? /* @__PURE__ */
|
|
43
|
+
a.length === 0 ? /* @__PURE__ */ s("div", { className: "aegis-data-list__empty", role: "row", children: /* @__PURE__ */ s("div", { role: f, "aria-colspan": d.length, children: _ ?? N.noItems }) }) : a.map((e, r) => {
|
|
42
44
|
const i = n === e.id, u = [
|
|
43
45
|
"aegis-data-list__row",
|
|
44
46
|
i ? "aegis-data-list__row--selected" : "",
|
|
45
|
-
|
|
46
|
-
].filter(Boolean).join(" "),
|
|
47
|
+
l ? "aegis-data-list__row--interactive" : ""
|
|
48
|
+
].filter(Boolean).join(" "), m = d.map((t) => /* @__PURE__ */ s(
|
|
47
49
|
"div",
|
|
48
50
|
{
|
|
49
51
|
className: "aegis-data-list__cell",
|
|
50
|
-
role:
|
|
52
|
+
role: f,
|
|
51
53
|
children: t.render ? t.render(e) : String(e[t.key] ?? "")
|
|
52
54
|
},
|
|
53
55
|
t.key
|
|
54
56
|
));
|
|
55
|
-
return
|
|
57
|
+
return l ? /* @__PURE__ */ s(
|
|
56
58
|
"div",
|
|
57
59
|
{
|
|
58
60
|
ref: (t) => {
|
|
@@ -60,28 +62,28 @@ function C({
|
|
|
60
62
|
},
|
|
61
63
|
className: u,
|
|
62
64
|
role: "row",
|
|
63
|
-
tabIndex: e.id ===
|
|
65
|
+
tabIndex: e.id === j ? 0 : -1,
|
|
64
66
|
"aria-selected": i,
|
|
65
67
|
"data-agent-entity-id": e.id,
|
|
66
68
|
onClick: () => {
|
|
67
|
-
|
|
69
|
+
l(e.id);
|
|
68
70
|
},
|
|
69
71
|
onFocus: () => {
|
|
70
|
-
|
|
72
|
+
D(e.id);
|
|
71
73
|
},
|
|
72
74
|
onKeyDown: (t) => {
|
|
73
|
-
|
|
75
|
+
x(t, r);
|
|
74
76
|
},
|
|
75
|
-
children:
|
|
77
|
+
children: m
|
|
76
78
|
},
|
|
77
79
|
e.id
|
|
78
|
-
) : /* @__PURE__ */
|
|
80
|
+
) : /* @__PURE__ */ s(
|
|
79
81
|
"div",
|
|
80
82
|
{
|
|
81
83
|
className: u,
|
|
82
84
|
role: "row",
|
|
83
85
|
"data-agent-entity-id": e.id,
|
|
84
|
-
children:
|
|
86
|
+
children: m
|
|
85
87
|
},
|
|
86
88
|
e.id
|
|
87
89
|
);
|
|
@@ -91,6 +93,6 @@ function C({
|
|
|
91
93
|
);
|
|
92
94
|
}
|
|
93
95
|
export {
|
|
94
|
-
|
|
96
|
+
K as DataList
|
|
95
97
|
};
|
|
96
98
|
//# sourceMappingURL=DataList.js.map
|