@streamoid/settings 0.12.0 → 0.12.2

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/dist/index.css ADDED
@@ -0,0 +1,286 @@
1
+ /* src/administration-overview.module.css */
2
+ .administration_overview_overview {
3
+ width: 100%;
4
+ flex-shrink: 0;
5
+ padding-bottom: 1.5rem;
6
+ display: flex;
7
+ flex-direction: column;
8
+ gap: 1.5rem;
9
+ }
10
+ .administration_overview_section {
11
+ border: 1px solid var(--alias-border-default);
12
+ border-radius: .75rem;
13
+ overflow: hidden;
14
+ flex-shrink: 0;
15
+ background: var(--alias-surface-base);
16
+ }
17
+ .administration_overview_sectionHeader {
18
+ padding: .75rem 1.25rem;
19
+ display: flex;
20
+ align-items: center;
21
+ justify-content: space-between;
22
+ gap: .75rem;
23
+ }
24
+ .administration_overview_sectionHeading {
25
+ min-width: 0;
26
+ margin: 0;
27
+ font-size: .75rem;
28
+ font-weight: 600;
29
+ line-height: 1rem;
30
+ letter-spacing: .05em;
31
+ color: var(--alias-text---icons-tertiary);
32
+ text-transform: uppercase;
33
+ overflow-wrap: anywhere;
34
+ }
35
+ .administration_overview_scopeName {
36
+ font-weight: 400;
37
+ letter-spacing: normal;
38
+ text-transform: none;
39
+ color: var(--alias-text---icons-secondary);
40
+ }
41
+ .administration_overview_row {
42
+ width: 100%;
43
+ display: flex;
44
+ flex-wrap: wrap;
45
+ align-items: center;
46
+ justify-content: space-between;
47
+ column-gap: 1.5rem;
48
+ row-gap: .5rem;
49
+ padding: .75rem 1.25rem;
50
+ border: 0;
51
+ border-top: 1px solid var(--alias-border-default);
52
+ background: transparent;
53
+ color: var(--alias-text---icons-primary);
54
+ text-align: left;
55
+ font: inherit;
56
+ cursor: pointer;
57
+ }
58
+ .administration_overview_row:hover,
59
+ .administration_overview_row:focus-visible {
60
+ background: var(--alias-fill-neutral-neutralhover);
61
+ }
62
+ .administration_overview_row:focus-visible {
63
+ outline: 2px solid var(--alias-text---icons-primary);
64
+ outline-offset: -2px;
65
+ }
66
+ .administration_overview_rowText {
67
+ display: flex;
68
+ flex: 1 1 16rem;
69
+ flex-direction: column;
70
+ min-width: 0;
71
+ gap: .25rem;
72
+ }
73
+ .administration_overview_label {
74
+ font-size: .875rem;
75
+ line-height: 1.25rem;
76
+ font-weight: 500;
77
+ }
78
+ .administration_overview_description {
79
+ font-size: .75rem;
80
+ line-height: 1rem;
81
+ color: var(--alias-text---icons-secondary);
82
+ }
83
+ .administration_overview_row > svg {
84
+ margin-left: auto;
85
+ flex-shrink: 0;
86
+ color: var(--alias-text---icons-secondary);
87
+ }
88
+
89
+ /* src/app-settings-page.module.css */
90
+ .app_settings_page_page {
91
+ box-sizing: border-box;
92
+ font-family: var(--sc-rail-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
93
+ width: 100%;
94
+ max-width: 896px;
95
+ margin: 0 auto;
96
+ padding: 21px;
97
+ display: flex;
98
+ flex-direction: column;
99
+ gap: 21px;
100
+ color: var(--alias-text---icons-primary);
101
+ }
102
+ .app_settings_page_header {
103
+ font-family: var(--sc-rail-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
104
+ width: 100%;
105
+ display: flex;
106
+ flex-wrap: wrap;
107
+ align-items: baseline;
108
+ justify-content: space-between;
109
+ column-gap: 21px;
110
+ row-gap: 7px;
111
+ }
112
+ .app_settings_page_header h1 {
113
+ font-family: inherit;
114
+ margin: 0;
115
+ font-size: 21px;
116
+ line-height: 28px;
117
+ font-weight: 600;
118
+ }
119
+ .app_settings_page_header a {
120
+ color: var(--alias-text---icons-secondary);
121
+ font-size: 12.25px;
122
+ line-height: 17.5px;
123
+ text-underline-offset: 3.5px;
124
+ text-decoration: none;
125
+ }
126
+ .app_settings_page_header a:hover {
127
+ text-decoration: underline;
128
+ }
129
+ .app_settings_page_header a:focus-visible {
130
+ outline: 2px solid var(--alias-text---icons-primary);
131
+ outline-offset: 3px;
132
+ border-radius: 2px;
133
+ }
134
+ .app_settings_page_empty {
135
+ border: 1px solid var(--alias-border-default);
136
+ border-radius: 10.5px;
137
+ padding: 28px 21px;
138
+ background: var(--alias-surface-base);
139
+ }
140
+ .app_settings_page_empty h2 {
141
+ font-family: inherit;
142
+ margin: 0;
143
+ font-size: 12.25px;
144
+ line-height: 17.5px;
145
+ font-weight: 500;
146
+ }
147
+ .app_settings_page_empty p {
148
+ margin: 7px 0 0;
149
+ color: var(--alias-text---icons-secondary);
150
+ font-size: 10.5px;
151
+ line-height: 14px;
152
+ }
153
+ .app_settings_page_actions {
154
+ display: flex;
155
+ align-items: center;
156
+ gap: 14px;
157
+ margin-left: auto;
158
+ }
159
+ .app_settings_page_close {
160
+ display: inline-flex;
161
+ align-items: center;
162
+ justify-content: center;
163
+ flex-shrink: 0;
164
+ width: 32px;
165
+ height: 32px;
166
+ border: 0;
167
+ border-radius: var(--radius-md, 6px);
168
+ background: transparent;
169
+ color: var(--alias-text---icons-secondary);
170
+ cursor: pointer;
171
+ }
172
+ .app_settings_page_close:hover {
173
+ background: var(--alias-fill-neutral-neutralhover);
174
+ color: var(--alias-text---icons-primary);
175
+ }
176
+ .app_settings_page_close:focus-visible {
177
+ outline: 2px solid var(--alias-text---icons-primary);
178
+ outline-offset: 2px;
179
+ }
180
+ .app_settings_page_section {
181
+ overflow: hidden;
182
+ border: 1px solid var(--alias-border-default);
183
+ border-radius: 10.5px;
184
+ background: var(--alias-surface-base);
185
+ }
186
+ .app_settings_page_sectionHeader {
187
+ box-sizing: border-box;
188
+ display: flex;
189
+ align-items: center;
190
+ justify-content: space-between;
191
+ gap: 14px;
192
+ min-height: 35px;
193
+ padding: 5.5px 17.5px;
194
+ }
195
+ .app_settings_page_sectionHeader h2 {
196
+ margin: 0;
197
+ font: 600 10.5px/14px var(--sc-rail-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
198
+ letter-spacing: .525px;
199
+ text-transform: uppercase;
200
+ color: var(--alias-text---icons-tertiary);
201
+ }
202
+ .app_settings_page_sectionAction {
203
+ display: flex;
204
+ align-items: center;
205
+ gap: 7px;
206
+ font: 500 10.5px/14px var(--sc-rail-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
207
+ }
208
+ .app_settings_page_sectionAction button,
209
+ .app_settings_page_sectionAction [role=button] {
210
+ min-height: 24px;
211
+ height: auto;
212
+ font-size: 10.5px;
213
+ line-height: 14px;
214
+ padding: 3px 7px;
215
+ }
216
+ .app_settings_page_row {
217
+ box-sizing: border-box;
218
+ width: 100%;
219
+ min-height: 57px;
220
+ display: flex;
221
+ align-items: center;
222
+ flex-wrap: wrap;
223
+ justify-content: space-between;
224
+ gap: 7px 21px;
225
+ padding: 10.5px 17.5px;
226
+ margin: 0;
227
+ border: 0;
228
+ border-top: 1px solid var(--alias-border-default);
229
+ border-radius: 0;
230
+ background: transparent;
231
+ color: var(--alias-text---icons-primary);
232
+ text-align: left;
233
+ text-decoration: none;
234
+ font-family: var(--sc-rail-font-family, Inter, ui-sans-serif, system-ui, sans-serif);
235
+ }
236
+ .app_settings_page_rowCopy {
237
+ min-width: 0;
238
+ flex: 1 1 224px;
239
+ }
240
+ .app_settings_page_rowTitle {
241
+ display: block;
242
+ font-size: 12.25px;
243
+ line-height: 17.5px;
244
+ font-weight: 500;
245
+ }
246
+ .app_settings_page_rowDescription {
247
+ display: block;
248
+ margin-top: 3.5px;
249
+ font-size: 10.5px;
250
+ line-height: 14px;
251
+ font-weight: 400;
252
+ color: var(--alias-text---icons-secondary);
253
+ }
254
+ .app_settings_page_rowEnd {
255
+ margin-left: auto;
256
+ display: flex;
257
+ align-items: center;
258
+ gap: 10.5px;
259
+ font-size: 10.5px;
260
+ line-height: 14px;
261
+ font-weight: 400;
262
+ color: var(--alias-text---icons-secondary);
263
+ }
264
+ a.app_settings_page_row:hover,
265
+ button.app_settings_page_row:not(:disabled):hover {
266
+ background: var(--alias-fill-neutral-neutralhover);
267
+ cursor: pointer;
268
+ }
269
+ .app_settings_page_row:focus-visible {
270
+ outline: 2px solid var(--alias-text---icons-primary);
271
+ outline-offset: -2px;
272
+ }
273
+ .app_settings_page_row:disabled {
274
+ opacity: 1;
275
+ cursor: not-allowed;
276
+ }
277
+ .app_settings_page_srOnly {
278
+ position: absolute;
279
+ width: 1px;
280
+ height: 1px;
281
+ margin: -1px;
282
+ padding: 0;
283
+ overflow: hidden;
284
+ clip-path: inset(50%);
285
+ white-space: nowrap;
286
+ }
package/dist/index.d.mts CHANGED
@@ -1329,6 +1329,17 @@ interface SettingsContentProps {
1329
1329
  hiddenApps?: readonly AppKey[];
1330
1330
  /** Currently active tab. The host owns routing and resolves this from the URL. */
1331
1331
  activeTab?: SettingsTab;
1332
+ /** Opt into overview -> detail navigation; existing hosts retain the sidebar. */
1333
+ presentation?: "sidebar" | "overview-detail";
1334
+ /** The host owns the overview route, separately from existing tab deep links. */
1335
+ showOverview?: boolean;
1336
+ /** Return from a detail screen to the host's administration overview route. */
1337
+ onOverview?: () => void;
1338
+ /** Open the existing, permission-checked workspace invite flow. */
1339
+ onInvitePeople?: () => void;
1340
+ /** A deep-link invite request; waits for the Members permission check. */
1341
+ inviteRequested?: boolean;
1342
+ onInviteRequestHandled?: () => void;
1332
1343
  /**
1333
1344
  * Leave settings. When supplied, the shell renders a close (×) button in the
1334
1345
  * header and dismisses on Escape; the host decides where "closed" goes
@@ -1341,12 +1352,13 @@ interface SettingsContentProps {
1341
1352
  onClose?: () => void;
1342
1353
  /**
1343
1354
  * @deprecated Ignored. Settings no longer renders a Back control: it is a
1344
- * top-level destination with one header row, and Escape still leaves it
1345
- * (`onClose`). Kept so hosts that pass it keep compiling.
1355
+ * top-level destination with one header row. To give users a way out, pass
1356
+ * `onClose`, which renders a close (×) button and handles Escape. Kept so
1357
+ * hosts that pass it keep compiling.
1346
1358
  */
1347
1359
  onBack?: (() => void) | null;
1348
1360
  }
1349
- declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
1361
+ declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, presentation, showOverview, onOverview, onInvitePeople, inviteRequested, onInviteRequestHandled, }: SettingsContentProps): react.JSX.Element;
1350
1362
 
1351
1363
  interface WorkspaceData {
1352
1364
  id: string;
@@ -1433,13 +1445,16 @@ declare function memberRoleUpdate(current: {
1433
1445
  }, permissions: UserPermissions, services: ServiceItem[]): ({
1434
1446
  userId: string;
1435
1447
  } & MemberPermissionsPayload) | null;
1436
- declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
1448
+ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, inviteRequested, onInviteRequestHandled, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
1437
1449
  embedded?: boolean;
1438
1450
  onInviteOpen?: boolean;
1439
1451
  onInviteOpenChange?: (open: boolean) => void;
1440
1452
  /** Told whether the viewer may invite here, so a host-drawn Invite button
1441
1453
  * can follow the same rule as this screen's own. */
1442
1454
  onCanInviteChange?: (canInvite: boolean) => void;
1455
+ /** A request remains pending until this workspace's permissions resolve. */
1456
+ inviteRequested?: boolean;
1457
+ onInviteRequestHandled?: () => void;
1443
1458
  /**
1444
1459
  * The workspace these members belong to. Supplied by the settings shell so
1445
1460
  * the page can name its own subject — without it this screen was a list of
@@ -2173,4 +2188,88 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
2173
2188
  */
2174
2189
  declare function useSettingsAdapters(): SettingsAdapters;
2175
2190
 
2176
- export { APP_KEYS, type AddCreditPoolMemberInput, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, creditCycleUnit, creditsMeter, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, resolveSettingsTabFromPath, roundCredits, sharedPoolBannerText, useSettingsAdapters, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2191
+ interface AdministrationOverviewProps {
2192
+ workspaceName?: string | null;
2193
+ organizationName?: string | null;
2194
+ hasWorkspace: boolean;
2195
+ hasOrganization: boolean;
2196
+ isWorkspaceAdmin: boolean;
2197
+ showConnectedApps: boolean;
2198
+ showIntegrations: boolean;
2199
+ canInvite: boolean;
2200
+ onNavigate: (tab: SettingsTab) => void;
2201
+ onInvitePeople?: () => void;
2202
+ }
2203
+ /** Scope-first navigation into the existing forms; contains no mutation logic. */
2204
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2205
+
2206
+ /** Shared invitation rule. A result belongs to one authenticated workspace;
2207
+ * callers must explicitly mark it ready after that workspace's reads settle. */
2208
+ declare function deriveWorkspaceInvitePermission({ workspaceId, userId, role, hasInviteAccess, organizationId, organization, isReady, failed, }: {
2209
+ workspaceId?: string | null;
2210
+ userId?: string | null;
2211
+ role?: string | null;
2212
+ hasInviteAccess: boolean;
2213
+ organizationId?: string | null;
2214
+ organization?: {
2215
+ id: string;
2216
+ role?: string;
2217
+ } | null;
2218
+ isReady: boolean;
2219
+ failed?: boolean;
2220
+ }): boolean;
2221
+ /** Read-only, fail-closed permission for a workspace's invitation entry points.
2222
+ * Does not request invitation, billing, or organization mutation APIs. */
2223
+ declare function useWorkspaceInvitePermission(adapters: SettingsAdapters, { enabled }?: {
2224
+ enabled?: boolean;
2225
+ }): {
2226
+ canInvite: boolean;
2227
+ isLoading: boolean;
2228
+ };
2229
+
2230
+ interface AdministrativeNavigationOptions {
2231
+ /** Hosts whose product page is /app-settings or /resources use /settings only for administration. */
2232
+ settingsRootIsAdministration?: boolean;
2233
+ }
2234
+ /** Only canonical same-workspace app routes can become a close destination. */
2235
+ declare function settingsReturnTarget(value: unknown, base: string, options?: AdministrativeNavigationOptions): string | null;
2236
+ /** Persist only for a known router entry, so reload can recover its origin. */
2237
+ declare function rememberSettingsCaller(value: string, base: string, entryKey: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
2238
+ declare function readSettingsCaller(base: string, state?: unknown, entryKey?: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
2239
+
2240
+ interface AppSettingsHeaderProps {
2241
+ administrationHref: string;
2242
+ /** Optional router callback: the host captures its caller before navigation. */
2243
+ onOpenAdministration?: () => void;
2244
+ /** Close the product settings screen independently of sidebar navigation. */
2245
+ onClose?: () => void;
2246
+ }
2247
+ declare function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }: AppSettingsHeaderProps): react.JSX.Element;
2248
+ interface AppSettingsPageProps extends AppSettingsHeaderProps {
2249
+ emptyTitle?: string;
2250
+ emptyDescription?: string;
2251
+ children?: ReactNode;
2252
+ }
2253
+ /** Shared product-settings frame. Empty hosts show an honest, intentional state. */
2254
+ declare function AppSettingsPage({ administrationHref, onOpenAdministration, onClose, emptyTitle, emptyDescription, children, }: AppSettingsPageProps): react.JSX.Element;
2255
+ interface AppSettingsSectionProps {
2256
+ title: string;
2257
+ children: ReactNode;
2258
+ action?: ReactNode;
2259
+ }
2260
+ /** Compact product-settings bands shared by every host. */
2261
+ declare function AppSettingsSection({ title, action, children }: AppSettingsSectionProps): react.JSX.Element;
2262
+ interface AppSettingsRowProps {
2263
+ title: string;
2264
+ description?: string;
2265
+ summary?: ReactNode;
2266
+ href?: string;
2267
+ onClick?: () => void;
2268
+ disabled?: boolean;
2269
+ disabledReason?: string;
2270
+ ariaLabel?: string;
2271
+ trailing?: ReactNode;
2272
+ }
2273
+ declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2274
+
2275
+ export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
package/dist/index.d.ts CHANGED
@@ -1329,6 +1329,17 @@ interface SettingsContentProps {
1329
1329
  hiddenApps?: readonly AppKey[];
1330
1330
  /** Currently active tab. The host owns routing and resolves this from the URL. */
1331
1331
  activeTab?: SettingsTab;
1332
+ /** Opt into overview -> detail navigation; existing hosts retain the sidebar. */
1333
+ presentation?: "sidebar" | "overview-detail";
1334
+ /** The host owns the overview route, separately from existing tab deep links. */
1335
+ showOverview?: boolean;
1336
+ /** Return from a detail screen to the host's administration overview route. */
1337
+ onOverview?: () => void;
1338
+ /** Open the existing, permission-checked workspace invite flow. */
1339
+ onInvitePeople?: () => void;
1340
+ /** A deep-link invite request; waits for the Members permission check. */
1341
+ inviteRequested?: boolean;
1342
+ onInviteRequestHandled?: () => void;
1332
1343
  /**
1333
1344
  * Leave settings. When supplied, the shell renders a close (×) button in the
1334
1345
  * header and dismisses on Escape; the host decides where "closed" goes
@@ -1341,12 +1352,13 @@ interface SettingsContentProps {
1341
1352
  onClose?: () => void;
1342
1353
  /**
1343
1354
  * @deprecated Ignored. Settings no longer renders a Back control: it is a
1344
- * top-level destination with one header row, and Escape still leaves it
1345
- * (`onClose`). Kept so hosts that pass it keep compiling.
1355
+ * top-level destination with one header row. To give users a way out, pass
1356
+ * `onClose`, which renders a close (×) button and handles Escape. Kept so
1357
+ * hosts that pass it keep compiling.
1346
1358
  */
1347
1359
  onBack?: (() => void) | null;
1348
1360
  }
1349
- declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
1361
+ declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, presentation, showOverview, onOverview, onInvitePeople, inviteRequested, onInviteRequestHandled, }: SettingsContentProps): react.JSX.Element;
1350
1362
 
1351
1363
  interface WorkspaceData {
1352
1364
  id: string;
@@ -1433,13 +1445,16 @@ declare function memberRoleUpdate(current: {
1433
1445
  }, permissions: UserPermissions, services: ServiceItem[]): ({
1434
1446
  userId: string;
1435
1447
  } & MemberPermissionsPayload) | null;
1436
- declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
1448
+ declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, inviteRequested, onInviteRequestHandled, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
1437
1449
  embedded?: boolean;
1438
1450
  onInviteOpen?: boolean;
1439
1451
  onInviteOpenChange?: (open: boolean) => void;
1440
1452
  /** Told whether the viewer may invite here, so a host-drawn Invite button
1441
1453
  * can follow the same rule as this screen's own. */
1442
1454
  onCanInviteChange?: (canInvite: boolean) => void;
1455
+ /** A request remains pending until this workspace's permissions resolve. */
1456
+ inviteRequested?: boolean;
1457
+ onInviteRequestHandled?: () => void;
1443
1458
  /**
1444
1459
  * The workspace these members belong to. Supplied by the settings shell so
1445
1460
  * the page can name its own subject — without it this screen was a list of
@@ -2173,4 +2188,88 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
2173
2188
  */
2174
2189
  declare function useSettingsAdapters(): SettingsAdapters;
2175
2190
 
2176
- export { APP_KEYS, type AddCreditPoolMemberInput, type ApiToken, type AppKey, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, creditCycleUnit, creditsMeter, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, resolveSettingsTabFromPath, roundCredits, sharedPoolBannerText, useSettingsAdapters, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };
2191
+ interface AdministrationOverviewProps {
2192
+ workspaceName?: string | null;
2193
+ organizationName?: string | null;
2194
+ hasWorkspace: boolean;
2195
+ hasOrganization: boolean;
2196
+ isWorkspaceAdmin: boolean;
2197
+ showConnectedApps: boolean;
2198
+ showIntegrations: boolean;
2199
+ canInvite: boolean;
2200
+ onNavigate: (tab: SettingsTab) => void;
2201
+ onInvitePeople?: () => void;
2202
+ }
2203
+ /** Scope-first navigation into the existing forms; contains no mutation logic. */
2204
+ declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
2205
+
2206
+ /** Shared invitation rule. A result belongs to one authenticated workspace;
2207
+ * callers must explicitly mark it ready after that workspace's reads settle. */
2208
+ declare function deriveWorkspaceInvitePermission({ workspaceId, userId, role, hasInviteAccess, organizationId, organization, isReady, failed, }: {
2209
+ workspaceId?: string | null;
2210
+ userId?: string | null;
2211
+ role?: string | null;
2212
+ hasInviteAccess: boolean;
2213
+ organizationId?: string | null;
2214
+ organization?: {
2215
+ id: string;
2216
+ role?: string;
2217
+ } | null;
2218
+ isReady: boolean;
2219
+ failed?: boolean;
2220
+ }): boolean;
2221
+ /** Read-only, fail-closed permission for a workspace's invitation entry points.
2222
+ * Does not request invitation, billing, or organization mutation APIs. */
2223
+ declare function useWorkspaceInvitePermission(adapters: SettingsAdapters, { enabled }?: {
2224
+ enabled?: boolean;
2225
+ }): {
2226
+ canInvite: boolean;
2227
+ isLoading: boolean;
2228
+ };
2229
+
2230
+ interface AdministrativeNavigationOptions {
2231
+ /** Hosts whose product page is /app-settings or /resources use /settings only for administration. */
2232
+ settingsRootIsAdministration?: boolean;
2233
+ }
2234
+ /** Only canonical same-workspace app routes can become a close destination. */
2235
+ declare function settingsReturnTarget(value: unknown, base: string, options?: AdministrativeNavigationOptions): string | null;
2236
+ /** Persist only for a known router entry, so reload can recover its origin. */
2237
+ declare function rememberSettingsCaller(value: string, base: string, entryKey: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
2238
+ declare function readSettingsCaller(base: string, state?: unknown, entryKey?: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
2239
+
2240
+ interface AppSettingsHeaderProps {
2241
+ administrationHref: string;
2242
+ /** Optional router callback: the host captures its caller before navigation. */
2243
+ onOpenAdministration?: () => void;
2244
+ /** Close the product settings screen independently of sidebar navigation. */
2245
+ onClose?: () => void;
2246
+ }
2247
+ declare function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }: AppSettingsHeaderProps): react.JSX.Element;
2248
+ interface AppSettingsPageProps extends AppSettingsHeaderProps {
2249
+ emptyTitle?: string;
2250
+ emptyDescription?: string;
2251
+ children?: ReactNode;
2252
+ }
2253
+ /** Shared product-settings frame. Empty hosts show an honest, intentional state. */
2254
+ declare function AppSettingsPage({ administrationHref, onOpenAdministration, onClose, emptyTitle, emptyDescription, children, }: AppSettingsPageProps): react.JSX.Element;
2255
+ interface AppSettingsSectionProps {
2256
+ title: string;
2257
+ children: ReactNode;
2258
+ action?: ReactNode;
2259
+ }
2260
+ /** Compact product-settings bands shared by every host. */
2261
+ declare function AppSettingsSection({ title, action, children }: AppSettingsSectionProps): react.JSX.Element;
2262
+ interface AppSettingsRowProps {
2263
+ title: string;
2264
+ description?: string;
2265
+ summary?: ReactNode;
2266
+ href?: string;
2267
+ onClick?: () => void;
2268
+ disabled?: boolean;
2269
+ disabledReason?: string;
2270
+ ariaLabel?: string;
2271
+ trailing?: ReactNode;
2272
+ }
2273
+ declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
2274
+
2275
+ export { APP_KEYS, type AddCreditPoolMemberInput, AdministrationOverview, type AdministrationOverviewProps, type AdministrativeNavigationOptions, type ApiToken, type AppKey, AppSettingsHeader, type AppSettingsHeaderProps, AppSettingsPage, type AppSettingsPageProps, AppSettingsRow, type AppSettingsRowProps, AppSettingsSection, type AppSettingsSectionProps, type AvailableCreditsResponse, BillingContent, type BillingEventPayload, type BillingProduct, type BillingSubscription, BuyCreditsModal, type BuyCreditsPayload, type BuyCreditsResponse, ConfirmDeleteModal, ConfirmLeaveModal, type ConnectedApp, ConnectedAppsContent, type CreatedToken, type CreditCycleUnit, type CreditLimitValidation, type CreditPoolCandidate, type CreditPoolFormerMember, type CreditPoolMember, CreditPoolMemberModal, type CreditPoolMemberModalProps, type CreditPoolMemberStatus, type CreditPoolMode, type CreditPoolResponse, type CreditsMeter, type CustomCreditInfo, type CustomCreditResponse, DEFAULT_PERMISSIONS, DEFAULT_USER_LANGUAGE, ExportDateModal, InviteUpdateModal, type InvoicePdfResponse, type MemberCreditLimit, MemberCreditLimitModal, type MemberCreditLimitRow, type MemberCreditLimitSource, type MemberCreditLimitsResponse, MemberListFrame, type MemberListFrameProps, type MemberListTab, MemberListToolbar, type MemberListToolbarProps, type MemberPermissionsPayload, OrganizationContent, type OrganizationData, type OrganizationDetails, OrganizationIntegrationsContent, type OrganizationInvite, type OrganizationJoinRequest, type OrganizationJoinableWorkspace, type OrganizationMember, OrganizationMemberModal, type OrganizationMemberModalProps, type OrganizationMemberRole, OrganizationModal, OrganizationPicker, type OrganizationPickerItem, type OrganizationPickerProps, type OrganizationPickerType, type OrganizationView, type OrganizationWorkspaceItem, POOL_ERROR_CODES, POOL_NOTE_MAX_LENGTH, PerUserLimitsView, type PoolErrorCode, type PoolValueValidation, type Price, type PriceMetadata, type ProductsResponse, ProfileAvatar, ProfileTab, REMOVE_REASON_MAX_LENGTH, ReferralTab, RemovePoolMemberModal, type RemovePoolMemberModalProps, SCOPE_LABELS, ScopeHeader, type ScopeHeaderProps, type ServiceItem, type SettingsAdapters, SettingsAdaptersProvider, type SettingsApiAdapter, type SettingsAuthAdapter, type SettingsAuthUser, SettingsContent, type SettingsContentProps, type SettingsImageUploadAdapter, type SettingsIntegrationsAdapter, type SettingsNavigationAdapter, type SettingsOrganizationAdapter, type SettingsOrganizationCreateOptions, type SettingsOrganizationCurrent, type SettingsOrganizationJoinableItem, type SettingsOrganizationListItem, type SettingsOrganizationType, type SettingsScope, type SettingsTab, type SettingsToastAdapter, SettingsTooltip, type SettingsTooltipPlacement, type SettingsTooltipProps, type SettingsWorkspaceAdapter, type SettingsWorkspaceCurrent, type SettingsWorkspaceListItem, SharedCreditsView, type SharedPoolBalance, SiconKey, type StoreItem, type SubscriptionPlan, type SubscriptionResponse, TAB_DESCRIPTIONS, TAB_LABELS, TAB_SCOPE, TAB_TO_URL, type TeamMember, TeamsContent, type TokenExpiry, TokensContent, URL_TO_TAB, USER_LANGUAGES, type UpdateCreditPoolMemberInput, type UpdateSubscriptionPayload, type UpdateSubscriptionResponse, type UsageHistoryItem, type UsageHistoryResponse, type UserLanguage, type UserPermissions, WORKSPACE_LIST_PAGE_SIZE, type WorkspaceData, WorkspaceGeneralTab, type WorkspaceGeneralTabProps, type WorkspaceInvite, type WorkspaceListOrganization, WorkspaceListTab, type WorkspaceMember, WorkspaceModal, type WorkspaceOrganization, type WorkspaceOrganizationRequest, WorkspacePicker, type WorkspacePickerGroup, type WorkspacePickerItem, type WorkspacePickerProps, WorkspaceTab, type WorkspaceUsageResponse, belowUsageReason, canShowSharedCredits, cleanCreditLimitInput, cleanPoolValueInput, countLabel, creditCycleUnit, creditsMeter, deriveWorkspaceInvitePermission, describeAllowance, describeDefaultLimit, describeMemberLimit, findBillingError, findPoolError, formatCreditLimit, formatCredits, formatPoolSplit, groupWorkspaceList, isLimitBelowUsage, joinMembersWithLimits, lastUsedLabel, limitBelowUsageUsed, limitSourceLabel, loadWorkspaceOrganization, memberRoleUpdate, minimumCreditLimit, ownCreditsFirstText, pausedOwnCreditsText, poolErrorMessage, poolWorkspaceName, readSettingsCaller, rememberSettingsCaller, resolveSettingsTabFromPath, roundCredits, settingsReturnTarget, sharedPoolBannerText, useSettingsAdapters, useWorkspaceInvitePermission, useWorkspaceOrganization, usedByNamesFrom, usedByWorkspaceKey, userLanguageLabel, validateCreditLimitInput, validateDefaultCreditLimitInput, validatePoolText, validatePoolValue };