@stigmer/react 0.4.7 → 0.5.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/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/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/execution/MessageThread.d.ts +1 -0
- package/execution/MessageThread.d.ts.map +1 -1
- package/execution/MessageThread.js +22 -12
- package/execution/MessageThread.js.map +1 -1
- package/execution/SetupProgress.d.ts +23 -9
- package/execution/SetupProgress.d.ts.map +1 -1
- package/execution/SetupProgress.js +30 -14
- package/execution/SetupProgress.js.map +1 -1
- package/execution/__tests__/thread-keys.test.js +82 -0
- package/execution/__tests__/thread-keys.test.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 +30 -10
- package/index.d.ts.map +1 -1
- package/index.js +29 -9
- 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 +29 -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/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 +113 -20
- 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/registry.d.ts +4 -1
- package/models/registry.d.ts.map +1 -1
- package/models/registry.js +6 -2
- package/models/registry.js.map +1 -1
- package/package.json +8 -4
- package/provider.js +1 -1
- 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/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/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/execution/MessageThread.tsx +26 -15
- package/src/execution/SetupProgress.tsx +35 -14
- package/src/execution/__tests__/thread-keys.test.ts +101 -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 +270 -8
- package/src/inline-edit/InlineEditImage.tsx +208 -0
- package/src/inline-edit/InlineEditKeyValue.tsx +278 -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/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 +392 -105
- 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/registry.ts +10 -2
- package/src/provider.tsx +1 -1
- 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/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 @@
|
|
|
1
|
+
{"version":3,"file":"InlineEditText.js","sourceRoot":"","sources":["../../src/inline-edit/InlineEditText.tsx"],"names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AAC,cAAc,EAAC,OAAO,iBAAa,MAAM,YAC9J,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC;AAED,SAAS,OAAO;IACd,OAAO,CACL,cAAK,KAAK,EAAC,IAAI,EAAC,MAAM,EAAC,IAAI,EAAC,OAAO,EAAC,WAAW,EAAC,IAAI,EAAC,MAAM,EAAC,MAAM,EAAC,cAAc,EAAC,WAAW,EAAC,GAAG,EAAC,aAAa,EAAC,OAAO,EAAC,SAAS,EAAC,cAAc,iBAAa,MAAM,YACjK,eAAM,CAAC,EAAC,oBAAoB,GAAG,GAC3B,CACP,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { InlineEditBaseProps } from "./types";
|
|
2
|
+
/** Props for {@link InlineEditTextarea}. */
|
|
3
|
+
export interface InlineEditTextareaProps extends InlineEditBaseProps {
|
|
4
|
+
/** Current field value. */
|
|
5
|
+
readonly value: string;
|
|
6
|
+
/** Called with the new value when the user confirms. */
|
|
7
|
+
readonly onSave: (newValue: string) => Promise<boolean>;
|
|
8
|
+
/** Placeholder shown when value is empty. */
|
|
9
|
+
readonly placeholder?: string;
|
|
10
|
+
/** Optional client-side validation. */
|
|
11
|
+
readonly validate?: (value: string) => string | null;
|
|
12
|
+
/** Minimum rows for the textarea. @default 3 */
|
|
13
|
+
readonly minRows?: number;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Click-to-edit multiline text field.
|
|
17
|
+
*
|
|
18
|
+
* In read mode, renders the value as preformatted text with expand/collapse.
|
|
19
|
+
* On click, opens a textarea with confirm/cancel. Ctrl+Enter confirms.
|
|
20
|
+
*/
|
|
21
|
+
export declare function InlineEditTextarea({ value, onSave, placeholder, validate, minRows, disabled, isSaving, error, className, }: InlineEditTextareaProps): import("react/jsx-runtime").JSX.Element;
|
|
22
|
+
//# sourceMappingURL=InlineEditTextarea.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineEditTextarea.d.ts","sourceRoot":"","sources":["../../src/inline-edit/InlineEditTextarea.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAEnD,4CAA4C;AAC5C,MAAM,WAAW,uBAAwB,SAAQ,mBAAmB;IAClE,2BAA2B;IAC3B,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,MAAM,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACxD,6CAA6C;IAC7C,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,CAAC;IAC9B,uCAAuC;IACvC,QAAQ,CAAC,QAAQ,CAAC,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,MAAM,GAAG,IAAI,CAAC;IACrD,gDAAgD;IAChD,QAAQ,CAAC,OAAO,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED;;;;;GAKG;AACH,wBAAgB,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EACN,WAA6B,EAC7B,QAAQ,EACR,OAAW,EACX,QAAQ,EACR,QAAQ,EACR,KAAK,EACL,SAAS,GACV,EAAE,uBAAuB,2CAwJzB"}
|
|
@@ -0,0 +1,83 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
/**
|
|
6
|
+
* Click-to-edit multiline text field.
|
|
7
|
+
*
|
|
8
|
+
* In read mode, renders the value as preformatted text with expand/collapse.
|
|
9
|
+
* On click, opens a textarea with confirm/cancel. Ctrl+Enter confirms.
|
|
10
|
+
*/
|
|
11
|
+
export function InlineEditTextarea({ value, onSave, placeholder = "Click to edit", validate, minRows = 3, disabled, isSaving, error, className, }) {
|
|
12
|
+
const [isEditing, setIsEditing] = useState(false);
|
|
13
|
+
const [draft, setDraft] = useState(value);
|
|
14
|
+
const [localError, setLocalError] = useState(null);
|
|
15
|
+
const textareaRef = useRef(null);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (isEditing) {
|
|
18
|
+
setDraft(value);
|
|
19
|
+
setLocalError(null);
|
|
20
|
+
requestAnimationFrame(() => {
|
|
21
|
+
const ta = textareaRef.current;
|
|
22
|
+
if (ta) {
|
|
23
|
+
ta.focus();
|
|
24
|
+
ta.selectionStart = ta.value.length;
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
}, [isEditing, value]);
|
|
29
|
+
// Auto-resize textarea
|
|
30
|
+
useEffect(() => {
|
|
31
|
+
const ta = textareaRef.current;
|
|
32
|
+
if (!ta)
|
|
33
|
+
return;
|
|
34
|
+
ta.style.height = "auto";
|
|
35
|
+
ta.style.height = `${ta.scrollHeight}px`;
|
|
36
|
+
}, [draft, isEditing]);
|
|
37
|
+
const handleConfirm = useCallback(async () => {
|
|
38
|
+
if (draft === value) {
|
|
39
|
+
setIsEditing(false);
|
|
40
|
+
return;
|
|
41
|
+
}
|
|
42
|
+
if (validate) {
|
|
43
|
+
const err = validate(draft);
|
|
44
|
+
if (err) {
|
|
45
|
+
setLocalError(err);
|
|
46
|
+
return;
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
const ok = await onSave(draft);
|
|
50
|
+
if (ok)
|
|
51
|
+
setIsEditing(false);
|
|
52
|
+
}, [draft, value, validate, onSave]);
|
|
53
|
+
const handleCancel = useCallback(() => {
|
|
54
|
+
setIsEditing(false);
|
|
55
|
+
setDraft(value);
|
|
56
|
+
setLocalError(null);
|
|
57
|
+
}, [value]);
|
|
58
|
+
const handleKeyDown = useCallback((e) => {
|
|
59
|
+
if (e.key === "Enter" && (e.ctrlKey || e.metaKey)) {
|
|
60
|
+
e.preventDefault();
|
|
61
|
+
handleConfirm();
|
|
62
|
+
}
|
|
63
|
+
else if (e.key === "Escape") {
|
|
64
|
+
handleCancel();
|
|
65
|
+
}
|
|
66
|
+
}, [handleConfirm, handleCancel]);
|
|
67
|
+
const displayError = localError || error;
|
|
68
|
+
if (disabled || !isEditing) {
|
|
69
|
+
return (_jsx("div", { className: cn("group/inline-edit", className), children: _jsx("button", { type: "button", onClick: () => { if (!disabled)
|
|
70
|
+
setIsEditing(true); }, disabled: disabled, className: cn("w-full rounded-md px-2 py-1.5 text-left transition-colors", !disabled && "hover:bg-accent-hover cursor-pointer", disabled && "cursor-default", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-ring"), children: _jsxs("div", { className: "flex items-start justify-between gap-2", children: [_jsx("pre", { className: cn("min-w-0 whitespace-pre-wrap break-words font-mono text-sm text-foreground", !value && "text-muted-foreground italic font-sans"), children: value || placeholder }), !disabled && (_jsx(PencilIcon, { className: "mt-0.5 size-3 shrink-0 text-muted-foreground opacity-0 transition-opacity group-hover/inline-edit:opacity-100" }))] }) }) }));
|
|
71
|
+
}
|
|
72
|
+
return (_jsxs("div", { className: cn("flex flex-col gap-1.5", className), children: [_jsx("textarea", { ref: textareaRef, value: draft, onChange: (e) => { setDraft(e.target.value); setLocalError(null); }, onKeyDown: handleKeyDown, disabled: isSaving, placeholder: placeholder, rows: minRows, className: cn("w-full resize-y rounded-md border border-border bg-input-bg px-3 py-2 font-mono text-sm text-foreground", "focus:outline-none focus:ring-2 focus:ring-ring", "disabled:opacity-50", displayError && "border-destructive") }), _jsxs("div", { className: "flex items-center justify-between", children: [_jsx("span", { className: "text-[10px] text-muted-foreground", children: isSaving ? "Saving..." : "Ctrl+Enter to save, Escape to cancel" }), _jsxs("div", { className: "flex items-center gap-1.5", children: [_jsx("button", { type: "button", onClick: handleCancel, disabled: isSaving, className: cn("rounded-md px-2.5 py-1 text-xs font-medium", "border border-border bg-background text-foreground hover:bg-accent hover:text-accent-foreground", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: "Cancel" }), _jsxs("button", { type: "button", onClick: handleConfirm, disabled: isSaving, className: cn("inline-flex items-center gap-1 rounded-md px-2.5 py-1 text-xs font-medium", "bg-primary text-primary-foreground hover:bg-primary-hover", "disabled:opacity-50", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), children: [isSaving && _jsx(Spinner, {}), "Save"] })] })] }), displayError && (_jsx("p", { className: "px-1 text-xs text-destructive", role: "alert", children: displayError }))] }));
|
|
73
|
+
}
|
|
74
|
+
// ---------------------------------------------------------------------------
|
|
75
|
+
// Icons
|
|
76
|
+
// ---------------------------------------------------------------------------
|
|
77
|
+
function PencilIcon({ className }) {
|
|
78
|
+
return (_jsx("svg", { className: className, viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", children: _jsx("path", { d: "M11.5 1.5a2.121 2.121 0 0 1 3 3L5 14l-4 1 1-4Z" }) }));
|
|
79
|
+
}
|
|
80
|
+
function Spinner() {
|
|
81
|
+
return (_jsx("svg", { width: "14", height: "14", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", className: "animate-spin", "aria-hidden": "true", children: _jsx("path", { d: "M8 2a6 6 0 1 0 6 6" }) }));
|
|
82
|
+
}
|
|
83
|
+
//# sourceMappingURL=InlineEditTextarea.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InlineEditTextarea.js","sourceRoot":"","sources":["../../src/inline-edit/InlineEditTextarea.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AAiBpC;;;;;GAKG;AACH,MAAM,UAAU,kBAAkB,CAAC,EACjC,KAAK,EACL,MAAM,EACN,WA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Text } from "./InlineEditText";
|
|
2
|
+
export type { InlineEditTextProps } from "./InlineEditText";
|
|
3
|
+
export { InlineEditTextarea } from "./InlineEditTextarea";
|
|
4
|
+
export type { InlineEditTextareaProps } from "./InlineEditTextarea";
|
|
5
|
+
export { InlineEditImage } from "./InlineEditImage";
|
|
6
|
+
export type { InlineEditImageProps } from "./InlineEditImage";
|
|
7
|
+
export { InlineEditSelect } from "./InlineEditSelect";
|
|
8
|
+
export type { InlineEditSelectProps } from "./InlineEditSelect";
|
|
9
|
+
export { InlineEditKeyValue } from "./InlineEditKeyValue";
|
|
10
|
+
export type { InlineEditKeyValueProps } from "./InlineEditKeyValue";
|
|
11
|
+
export { InlineEditResourceList } from "./InlineEditResourceList";
|
|
12
|
+
export type { InlineEditResourceListProps } from "./InlineEditResourceList";
|
|
13
|
+
export { useInlineFieldSave } from "./useInlineFieldSave";
|
|
14
|
+
export type { UseInlineFieldSaveReturn } from "./useInlineFieldSave";
|
|
15
|
+
export type { InlineEditBaseProps, KeyValueRow, ResourceRefRow, SelectOption, InlineFieldSaveResult, } from "./types";
|
|
16
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/inline-edit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,YAAY,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AACpD,YAAY,EAAE,oBAAoB,EAAE,MAAM,mBAAmB,CAAC;AAE9D,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,uBAAuB,EAAE,MAAM,sBAAsB,CAAC;AAEpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,YAAY,EAAE,2BAA2B,EAAE,MAAM,0BAA0B,CAAC;AAE5E,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,YAAY,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAErE,YAAY,EACV,mBAAmB,EACnB,WAAW,EACX,cAAc,EACd,YAAY,EACZ,qBAAqB,GACtB,MAAM,SAAS,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export { InlineEditText } from "./InlineEditText";
|
|
2
|
+
export { InlineEditTextarea } from "./InlineEditTextarea";
|
|
3
|
+
export { InlineEditImage } from "./InlineEditImage";
|
|
4
|
+
export { InlineEditSelect } from "./InlineEditSelect";
|
|
5
|
+
export { InlineEditKeyValue } from "./InlineEditKeyValue";
|
|
6
|
+
export { InlineEditResourceList } from "./InlineEditResourceList";
|
|
7
|
+
export { useInlineFieldSave } from "./useInlineFieldSave";
|
|
8
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/inline-edit/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAGlD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAGtD,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAG1D,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAGlE,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC"}
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
/** Shared props for all inline edit components. */
|
|
2
|
+
export interface InlineEditBaseProps {
|
|
3
|
+
/** Whether editing is disabled (component renders as read-only). */
|
|
4
|
+
readonly disabled?: boolean;
|
|
5
|
+
/** `true` while a save operation is in flight. */
|
|
6
|
+
readonly isSaving?: boolean;
|
|
7
|
+
/** Error from the last failed save. Shown inline below the field. */
|
|
8
|
+
readonly error?: string | null;
|
|
9
|
+
/** Additional CSS classes for the root container. */
|
|
10
|
+
readonly className?: string;
|
|
11
|
+
}
|
|
12
|
+
/** Entry in an inline key-value editor. */
|
|
13
|
+
export interface KeyValueRow {
|
|
14
|
+
readonly key: string;
|
|
15
|
+
readonly value: string;
|
|
16
|
+
/** When `true`, renders a "secret" badge. */
|
|
17
|
+
readonly isSecret?: boolean;
|
|
18
|
+
/** Optional description shown as helper text. */
|
|
19
|
+
readonly description?: string;
|
|
20
|
+
/** When `true`, this row is optional. */
|
|
21
|
+
readonly optional?: boolean;
|
|
22
|
+
}
|
|
23
|
+
/** Entry in an inline resource reference list (MCP servers, skills, etc.). */
|
|
24
|
+
export interface ResourceRefRow {
|
|
25
|
+
readonly org: string;
|
|
26
|
+
readonly slug: string;
|
|
27
|
+
/** Display label (defaults to slug when omitted). */
|
|
28
|
+
readonly label?: string;
|
|
29
|
+
}
|
|
30
|
+
/** Single option for InlineEditSelect. */
|
|
31
|
+
export interface SelectOption {
|
|
32
|
+
readonly value: string;
|
|
33
|
+
readonly label: string;
|
|
34
|
+
readonly description?: string;
|
|
35
|
+
}
|
|
36
|
+
/** Save result returned to the inline component after a field save. */
|
|
37
|
+
export interface InlineFieldSaveResult<T = unknown> {
|
|
38
|
+
readonly success: boolean;
|
|
39
|
+
readonly data?: T;
|
|
40
|
+
readonly error?: string;
|
|
41
|
+
}
|
|
42
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":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E,CAAC,CAAC;IAClB,QAAQ,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC;CACzB"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/inline-edit/types.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/** Return value of {@link useInlineFieldSave}. */
|
|
2
|
+
export interface UseInlineFieldSaveReturn<TResource, TValue> {
|
|
3
|
+
/** Trigger a save. Resolves `true` on success, `false` on failure. */
|
|
4
|
+
readonly save: (newValue: TValue) => Promise<boolean>;
|
|
5
|
+
/** `true` while the save RPC is in flight. */
|
|
6
|
+
readonly isSaving: boolean;
|
|
7
|
+
/** Error from the most recent failed save. */
|
|
8
|
+
readonly error: string | null;
|
|
9
|
+
/** Clear the error state. */
|
|
10
|
+
readonly clearError: () => void;
|
|
11
|
+
}
|
|
12
|
+
/**
|
|
13
|
+
* Generic hook that saves a single field on a resource.
|
|
14
|
+
*
|
|
15
|
+
* The `saveFn` receives the current resource and the new field value,
|
|
16
|
+
* reconstructs the full input, and calls the update API. On success
|
|
17
|
+
* the resource state is refreshed; on failure the error is captured.
|
|
18
|
+
*
|
|
19
|
+
* @param currentResource - Ref to the latest fetched resource (read on each save).
|
|
20
|
+
* @param saveFn - Async function that performs the update and returns the new resource.
|
|
21
|
+
*/
|
|
22
|
+
export declare function useInlineFieldSave<TResource, TValue>(currentResource: TResource | null | undefined, saveFn: (resource: TResource, newValue: TValue) => Promise<TResource>): UseInlineFieldSaveReturn<TResource, TValue>;
|
|
23
|
+
//# sourceMappingURL=useInlineFieldSave.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInlineFieldSave.d.ts","sourceRoot":"","sources":["../../src/inline-edit/useInlineFieldSave.ts"],"names":[],"mappings":"AAKA,kDAAkD;AAClD,MAAM,WAAW,wBAAwB,CAAC,SAAS,EAAE,MAAM;IACzD,sEAAsE;IACtE,QAAQ,CAAC,IAAI,EAAE,CAAC,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;IACtD,8CAA8C;IAC9C,QAAQ,CAAC,QAAQ,EAAE,OAAO,CAAC;IAC3B,8CAA8C;IAC9C,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,6BAA6B;IAC7B,QAAQ,CAAC,UAAU,EAAE,MAAM,IAAI,CAAC;CACjC;AAED;;;;;;;;;GASG;AACH,wBAAgB,kBAAkB,CAAC,SAAS,EAAE,MAAM,EAClD,eAAe,EAAE,SAAS,GAAG,IAAI,GAAG,SAAS,EAC7C,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,KAAK,OAAO,CAAC,SAAS,CAAC,GACpE,wBAAwB,CAAC,SAAS,EAAE,MAAM,CAAC,CA+B7C"}
|
|
@@ -0,0 +1,44 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { useCallback, useRef, useState } from "react";
|
|
3
|
+
import { toError } from "../internal/toError";
|
|
4
|
+
/**
|
|
5
|
+
* Generic hook that saves a single field on a resource.
|
|
6
|
+
*
|
|
7
|
+
* The `saveFn` receives the current resource and the new field value,
|
|
8
|
+
* reconstructs the full input, and calls the update API. On success
|
|
9
|
+
* the resource state is refreshed; on failure the error is captured.
|
|
10
|
+
*
|
|
11
|
+
* @param currentResource - Ref to the latest fetched resource (read on each save).
|
|
12
|
+
* @param saveFn - Async function that performs the update and returns the new resource.
|
|
13
|
+
*/
|
|
14
|
+
export function useInlineFieldSave(currentResource, saveFn) {
|
|
15
|
+
const [isSaving, setIsSaving] = useState(false);
|
|
16
|
+
const [error, setError] = useState(null);
|
|
17
|
+
const inflight = useRef(0);
|
|
18
|
+
const clearError = useCallback(() => setError(null), []);
|
|
19
|
+
const save = useCallback(async (newValue) => {
|
|
20
|
+
if (!currentResource)
|
|
21
|
+
return false;
|
|
22
|
+
const callId = ++inflight.current;
|
|
23
|
+
setIsSaving(true);
|
|
24
|
+
setError(null);
|
|
25
|
+
try {
|
|
26
|
+
await saveFn(currentResource, newValue);
|
|
27
|
+
if (inflight.current !== callId)
|
|
28
|
+
return false;
|
|
29
|
+
return true;
|
|
30
|
+
}
|
|
31
|
+
catch (err) {
|
|
32
|
+
if (inflight.current !== callId)
|
|
33
|
+
return false;
|
|
34
|
+
setError(toError(err).message);
|
|
35
|
+
return false;
|
|
36
|
+
}
|
|
37
|
+
finally {
|
|
38
|
+
if (inflight.current === callId)
|
|
39
|
+
setIsSaving(false);
|
|
40
|
+
}
|
|
41
|
+
}, [currentResource, saveFn]);
|
|
42
|
+
return { save, isSaving, error, clearError };
|
|
43
|
+
}
|
|
44
|
+
//# sourceMappingURL=useInlineFieldSave.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useInlineFieldSave.js","sourceRoot":"","sources":["../../src/inline-edit/useInlineFieldSave.ts"],"names":[],"mappings":"AAAA,YAAY,CAAC;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACtD,OAAO,EAAE,OAAO,EAAE,MAAM,qBAAqB,CAAC;AAc9C;;;;;;;;;GASG;AACH,MAAM,UAAU,kBAAkB,CAChC,eAA6C,EAC7C,MAAqE;IAErE,MAAM,CAAC,QAAQ,EAAE,WAAW,CAAC,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC;IAChD,MAAM,CAAC,KAAK,EAAE,QAAQ,CAAC,GAAG,QAAQ,CAAgB,IAAI,CAAC,CAAC;IACxD,MAAM,QAAQ,GAAG,MAAM,CAAC,CAAC,CAAC,CAAC;IAE3B,MAAM,UAAU,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,IAAI,CAAC,EAAE,EAAE,CAAC,CAAC;IAEzD,MAAM,IAAI,GAAG,WAAW,CACtB,KAAK,EAAE,QAAgB,EAAoB,EAAE;QAC3C,IAAI,CAAC,eAAe;YAAE,OAAO,KAAK,CAAC;QAEnC,MAAM,MAAM,GAAG,EAAE,QAAQ,CAAC,OAAO,CAAC;QAClC,WAAW,CAAC,IAAI,CAAC,CAAC;QAClB,QAAQ,CAAC,IAAI,CAAC,CAAC;QAEf,IAAI,CAAC;YACH,MAAM,MAAM,CAAC,eAAe,EAAE,QAAQ,CAAC,CAAC;YACxC,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM;gBAAE,OAAO,KAAK,CAAC;YAC9C,OAAO,IAAI,CAAC;QACd,CAAC;QAAC,OAAO,GAAG,EAAE,CAAC;YACb,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM;gBAAE,OAAO,KAAK,CAAC;YAC9C,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,CAAC,OAAO,CAAC,CAAC;YAC/B,OAAO,KAAK,CAAC;QACf,CAAC;gBAAS,CAAC;YACT,IAAI,QAAQ,CAAC,OAAO,KAAK,MAAM;gBAAE,WAAW,CAAC,KAAK,CAAC,CAAC;QACtD,CAAC;IACH,CAAC,EACD,CAAC,eAAe,EAAE,MAAM,CAAC,CAC1B,CAAC;IAEF,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,KAAK,EAAE,UAAU,EAAE,CAAC;AAC/C,CAAC"}
|
package/internal/Tabs.d.ts
CHANGED
|
@@ -1,41 +1,7 @@
|
|
|
1
|
-
import { type ReactNode } from "react";
|
|
2
|
-
export interface TabItem {
|
|
3
|
-
/** Unique identifier for the tab, used as the `activeTab` value. */
|
|
4
|
-
readonly id: string;
|
|
5
|
-
/** Display label shown in the tab trigger. */
|
|
6
|
-
readonly label: string;
|
|
7
|
-
/** Optional numeric badge rendered next to the label (e.g. item count). */
|
|
8
|
-
readonly badge?: number;
|
|
9
|
-
}
|
|
10
|
-
export interface TabsProps {
|
|
11
|
-
/** Ordered list of tabs to render. Tabs with no matching content are still clickable. */
|
|
12
|
-
readonly tabs: readonly TabItem[];
|
|
13
|
-
/** The `id` of the currently active tab. */
|
|
14
|
-
readonly activeTab: string;
|
|
15
|
-
/** Called when the user selects a different tab. */
|
|
16
|
-
readonly onTabChange: (tabId: string) => void;
|
|
17
|
-
/**
|
|
18
|
-
* Content to render in the active tab panel.
|
|
19
|
-
* Typically a switch/map over `activeTab`.
|
|
20
|
-
*/
|
|
21
|
-
readonly children: ReactNode;
|
|
22
|
-
/** Accessible label for the tab list (e.g. "Capability sections"). */
|
|
23
|
-
readonly "aria-label"?: string;
|
|
24
|
-
/** Additional CSS classes for the root container. */
|
|
25
|
-
readonly className?: string;
|
|
26
|
-
}
|
|
27
1
|
/**
|
|
28
|
-
*
|
|
29
|
-
*
|
|
30
|
-
* Implements the WAI-ARIA Tabs pattern:
|
|
31
|
-
* - `role="tablist"` / `role="tab"` / `role="tabpanel"`
|
|
32
|
-
* - Arrow-key navigation (Left/Right), Home/End to jump
|
|
33
|
-
* - `aria-selected`, `aria-controls`, `aria-labelledby` wiring
|
|
34
|
-
*
|
|
35
|
-
* All visual properties flow through `--stgm-*` design tokens.
|
|
36
|
-
* No external dependencies — safe for platform builder embedding.
|
|
37
|
-
*
|
|
38
|
-
* @internal — not yet part of the public `@stigmer/react` API.
|
|
2
|
+
* @deprecated Import from `../tabs` instead. This re-export exists only
|
|
3
|
+
* to avoid breaking internal consumers during migration.
|
|
39
4
|
*/
|
|
40
|
-
export
|
|
5
|
+
export { Tabs } from "../tabs/Tabs";
|
|
6
|
+
export type { TabsProps, TabItem } from "../tabs/Tabs";
|
|
41
7
|
//# sourceMappingURL=Tabs.d.ts.map
|
package/internal/Tabs.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACpC,YAAY,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC"}
|
package/internal/Tabs.js
CHANGED
|
@@ -1,65 +1,6 @@
|
|
|
1
|
-
"use client";
|
|
2
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
import { useCallback, useId, useRef } from "react";
|
|
4
|
-
import { cn } from "@stigmer/theme";
|
|
5
1
|
/**
|
|
6
|
-
*
|
|
7
|
-
*
|
|
8
|
-
* Implements the WAI-ARIA Tabs pattern:
|
|
9
|
-
* - `role="tablist"` / `role="tab"` / `role="tabpanel"`
|
|
10
|
-
* - Arrow-key navigation (Left/Right), Home/End to jump
|
|
11
|
-
* - `aria-selected`, `aria-controls`, `aria-labelledby` wiring
|
|
12
|
-
*
|
|
13
|
-
* All visual properties flow through `--stgm-*` design tokens.
|
|
14
|
-
* No external dependencies — safe for platform builder embedding.
|
|
15
|
-
*
|
|
16
|
-
* @internal — not yet part of the public `@stigmer/react` API.
|
|
2
|
+
* @deprecated Import from `../tabs` instead. This re-export exists only
|
|
3
|
+
* to avoid breaking internal consumers during migration.
|
|
17
4
|
*/
|
|
18
|
-
export
|
|
19
|
-
const instanceId = useId();
|
|
20
|
-
const tabRefsMap = useRef(new Map());
|
|
21
|
-
const tabId = (id) => `${instanceId}-tab-${id}`;
|
|
22
|
-
const panelId = (id) => `${instanceId}-panel-${id}`;
|
|
23
|
-
const focusTab = useCallback((id) => {
|
|
24
|
-
tabRefsMap.current.get(id)?.focus();
|
|
25
|
-
onTabChange(id);
|
|
26
|
-
}, [onTabChange]);
|
|
27
|
-
const handleKeyDown = useCallback((e) => {
|
|
28
|
-
const currentIndex = tabs.findIndex((t) => t.id === activeTab);
|
|
29
|
-
if (currentIndex === -1)
|
|
30
|
-
return;
|
|
31
|
-
let nextIndex = null;
|
|
32
|
-
switch (e.key) {
|
|
33
|
-
case "ArrowRight":
|
|
34
|
-
nextIndex = (currentIndex + 1) % tabs.length;
|
|
35
|
-
break;
|
|
36
|
-
case "ArrowLeft":
|
|
37
|
-
nextIndex = (currentIndex - 1 + tabs.length) % tabs.length;
|
|
38
|
-
break;
|
|
39
|
-
case "Home":
|
|
40
|
-
nextIndex = 0;
|
|
41
|
-
break;
|
|
42
|
-
case "End":
|
|
43
|
-
nextIndex = tabs.length - 1;
|
|
44
|
-
break;
|
|
45
|
-
default:
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
e.preventDefault();
|
|
49
|
-
focusTab(tabs[nextIndex].id);
|
|
50
|
-
}, [tabs, activeTab, focusTab]);
|
|
51
|
-
return (_jsxs("div", { className: cn("flex flex-col", className), children: [_jsx("div", { role: "tablist", "aria-label": ariaLabel, onKeyDown: handleKeyDown, className: "flex border-b border-border", children: tabs.map((tab) => {
|
|
52
|
-
const isActive = tab.id === activeTab;
|
|
53
|
-
return (_jsxs("button", { ref: (el) => {
|
|
54
|
-
if (el)
|
|
55
|
-
tabRefsMap.current.set(tab.id, el);
|
|
56
|
-
else
|
|
57
|
-
tabRefsMap.current.delete(tab.id);
|
|
58
|
-
}, id: tabId(tab.id), role: "tab", type: "button", "aria-selected": isActive, "aria-controls": panelId(tab.id), tabIndex: isActive ? 0 : -1, onClick: () => onTabChange(tab.id), "data-cursor-target": `tab-${tab.id}`, className: cn("relative inline-flex items-center gap-1.5 px-3 py-2 text-xs font-medium transition-colors", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1", isActive
|
|
59
|
-
? "text-foreground"
|
|
60
|
-
: "text-muted-foreground hover:text-foreground"), children: [tab.label, tab.badge != null && tab.badge > 0 && (_jsx("span", { className: cn("inline-flex min-w-[1.25rem] items-center justify-center rounded-full px-1 py-px text-[10px] font-medium leading-none", isActive
|
|
61
|
-
? "bg-primary-subtle text-primary"
|
|
62
|
-
: "bg-muted text-muted-foreground"), children: tab.badge })), isActive && (_jsx("span", { className: "absolute inset-x-0 -bottom-px h-0.5 bg-primary", "aria-hidden": "true" }))] }, tab.id));
|
|
63
|
-
}) }), _jsx("div", { id: panelId(activeTab), role: "tabpanel", "aria-labelledby": tabId(activeTab), tabIndex: 0, className: "focus-visible:outline-none", children: children })] }));
|
|
64
|
-
}
|
|
5
|
+
export { Tabs } from "../tabs/Tabs";
|
|
65
6
|
//# sourceMappingURL=Tabs.js.map
|
package/internal/Tabs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../../src/internal/Tabs.tsx"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC"}
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import type { ApplyResourceResult } from "./useApplyResource";
|
|
2
|
+
/** Props for {@link ImportResourceDialog}. */
|
|
3
|
+
export interface ImportResourceDialogProps {
|
|
4
|
+
/** Whether the dialog is open. */
|
|
5
|
+
readonly open: boolean;
|
|
6
|
+
/** Called when the dialog should open or close. */
|
|
7
|
+
readonly onOpenChange: (open: boolean) => void;
|
|
8
|
+
/** Target organization slug to apply the imported resource to. */
|
|
9
|
+
readonly org: string;
|
|
10
|
+
/** Called after a successful import. Use for navigation or list refresh. */
|
|
11
|
+
readonly onSuccess?: (result: ApplyResourceResult) => void;
|
|
12
|
+
}
|
|
13
|
+
/**
|
|
14
|
+
* Modal dialog for importing a Stigmer resource from a YAML or JSON file.
|
|
15
|
+
*
|
|
16
|
+
* Workflow:
|
|
17
|
+
* 1. User selects a `.yaml`, `.yml`, or `.json` file via the file picker
|
|
18
|
+
* 2. The file is validated and a preview card shows the detected resource
|
|
19
|
+
* 3. User confirms the import, which calls `apply()` on the target org
|
|
20
|
+
* 4. On success: toast notification and `onSuccess` callback
|
|
21
|
+
* 5. On error: inline error message with guidance
|
|
22
|
+
*
|
|
23
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
24
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
25
|
+
*
|
|
26
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
27
|
+
*
|
|
28
|
+
* @example
|
|
29
|
+
* ```tsx
|
|
30
|
+
* const [open, setOpen] = useState(false);
|
|
31
|
+
*
|
|
32
|
+
* <ImportResourceDialog
|
|
33
|
+
* open={open}
|
|
34
|
+
* onOpenChange={setOpen}
|
|
35
|
+
* org={activeOrg}
|
|
36
|
+
* onSuccess={(result) => {
|
|
37
|
+
* router.push(`/library/${result.kind === "Agent" ? "agents" : "mcp-servers"}`);
|
|
38
|
+
* }}
|
|
39
|
+
* />
|
|
40
|
+
* ```
|
|
41
|
+
*/
|
|
42
|
+
export declare function ImportResourceDialog({ open, onOpenChange, org, onSuccess, }: ImportResourceDialogProps): import("react/jsx-runtime").JSX.Element;
|
|
43
|
+
//# sourceMappingURL=ImportResourceDialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportResourceDialog.d.ts","sourceRoot":"","sources":["../../src/library/ImportResourceDialog.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,oBAAoB,CAAC;AAM9D,8CAA8C;AAC9C,MAAM,WAAW,yBAAyB;IACxC,kCAAkC;IAClC,QAAQ,CAAC,IAAI,EAAE,OAAO,CAAC;IACvB,mDAAmD;IACnD,QAAQ,CAAC,YAAY,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC/C,kEAAkE;IAClE,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,4EAA4E;IAC5E,QAAQ,CAAC,SAAS,CAAC,EAAE,CAAC,MAAM,EAAE,mBAAmB,KAAK,IAAI,CAAC;CAC5D;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,SAAS,GACV,EAAE,yBAAyB,2CAoK3B"}
|
|
@@ -0,0 +1,90 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { toast } from "../feedback/toast";
|
|
6
|
+
import { useImportResource } from "./useImportResource";
|
|
7
|
+
// ---------------------------------------------------------------------------
|
|
8
|
+
// Component
|
|
9
|
+
// ---------------------------------------------------------------------------
|
|
10
|
+
/**
|
|
11
|
+
* Modal dialog for importing a Stigmer resource from a YAML or JSON file.
|
|
12
|
+
*
|
|
13
|
+
* Workflow:
|
|
14
|
+
* 1. User selects a `.yaml`, `.yml`, or `.json` file via the file picker
|
|
15
|
+
* 2. The file is validated and a preview card shows the detected resource
|
|
16
|
+
* 3. User confirms the import, which calls `apply()` on the target org
|
|
17
|
+
* 4. On success: toast notification and `onSuccess` callback
|
|
18
|
+
* 5. On error: inline error message with guidance
|
|
19
|
+
*
|
|
20
|
+
* Uses the native `<dialog>` element for built-in focus trapping, Escape
|
|
21
|
+
* key handling, and backdrop — consistent with {@link ConfirmDialog}.
|
|
22
|
+
*
|
|
23
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```tsx
|
|
27
|
+
* const [open, setOpen] = useState(false);
|
|
28
|
+
*
|
|
29
|
+
* <ImportResourceDialog
|
|
30
|
+
* open={open}
|
|
31
|
+
* onOpenChange={setOpen}
|
|
32
|
+
* org={activeOrg}
|
|
33
|
+
* onSuccess={(result) => {
|
|
34
|
+
* router.push(`/library/${result.kind === "Agent" ? "agents" : "mcp-servers"}`);
|
|
35
|
+
* }}
|
|
36
|
+
* />
|
|
37
|
+
* ```
|
|
38
|
+
*/
|
|
39
|
+
export function ImportResourceDialog({ open, onOpenChange, org, onSuccess, }) {
|
|
40
|
+
const dialogRef = useRef(null);
|
|
41
|
+
const fileInputRef = useRef(null);
|
|
42
|
+
const { readFile, preview, error, reset, apply, isApplying } = useImportResource();
|
|
43
|
+
// Sync dialog open state with the native <dialog> element.
|
|
44
|
+
useEffect(() => {
|
|
45
|
+
const dialog = dialogRef.current;
|
|
46
|
+
if (!dialog)
|
|
47
|
+
return;
|
|
48
|
+
if (open && !dialog.open) {
|
|
49
|
+
dialog.showModal();
|
|
50
|
+
}
|
|
51
|
+
else if (!open && dialog.open) {
|
|
52
|
+
dialog.close();
|
|
53
|
+
}
|
|
54
|
+
}, [open]);
|
|
55
|
+
// Reset state when the dialog opens.
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
if (open) {
|
|
58
|
+
reset();
|
|
59
|
+
if (fileInputRef.current) {
|
|
60
|
+
fileInputRef.current.value = "";
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
}, [open, reset]);
|
|
64
|
+
const handleCancel = useCallback((e) => {
|
|
65
|
+
e.preventDefault();
|
|
66
|
+
onOpenChange(false);
|
|
67
|
+
}, [onOpenChange]);
|
|
68
|
+
const handleClose = useCallback(() => {
|
|
69
|
+
onOpenChange(false);
|
|
70
|
+
}, [onOpenChange]);
|
|
71
|
+
const handleFileChange = useCallback((e) => {
|
|
72
|
+
const file = e.target.files?.[0];
|
|
73
|
+
if (file) {
|
|
74
|
+
readFile(file);
|
|
75
|
+
}
|
|
76
|
+
}, [readFile]);
|
|
77
|
+
const handleConfirm = useCallback(async () => {
|
|
78
|
+
try {
|
|
79
|
+
const result = await apply(org);
|
|
80
|
+
toast.success(`${result.kind === "Agent" ? "Agent" : "MCP Server"} "${result.name}" imported successfully`);
|
|
81
|
+
onOpenChange(false);
|
|
82
|
+
onSuccess?.(result);
|
|
83
|
+
}
|
|
84
|
+
catch {
|
|
85
|
+
// error is set by the hook
|
|
86
|
+
}
|
|
87
|
+
}, [apply, org, onOpenChange, onSuccess]);
|
|
88
|
+
return (_jsx("dialog", { ref: dialogRef, onCancel: handleCancel, className: cn("fixed inset-0 z-50 m-auto w-full max-w-md rounded-lg border border-border bg-popover p-0 text-popover-foreground shadow-lg", "backdrop:bg-black/50", "open:animate-in open:fade-in-0 open:zoom-in-95"), children: _jsxs("div", { className: "flex flex-col gap-5 p-6", children: [_jsxs("div", { className: "flex flex-col gap-1", children: [_jsx("h3", { className: "text-base font-semibold text-foreground", children: "Import resource" }), _jsx("p", { className: "text-sm text-muted-foreground", children: "Select a YAML or JSON file containing a Stigmer Agent or MCP Server definition." })] }), _jsx("div", { children: _jsx("input", { ref: fileInputRef, type: "file", accept: ".yaml,.yml,.json", onChange: handleFileChange, className: cn("w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground", "file:mr-3 file:rounded-md file:border-0 file:bg-primary file:px-2.5 file:py-1 file:text-xs file:font-medium file:text-primary-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring"), "aria-label": "Select resource file" }) }), error && (_jsx("div", { role: "alert", className: "rounded-md border border-destructive bg-card px-3 py-2.5 text-sm text-destructive", children: error })), preview && !error && (_jsxs("div", { className: "rounded-md border border-border bg-card px-4 py-3", children: [_jsxs("div", { className: "flex items-center gap-2", children: [_jsx("span", { className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs font-medium text-muted-foreground", children: preview.kind === "Agent" ? "Agent" : "MCP Server" }), _jsx("span", { className: "inline-flex rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground uppercase", children: preview.format })] }), _jsx("p", { className: "mt-1.5 text-sm font-medium text-foreground", children: preview.name }), preview.slug && preview.slug !== preview.name && (_jsx("p", { className: "mt-0.5 text-xs text-muted-foreground", children: preview.slug })), _jsxs("p", { className: "mt-1.5 text-xs text-muted-foreground", children: ["Will be applied to ", _jsx("span", { className: "font-medium text-foreground", children: org })] })] })), _jsxs("div", { className: "flex justify-end gap-2", children: [_jsx("button", { type: "button", onClick: handleClose, disabled: isApplying, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "border border-input bg-background text-foreground", "hover:bg-accent hover:text-accent-foreground", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: "Cancel" }), _jsx("button", { type: "button", onClick: handleConfirm, disabled: !preview || !!error || isApplying, className: cn("rounded-md px-3 py-1.5 text-sm font-medium transition-colors", "bg-primary text-primary-foreground hover:bg-primary-hover", "focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring", "disabled:pointer-events-none disabled:opacity-50"), children: isApplying ? "Importing\u2026" : "Import" })] })] }) }));
|
|
89
|
+
}
|
|
90
|
+
//# sourceMappingURL=ImportResourceDialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"ImportResourceDialog.js","sourceRoot":"","sources":["../../src/library/ImportResourceDialog.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,MAAM,OAAO,CAAC;AACvD,OAAO,EAAE,EAAE,EAAE,MAAM,gBAAgB,CAAC;AACpC,OAAO,EAAE,KAAK,EAAE,MAAM,mBAAmB,CAAC;AAC1C,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AAmBxD,8EAA8E;AAC9E,YAAY;AACZ,8EAA8E;AAE9E;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,IAAI,EACJ,YAAY,EACZ,GAAG,EACH,SAAS,GACiB;IAC1B,MAAM,SAAS,GAAG,MAAM,CAAoB,IAAI,CAAC,CAAC;IAClD,MAAM,YAAY,GAAG,MAAM,CAAmB,IAAI,CAAC,CAAC;IACpD,MAAM,EAAE,QAAQ,EAAE,OAAO,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,UAAU,EAAE,GAAG,iBAAiB,EAAE,CAAC;IAEnF,2DAA2D;IAC3D,SAAS,CAAC,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G,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,YAAY,GAC7C,EACP,eAAM,SAAS,EAAC,oFAAoF,YACjG,OAAO,CAAC,MAAM,GACV,IACH,EACN,YAAG,SAAS,EAAC,4CAA4C,YACtD,OAAO,CAAC,IAAI,GACX,EACH,OAAO,CAAC,IAAI,IAAI,OAAO,CAAC,IAAI,KAAK,OAAO,CAAC,IAAI,IAAI,CAChD,YAAG,SAAS,EAAC,sCAAsC,YAChD,OAAO,CAAC,IAAI,GACX,CACL,EACD,aAAG,SAAS,EAAC,sCAAsC,oCAC9B,eAAM,SAAS,EAAC,6BAA6B,YAAE,GAAG,GAAQ,IAC3E,IACA,CACP,EAGD,eAAK,SAAS,EAAC,wBAAwB,aACrC,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,WAAW,EACpB,QAAQ,EAAE,UAAU,EACpB,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,mDAAmD,EACnD,8CAA8C,EAC9C,yEAAyE,EACzE,kDAAkD,CACnD,uBAGM,EACT,iBACE,IAAI,EAAC,QAAQ,EACb,OAAO,EAAE,aAAa,EACtB,QAAQ,EAAE,CAAC,OAAO,IAAI,CAAC,CAAC,KAAK,IAAI,UAAU,EAC3C,SAAS,EAAE,EAAE,CACX,8DAA8D,EAC9D,2DAA2D,EAC3D,yEAAyE,EACzE,kDAAkD,CACnD,YAEA,UAAU,CAAC,CAAC,CAAC,iBAAiB,CAAC,CAAC,CAAC,QAAQ,GACnC,IACL,IACF,GACC,CACV,CAAC;AACJ,CAAC"}
|
package/library/index.d.ts
CHANGED
|
@@ -1,8 +1,6 @@
|
|
|
1
1
|
export { LibraryBreadcrumbProvider, useBreadcrumbLabel, useBreadcrumbOverride, } from "./LibraryBreadcrumbContext";
|
|
2
2
|
export { ScopeToggle } from "./ScopeToggle";
|
|
3
3
|
export type { ScopeToggleProps } from "./ScopeToggle";
|
|
4
|
-
export { ResourceListView } from "./ResourceListView";
|
|
5
|
-
export type { ResourceListViewProps, ResourceListLayout, } from "./ResourceListView";
|
|
6
4
|
export { ResourceCountCard } from "./ResourceCountCard";
|
|
7
5
|
export type { ResourceCountCardProps } from "./ResourceCountCard";
|
|
8
6
|
export { detectStigmerResource } from "./detect-stigmer-resource";
|
|
@@ -14,12 +12,17 @@ export { useDetectSkillPackage } from "./useDetectSkillPackage";
|
|
|
14
12
|
export type { UseDetectSkillPackageReturn } from "./useDetectSkillPackage";
|
|
15
13
|
export { parseResourceYaml } from "./parse-resource-yaml";
|
|
16
14
|
export type { ParsedResource } from "./parse-resource-yaml";
|
|
17
|
-
export { serializeAgentYaml, serializeMcpServerYaml, } from "./serialize-resource-yaml";
|
|
15
|
+
export { serializeAgentYaml, serializeMcpServerYaml, serializeAgentInputYaml, serializeMcpServerInputYaml, } from "./serialize-resource-yaml";
|
|
18
16
|
export { useApplyResource } from "./useApplyResource";
|
|
19
17
|
export type { UseApplyResourceReturn, ApplyResourceResult, PushSkillParams, } from "./useApplyResource";
|
|
18
|
+
export { useExportResource } from "./useExportResource";
|
|
19
|
+
export type { UseExportResourceOptions, UseExportResourceReturn, } from "./useExportResource";
|
|
20
|
+
export { useImportResource } from "./useImportResource";
|
|
21
|
+
export type { ImportFormat, ImportPreview, UseImportResourceReturn, } from "./useImportResource";
|
|
22
|
+
export { ImportResourceDialog } from "./ImportResourceDialog";
|
|
23
|
+
export type { ImportResourceDialogProps } from "./ImportResourceDialog";
|
|
20
24
|
export { VisibilityToggle } from "./VisibilityToggle";
|
|
21
25
|
export type { VisibilityToggleProps } from "./VisibilityToggle";
|
|
22
26
|
export { useUpdateVisibility } from "./useUpdateVisibility";
|
|
23
27
|
export type { VisibilityResourceKind, UseUpdateVisibilityReturn, } from "./useUpdateVisibility";
|
|
24
|
-
export type { ResourceListScope } from "../search";
|
|
25
28
|
//# sourceMappingURL=index.d.ts.map
|