@streamoid/settings 0.12.1 → 0.12.3
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 +286 -0
- package/dist/index.d.mts +114 -10
- package/dist/index.d.ts +114 -10
- package/dist/index.js +2735 -2196
- package/dist/index.mjs +2646 -2094
- package/package.json +1 -1
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,10 +1329,23 @@ 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
|
-
* Leave settings.
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1344
|
+
* Leave settings. Escape dismisses through it; the host decides where
|
|
1345
|
+
* "closed" goes (settings is a full route in most hosts, not an overlay).
|
|
1346
|
+
* In the default presentation the Back control falls back to it when no
|
|
1347
|
+
* `onBack` is given; `presentation="overview-detail"` renders a close (×)
|
|
1348
|
+
* button for it.
|
|
1336
1349
|
*
|
|
1337
1350
|
* Falls back to `adapters.navigation.close` so hosts that already build an
|
|
1338
1351
|
* adapter object don't have to thread a second prop through. Omit both and
|
|
@@ -1340,14 +1353,18 @@ interface SettingsContentProps {
|
|
|
1340
1353
|
*/
|
|
1341
1354
|
onClose?: () => void;
|
|
1342
1355
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1345
|
-
*
|
|
1346
|
-
*
|
|
1356
|
+
* Go back to the screen the user came from, rendered as a `← Back` control
|
|
1357
|
+
* above the breadcrumb.
|
|
1358
|
+
*
|
|
1359
|
+
* Defaults to `adapters.navigation.back`, then to `onClose`, and to
|
|
1360
|
+
* `window.history.back()` when none is supplied — settings is a route in every host, so the
|
|
1361
|
+
* browser already knows where the user was, and requiring a prop would mean
|
|
1362
|
+
* the control appeared in whichever app remembered to pass one. Pass `null`
|
|
1363
|
+
* to render no back control.
|
|
1347
1364
|
*/
|
|
1348
1365
|
onBack?: (() => void) | null;
|
|
1349
1366
|
}
|
|
1350
|
-
declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
|
|
1367
|
+
declare function SettingsContent({ adapters, activeTab, onClose, onBack, hiddenApps, presentation, showOverview, onOverview, onInvitePeople, inviteRequested, onInviteRequestHandled, }: SettingsContentProps): react.JSX.Element;
|
|
1351
1368
|
|
|
1352
1369
|
interface WorkspaceData {
|
|
1353
1370
|
id: string;
|
|
@@ -1434,13 +1451,16 @@ declare function memberRoleUpdate(current: {
|
|
|
1434
1451
|
}, permissions: UserPermissions, services: ServiceItem[]): ({
|
|
1435
1452
|
userId: string;
|
|
1436
1453
|
} & MemberPermissionsPayload) | null;
|
|
1437
|
-
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
1454
|
+
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, inviteRequested, onInviteRequestHandled, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
1438
1455
|
embedded?: boolean;
|
|
1439
1456
|
onInviteOpen?: boolean;
|
|
1440
1457
|
onInviteOpenChange?: (open: boolean) => void;
|
|
1441
1458
|
/** Told whether the viewer may invite here, so a host-drawn Invite button
|
|
1442
1459
|
* can follow the same rule as this screen's own. */
|
|
1443
1460
|
onCanInviteChange?: (canInvite: boolean) => void;
|
|
1461
|
+
/** A request remains pending until this workspace's permissions resolve. */
|
|
1462
|
+
inviteRequested?: boolean;
|
|
1463
|
+
onInviteRequestHandled?: () => void;
|
|
1444
1464
|
/**
|
|
1445
1465
|
* The workspace these members belong to. Supplied by the settings shell so
|
|
1446
1466
|
* the page can name its own subject — without it this screen was a list of
|
|
@@ -2174,4 +2194,88 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
|
2174
2194
|
*/
|
|
2175
2195
|
declare function useSettingsAdapters(): SettingsAdapters;
|
|
2176
2196
|
|
|
2177
|
-
|
|
2197
|
+
interface AdministrationOverviewProps {
|
|
2198
|
+
workspaceName?: string | null;
|
|
2199
|
+
organizationName?: string | null;
|
|
2200
|
+
hasWorkspace: boolean;
|
|
2201
|
+
hasOrganization: boolean;
|
|
2202
|
+
isWorkspaceAdmin: boolean;
|
|
2203
|
+
showConnectedApps: boolean;
|
|
2204
|
+
showIntegrations: boolean;
|
|
2205
|
+
canInvite: boolean;
|
|
2206
|
+
onNavigate: (tab: SettingsTab) => void;
|
|
2207
|
+
onInvitePeople?: () => void;
|
|
2208
|
+
}
|
|
2209
|
+
/** Scope-first navigation into the existing forms; contains no mutation logic. */
|
|
2210
|
+
declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
|
|
2211
|
+
|
|
2212
|
+
/** Shared invitation rule. A result belongs to one authenticated workspace;
|
|
2213
|
+
* callers must explicitly mark it ready after that workspace's reads settle. */
|
|
2214
|
+
declare function deriveWorkspaceInvitePermission({ workspaceId, userId, role, hasInviteAccess, organizationId, organization, isReady, failed, }: {
|
|
2215
|
+
workspaceId?: string | null;
|
|
2216
|
+
userId?: string | null;
|
|
2217
|
+
role?: string | null;
|
|
2218
|
+
hasInviteAccess: boolean;
|
|
2219
|
+
organizationId?: string | null;
|
|
2220
|
+
organization?: {
|
|
2221
|
+
id: string;
|
|
2222
|
+
role?: string;
|
|
2223
|
+
} | null;
|
|
2224
|
+
isReady: boolean;
|
|
2225
|
+
failed?: boolean;
|
|
2226
|
+
}): boolean;
|
|
2227
|
+
/** Read-only, fail-closed permission for a workspace's invitation entry points.
|
|
2228
|
+
* Does not request invitation, billing, or organization mutation APIs. */
|
|
2229
|
+
declare function useWorkspaceInvitePermission(adapters: SettingsAdapters, { enabled }?: {
|
|
2230
|
+
enabled?: boolean;
|
|
2231
|
+
}): {
|
|
2232
|
+
canInvite: boolean;
|
|
2233
|
+
isLoading: boolean;
|
|
2234
|
+
};
|
|
2235
|
+
|
|
2236
|
+
interface AdministrativeNavigationOptions {
|
|
2237
|
+
/** Hosts whose product page is /app-settings or /resources use /settings only for administration. */
|
|
2238
|
+
settingsRootIsAdministration?: boolean;
|
|
2239
|
+
}
|
|
2240
|
+
/** Only canonical same-workspace app routes can become a close destination. */
|
|
2241
|
+
declare function settingsReturnTarget(value: unknown, base: string, options?: AdministrativeNavigationOptions): string | null;
|
|
2242
|
+
/** Persist only for a known router entry, so reload can recover its origin. */
|
|
2243
|
+
declare function rememberSettingsCaller(value: string, base: string, entryKey: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
|
|
2244
|
+
declare function readSettingsCaller(base: string, state?: unknown, entryKey?: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
|
|
2245
|
+
|
|
2246
|
+
interface AppSettingsHeaderProps {
|
|
2247
|
+
administrationHref: string;
|
|
2248
|
+
/** Optional router callback: the host captures its caller before navigation. */
|
|
2249
|
+
onOpenAdministration?: () => void;
|
|
2250
|
+
/** Close the product settings screen independently of sidebar navigation. */
|
|
2251
|
+
onClose?: () => void;
|
|
2252
|
+
}
|
|
2253
|
+
declare function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }: AppSettingsHeaderProps): react.JSX.Element;
|
|
2254
|
+
interface AppSettingsPageProps extends AppSettingsHeaderProps {
|
|
2255
|
+
emptyTitle?: string;
|
|
2256
|
+
emptyDescription?: string;
|
|
2257
|
+
children?: ReactNode;
|
|
2258
|
+
}
|
|
2259
|
+
/** Shared product-settings frame. Empty hosts show an honest, intentional state. */
|
|
2260
|
+
declare function AppSettingsPage({ administrationHref, onOpenAdministration, onClose, emptyTitle, emptyDescription, children, }: AppSettingsPageProps): react.JSX.Element;
|
|
2261
|
+
interface AppSettingsSectionProps {
|
|
2262
|
+
title: string;
|
|
2263
|
+
children: ReactNode;
|
|
2264
|
+
action?: ReactNode;
|
|
2265
|
+
}
|
|
2266
|
+
/** Compact product-settings bands shared by every host. */
|
|
2267
|
+
declare function AppSettingsSection({ title, action, children }: AppSettingsSectionProps): react.JSX.Element;
|
|
2268
|
+
interface AppSettingsRowProps {
|
|
2269
|
+
title: string;
|
|
2270
|
+
description?: string;
|
|
2271
|
+
summary?: ReactNode;
|
|
2272
|
+
href?: string;
|
|
2273
|
+
onClick?: () => void;
|
|
2274
|
+
disabled?: boolean;
|
|
2275
|
+
disabledReason?: string;
|
|
2276
|
+
ariaLabel?: string;
|
|
2277
|
+
trailing?: ReactNode;
|
|
2278
|
+
}
|
|
2279
|
+
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2280
|
+
|
|
2281
|
+
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,10 +1329,23 @@ 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
|
-
* Leave settings.
|
|
1334
|
-
*
|
|
1335
|
-
*
|
|
1344
|
+
* Leave settings. Escape dismisses through it; the host decides where
|
|
1345
|
+
* "closed" goes (settings is a full route in most hosts, not an overlay).
|
|
1346
|
+
* In the default presentation the Back control falls back to it when no
|
|
1347
|
+
* `onBack` is given; `presentation="overview-detail"` renders a close (×)
|
|
1348
|
+
* button for it.
|
|
1336
1349
|
*
|
|
1337
1350
|
* Falls back to `adapters.navigation.close` so hosts that already build an
|
|
1338
1351
|
* adapter object don't have to thread a second prop through. Omit both and
|
|
@@ -1340,14 +1353,18 @@ interface SettingsContentProps {
|
|
|
1340
1353
|
*/
|
|
1341
1354
|
onClose?: () => void;
|
|
1342
1355
|
/**
|
|
1343
|
-
*
|
|
1344
|
-
*
|
|
1345
|
-
*
|
|
1346
|
-
*
|
|
1356
|
+
* Go back to the screen the user came from, rendered as a `← Back` control
|
|
1357
|
+
* above the breadcrumb.
|
|
1358
|
+
*
|
|
1359
|
+
* Defaults to `adapters.navigation.back`, then to `onClose`, and to
|
|
1360
|
+
* `window.history.back()` when none is supplied — settings is a route in every host, so the
|
|
1361
|
+
* browser already knows where the user was, and requiring a prop would mean
|
|
1362
|
+
* the control appeared in whichever app remembered to pass one. Pass `null`
|
|
1363
|
+
* to render no back control.
|
|
1347
1364
|
*/
|
|
1348
1365
|
onBack?: (() => void) | null;
|
|
1349
1366
|
}
|
|
1350
|
-
declare function SettingsContent({ adapters, activeTab, onClose, hiddenApps, }: SettingsContentProps): react.JSX.Element;
|
|
1367
|
+
declare function SettingsContent({ adapters, activeTab, onClose, onBack, hiddenApps, presentation, showOverview, onOverview, onInvitePeople, inviteRequested, onInviteRequestHandled, }: SettingsContentProps): react.JSX.Element;
|
|
1351
1368
|
|
|
1352
1369
|
interface WorkspaceData {
|
|
1353
1370
|
id: string;
|
|
@@ -1434,13 +1451,16 @@ declare function memberRoleUpdate(current: {
|
|
|
1434
1451
|
}, permissions: UserPermissions, services: ServiceItem[]): ({
|
|
1435
1452
|
userId: string;
|
|
1436
1453
|
} & MemberPermissionsPayload) | null;
|
|
1437
|
-
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
1454
|
+
declare function TeamsContent({ embedded, onInviteOpen, onInviteOpenChange, onCanInviteChange, inviteRequested, onInviteRequestHandled, workspaceName, workspaceImageUrl, organizationName, hiddenApps, }?: {
|
|
1438
1455
|
embedded?: boolean;
|
|
1439
1456
|
onInviteOpen?: boolean;
|
|
1440
1457
|
onInviteOpenChange?: (open: boolean) => void;
|
|
1441
1458
|
/** Told whether the viewer may invite here, so a host-drawn Invite button
|
|
1442
1459
|
* can follow the same rule as this screen's own. */
|
|
1443
1460
|
onCanInviteChange?: (canInvite: boolean) => void;
|
|
1461
|
+
/** A request remains pending until this workspace's permissions resolve. */
|
|
1462
|
+
inviteRequested?: boolean;
|
|
1463
|
+
onInviteRequestHandled?: () => void;
|
|
1444
1464
|
/**
|
|
1445
1465
|
* The workspace these members belong to. Supplied by the settings shell so
|
|
1446
1466
|
* the page can name its own subject — without it this screen was a list of
|
|
@@ -2174,4 +2194,88 @@ declare function SettingsAdaptersProvider({ adapters, children, }: {
|
|
|
2174
2194
|
*/
|
|
2175
2195
|
declare function useSettingsAdapters(): SettingsAdapters;
|
|
2176
2196
|
|
|
2177
|
-
|
|
2197
|
+
interface AdministrationOverviewProps {
|
|
2198
|
+
workspaceName?: string | null;
|
|
2199
|
+
organizationName?: string | null;
|
|
2200
|
+
hasWorkspace: boolean;
|
|
2201
|
+
hasOrganization: boolean;
|
|
2202
|
+
isWorkspaceAdmin: boolean;
|
|
2203
|
+
showConnectedApps: boolean;
|
|
2204
|
+
showIntegrations: boolean;
|
|
2205
|
+
canInvite: boolean;
|
|
2206
|
+
onNavigate: (tab: SettingsTab) => void;
|
|
2207
|
+
onInvitePeople?: () => void;
|
|
2208
|
+
}
|
|
2209
|
+
/** Scope-first navigation into the existing forms; contains no mutation logic. */
|
|
2210
|
+
declare function AdministrationOverview({ workspaceName, organizationName, hasWorkspace, hasOrganization, isWorkspaceAdmin, showConnectedApps, showIntegrations, canInvite, onNavigate, onInvitePeople, }: AdministrationOverviewProps): react.JSX.Element;
|
|
2211
|
+
|
|
2212
|
+
/** Shared invitation rule. A result belongs to one authenticated workspace;
|
|
2213
|
+
* callers must explicitly mark it ready after that workspace's reads settle. */
|
|
2214
|
+
declare function deriveWorkspaceInvitePermission({ workspaceId, userId, role, hasInviteAccess, organizationId, organization, isReady, failed, }: {
|
|
2215
|
+
workspaceId?: string | null;
|
|
2216
|
+
userId?: string | null;
|
|
2217
|
+
role?: string | null;
|
|
2218
|
+
hasInviteAccess: boolean;
|
|
2219
|
+
organizationId?: string | null;
|
|
2220
|
+
organization?: {
|
|
2221
|
+
id: string;
|
|
2222
|
+
role?: string;
|
|
2223
|
+
} | null;
|
|
2224
|
+
isReady: boolean;
|
|
2225
|
+
failed?: boolean;
|
|
2226
|
+
}): boolean;
|
|
2227
|
+
/** Read-only, fail-closed permission for a workspace's invitation entry points.
|
|
2228
|
+
* Does not request invitation, billing, or organization mutation APIs. */
|
|
2229
|
+
declare function useWorkspaceInvitePermission(adapters: SettingsAdapters, { enabled }?: {
|
|
2230
|
+
enabled?: boolean;
|
|
2231
|
+
}): {
|
|
2232
|
+
canInvite: boolean;
|
|
2233
|
+
isLoading: boolean;
|
|
2234
|
+
};
|
|
2235
|
+
|
|
2236
|
+
interface AdministrativeNavigationOptions {
|
|
2237
|
+
/** Hosts whose product page is /app-settings or /resources use /settings only for administration. */
|
|
2238
|
+
settingsRootIsAdministration?: boolean;
|
|
2239
|
+
}
|
|
2240
|
+
/** Only canonical same-workspace app routes can become a close destination. */
|
|
2241
|
+
declare function settingsReturnTarget(value: unknown, base: string, options?: AdministrativeNavigationOptions): string | null;
|
|
2242
|
+
/** Persist only for a known router entry, so reload can recover its origin. */
|
|
2243
|
+
declare function rememberSettingsCaller(value: string, base: string, entryKey: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
|
|
2244
|
+
declare function readSettingsCaller(base: string, state?: unknown, entryKey?: string, fallback?: string, options?: AdministrativeNavigationOptions): string;
|
|
2245
|
+
|
|
2246
|
+
interface AppSettingsHeaderProps {
|
|
2247
|
+
administrationHref: string;
|
|
2248
|
+
/** Optional router callback: the host captures its caller before navigation. */
|
|
2249
|
+
onOpenAdministration?: () => void;
|
|
2250
|
+
/** Close the product settings screen independently of sidebar navigation. */
|
|
2251
|
+
onClose?: () => void;
|
|
2252
|
+
}
|
|
2253
|
+
declare function AppSettingsHeader({ administrationHref, onOpenAdministration, onClose }: AppSettingsHeaderProps): react.JSX.Element;
|
|
2254
|
+
interface AppSettingsPageProps extends AppSettingsHeaderProps {
|
|
2255
|
+
emptyTitle?: string;
|
|
2256
|
+
emptyDescription?: string;
|
|
2257
|
+
children?: ReactNode;
|
|
2258
|
+
}
|
|
2259
|
+
/** Shared product-settings frame. Empty hosts show an honest, intentional state. */
|
|
2260
|
+
declare function AppSettingsPage({ administrationHref, onOpenAdministration, onClose, emptyTitle, emptyDescription, children, }: AppSettingsPageProps): react.JSX.Element;
|
|
2261
|
+
interface AppSettingsSectionProps {
|
|
2262
|
+
title: string;
|
|
2263
|
+
children: ReactNode;
|
|
2264
|
+
action?: ReactNode;
|
|
2265
|
+
}
|
|
2266
|
+
/** Compact product-settings bands shared by every host. */
|
|
2267
|
+
declare function AppSettingsSection({ title, action, children }: AppSettingsSectionProps): react.JSX.Element;
|
|
2268
|
+
interface AppSettingsRowProps {
|
|
2269
|
+
title: string;
|
|
2270
|
+
description?: string;
|
|
2271
|
+
summary?: ReactNode;
|
|
2272
|
+
href?: string;
|
|
2273
|
+
onClick?: () => void;
|
|
2274
|
+
disabled?: boolean;
|
|
2275
|
+
disabledReason?: string;
|
|
2276
|
+
ariaLabel?: string;
|
|
2277
|
+
trailing?: ReactNode;
|
|
2278
|
+
}
|
|
2279
|
+
declare function AppSettingsRow({ title, description, summary, href, onClick, disabled, disabledReason, ariaLabel, trailing }: AppSettingsRowProps): react.JSX.Element;
|
|
2280
|
+
|
|
2281
|
+
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 };
|