@stigmer/react 0.4.8 → 0.5.1
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/action-menu/ActionMenu.d.ts +64 -0
- package/action-menu/ActionMenu.d.ts.map +1 -0
- package/action-menu/ActionMenu.js +78 -0
- package/action-menu/ActionMenu.js.map +1 -0
- package/action-menu/index.d.ts +3 -0
- package/action-menu/index.d.ts.map +1 -0
- package/action-menu/index.js +2 -0
- package/action-menu/index.js.map +1 -0
- package/action-menu/types.d.ts +65 -0
- package/action-menu/types.d.ts.map +1 -0
- package/action-menu/types.js +2 -0
- package/action-menu/types.js.map +1 -0
- package/agent/AgentCreationWizard.d.ts +55 -0
- package/agent/AgentCreationWizard.d.ts.map +1 -0
- package/agent/AgentCreationWizard.js +115 -0
- package/agent/AgentCreationWizard.js.map +1 -0
- package/agent/AgentDetailView.d.ts +77 -9
- package/agent/AgentDetailView.d.ts.map +1 -1
- package/agent/AgentDetailView.js +265 -87
- package/agent/AgentDetailView.js.map +1 -1
- package/agent/index.d.ts +8 -0
- package/agent/index.d.ts.map +1 -1
- package/agent/index.js +4 -0
- package/agent/index.js.map +1 -1
- package/agent/internal/agentToInput.d.ts +12 -0
- package/agent/internal/agentToInput.d.ts.map +1 -0
- package/agent/internal/agentToInput.js +72 -0
- package/agent/internal/agentToInput.js.map +1 -0
- package/agent/steps/CapabilitiesStep.d.ts +16 -0
- package/agent/steps/CapabilitiesStep.d.ts.map +1 -0
- package/agent/steps/CapabilitiesStep.js +80 -0
- package/agent/steps/CapabilitiesStep.js.map +1 -0
- package/agent/steps/IdentityStep.d.ts +18 -0
- package/agent/steps/IdentityStep.d.ts.map +1 -0
- package/agent/steps/IdentityStep.js +43 -0
- package/agent/steps/IdentityStep.js.map +1 -0
- package/agent/steps/ReviewStep.d.ts +23 -0
- package/agent/steps/ReviewStep.d.ts.map +1 -0
- package/agent/steps/ReviewStep.js +73 -0
- package/agent/steps/ReviewStep.js.map +1 -0
- package/agent/steps/types.d.ts +35 -0
- package/agent/steps/types.d.ts.map +1 -0
- package/agent/steps/types.js +16 -0
- package/agent/steps/types.js.map +1 -0
- package/agent/useCreateAgent.d.ts +45 -0
- package/agent/useCreateAgent.d.ts.map +1 -0
- package/agent/useCreateAgent.js +50 -0
- package/agent/useCreateAgent.js.map +1 -0
- package/agent/useUpdateAgent.d.ts +24 -0
- package/agent/useUpdateAgent.d.ts.map +1 -0
- package/agent/useUpdateAgent.js +35 -0
- package/agent/useUpdateAgent.js.map +1 -0
- package/composer/ContextChip.d.ts +7 -2
- package/composer/ContextChip.d.ts.map +1 -1
- package/composer/ContextChip.js +2 -1
- package/composer/ContextChip.js.map +1 -1
- package/composer/SessionComposer.d.ts +11 -0
- package/composer/SessionComposer.d.ts.map +1 -1
- package/composer/SessionComposer.js +33 -4
- package/composer/SessionComposer.js.map +1 -1
- package/dependency-graph/DependencyGraph.d.ts +37 -0
- package/dependency-graph/DependencyGraph.d.ts.map +1 -0
- package/dependency-graph/DependencyGraph.js +88 -0
- package/dependency-graph/DependencyGraph.js.map +1 -0
- package/dependency-graph/DependencyTreeNode.d.ts +23 -0
- package/dependency-graph/DependencyTreeNode.d.ts.map +1 -0
- package/dependency-graph/DependencyTreeNode.js +99 -0
- package/dependency-graph/DependencyTreeNode.js.map +1 -0
- package/dependency-graph/index.d.ts +4 -0
- package/dependency-graph/index.d.ts.map +1 -0
- package/dependency-graph/index.js +5 -0
- package/dependency-graph/index.js.map +1 -0
- package/dependency-graph/types.d.ts +130 -0
- package/dependency-graph/types.d.ts.map +1 -0
- package/dependency-graph/types.js +2 -0
- package/dependency-graph/types.js.map +1 -0
- package/dependency-graph/useDependencyGraph.d.ts +27 -0
- package/dependency-graph/useDependencyGraph.d.ts.map +1 -0
- package/dependency-graph/useDependencyGraph.js +129 -0
- package/dependency-graph/useDependencyGraph.js.map +1 -0
- package/empty-state/EmptyState.d.ts +29 -0
- package/empty-state/EmptyState.d.ts.map +1 -0
- package/empty-state/EmptyState.js +45 -0
- package/empty-state/EmptyState.js.map +1 -0
- package/empty-state/index.d.ts +4 -0
- package/empty-state/index.d.ts.map +1 -0
- package/empty-state/index.js +3 -0
- package/empty-state/index.js.map +1 -0
- package/empty-state/types.d.ts +73 -0
- package/empty-state/types.d.ts.map +1 -0
- package/empty-state/types.js +2 -0
- package/empty-state/types.js.map +1 -0
- package/empty-state/useEmptyState.d.ts +18 -0
- package/empty-state/useEmptyState.d.ts.map +1 -0
- package/empty-state/useEmptyState.js +72 -0
- package/empty-state/useEmptyState.js.map +1 -0
- package/environment/usePersonalEnvironment.d.ts.map +1 -1
- package/environment/usePersonalEnvironment.js +1 -0
- package/environment/usePersonalEnvironment.js.map +1 -1
- package/feedback/StigmerToaster.d.ts +18 -0
- package/feedback/StigmerToaster.d.ts.map +1 -0
- package/feedback/StigmerToaster.js +31 -0
- package/feedback/StigmerToaster.js.map +1 -0
- package/feedback/index.d.ts +4 -0
- package/feedback/index.d.ts.map +1 -0
- package/feedback/index.js +3 -0
- package/feedback/index.js.map +1 -0
- package/feedback/toast.d.ts +14 -0
- package/feedback/toast.d.ts.map +1 -0
- package/feedback/toast.js +14 -0
- package/feedback/toast.js.map +1 -0
- package/feedback/types.d.ts +4 -0
- package/feedback/types.d.ts.map +1 -0
- package/feedback/types.js +2 -0
- package/feedback/types.js.map +1 -0
- package/index.d.ts +32 -12
- package/index.d.ts.map +1 -1
- package/index.js +30 -10
- package/index.js.map +1 -1
- package/inline-edit/InlineEditImage.d.ts +20 -0
- package/inline-edit/InlineEditImage.d.ts.map +1 -0
- package/inline-edit/InlineEditImage.js +85 -0
- package/inline-edit/InlineEditImage.js.map +1 -0
- package/inline-edit/InlineEditKeyValue.d.ts +33 -0
- package/inline-edit/InlineEditKeyValue.d.ts.map +1 -0
- package/inline-edit/InlineEditKeyValue.js +67 -0
- package/inline-edit/InlineEditKeyValue.js.map +1 -0
- package/inline-edit/InlineEditResourceList.d.ts +34 -0
- package/inline-edit/InlineEditResourceList.d.ts.map +1 -0
- package/inline-edit/InlineEditResourceList.js +99 -0
- package/inline-edit/InlineEditResourceList.js.map +1 -0
- package/inline-edit/InlineEditSelect.d.ts +18 -0
- package/inline-edit/InlineEditSelect.d.ts.map +1 -0
- package/inline-edit/InlineEditSelect.js +54 -0
- package/inline-edit/InlineEditSelect.js.map +1 -0
- package/inline-edit/InlineEditText.d.ts +23 -0
- package/inline-edit/InlineEditText.d.ts.map +1 -0
- package/inline-edit/InlineEditText.js +79 -0
- package/inline-edit/InlineEditText.js.map +1 -0
- package/inline-edit/InlineEditTextarea.d.ts +22 -0
- package/inline-edit/InlineEditTextarea.d.ts.map +1 -0
- package/inline-edit/InlineEditTextarea.js +83 -0
- package/inline-edit/InlineEditTextarea.js.map +1 -0
- package/inline-edit/index.d.ts +16 -0
- package/inline-edit/index.d.ts.map +1 -0
- package/inline-edit/index.js +8 -0
- package/inline-edit/index.js.map +1 -0
- package/inline-edit/types.d.ts +42 -0
- package/inline-edit/types.d.ts.map +1 -0
- package/inline-edit/types.js +2 -0
- package/inline-edit/types.js.map +1 -0
- package/inline-edit/useInlineFieldSave.d.ts +23 -0
- package/inline-edit/useInlineFieldSave.d.ts.map +1 -0
- package/inline-edit/useInlineFieldSave.js +44 -0
- package/inline-edit/useInlineFieldSave.js.map +1 -0
- package/internal/Tabs.d.ts +4 -38
- package/internal/Tabs.d.ts.map +1 -1
- package/internal/Tabs.js +3 -62
- package/internal/Tabs.js.map +1 -1
- package/internal/useFetch.js +2 -2
- package/internal/useFetch.js.map +1 -1
- package/library/ImportResourceDialog.d.ts +43 -0
- package/library/ImportResourceDialog.d.ts.map +1 -0
- package/library/ImportResourceDialog.js +90 -0
- package/library/ImportResourceDialog.js.map +1 -0
- package/library/index.d.ts +7 -4
- package/library/index.d.ts.map +1 -1
- package/library/index.js +4 -2
- package/library/index.js.map +1 -1
- package/library/serialize-resource-yaml.d.ts +53 -0
- package/library/serialize-resource-yaml.d.ts.map +1 -1
- package/library/serialize-resource-yaml.js +275 -0
- package/library/serialize-resource-yaml.js.map +1 -1
- package/library/useExportResource.d.ts +56 -0
- package/library/useExportResource.d.ts.map +1 -0
- package/library/useExportResource.js +137 -0
- package/library/useExportResource.js.map +1 -0
- package/library/useImportResource.d.ts +84 -0
- package/library/useImportResource.d.ts.map +1 -0
- package/library/useImportResource.js +188 -0
- package/library/useImportResource.js.map +1 -0
- package/mcp-server/McpServerCreationWizard.d.ts +55 -0
- package/mcp-server/McpServerCreationWizard.d.ts.map +1 -0
- package/mcp-server/McpServerCreationWizard.js +121 -0
- package/mcp-server/McpServerCreationWizard.js.map +1 -0
- package/mcp-server/McpServerDetailView.d.ts +21 -1
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js +235 -43
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/index.d.ts +8 -0
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js +4 -0
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/internal/mcpServerToInput.d.ts +12 -0
- package/mcp-server/internal/mcpServerToInput.d.ts.map +1 -0
- package/mcp-server/internal/mcpServerToInput.js +81 -0
- package/mcp-server/internal/mcpServerToInput.js.map +1 -0
- package/mcp-server/steps/EnvironmentAuthStep.d.ts +15 -0
- package/mcp-server/steps/EnvironmentAuthStep.d.ts.map +1 -0
- package/mcp-server/steps/EnvironmentAuthStep.js +55 -0
- package/mcp-server/steps/EnvironmentAuthStep.js.map +1 -0
- package/mcp-server/steps/IdentityTransportStep.d.ts +19 -0
- package/mcp-server/steps/IdentityTransportStep.d.ts.map +1 -0
- package/mcp-server/steps/IdentityTransportStep.js +73 -0
- package/mcp-server/steps/IdentityTransportStep.js.map +1 -0
- package/mcp-server/steps/ReviewStep.d.ts +23 -0
- package/mcp-server/steps/ReviewStep.d.ts.map +1 -0
- package/mcp-server/steps/ReviewStep.js +137 -0
- package/mcp-server/steps/ReviewStep.js.map +1 -0
- package/mcp-server/steps/types.d.ts +56 -0
- package/mcp-server/steps/types.d.ts.map +1 -0
- package/mcp-server/steps/types.js +27 -0
- package/mcp-server/steps/types.js.map +1 -0
- package/mcp-server/useCreateMcpServer.d.ts +45 -0
- package/mcp-server/useCreateMcpServer.d.ts.map +1 -0
- package/mcp-server/useCreateMcpServer.js +50 -0
- package/mcp-server/useCreateMcpServer.js.map +1 -0
- package/mcp-server/useUpdateMcpServer.d.ts +24 -0
- package/mcp-server/useUpdateMcpServer.d.ts.map +1 -0
- package/mcp-server/useUpdateMcpServer.js +35 -0
- package/mcp-server/useUpdateMcpServer.js.map +1 -0
- package/models/ModelRegistryContext.d.ts +2 -0
- package/models/ModelRegistryContext.d.ts.map +1 -1
- package/models/ModelRegistryContext.js +1 -0
- package/models/ModelRegistryContext.js.map +1 -1
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +2 -2
- package/models/ModelSelector.js.map +1 -1
- package/models/__tests__/useModelRegistry.test.js +4 -3
- package/models/__tests__/useModelRegistry.test.js.map +1 -1
- package/models/useModelRegistry.d.ts +2 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +3 -2
- package/models/useModelRegistry.js.map +1 -1
- package/package.json +8 -4
- package/provider.d.ts.map +1 -1
- package/provider.js +69 -22
- package/provider.js.map +1 -1
- package/resource-creation/CreationPicker.d.ts +60 -0
- package/resource-creation/CreationPicker.d.ts.map +1 -0
- package/resource-creation/CreationPicker.js +74 -0
- package/resource-creation/CreationPicker.js.map +1 -0
- package/resource-creation/StepIndicator.d.ts +28 -0
- package/resource-creation/StepIndicator.d.ts.map +1 -0
- package/resource-creation/StepIndicator.js +40 -0
- package/resource-creation/StepIndicator.js.map +1 -0
- package/resource-creation/TemplateCard.d.ts +24 -0
- package/resource-creation/TemplateCard.d.ts.map +1 -0
- package/resource-creation/TemplateCard.js +68 -0
- package/resource-creation/TemplateCard.js.map +1 -0
- package/resource-creation/TemplateGallery.d.ts +43 -0
- package/resource-creation/TemplateGallery.d.ts.map +1 -0
- package/resource-creation/TemplateGallery.js +78 -0
- package/resource-creation/TemplateGallery.js.map +1 -0
- package/resource-creation/WizardNav.d.ts +31 -0
- package/resource-creation/WizardNav.d.ts.map +1 -0
- package/resource-creation/WizardNav.js +29 -0
- package/resource-creation/WizardNav.js.map +1 -0
- package/resource-creation/WizardShell.d.ts +41 -0
- package/resource-creation/WizardShell.d.ts.map +1 -0
- package/resource-creation/WizardShell.js +55 -0
- package/resource-creation/WizardShell.js.map +1 -0
- package/resource-creation/index.d.ts +21 -0
- package/resource-creation/index.d.ts.map +1 -0
- package/resource-creation/index.js +14 -0
- package/resource-creation/index.js.map +1 -0
- package/resource-creation/templates/agent-templates.d.ts +15 -0
- package/resource-creation/templates/agent-templates.d.ts.map +1 -0
- package/resource-creation/templates/agent-templates.js +148 -0
- package/resource-creation/templates/agent-templates.js.map +1 -0
- package/resource-creation/templates/index.d.ts +5 -0
- package/resource-creation/templates/index.d.ts.map +1 -0
- package/resource-creation/templates/index.js +5 -0
- package/resource-creation/templates/index.js.map +1 -0
- package/resource-creation/templates/mcp-server-templates.d.ts +15 -0
- package/resource-creation/templates/mcp-server-templates.d.ts.map +1 -0
- package/resource-creation/templates/mcp-server-templates.js +92 -0
- package/resource-creation/templates/mcp-server-templates.js.map +1 -0
- package/resource-creation/templates/types.d.ts +48 -0
- package/resource-creation/templates/types.d.ts.map +1 -0
- package/resource-creation/templates/types.js +16 -0
- package/resource-creation/templates/types.js.map +1 -0
- package/resource-creation/types.d.ts +88 -0
- package/resource-creation/types.d.ts.map +1 -0
- package/resource-creation/types.js +2 -0
- package/resource-creation/types.js.map +1 -0
- package/resource-creation/useTemplateFilter.d.ts +43 -0
- package/resource-creation/useTemplateFilter.d.ts.map +1 -0
- package/resource-creation/useTemplateFilter.js +73 -0
- package/resource-creation/useTemplateFilter.js.map +1 -0
- package/resource-creation/useWizardState.d.ts +67 -0
- package/resource-creation/useWizardState.d.ts.map +1 -0
- package/resource-creation/useWizardState.js +143 -0
- package/resource-creation/useWizardState.js.map +1 -0
- package/resource-detail/ConfirmDialog.d.ts +44 -0
- package/resource-detail/ConfirmDialog.d.ts.map +1 -0
- package/resource-detail/ConfirmDialog.js +62 -0
- package/resource-detail/ConfirmDialog.js.map +1 -0
- package/resource-detail/ResourceActionBar.d.ts +42 -0
- package/resource-detail/ResourceActionBar.d.ts.map +1 -0
- package/resource-detail/ResourceActionBar.js +64 -0
- package/resource-detail/ResourceActionBar.js.map +1 -0
- package/resource-detail/ResourceDetailShell.d.ts +36 -0
- package/resource-detail/ResourceDetailShell.d.ts.map +1 -0
- package/resource-detail/ResourceDetailShell.js +65 -0
- package/resource-detail/ResourceDetailShell.js.map +1 -0
- package/resource-detail/Section.d.ts +18 -0
- package/resource-detail/Section.d.ts.map +1 -0
- package/resource-detail/Section.js +18 -0
- package/resource-detail/Section.js.map +1 -0
- package/resource-detail/index.d.ts +15 -0
- package/resource-detail/index.d.ts.map +1 -0
- package/resource-detail/index.js +10 -0
- package/resource-detail/index.js.map +1 -0
- package/resource-detail/types.d.ts +146 -0
- package/resource-detail/types.d.ts.map +1 -0
- package/resource-detail/types.js +2 -0
- package/resource-detail/types.js.map +1 -0
- package/resource-detail/useConfirmAction.d.ts +41 -0
- package/resource-detail/useConfirmAction.d.ts.map +1 -0
- package/resource-detail/useConfirmAction.js +30 -0
- package/resource-detail/useConfirmAction.js.map +1 -0
- package/resource-detail/useCopyResource.d.ts +28 -0
- package/resource-detail/useCopyResource.d.ts.map +1 -0
- package/resource-detail/useCopyResource.js +46 -0
- package/resource-detail/useCopyResource.js.map +1 -0
- package/resource-detail/useDeleteResource.d.ts +40 -0
- package/resource-detail/useDeleteResource.d.ts.map +1 -0
- package/resource-detail/useDeleteResource.js +83 -0
- package/resource-detail/useDeleteResource.js.map +1 -0
- package/resource-detail/useDetailTabs.d.ts +46 -0
- package/resource-detail/useDetailTabs.d.ts.map +1 -0
- package/resource-detail/useDetailTabs.js +47 -0
- package/resource-detail/useDetailTabs.js.map +1 -0
- package/resource-workbench/components/BulkActionBar.d.ts +36 -0
- package/resource-workbench/components/BulkActionBar.d.ts.map +1 -0
- package/resource-workbench/components/BulkActionBar.js +35 -0
- package/resource-workbench/components/BulkActionBar.js.map +1 -0
- package/resource-workbench/components/ColumnHeader.d.ts +23 -0
- package/resource-workbench/components/ColumnHeader.d.ts.map +1 -0
- package/resource-workbench/components/ColumnHeader.js +25 -0
- package/resource-workbench/components/ColumnHeader.js.map +1 -0
- package/resource-workbench/components/FilterBar.d.ts +33 -0
- package/resource-workbench/components/FilterBar.d.ts.map +1 -0
- package/resource-workbench/components/FilterBar.js +72 -0
- package/resource-workbench/components/FilterBar.js.map +1 -0
- package/resource-workbench/components/ResourceAvatar.d.ts +29 -0
- package/resource-workbench/components/ResourceAvatar.d.ts.map +1 -0
- package/resource-workbench/components/ResourceAvatar.js +51 -0
- package/resource-workbench/components/ResourceAvatar.js.map +1 -0
- package/resource-workbench/components/ResourceCards.d.ts +39 -0
- package/resource-workbench/components/ResourceCards.d.ts.map +1 -0
- package/resource-workbench/components/ResourceCards.js +41 -0
- package/resource-workbench/components/ResourceCards.js.map +1 -0
- package/resource-workbench/components/ResourceInspector.d.ts +26 -0
- package/resource-workbench/components/ResourceInspector.d.ts.map +1 -0
- package/resource-workbench/components/ResourceInspector.js +22 -0
- package/resource-workbench/components/ResourceInspector.js.map +1 -0
- package/resource-workbench/components/ResourceList.d.ts +39 -0
- package/resource-workbench/components/ResourceList.d.ts.map +1 -0
- package/resource-workbench/components/ResourceList.js +41 -0
- package/resource-workbench/components/ResourceList.js.map +1 -0
- package/resource-workbench/components/ResourceTable.d.ts +47 -0
- package/resource-workbench/components/ResourceTable.d.ts.map +1 -0
- package/resource-workbench/components/ResourceTable.js +78 -0
- package/resource-workbench/components/ResourceTable.js.map +1 -0
- package/resource-workbench/components/ResourceWorkbench.d.ts +131 -0
- package/resource-workbench/components/ResourceWorkbench.d.ts.map +1 -0
- package/resource-workbench/components/ResourceWorkbench.js +170 -0
- package/resource-workbench/components/ResourceWorkbench.js.map +1 -0
- package/resource-workbench/components/SelectionCheckbox.d.ts +24 -0
- package/resource-workbench/components/SelectionCheckbox.d.ts.map +1 -0
- package/resource-workbench/components/SelectionCheckbox.js +16 -0
- package/resource-workbench/components/SelectionCheckbox.js.map +1 -0
- package/resource-workbench/components/StatusBadge.d.ts +31 -0
- package/resource-workbench/components/StatusBadge.d.ts.map +1 -0
- package/resource-workbench/components/StatusBadge.js +75 -0
- package/resource-workbench/components/StatusBadge.js.map +1 -0
- package/resource-workbench/components/ViewSwitcher.d.ts +21 -0
- package/resource-workbench/components/ViewSwitcher.d.ts.map +1 -0
- package/resource-workbench/components/ViewSwitcher.js +37 -0
- package/resource-workbench/components/ViewSwitcher.js.map +1 -0
- package/resource-workbench/hooks/useResourceCollection.d.ts +93 -0
- package/resource-workbench/hooks/useResourceCollection.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceCollection.js +133 -0
- package/resource-workbench/hooks/useResourceCollection.js.map +1 -0
- package/resource-workbench/hooks/useResourceFilters.d.ts +73 -0
- package/resource-workbench/hooks/useResourceFilters.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceFilters.js +105 -0
- package/resource-workbench/hooks/useResourceFilters.js.map +1 -0
- package/resource-workbench/hooks/useResourceSelection.d.ts +44 -0
- package/resource-workbench/hooks/useResourceSelection.d.ts.map +1 -0
- package/resource-workbench/hooks/useResourceSelection.js +123 -0
- package/resource-workbench/hooks/useResourceSelection.js.map +1 -0
- package/resource-workbench/hooks/useViewPreference.d.ts +32 -0
- package/resource-workbench/hooks/useViewPreference.d.ts.map +1 -0
- package/resource-workbench/hooks/useViewPreference.js +60 -0
- package/resource-workbench/hooks/useViewPreference.js.map +1 -0
- package/resource-workbench/index.d.ts +34 -0
- package/resource-workbench/index.d.ts.map +1 -0
- package/resource-workbench/index.js +19 -0
- package/resource-workbench/index.js.map +1 -0
- package/resource-workbench/types.d.ts +165 -0
- package/resource-workbench/types.d.ts.map +1 -0
- package/resource-workbench/types.js +2 -0
- package/resource-workbench/types.js.map +1 -0
- package/runner/RunnerDetailView.d.ts +44 -0
- package/runner/RunnerDetailView.d.ts.map +1 -0
- package/runner/RunnerDetailView.js +154 -0
- package/runner/RunnerDetailView.js.map +1 -0
- package/runner/RunnerListPanel.d.ts +26 -1
- package/runner/RunnerListPanel.d.ts.map +1 -1
- package/runner/RunnerListPanel.js +68 -46
- package/runner/RunnerListPanel.js.map +1 -1
- package/runner/index.d.ts +7 -1
- package/runner/index.d.ts.map +1 -1
- package/runner/index.js +3 -0
- package/runner/index.js.map +1 -1
- package/runner/shared.d.ts +31 -0
- package/runner/shared.d.ts.map +1 -0
- package/runner/shared.js +55 -0
- package/runner/shared.js.map +1 -0
- package/runner/useRunner.d.ts +37 -0
- package/runner/useRunner.d.ts.map +1 -0
- package/runner/useRunner.js +24 -0
- package/runner/useRunner.js.map +1 -0
- package/session/__tests__/group-sessions.test.js +3 -3
- package/session/__tests__/group-sessions.test.js.map +1 -1
- package/session/__tests__/session-spec-converters.test.d.ts +2 -0
- package/session/__tests__/session-spec-converters.test.d.ts.map +1 -0
- package/session/__tests__/session-spec-converters.test.js +162 -0
- package/session/__tests__/session-spec-converters.test.js.map +1 -0
- package/session/__tests__/useNewSessionFlow.test.js +2 -2
- package/session/__tests__/useNewSessionFlow.test.js.map +1 -1
- package/session/__tests__/usePersistedModel.test.js +1 -1
- package/session/__tests__/usePersistedModel.test.js.map +1 -1
- package/session/group-sessions.d.ts +17 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +46 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +4 -2
- package/session/index.d.ts.map +1 -1
- package/session/index.js +2 -1
- package/session/index.js.map +1 -1
- package/session/session-spec-converters.d.ts +24 -0
- package/session/session-spec-converters.d.ts.map +1 -0
- package/session/session-spec-converters.js +72 -0
- package/session/session-spec-converters.js.map +1 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js +1 -56
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionPageFlow.d.ts +5 -0
- package/session/useSessionPageFlow.d.ts.map +1 -1
- package/session/useSessionPageFlow.js +20 -6
- package/session/useSessionPageFlow.js.map +1 -1
- package/session/useSessionSearch.d.ts +57 -0
- package/session/useSessionSearch.d.ts.map +1 -0
- package/session/useSessionSearch.js +94 -0
- package/session/useSessionSearch.js.map +1 -0
- package/skill/SkillDetailView.d.ts +70 -7
- package/skill/SkillDetailView.d.ts.map +1 -1
- package/skill/SkillDetailView.js +107 -39
- package/skill/SkillDetailView.js.map +1 -1
- package/skill/SkillDiffDialog.d.ts +42 -0
- package/skill/SkillDiffDialog.d.ts.map +1 -0
- package/skill/SkillDiffDialog.js +72 -0
- package/skill/SkillDiffDialog.js.map +1 -0
- package/skill/SkillFileBrowser.d.ts +31 -0
- package/skill/SkillFileBrowser.d.ts.map +1 -0
- package/skill/SkillFileBrowser.js +105 -0
- package/skill/SkillFileBrowser.js.map +1 -0
- package/skill/SkillUploader.d.ts +39 -0
- package/skill/SkillUploader.d.ts.map +1 -0
- package/skill/SkillUploader.js +141 -0
- package/skill/SkillUploader.js.map +1 -0
- package/skill/index.d.ts +18 -0
- package/skill/index.d.ts.map +1 -1
- package/skill/index.js +9 -0
- package/skill/index.js.map +1 -1
- package/skill/internal/computeArtifactHash.d.ts +9 -0
- package/skill/internal/computeArtifactHash.d.ts.map +1 -0
- package/skill/internal/computeArtifactHash.js +14 -0
- package/skill/internal/computeArtifactHash.js.map +1 -0
- package/skill/internal/fetchAndUnpackArtifact.d.ts +16 -0
- package/skill/internal/fetchAndUnpackArtifact.d.ts.map +1 -0
- package/skill/internal/fetchAndUnpackArtifact.js +34 -0
- package/skill/internal/fetchAndUnpackArtifact.js.map +1 -0
- package/skill/usePushSkill.d.ts +53 -0
- package/skill/usePushSkill.d.ts.map +1 -0
- package/skill/usePushSkill.js +57 -0
- package/skill/usePushSkill.js.map +1 -0
- package/skill/useSkillArtifact.d.ts +37 -0
- package/skill/useSkillArtifact.d.ts.map +1 -0
- package/skill/useSkillArtifact.js +76 -0
- package/skill/useSkillArtifact.js.map +1 -0
- package/skill/useSkillDiff.d.ts +31 -0
- package/skill/useSkillDiff.d.ts.map +1 -0
- package/skill/useSkillDiff.js +97 -0
- package/skill/useSkillDiff.js.map +1 -0
- package/skill/useSkillDuplicateCheck.d.ts +34 -0
- package/skill/useSkillDuplicateCheck.d.ts.map +1 -0
- package/skill/useSkillDuplicateCheck.js +58 -0
- package/skill/useSkillDuplicateCheck.js.map +1 -0
- package/skill/useSkillUpload.d.ts +69 -0
- package/skill/useSkillUpload.d.ts.map +1 -0
- package/skill/useSkillUpload.js +157 -0
- package/skill/useSkillUpload.js.map +1 -0
- package/skill/useSkillVersions.d.ts +46 -0
- package/skill/useSkillVersions.d.ts.map +1 -0
- package/skill/useSkillVersions.js +104 -0
- package/skill/useSkillVersions.js.map +1 -0
- package/src/action-menu/ActionMenu.tsx +151 -0
- package/src/action-menu/index.ts +9 -0
- package/src/action-menu/types.ts +70 -0
- package/src/agent/AgentCreationWizard.tsx +201 -0
- package/src/agent/AgentDetailView.tsx +817 -321
- package/src/agent/index.ts +16 -0
- package/src/agent/internal/agentToInput.ts +95 -0
- package/src/agent/steps/CapabilitiesStep.tsx +363 -0
- package/src/agent/steps/IdentityStep.tsx +259 -0
- package/src/agent/steps/ReviewStep.tsx +211 -0
- package/src/agent/steps/types.ts +53 -0
- package/src/agent/useCreateAgent.ts +76 -0
- package/src/agent/useUpdateAgent.ts +55 -0
- package/src/composer/ContextChip.tsx +20 -11
- package/src/composer/SessionComposer.tsx +52 -3
- package/src/dependency-graph/DependencyGraph.tsx +153 -0
- package/src/dependency-graph/DependencyTreeNode.tsx +282 -0
- package/src/dependency-graph/index.ts +15 -0
- package/src/dependency-graph/types.ts +131 -0
- package/src/dependency-graph/useDependencyGraph.ts +158 -0
- package/src/empty-state/EmptyState.tsx +90 -0
- package/src/empty-state/index.ts +9 -0
- package/src/empty-state/types.ts +81 -0
- package/src/empty-state/useEmptyState.ts +85 -0
- package/src/environment/usePersonalEnvironment.ts +1 -0
- package/src/feedback/StigmerToaster.tsx +45 -0
- package/src/feedback/index.ts +3 -0
- package/src/feedback/toast.ts +13 -0
- package/src/feedback/types.ts +7 -0
- package/src/index.ts +275 -8
- package/src/inline-edit/InlineEditImage.tsx +208 -0
- package/src/inline-edit/InlineEditKeyValue.tsx +301 -0
- package/src/inline-edit/InlineEditResourceList.tsx +325 -0
- package/src/inline-edit/InlineEditSelect.tsx +150 -0
- package/src/inline-edit/InlineEditText.tsx +211 -0
- package/src/inline-edit/InlineEditTextarea.tsx +209 -0
- package/src/inline-edit/index.ts +28 -0
- package/src/inline-edit/types.ts +47 -0
- package/src/inline-edit/useInlineFieldSave.ts +62 -0
- package/src/internal/Tabs.tsx +4 -164
- package/src/internal/useFetch.ts +2 -2
- package/src/library/ImportResourceDialog.tsx +227 -0
- package/src/library/index.ts +18 -8
- package/src/library/serialize-resource-yaml.ts +356 -0
- package/src/library/useExportResource.ts +183 -0
- package/src/library/useImportResource.ts +253 -0
- package/src/mcp-server/McpServerCreationWizard.tsx +206 -0
- package/src/mcp-server/McpServerDetailView.tsx +816 -155
- package/src/mcp-server/index.ts +16 -0
- package/src/mcp-server/internal/mcpServerToInput.ts +95 -0
- package/src/mcp-server/steps/EnvironmentAuthStep.tsx +462 -0
- package/src/mcp-server/steps/IdentityTransportStep.tsx +531 -0
- package/src/mcp-server/steps/ReviewStep.tsx +297 -0
- package/src/mcp-server/steps/types.ts +85 -0
- package/src/mcp-server/useCreateMcpServer.ts +76 -0
- package/src/mcp-server/useUpdateMcpServer.ts +55 -0
- package/src/models/ModelRegistryContext.ts +3 -0
- package/src/models/ModelSelector.tsx +25 -2
- package/src/models/__tests__/useModelRegistry.test.tsx +5 -3
- package/src/models/useModelRegistry.ts +5 -2
- package/src/provider.tsx +69 -18
- package/src/resource-creation/CreationPicker.tsx +292 -0
- package/src/resource-creation/StepIndicator.tsx +156 -0
- package/src/resource-creation/TemplateCard.tsx +143 -0
- package/src/resource-creation/TemplateGallery.tsx +222 -0
- package/src/resource-creation/WizardNav.tsx +163 -0
- package/src/resource-creation/WizardShell.tsx +124 -0
- package/src/resource-creation/index.ts +45 -0
- package/src/resource-creation/templates/agent-templates.ts +160 -0
- package/src/resource-creation/templates/index.ts +7 -0
- package/src/resource-creation/templates/mcp-server-templates.ts +106 -0
- package/src/resource-creation/templates/types.ts +64 -0
- package/src/resource-creation/types.ts +105 -0
- package/src/resource-creation/useTemplateFilter.ts +117 -0
- package/src/resource-creation/useWizardState.ts +223 -0
- package/src/resource-detail/ConfirmDialog.tsx +127 -0
- package/src/resource-detail/ResourceActionBar.tsx +157 -0
- package/src/resource-detail/ResourceDetailShell.tsx +184 -0
- package/src/resource-detail/Section.tsx +78 -0
- package/src/resource-detail/index.ts +34 -0
- package/src/resource-detail/types.ts +177 -0
- package/src/resource-detail/useConfirmAction.ts +70 -0
- package/src/resource-detail/useCopyResource.ts +74 -0
- package/src/resource-detail/useDeleteResource.ts +110 -0
- package/src/resource-detail/useDetailTabs.ts +93 -0
- package/src/resource-workbench/components/BulkActionBar.tsx +122 -0
- package/src/resource-workbench/components/ColumnHeader.tsx +105 -0
- package/src/resource-workbench/components/FilterBar.tsx +173 -0
- package/src/resource-workbench/components/ResourceAvatar.tsx +109 -0
- package/src/resource-workbench/components/ResourceCards.tsx +126 -0
- package/src/resource-workbench/components/ResourceInspector.tsx +88 -0
- package/src/resource-workbench/components/ResourceList.tsx +121 -0
- package/src/resource-workbench/components/ResourceTable.tsx +222 -0
- package/src/resource-workbench/components/ResourceWorkbench.tsx +695 -0
- package/src/resource-workbench/components/SelectionCheckbox.tsx +52 -0
- package/src/resource-workbench/components/StatusBadge.tsx +119 -0
- package/src/resource-workbench/components/ViewSwitcher.tsx +135 -0
- package/src/resource-workbench/hooks/useResourceCollection.ts +261 -0
- package/src/resource-workbench/hooks/useResourceFilters.ts +216 -0
- package/src/resource-workbench/hooks/useResourceSelection.ts +178 -0
- package/src/resource-workbench/hooks/useViewPreference.ts +75 -0
- package/src/resource-workbench/index.ts +73 -0
- package/src/resource-workbench/types.ts +220 -0
- package/src/runner/RunnerDetailView.tsx +410 -0
- package/src/runner/RunnerListPanel.tsx +126 -111
- package/src/runner/index.ts +13 -1
- package/src/runner/shared.tsx +124 -0
- package/src/runner/useRunner.ts +59 -0
- package/src/session/__tests__/group-sessions.test.ts +5 -3
- package/src/session/__tests__/session-spec-converters.test.ts +185 -0
- package/src/session/__tests__/useNewSessionFlow.test.tsx +2 -2
- package/src/session/__tests__/usePersistedModel.test.tsx +1 -1
- package/src/session/group-sessions.ts +65 -0
- package/src/session/index.ts +8 -2
- package/src/session/session-spec-converters.ts +86 -0
- package/src/session/useSessionConversation.ts +5 -64
- package/src/session/useSessionPageFlow.ts +28 -7
- package/src/session/useSessionSearch.ts +149 -0
- package/src/skill/SkillDetailView.tsx +371 -165
- package/src/skill/SkillDiffDialog.tsx +213 -0
- package/src/skill/SkillFileBrowser.tsx +289 -0
- package/src/skill/SkillUploader.tsx +481 -0
- package/src/skill/index.ts +34 -0
- package/src/skill/internal/computeArtifactHash.ts +13 -0
- package/src/skill/internal/fetchAndUnpackArtifact.ts +48 -0
- package/src/skill/usePushSkill.ts +101 -0
- package/src/skill/useSkillArtifact.ts +107 -0
- package/src/skill/useSkillDiff.ts +128 -0
- package/src/skill/useSkillDuplicateCheck.ts +92 -0
- package/src/skill/useSkillUpload.ts +231 -0
- package/src/skill/useSkillVersions.ts +165 -0
- package/src/styles.css +28 -0
- package/src/tabs/Tabs.tsx +184 -0
- package/src/tabs/index.ts +2 -0
- package/src/version-history/DiffFileList.tsx +111 -0
- package/src/version-history/DiffSummary.tsx +61 -0
- package/src/version-history/DiffViewer.tsx +163 -0
- package/src/version-history/MultiFileDiffView.tsx +114 -0
- package/src/version-history/VersionTimeline.tsx +232 -0
- package/src/version-history/VersionTimelineEntry.tsx +254 -0
- package/src/version-history/computeDiff.ts +61 -0
- package/src/version-history/computeMultiFileDiff.ts +97 -0
- package/src/version-history/index.ts +22 -0
- package/src/version-history/types.ts +129 -0
- package/styles.css +1 -1
- package/tabs/Tabs.d.ts +58 -0
- package/tabs/Tabs.d.ts.map +1 -0
- package/tabs/Tabs.js +80 -0
- package/tabs/Tabs.js.map +1 -0
- package/tabs/index.d.ts +3 -0
- package/tabs/index.d.ts.map +1 -0
- package/tabs/index.js +2 -0
- package/tabs/index.js.map +1 -0
- package/version-history/DiffFileList.d.ts +22 -0
- package/version-history/DiffFileList.d.ts.map +1 -0
- package/version-history/DiffFileList.js +37 -0
- package/version-history/DiffFileList.js.map +1 -0
- package/version-history/DiffSummary.d.ts +21 -0
- package/version-history/DiffSummary.d.ts.map +1 -0
- package/version-history/DiffSummary.js +16 -0
- package/version-history/DiffSummary.js.map +1 -0
- package/version-history/DiffViewer.d.ts +31 -0
- package/version-history/DiffViewer.d.ts.map +1 -0
- package/version-history/DiffViewer.js +60 -0
- package/version-history/DiffViewer.js.map +1 -0
- package/version-history/MultiFileDiffView.d.ts +30 -0
- package/version-history/MultiFileDiffView.d.ts.map +1 -0
- package/version-history/MultiFileDiffView.js +40 -0
- package/version-history/MultiFileDiffView.js.map +1 -0
- package/version-history/VersionTimeline.d.ts +29 -0
- package/version-history/VersionTimeline.d.ts.map +1 -0
- package/version-history/VersionTimeline.js +87 -0
- package/version-history/VersionTimeline.js.map +1 -0
- package/version-history/VersionTimelineEntry.d.ts +22 -0
- package/version-history/VersionTimelineEntry.d.ts.map +1 -0
- package/version-history/VersionTimelineEntry.js +98 -0
- package/version-history/VersionTimelineEntry.js.map +1 -0
- package/version-history/computeDiff.d.ts +16 -0
- package/version-history/computeDiff.d.ts.map +1 -0
- package/version-history/computeDiff.js +54 -0
- package/version-history/computeDiff.js.map +1 -0
- package/version-history/computeMultiFileDiff.d.ts +15 -0
- package/version-history/computeMultiFileDiff.d.ts.map +1 -0
- package/version-history/computeMultiFileDiff.js +83 -0
- package/version-history/computeMultiFileDiff.js.map +1 -0
- package/version-history/index.d.ts +14 -0
- package/version-history/index.d.ts.map +1 -0
- package/version-history/index.js +9 -0
- package/version-history/index.js.map +1 -0
- package/version-history/types.d.ts +106 -0
- package/version-history/types.d.ts.map +1 -0
- package/version-history/types.js +2 -0
- package/version-history/types.js.map +1 -0
- package/library/ResourceListView.d.ts +0 -174
- package/library/ResourceListView.d.ts.map +0 -1
- package/library/ResourceListView.js +0 -318
- package/library/ResourceListView.js.map +0 -1
- package/src/library/ResourceListView.tsx +0 -956
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import type { ConfirmOptions, ConfirmState } from "./types";
|
|
2
|
+
export interface UseConfirmActionReturn {
|
|
3
|
+
/**
|
|
4
|
+
* The pending confirmation state, or `null` when no confirmation
|
|
5
|
+
* is active. Pass this to a `ConfirmDialog` component to render
|
|
6
|
+
* the dialog UI.
|
|
7
|
+
*/
|
|
8
|
+
readonly confirmState: ConfirmState | null;
|
|
9
|
+
/**
|
|
10
|
+
* Trigger a confirmation prompt. Returns a promise that resolves
|
|
11
|
+
* to `true` when confirmed, `false` when cancelled.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* const confirmed = await confirm({
|
|
16
|
+
* title: "Delete agent?",
|
|
17
|
+
* description: "This action cannot be undone.",
|
|
18
|
+
* confirmLabel: "Delete",
|
|
19
|
+
* variant: "destructive",
|
|
20
|
+
* });
|
|
21
|
+
* if (confirmed) await deleteAgent();
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
readonly confirm: (options: ConfirmOptions) => Promise<boolean>;
|
|
25
|
+
/** Accept the pending confirmation. */
|
|
26
|
+
readonly handleConfirm: () => void;
|
|
27
|
+
/** Dismiss the pending confirmation. */
|
|
28
|
+
readonly handleCancel: () => void;
|
|
29
|
+
}
|
|
30
|
+
/**
|
|
31
|
+
* State management hook for confirmation dialogs.
|
|
32
|
+
*
|
|
33
|
+
* Provides an imperative `confirm()` function that returns a promise,
|
|
34
|
+
* paired with `confirmState` for rendering a `ConfirmDialog`.
|
|
35
|
+
*
|
|
36
|
+
* Separates the state logic (this hook) from the visual presentation
|
|
37
|
+
* (ConfirmDialog component) following the headless-first architecture
|
|
38
|
+
* (DD-003).
|
|
39
|
+
*/
|
|
40
|
+
export declare function useConfirmAction(): UseConfirmActionReturn;
|
|
41
|
+
//# sourceMappingURL=useConfirmAction.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirmAction.d.ts","sourceRoot":"","sources":["../../src/resource-detail/useConfirmAction.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,cAAc,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAE5D,MAAM,WAAW,sBAAsB;IACrC;;;;OAIG;IACH,QAAQ,CAAC,YAAY,EAAE,YAAY,GAAG,IAAI,CAAC;IAE3C;;;;;;;;;;;;;;OAcG;IACH,QAAQ,CAAC,OAAO,EAAE,CAAC,OAAO,EAAE,cAAc,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IAEhE,uCAAuC;IACvC,QAAQ,CAAC,aAAa,EAAE,MAAM,IAAI,CAAC;IACnC,wCAAwC;IACxC,QAAQ,CAAC,YAAY,EAAE,MAAM,IAAI,CAAC;CACnC;AAED;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,IAAI,sBAAsB,CAuBzD"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* State management hook for confirmation dialogs.
|
|
5
|
+
*
|
|
6
|
+
* Provides an imperative `confirm()` function that returns a promise,
|
|
7
|
+
* paired with `confirmState` for rendering a `ConfirmDialog`.
|
|
8
|
+
*
|
|
9
|
+
* Separates the state logic (this hook) from the visual presentation
|
|
10
|
+
* (ConfirmDialog component) following the headless-first architecture
|
|
11
|
+
* (DD-003).
|
|
12
|
+
*/
|
|
13
|
+
export function useConfirmAction() {
|
|
14
|
+
const [confirmState, setConfirmState] = useState(null);
|
|
15
|
+
const confirm = useCallback((options) => {
|
|
16
|
+
return new Promise((resolve) => {
|
|
17
|
+
setConfirmState({ ...options, resolve });
|
|
18
|
+
});
|
|
19
|
+
}, []);
|
|
20
|
+
const handleConfirm = useCallback(() => {
|
|
21
|
+
confirmState?.resolve(true);
|
|
22
|
+
setConfirmState(null);
|
|
23
|
+
}, [confirmState]);
|
|
24
|
+
const handleCancel = useCallback(() => {
|
|
25
|
+
confirmState?.resolve(false);
|
|
26
|
+
setConfirmState(null);
|
|
27
|
+
}, [confirmState]);
|
|
28
|
+
return useMemo(() => ({ confirmState, confirm, handleConfirm, handleCancel }), [confirmState, confirm, handleConfirm, handleCancel]);
|
|
29
|
+
}
|
|
30
|
+
//# sourceMappingURL=useConfirmAction.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useConfirmAction.js","sourceRoot":"","sources":["../../src/resource-detail/useConfirmAction.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAkCvD;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB;IAC9B,MAAM,CAAC,YAAY,EAAE,eAAe,CAAC,GAAG,QAAQ,CAAsB,IAAI,CAAC,CAAC;IAE5E,MAAM,OAAO,GAAG,WAAW,CAAC,CAAC,OAAuB,EAAoB,EAAE;QACxE,OAAO,IAAI,OAAO,CAAU,CAAC,OAAO,EAAE,EAAE;YACtC,eAAe,CAAC,EAAE,GAAG,OAAO,EAAE,OAAO,EAAE,CAAC,CAAC;QAC3C,CAAC,CAAC,CAAC;IACL,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,WAAW,CAAC,GAAG,EAAE;QACrC,YAAY,EAAE,OAAO,CAAC,IAAI,CAAC,CAAC;QAC5B,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,MAAM,YAAY,GAAG,WAAW,CAAC,GAAG,EAAE;QACpC,YAAY,EAAE,OAAO,CAAC,KAAK,CAAC,CAAC;QAC7B,eAAe,CAAC,IAAI,CAAC,CAAC;IACxB,CAAC,EAAE,CAAC,YAAY,CAAC,CAAC,CAAC;IAEnB,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,EAAE,CAAC,EAC9D,CAAC,YAAY,EAAE,OAAO,EAAE,aAAa,EAAE,YAAY,CAAC,CACrD,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
export interface UseCopyResourceReturn {
|
|
2
|
+
/** Copy arbitrary text to the clipboard with toast feedback. */
|
|
3
|
+
readonly copy: (text: string, label: string) => Promise<void>;
|
|
4
|
+
/** Shortcut: copies `id` and toasts "ID copied". */
|
|
5
|
+
readonly copyId: (id: string) => Promise<void>;
|
|
6
|
+
/** Shortcut: copies `slug` and toasts "Slug copied". */
|
|
7
|
+
readonly copySlug: (slug: string) => Promise<void>;
|
|
8
|
+
/** Shortcut: copies the qualified slug (`org/slug`) and toasts. */
|
|
9
|
+
readonly copyQualifiedSlug: (org: string, slug: string) => Promise<void>;
|
|
10
|
+
}
|
|
11
|
+
/**
|
|
12
|
+
* Clipboard helper for resource detail pages.
|
|
13
|
+
*
|
|
14
|
+
* Wraps `navigator.clipboard.writeText` with toast feedback so every
|
|
15
|
+
* copy action is confirmed visually (Nielsen heuristic #1 — visibility
|
|
16
|
+
* of system status). Falls back to a hidden textarea for older browsers.
|
|
17
|
+
*
|
|
18
|
+
* @example
|
|
19
|
+
* ```tsx
|
|
20
|
+
* const { copyId, copySlug, copy } = useCopyResource();
|
|
21
|
+
*
|
|
22
|
+
* <ActionMenu.Item onSelect={() => copyId(resource.id)}>
|
|
23
|
+
* Copy ID
|
|
24
|
+
* </ActionMenu.Item>
|
|
25
|
+
* ```
|
|
26
|
+
*/
|
|
27
|
+
export declare function useCopyResource(): UseCopyResourceReturn;
|
|
28
|
+
//# sourceMappingURL=useCopyResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyResource.d.ts","sourceRoot":"","sources":["../../src/resource-detail/useCopyResource.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,qBAAqB;IACpC,gEAAgE;IAChE,QAAQ,CAAC,IAAI,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC9D,oDAAoD;IACpD,QAAQ,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IAC/C,wDAAwD;IACxD,QAAQ,CAAC,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,mEAAmE;IACnE,QAAQ,CAAC,iBAAiB,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,IAAI,EAAE,MAAM,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CAC1E;AAED;;;;;;;;;;;;;;;GAeG;AACH,wBAAgB,eAAe,IAAI,qBAAqB,CA8BvD"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo } from "react";
|
|
3
|
+
import { toast } from "../feedback/toast";
|
|
4
|
+
/**
|
|
5
|
+
* Clipboard helper for resource detail pages.
|
|
6
|
+
*
|
|
7
|
+
* Wraps `navigator.clipboard.writeText` with toast feedback so every
|
|
8
|
+
* copy action is confirmed visually (Nielsen heuristic #1 — visibility
|
|
9
|
+
* of system status). Falls back to a hidden textarea for older browsers.
|
|
10
|
+
*
|
|
11
|
+
* @example
|
|
12
|
+
* ```tsx
|
|
13
|
+
* const { copyId, copySlug, copy } = useCopyResource();
|
|
14
|
+
*
|
|
15
|
+
* <ActionMenu.Item onSelect={() => copyId(resource.id)}>
|
|
16
|
+
* Copy ID
|
|
17
|
+
* </ActionMenu.Item>
|
|
18
|
+
* ```
|
|
19
|
+
*/
|
|
20
|
+
export function useCopyResource() {
|
|
21
|
+
const copy = useCallback(async (text, label) => {
|
|
22
|
+
try {
|
|
23
|
+
await navigator.clipboard.writeText(text);
|
|
24
|
+
toast.success(`${label} copied`);
|
|
25
|
+
}
|
|
26
|
+
catch {
|
|
27
|
+
fallbackCopy(text);
|
|
28
|
+
toast.success(`${label} copied`);
|
|
29
|
+
}
|
|
30
|
+
}, []);
|
|
31
|
+
const copyId = useCallback((id) => copy(id, "ID"), [copy]);
|
|
32
|
+
const copySlug = useCallback((slug) => copy(slug, "Slug"), [copy]);
|
|
33
|
+
const copyQualifiedSlug = useCallback((org, slug) => copy(`${org}/${slug}`, "Qualified slug"), [copy]);
|
|
34
|
+
return useMemo(() => ({ copy, copyId, copySlug, copyQualifiedSlug }), [copy, copyId, copySlug, copyQualifiedSlug]);
|
|
35
|
+
}
|
|
36
|
+
function fallbackCopy(text) {
|
|
37
|
+
const textarea = document.createElement("textarea");
|
|
38
|
+
textarea.value = text;
|
|
39
|
+
textarea.style.position = "fixed";
|
|
40
|
+
textarea.style.opacity = "0";
|
|
41
|
+
document.body.appendChild(textarea);
|
|
42
|
+
textarea.select();
|
|
43
|
+
document.execCommand("copy");
|
|
44
|
+
document.body.removeChild(textarea);
|
|
45
|
+
}
|
|
46
|
+
//# sourceMappingURL=useCopyResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useCopyResource.js","sourceRoot":"","sources":["../../src/resource-detail/useCopyResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,OAAO,CAAC;AAC7C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAa1C;;;;;;;;;;;;;;;GAeG;AACH,MAAM,UAAU,eAAe;IAC7B,MAAM,IAAI,GAAG,WAAW,CAAC,KAAK,EAAE,IAAY,EAAE,KAAa,EAAE,EAAE;QAC7D,IAAI,CAAC;YACH,MAAM,SAAS,CAAC,SAAS,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC;YAC1C,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;QACnC,CAAC;QAAC,MAAM,CAAC;YACP,YAAY,CAAC,IAAI,CAAC,CAAC;YACnB,KAAK,CAAC,OAAO,CAAC,GAAG,KAAK,SAAS,CAAC,CAAC;QACnC,CAAC;IACH,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,MAAM,GAAG,WAAW,CACxB,CAAC,EAAU,EAAE,EAAE,CAAC,IAAI,CAAC,EAAE,EAAE,IAAI,CAAC,EAC9B,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,MAAM,QAAQ,GAAG,WAAW,CAC1B,CAAC,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,IAAI,EAAE,MAAM,CAAC,EACpC,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,MAAM,iBAAiB,GAAG,WAAW,CACnC,CAAC,GAAW,EAAE,IAAY,EAAE,EAAE,CAAC,IAAI,CAAC,GAAG,GAAG,IAAI,IAAI,EAAE,EAAE,gBAAgB,CAAC,EACvE,CAAC,IAAI,CAAC,CACP,CAAC;IAEF,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,EAAE,CAAC,EACrD,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,CAAC,CAC5C,CAAC;AACJ,CAAC;AAED,SAAS,YAAY,CAAC,IAAY;IAChC,MAAM,QAAQ,GAAG,QAAQ,CAAC,aAAa,CAAC,UAAU,CAAC,CAAC;IACpD,QAAQ,CAAC,KAAK,GAAG,IAAI,CAAC;IACtB,QAAQ,CAAC,KAAK,CAAC,QAAQ,GAAG,OAAO,CAAC;IAClC,QAAQ,CAAC,KAAK,CAAC,OAAO,GAAG,GAAG,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;IACpC,QAAQ,CAAC,MAAM,EAAE,CAAC;IAClB,QAAQ,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAC7B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;AACtC,CAAC"}
|
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
/** Resource types that support deletion from detail pages. */
|
|
2
|
+
export type DeletableResourceKind = "agent" | "skill" | "mcpServer" | "runner";
|
|
3
|
+
export interface UseDeleteResourceReturn {
|
|
4
|
+
/**
|
|
5
|
+
* Delete the resource. Resolves on success, rejects on failure.
|
|
6
|
+
* Shows a success toast on completion and an error toast on failure.
|
|
7
|
+
*/
|
|
8
|
+
readonly deleteResource: () => Promise<void>;
|
|
9
|
+
/** `true` while the delete request is in flight. */
|
|
10
|
+
readonly isDeleting: boolean;
|
|
11
|
+
/** Error from the last failed delete, or `null` when healthy. */
|
|
12
|
+
readonly error: Error | null;
|
|
13
|
+
}
|
|
14
|
+
/**
|
|
15
|
+
* Mutation hook for deleting a resource from its detail page.
|
|
16
|
+
*
|
|
17
|
+
* Wraps the type-specific delete RPC with loading state, toast
|
|
18
|
+
* feedback, and error handling. The `resourceId` may be `null`
|
|
19
|
+
* when the resource hasn't loaded yet — `deleteResource` becomes
|
|
20
|
+
* a no-op in that case.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* const { deleteResource, isDeleting } = useDeleteResource(
|
|
25
|
+
* "agent",
|
|
26
|
+
* resourceId,
|
|
27
|
+
* "PR Review Agent",
|
|
28
|
+
* );
|
|
29
|
+
*
|
|
30
|
+
* const handleDelete = async () => {
|
|
31
|
+
* const confirmed = await confirm({ ... });
|
|
32
|
+
* if (confirmed) {
|
|
33
|
+
* await deleteResource();
|
|
34
|
+
* router.push("/library/agents");
|
|
35
|
+
* }
|
|
36
|
+
* };
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export declare function useDeleteResource(kind: DeletableResourceKind, resourceId: string | null, resourceName?: string): UseDeleteResourceReturn;
|
|
40
|
+
//# sourceMappingURL=useDeleteResource.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteResource.d.ts","sourceRoot":"","sources":["../../src/resource-detail/useDeleteResource.ts"],"names":[],"mappings":"AAOA,8DAA8D;AAC9D,MAAM,MAAM,qBAAqB,GAAG,OAAO,GAAG,OAAO,GAAG,WAAW,GAAG,QAAQ,CAAC;AAE/E,MAAM,WAAW,uBAAuB;IACtC;;;OAGG;IACH,QAAQ,CAAC,cAAc,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7C,oDAAoD;IACpD,QAAQ,CAAC,UAAU,EAAE,OAAO,CAAC;IAC7B,iEAAiE;IACjE,QAAQ,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,qBAAqB,EAC3B,UAAU,EAAE,MAAM,GAAG,IAAI,EACzB,YAAY,CAAC,EAAE,MAAM,GACpB,uBAAuB,CA6CzB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
import { useStigmer } from "../hooks";
|
|
4
|
+
import { toError } from "../internal/toError";
|
|
5
|
+
import { toast } from "../feedback/toast";
|
|
6
|
+
/**
|
|
7
|
+
* Mutation hook for deleting a resource from its detail page.
|
|
8
|
+
*
|
|
9
|
+
* Wraps the type-specific delete RPC with loading state, toast
|
|
10
|
+
* feedback, and error handling. The `resourceId` may be `null`
|
|
11
|
+
* when the resource hasn't loaded yet — `deleteResource` becomes
|
|
12
|
+
* a no-op in that case.
|
|
13
|
+
*
|
|
14
|
+
* @example
|
|
15
|
+
* ```tsx
|
|
16
|
+
* const { deleteResource, isDeleting } = useDeleteResource(
|
|
17
|
+
* "agent",
|
|
18
|
+
* resourceId,
|
|
19
|
+
* "PR Review Agent",
|
|
20
|
+
* );
|
|
21
|
+
*
|
|
22
|
+
* const handleDelete = async () => {
|
|
23
|
+
* const confirmed = await confirm({ ... });
|
|
24
|
+
* if (confirmed) {
|
|
25
|
+
* await deleteResource();
|
|
26
|
+
* router.push("/library/agents");
|
|
27
|
+
* }
|
|
28
|
+
* };
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export function useDeleteResource(kind, resourceId, resourceName) {
|
|
32
|
+
const stigmer = useStigmer();
|
|
33
|
+
const [isDeleting, setIsDeleting] = useState(false);
|
|
34
|
+
const [error, setError] = useState(null);
|
|
35
|
+
const deleteResource = useCallback(async () => {
|
|
36
|
+
if (!resourceId)
|
|
37
|
+
return;
|
|
38
|
+
setIsDeleting(true);
|
|
39
|
+
setError(null);
|
|
40
|
+
try {
|
|
41
|
+
switch (kind) {
|
|
42
|
+
case "agent":
|
|
43
|
+
await stigmer.agent.delete(resourceId);
|
|
44
|
+
break;
|
|
45
|
+
case "skill":
|
|
46
|
+
await stigmer.skill.delete(resourceId);
|
|
47
|
+
break;
|
|
48
|
+
case "mcpServer":
|
|
49
|
+
await stigmer.mcpServer.delete({ resourceId });
|
|
50
|
+
break;
|
|
51
|
+
case "runner":
|
|
52
|
+
await stigmer.runner.delete(resourceId);
|
|
53
|
+
break;
|
|
54
|
+
}
|
|
55
|
+
toast.success(resourceName
|
|
56
|
+
? `${resourceName} deleted`
|
|
57
|
+
: `${kindLabel(kind)} deleted`);
|
|
58
|
+
}
|
|
59
|
+
catch (err) {
|
|
60
|
+
const wrapped = toError(err);
|
|
61
|
+
setError(wrapped);
|
|
62
|
+
toast.error(`Failed to delete ${kindLabel(kind)}`);
|
|
63
|
+
throw wrapped;
|
|
64
|
+
}
|
|
65
|
+
finally {
|
|
66
|
+
setIsDeleting(false);
|
|
67
|
+
}
|
|
68
|
+
}, [stigmer, kind, resourceId, resourceName]);
|
|
69
|
+
return useMemo(() => ({ deleteResource, isDeleting, error }), [deleteResource, isDeleting, error]);
|
|
70
|
+
}
|
|
71
|
+
function kindLabel(kind) {
|
|
72
|
+
switch (kind) {
|
|
73
|
+
case "agent":
|
|
74
|
+
return "agent";
|
|
75
|
+
case "skill":
|
|
76
|
+
return "skill";
|
|
77
|
+
case "mcpServer":
|
|
78
|
+
return "MCP server";
|
|
79
|
+
case "runner":
|
|
80
|
+
return "runner";
|
|
81
|
+
}
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=useDeleteResource.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDeleteResource.js","sourceRoot":"","sources":["../../src/resource-detail/useDeleteResource.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AACtC,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAiB1C;;;;;;;;;;;;;;;;;;;;;;;;GAwBG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAA2B,EAC3B,UAAyB,EACzB,YAAqB;IAErB,MAAM,OAAO,GAAG,UAAU,EAAE,CAAC;IAC7B,MAAM,CAAC,UAAU,EAAE,aAAa,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IACpD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAe,IAAI,CAAC,CAAC;IAEvD,MAAM,cAAc,GAAG,WAAW,CAAC,KAAK,IAAI,EAAE;QAC5C,IAAI,CAAC,UAAU;YAAE,OAAO;QAExB,aAAa,CAAC,IAAI,CAAC,CAAC;QACpB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,QAAQ,IAAI,EAAE,CAAC;gBACb,KAAK,OAAO;oBACV,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBACvC,MAAM;gBACR,KAAK,OAAO;oBACV,MAAM,OAAO,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBACvC,MAAM;gBACR,KAAK,WAAW;oBACd,MAAM,OAAO,CAAC,SAAS,CAAC,MAAM,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC;oBAC/C,MAAM;gBACR,KAAK,QAAQ;oBACX,MAAM,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC;oBACxC,MAAM;YACV,CAAC;YACD,KAAK,CAAC,OAAO,CACX,YAAY;gBACV,CAAC,CAAC,GAAG,YAAY,UAAU;gBAC3B,CAAC,CAAC,GAAG,SAAS,CAAC,IAAI,CAAC,UAAU,CACjC,CAAC;QACJ,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,MAAM,OAAO,GAAG,OAAO,CAAC,GAAG,CAAC,CAAC;YAC7B,QAAQ,CAAC,OAAO,CAAC,CAAC;YAClB,KAAK,CAAC,KAAK,CAAC,oBAAoB,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;YACnD,MAAM,OAAO,CAAC;QAChB,CAAC;gBAAS,CAAC;YACT,aAAa,CAAC,KAAK,CAAC,CAAC;QACvB,CAAC;IACH,CAAC,EAAE,CAAC,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,YAAY,CAAC,CAAC,CAAC;IAE9C,OAAO,OAAO,CACZ,GAAG,EAAE,CAAC,CAAC,EAAE,cAAc,EAAE,UAAU,EAAE,KAAK,EAAE,CAAC,EAC7C,CAAC,cAAc,EAAE,UAAU,EAAE,KAAK,CAAC,CACpC,CAAC;AACJ,CAAC;AAED,SAAS,SAAS,CAAC,IAA2B;IAC5C,QAAQ,IAAI,EAAE,CAAC;QACb,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,OAAO;YACV,OAAO,OAAO,CAAC;QACjB,KAAK,WAAW;YACd,OAAO,YAAY,CAAC;QACtB,KAAK,QAAQ;YACX,OAAO,QAAQ,CAAC;IACpB,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import type { TabItem } from "../tabs/Tabs";
|
|
2
|
+
import type { AdditionalTab } from "./types";
|
|
3
|
+
/**
|
|
4
|
+
* Return type for the internal detail tabs hook.
|
|
5
|
+
*
|
|
6
|
+
* When `effectiveTabs` is `undefined`, the consumer should NOT render
|
|
7
|
+
* a tab bar (single-tab suppression per DD-T05A-002).
|
|
8
|
+
*/
|
|
9
|
+
export interface UseDetailTabsReturn {
|
|
10
|
+
/** Tab items to pass to ResourceDetailShell. `undefined` = suppress tab bar. */
|
|
11
|
+
readonly effectiveTabs: readonly TabItem[] | undefined;
|
|
12
|
+
/** The currently active tab ID. */
|
|
13
|
+
readonly effectiveActiveTab: string;
|
|
14
|
+
/** Handler to pass to ResourceDetailShell's `onTabChange`. */
|
|
15
|
+
readonly effectiveOnTabChange: (tabId: string) => void;
|
|
16
|
+
/** The additional tab whose content should be rendered, or `undefined` if a built-in tab is active. */
|
|
17
|
+
readonly activeAdditionalTab: AdditionalTab | undefined;
|
|
18
|
+
}
|
|
19
|
+
interface UseDetailTabsOptions {
|
|
20
|
+
/** Built-in tabs defined by the SDK component (e.g., [{ id: "overview", label: "Overview" }]). */
|
|
21
|
+
readonly builtInTabs: readonly TabItem[];
|
|
22
|
+
/** Consumer-provided extension tabs. */
|
|
23
|
+
readonly additionalTabs?: readonly AdditionalTab[];
|
|
24
|
+
/** Controlled active tab (enables controlled mode when paired with `onTabChange`). */
|
|
25
|
+
readonly activeTab?: string;
|
|
26
|
+
/** Controlled tab change handler (enables controlled mode when paired with `activeTab`). */
|
|
27
|
+
readonly onTabChange?: (tabId: string) => void;
|
|
28
|
+
/** Default tab to show when in uncontrolled mode. Defaults to the first built-in tab's ID. */
|
|
29
|
+
readonly defaultTab?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Internal hook that manages tab state for detail view components.
|
|
33
|
+
*
|
|
34
|
+
* Implements the uncontrolled-by-default / controlled-when-specified
|
|
35
|
+
* pattern (DD-T05A-001):
|
|
36
|
+
* - When both `activeTab` and `onTabChange` are provided, the component
|
|
37
|
+
* operates in controlled mode (consumer owns the state).
|
|
38
|
+
* - Otherwise, the component manages its own internal tab state.
|
|
39
|
+
*
|
|
40
|
+
* Single-tab suppression (DD-T05A-002):
|
|
41
|
+
* - When only one tab exists (no additionalTabs), `effectiveTabs` is
|
|
42
|
+
* `undefined` so the consumer skips rendering the tab bar entirely.
|
|
43
|
+
*/
|
|
44
|
+
export declare function useDetailTabs({ builtInTabs, additionalTabs, activeTab, onTabChange, defaultTab, }: UseDetailTabsOptions): UseDetailTabsReturn;
|
|
45
|
+
export {};
|
|
46
|
+
//# sourceMappingURL=useDetailTabs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDetailTabs.d.ts","sourceRoot":"","sources":["../../src/resource-detail/useDetailTabs.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAE7C;;;;;GAKG;AACH,MAAM,WAAW,mBAAmB;IAClC,gFAAgF;IAChF,QAAQ,CAAC,aAAa,EAAE,SAAS,OAAO,EAAE,GAAG,SAAS,CAAC;IACvD,mCAAmC;IACnC,QAAQ,CAAC,kBAAkB,EAAE,MAAM,CAAC;IACpC,8DAA8D;IAC9D,QAAQ,CAAC,oBAAoB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvD,uGAAuG;IACvG,QAAQ,CAAC,mBAAmB,EAAE,aAAa,GAAG,SAAS,CAAC;CACzD;AAED,UAAU,oBAAoB;IAC5B,kGAAkG;IAClG,QAAQ,CAAC,WAAW,EAAE,SAAS,OAAO,EAAE,CAAC;IACzC,wCAAwC;IACxC,QAAQ,CAAC,cAAc,CAAC,EAAE,SAAS,aAAa,EAAE,CAAC;IACnD,sFAAsF;IACtF,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;IAC5B,4FAA4F;IAC5F,QAAQ,CAAC,WAAW,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/C,8FAA8F;IAC9F,QAAQ,CAAC,UAAU,CAAC,EAAE,MAAM,CAAC;CAC9B;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,aAAa,CAAC,EAC5B,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,UAAU,GACX,EAAE,oBAAoB,GAAG,mBAAmB,CAqC5C"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useMemo, useState } from "react";
|
|
3
|
+
/**
|
|
4
|
+
* Internal hook that manages tab state for detail view components.
|
|
5
|
+
*
|
|
6
|
+
* Implements the uncontrolled-by-default / controlled-when-specified
|
|
7
|
+
* pattern (DD-T05A-001):
|
|
8
|
+
* - When both `activeTab` and `onTabChange` are provided, the component
|
|
9
|
+
* operates in controlled mode (consumer owns the state).
|
|
10
|
+
* - Otherwise, the component manages its own internal tab state.
|
|
11
|
+
*
|
|
12
|
+
* Single-tab suppression (DD-T05A-002):
|
|
13
|
+
* - When only one tab exists (no additionalTabs), `effectiveTabs` is
|
|
14
|
+
* `undefined` so the consumer skips rendering the tab bar entirely.
|
|
15
|
+
*/
|
|
16
|
+
export function useDetailTabs({ builtInTabs, additionalTabs, activeTab, onTabChange, defaultTab, }) {
|
|
17
|
+
const isControlled = activeTab !== undefined && onTabChange !== undefined;
|
|
18
|
+
const allTabs = useMemo(() => {
|
|
19
|
+
if (!additionalTabs || additionalTabs.length === 0)
|
|
20
|
+
return builtInTabs;
|
|
21
|
+
return [...builtInTabs, ...additionalTabs];
|
|
22
|
+
}, [builtInTabs, additionalTabs]);
|
|
23
|
+
const initialTab = defaultTab ?? builtInTabs[0]?.id ?? "";
|
|
24
|
+
const [internalTab, setInternalTab] = useState(initialTab);
|
|
25
|
+
const effectiveActiveTab = isControlled ? activeTab : internalTab;
|
|
26
|
+
const effectiveOnTabChange = useCallback((tabId) => {
|
|
27
|
+
if (isControlled) {
|
|
28
|
+
onTabChange(tabId);
|
|
29
|
+
}
|
|
30
|
+
else {
|
|
31
|
+
setInternalTab(tabId);
|
|
32
|
+
}
|
|
33
|
+
}, [isControlled, onTabChange]);
|
|
34
|
+
const effectiveTabs = allTabs.length > 1 ? allTabs : undefined;
|
|
35
|
+
const activeAdditionalTab = useMemo(() => {
|
|
36
|
+
if (!additionalTabs)
|
|
37
|
+
return undefined;
|
|
38
|
+
return additionalTabs.find((t) => t.id === effectiveActiveTab);
|
|
39
|
+
}, [additionalTabs, effectiveActiveTab]);
|
|
40
|
+
return {
|
|
41
|
+
effectiveTabs,
|
|
42
|
+
effectiveActiveTab,
|
|
43
|
+
effectiveOnTabChange,
|
|
44
|
+
activeAdditionalTab,
|
|
45
|
+
};
|
|
46
|
+
}
|
|
47
|
+
//# sourceMappingURL=useDetailTabs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useDetailTabs.js","sourceRoot":"","sources":["../../src/resource-detail/useDetailTabs.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAkCvD;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,aAAa,CAAC,EAC5B,WAAW,EACX,cAAc,EACd,SAAS,EACT,WAAW,EACX,UAAU,GACW;IACrB,MAAM,YAAY,GAAG,SAAS,KAAK,SAAS,IAAI,WAAW,KAAK,SAAS,CAAC;IAE1E,MAAM,OAAO,GAAG,OAAO,CAAqB,GAAG,EAAE;QAC/C,IAAI,CAAC,cAAc,IAAI,cAAc,CAAC,MAAM,KAAK,CAAC;YAAE,OAAO,WAAW,CAAC;QACvE,OAAO,CAAC,GAAG,WAAW,EAAE,GAAG,cAAc,CAAC,CAAC;IAC7C,CAAC,EAAE,CAAC,WAAW,EAAE,cAAc,CAAC,CAAC,CAAC;IAElC,MAAM,UAAU,GAAG,UAAU,IAAI,WAAW,CAAC,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;IAC1D,MAAM,CAAC,WAAW,EAAE,cAAc,CAAC,GAAG,QAAQ,CAAC,UAAU,CAAC,CAAC;IAE3D,MAAM,kBAAkB,GAAG,YAAY,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,WAAW,CAAC;IAElE,MAAM,oBAAoB,GAAG,WAAW,CACtC,CAAC,KAAa,EAAE,EAAE;QAChB,IAAI,YAAY,EAAE,CAAC;YACjB,WAAW,CAAC,KAAK,CAAC,CAAC;QACrB,CAAC;aAAM,CAAC;YACN,cAAc,CAAC,KAAK,CAAC,CAAC;QACxB,CAAC;IACH,CAAC,EACD,CAAC,YAAY,EAAE,WAAW,CAAC,CAC5B,CAAC;IAEF,MAAM,aAAa,GAAG,OAAO,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,SAAS,CAAC;IAE/D,MAAM,mBAAmB,GAAG,OAAO,CAAC,GAAG,EAAE;QACvC,IAAI,CAAC,cAAc;YAAE,OAAO,SAAS,CAAC;QACtC,OAAO,cAAc,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,EAAE,KAAK,kBAAkB,CAAC,CAAC;IACjE,CAAC,EAAE,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC,CAAC;IAEzC,OAAO;QACL,aAAa;QACb,kBAAkB;QAClB,oBAAoB;QACpB,mBAAmB;KACpB,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { BulkAction } from "../types";
|
|
2
|
+
/** Props for {@link BulkActionBar}. */
|
|
3
|
+
export interface BulkActionBarProps<TData> {
|
|
4
|
+
/** Number of selected items. */
|
|
5
|
+
readonly selectedCount: number;
|
|
6
|
+
/** The selected items to pass to action handlers. */
|
|
7
|
+
readonly selectedItems: readonly TData[];
|
|
8
|
+
/** Available bulk actions. */
|
|
9
|
+
readonly actions: readonly BulkAction<TData>[];
|
|
10
|
+
/** Called when the user clicks "Cancel" (deselect all). */
|
|
11
|
+
readonly onCancel: () => void;
|
|
12
|
+
/** Additional CSS classes for the bar. */
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Floating action bar that appears when items are selected in the
|
|
17
|
+
* workbench. Shows selected count, available bulk actions, and a
|
|
18
|
+
* cancel button.
|
|
19
|
+
*
|
|
20
|
+
* Uses `aria-live="polite"` so screen readers announce the selection
|
|
21
|
+
* count when it changes.
|
|
22
|
+
*
|
|
23
|
+
* @example
|
|
24
|
+
* ```tsx
|
|
25
|
+
* {selection.hasSelection && (
|
|
26
|
+
* <BulkActionBar
|
|
27
|
+
* selectedCount={selection.selectedCount}
|
|
28
|
+
* selectedItems={selection.selectedItems}
|
|
29
|
+
* actions={agentBulkActions}
|
|
30
|
+
* onCancel={selection.clearSelection}
|
|
31
|
+
* />
|
|
32
|
+
* )}
|
|
33
|
+
* ```
|
|
34
|
+
*/
|
|
35
|
+
export declare function BulkActionBar<TData>({ selectedCount, selectedItems, actions, onCancel, className, }: BulkActionBarProps<TData>): import("react/jsx-runtime").JSX.Element | null;
|
|
36
|
+
//# sourceMappingURL=BulkActionBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkActionBar.d.ts","sourceRoot":"","sources":["../../../src/resource-workbench/components/BulkActionBar.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAE3C,uCAAuC;AACvC,MAAM,WAAW,kBAAkB,CAAC,KAAK;IACvC,gCAAgC;IAChC,QAAQ,CAAC,aAAa,EAAE,MAAM,CAAC;IAC/B,qDAAqD;IACrD,QAAQ,CAAC,aAAa,EAAE,SAAS,KAAK,EAAE,CAAC;IACzC,8BAA8B;IAC9B,QAAQ,CAAC,OAAO,EAAE,SAAS,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;IAC/C,2DAA2D;IAC3D,QAAQ,CAAC,QAAQ,EAAE,MAAM,IAAI,CAAC;IAC9B,0CAA0C;IAC1C,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;;;;GAmBG;AACH,wBAAgB,aAAa,CAAC,KAAK,EAAE,EACnC,aAAa,EACb,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,GACV,EAAE,kBAAkB,CAAC,KAAK,CAAC,kDA0C3B"}
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsxs as _jsxs, jsx as _jsx } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
/**
|
|
5
|
+
* Floating action bar that appears when items are selected in the
|
|
6
|
+
* workbench. Shows selected count, available bulk actions, and a
|
|
7
|
+
* cancel button.
|
|
8
|
+
*
|
|
9
|
+
* Uses `aria-live="polite"` so screen readers announce the selection
|
|
10
|
+
* count when it changes.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```tsx
|
|
14
|
+
* {selection.hasSelection && (
|
|
15
|
+
* <BulkActionBar
|
|
16
|
+
* selectedCount={selection.selectedCount}
|
|
17
|
+
* selectedItems={selection.selectedItems}
|
|
18
|
+
* actions={agentBulkActions}
|
|
19
|
+
* onCancel={selection.clearSelection}
|
|
20
|
+
* />
|
|
21
|
+
* )}
|
|
22
|
+
* ```
|
|
23
|
+
*/
|
|
24
|
+
export function BulkActionBar({ selectedCount, selectedItems, actions, onCancel, className, }) {
|
|
25
|
+
if (selectedCount === 0)
|
|
26
|
+
return null;
|
|
27
|
+
return (_jsxs("div", { role: "toolbar", "aria-label": "Bulk actions", "aria-live": "polite", className: cn("flex items-center gap-3 rounded-lg border border-border bg-card px-4 py-2 shadow-md", className), children: [_jsxs("span", { className: "text-xs font-medium text-foreground", children: [selectedCount, " ", selectedCount === 1 ? "item" : "items", " selected"] }), _jsx("span", { className: "h-4 w-px bg-border", "aria-hidden": "true" }), _jsx("div", { className: "flex items-center gap-1", children: actions.map((action) => (_jsx(BulkActionButton, { action: action, selectedItems: selectedItems }, action.id))) }), _jsx("button", { type: "button", onClick: onCancel, className: cn("ml-auto text-xs text-muted-foreground transition-colors", "hover:text-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:rounded-sm"), children: "Cancel" })] }));
|
|
28
|
+
}
|
|
29
|
+
function BulkActionButton({ action, selectedItems, }) {
|
|
30
|
+
const isDestructive = action.variant === "destructive";
|
|
31
|
+
return (_jsxs("button", { type: "button", disabled: action.disabled, onClick: () => action.onAction(selectedItems), className: cn("inline-flex items-center gap-1.5 rounded-md px-2.5 py-1 text-xs font-medium transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50", isDestructive
|
|
32
|
+
? "text-destructive hover:bg-destructive-subtle"
|
|
33
|
+
: "text-foreground hover:bg-accent-hover"), children: [action.icon && (_jsx("span", { className: "shrink-0", "aria-hidden": "true", children: action.icon })), action.label] }));
|
|
34
|
+
}
|
|
35
|
+
//# sourceMappingURL=BulkActionBar.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BulkActionBar.js","sourceRoot":"","sources":["../../../src/resource-workbench/components/BulkActionBar.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAGb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAiBpC;;;;;;;;;;;;;;;;;;;GAmBG;AACH,MAAM,UAAU,aAAa,CAAQ,EACnC,aAAa,EACb,aAAa,EACb,OAAO,EACP,QAAQ,EACR,SAAS,GACiB;IAC1B,IAAI,aAAa,KAAK,CAAC;QAAE,OAAO,IAAI,CAAC;IAErC,OAAO,CACL,eACE,IAAI,EAAC,SAAS,gBACH,cAAc,eACf,QAAQ,EAClB,SAAS,EAAE,EAAE,CACX,qFAAqF,EACrF,SAAS,CACV,aAED,gBAAM,SAAS,EAAC,qCAAqC,aAClD,aAAa,OAAG,aAAa,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC,OAAO,iBAClD,EAEP,eAAM,SAAS,EAAC,oBAAoB,iBAAa,MAAM,GAAG,EAE1D,cAAK,SAAS,EAAC,yBAAyB,YACrC,OAAO,CAAC,GAAG,CAAC,CAAC,MAAM,EAAE,EAAE,CAAC,CACvB,KAAC,gBAAgB,IAEf,MAAM,EAAE,MAAM,EACd,aAAa,EAAE,aAAa,IAFvB,MAAM,CAAC,EAAE,CAGd,CACH,CAAC,GACE,EAEN,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,QAAQ,EACjB,SAAS,EAAE,EAAE,CACX,yDAAyD,EACzD,uBAAuB,EACvB,kGAAkG,CACnG,uBAGM,IACL,CACP,CAAC;AACJ,CAAC;AAED,SAAS,gBAAgB,CAAQ,EAC/B,MAAM,EACN,aAAa,GAId;IACC,MAAM,aAAa,GAAG,MAAM,CAAC,OAAO,KAAK,aAAa,CAAC;IAEvD,OAAO,CACL,kBACE,IAAI,EAAC,QAAQ,EACb,QAAQ,EAAE,MAAM,CAAC,QAAQ,EACzB,OAAO,EAAE,GAAG,EAAE,CAAC,MAAM,CAAC,QAAQ,CAAC,aAAa,CAAC,EAC7C,SAAS,EAAE,EAAE,CACX,+FAA+F,EAC/F,yEAAyE,EACzE,kDAAkD,EAClD,aAAa;YACX,CAAC,CAAC,8CAA8C;YAChD,CAAC,CAAC,uCAAuC,CAC5C,aAEA,MAAM,CAAC,IAAI,IAAI,CACd,eAAM,SAAS,EAAC,UAAU,iBAAa,MAAM,YAC1C,MAAM,CAAC,IAAI,GACP,CACR,EACA,MAAM,CAAC,KAAK,IACN,CACV,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
import type { SortDirection } from "../types";
|
|
2
|
+
/** Props for {@link ColumnHeader}. */
|
|
3
|
+
export interface ColumnHeaderProps {
|
|
4
|
+
/** Column header label. */
|
|
5
|
+
readonly label: string;
|
|
6
|
+
/** Whether clicking this header toggles sort. */
|
|
7
|
+
readonly sortable: boolean;
|
|
8
|
+
/** Current sort direction for this column, or `null` if not sorted. */
|
|
9
|
+
readonly sortDirection: SortDirection | null;
|
|
10
|
+
/** Called when the user clicks a sortable header. */
|
|
11
|
+
readonly onSort?: () => void;
|
|
12
|
+
/** Additional CSS classes. */
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Sortable table column header with accessible sort indicators.
|
|
17
|
+
*
|
|
18
|
+
* Uses `aria-sort` to communicate sort state to screen readers.
|
|
19
|
+
* The sort indicator uses both an icon and text direction so the
|
|
20
|
+
* sort state is never conveyed by icon alone.
|
|
21
|
+
*/
|
|
22
|
+
export declare function ColumnHeader({ label, sortable, sortDirection, onSort, className, }: ColumnHeaderProps): import("react/jsx-runtime").JSX.Element;
|
|
23
|
+
//# sourceMappingURL=ColumnHeader.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnHeader.d.ts","sourceRoot":"","sources":["../../../src/resource-workbench/components/ColumnHeader.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,UAAU,CAAC;AAE9C,sCAAsC;AACtC,MAAM,WAAW,iBAAiB;IAChC,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,iDAAiD;IACjD,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,uEAAuE;IACvE,QAAQ,CAAC,aAAa,EAAE,aAAa,GAAG,IAAI,CAAC;IAC7C,qDAAqD;IACrD,QAAQ,CAAC,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IAC7B,8BAA8B;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,aAAa,EACb,MAAM,EACN,SAAS,GACV,EAAE,iBAAiB,2CA6CnB"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
/**
|
|
5
|
+
* Sortable table column header with accessible sort indicators.
|
|
6
|
+
*
|
|
7
|
+
* Uses `aria-sort` to communicate sort state to screen readers.
|
|
8
|
+
* The sort indicator uses both an icon and text direction so the
|
|
9
|
+
* sort state is never conveyed by icon alone.
|
|
10
|
+
*/
|
|
11
|
+
export function ColumnHeader({ label, sortable, sortDirection, onSort, className, }) {
|
|
12
|
+
const ariaSort = sortDirection === "asc"
|
|
13
|
+
? "ascending"
|
|
14
|
+
: sortDirection === "desc"
|
|
15
|
+
? "descending"
|
|
16
|
+
: undefined;
|
|
17
|
+
if (!sortable) {
|
|
18
|
+
return (_jsx("th", { scope: "col", className: cn("px-3 py-2 text-left text-xs font-medium text-muted-foreground", className), children: label }));
|
|
19
|
+
}
|
|
20
|
+
return (_jsx("th", { scope: "col", "aria-sort": ariaSort, className: cn("px-3 py-2 text-left text-xs font-medium text-muted-foreground", className), children: _jsxs("button", { type: "button", onClick: onSort, className: cn("inline-flex items-center gap-1 rounded-sm px-0.5 py-0.5 -mx-0.5", "hover:text-foreground transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", sortDirection && "text-foreground"), children: [label, _jsx(SortIndicator, { direction: sortDirection })] }) }));
|
|
21
|
+
}
|
|
22
|
+
function SortIndicator({ direction, }) {
|
|
23
|
+
return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 12 12", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", className: cn("shrink-0 transition-transform", !direction && "opacity-0 group-hover:opacity-40", direction === "desc" && "rotate-180"), children: _jsx("path", { d: "M6 2.5v7M3 6.5l3-4 3 4" }) }));
|
|
24
|
+
}
|
|
25
|
+
//# sourceMappingURL=ColumnHeader.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ColumnHeader.js","sourceRoot":"","sources":["../../../src/resource-workbench/components/ColumnHeader.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAiBpC;;;;;;GAMG;AACH,MAAM,UAAU,YAAY,CAAC,EAC3B,KAAK,EACL,QAAQ,EACR,aAAa,EACb,MAAM,EACN,SAAS,GACS;IAClB,MAAM,QAAQ,GAAG,aAAa,KAAK,KAAK;QACtC,CAAC,CAAC,WAAoB;QACtB,CAAC,CAAC,aAAa,KAAK,MAAM;YACxB,CAAC,CAAC,YAAqB;YACvB,CAAC,CAAC,SAAS,CAAC;IAEhB,IAAI,CAAC,QAAQ,EAAE,CAAC;QACd,OAAO,CACL,aACE,KAAK,EAAC,KAAK,EACX,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,YAEA,KAAK,GACH,CACN,CAAC;IACJ,CAAC;IAED,OAAO,CACL,aACE,KAAK,EAAC,KAAK,eACA,QAAQ,EACnB,SAAS,EAAE,EAAE,CACX,+DAA+D,EAC/D,SAAS,CACV,YAED,kBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,MAAM,EACf,SAAS,EAAE,EAAE,CACX,iEAAiE,EACjE,yCAAyC,EACzC,yEAAyE,EACzE,aAAa,IAAI,iBAAiB,CACnC,aAEA,KAAK,EACN,KAAC,aAAa,IAAC,SAAS,EAAE,aAAa,GAAI,IACpC,GACN,CACN,CAAC;AACJ,CAAC;AAED,SAAS,aAAa,CAAC,EACrB,SAAS,GAGV;IACC,OAAO,CACL,cACE,KAAK,EAAC,IAAI,EACV,MAAM,EAAC,IAAI,EACX,OAAO,EAAC,WAAW,EACnB,IAAI,EAAC,MAAM,EACX,MAAM,EAAC,cAAc,EACrB,WAAW,EAAC,KAAK,EACjB,aAAa,EAAC,OAAO,EACrB,cAAc,EAAC,OAAO,iBACV,MAAM,EAClB,SAAS,EAAE,EAAE,CACX,+BAA+B,EAC/B,CAAC,SAAS,IAAI,kCAAkC,EAChD,SAAS,KAAK,MAAM,IAAI,YAAY,CACrC,YAED,eAAM,CAAC,EAAC,wBAAwB,GAAG,GAC/B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import type { FilterValue, FilterDef } from "../types";
|
|
2
|
+
/** Props for {@link FilterBar}. */
|
|
3
|
+
export interface FilterBarProps {
|
|
4
|
+
/** Currently active filter values. */
|
|
5
|
+
readonly filters: readonly FilterValue[];
|
|
6
|
+
/** Available filter definitions (used to resolve labels). */
|
|
7
|
+
readonly filterDefs: readonly FilterDef[];
|
|
8
|
+
/** Called when a filter chip's "remove" button is clicked. */
|
|
9
|
+
readonly onRemoveFilter: (filterId: string) => void;
|
|
10
|
+
/** Called when the "Clear all" button is clicked. */
|
|
11
|
+
readonly onClearAll: () => void;
|
|
12
|
+
/** Additional CSS classes. */
|
|
13
|
+
readonly className?: string;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Displays active filters as removable chips with a "Clear all" action.
|
|
17
|
+
*
|
|
18
|
+
* The filter bar is a lightweight presentation component — filter state
|
|
19
|
+
* and mutation logic live in {@link useResourceFilters}. The parent
|
|
20
|
+
* `ResourceWorkbench` wires them together.
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```tsx
|
|
24
|
+
* <FilterBar
|
|
25
|
+
* filters={filtersHook.filters}
|
|
26
|
+
* filterDefs={agentFilterDefs}
|
|
27
|
+
* onRemoveFilter={filtersHook.removeFilter}
|
|
28
|
+
* onClearAll={filtersHook.clearFilters}
|
|
29
|
+
* />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export declare function FilterBar({ filters, filterDefs, onRemoveFilter, onClearAll, className, }: FilterBarProps): import("react/jsx-runtime").JSX.Element | null;
|
|
33
|
+
//# sourceMappingURL=FilterBar.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"FilterBar.d.ts","sourceRoot":"","sources":["../../../src/resource-workbench/components/FilterBar.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,UAAU,CAAC;AAEvD,mCAAmC;AACnC,MAAM,WAAW,cAAc;IAC7B,sCAAsC;IACtC,QAAQ,CAAC,OAAO,EAAE,SAAS,WAAW,EAAE,CAAC;IACzC,6DAA6D;IAC7D,QAAQ,CAAC,UAAU,EAAE,SAAS,SAAS,EAAE,CAAC;IAC1C,8DAA8D;IAC9D,QAAQ,CAAC,cAAc,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,IAAI,CAAC;IACpD,qDAAqD;IACrD,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;IAChC,8BAA8B;IAC9B,QAAQ,CAAC,SAAS,CAAC,EAAE,MAAM,CAAC;CAC7B;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,SAAS,CAAC,EACxB,OAAO,EACP,UAAU,EACV,cAAc,EACd,UAAU,EACV,SAAS,GACV,EAAE,cAAc,kDAyChB"}
|