@stigmer/react 0.0.99 → 0.0.101
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/index.d.ts +17 -3
- package/index.d.ts.map +1 -1
- package/index.js +16 -3
- package/index.js.map +1 -1
- package/internal/menu.d.ts +17 -0
- package/internal/menu.d.ts.map +1 -0
- package/internal/menu.js +43 -0
- package/internal/menu.js.map +1 -0
- package/library/LibraryBreadcrumbContext.d.ts +30 -0
- package/library/LibraryBreadcrumbContext.d.ts.map +1 -0
- package/library/LibraryBreadcrumbContext.js +39 -0
- package/library/LibraryBreadcrumbContext.js.map +1 -0
- package/library/index.d.ts +1 -0
- package/library/index.d.ts.map +1 -1
- package/library/index.js +1 -0
- package/library/index.js.map +1 -1
- package/organization/OrgProvider.d.ts +59 -0
- package/organization/OrgProvider.d.ts.map +1 -0
- package/organization/OrgProvider.js +130 -0
- package/organization/OrgProvider.js.map +1 -0
- package/organization/OrgSwitcher.d.ts +36 -0
- package/organization/OrgSwitcher.d.ts.map +1 -0
- package/organization/OrgSwitcher.js +73 -0
- package/organization/OrgSwitcher.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/useOrgGate.d.ts +101 -0
- package/organization/useOrgGate.d.ts.map +1 -0
- package/organization/useOrgGate.js +99 -0
- package/organization/useOrgGate.js.map +1 -0
- package/package.json +5 -4
- package/runner/RunnerListPanel.d.ts +13 -8
- package/runner/RunnerListPanel.d.ts.map +1 -1
- package/runner/RunnerListPanel.js +10 -6
- package/runner/RunnerListPanel.js.map +1 -1
- package/settings/ApiKeysSection.d.ts +3 -0
- package/settings/ApiKeysSection.d.ts.map +1 -0
- package/settings/ApiKeysSection.js +30 -0
- package/settings/ApiKeysSection.js.map +1 -0
- package/settings/EnvironmentsSection.d.ts +3 -0
- package/settings/EnvironmentsSection.d.ts.map +1 -0
- package/settings/EnvironmentsSection.js +49 -0
- package/settings/EnvironmentsSection.js.map +1 -0
- package/settings/IdentityProvidersSection.d.ts +12 -0
- package/settings/IdentityProvidersSection.d.ts.map +1 -0
- package/settings/IdentityProvidersSection.js +34 -0
- package/settings/IdentityProvidersSection.js.map +1 -0
- package/settings/InvitationsSection.d.ts +3 -0
- package/settings/InvitationsSection.d.ts.map +1 -0
- package/settings/InvitationsSection.js +13 -0
- package/settings/InvitationsSection.js.map +1 -0
- package/settings/MembersSection.d.ts +3 -0
- package/settings/MembersSection.d.ts.map +1 -0
- package/settings/MembersSection.js +14 -0
- package/settings/MembersSection.js.map +1 -0
- package/settings/OAuthAppsSection.d.ts +3 -0
- package/settings/OAuthAppsSection.d.ts.map +1 -0
- package/settings/OAuthAppsSection.js +33 -0
- package/settings/OAuthAppsSection.js.map +1 -0
- package/settings/OrgProfileSection.d.ts +3 -0
- package/settings/OrgProfileSection.d.ts.map +1 -0
- package/settings/OrgProfileSection.js +15 -0
- package/settings/OrgProfileSection.js.map +1 -0
- package/settings/PlatformClientsSection.d.ts +3 -0
- package/settings/PlatformClientsSection.d.ts.map +1 -0
- package/settings/PlatformClientsSection.js +48 -0
- package/settings/PlatformClientsSection.js.map +1 -0
- package/settings/UsageSection.d.ts +3 -0
- package/settings/UsageSection.d.ts.map +1 -0
- package/settings/UsageSection.js +14 -0
- package/settings/UsageSection.js.map +1 -0
- package/settings/index.d.ts +13 -0
- package/settings/index.d.ts.map +1 -0
- package/settings/index.js +11 -0
- package/settings/index.js.map +1 -0
- package/settings/settings-nav.d.ts +25 -0
- package/settings/settings-nav.d.ts.map +1 -0
- package/settings/settings-nav.js +41 -0
- package/settings/settings-nav.js.map +1 -0
- package/src/index.ts +32 -1
- package/src/internal/menu.tsx +160 -0
- package/src/library/LibraryBreadcrumbContext.tsx +70 -0
- package/src/library/index.ts +6 -0
- package/src/organization/OrgProvider.tsx +184 -0
- package/src/organization/OrgSwitcher.tsx +275 -0
- package/src/organization/index.ts +10 -0
- package/src/organization/useOrgGate.ts +183 -0
- package/src/runner/RunnerListPanel.tsx +14 -9
- package/src/settings/ApiKeysSection.tsx +96 -0
- package/src/settings/EnvironmentsSection.tsx +162 -0
- package/src/settings/IdentityProvidersSection.tsx +123 -0
- package/src/settings/InvitationsSection.tsx +42 -0
- package/src/settings/MembersSection.tsx +41 -0
- package/src/settings/OAuthAppsSection.tsx +100 -0
- package/src/settings/OrgProfileSection.tsx +41 -0
- package/src/settings/PlatformClientsSection.tsx +149 -0
- package/src/settings/UsageSection.tsx +41 -0
- package/src/settings/index.ts +13 -0
- package/src/settings/settings-nav.ts +78 -0
- package/src/user/UserMenu.tsx +241 -0
- package/src/user/index.ts +2 -0
- package/styles.css +1 -1
- package/user/UserMenu.d.ts +82 -0
- package/user/UserMenu.d.ts.map +1 -0
- package/user/UserMenu.js +51 -0
- package/user/UserMenu.js.map +1 -0
- package/user/index.d.ts +3 -0
- package/user/index.d.ts.map +1 -0
- package/user/index.js +2 -0
- package/user/index.js.map +1 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useEffect, useRef, useState } from "react";
|
|
4
|
+
import { getUserMessage } from "@stigmer/sdk";
|
|
5
|
+
import { usePersonalEnvironment } from "../environment/usePersonalEnvironment";
|
|
6
|
+
import { EnvironmentVariableEditor } from "../environment/EnvironmentVariableEditor";
|
|
7
|
+
import { EnvironmentListPanel } from "../environment/EnvironmentListPanel";
|
|
8
|
+
import { CreateEnvironmentForm } from "../environment/CreateEnvironmentForm";
|
|
9
|
+
import { useActiveOrgSlug } from "../organization/OrgProvider";
|
|
10
|
+
const ENV_EXCLUDE_LABELS = [
|
|
11
|
+
{ "stigmer.ai/personal": "true" },
|
|
12
|
+
{ "stigmer.ai/managed": "true" },
|
|
13
|
+
];
|
|
14
|
+
/** Settings section for personal and organization environment variables. */
|
|
15
|
+
export function EnvironmentsSection() {
|
|
16
|
+
const org = useActiveOrgSlug();
|
|
17
|
+
return (_jsxs("div", { className: "space-y-10", children: [_jsx(PersonalEnvironmentCard, { org: org }), _jsx(EnvironmentsCard, { org: org })] }));
|
|
18
|
+
}
|
|
19
|
+
function PersonalEnvironmentCard({ org }) {
|
|
20
|
+
const { environment, isLoading, error, getOrCreate, isMutating, } = usePersonalEnvironment(org || null);
|
|
21
|
+
const bootstrapAttempted = useRef(false);
|
|
22
|
+
useEffect(() => {
|
|
23
|
+
bootstrapAttempted.current = false;
|
|
24
|
+
}, [org]);
|
|
25
|
+
useEffect(() => {
|
|
26
|
+
if (!org || isLoading || environment || bootstrapAttempted.current)
|
|
27
|
+
return;
|
|
28
|
+
bootstrapAttempted.current = true;
|
|
29
|
+
getOrCreate().catch(() => { });
|
|
30
|
+
}, [org, isLoading, environment, getOrCreate]);
|
|
31
|
+
const environmentId = environment?.metadata?.id;
|
|
32
|
+
return (_jsxs("section", { "aria-labelledby": "personal-env-heading", children: [_jsxs("div", { className: "mb-3 flex items-baseline gap-2", children: [_jsx("h2", { id: "personal-env-heading", className: "text-foreground text-sm font-semibold", children: "Personal Environment" }), _jsx("span", { className: "bg-primary-subtle text-primary rounded-full px-2 py-0.5 text-[0.6rem] font-medium uppercase tracking-wider", children: "You" })] }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Your private secrets and configuration, automatically managed for you. Only visible to you \u2014 used when running agents that require your personal credentials." }), isLoading || isMutating ? (_jsx(SkeletonRows, { count: 3 })) : error ? (_jsx("p", { className: "text-destructive text-xs", role: "alert", children: getUserMessage(error) })) : environmentId ? (_jsx(EnvironmentVariableEditor, { environmentId: environmentId })) : (_jsx("p", { className: "text-muted-foreground text-xs", children: "Your personal environment will be created automatically when needed." }))] }));
|
|
33
|
+
}
|
|
34
|
+
function EnvironmentsCard({ org }) {
|
|
35
|
+
const [showCreate, setShowCreate] = useState(false);
|
|
36
|
+
const listRefetchRef = useRef(null);
|
|
37
|
+
const handleRefetchRef = useCallback((refetch) => {
|
|
38
|
+
listRefetchRef.current = refetch;
|
|
39
|
+
}, []);
|
|
40
|
+
const handleCreated = useCallback(() => {
|
|
41
|
+
setShowCreate(false);
|
|
42
|
+
listRefetchRef.current?.();
|
|
43
|
+
}, []);
|
|
44
|
+
return (_jsxs("section", { "aria-labelledby": "org-env-heading", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between", children: [_jsx("h2", { id: "org-env-heading", className: "text-foreground text-sm font-semibold", children: "Environments" }), !showCreate && (_jsx("button", { type: "button", onClick: () => setShowCreate(true), className: "text-primary hover:text-foreground text-xs font-medium transition-colors", children: "+ New environment" }))] }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Named environments for your organization. Store credentials, API tokens, and configuration that agents need at runtime." }), showCreate && (_jsx("div", { className: "border-border bg-card mb-4 rounded-lg border p-4", children: _jsx(CreateEnvironmentForm, { org: org, onCreated: handleCreated, onCancel: () => setShowCreate(false) }) })), org ? (_jsx(EnvironmentListPanel, { org: org, excludeLabels: ENV_EXCLUDE_LABELS, onRefetchRef: handleRefetchRef })) : (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to view environments." }))] }));
|
|
45
|
+
}
|
|
46
|
+
function SkeletonRows({ count }) {
|
|
47
|
+
return (_jsx("div", { className: "space-y-2", "aria-busy": "true", "aria-label": "Loading", children: Array.from({ length: count }, (_, i) => (_jsx("div", { className: "bg-muted-subtle h-8 animate-pulse rounded", style: { width: `${85 - i * 10}%` } }, i))) }));
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=EnvironmentsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EnvironmentsSection.js","sourceRoot":"","sources":["../../src/settings/EnvironmentsSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AACjE,OAAO,EAAE,cA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1,12 @@
|
|
|
1
|
+
/** Props for {@link IdentityProvidersSection}. */
|
|
2
|
+
export interface IdentityProvidersSectionProps {
|
|
3
|
+
/**
|
|
4
|
+
* Base URL used to construct the SSO login link shown in the detail panel.
|
|
5
|
+
* Defaults to `window.location.origin` when omitted (correct for web apps).
|
|
6
|
+
* Desktop apps should pass the cloud console origin instead.
|
|
7
|
+
*/
|
|
8
|
+
readonly ssoLoginBaseUrl?: string;
|
|
9
|
+
}
|
|
10
|
+
/** Settings section for configuring OIDC identity providers. */
|
|
11
|
+
export declare function IdentityProvidersSection({ ssoLoginBaseUrl, }?: IdentityProvidersSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=IdentityProvidersSection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityProvidersSection.d.ts","sourceRoot":"","sources":["../../src/settings/IdentityProvidersSection.tsx"],"names":[],"mappings":"AAWA,kDAAkD;AAClD,MAAM,WAAW,6BAA6B;IAC5C;;;;OAIG;IACH,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;CACnC;AAOD,gEAAgE;AAChE,wBAAgB,wBAAwB,CAAC,EACvC,eAAe,GAChB,GAAE,6BAAkC,2CA6FpC"}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useRef, useState } from "react";
|
|
4
|
+
import { IdentityProviderListPanel } from "../identity-provider/IdentityProviderListPanel";
|
|
5
|
+
import { IdentityProviderWizard } from "../identity-provider/IdentityProviderWizard";
|
|
6
|
+
import { IdentityProviderDetailPanel } from "../identity-provider/IdentityProviderDetailPanel";
|
|
7
|
+
import { useResourceAvailable, ApiResourceKind } from "../deployment-mode";
|
|
8
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
9
|
+
import { useOrg } from "../organization/OrgProvider";
|
|
10
|
+
/** Settings section for configuring OIDC identity providers. */
|
|
11
|
+
export function IdentityProvidersSection({ ssoLoginBaseUrl, } = {}) {
|
|
12
|
+
const { activeOrg } = useOrg();
|
|
13
|
+
const idpAvailable = useResourceAvailable(ApiResourceKind.identity_provider);
|
|
14
|
+
const orgSlug = activeOrg?.metadata?.slug ?? "";
|
|
15
|
+
const [flow, setFlow] = useState({ phase: "idle" });
|
|
16
|
+
const listRefetchRef = useRef(null);
|
|
17
|
+
const handleRefetchRef = useCallback((refetch) => {
|
|
18
|
+
listRefetchRef.current = refetch;
|
|
19
|
+
}, []);
|
|
20
|
+
const handleCreated = useCallback(() => {
|
|
21
|
+
listRefetchRef.current?.();
|
|
22
|
+
setFlow({ phase: "idle" });
|
|
23
|
+
}, []);
|
|
24
|
+
const handleUpdated = useCallback(() => {
|
|
25
|
+
listRefetchRef.current?.();
|
|
26
|
+
setFlow({ phase: "idle" });
|
|
27
|
+
}, []);
|
|
28
|
+
const baseUrl = ssoLoginBaseUrl ??
|
|
29
|
+
(typeof window !== "undefined" ? window.location.origin : "");
|
|
30
|
+
return (_jsxs("section", { "aria-labelledby": "identity-providers-heading", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between", children: [_jsx("h2", { id: "identity-providers-heading", className: "text-foreground text-sm font-semibold", children: "Identity Providers" }), idpAvailable && orgSlug && flow.phase === "idle" && (_jsx("button", { type: "button", onClick: () => setFlow({ phase: "creating" }), className: "text-primary hover:text-foreground text-xs font-medium transition-colors", children: "+ New identity provider" }))] }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Identity providers define external OIDC trust relationships for federated authentication. Configure providers for platform-managed organizations or self-managed SSO." }), !idpAvailable ? (_jsx(CloudFeatureNotice, { children: "Identity providers are not available in local mode. Federated authentication requires Stigmer Cloud." })) : !orgSlug ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to manage identity providers." })) : flow.phase === "creating" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(IdentityProviderWizard, { org: orgSlug, onCreated: handleCreated, onCancel: () => setFlow({ phase: "idle" }) }) })) : flow.phase === "editing" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(IdentityProviderDetailPanel, { identityProvider: flow.identityProvider, ssoLoginUrl: flow.identityProvider.spec?.isSsoProvider
|
|
31
|
+
? `${baseUrl}/login?org=${orgSlug}`
|
|
32
|
+
: undefined, onUpdated: handleUpdated, onBack: () => setFlow({ phase: "idle" }) }) })) : (_jsx(IdentityProviderListPanel, { org: orgSlug, onEdit: (idp) => setFlow({ phase: "editing", identityProvider: idp }), onRefetchRef: handleRefetchRef }))] }));
|
|
33
|
+
}
|
|
34
|
+
//# sourceMappingURL=IdentityProvidersSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"IdentityProvidersSection.js","sourceRoot":"","sources":["../../src/settings/IdentityProvidersSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAEtD,OAAO,EAAE,yBAAyB,EAAE,MAAM,gDAAgD,CAAC;AAC3F,OAAO,EAAE,sBAAsB,EAAE,MAAM,6CAA6C,CAAC;AACrF,OAAO,EAAE,2BAA2B,EAAE,MAAM,kDAAkD,CAAC;AAC/F,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAiBrD,gEAAgE;AAChE,MAAM,UAAU,wBAAwB,CAAC,EACvC,eAAe,MACkB,EAAE;IACnC,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/B,MAAM,YAAY,GAAG,oBAAoB,CAAC,eAAe,CAAC,iBAAiB,CAAC,CAAC;IAC7E,MAAM,O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ts","sourceRoot":"","sources":["../../src/settings/InvitationsSection.tsx"],"names":[],"mappings":"AAOA,2EAA2E;AAC3E,wBAAgB,kBAAkB,4CAiCjC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { InvitationManager } from "../invitation/InvitationManager";
|
|
4
|
+
import { useResourceAvailable, ApiResourceKind } from "../deployment-mode";
|
|
5
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
6
|
+
import { useActiveOrgSlug } from "../organization/OrgProvider";
|
|
7
|
+
/** Settings section for creating and managing organization invitations. */
|
|
8
|
+
export function InvitationsSection() {
|
|
9
|
+
const org = useActiveOrgSlug();
|
|
10
|
+
const invitationsAvailable = useResourceAvailable(ApiResourceKind.invitation);
|
|
11
|
+
return (_jsxs("section", { "aria-labelledby": "invitations-heading", children: [_jsx("div", { className: "mb-3", children: _jsx("h2", { id: "invitations-heading", className: "text-foreground text-sm font-semibold", children: "Invitations" }) }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Shareable invite links that grant organization membership with a configurable role. Create single-use links for specific people or multi-use links for public sharing." }), !invitationsAvailable ? (_jsx(CloudFeatureNotice, { children: "Invitations are not available in local mode." })) : !org ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to manage invitations." })) : (_jsx(InvitationManager, { org: org }))] }));
|
|
12
|
+
}
|
|
13
|
+
//# sourceMappingURL=InvitationsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"InvitationsSection.js","sourceRoot":"","sources":["../../src/settings/InvitationsSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,iBAAiB,EAAE,MAAM,iCAAiC,CAAC;AACpE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAE/D,2EAA2E;AAC3E,MAAM,UAAU,kBAAkB;IAChC,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;IAC/B,MAAM,oBAAoB,GAAG,oBAAoB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAE9E,OAAO,CACL,sCAAyB,qBAAqB,aAC5C,cAAK,SAAS,EAAC,MAAM,YACnB,aACE,EAAE,EAAC,qBAAqB,EACxB,SAAS,EAAC,uCAAuC,4BAG9C,GACD,EACN,YAAG,SAAS,EAAC,oCAAoC,uLAI7C,EAEH,CAAC,oBAAoB,CAAC,CAAC,CAAC,CACvB,KAAC,kBAAkB,+DAEE,CACtB,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CACT,YAAG,SAAS,EAAC,gDAAgD,8DAEzD,CACL,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAAC,GAAG,EAAE,GAAG,GAAI,CAChC,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MembersSection.d.ts","sourceRoot":"","sources":["../../src/settings/MembersSection.tsx"],"names":[],"mappings":"AAOA,wEAAwE;AACxE,wBAAgB,cAAc,4CAgC7B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { OrgMembersPanel } from "../iam-policy/OrgMembersPanel";
|
|
4
|
+
import { useResourceAvailable, ApiResourceKind } from "../deployment-mode";
|
|
5
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
6
|
+
import { useOrg } from "../organization/OrgProvider";
|
|
7
|
+
/** Settings section for organization membership and role management. */
|
|
8
|
+
export function MembersSection() {
|
|
9
|
+
const { activeOrg } = useOrg();
|
|
10
|
+
const membersAvailable = useResourceAvailable(ApiResourceKind.iam_policy);
|
|
11
|
+
const orgId = activeOrg?.metadata?.id ?? "";
|
|
12
|
+
return (_jsxs("section", { "aria-labelledby": "members-heading", children: [_jsx("h2", { id: "members-heading", className: "text-foreground mb-1 text-sm font-semibold", children: "Members" }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Manage who has access to this organization and what they can do. Members can be granted owner, admin, member, or viewer roles." }), !membersAvailable ? (_jsx(CloudFeatureNotice, { children: "Members management is not available in local mode. IAM policies require Stigmer Cloud." })) : !orgId ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to manage members." })) : (_jsx(OrgMembersPanel, { orgId: orgId }))] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=MembersSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MembersSection.js","sourceRoot":"","sources":["../../src/settings/MembersSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,wEAAwE;AACxE,MAAM,UAAU,cAAc;IAC5B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/B,MAAM,gBAAgB,GAAG,oBAAoB,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;IAC1E,MAAM,KAAK,GAAG,SAAS,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC;IAE5C,OAAO,CACL,sCAAyB,iBAAiB,aACxC,aACE,EAAE,EAAC,iBAAiB,EACpB,SAAS,EAAC,4CAA4C,wBAGnD,EACL,YAAG,SAAS,EAAC,oCAAoC,+IAG7C,EAEH,CAAC,gBAAgB,CAAC,CAAC,CAAC,CACnB,KAAC,kBAAkB,yGAGE,CACtB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CACX,YAAG,SAAS,EAAC,gDAAgD,0DAEzD,CACL,CAAC,CAAC,CAAC,CACF,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,GAAI,CAClC,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthAppsSection.d.ts","sourceRoot":"","sources":["../../src/settings/OAuthAppsSection.tsx"],"names":[],"mappings":"AAgBA,+DAA+D;AAC/D,wBAAgB,gBAAgB,4CAkF/B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useRef, useState } from "react";
|
|
4
|
+
import { OAuthAppListPanel } from "../oauth-app/OAuthAppListPanel";
|
|
5
|
+
import { CreateOAuthAppForm } from "../oauth-app/CreateOAuthAppForm";
|
|
6
|
+
import { OAuthAppDetailPanel } from "../oauth-app/OAuthAppDetailPanel";
|
|
7
|
+
import { useResourceAvailable, ApiResourceKind } from "../deployment-mode";
|
|
8
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
9
|
+
import { useActiveOrgSlug } from "../organization/OrgProvider";
|
|
10
|
+
/** Settings section for organization OAuth app credentials. */
|
|
11
|
+
export function OAuthAppsSection() {
|
|
12
|
+
const org = useActiveOrgSlug();
|
|
13
|
+
const oauthAppsAvailable = useResourceAvailable(ApiResourceKind.oauth_app);
|
|
14
|
+
const [flow, setFlow] = useState({ phase: "idle" });
|
|
15
|
+
const listRefetchRef = useRef(null);
|
|
16
|
+
const handleRefetchRef = useCallback((refetch) => {
|
|
17
|
+
listRefetchRef.current = refetch;
|
|
18
|
+
}, []);
|
|
19
|
+
const handleCreated = useCallback(() => {
|
|
20
|
+
listRefetchRef.current?.();
|
|
21
|
+
setFlow({ phase: "idle" });
|
|
22
|
+
}, []);
|
|
23
|
+
const handleUpdated = useCallback(() => {
|
|
24
|
+
listRefetchRef.current?.();
|
|
25
|
+
setFlow({ phase: "idle" });
|
|
26
|
+
}, []);
|
|
27
|
+
const handleDeleted = useCallback(() => {
|
|
28
|
+
listRefetchRef.current?.();
|
|
29
|
+
setFlow({ phase: "idle" });
|
|
30
|
+
}, []);
|
|
31
|
+
return (_jsxs("section", { "aria-labelledby": "oauth-apps-heading", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between", children: [_jsx("h2", { id: "oauth-apps-heading", className: "text-foreground text-sm font-semibold", children: "OAuth Apps" }), oauthAppsAvailable && org && flow.phase === "idle" && (_jsx("button", { type: "button", onClick: () => setFlow({ phase: "creating" }), className: "text-primary hover:text-foreground text-xs font-medium transition-colors", children: "+ New OAuth app" }))] }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "OAuth app credentials configured for your organization. Create new apps here or bring your own from an MCP server's detail page." }), !oauthAppsAvailable ? (_jsx(CloudFeatureNotice, { children: "OAuth apps are not available in local mode. Bring-your-own-app OAuth requires the cloud platform." })) : flow.phase === "creating" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(CreateOAuthAppForm, { org: org, onCreated: handleCreated, onCancel: () => setFlow({ phase: "idle" }) }) })) : flow.phase === "editing" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(OAuthAppDetailPanel, { oauthApp: flow.oauthApp, onUpdated: handleUpdated, onDeleted: handleDeleted, onBack: () => setFlow({ phase: "idle" }) }) })) : (_jsx(OAuthAppListPanel, { org: org, onEdit: (app) => setFlow({ phase: "editing", oauthApp: app }), onRefetchRef: handleRefetchRef }))] }));
|
|
32
|
+
}
|
|
33
|
+
//# sourceMappingURL=OAuthAppsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OAuthAppsSection.js","sourceRoot":"","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AAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GACxC,GACE,CACP,CAAC,CAAC,CAAC,CACF,KAAC,iBAAiB,IAChB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,CAAC,GAAG,EAAE,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,EAAE,CAAC,EAC7D,YAAY,EAAE,gBAAgB,GAC9B,CACH,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrgProfileSection.d.ts","sourceRoot":"","sources":["../../src/settings/OrgProfileSection.tsx"],"names":[],"mappings":"AAOA,oEAAoE;AACpE,wBAAgB,iBAAiB,4CAgChC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback } from "react";
|
|
4
|
+
import { OrgProfilePanel } from "../organization/OrgProfilePanel";
|
|
5
|
+
import { useOrg } from "../organization/OrgProvider";
|
|
6
|
+
/** Settings section for editing the active organization profile. */
|
|
7
|
+
export function OrgProfileSection() {
|
|
8
|
+
const { activeOrg, refresh } = useOrg();
|
|
9
|
+
const orgId = activeOrg?.metadata?.id ?? "";
|
|
10
|
+
const handleUpdated = useCallback((org) => {
|
|
11
|
+
refresh(org.metadata?.slug);
|
|
12
|
+
}, [refresh]);
|
|
13
|
+
return (_jsxs("section", { "aria-labelledby": "org-profile-heading", children: [_jsx("h2", { id: "org-profile-heading", className: "text-foreground mb-1 text-sm font-semibold", children: "Organization Profile" }), _jsx("p", { className: "text-muted-foreground mb-6 text-xs", children: "Manage your organization's display name, description, and logo." }), !orgId ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to view its profile." })) : (_jsx(OrgProfilePanel, { orgId: orgId, onUpdated: handleUpdated }))] }));
|
|
14
|
+
}
|
|
15
|
+
//# sourceMappingURL=OrgProfileSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"OrgProfileSection.js","sourceRoot":"","sources":["../../src/settings/OrgProfileSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,OAAO,CAAC;AAEpC,OAAO,EAAE,eAAe,EAAE,MAAM,iCAAiC,CAAC;AAClE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,oEAAoE;AACpE,MAAM,UAAU,iBAAiB;IAC/B,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,GAAG,MAAM,EAAE,CAAC;IACxC,MAAM,KAAK,GAAG,SAAS,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC;IAE5C,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,GAAiB,EAAE,EAAE;QACpB,OAAO,CAAC,GAAG,CAAC,QAAQ,EAAE,IAAI,CAAC,CAAC;IAC9B,CAAC,EACD,CAAC,OAAO,CAAC,CACV,CAAC;IAEF,OAAO,CACL,sCAAyB,qBAAqB,aAC5C,aACE,EAAE,EAAC,qBAAqB,EACxB,SAAS,EAAC,4CAA4C,qCAGnD,EACL,YAAG,SAAS,EAAC,oCAAoC,gFAE7C,EAEH,CAAC,KAAK,CAAC,CAAC,CAAC,CACR,YAAG,SAAS,EAAC,gDAAgD,4DAEzD,CACL,CAAC,CAAC,CAAC,CACF,KAAC,eAAe,IAAC,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,GAAI,CAC5D,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformClientsSection.d.ts","sourceRoot":"","sources":["../../src/settings/PlatformClientsSection.tsx"],"names":[],"mappings":"AAwBA,sEAAsE;AACtE,wBAAgB,sBAAsB,4CA2HrC"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { useCallback, useRef, useState } from "react";
|
|
4
|
+
import { PlatformClientListPanel } from "../platform-client/PlatformClientListPanel";
|
|
5
|
+
import { CreatePlatformClientForm } from "../platform-client/CreatePlatformClientForm";
|
|
6
|
+
import { PlatformClientDetailPanel } from "../platform-client/PlatformClientDetailPanel";
|
|
7
|
+
import { PlatformClientSecretAlert } from "../platform-client/PlatformClientSecretAlert";
|
|
8
|
+
import { useResourceAvailable, ApiResourceKind } from "../deployment-mode";
|
|
9
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
10
|
+
import { useActiveOrgSlug } from "../organization/OrgProvider";
|
|
11
|
+
/** Settings section for creating and maintaining platform clients. */
|
|
12
|
+
export function PlatformClientsSection() {
|
|
13
|
+
const org = useActiveOrgSlug();
|
|
14
|
+
const pcAvailable = useResourceAvailable(ApiResourceKind.platform_client);
|
|
15
|
+
const [flow, setFlow] = useState({ phase: "idle" });
|
|
16
|
+
const listRefetchRef = useRef(null);
|
|
17
|
+
const handleRefetchRef = useCallback((refetch) => {
|
|
18
|
+
listRefetchRef.current = refetch;
|
|
19
|
+
}, []);
|
|
20
|
+
const handleCreated = useCallback((response) => {
|
|
21
|
+
listRefetchRef.current?.();
|
|
22
|
+
setFlow({
|
|
23
|
+
phase: "revealing",
|
|
24
|
+
clientId: response.platformClient?.spec?.clientId ?? "",
|
|
25
|
+
clientSecret: response.clientSecret,
|
|
26
|
+
context: "created",
|
|
27
|
+
});
|
|
28
|
+
}, []);
|
|
29
|
+
const handleSecretRotated = useCallback((response) => {
|
|
30
|
+
listRefetchRef.current?.();
|
|
31
|
+
setFlow({
|
|
32
|
+
phase: "revealing",
|
|
33
|
+
clientId: response.platformClient?.spec?.clientId ?? "",
|
|
34
|
+
clientSecret: response.clientSecret,
|
|
35
|
+
context: "rotated",
|
|
36
|
+
});
|
|
37
|
+
}, []);
|
|
38
|
+
const handleUpdated = useCallback(() => {
|
|
39
|
+
listRefetchRef.current?.();
|
|
40
|
+
setFlow({ phase: "idle" });
|
|
41
|
+
}, []);
|
|
42
|
+
const handleDeleted = useCallback(() => {
|
|
43
|
+
listRefetchRef.current?.();
|
|
44
|
+
setFlow({ phase: "idle" });
|
|
45
|
+
}, []);
|
|
46
|
+
return (_jsxs("section", { "aria-labelledby": "platform-clients-heading", children: [_jsxs("div", { className: "mb-3 flex items-center justify-between", children: [_jsx("h2", { id: "platform-clients-heading", className: "text-foreground text-sm font-semibold", children: "Platform Clients" }), pcAvailable && org && flow.phase === "idle" && (_jsx("button", { type: "button", onClick: () => setFlow({ phase: "creating" }), className: "text-primary hover:text-foreground text-xs font-medium transition-colors", children: "+ New platform client" }))] }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Platform clients let your backend mint Stigmer user tokens so you can embed Stigmer components in your application without requiring OIDC federation." }), !pcAvailable ? (_jsx(CloudFeatureNotice, { children: "Platform clients are not available in local mode. Token minting requires Stigmer Cloud." })) : flow.phase === "creating" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(CreatePlatformClientForm, { org: org, onCreated: handleCreated, onCancel: () => setFlow({ phase: "idle" }) }) })) : flow.phase === "revealing" ? (_jsxs("div", { className: "space-y-4", children: [_jsx(PlatformClientSecretAlert, { clientId: flow.clientId, clientSecret: flow.clientSecret, context: flow.context, onDismiss: () => setFlow({ phase: "idle" }) }), _jsx(PlatformClientListPanel, { org: org, onEdit: (pc) => setFlow({ phase: "editing", platformClient: pc }), onRefetchRef: handleRefetchRef })] })) : flow.phase === "editing" ? (_jsx("div", { className: "border-border bg-card rounded-lg border p-4", children: _jsx(PlatformClientDetailPanel, { platformClient: flow.platformClient, onUpdated: handleUpdated, onSecretRotated: handleSecretRotated, onDeleted: handleDeleted, onBack: () => setFlow({ phase: "idle" }) }) })) : (_jsx(PlatformClientListPanel, { org: org, onEdit: (pc) => setFlow({ phase: "editing", platformClient: pc }), onRefetchRef: handleRefetchRef }))] }));
|
|
47
|
+
}
|
|
48
|
+
//# sourceMappingURL=PlatformClientsSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PlatformClientsSection.js","sourceRoot":"","sources":["../../src/settings/PlatformClientsSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,WAAW,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAGtD,OAAO,EAAE,uBAAuB,EAAE,MAAM,4CAA4C,CAAC;AACrF,OAAO,EAAE,wBAAwB,EAAE,MAAM,6CAA6C,CAAC;AACvF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAC;AACzF,OAAO,EAAE,oBAAoB,EAAE,eAAe,EAAE,MAAM,oBAAoB,CAAC;AAC3E,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,gBAAgB,EAAE,MAAM,6BAA6B,CAAC;AAa/D,sEAAsE;AACtE,MAAM,UAAU,sBAAsB;IACpC,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;IAC/B,MAAM,WAAW,GAAG,oBAAoB,CAAC,eAAe,CAAC,eAAe,CAAC,CAAC;IAE1E,MAAM,CAAC,IAAI,EAAE,OAAO,CAAC,GAAG,QAAQ,CAAY,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC;IAC/D,MAAM,cAAc,GAAG,MAAM,CAAsB,IAAI,CAAC,CAAC;IAEzD,MAAM,gBAAgB,GAAG,WAAW,CAAC,CAAC,OAAmB,EAAE,EAAE;QAC3D,cAAc,CAAC,OAAO,GAAG,OAAO,CAAC;IACnC,CAAC,EAAE,EAAE,CAAC,CAAC;IAEP,MAAM,aAAa,GAAG,WAAW,CAC/B,CAAC,QAAsC,EAAE,EAAE;Q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C,SAAS,EAAE,aAAa,EACxB,MAAM,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,GACxC,GACE,CACP,CAAC,CAAC,CAAC,CACF,KAAC,uBAAuB,IACtB,GAAG,EAAE,GAAG,EACR,MAAM,EAAE,CAAC,EAAE,EAAE,EAAE,CACb,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,cAAc,EAAE,EAAE,EAAE,CAAC,EAEnD,YAAY,EAAE,gBAAgB,GAC9B,CACH,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsageSection.d.ts","sourceRoot":"","sources":["../../src/settings/UsageSection.tsx"],"names":[],"mappings":"AAOA,kEAAkE;AAClE,wBAAgB,YAAY,4CAgC3B"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
+
import { OrgUsagePanel } from "../usage/OrgUsagePanel";
|
|
4
|
+
import { useDeploymentMode } from "../deployment-mode";
|
|
5
|
+
import { CloudFeatureNotice } from "../internal/CloudFeatureNotice";
|
|
6
|
+
import { useOrg } from "../organization/OrgProvider";
|
|
7
|
+
/** Settings section for organization usage and cost reporting. */
|
|
8
|
+
export function UsageSection() {
|
|
9
|
+
const { activeOrg } = useOrg();
|
|
10
|
+
const mode = useDeploymentMode();
|
|
11
|
+
const orgId = activeOrg?.metadata?.id ?? "";
|
|
12
|
+
return (_jsxs("section", { "aria-labelledby": "usage-heading", children: [_jsx("h2", { id: "usage-heading", className: "text-foreground mb-1 text-sm font-semibold", children: "Usage" }), _jsx("p", { className: "text-muted-foreground mb-4 text-xs", children: "Monitor token consumption, cost, and execution activity across your organization." }), mode === "local" ? (_jsx(CloudFeatureNotice, { children: "Usage reports are not available in local mode. Connect to Stigmer Cloud to view organization-level cost and token analytics." })) : !orgId ? (_jsx("p", { className: "text-muted-foreground py-4 text-center text-xs", children: "Select an organization to view usage." })) : (_jsx(OrgUsagePanel, { orgId: orgId }))] }));
|
|
13
|
+
}
|
|
14
|
+
//# sourceMappingURL=UsageSection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"UsageSection.js","sourceRoot":"","sources":["../../src/settings/UsageSection.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;AAEb,OAAO,EAAE,aAAa,EAAE,MAAM,wBAAwB,CAAC;AACvD,OAAO,EAAE,iBAAiB,EAAE,MAAM,oBAAoB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AACpE,OAAO,EAAE,MAAM,EAAE,MAAM,6BAA6B,CAAC;AAErD,kEAAkE;AAClE,MAAM,UAAU,YAAY;IAC1B,MAAM,EAAE,SAAS,EAAE,GAAG,MAAM,EAAE,CAAC;IAC/B,MAAM,IAAI,GAAG,iBAAiB,EAAE,CAAC;IACjC,MAAM,KAAK,GAAG,SAAS,EAAE,QAAQ,EAAE,EAAE,IAAI,EAAE,CAAC;IAE5C,OAAO,CACL,sCAAyB,eAAe,aACtC,aACE,EAAE,EAAC,eAAe,EAClB,SAAS,EAAC,4CAA4C,sBAGnD,EACL,YAAG,SAAS,EAAC,oCAAoC,kGAG7C,EAEH,IAAI,KAAK,OAAO,CAAC,CAAC,CAAC,CAClB,KAAC,kBAAkB,+IAGE,CACtB,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,CACX,YAAG,SAAS,EAAC,gDAAgD,sDAEzD,CACL,CAAC,CAAC,CAAC,CACF,KAAC,aAAa,IAAC,KAAK,EAAE,KAAK,GAAI,CAChC,IACO,CACX,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export { SETTINGS_NAV_GROUPS } from "./settings-nav";
|
|
2
|
+
export type { SettingsNavItem, SettingsNavGroup } from "./settings-nav";
|
|
3
|
+
export { ApiKeysSection } from "./ApiKeysSection";
|
|
4
|
+
export { MembersSection } from "./MembersSection";
|
|
5
|
+
export { OrgProfileSection } from "./OrgProfileSection";
|
|
6
|
+
export { EnvironmentsSection } from "./EnvironmentsSection";
|
|
7
|
+
export { InvitationsSection } from "./InvitationsSection";
|
|
8
|
+
export { IdentityProvidersSection } from "./IdentityProvidersSection";
|
|
9
|
+
export type { IdentityProvidersSectionProps } from "./IdentityProvidersSection";
|
|
10
|
+
export { PlatformClientsSection } from "./PlatformClientsSection";
|
|
11
|
+
export { OAuthAppsSection } from "./OAuthAppsSection";
|
|
12
|
+
export { UsageSection } from "./UsageSection";
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AACrD,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAExE,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AACtE,YAAY,EAAE,6BAA6B,EAAE,MAAM,4BAA4B,CAAC;AAChF,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
export { SETTINGS_NAV_GROUPS } from "./settings-nav";
|
|
2
|
+
export { ApiKeysSection } from "./ApiKeysSection";
|
|
3
|
+
export { MembersSection } from "./MembersSection";
|
|
4
|
+
export { OrgProfileSection } from "./OrgProfileSection";
|
|
5
|
+
export { EnvironmentsSection } from "./EnvironmentsSection";
|
|
6
|
+
export { InvitationsSection } from "./InvitationsSection";
|
|
7
|
+
export { IdentityProvidersSection } from "./IdentityProvidersSection";
|
|
8
|
+
export { PlatformClientsSection } from "./PlatformClientsSection";
|
|
9
|
+
export { OAuthAppsSection } from "./OAuthAppsSection";
|
|
10
|
+
export { UsageSection } from "./UsageSection";
|
|
11
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/settings/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAGrD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACxD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,wBAAwB,EAAE,MAAM,4BAA4B,CAAC;AAEtE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import type { ComponentType } from "react";
|
|
2
|
+
/** Single navigable entry in the settings sidebar. */
|
|
3
|
+
export interface SettingsNavItem {
|
|
4
|
+
/** Route for the settings page entry. */
|
|
5
|
+
readonly href: string;
|
|
6
|
+
/** Short, user-facing label shown in navigation. */
|
|
7
|
+
readonly label: string;
|
|
8
|
+
/** Lucide icon component rendered next to the label. */
|
|
9
|
+
readonly icon: ComponentType<{
|
|
10
|
+
/** Optional CSS class name applied to the icon. */
|
|
11
|
+
className?: string;
|
|
12
|
+
}>;
|
|
13
|
+
}
|
|
14
|
+
/** Grouping model used to render settings navigation sections. */
|
|
15
|
+
export interface SettingsNavGroup {
|
|
16
|
+
/** Group heading shown in the settings navigation. */
|
|
17
|
+
readonly label: string;
|
|
18
|
+
/** Helper text describing the group purpose. */
|
|
19
|
+
readonly description: string;
|
|
20
|
+
/** Entries that belong to this group. */
|
|
21
|
+
readonly items: readonly SettingsNavItem[];
|
|
22
|
+
}
|
|
23
|
+
/** Canonical settings sidebar/grouped navigation model. */
|
|
24
|
+
export declare const SETTINGS_NAV_GROUPS: readonly SettingsNavGroup[];
|
|
25
|
+
//# sourceMappingURL=settings-nav.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-nav.d.ts","sourceRoot":"","sources":["../../src/settings/settings-nav.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,OAAO,CAAC;AAc3C,sDAAsD;AACtD,MAAM,WAAW,eAAe;IAC9B,yCAAyC;IACzC,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,oDAAoD;IACpD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,wDAAwD;IACxD,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;QAC3B,mDAAmD;QACnD,SAAS,CAAC,EAAE,MAAM,CAAC;KACpB,CAAC,CAAC;CACJ;AAED,kEAAkE;AAClE,MAAM,WAAW,gBAAgB;IAC/B,sDAAsD;IACtD,QAAQ,CAAC,KAAK,EAAE,MAAM,CAAC;IACvB,gDAAgD;IAChD,QAAQ,CAAC,WAAW,EAAE,MAAM,CAAC;IAC7B,yCAAyC;IACzC,QAAQ,CAAC,KAAK,EAAE,SAAS,eAAe,EAAE,CAAC;CAC5C;AAED,2DAA2D;AAC3D,eAAO,MAAM,mBAAmB,EAAE,SAAS,gBAAgB,EAuC1D,CAAC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { AppWindow, BarChart3, Box, Building2, CreditCard, KeyRound, Link, Plug, ShieldCheck, Users, } from "lucide-react";
|
|
2
|
+
/** Canonical settings sidebar/grouped navigation model. */
|
|
3
|
+
export const SETTINGS_NAV_GROUPS = [
|
|
4
|
+
{
|
|
5
|
+
label: "Organization",
|
|
6
|
+
description: "Manage your team, organization identity, and identity providers.",
|
|
7
|
+
items: [
|
|
8
|
+
{ href: "/settings/org-profile", label: "Org Profile", icon: Building2 },
|
|
9
|
+
{ href: "/settings/members", label: "Members", icon: Users },
|
|
10
|
+
{ href: "/settings/invitations", label: "Invitations", icon: Link },
|
|
11
|
+
{
|
|
12
|
+
href: "/settings/identity-providers",
|
|
13
|
+
label: "Identity Providers",
|
|
14
|
+
icon: ShieldCheck,
|
|
15
|
+
},
|
|
16
|
+
],
|
|
17
|
+
},
|
|
18
|
+
{
|
|
19
|
+
label: "Configuration",
|
|
20
|
+
description: "API keys, environment variables, and OAuth app credentials for your integrations.",
|
|
21
|
+
items: [
|
|
22
|
+
{ href: "/settings/api-keys", label: "API Keys", icon: KeyRound },
|
|
23
|
+
{
|
|
24
|
+
href: "/settings/platform-clients",
|
|
25
|
+
label: "Platform Clients",
|
|
26
|
+
icon: Plug,
|
|
27
|
+
},
|
|
28
|
+
{ href: "/settings/environments", label: "Environments", icon: Box },
|
|
29
|
+
{ href: "/settings/oauth-apps", label: "OAuth Apps", icon: AppWindow },
|
|
30
|
+
],
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
label: "Billing & Usage",
|
|
34
|
+
description: "Subscription management and usage metrics.",
|
|
35
|
+
items: [
|
|
36
|
+
{ href: "/settings/billing", label: "Billing", icon: CreditCard },
|
|
37
|
+
{ href: "/settings/usage", label: "Usage", icon: BarChart3 },
|
|
38
|
+
],
|
|
39
|
+
},
|
|
40
|
+
];
|
|
41
|
+
//# sourceMappingURL=settings-nav.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"settings-nav.js","sourceRoot":"","sources":["../../src/settings/settings-nav.ts"],"names":[],"mappings":"AACA,OAAO,EACL,SAAS,EACT,SAAS,EACT,GAAG,EACH,SAAS,EACT,UAAU,EACV,QAAQ,EACR,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,KAAK,GACN,MAAM,cAAc,CAAC;AAyBtB,2DAA2D;AAC3D,MAAM,CAAC,MAAM,mBAAmB,GAAgC;IAC9D;QACE,KAAK,EAAE,cAAc;QACrB,WAAW,EACT,kEAAkE;QACpE,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE;YACxE,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,KAAK,EAAE;YAC5D,EAAE,IAAI,EAAE,uBAAuB,EAAE,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,IAAI,EAAE;YACnE;gBACE,IAAI,EAAE,8BAA8B;gBACpC,KAAK,EAAE,oBAAoB;gBAC3B,IAAI,EAAE,WAAW;aAClB;SACF;KACF;IACD;QACE,KAAK,EAAE,eAAe;QACtB,WAAW,EACT,mFAAmF;QACrF,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,oBAAoB,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,QAAQ,EAAE;YACjE;gBACE,IAAI,EAAE,4BAA4B;gBAClC,KAAK,EAAE,kBAAkB;gBACzB,IAAI,EAAE,IAAI;aACX;YACD,EAAE,IAAI,EAAE,wBAAwB,EAAE,KAAK,EAAE,cAAc,EAAE,IAAI,EAAE,GAAG,EAAE;YACpE,EAAE,IAAI,EAAE,sBAAsB,EAAE,KAAK,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAE;SACvE;KACF;IACD;QACE,KAAK,EAAE,iBAAiB;QACxB,WAAW,EAAE,4CAA4C;QACzD,KAAK,EAAE;YACL,EAAE,IAAI,EAAE,mBAAmB,EAAE,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,UAAU,EAAE;YACjE,EAAE,IAAI,EAAE,iBAAiB,EAAE,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,SAAS,EAAE;SAC7D;KACF;CACF,CAAC"}
|
package/src/index.ts
CHANGED
|
@@ -433,22 +433,50 @@ export type {
|
|
|
433
433
|
OrgMembersPanelProps,
|
|
434
434
|
} from "./iam-policy";
|
|
435
435
|
|
|
436
|
-
// Organization — data
|
|
436
|
+
// Organization — context provider, hooks, data hooks, behavior hooks, styled form, profile panel, and org switcher
|
|
437
437
|
export {
|
|
438
|
+
OrgProvider,
|
|
439
|
+
useOrg,
|
|
440
|
+
useActiveOrgSlug,
|
|
441
|
+
useOrgGate,
|
|
438
442
|
useOrganization,
|
|
439
443
|
useCreateOrganization,
|
|
440
444
|
useUpdateOrganization,
|
|
441
445
|
CreateOrganizationForm,
|
|
442
446
|
OrgProfilePanel,
|
|
447
|
+
OrgSwitcher,
|
|
443
448
|
} from "./organization";
|
|
444
449
|
export type {
|
|
450
|
+
OrgContextValue,
|
|
451
|
+
UseOrgGateOptions,
|
|
452
|
+
OrgGateState,
|
|
453
|
+
UseOrgGateReturn,
|
|
445
454
|
UseOrganizationReturn,
|
|
446
455
|
UseCreateOrganizationReturn,
|
|
447
456
|
UseUpdateOrganizationReturn,
|
|
448
457
|
CreateOrganizationFormProps,
|
|
449
458
|
OrgProfilePanelProps,
|
|
459
|
+
OrgSwitcherProps,
|
|
450
460
|
} from "./organization";
|
|
451
461
|
|
|
462
|
+
// Settings — navigation structure + section components shared across app shells
|
|
463
|
+
export { SETTINGS_NAV_GROUPS } from "./settings";
|
|
464
|
+
export type { SettingsNavItem, SettingsNavGroup } from "./settings";
|
|
465
|
+
export { ApiKeysSection } from "./settings";
|
|
466
|
+
export { MembersSection } from "./settings";
|
|
467
|
+
export { OrgProfileSection } from "./settings";
|
|
468
|
+
export { EnvironmentsSection } from "./settings";
|
|
469
|
+
export { InvitationsSection } from "./settings";
|
|
470
|
+
export { IdentityProvidersSection } from "./settings";
|
|
471
|
+
export type { IdentityProvidersSectionProps } from "./settings";
|
|
472
|
+
export { PlatformClientsSection } from "./settings";
|
|
473
|
+
export { OAuthAppsSection } from "./settings";
|
|
474
|
+
export { UsageSection } from "./settings";
|
|
475
|
+
|
|
476
|
+
// User — app shell user menu
|
|
477
|
+
export { UserMenu } from "./user";
|
|
478
|
+
export type { UserMenuProps } from "./user";
|
|
479
|
+
|
|
452
480
|
// API Key — data hooks, behavior hooks, and styled components for API key lifecycle
|
|
453
481
|
export {
|
|
454
482
|
useApiKeyList,
|
|
@@ -576,6 +604,9 @@ export type { ErrorMessageProps, SecretFlowErrorGuideProps } from "./error";
|
|
|
576
604
|
|
|
577
605
|
// Library — cross-resource UI components, resource detection, apply flow, browsing, and visibility management
|
|
578
606
|
export {
|
|
607
|
+
LibraryBreadcrumbProvider,
|
|
608
|
+
useBreadcrumbLabel,
|
|
609
|
+
useBreadcrumbOverride,
|
|
579
610
|
ScopeToggle,
|
|
580
611
|
ResourceListView,
|
|
581
612
|
ResourceCountCard,
|