@stigmer/react 0.4.8 → 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/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/package.json +8 -4
- 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/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/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,254 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
import type { VersionTimelineEntryProps } from "./types";
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* A single row in a version timeline.
|
|
8
|
+
*
|
|
9
|
+
* Renders a version entry with: truncated hash badge, relative timestamp,
|
|
10
|
+
* actor info, tag badge, "current" indicator, and git provenance link.
|
|
11
|
+
* Supports keyboard activation and focus management.
|
|
12
|
+
*
|
|
13
|
+
* All visual properties flow through `--stgm-*` design tokens.
|
|
14
|
+
* Zero Console dependencies — safe for platform builder embedding.
|
|
15
|
+
*
|
|
16
|
+
* @example
|
|
17
|
+
* ```tsx
|
|
18
|
+
* <VersionTimelineEntry
|
|
19
|
+
* entry={version}
|
|
20
|
+
* isSelected={selectedId === version.id}
|
|
21
|
+
* onSelect={() => setSelectedId(version.id)}
|
|
22
|
+
* />
|
|
23
|
+
* ```
|
|
24
|
+
*/
|
|
25
|
+
export function VersionTimelineEntry({
|
|
26
|
+
entry,
|
|
27
|
+
isSelected,
|
|
28
|
+
isCompareSource,
|
|
29
|
+
isLast,
|
|
30
|
+
onSelect,
|
|
31
|
+
trailing,
|
|
32
|
+
}: VersionTimelineEntryProps) {
|
|
33
|
+
const handleKeyDown = (e: React.KeyboardEvent) => {
|
|
34
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
35
|
+
e.preventDefault();
|
|
36
|
+
onSelect?.();
|
|
37
|
+
}
|
|
38
|
+
};
|
|
39
|
+
|
|
40
|
+
return (
|
|
41
|
+
<div
|
|
42
|
+
role="listitem"
|
|
43
|
+
aria-current={entry.isCurrent ? "true" : undefined}
|
|
44
|
+
className="relative flex gap-3"
|
|
45
|
+
>
|
|
46
|
+
{/* Timeline connector */}
|
|
47
|
+
<div className="flex flex-col items-center pt-1">
|
|
48
|
+
<div
|
|
49
|
+
className={cn(
|
|
50
|
+
"size-2.5 shrink-0 rounded-full border-2",
|
|
51
|
+
entry.isCurrent
|
|
52
|
+
? "border-primary bg-primary"
|
|
53
|
+
: isCompareSource
|
|
54
|
+
? "border-primary border-dashed bg-background"
|
|
55
|
+
: isSelected
|
|
56
|
+
? "border-primary bg-background"
|
|
57
|
+
: "border-border bg-background",
|
|
58
|
+
)}
|
|
59
|
+
aria-hidden="true"
|
|
60
|
+
/>
|
|
61
|
+
{!isLast && (
|
|
62
|
+
<div className="mt-1 w-px flex-1 bg-border" aria-hidden="true" />
|
|
63
|
+
)}
|
|
64
|
+
</div>
|
|
65
|
+
|
|
66
|
+
{/* Entry content */}
|
|
67
|
+
<button
|
|
68
|
+
type="button"
|
|
69
|
+
onClick={onSelect}
|
|
70
|
+
onKeyDown={handleKeyDown}
|
|
71
|
+
tabIndex={0}
|
|
72
|
+
aria-selected={isSelected}
|
|
73
|
+
className={cn(
|
|
74
|
+
"mb-4 flex min-w-0 flex-1 flex-col gap-1 rounded-md px-2.5 py-2 text-left transition-colors",
|
|
75
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
76
|
+
isCompareSource
|
|
77
|
+
? "border border-dashed border-primary bg-primary-subtle"
|
|
78
|
+
: isSelected
|
|
79
|
+
? "bg-accent-hover"
|
|
80
|
+
: "hover:bg-accent-hover",
|
|
81
|
+
)}
|
|
82
|
+
>
|
|
83
|
+
{/* Top line: hash + tag + current badge */}
|
|
84
|
+
<div className="flex items-center gap-2">
|
|
85
|
+
<code
|
|
86
|
+
className="shrink-0 rounded bg-muted px-1.5 py-0.5 font-mono text-[11px] font-medium text-foreground"
|
|
87
|
+
title={entry.id}
|
|
88
|
+
>
|
|
89
|
+
{entry.label}
|
|
90
|
+
</code>
|
|
91
|
+
|
|
92
|
+
{isCompareSource && (
|
|
93
|
+
<span className="shrink-0 rounded-full bg-primary px-1.5 py-0.5 text-[10px] font-medium text-primary-foreground">
|
|
94
|
+
A
|
|
95
|
+
</span>
|
|
96
|
+
)}
|
|
97
|
+
|
|
98
|
+
{entry.tag && (
|
|
99
|
+
<span className="shrink-0 rounded-full bg-primary-subtle px-1.5 py-0.5 text-[10px] font-medium text-primary">
|
|
100
|
+
{entry.tag}
|
|
101
|
+
</span>
|
|
102
|
+
)}
|
|
103
|
+
|
|
104
|
+
{entry.isCurrent && (
|
|
105
|
+
<span className="shrink-0 rounded-full bg-status-ready-subtle px-1.5 py-0.5 text-[10px] font-medium text-status-ready">
|
|
106
|
+
current
|
|
107
|
+
</span>
|
|
108
|
+
)}
|
|
109
|
+
|
|
110
|
+
{trailing && (
|
|
111
|
+
<div className="ml-auto shrink-0">{trailing}</div>
|
|
112
|
+
)}
|
|
113
|
+
</div>
|
|
114
|
+
|
|
115
|
+
{/* Second line: timestamp + actor */}
|
|
116
|
+
<div className="flex items-center gap-2 text-xs text-muted-foreground">
|
|
117
|
+
<time
|
|
118
|
+
dateTime={entry.timestamp.toISOString()}
|
|
119
|
+
title={entry.timestamp.toLocaleString()}
|
|
120
|
+
>
|
|
121
|
+
{formatRelativeTime(entry.timestamp)}
|
|
122
|
+
</time>
|
|
123
|
+
|
|
124
|
+
{entry.actor && (
|
|
125
|
+
<>
|
|
126
|
+
<span aria-hidden="true">·</span>
|
|
127
|
+
<span className="flex items-center gap-1">
|
|
128
|
+
{entry.actor.avatar && (
|
|
129
|
+
<img
|
|
130
|
+
src={entry.actor.avatar}
|
|
131
|
+
alt=""
|
|
132
|
+
className="size-3.5 rounded-full"
|
|
133
|
+
/>
|
|
134
|
+
)}
|
|
135
|
+
<span>{entry.actor.displayName || entry.actor.id}</span>
|
|
136
|
+
</span>
|
|
137
|
+
</>
|
|
138
|
+
)}
|
|
139
|
+
</div>
|
|
140
|
+
|
|
141
|
+
{/* Optional sublabel (commit message) */}
|
|
142
|
+
{entry.sublabel && (
|
|
143
|
+
<p className="text-xs text-muted-foreground">
|
|
144
|
+
{entry.sublabel}
|
|
145
|
+
</p>
|
|
146
|
+
)}
|
|
147
|
+
|
|
148
|
+
{/* Git provenance */}
|
|
149
|
+
{entry.gitProvenance && (
|
|
150
|
+
<GitProvenanceRow provenance={entry.gitProvenance} />
|
|
151
|
+
)}
|
|
152
|
+
</button>
|
|
153
|
+
</div>
|
|
154
|
+
);
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
// ---------------------------------------------------------------------------
|
|
158
|
+
// Git provenance inline display
|
|
159
|
+
// ---------------------------------------------------------------------------
|
|
160
|
+
|
|
161
|
+
function GitProvenanceRow({
|
|
162
|
+
provenance,
|
|
163
|
+
}: {
|
|
164
|
+
readonly provenance: NonNullable<VersionTimelineEntryProps["entry"]["gitProvenance"]>;
|
|
165
|
+
}) {
|
|
166
|
+
const repoUrl = normalizeGitUrl(provenance.remoteUrl);
|
|
167
|
+
const truncatedCommit = provenance.commit.slice(0, 7);
|
|
168
|
+
const commitUrl = repoUrl
|
|
169
|
+
? `${repoUrl}/commit/${provenance.commit}`
|
|
170
|
+
: null;
|
|
171
|
+
|
|
172
|
+
return (
|
|
173
|
+
<div className="flex items-center gap-1.5 text-[11px] text-muted-foreground">
|
|
174
|
+
<GitIcon className="size-3 shrink-0" />
|
|
175
|
+
{provenance.ref && (
|
|
176
|
+
<span className="font-medium">{provenance.ref}</span>
|
|
177
|
+
)}
|
|
178
|
+
{commitUrl ? (
|
|
179
|
+
<a
|
|
180
|
+
href={commitUrl}
|
|
181
|
+
target="_blank"
|
|
182
|
+
rel="noopener noreferrer"
|
|
183
|
+
className="font-mono text-primary underline-offset-2 hover:underline"
|
|
184
|
+
onClick={(e) => e.stopPropagation()}
|
|
185
|
+
>
|
|
186
|
+
{truncatedCommit}
|
|
187
|
+
</a>
|
|
188
|
+
) : (
|
|
189
|
+
<code className="font-mono">{truncatedCommit}</code>
|
|
190
|
+
)}
|
|
191
|
+
</div>
|
|
192
|
+
);
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
// ---------------------------------------------------------------------------
|
|
196
|
+
// Utilities
|
|
197
|
+
// ---------------------------------------------------------------------------
|
|
198
|
+
|
|
199
|
+
function formatRelativeTime(date: Date): string {
|
|
200
|
+
const now = Date.now();
|
|
201
|
+
const diffMs = now - date.getTime();
|
|
202
|
+
const diffSec = Math.floor(diffMs / 1000);
|
|
203
|
+
const diffMin = Math.floor(diffSec / 60);
|
|
204
|
+
const diffHr = Math.floor(diffMin / 60);
|
|
205
|
+
const diffDays = Math.floor(diffHr / 24);
|
|
206
|
+
|
|
207
|
+
if (diffSec < 60) return "just now";
|
|
208
|
+
if (diffMin < 60) return `${diffMin}m ago`;
|
|
209
|
+
if (diffHr < 24) return `${diffHr}h ago`;
|
|
210
|
+
if (diffDays < 7) return `${diffDays}d ago`;
|
|
211
|
+
if (diffDays < 30) return `${Math.floor(diffDays / 7)}w ago`;
|
|
212
|
+
|
|
213
|
+
return date.toLocaleDateString(undefined, {
|
|
214
|
+
month: "short",
|
|
215
|
+
day: "numeric",
|
|
216
|
+
year: date.getFullYear() !== new Date().getFullYear() ? "numeric" : undefined,
|
|
217
|
+
});
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function normalizeGitUrl(url: string): string | null {
|
|
221
|
+
if (!url) return null;
|
|
222
|
+
const cleaned = url.replace(/\.git$/, "");
|
|
223
|
+
if (cleaned.startsWith("https://") || cleaned.startsWith("http://")) {
|
|
224
|
+
return cleaned;
|
|
225
|
+
}
|
|
226
|
+
const sshMatch = cleaned.match(/^(?:git@|ssh:\/\/)([^:/]+)[:/](.+)$/);
|
|
227
|
+
if (sshMatch) {
|
|
228
|
+
return `https://${sshMatch[1]}/${sshMatch[2]}`;
|
|
229
|
+
}
|
|
230
|
+
return null;
|
|
231
|
+
}
|
|
232
|
+
|
|
233
|
+
// ---------------------------------------------------------------------------
|
|
234
|
+
// Icons
|
|
235
|
+
// ---------------------------------------------------------------------------
|
|
236
|
+
|
|
237
|
+
function GitIcon({ className }: { readonly className?: string }) {
|
|
238
|
+
return (
|
|
239
|
+
<svg
|
|
240
|
+
className={className}
|
|
241
|
+
viewBox="0 0 16 16"
|
|
242
|
+
fill="none"
|
|
243
|
+
stroke="currentColor"
|
|
244
|
+
strokeWidth="1.5"
|
|
245
|
+
strokeLinecap="round"
|
|
246
|
+
strokeLinejoin="round"
|
|
247
|
+
aria-hidden="true"
|
|
248
|
+
>
|
|
249
|
+
<circle cx="8" cy="4" r="2" />
|
|
250
|
+
<circle cx="8" cy="12" r="2" />
|
|
251
|
+
<path d="M8 6v4" />
|
|
252
|
+
</svg>
|
|
253
|
+
);
|
|
254
|
+
}
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import { structuredPatch } from "diff";
|
|
2
|
+
import type { DiffHunk, DiffLine } from "./types";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Compute a unified diff between two text strings.
|
|
6
|
+
*
|
|
7
|
+
* Returns an array of {@link DiffHunk} objects, each containing the
|
|
8
|
+
* changed and context lines with line numbers. Uses the `diff` library's
|
|
9
|
+
* Myers algorithm internally.
|
|
10
|
+
*
|
|
11
|
+
* Pure function — no side effects, safe to call outside React.
|
|
12
|
+
*
|
|
13
|
+
* @param oldText - The "before" text content.
|
|
14
|
+
* @param newText - The "after" text content.
|
|
15
|
+
* @param contextLines - Number of unchanged context lines around changes (default: 3).
|
|
16
|
+
*/
|
|
17
|
+
export function computeDiff(
|
|
18
|
+
oldText: string,
|
|
19
|
+
newText: string,
|
|
20
|
+
contextLines = 3,
|
|
21
|
+
): readonly DiffHunk[] {
|
|
22
|
+
const patch = structuredPatch("a", "b", oldText, newText, "", "", {
|
|
23
|
+
context: contextLines,
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
return patch.hunks.map((hunk) => {
|
|
27
|
+
const lines: DiffLine[] = [];
|
|
28
|
+
let oldLine = hunk.oldStart;
|
|
29
|
+
let newLine = hunk.newStart;
|
|
30
|
+
|
|
31
|
+
for (const raw of hunk.lines) {
|
|
32
|
+
const prefix = raw[0];
|
|
33
|
+
const content = raw.slice(1);
|
|
34
|
+
|
|
35
|
+
if (prefix === "+") {
|
|
36
|
+
lines.push({ type: "added", content, newLineNumber: newLine });
|
|
37
|
+
newLine++;
|
|
38
|
+
} else if (prefix === "-") {
|
|
39
|
+
lines.push({ type: "removed", content, oldLineNumber: oldLine });
|
|
40
|
+
oldLine++;
|
|
41
|
+
} else {
|
|
42
|
+
lines.push({
|
|
43
|
+
type: "context",
|
|
44
|
+
content,
|
|
45
|
+
oldLineNumber: oldLine,
|
|
46
|
+
newLineNumber: newLine,
|
|
47
|
+
});
|
|
48
|
+
oldLine++;
|
|
49
|
+
newLine++;
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
return {
|
|
54
|
+
oldStart: hunk.oldStart,
|
|
55
|
+
oldLines: hunk.oldLines,
|
|
56
|
+
newStart: hunk.newStart,
|
|
57
|
+
newLines: hunk.newLines,
|
|
58
|
+
lines,
|
|
59
|
+
};
|
|
60
|
+
});
|
|
61
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { DiffHunk, FileDiffEntry, MultiFileDiffResult } from "./types";
|
|
2
|
+
import { computeDiff } from "./computeDiff";
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* Compute a multi-file diff between two snapshots of a file tree.
|
|
6
|
+
*
|
|
7
|
+
* Each snapshot is a `Map<path, textContent>`. The function categorises
|
|
8
|
+
* every path as `added`, `removed`, or `modified`, computes per-file
|
|
9
|
+
* unified diffs for modified files, and returns an aggregate result.
|
|
10
|
+
*
|
|
11
|
+
* Pure function — no side effects, safe to call outside React.
|
|
12
|
+
*
|
|
13
|
+
* @param oldFiles - File map for the "before" version.
|
|
14
|
+
* @param newFiles - File map for the "after" version.
|
|
15
|
+
*/
|
|
16
|
+
export function computeMultiFileDiff(
|
|
17
|
+
oldFiles: ReadonlyMap<string, string>,
|
|
18
|
+
newFiles: ReadonlyMap<string, string>,
|
|
19
|
+
): MultiFileDiffResult {
|
|
20
|
+
const diffCache = new Map<string, readonly DiffHunk[]>();
|
|
21
|
+
const files: FileDiffEntry[] = [];
|
|
22
|
+
let totalAdditions = 0;
|
|
23
|
+
let totalDeletions = 0;
|
|
24
|
+
|
|
25
|
+
const allPaths = new Set([...oldFiles.keys(), ...newFiles.keys()]);
|
|
26
|
+
|
|
27
|
+
for (const path of allPaths) {
|
|
28
|
+
const oldContent = oldFiles.get(path);
|
|
29
|
+
const newContent = newFiles.get(path);
|
|
30
|
+
|
|
31
|
+
if (oldContent === undefined && newContent !== undefined) {
|
|
32
|
+
const lineCount = countLines(newContent);
|
|
33
|
+
files.push({ path, changeType: "added", additions: lineCount, deletions: 0 });
|
|
34
|
+
totalAdditions += lineCount;
|
|
35
|
+
|
|
36
|
+
const hunks = computeDiff("", newContent);
|
|
37
|
+
diffCache.set(path, hunks);
|
|
38
|
+
} else if (oldContent !== undefined && newContent === undefined) {
|
|
39
|
+
const lineCount = countLines(oldContent);
|
|
40
|
+
files.push({ path, changeType: "removed", additions: 0, deletions: lineCount });
|
|
41
|
+
totalDeletions += lineCount;
|
|
42
|
+
|
|
43
|
+
const hunks = computeDiff(oldContent, "");
|
|
44
|
+
diffCache.set(path, hunks);
|
|
45
|
+
} else if (oldContent !== undefined && newContent !== undefined && oldContent !== newContent) {
|
|
46
|
+
const hunks = computeDiff(oldContent, newContent);
|
|
47
|
+
const additions = hunks.reduce(
|
|
48
|
+
(sum, h) => sum + h.lines.filter((l) => l.type === "added").length,
|
|
49
|
+
0,
|
|
50
|
+
);
|
|
51
|
+
const deletions = hunks.reduce(
|
|
52
|
+
(sum, h) => sum + h.lines.filter((l) => l.type === "removed").length,
|
|
53
|
+
0,
|
|
54
|
+
);
|
|
55
|
+
files.push({ path, changeType: "modified", additions, deletions });
|
|
56
|
+
totalAdditions += additions;
|
|
57
|
+
totalDeletions += deletions;
|
|
58
|
+
diffCache.set(path, hunks);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
|
|
62
|
+
files.sort(fileSortComparator);
|
|
63
|
+
|
|
64
|
+
return {
|
|
65
|
+
files,
|
|
66
|
+
totalAdditions,
|
|
67
|
+
totalDeletions,
|
|
68
|
+
getDiff: (path: string) => diffCache.get(path) ?? [],
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function countLines(text: string): number {
|
|
73
|
+
if (text.length === 0) return 0;
|
|
74
|
+
let count = 1;
|
|
75
|
+
for (let i = 0; i < text.length; i++) {
|
|
76
|
+
if (text[i] === "\n") count++;
|
|
77
|
+
}
|
|
78
|
+
return count;
|
|
79
|
+
}
|
|
80
|
+
|
|
81
|
+
/**
|
|
82
|
+
* Sort changed files: SKILL.md first (primary file), then alphabetically.
|
|
83
|
+
* Modified files before added, added before removed — mirrors GitHub's
|
|
84
|
+
* convention of showing the most actionable changes first.
|
|
85
|
+
*/
|
|
86
|
+
function fileSortComparator(a: FileDiffEntry, b: FileDiffEntry): number {
|
|
87
|
+
const aIsSkillMd = a.path === "SKILL.md" || a.path === "skill.md";
|
|
88
|
+
const bIsSkillMd = b.path === "SKILL.md" || b.path === "skill.md";
|
|
89
|
+
if (aIsSkillMd && !bIsSkillMd) return -1;
|
|
90
|
+
if (!aIsSkillMd && bIsSkillMd) return 1;
|
|
91
|
+
|
|
92
|
+
const order: Record<string, number> = { modified: 0, added: 1, removed: 2 };
|
|
93
|
+
const typeSort = (order[a.changeType] ?? 3) - (order[b.changeType] ?? 3);
|
|
94
|
+
if (typeSort !== 0) return typeSort;
|
|
95
|
+
|
|
96
|
+
return a.path.localeCompare(b.path);
|
|
97
|
+
}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
export { VersionTimeline } from "./VersionTimeline";
|
|
2
|
+
export { VersionTimelineEntry } from "./VersionTimelineEntry";
|
|
3
|
+
export { DiffViewer } from "./DiffViewer";
|
|
4
|
+
export type { DiffViewerProps } from "./DiffViewer";
|
|
5
|
+
export { DiffFileList } from "./DiffFileList";
|
|
6
|
+
export type { DiffFileListProps } from "./DiffFileList";
|
|
7
|
+
export { DiffSummary } from "./DiffSummary";
|
|
8
|
+
export type { DiffSummaryProps } from "./DiffSummary";
|
|
9
|
+
export { MultiFileDiffView } from "./MultiFileDiffView";
|
|
10
|
+
export type { MultiFileDiffViewProps } from "./MultiFileDiffView";
|
|
11
|
+
export { computeDiff } from "./computeDiff";
|
|
12
|
+
export { computeMultiFileDiff } from "./computeMultiFileDiff";
|
|
13
|
+
export type {
|
|
14
|
+
VersionEntry,
|
|
15
|
+
VersionTimelineProps,
|
|
16
|
+
VersionTimelineEntryProps,
|
|
17
|
+
DiffLine,
|
|
18
|
+
DiffHunk,
|
|
19
|
+
FileDiffEntry,
|
|
20
|
+
MultiFileDiffResult,
|
|
21
|
+
DiffViewMode,
|
|
22
|
+
} from "./types";
|
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
import type { ReactNode } from "react";
|
|
2
|
+
|
|
3
|
+
// ---------------------------------------------------------------------------
|
|
4
|
+
// Diff types — generic text diff primitives for any versioned resource
|
|
5
|
+
// ---------------------------------------------------------------------------
|
|
6
|
+
|
|
7
|
+
/** A single line within a diff hunk. */
|
|
8
|
+
export interface DiffLine {
|
|
9
|
+
readonly type: "added" | "removed" | "context";
|
|
10
|
+
readonly content: string;
|
|
11
|
+
readonly oldLineNumber?: number;
|
|
12
|
+
readonly newLineNumber?: number;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/** A contiguous group of changed/context lines in a unified diff. */
|
|
16
|
+
export interface DiffHunk {
|
|
17
|
+
readonly oldStart: number;
|
|
18
|
+
readonly oldLines: number;
|
|
19
|
+
readonly newStart: number;
|
|
20
|
+
readonly newLines: number;
|
|
21
|
+
readonly lines: readonly DiffLine[];
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
/** Summary of changes to a single file between two versions. */
|
|
25
|
+
export interface FileDiffEntry {
|
|
26
|
+
readonly path: string;
|
|
27
|
+
readonly changeType: "added" | "removed" | "modified";
|
|
28
|
+
readonly additions: number;
|
|
29
|
+
readonly deletions: number;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
/** Aggregated diff result across all files in two version snapshots. */
|
|
33
|
+
export interface MultiFileDiffResult {
|
|
34
|
+
readonly files: readonly FileDiffEntry[];
|
|
35
|
+
readonly totalAdditions: number;
|
|
36
|
+
readonly totalDeletions: number;
|
|
37
|
+
/** Retrieve the hunk-level diff for a specific file path. */
|
|
38
|
+
readonly getDiff: (path: string) => readonly DiffHunk[];
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/** Display mode for the diff viewer. */
|
|
42
|
+
export type DiffViewMode = "unified";
|
|
43
|
+
|
|
44
|
+
// ---------------------------------------------------------------------------
|
|
45
|
+
// Generic version entry — presentation-layer type for the timeline component
|
|
46
|
+
// ---------------------------------------------------------------------------
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* A single entry in a version timeline.
|
|
50
|
+
*
|
|
51
|
+
* This is a generic presentation type — not tied to any specific resource.
|
|
52
|
+
* Resource-specific hooks (e.g., `useSkillVersions`) map from proto types
|
|
53
|
+
* to this shape, enabling the `VersionTimeline` component to render version
|
|
54
|
+
* history for any resource type.
|
|
55
|
+
*/
|
|
56
|
+
export interface VersionEntry {
|
|
57
|
+
/** Unique identifier for this version (e.g., content hash). */
|
|
58
|
+
readonly id: string;
|
|
59
|
+
/** When this version was created/pushed. */
|
|
60
|
+
readonly timestamp: Date;
|
|
61
|
+
/** Actor who created this version. */
|
|
62
|
+
readonly actor?: {
|
|
63
|
+
readonly id: string;
|
|
64
|
+
readonly avatar?: string;
|
|
65
|
+
readonly displayName?: string;
|
|
66
|
+
};
|
|
67
|
+
/** Primary display text (e.g., truncated content hash). */
|
|
68
|
+
readonly label: string;
|
|
69
|
+
/** Secondary text (e.g., commit message or version description). */
|
|
70
|
+
readonly sublabel?: string;
|
|
71
|
+
/** Whether this is the currently active version. */
|
|
72
|
+
readonly isCurrent?: boolean;
|
|
73
|
+
/** Version tag (e.g., "stable", "v1.0"). */
|
|
74
|
+
readonly tag?: string;
|
|
75
|
+
/** Git provenance for traceability. */
|
|
76
|
+
readonly gitProvenance?: {
|
|
77
|
+
readonly remoteUrl: string;
|
|
78
|
+
readonly ref: string;
|
|
79
|
+
readonly commit: string;
|
|
80
|
+
};
|
|
81
|
+
/** Extensible key-value metadata for display. */
|
|
82
|
+
readonly metadata?: Readonly<Record<string, string>>;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// ---------------------------------------------------------------------------
|
|
86
|
+
// VersionTimeline props
|
|
87
|
+
// ---------------------------------------------------------------------------
|
|
88
|
+
|
|
89
|
+
/** Props for {@link VersionTimeline}. */
|
|
90
|
+
export interface VersionTimelineProps {
|
|
91
|
+
/** Ordered list of version entries (newest first). */
|
|
92
|
+
readonly entries: readonly VersionEntry[];
|
|
93
|
+
/** Called when a single entry is selected (clicked). */
|
|
94
|
+
readonly onEntrySelect?: (id: string) => void;
|
|
95
|
+
/**
|
|
96
|
+
* Called when two entries are selected for comparison.
|
|
97
|
+
* The component manages compare-mode selection internally when this
|
|
98
|
+
* callback is provided — enabling T05-D integration.
|
|
99
|
+
*/
|
|
100
|
+
readonly onCompare?: (fromId: string, toId: string) => void;
|
|
101
|
+
/** Currently selected entry ID (controlled selection). */
|
|
102
|
+
readonly selectedId?: string;
|
|
103
|
+
/** `true` while version data is being fetched. */
|
|
104
|
+
readonly isLoading?: boolean;
|
|
105
|
+
/** Message shown when `entries` is empty and not loading. */
|
|
106
|
+
readonly emptyMessage?: string;
|
|
107
|
+
/** Additional CSS classes for the root container. */
|
|
108
|
+
readonly className?: string;
|
|
109
|
+
}
|
|
110
|
+
|
|
111
|
+
// ---------------------------------------------------------------------------
|
|
112
|
+
// VersionTimelineEntry props
|
|
113
|
+
// ---------------------------------------------------------------------------
|
|
114
|
+
|
|
115
|
+
/** Props for {@link VersionTimelineEntry}. */
|
|
116
|
+
export interface VersionTimelineEntryProps {
|
|
117
|
+
/** The version entry data to render. */
|
|
118
|
+
readonly entry: VersionEntry;
|
|
119
|
+
/** Whether this entry is currently selected. */
|
|
120
|
+
readonly isSelected?: boolean;
|
|
121
|
+
/** Whether this entry is the first pick in compare mode (dashed border, "A" badge). */
|
|
122
|
+
readonly isCompareSource?: boolean;
|
|
123
|
+
/** Whether this is the last entry in the timeline (no connecting line below). */
|
|
124
|
+
readonly isLast?: boolean;
|
|
125
|
+
/** Called when this entry is clicked. */
|
|
126
|
+
readonly onSelect?: () => void;
|
|
127
|
+
/** Optional trailing content (e.g., action buttons). */
|
|
128
|
+
readonly trailing?: ReactNode;
|
|
129
|
+
}
|