@stigmer/react 0.0.71 → 0.0.73
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/agent/AgentEnvForm.d.ts +2 -0
- package/agent/AgentEnvForm.d.ts.map +1 -1
- package/agent/AgentEnvForm.js.map +1 -1
- package/agent/AgentPicker.d.ts +2 -0
- package/agent/AgentPicker.d.ts.map +1 -1
- package/agent/AgentPicker.js.map +1 -1
- package/agent/agentSetupReducer.d.ts +69 -7
- package/agent/agentSetupReducer.d.ts.map +1 -1
- package/agent/agentSetupReducer.js.map +1 -1
- package/agent/useAgentCount.d.ts +2 -0
- package/agent/useAgentCount.d.ts.map +1 -1
- package/agent/useAgentCount.js.map +1 -1
- package/attachment/AttachmentChipList.d.ts +15 -0
- package/attachment/AttachmentChipList.d.ts.map +1 -1
- package/attachment/AttachmentChipList.js +15 -0
- package/attachment/AttachmentChipList.js.map +1 -1
- package/attachment/useAttachments.d.ts +14 -0
- package/attachment/useAttachments.d.ts.map +1 -1
- package/attachment/useAttachments.js.map +1 -1
- package/composer/useComposer.d.ts +5 -0
- package/composer/useComposer.d.ts.map +1 -1
- package/composer/useComposer.js.map +1 -1
- package/execution/ExecutionPhaseBadge.d.ts +1 -1
- package/execution/ExecutionPhaseBadge.js +1 -1
- package/execution/McpToolDetail.d.ts +16 -8
- package/execution/McpToolDetail.d.ts.map +1 -1
- package/execution/McpToolDetail.js +0 -6
- package/execution/McpToolDetail.js.map +1 -1
- package/execution/TodoList.d.ts +8 -0
- package/execution/TodoList.d.ts.map +1 -1
- package/execution/TodoList.js +8 -0
- package/execution/TodoList.js.map +1 -1
- package/execution/ToolArgsView.d.ts +1 -0
- package/execution/ToolArgsView.d.ts.map +1 -1
- package/execution/ToolArgsView.js.map +1 -1
- package/execution/UsageWidget.d.ts +1 -1
- package/execution/UsageWidget.js +1 -1
- package/execution/file-path-resolver.d.ts +10 -0
- package/execution/file-path-resolver.d.ts.map +1 -1
- package/execution/file-path-resolver.js.map +1 -1
- package/execution/index.d.ts +1 -1
- package/execution/index.d.ts.map +1 -1
- package/execution/index.js.map +1 -1
- package/execution/useArtifactContent.d.ts +33 -0
- package/execution/useArtifactContent.d.ts.map +1 -1
- package/execution/useArtifactContent.js +33 -0
- package/execution/useArtifactContent.js.map +1 -1
- package/execution/useSubmitApproval.d.ts +2 -0
- package/execution/useSubmitApproval.d.ts.map +1 -1
- package/execution/useSubmitApproval.js.map +1 -1
- package/github/GitHubRepoPicker.d.ts +13 -0
- package/github/GitHubRepoPicker.d.ts.map +1 -1
- package/github/GitHubRepoPicker.js +13 -0
- package/github/GitHubRepoPicker.js.map +1 -1
- package/github/useGitHubConnection.d.ts +29 -1
- package/github/useGitHubConnection.d.ts.map +1 -1
- package/github/useGitHubConnection.js +29 -1
- package/github/useGitHubConnection.js.map +1 -1
- package/github/useGitHubRepos.d.ts +31 -0
- package/github/useGitHubRepos.d.ts.map +1 -1
- package/github/useGitHubRepos.js +31 -0
- package/github/useGitHubRepos.js.map +1 -1
- package/github/useGitHubSearch.d.ts +25 -0
- package/github/useGitHubSearch.d.ts.map +1 -1
- package/github/useGitHubSearch.js +25 -0
- package/github/useGitHubSearch.js.map +1 -1
- package/iam-policy/GrantAccessForm.d.ts +39 -0
- package/iam-policy/GrantAccessForm.d.ts.map +1 -0
- package/iam-policy/GrantAccessForm.js +75 -0
- package/iam-policy/GrantAccessForm.js.map +1 -0
- package/iam-policy/OrgMembersPanel.d.ts +28 -0
- package/iam-policy/OrgMembersPanel.d.ts.map +1 -0
- package/iam-policy/OrgMembersPanel.js +192 -0
- package/iam-policy/OrgMembersPanel.js.map +1 -0
- package/iam-policy/RoleSelector.d.ts +37 -0
- package/iam-policy/RoleSelector.d.ts.map +1 -0
- package/iam-policy/RoleSelector.js +42 -0
- package/iam-policy/RoleSelector.js.map +1 -0
- package/iam-policy/index.d.ts +12 -0
- package/iam-policy/index.d.ts.map +1 -0
- package/iam-policy/index.js +12 -0
- package/iam-policy/index.js.map +1 -0
- package/iam-policy/useCreateIamPolicy.d.ts +35 -0
- package/iam-policy/useCreateIamPolicy.d.ts.map +1 -0
- package/iam-policy/useCreateIamPolicy.js +46 -0
- package/iam-policy/useCreateIamPolicy.js.map +1 -0
- package/iam-policy/useDeleteIamPolicy.d.ts +34 -0
- package/iam-policy/useDeleteIamPolicy.d.ts.map +1 -0
- package/iam-policy/useDeleteIamPolicy.js +45 -0
- package/iam-policy/useDeleteIamPolicy.js.map +1 -0
- package/iam-policy/useGrantableRoles.d.ts +28 -0
- package/iam-policy/useGrantableRoles.d.ts.map +1 -0
- package/iam-policy/useGrantableRoles.js +32 -0
- package/iam-policy/useGrantableRoles.js.map +1 -0
- package/iam-policy/usePrincipalsCount.d.ts +31 -0
- package/iam-policy/usePrincipalsCount.d.ts.map +1 -0
- package/iam-policy/usePrincipalsCount.js +72 -0
- package/iam-policy/usePrincipalsCount.js.map +1 -0
- package/iam-policy/useResourceAccess.d.ts +51 -0
- package/iam-policy/useResourceAccess.d.ts.map +1 -0
- package/iam-policy/useResourceAccess.js +85 -0
- package/iam-policy/useResourceAccess.js.map +1 -0
- package/iam-policy/useRevokeOrgAccess.d.ts +36 -0
- package/iam-policy/useRevokeOrgAccess.d.ts.map +1 -0
- package/iam-policy/useRevokeOrgAccess.js +48 -0
- package/iam-policy/useRevokeOrgAccess.js.map +1 -0
- package/iam-policy/useRoleSelector.d.ts +52 -0
- package/iam-policy/useRoleSelector.d.ts.map +1 -0
- package/iam-policy/useRoleSelector.js +50 -0
- package/iam-policy/useRoleSelector.js.map +1 -0
- package/iam-policy/useWhoAmI.d.ts +30 -0
- package/iam-policy/useWhoAmI.d.ts.map +1 -0
- package/iam-policy/useWhoAmI.js +56 -0
- package/iam-policy/useWhoAmI.js.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts +39 -0
- package/identity-provider/CreateIdentityProviderForm.d.ts.map +1 -0
- package/identity-provider/CreateIdentityProviderForm.js +102 -0
- package/identity-provider/CreateIdentityProviderForm.js.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts +42 -0
- package/identity-provider/IdentityProviderDetailPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderDetailPanel.js +156 -0
- package/identity-provider/IdentityProviderDetailPanel.js.map +1 -0
- package/identity-provider/IdentityProviderListPanel.d.ts +41 -0
- package/identity-provider/IdentityProviderListPanel.d.ts.map +1 -0
- package/identity-provider/IdentityProviderListPanel.js +110 -0
- package/identity-provider/IdentityProviderListPanel.js.map +1 -0
- package/identity-provider/IdentityProviderWizard.d.ts +40 -0
- package/identity-provider/IdentityProviderWizard.d.ts.map +1 -0
- package/identity-provider/IdentityProviderWizard.js +180 -0
- package/identity-provider/IdentityProviderWizard.js.map +1 -0
- package/identity-provider/ProviderPicker.d.ts +28 -0
- package/identity-provider/ProviderPicker.d.ts.map +1 -0
- package/identity-provider/ProviderPicker.js +64 -0
- package/identity-provider/ProviderPicker.js.map +1 -0
- package/identity-provider/SsoLoginPrompt.d.ts +51 -0
- package/identity-provider/SsoLoginPrompt.d.ts.map +1 -0
- package/identity-provider/SsoLoginPrompt.js +119 -0
- package/identity-provider/SsoLoginPrompt.js.map +1 -0
- package/identity-provider/index.d.ts +14 -0
- package/identity-provider/index.d.ts.map +1 -0
- package/identity-provider/index.js +14 -0
- package/identity-provider/index.js.map +1 -0
- package/identity-provider/presets.d.ts +65 -0
- package/identity-provider/presets.d.ts.map +1 -0
- package/identity-provider/presets.js +200 -0
- package/identity-provider/presets.js.map +1 -0
- package/identity-provider/useCreateIdentityProvider.d.ts +37 -0
- package/identity-provider/useCreateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useCreateIdentityProvider.js +48 -0
- package/identity-provider/useCreateIdentityProvider.js.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts +34 -0
- package/identity-provider/useDeleteIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useDeleteIdentityProvider.js +45 -0
- package/identity-provider/useDeleteIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProvider.d.ts +37 -0
- package/identity-provider/useIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useIdentityProvider.js +62 -0
- package/identity-provider/useIdentityProvider.js.map +1 -0
- package/identity-provider/useIdentityProviderList.d.ts +48 -0
- package/identity-provider/useIdentityProviderList.d.ts.map +1 -0
- package/identity-provider/useIdentityProviderList.js +75 -0
- package/identity-provider/useIdentityProviderList.js.map +1 -0
- package/identity-provider/useOidcDiscovery.d.ts +39 -0
- package/identity-provider/useOidcDiscovery.d.ts.map +1 -0
- package/identity-provider/useOidcDiscovery.js +76 -0
- package/identity-provider/useOidcDiscovery.js.map +1 -0
- package/identity-provider/useSsoProvider.d.ts +50 -0
- package/identity-provider/useSsoProvider.d.ts.map +1 -0
- package/identity-provider/useSsoProvider.js +83 -0
- package/identity-provider/useSsoProvider.js.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts +38 -0
- package/identity-provider/useUpdateIdentityProvider.d.ts.map +1 -0
- package/identity-provider/useUpdateIdentityProvider.js +49 -0
- package/identity-provider/useUpdateIdentityProvider.js.map +1 -0
- package/index.d.ts +14 -5
- package/index.d.ts.map +1 -1
- package/index.js +10 -2
- package/index.js.map +1 -1
- package/internal/CloudFeatureNotice.d.ts +12 -0
- package/internal/CloudFeatureNotice.d.ts.map +1 -1
- package/internal/CloudFeatureNotice.js +12 -0
- package/internal/CloudFeatureNotice.js.map +1 -1
- package/invitation/InvitationCreatedAlert.d.ts +35 -0
- package/invitation/InvitationCreatedAlert.d.ts.map +1 -0
- package/invitation/InvitationCreatedAlert.js +60 -0
- package/invitation/InvitationCreatedAlert.js.map +1 -0
- package/invitation/InvitationManager.d.ts +44 -0
- package/invitation/InvitationManager.d.ts.map +1 -0
- package/invitation/InvitationManager.js +248 -0
- package/invitation/InvitationManager.js.map +1 -0
- package/invitation/InvitationRedemption.d.ts +69 -0
- package/invitation/InvitationRedemption.d.ts.map +1 -0
- package/invitation/InvitationRedemption.js +140 -0
- package/invitation/InvitationRedemption.js.map +1 -0
- package/invitation/index.d.ts +17 -0
- package/invitation/index.d.ts.map +1 -0
- package/invitation/index.js +9 -0
- package/invitation/index.js.map +1 -0
- package/invitation/useCreateInvitation.d.ts +52 -0
- package/invitation/useCreateInvitation.d.ts.map +1 -0
- package/invitation/useCreateInvitation.js +55 -0
- package/invitation/useCreateInvitation.js.map +1 -0
- package/invitation/useInvitationPreview.d.ts +51 -0
- package/invitation/useInvitationPreview.d.ts.map +1 -0
- package/invitation/useInvitationPreview.js +80 -0
- package/invitation/useInvitationPreview.js.map +1 -0
- package/invitation/useOrgInvitations.d.ts +36 -0
- package/invitation/useOrgInvitations.d.ts.map +1 -0
- package/invitation/useOrgInvitations.js +65 -0
- package/invitation/useOrgInvitations.js.map +1 -0
- package/invitation/useRedeemInvitation.d.ts +47 -0
- package/invitation/useRedeemInvitation.d.ts.map +1 -0
- package/invitation/useRedeemInvitation.js +53 -0
- package/invitation/useRedeemInvitation.js.map +1 -0
- package/invitation/useRevokeInvitation.d.ts +35 -0
- package/invitation/useRevokeInvitation.d.ts.map +1 -0
- package/invitation/useRevokeInvitation.js +47 -0
- package/invitation/useRevokeInvitation.js.map +1 -0
- package/library/detect-skill-package.d.ts +1 -0
- package/library/detect-skill-package.d.ts.map +1 -1
- package/library/detect-skill-package.js.map +1 -1
- package/library/detect-stigmer-resource.d.ts +1 -0
- package/library/detect-stigmer-resource.d.ts.map +1 -1
- package/library/detect-stigmer-resource.js.map +1 -1
- package/library/parse-resource-yaml.d.ts +4 -0
- package/library/parse-resource-yaml.d.ts.map +1 -1
- package/library/parse-resource-yaml.js.map +1 -1
- package/mcp-server/McpServerDetailView.d.ts +2 -2
- package/mcp-server/McpServerDetailView.d.ts.map +1 -1
- package/mcp-server/McpServerDetailView.js.map +1 -1
- package/mcp-server/index.d.ts +1 -1
- package/mcp-server/index.d.ts.map +1 -1
- package/mcp-server/index.js.map +1 -1
- package/mcp-server/mcpServerSetupReducer.d.ts +54 -0
- package/mcp-server/mcpServerSetupReducer.d.ts.map +1 -1
- package/mcp-server/mcpServerSetupReducer.js.map +1 -1
- package/models/ModelSelector.d.ts +9 -0
- package/models/ModelSelector.d.ts.map +1 -1
- package/models/ModelSelector.js +9 -0
- package/models/ModelSelector.js.map +1 -1
- package/models/registry.d.ts +11 -1
- package/models/registry.d.ts.map +1 -1
- package/models/registry.js.map +1 -1
- package/models/useModelRegistry.d.ts +20 -0
- package/models/useModelRegistry.d.ts.map +1 -1
- package/models/useModelRegistry.js +20 -0
- package/models/useModelRegistry.js.map +1 -1
- package/organization/OrgProfilePanel.d.ts +31 -0
- package/organization/OrgProfilePanel.d.ts.map +1 -0
- package/organization/OrgProfilePanel.js +147 -0
- package/organization/OrgProfilePanel.js.map +1 -0
- package/organization/index.d.ts +6 -0
- package/organization/index.d.ts.map +1 -1
- package/organization/index.js +3 -0
- package/organization/index.js.map +1 -1
- package/organization/useOrganization.d.ts +31 -0
- package/organization/useOrganization.d.ts.map +1 -0
- package/organization/useOrganization.js +56 -0
- package/organization/useOrganization.js.map +1 -0
- package/organization/useUpdateOrganization.d.ts +40 -0
- package/organization/useUpdateOrganization.d.ts.map +1 -0
- package/organization/useUpdateOrganization.js +51 -0
- package/organization/useUpdateOrganization.js.map +1 -0
- package/package.json +4 -4
- package/provider.d.ts +1 -0
- package/provider.d.ts.map +1 -1
- package/provider.js.map +1 -1
- package/search/useResourceList.d.ts +4 -2
- package/search/useResourceList.d.ts.map +1 -1
- package/search/useResourceList.js +2 -1
- package/search/useResourceList.js.map +1 -1
- package/search/useResourceSearch.d.ts +10 -2
- package/search/useResourceSearch.d.ts.map +1 -1
- package/search/useResourceSearch.js +2 -1
- package/search/useResourceSearch.js.map +1 -1
- package/session/group-sessions.d.ts +23 -0
- package/session/group-sessions.d.ts.map +1 -1
- package/session/group-sessions.js +23 -0
- package/session/group-sessions.js.map +1 -1
- package/session/index.d.ts +1 -1
- package/session/index.d.ts.map +1 -1
- package/session/index.js.map +1 -1
- package/session/useCreateSession.d.ts +11 -2
- package/session/useCreateSession.d.ts.map +1 -1
- package/session/useCreateSession.js.map +1 -1
- package/session/useSession.d.ts +24 -0
- package/session/useSession.d.ts.map +1 -1
- package/session/useSession.js +24 -0
- package/session/useSession.js.map +1 -1
- package/session/useSessionArtifacts.d.ts +1 -0
- package/session/useSessionArtifacts.d.ts.map +1 -1
- package/session/useSessionArtifacts.js.map +1 -1
- package/session/useSessionConversation.d.ts +7 -0
- package/session/useSessionConversation.d.ts.map +1 -1
- package/session/useSessionConversation.js.map +1 -1
- package/session/useSessionExecutions.d.ts +23 -0
- package/session/useSessionExecutions.d.ts.map +1 -1
- package/session/useSessionExecutions.js +23 -0
- package/session/useSessionExecutions.js.map +1 -1
- package/session/useSessionList.d.ts +19 -0
- package/session/useSessionList.d.ts.map +1 -1
- package/session/useSessionList.js +19 -0
- package/session/useSessionList.js.map +1 -1
- package/session/useSessionWriteBacks.d.ts +1 -0
- package/session/useSessionWriteBacks.d.ts.map +1 -1
- package/session/useSessionWriteBacks.js.map +1 -1
- package/session/useUpdateSession.d.ts +22 -0
- package/session/useUpdateSession.d.ts.map +1 -1
- package/session/useUpdateSession.js +22 -0
- package/session/useUpdateSession.js.map +1 -1
- package/skill/SkillPicker.d.ts +15 -0
- package/skill/SkillPicker.d.ts.map +1 -1
- package/skill/SkillPicker.js +15 -0
- package/skill/SkillPicker.js.map +1 -1
- package/src/agent/AgentEnvForm.tsx +2 -0
- package/src/agent/AgentPicker.tsx +2 -0
- package/src/agent/agentSetupReducer.ts +109 -20
- package/src/agent/useAgentCount.ts +2 -0
- package/src/attachment/AttachmentChipList.tsx +15 -0
- package/src/attachment/useAttachments.ts +14 -0
- package/src/composer/useComposer.ts +5 -0
- package/src/execution/ExecutionPhaseBadge.tsx +1 -1
- package/src/execution/McpToolDetail.tsx +18 -6
- package/src/execution/TodoList.tsx +8 -0
- package/src/execution/ToolArgsView.tsx +1 -0
- package/src/execution/UsageWidget.tsx +1 -1
- package/src/execution/file-path-resolver.ts +28 -4
- package/src/execution/index.ts +5 -1
- package/src/execution/useArtifactContent.ts +33 -0
- package/src/execution/useSubmitApproval.ts +2 -0
- package/src/github/GitHubRepoPicker.tsx +13 -0
- package/src/github/useGitHubConnection.ts +29 -1
- package/src/github/useGitHubRepos.ts +31 -0
- package/src/github/useGitHubSearch.ts +25 -0
- package/src/iam-policy/GrantAccessForm.tsx +198 -0
- package/src/iam-policy/OrgMembersPanel.tsx +572 -0
- package/src/iam-policy/RoleSelector.tsx +105 -0
- package/src/iam-policy/index.ts +51 -0
- package/src/iam-policy/useCreateIamPolicy.ts +66 -0
- package/src/iam-policy/useDeleteIamPolicy.ts +65 -0
- package/src/iam-policy/useGrantableRoles.ts +45 -0
- package/src/iam-policy/usePrincipalsCount.ts +96 -0
- package/src/iam-policy/useResourceAccess.ts +128 -0
- package/src/iam-policy/useRevokeOrgAccess.ts +74 -0
- package/src/iam-policy/useRoleSelector.ts +97 -0
- package/src/iam-policy/useWhoAmI.ts +78 -0
- package/src/identity-provider/CreateIdentityProviderForm.tsx +308 -0
- package/src/identity-provider/IdentityProviderDetailPanel.tsx +583 -0
- package/src/identity-provider/IdentityProviderListPanel.tsx +370 -0
- package/src/identity-provider/IdentityProviderWizard.tsx +684 -0
- package/src/identity-provider/ProviderPicker.tsx +152 -0
- package/src/identity-provider/SsoLoginPrompt.tsx +404 -0
- package/src/identity-provider/index.ts +67 -0
- package/src/identity-provider/presets.ts +262 -0
- package/src/identity-provider/useCreateIdentityProvider.ts +68 -0
- package/src/identity-provider/useDeleteIdentityProvider.ts +65 -0
- package/src/identity-provider/useIdentityProvider.ts +86 -0
- package/src/identity-provider/useIdentityProviderList.ts +100 -0
- package/src/identity-provider/useOidcDiscovery.ts +124 -0
- package/src/identity-provider/useSsoProvider.ts +99 -0
- package/src/identity-provider/useUpdateIdentityProvider.ts +69 -0
- package/src/index.ts +121 -1
- package/src/internal/CloudFeatureNotice.tsx +12 -0
- package/src/invitation/InvitationCreatedAlert.tsx +185 -0
- package/src/invitation/InvitationManager.tsx +842 -0
- package/src/invitation/InvitationRedemption.tsx +434 -0
- package/src/invitation/index.ts +16 -0
- package/src/invitation/useCreateInvitation.ts +83 -0
- package/src/invitation/useInvitationPreview.ts +103 -0
- package/src/invitation/useOrgInvitations.ts +88 -0
- package/src/invitation/useRedeemInvitation.ts +82 -0
- package/src/invitation/useRevokeInvitation.ts +66 -0
- package/src/library/detect-skill-package.ts +4 -1
- package/src/library/detect-stigmer-resource.ts +4 -1
- package/src/library/parse-resource-yaml.ts +12 -2
- package/src/mcp-server/McpServerDetailView.tsx +2 -1
- package/src/mcp-server/index.ts +4 -1
- package/src/mcp-server/mcpServerSetupReducer.ts +86 -8
- package/src/models/ModelSelector.tsx +9 -0
- package/src/models/registry.ts +11 -1
- package/src/models/useModelRegistry.ts +20 -0
- package/src/organization/OrgProfilePanel.tsx +451 -0
- package/src/organization/index.ts +6 -0
- package/src/organization/useOrganization.ts +79 -0
- package/src/organization/useUpdateOrganization.ts +71 -0
- package/src/provider.tsx +1 -0
- package/src/search/useResourceList.ts +6 -3
- package/src/search/useResourceSearch.ts +12 -3
- package/src/session/group-sessions.ts +23 -0
- package/src/session/index.ts +1 -0
- package/src/session/useCreateSession.ts +19 -3
- package/src/session/useSession.ts +24 -0
- package/src/session/useSessionArtifacts.ts +1 -0
- package/src/session/useSessionConversation.ts +7 -0
- package/src/session/useSessionExecutions.ts +23 -0
- package/src/session/useSessionList.ts +19 -0
- package/src/session/useSessionWriteBacks.ts +1 -0
- package/src/session/useUpdateSession.ts +22 -0
- package/src/skill/SkillPicker.tsx +15 -0
- package/src/usage/OrgUsagePanel.tsx +465 -0
- package/src/usage/date-range.ts +86 -0
- package/src/usage/index.ts +13 -0
- package/src/usage/useOrgUsageReport.ts +110 -0
- package/src/workspace/FolderBrowser.tsx +9 -0
- package/src/workspace/WorkspaceEditor.tsx +17 -0
- package/src/workspace/useFolderListing.ts +24 -0
- package/src/workspace/useWorkspaceEntries.ts +38 -0
- package/styles.css +1 -1
- package/usage/OrgUsagePanel.d.ts +24 -0
- package/usage/OrgUsagePanel.d.ts.map +1 -0
- package/usage/OrgUsagePanel.js +134 -0
- package/usage/OrgUsagePanel.js.map +1 -0
- package/usage/date-range.d.ts +36 -0
- package/usage/date-range.d.ts.map +1 -0
- package/usage/date-range.js +69 -0
- package/usage/date-range.js.map +1 -0
- package/usage/index.d.ts +7 -0
- package/usage/index.d.ts.map +1 -0
- package/usage/index.js +4 -0
- package/usage/index.js.map +1 -0
- package/usage/useOrgUsageReport.d.ts +48 -0
- package/usage/useOrgUsageReport.d.ts.map +1 -0
- package/usage/useOrgUsageReport.js +72 -0
- package/usage/useOrgUsageReport.js.map +1 -0
- package/workspace/FolderBrowser.d.ts +9 -0
- package/workspace/FolderBrowser.d.ts.map +1 -1
- package/workspace/FolderBrowser.js +9 -0
- package/workspace/FolderBrowser.js.map +1 -1
- package/workspace/WorkspaceEditor.d.ts +17 -0
- package/workspace/WorkspaceEditor.d.ts.map +1 -1
- package/workspace/WorkspaceEditor.js +17 -0
- package/workspace/WorkspaceEditor.js.map +1 -1
- package/workspace/useFolderListing.d.ts +24 -0
- package/workspace/useFolderListing.d.ts.map +1 -1
- package/workspace/useFolderListing.js +24 -0
- package/workspace/useFolderListing.js.map +1 -1
- package/workspace/useWorkspaceEntries.d.ts +38 -0
- package/workspace/useWorkspaceEntries.d.ts.map +1 -1
- package/workspace/useWorkspaceEntries.js +25 -0
- package/workspace/useWorkspaceEntries.js.map +1 -1
|
@@ -0,0 +1,152 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { cn } from "@stigmer/theme";
|
|
4
|
+
import { PROVIDER_PRESETS, type ProviderPreset } from "./presets";
|
|
5
|
+
|
|
6
|
+
/** Props for {@link ProviderPicker}. */
|
|
7
|
+
export interface ProviderPickerProps {
|
|
8
|
+
/** Fired when the user selects a provider preset. */
|
|
9
|
+
readonly onSelect: (preset: ProviderPreset) => void;
|
|
10
|
+
/** Additional CSS class names for the root container. */
|
|
11
|
+
readonly className?: string;
|
|
12
|
+
}
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Grid of well-known identity provider cards for the first step of
|
|
16
|
+
* the creation wizard.
|
|
17
|
+
*
|
|
18
|
+
* Each card shows an icon, provider name, and short description.
|
|
19
|
+
* Clicking a card fires {@link ProviderPickerProps.onSelect} with
|
|
20
|
+
* the corresponding {@link ProviderPreset}.
|
|
21
|
+
*
|
|
22
|
+
* The "Custom OIDC" card is visually distinct (dashed border) to
|
|
23
|
+
* signal that it triggers a different flow (OIDC Discovery).
|
|
24
|
+
*
|
|
25
|
+
* All visual properties flow through `--stgm-*` design tokens.
|
|
26
|
+
*
|
|
27
|
+
* @example
|
|
28
|
+
* ```tsx
|
|
29
|
+
* <ProviderPicker onSelect={(preset) => setSelectedPreset(preset)} />
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
export function ProviderPicker({ onSelect, className }: ProviderPickerProps) {
|
|
33
|
+
return (
|
|
34
|
+
<div
|
|
35
|
+
className={cn("grid grid-cols-2 gap-2 sm:grid-cols-3", className)}
|
|
36
|
+
role="listbox"
|
|
37
|
+
aria-label="Choose an identity provider"
|
|
38
|
+
>
|
|
39
|
+
{PROVIDER_PRESETS.map((preset) => (
|
|
40
|
+
<button
|
|
41
|
+
key={preset.id}
|
|
42
|
+
type="button"
|
|
43
|
+
role="option"
|
|
44
|
+
aria-selected={false}
|
|
45
|
+
onClick={() => onSelect(preset)}
|
|
46
|
+
className={cn(
|
|
47
|
+
"flex flex-col items-start gap-2 rounded-lg px-3 py-3 text-left transition-colors",
|
|
48
|
+
"border hover:border-primary/60 hover:bg-accent/30",
|
|
49
|
+
"focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",
|
|
50
|
+
preset.id === "custom"
|
|
51
|
+
? "border-dashed border-border"
|
|
52
|
+
: "border-border/60",
|
|
53
|
+
)}
|
|
54
|
+
>
|
|
55
|
+
<ProviderIcon presetId={preset.id} />
|
|
56
|
+
<div className="min-w-0">
|
|
57
|
+
<span className="block text-sm font-medium text-foreground">
|
|
58
|
+
{preset.label}
|
|
59
|
+
</span>
|
|
60
|
+
<span className="block text-[0.65rem] leading-tight text-muted-foreground">
|
|
61
|
+
{preset.description}
|
|
62
|
+
</span>
|
|
63
|
+
</div>
|
|
64
|
+
</button>
|
|
65
|
+
))}
|
|
66
|
+
</div>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
// ---------------------------------------------------------------------------
|
|
71
|
+
// Provider icons — simple thematic SVGs, one per preset
|
|
72
|
+
// ---------------------------------------------------------------------------
|
|
73
|
+
|
|
74
|
+
function ProviderIcon({ presetId }: { presetId: string }) {
|
|
75
|
+
const Icon = ICON_MAP[presetId] ?? DefaultIcon;
|
|
76
|
+
return (
|
|
77
|
+
<span className="flex size-8 items-center justify-center rounded-lg bg-muted">
|
|
78
|
+
<Icon />
|
|
79
|
+
</span>
|
|
80
|
+
);
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
const ICON_MAP: Record<string, React.ComponentType> = {
|
|
84
|
+
auth0: LockIcon,
|
|
85
|
+
okta: KeyIcon,
|
|
86
|
+
google: GlobeIcon,
|
|
87
|
+
"azure-ad": CloudIcon,
|
|
88
|
+
"aws-cognito": UsersIcon,
|
|
89
|
+
custom: CodeIcon,
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
function LockIcon() {
|
|
93
|
+
return (
|
|
94
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
95
|
+
<rect x="3.5" y="7" width="9" height="7" rx="1.5" />
|
|
96
|
+
<path d="M5.5 7V5a2.5 2.5 0 0 1 5 0v2" />
|
|
97
|
+
</svg>
|
|
98
|
+
);
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function KeyIcon() {
|
|
102
|
+
return (
|
|
103
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
104
|
+
<circle cx="5.5" cy="10" r="3" />
|
|
105
|
+
<path d="M8 8l5.5-5.5M11 5l2-0.5L13.5 2.5" />
|
|
106
|
+
</svg>
|
|
107
|
+
);
|
|
108
|
+
}
|
|
109
|
+
|
|
110
|
+
function GlobeIcon() {
|
|
111
|
+
return (
|
|
112
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
113
|
+
<circle cx="8" cy="8" r="6" />
|
|
114
|
+
<path d="M2 8h12M8 2c2 2 2.5 4 2.5 6S10 14 8 14c-2-2-2.5-4-2.5-6S6 2 8 2z" />
|
|
115
|
+
</svg>
|
|
116
|
+
);
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
function CloudIcon() {
|
|
120
|
+
return (
|
|
121
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
122
|
+
<path d="M4 12.5h8.5a3 3 0 0 0 0-6 .5.5 0 0 1-.5-.4A4.5 4.5 0 0 0 3.5 8v.5a3 3 0 0 0 .5 6z" />
|
|
123
|
+
</svg>
|
|
124
|
+
);
|
|
125
|
+
}
|
|
126
|
+
|
|
127
|
+
function UsersIcon() {
|
|
128
|
+
return (
|
|
129
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
130
|
+
<circle cx="6" cy="5" r="2.5" />
|
|
131
|
+
<path d="M1.5 14c0-2.5 2-4.5 4.5-4.5S10.5 11.5 10.5 14" />
|
|
132
|
+
<circle cx="11.5" cy="5.5" r="1.5" />
|
|
133
|
+
<path d="M14.5 14c0-1.5-1-3-2.5-3.5" />
|
|
134
|
+
</svg>
|
|
135
|
+
);
|
|
136
|
+
}
|
|
137
|
+
|
|
138
|
+
function CodeIcon() {
|
|
139
|
+
return (
|
|
140
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
141
|
+
<path d="M5 4.5L1.5 8 5 11.5M11 4.5l3.5 3.5-3.5 3.5M9 2.5l-2 11" />
|
|
142
|
+
</svg>
|
|
143
|
+
);
|
|
144
|
+
}
|
|
145
|
+
|
|
146
|
+
function DefaultIcon() {
|
|
147
|
+
return (
|
|
148
|
+
<svg width="16" height="16" viewBox="0 0 16 16" fill="none" stroke="currentColor" strokeWidth="1.5" strokeLinecap="round" strokeLinejoin="round" aria-hidden="true" className="text-muted-foreground">
|
|
149
|
+
<circle cx="8" cy="8" r="6" />
|
|
150
|
+
</svg>
|
|
151
|
+
);
|
|
152
|
+
}
|
|
@@ -0,0 +1,404 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useEffect, useRef, useState, type FormEvent, type KeyboardEvent } from "react";
|
|
4
|
+
import { cn } from "@stigmer/theme";
|
|
5
|
+
import { getUserMessage } from "@stigmer/sdk";
|
|
6
|
+
import type { SsoProviderInfo } from "@stigmer/protos/ai/stigmer/iam/identityprovider/v1/io_pb";
|
|
7
|
+
import { useSsoProvider } from "./useSsoProvider";
|
|
8
|
+
|
|
9
|
+
/** Props for {@link SsoLoginPrompt}. */
|
|
10
|
+
export interface SsoLoginPromptProps {
|
|
11
|
+
/**
|
|
12
|
+
* Pre-filled organization slug, typically read from a URL query
|
|
13
|
+
* parameter (e.g., `?org=acme`).
|
|
14
|
+
*
|
|
15
|
+
* When provided, the component auto-triggers the SSO provider
|
|
16
|
+
* lookup on mount, skipping the org input step.
|
|
17
|
+
*/
|
|
18
|
+
readonly initialOrg?: string;
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Called when the user clicks the SSO sign-in button.
|
|
22
|
+
*
|
|
23
|
+
* The consumer is responsible for the actual OIDC redirect — this
|
|
24
|
+
* component owns the discovery UI, not the authentication mechanics.
|
|
25
|
+
*/
|
|
26
|
+
readonly onSsoLogin: (provider: SsoProviderInfo, org: string) => void;
|
|
27
|
+
|
|
28
|
+
/** Additional CSS classes for the root container. */
|
|
29
|
+
readonly className?: string;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
type Phase =
|
|
33
|
+
| "input"
|
|
34
|
+
| "loading"
|
|
35
|
+
| "found"
|
|
36
|
+
| "not-found"
|
|
37
|
+
| "error";
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* Org-aware SSO discovery prompt.
|
|
41
|
+
*
|
|
42
|
+
* Guides the user through finding and connecting to their
|
|
43
|
+
* organization's SSO provider:
|
|
44
|
+
*
|
|
45
|
+
* 1. Enter an organization slug (or receive one via `initialOrg`)
|
|
46
|
+
* 2. The component calls {@link useSsoProvider} to look up the SSO
|
|
47
|
+
* configuration
|
|
48
|
+
* 3. If found, displays a prominent "Sign in with [provider]" button
|
|
49
|
+
* 4. If not found, displays a clear message
|
|
50
|
+
*
|
|
51
|
+
* Platform builders embed this component in their own login pages to
|
|
52
|
+
* offer SSO authentication. The Console composes it with an Auth0
|
|
53
|
+
* fallback and OIDC redirect handling.
|
|
54
|
+
*
|
|
55
|
+
* All visual properties flow through `--stgm-*` design tokens.
|
|
56
|
+
*
|
|
57
|
+
* @example
|
|
58
|
+
* ```tsx
|
|
59
|
+
* <SsoLoginPrompt
|
|
60
|
+
* initialOrg="acme"
|
|
61
|
+
* onSsoLogin={(provider, org) => {
|
|
62
|
+
* // Initiate OIDC redirect with provider.issuer, provider.oidcClientId
|
|
63
|
+
* }}
|
|
64
|
+
* />
|
|
65
|
+
* ```
|
|
66
|
+
*/
|
|
67
|
+
export function SsoLoginPrompt({
|
|
68
|
+
initialOrg,
|
|
69
|
+
onSsoLogin,
|
|
70
|
+
className,
|
|
71
|
+
}: SsoLoginPromptProps) {
|
|
72
|
+
const [orgInput, setOrgInput] = useState(initialOrg ?? "");
|
|
73
|
+
const [submittedOrg, setSubmittedOrg] = useState<string | null>(
|
|
74
|
+
initialOrg ?? null,
|
|
75
|
+
);
|
|
76
|
+
const { ssoProvider, isLoading, error } = useSsoProvider(submittedOrg);
|
|
77
|
+
const inputRef = useRef<HTMLInputElement>(null);
|
|
78
|
+
|
|
79
|
+
const phase = resolvePhase(submittedOrg, isLoading, ssoProvider, error);
|
|
80
|
+
|
|
81
|
+
// Focus the org input when returning to the input phase.
|
|
82
|
+
useEffect(() => {
|
|
83
|
+
if (phase === "input") {
|
|
84
|
+
inputRef.current?.focus();
|
|
85
|
+
}
|
|
86
|
+
}, [phase]);
|
|
87
|
+
|
|
88
|
+
const handleSubmitOrg = useCallback(
|
|
89
|
+
(e: FormEvent) => {
|
|
90
|
+
e.preventDefault();
|
|
91
|
+
const trimmed = orgInput.trim().toLowerCase();
|
|
92
|
+
if (trimmed) setSubmittedOrg(trimmed);
|
|
93
|
+
},
|
|
94
|
+
[orgInput],
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
const handleReset = useCallback(() => {
|
|
98
|
+
setSubmittedOrg(null);
|
|
99
|
+
setOrgInput("");
|
|
100
|
+
}, []);
|
|
101
|
+
|
|
102
|
+
const handleRetry = useCallback(() => {
|
|
103
|
+
if (submittedOrg) {
|
|
104
|
+
setSubmittedOrg(null);
|
|
105
|
+
// Re-trigger after clearing so the hook resets, then re-set.
|
|
106
|
+
queueMicrotask(() => setSubmittedOrg(submittedOrg));
|
|
107
|
+
}
|
|
108
|
+
}, [submittedOrg]);
|
|
109
|
+
|
|
110
|
+
const handleSsoClick = useCallback(() => {
|
|
111
|
+
if (ssoProvider && submittedOrg) {
|
|
112
|
+
onSsoLogin(ssoProvider, submittedOrg);
|
|
113
|
+
}
|
|
114
|
+
}, [ssoProvider, submittedOrg, onSsoLogin]);
|
|
115
|
+
|
|
116
|
+
const handleSsoKeyDown = useCallback(
|
|
117
|
+
(e: KeyboardEvent<HTMLButtonElement>) => {
|
|
118
|
+
if (e.key === "Enter" || e.key === " ") {
|
|
119
|
+
e.preventDefault();
|
|
120
|
+
handleSsoClick();
|
|
121
|
+
}
|
|
122
|
+
},
|
|
123
|
+
[handleSsoClick],
|
|
124
|
+
);
|
|
125
|
+
|
|
126
|
+
return (
|
|
127
|
+
<div
|
|
128
|
+
className={cn("w-full", className)}
|
|
129
|
+
role="region"
|
|
130
|
+
aria-label="SSO sign-in"
|
|
131
|
+
>
|
|
132
|
+
{phase === "input" && (
|
|
133
|
+
<OrgInputForm
|
|
134
|
+
ref={inputRef}
|
|
135
|
+
value={orgInput}
|
|
136
|
+
onChange={setOrgInput}
|
|
137
|
+
onSubmit={handleSubmitOrg}
|
|
138
|
+
/>
|
|
139
|
+
)}
|
|
140
|
+
|
|
141
|
+
{phase === "loading" && (
|
|
142
|
+
<LoadingState org={submittedOrg!} />
|
|
143
|
+
)}
|
|
144
|
+
|
|
145
|
+
{phase === "found" && ssoProvider && (
|
|
146
|
+
<FoundState
|
|
147
|
+
provider={ssoProvider}
|
|
148
|
+
org={submittedOrg!}
|
|
149
|
+
onClick={handleSsoClick}
|
|
150
|
+
onKeyDown={handleSsoKeyDown}
|
|
151
|
+
onChangeOrg={handleReset}
|
|
152
|
+
/>
|
|
153
|
+
)}
|
|
154
|
+
|
|
155
|
+
{phase === "not-found" && (
|
|
156
|
+
<NotFoundState org={submittedOrg!} onBack={handleReset} />
|
|
157
|
+
)}
|
|
158
|
+
|
|
159
|
+
{phase === "error" && error && (
|
|
160
|
+
<ErrorState error={error} onRetry={handleRetry} onBack={handleReset} />
|
|
161
|
+
)}
|
|
162
|
+
</div>
|
|
163
|
+
);
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
// ---------------------------------------------------------------------------
|
|
167
|
+
// Phase resolution
|
|
168
|
+
// ---------------------------------------------------------------------------
|
|
169
|
+
|
|
170
|
+
function resolvePhase(
|
|
171
|
+
submittedOrg: string | null,
|
|
172
|
+
isLoading: boolean,
|
|
173
|
+
ssoProvider: SsoProviderInfo | null,
|
|
174
|
+
error: Error | null,
|
|
175
|
+
): Phase {
|
|
176
|
+
if (!submittedOrg) return "input";
|
|
177
|
+
if (isLoading) return "loading";
|
|
178
|
+
if (error) return "error";
|
|
179
|
+
if (ssoProvider) return "found";
|
|
180
|
+
return "not-found";
|
|
181
|
+
}
|
|
182
|
+
|
|
183
|
+
// ---------------------------------------------------------------------------
|
|
184
|
+
// Sub-components
|
|
185
|
+
// ---------------------------------------------------------------------------
|
|
186
|
+
|
|
187
|
+
import { forwardRef } from "react";
|
|
188
|
+
|
|
189
|
+
interface OrgInputFormProps {
|
|
190
|
+
readonly value: string;
|
|
191
|
+
readonly onChange: (value: string) => void;
|
|
192
|
+
readonly onSubmit: (e: FormEvent) => void;
|
|
193
|
+
}
|
|
194
|
+
|
|
195
|
+
const OrgInputForm = forwardRef<HTMLInputElement, OrgInputFormProps>(
|
|
196
|
+
function OrgInputForm({ value, onChange, onSubmit }, ref) {
|
|
197
|
+
return (
|
|
198
|
+
<form onSubmit={onSubmit} className="space-y-3">
|
|
199
|
+
<label
|
|
200
|
+
htmlFor="sso-org-input"
|
|
201
|
+
className="block text-sm font-medium text-foreground"
|
|
202
|
+
>
|
|
203
|
+
Organization
|
|
204
|
+
</label>
|
|
205
|
+
<input
|
|
206
|
+
ref={ref}
|
|
207
|
+
id="sso-org-input"
|
|
208
|
+
type="text"
|
|
209
|
+
value={value}
|
|
210
|
+
onChange={(e) => onChange(e.target.value)}
|
|
211
|
+
placeholder="Enter your organization slug"
|
|
212
|
+
autoComplete="organization"
|
|
213
|
+
spellCheck={false}
|
|
214
|
+
className={cn(
|
|
215
|
+
"block w-full rounded-md border border-input bg-background px-3 py-2",
|
|
216
|
+
"text-sm text-foreground placeholder:text-muted-foreground",
|
|
217
|
+
"focus:outline-none focus:ring-2 focus:ring-ring",
|
|
218
|
+
"transition-colors",
|
|
219
|
+
)}
|
|
220
|
+
/>
|
|
221
|
+
<button
|
|
222
|
+
type="submit"
|
|
223
|
+
disabled={!value.trim()}
|
|
224
|
+
className={cn(
|
|
225
|
+
"w-full rounded-md px-4 py-2 text-sm font-medium",
|
|
226
|
+
"bg-primary text-primary-foreground",
|
|
227
|
+
"hover:bg-primary-hover",
|
|
228
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
229
|
+
"disabled:pointer-events-none disabled:opacity-50",
|
|
230
|
+
"transition-colors",
|
|
231
|
+
)}
|
|
232
|
+
>
|
|
233
|
+
Continue
|
|
234
|
+
</button>
|
|
235
|
+
</form>
|
|
236
|
+
);
|
|
237
|
+
},
|
|
238
|
+
);
|
|
239
|
+
|
|
240
|
+
function LoadingState({ org }: { org: string }) {
|
|
241
|
+
return (
|
|
242
|
+
<div
|
|
243
|
+
className="flex flex-col items-center gap-3 py-4"
|
|
244
|
+
aria-busy="true"
|
|
245
|
+
aria-label={`Looking up SSO provider for ${org}`}
|
|
246
|
+
>
|
|
247
|
+
<SpinnerIcon />
|
|
248
|
+
<p className="text-sm text-muted-foreground">
|
|
249
|
+
Looking up <span className="font-medium text-foreground">{org}</span>…
|
|
250
|
+
</p>
|
|
251
|
+
</div>
|
|
252
|
+
);
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
function FoundState({
|
|
256
|
+
provider,
|
|
257
|
+
org,
|
|
258
|
+
onClick,
|
|
259
|
+
onKeyDown,
|
|
260
|
+
onChangeOrg,
|
|
261
|
+
}: {
|
|
262
|
+
provider: SsoProviderInfo;
|
|
263
|
+
org: string;
|
|
264
|
+
onClick: () => void;
|
|
265
|
+
onKeyDown: (e: KeyboardEvent<HTMLButtonElement>) => void;
|
|
266
|
+
onChangeOrg: () => void;
|
|
267
|
+
}) {
|
|
268
|
+
return (
|
|
269
|
+
<div className="space-y-4">
|
|
270
|
+
<div className="text-center">
|
|
271
|
+
<p className="text-xs text-muted-foreground">
|
|
272
|
+
Signing in to{" "}
|
|
273
|
+
<span className="font-medium text-foreground">{org}</span>
|
|
274
|
+
</p>
|
|
275
|
+
</div>
|
|
276
|
+
|
|
277
|
+
<button
|
|
278
|
+
type="button"
|
|
279
|
+
onClick={onClick}
|
|
280
|
+
onKeyDown={onKeyDown}
|
|
281
|
+
className={cn(
|
|
282
|
+
"flex w-full items-center justify-center gap-2 rounded-md px-4 py-2.5",
|
|
283
|
+
"text-sm font-medium",
|
|
284
|
+
"bg-primary text-primary-foreground",
|
|
285
|
+
"hover:bg-primary-hover",
|
|
286
|
+
"focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring",
|
|
287
|
+
"transition-colors",
|
|
288
|
+
)}
|
|
289
|
+
>
|
|
290
|
+
<SsoShieldIcon />
|
|
291
|
+
Sign in with {provider.displayName}
|
|
292
|
+
</button>
|
|
293
|
+
|
|
294
|
+
<button
|
|
295
|
+
type="button"
|
|
296
|
+
onClick={onChangeOrg}
|
|
297
|
+
className="block w-full text-center text-xs text-muted-foreground hover:text-foreground transition-colors"
|
|
298
|
+
>
|
|
299
|
+
Not your organization? Change
|
|
300
|
+
</button>
|
|
301
|
+
</div>
|
|
302
|
+
);
|
|
303
|
+
}
|
|
304
|
+
|
|
305
|
+
function NotFoundState({
|
|
306
|
+
org,
|
|
307
|
+
onBack,
|
|
308
|
+
}: {
|
|
309
|
+
org: string;
|
|
310
|
+
onBack: () => void;
|
|
311
|
+
}) {
|
|
312
|
+
return (
|
|
313
|
+
<div className="space-y-3 text-center">
|
|
314
|
+
<p className="text-sm text-muted-foreground">
|
|
315
|
+
No SSO provider configured for{" "}
|
|
316
|
+
<span className="font-medium text-foreground">{org}</span>.
|
|
317
|
+
</p>
|
|
318
|
+
<button
|
|
319
|
+
type="button"
|
|
320
|
+
onClick={onBack}
|
|
321
|
+
className="text-xs text-primary hover:text-primary-hover transition-colors"
|
|
322
|
+
>
|
|
323
|
+
Try a different organization
|
|
324
|
+
</button>
|
|
325
|
+
</div>
|
|
326
|
+
);
|
|
327
|
+
}
|
|
328
|
+
|
|
329
|
+
function ErrorState({
|
|
330
|
+
error,
|
|
331
|
+
onRetry,
|
|
332
|
+
onBack,
|
|
333
|
+
}: {
|
|
334
|
+
error: Error;
|
|
335
|
+
onRetry: () => void;
|
|
336
|
+
onBack: () => void;
|
|
337
|
+
}) {
|
|
338
|
+
return (
|
|
339
|
+
<div className="space-y-3 text-center" role="alert">
|
|
340
|
+
<p className="text-sm text-destructive">{getUserMessage(error)}</p>
|
|
341
|
+
<div className="flex items-center justify-center gap-3">
|
|
342
|
+
<button
|
|
343
|
+
type="button"
|
|
344
|
+
onClick={onRetry}
|
|
345
|
+
className={cn(
|
|
346
|
+
"rounded-md px-3 py-1.5 text-xs font-medium",
|
|
347
|
+
"bg-primary text-primary-foreground hover:bg-primary-hover",
|
|
348
|
+
"transition-colors",
|
|
349
|
+
)}
|
|
350
|
+
>
|
|
351
|
+
Retry
|
|
352
|
+
</button>
|
|
353
|
+
<button
|
|
354
|
+
type="button"
|
|
355
|
+
onClick={onBack}
|
|
356
|
+
className="text-xs text-muted-foreground hover:text-foreground transition-colors"
|
|
357
|
+
>
|
|
358
|
+
Back
|
|
359
|
+
</button>
|
|
360
|
+
</div>
|
|
361
|
+
</div>
|
|
362
|
+
);
|
|
363
|
+
}
|
|
364
|
+
|
|
365
|
+
// ---------------------------------------------------------------------------
|
|
366
|
+
// Icons
|
|
367
|
+
// ---------------------------------------------------------------------------
|
|
368
|
+
|
|
369
|
+
function SpinnerIcon() {
|
|
370
|
+
return (
|
|
371
|
+
<svg
|
|
372
|
+
width="20"
|
|
373
|
+
height="20"
|
|
374
|
+
viewBox="0 0 16 16"
|
|
375
|
+
fill="none"
|
|
376
|
+
stroke="currentColor"
|
|
377
|
+
strokeWidth="2"
|
|
378
|
+
strokeLinecap="round"
|
|
379
|
+
className="animate-spin text-muted-foreground"
|
|
380
|
+
aria-hidden="true"
|
|
381
|
+
>
|
|
382
|
+
<path d="M8 2a6 6 0 1 0 6 6" />
|
|
383
|
+
</svg>
|
|
384
|
+
);
|
|
385
|
+
}
|
|
386
|
+
|
|
387
|
+
function SsoShieldIcon() {
|
|
388
|
+
return (
|
|
389
|
+
<svg
|
|
390
|
+
width="16"
|
|
391
|
+
height="16"
|
|
392
|
+
viewBox="0 0 16 16"
|
|
393
|
+
fill="none"
|
|
394
|
+
stroke="currentColor"
|
|
395
|
+
strokeWidth="1.5"
|
|
396
|
+
strokeLinecap="round"
|
|
397
|
+
strokeLinejoin="round"
|
|
398
|
+
aria-hidden="true"
|
|
399
|
+
>
|
|
400
|
+
<path d="M8 1.5L2 4v4c0 3.5 2.5 5.5 6 7 3.5-1.5 6-3.5 6-7V4L8 1.5z" />
|
|
401
|
+
<path d="M6 8l1.5 1.5L10 6.5" />
|
|
402
|
+
</svg>
|
|
403
|
+
);
|
|
404
|
+
}
|
|
@@ -0,0 +1,67 @@
|
|
|
1
|
+
export {
|
|
2
|
+
useIdentityProviderList,
|
|
3
|
+
type UseIdentityProviderListReturn,
|
|
4
|
+
} from "./useIdentityProviderList";
|
|
5
|
+
|
|
6
|
+
export {
|
|
7
|
+
useIdentityProvider,
|
|
8
|
+
type UseIdentityProviderReturn,
|
|
9
|
+
} from "./useIdentityProvider";
|
|
10
|
+
|
|
11
|
+
export {
|
|
12
|
+
useSsoProvider,
|
|
13
|
+
type UseSsoProviderReturn,
|
|
14
|
+
} from "./useSsoProvider";
|
|
15
|
+
|
|
16
|
+
export {
|
|
17
|
+
useCreateIdentityProvider,
|
|
18
|
+
type UseCreateIdentityProviderReturn,
|
|
19
|
+
} from "./useCreateIdentityProvider";
|
|
20
|
+
|
|
21
|
+
export {
|
|
22
|
+
useUpdateIdentityProvider,
|
|
23
|
+
type UseUpdateIdentityProviderReturn,
|
|
24
|
+
} from "./useUpdateIdentityProvider";
|
|
25
|
+
|
|
26
|
+
export {
|
|
27
|
+
useDeleteIdentityProvider,
|
|
28
|
+
type UseDeleteIdentityProviderReturn,
|
|
29
|
+
} from "./useDeleteIdentityProvider";
|
|
30
|
+
|
|
31
|
+
export {
|
|
32
|
+
IdentityProviderListPanel,
|
|
33
|
+
type IdentityProviderListPanelProps,
|
|
34
|
+
} from "./IdentityProviderListPanel";
|
|
35
|
+
|
|
36
|
+
export {
|
|
37
|
+
CreateIdentityProviderForm,
|
|
38
|
+
type CreateIdentityProviderFormProps,
|
|
39
|
+
} from "./CreateIdentityProviderForm";
|
|
40
|
+
|
|
41
|
+
export {
|
|
42
|
+
type ProviderPreset,
|
|
43
|
+
type ProviderVariable,
|
|
44
|
+
type ProviderConfig,
|
|
45
|
+
PROVIDER_PRESETS,
|
|
46
|
+
getPreset,
|
|
47
|
+
} from "./presets";
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
ProviderPicker,
|
|
51
|
+
type ProviderPickerProps,
|
|
52
|
+
} from "./ProviderPicker";
|
|
53
|
+
|
|
54
|
+
export {
|
|
55
|
+
IdentityProviderWizard,
|
|
56
|
+
type IdentityProviderWizardProps,
|
|
57
|
+
} from "./IdentityProviderWizard";
|
|
58
|
+
|
|
59
|
+
export {
|
|
60
|
+
IdentityProviderDetailPanel,
|
|
61
|
+
type IdentityProviderDetailPanelProps,
|
|
62
|
+
} from "./IdentityProviderDetailPanel";
|
|
63
|
+
|
|
64
|
+
export {
|
|
65
|
+
SsoLoginPrompt,
|
|
66
|
+
type SsoLoginPromptProps,
|
|
67
|
+
} from "./SsoLoginPrompt";
|