@gemboss/ui 0.58.0 → 0.59.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +85 -0
- package/README.md +189 -5
- package/catalog/editor.html +1 -1
- package/catalog/index.html +2 -2
- package/gemboss-ui.css +2 -2
- package/node/skill-flow/layout.js +194 -0
- package/node/skill-flow/model.js +279 -0
- package/package.json +16 -2
- package/parts/components.css +1 -1
- package/parts/core.css +1 -1
- package/parts/shell.css +1 -1
- package/src/auth-sso-plain.js +1 -1
- package/src/auth.tsx +2 -0
- package/src/editor.css +1 -1
- package/src/index.ts +11 -1
- package/src/list-page.css +1 -1
- package/src/members-data.ts +278 -0
- package/src/members.css +1 -0
- package/src/members.tsx +868 -0
- package/src/menu-extras.css +1 -1
- package/src/menu-select.css +1 -0
- package/src/menu.tsx +39 -12
- package/src/skill-card.css +1 -0
- package/src/skill-card.tsx +146 -0
- package/src/skill-flow/canvas.tsx +43 -24
- package/src/skill-flow/index.ts +3 -1
- package/src/skill-flow/layout.ts +15 -6
- package/src/skill-flow/model.ts +216 -60
- package/src/skill-flow.css +1 -1
- package/src/skill-view.css +1 -1
- package/src/skill-view.tsx +101 -109
- package/src/theme-dark.css +1 -1
|
@@ -0,0 +1,278 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The Members pattern's data side (@gemboss/ui, unreleased, 04/11/2026): no React, no stylesheet, so a server can check an import
|
|
3
|
+
* with the same rules the page shows, and a plain-HTML surface (GemCare) can count and filter its rows the same way.
|
|
4
|
+
*
|
|
5
|
+
* What a person is to the pattern (MemberPerson), the roles and scopes an app declares, the fixed filter group (All · Team ·
|
|
6
|
+
* Pending) and its counts, the search (accents folded: "le" finds "Lê"), the step machine of a role change on a row (choose →
|
|
7
|
+
* confirm or cancel → saving → done), the last-holder guard (the last admin of a scope keeps the role), and the CSV an Invite ›
|
|
8
|
+
* Many paste is read with. members.tsx draws it; README "Members" has the whole pattern.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
export type MemberStatus = "active" | "pending" | "invited" | "locked";
|
|
12
|
+
export const MEMBER_STATUSES: readonly MemberStatus[] = ["active", "pending", "invited", "locked"];
|
|
13
|
+
|
|
14
|
+
/** A role an app declares. `staff`: holding it in any scope puts the person in the fixed "Team" chip (GemCommunity's admin and
|
|
15
|
+
* mod; none in GemCare, where everyone is staff, and the chip is not drawn). */
|
|
16
|
+
export interface MemberRole { id: string; label: string; staff?: boolean }
|
|
17
|
+
|
|
18
|
+
/** Where a role is held: GemCare has two workspaces (GemBoss care, GemPages care), GemCommunity one group. `roles` when this
|
|
19
|
+
* scope offers other roles than the page's; `allowNone`: "—" (no role here) can be chosen, not only shown. */
|
|
20
|
+
export interface MemberScope { id: string; label: string; roles?: readonly (MemberRole | string)[]; allowNone?: boolean }
|
|
21
|
+
|
|
22
|
+
export interface MemberPerson {
|
|
23
|
+
id: string;
|
|
24
|
+
name: string;
|
|
25
|
+
email: string;
|
|
26
|
+
avatar?: string | null;
|
|
27
|
+
status: MemberStatus;
|
|
28
|
+
/** The role in each scope, by scope id; null or missing: no role there ("—"). */
|
|
29
|
+
roles?: Readonly<Record<string, string | null | undefined>>;
|
|
30
|
+
/** Shorthand for a page with one scope: the role in the first scope. */
|
|
31
|
+
role?: string | null;
|
|
32
|
+
/** Already worded by the host, in its language ("2 hours ago", "hôm qua"). */
|
|
33
|
+
lastActive?: string;
|
|
34
|
+
/** What the drawer's Sign-in block shows. `twoFactor` null or missing: not said. */
|
|
35
|
+
signIn?: { method?: string; twoFactor?: boolean | null; last?: string };
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
/** The scope a page has when it declares none: one, unnamed. */
|
|
39
|
+
export const DEFAULT_SCOPE: MemberScope = { id: "default", label: "" };
|
|
40
|
+
|
|
41
|
+
const capital = (s: string) => (s ? s[0]!.toUpperCase() + s.slice(1) : s);
|
|
42
|
+
|
|
43
|
+
/** "admin" is { id: "admin", label: "Admin" }; a declared role is itself. */
|
|
44
|
+
export function normalizeRoles(roles: readonly (MemberRole | string)[] = []): MemberRole[] {
|
|
45
|
+
return roles.map((r) => (typeof r === "string" ? { id: r, label: capital(r) } : r));
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
export function scopesOf(scopes?: readonly MemberScope[]): MemberScope[] {
|
|
49
|
+
return scopes && scopes.length ? [...scopes] : [DEFAULT_SCOPE];
|
|
50
|
+
}
|
|
51
|
+
|
|
52
|
+
/** The roles a scope offers: its own, else the page's. */
|
|
53
|
+
export function rolesIn(scope: MemberScope, roles: readonly (MemberRole | string)[]): MemberRole[] {
|
|
54
|
+
return normalizeRoles(scope.roles ?? roles);
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
/** The person's role in a scope (the `role` shorthand counts for the first scope), or null. */
|
|
58
|
+
export function roleOf(person: MemberPerson, scopeId: string, scopes: readonly MemberScope[]): string | null {
|
|
59
|
+
const own = person.roles?.[scopeId];
|
|
60
|
+
if (own != null && own !== "") return own;
|
|
61
|
+
if (scopes[0]?.id === scopeId && person.role != null && person.role !== "") return person.role;
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
export function roleLabel(roleId: string | null, scope: MemberScope, roles: readonly (MemberRole | string)[]): string | null {
|
|
66
|
+
if (roleId == null) return null;
|
|
67
|
+
return rolesIn(scope, roles).find((r) => r.id === roleId)?.label ?? capital(roleId);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
/** Holds a staff role (a role declared `staff`) in any scope. */
|
|
71
|
+
export function isTeam(person: MemberPerson, roles: readonly (MemberRole | string)[], scopes: readonly MemberScope[]): boolean {
|
|
72
|
+
return scopes.some((s) => {
|
|
73
|
+
const r = roleOf(person, s.id, scopes);
|
|
74
|
+
return r != null && rolesIn(s, roles).some((x) => x.id === r && x.staff);
|
|
75
|
+
});
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
/** Not in yet: waiting for approval, or invited and not signed in. */
|
|
79
|
+
export const isPending = (p: MemberPerson) => p.status === "pending" || p.status === "invited";
|
|
80
|
+
|
|
81
|
+
/** An app's own chip: its words and which people it holds. `count` when the host counts on the server (a page of rows). */
|
|
82
|
+
export interface MemberFilter { id: string; label: string; test: (person: MemberPerson) => boolean; count?: number }
|
|
83
|
+
|
|
84
|
+
/** The fixed group's ids. An app's chip ids must not be these. */
|
|
85
|
+
export const FIXED_FILTERS = ["all", "team", "pending"] as const;
|
|
86
|
+
|
|
87
|
+
/** Accents and case folded, so "le" finds "Lê" and "dang" finds "Đặng". */
|
|
88
|
+
export function foldText(s: string): string {
|
|
89
|
+
return s.normalize("NFD").replace(/\p{M}/gu, "").replace(/[đĐ]/g, "d").toLowerCase();
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
export function matchesQuery(person: MemberPerson, query: string): boolean {
|
|
93
|
+
const q = foldText(query.trim());
|
|
94
|
+
if (!q) return true;
|
|
95
|
+
return foldText(`${person.name} ${person.email}`).includes(q);
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
export interface MembersContext { roles: readonly (MemberRole | string)[]; scopes: readonly MemberScope[]; filters?: readonly MemberFilter[] }
|
|
99
|
+
|
|
100
|
+
export function matchesFilter(person: MemberPerson, filter: string, ctx: MembersContext): boolean {
|
|
101
|
+
if (filter === "all" || !filter) return true;
|
|
102
|
+
if (filter === "team") return isTeam(person, ctx.roles, ctx.scopes);
|
|
103
|
+
if (filter === "pending") return isPending(person);
|
|
104
|
+
const own = ctx.filters?.find((f) => f.id === filter);
|
|
105
|
+
return own ? own.test(person) : true;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
/** How many each chip holds, over everyone (a chip's count does not move with the search). */
|
|
109
|
+
export function memberCounts(people: readonly MemberPerson[], ctx: MembersContext): Record<string, number> {
|
|
110
|
+
const out: Record<string, number> = { all: people.length, team: 0, pending: 0 };
|
|
111
|
+
for (const f of ctx.filters ?? []) out[f.id] = f.count ?? 0;
|
|
112
|
+
for (const p of people) {
|
|
113
|
+
if (isTeam(p, ctx.roles, ctx.scopes)) out.team! += 1;
|
|
114
|
+
if (isPending(p)) out.pending! += 1;
|
|
115
|
+
for (const f of ctx.filters ?? []) if (f.count == null && f.test(p)) out[f.id]! += 1;
|
|
116
|
+
}
|
|
117
|
+
return out;
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
export function visibleMembers(people: readonly MemberPerson[], filter: string, query: string, ctx: MembersContext): MemberPerson[] {
|
|
121
|
+
return people.filter((p) => matchesFilter(p, filter, ctx) && matchesQuery(p, query));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/** Whether the page has a Team chip at all: some role is a staff role. */
|
|
125
|
+
export function hasTeamRoles(roles: readonly (MemberRole | string)[], scopes: readonly MemberScope[]): boolean {
|
|
126
|
+
return scopes.some((s) => rolesIn(s, roles).some((r) => r.staff));
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* `canChangeRole` for the common rule: the LAST person holding `roleId` in a scope cannot have it changed there (the last admin
|
|
131
|
+
* of a workspace stays its admin). Returns `reason` for that person in that scope, true otherwise.
|
|
132
|
+
*/
|
|
133
|
+
export function lastRoleGuard(people: readonly MemberPerson[], roleId: string, scopes: readonly MemberScope[] = [DEFAULT_SCOPE],
|
|
134
|
+
reason = "The last one with this role keeps it."): (person: MemberPerson, scopeId: string) => true | string {
|
|
135
|
+
const sc = scopesOf(scopes);
|
|
136
|
+
return (person, scopeId) => {
|
|
137
|
+
if (roleOf(person, scopeId, sc) !== roleId) return true;
|
|
138
|
+
const holders = people.filter((p) => p.status !== "locked" && roleOf(p, scopeId, sc) === roleId);
|
|
139
|
+
return holders.length <= 1 ? reason : true;
|
|
140
|
+
};
|
|
141
|
+
}
|
|
142
|
+
|
|
143
|
+
// ── A role change on a row: choose a new role, then Change or Cancel on the row; never window.confirm. ─────────────────────────────
|
|
144
|
+
|
|
145
|
+
/** `where`: the row's select or the drawer's (the inline confirm is drawn beside the one that was used). */
|
|
146
|
+
export interface RoleChange { personId: string; scopeId: string; from: string | null; to: string; where: "row" | "drawer"; saving: boolean }
|
|
147
|
+
export type RoleChangeEvent =
|
|
148
|
+
| { type: "choose"; personId: string; scopeId: string; from: string | null; to: string; where: "row" | "drawer" }
|
|
149
|
+
| { type: "cancel" }
|
|
150
|
+
| { type: "save" }
|
|
151
|
+
| { type: "done" }
|
|
152
|
+
| { type: "failed" };
|
|
153
|
+
|
|
154
|
+
/** The step machine. A new choice replaces one waiting for its confirm (one change at a time); choosing the role the person
|
|
155
|
+
* already has is a cancel; while a change saves, nothing but its end moves it. */
|
|
156
|
+
export function roleChangeStep(state: RoleChange | null, e: RoleChangeEvent): RoleChange | null {
|
|
157
|
+
switch (e.type) {
|
|
158
|
+
case "choose": {
|
|
159
|
+
if (state?.saving) return state;
|
|
160
|
+
if (e.to === (e.from ?? "")) return null;
|
|
161
|
+
return { personId: e.personId, scopeId: e.scopeId, from: e.from, to: e.to, where: e.where, saving: false };
|
|
162
|
+
}
|
|
163
|
+
case "cancel": return state?.saving ? state : null;
|
|
164
|
+
case "save": return state ? { ...state, saving: true } : null;
|
|
165
|
+
case "done":
|
|
166
|
+
case "failed": return null;
|
|
167
|
+
default: return state;
|
|
168
|
+
}
|
|
169
|
+
}
|
|
170
|
+
|
|
171
|
+
// ── Invite › Many: the CSV. ────────────────────────────────────────────────────────────────────────────────────────────────────
|
|
172
|
+
|
|
173
|
+
export interface MemberInvite { name: string; email: string; role: string; scope: string }
|
|
174
|
+
/** One line that will be imported. `line` is its line in the pasted text (1 = the first, a header line included). */
|
|
175
|
+
export interface MemberImportRow extends MemberInvite { line: number }
|
|
176
|
+
export type MemberImportReason = "email" | "role" | "scope" | "duplicate";
|
|
177
|
+
export interface MemberImportProblem { line: number; text: string; reason: MemberImportReason; value?: string }
|
|
178
|
+
|
|
179
|
+
const EMAIL = /^[^\s@,;<>"]+@[^\s@,;<>"]+\.[^\s@,;<>"]+$/;
|
|
180
|
+
export const isEmail = (s: string) => EMAIL.test(s.trim());
|
|
181
|
+
|
|
182
|
+
/** One CSV line into cells: `"…"` may hold the delimiter, `""` is a quote. */
|
|
183
|
+
export function splitCsvLine(line: string, delimiter: string): string[] {
|
|
184
|
+
const out: string[] = [];
|
|
185
|
+
let cur = "", quoted = false;
|
|
186
|
+
for (let i = 0; i < line.length; i++) {
|
|
187
|
+
const c = line[i]!;
|
|
188
|
+
if (quoted) {
|
|
189
|
+
if (c === '"' && line[i + 1] === '"') { cur += '"'; i++; }
|
|
190
|
+
else if (c === '"') quoted = false;
|
|
191
|
+
else cur += c;
|
|
192
|
+
} else if (c === '"' && cur.trim() === "") { quoted = true; cur = ""; }
|
|
193
|
+
else if (c === delimiter) { out.push(cur.trim()); cur = ""; }
|
|
194
|
+
else cur += c;
|
|
195
|
+
}
|
|
196
|
+
out.push(cur.trim());
|
|
197
|
+
return out;
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
/** Comma, unless the first line has more semicolons or tabs (a spreadsheet saved in a language that writes 1,5). */
|
|
201
|
+
function delimiterOf(line: string): string {
|
|
202
|
+
const n = (ch: string) => splitCsvLine(line, ch).length - 1;
|
|
203
|
+
const best = [",", ";", "\t"].map((d) => [d, n(d)] as const).sort((a, b) => b[1] - a[1])[0]!;
|
|
204
|
+
return best[1] > 0 ? best[0] : ",";
|
|
205
|
+
}
|
|
206
|
+
|
|
207
|
+
const HEADER: Record<string, keyof MemberInvite> = {
|
|
208
|
+
email: "email", "e-mail": "email", mail: "email",
|
|
209
|
+
name: "name", "full name": "name", fullname: "name",
|
|
210
|
+
role: "role",
|
|
211
|
+
scope: "scope", workspace: "scope", group: "scope", community: "scope",
|
|
212
|
+
};
|
|
213
|
+
|
|
214
|
+
export interface ParseMembersOptions {
|
|
215
|
+
roles: readonly (MemberRole | string)[];
|
|
216
|
+
scopes?: readonly MemberScope[];
|
|
217
|
+
/** A line with no role gets this one (default: the last role declared, the least one). */
|
|
218
|
+
defaultRole?: string;
|
|
219
|
+
/** A line with no scope gets this one (default: the first scope). */
|
|
220
|
+
defaultScope?: string;
|
|
221
|
+
}
|
|
222
|
+
|
|
223
|
+
/**
|
|
224
|
+
* Reads what was pasted (or read from a file) into the people it names and the lines it skips, with why. Columns by a first line
|
|
225
|
+
* of names (`email,name,role,scope`, in any order; `workspace` is `scope`; others are ignored), else in that order. Blank lines
|
|
226
|
+
* and `#` lines are skipped silently. A role or a scope is matched by its id or its label, any case; empty takes the default.
|
|
227
|
+
* The same email twice: the later line is skipped. Pure: the host still checks on its side (an account that exists, a seat).
|
|
228
|
+
*/
|
|
229
|
+
export function parseMembersCsv(text: string, opts: ParseMembersOptions): { rows: MemberImportRow[]; problems: MemberImportProblem[] } {
|
|
230
|
+
const scopes = scopesOf(opts.scopes);
|
|
231
|
+
const lines = text.replace(/^/, "").split(/\r\n|\r|\n/);
|
|
232
|
+
const rows: MemberImportRow[] = [];
|
|
233
|
+
const problems: MemberImportProblem[] = [];
|
|
234
|
+
const first = lines.findIndex((l) => l.trim() && !l.trim().startsWith("#"));
|
|
235
|
+
if (first < 0) return { rows, problems };
|
|
236
|
+
const delimiter = delimiterOf(lines[first]!);
|
|
237
|
+
const head = splitCsvLine(lines[first]!, delimiter).map((c) => foldText(c));
|
|
238
|
+
let order: Array<keyof MemberInvite | null> = ["email", "name", "role", "scope"];
|
|
239
|
+
let start = first;
|
|
240
|
+
if (head.some((c) => HEADER[c] === "email")) {
|
|
241
|
+
order = head.map((c) => HEADER[c] ?? null);
|
|
242
|
+
start = first + 1;
|
|
243
|
+
}
|
|
244
|
+
const seen = new Set<string>();
|
|
245
|
+
const matchRole = (scope: MemberScope, v: string) => {
|
|
246
|
+
const k = foldText(v);
|
|
247
|
+
return rolesIn(scope, opts.roles).find((r) => foldText(r.id) === k || foldText(r.label) === k)?.id;
|
|
248
|
+
};
|
|
249
|
+
const matchScope = (v: string) => {
|
|
250
|
+
const k = foldText(v);
|
|
251
|
+
return scopes.find((s) => foldText(s.id) === k || (s.label && foldText(s.label) === k));
|
|
252
|
+
};
|
|
253
|
+
for (let i = start; i < lines.length; i++) {
|
|
254
|
+
const raw = lines[i]!;
|
|
255
|
+
const t = raw.trim();
|
|
256
|
+
if (!t || t.startsWith("#")) continue;
|
|
257
|
+
const cells = splitCsvLine(raw, delimiter);
|
|
258
|
+
const get = (k: keyof MemberInvite) => { const at = order.indexOf(k); return at >= 0 ? (cells[at] ?? "").trim() : ""; };
|
|
259
|
+
const line = i + 1;
|
|
260
|
+
const email = get("email").toLowerCase();
|
|
261
|
+
if (!isEmail(email)) { problems.push({ line, text: t, reason: "email", value: get("email") }); continue; }
|
|
262
|
+
const scopeText = get("scope");
|
|
263
|
+
const scope = scopeText ? matchScope(scopeText) : scopes.find((s) => s.id === opts.defaultScope) ?? scopes[0]!;
|
|
264
|
+
if (!scope) { problems.push({ line, text: t, reason: "scope", value: scopeText }); continue; }
|
|
265
|
+
const offered = rolesIn(scope, opts.roles);
|
|
266
|
+
const roleText = get("role");
|
|
267
|
+
const role = roleText ? matchRole(scope, roleText) : (offered.find((r) => r.id === opts.defaultRole) ?? offered[offered.length - 1])?.id;
|
|
268
|
+
if (!role) { problems.push({ line, text: t, reason: "role", value: roleText }); continue; }
|
|
269
|
+
const key = `${email}\u0000${scope.id}`;
|
|
270
|
+
if (seen.has(key)) { problems.push({ line, text: t, reason: "duplicate", value: email }); continue; }
|
|
271
|
+
seen.add(key);
|
|
272
|
+
rows.push({ line, email, name: get("name"), role, scope: scope.id });
|
|
273
|
+
}
|
|
274
|
+
return { rows, problems };
|
|
275
|
+
}
|
|
276
|
+
|
|
277
|
+
/** What the host says about a line after Check: the account exists (the import only adds the role), or it cannot be imported. */
|
|
278
|
+
export interface MemberImportVerdict { email: string; scope?: string; existing?: boolean; problem?: string }
|
package/src/members.css
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
.gb-members{container:gb-members / inline-size}.gb-members-notice{display:flex;flex-wrap:wrap;align-items:center;gap:4px 12px;padding:8px 12px;border-radius:var(--ui-radius-md, 8px);font-size:13px;line-height:20px}.gb-members-notice--warning{background:var(--gemboss-warning-soft, #fff8e0);color:var(--gemboss-warning, #9a6700)}.gb-members-notice--info{background:var(--gemboss-accent-soft, #eef0fe);color:var(--gemboss-accent-strong, #3a44de)}.gb-members-notice__text{flex:1 1 auto;min-width:0}.gb-members .gb-members-notice__action{flex:none;padding:0;border:0;background:transparent;color:inherit;font:inherit;font-weight:600;cursor:pointer;text-decoration:underline;text-underline-offset:2px}.gb-members .gb-members-notice__action:hover,.gb-members .gb-members-notice__action:active{background:transparent;color:inherit;text-decoration-thickness:2px}.gb-members .gb-members-notice__action:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:4px}.gb-members-bar{display:flex;flex-wrap:wrap;align-items:center;gap:8px 12px}.gb-members-chips{display:flex;flex-wrap:wrap;align-items:center;gap:6px;flex:1 1 auto;min-width:0}.gb-members .gb-members-chip{display:inline-flex;align-items:center;gap:6px;box-sizing:border-box;height:var(--ui-btn-h, 28px);padding:0 10px;border:1px solid var(--ui-border, #e5e7ea);border-radius:999px;background:var(--ui-surface, #fff);color:var(--ui-text-muted, #686b71);font:inherit;font-size:12px;line-height:16px;font-weight:500;white-space:nowrap;cursor:pointer}.gb-members .gb-members-chip:hover,.gb-members .gb-members-chip:active{background:var(--ui-surface-2, #eceef2);color:var(--ui-text, #1b1c1e)}.gb-members .gb-members-chip:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.gb-members-chip__n{font-weight:600;color:var(--ui-text, #1b1c1e);font-variant-numeric:tabular-nums}.gb-members .gb-members-chip[aria-pressed=true],.gb-members .gb-members-chip[aria-pressed=true]:hover{background:var(--ui-accent, #1b1c1e);border-color:var(--ui-accent, #1b1c1e);color:var(--ui-accent-fg, #fff)}.gb-members-chip[aria-pressed=true] .gb-members-chip__n{color:inherit}.gb-members-sep{flex:none;width:1px;height:18px;margin:0 4px;background:var(--ui-border, #e5e7ea)}.gb-members-search{flex:0 1 240px;min-width:180px}.gb-members-scroll{overflow-x:auto;max-width:100%}.gb-members-table{min-width:640px}.gb-members-row{cursor:pointer}.gb-members-table tbody .gb-members-row--changing,.gb-members-table tbody .gb-members-row--changing:hover,.gb-members-table tbody .gb-members-row--open{background:var(--ui-accent-soft, #f0f1f4)}.gb-members-table td{white-space:nowrap}.gb-members-table .gb-members-person{color:var(--ui-text, #1b1c1e);font-weight:400;white-space:normal;min-width:200px}.gb-members-who{display:flex;align-items:center;gap:10px;min-width:0}.gb-members-who__text{display:grid;min-width:0}.gb-members-who__line{display:flex;align-items:center;gap:6px;min-width:0}.gb-members .gb-members-name{min-width:0;padding:0;border:0;background:transparent;color:var(--ui-text-strong, #1b1c1e);font:inherit;font-size:13px;line-height:20px;font-weight:600;text-align:left;cursor:pointer;overflow-wrap:anywhere}.gb-members .gb-members-name:hover,.gb-members .gb-members-name:active{background:transparent;color:var(--ui-text-strong, #1b1c1e);text-decoration:underline;text-underline-offset:2px}.gb-members .gb-members-name:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:4px}.gb-members-you{flex:none;padding:0 6px;border-radius:999px;background:var(--ui-surface-2, #eceef2);color:var(--ui-text-muted, #686b71);font-size:11px;line-height:16px;font-weight:500}.gb-members-email{font-size:12px;line-height:16px;color:var(--ui-text-muted, #686b71);overflow-wrap:anywhere}.gb-members-role{min-width:112px}.gb-members-role--ro{display:inline-flex;align-items:center;box-sizing:border-box;height:30px;padding:0 10px;border:1px dashed var(--ui-border, #e5e7ea);border-radius:var(--ui-radius-md, 8px);background:var(--ui-surface-2, #eceef2);color:var(--ui-text-muted, #686b71);font-size:12px;cursor:default}.gb-members-role--changing.ui-select{border-color:var(--gemboss-accent, #5661f5);box-shadow:0 0 0 2px var(--gemboss-accent-soft, #eef0fe)}.gb-members-status{display:inline-flex;align-items:center;gap:6px}.gb-members-dot{flex:none;width:7px;height:7px;border-radius:50%;background:var(--gemboss-success, #007f5f)}.gb-members-status--pending .gb-members-dot{background:var(--gemboss-warning, #9a6700)}.gb-members-status--invited .gb-members-dot{background:transparent;box-shadow:inset 0 0 0 1.5px var(--ui-text-muted, #686b71)}.gb-members-status--locked .gb-members-dot{background:var(--gemboss-danger, #d72c0d)}.gb-members-status--locked{color:var(--gemboss-danger-strong, #b42318)}.gb-members-last{color:var(--ui-text-muted, #686b71);font-variant-numeric:tabular-nums}.gb-members-table .gb-members-actions{position:relative;width:1%;text-align:right}.gb-members-rowactions{display:inline-flex;align-items:center;justify-content:flex-end;gap:8px}.gb-members-confirm{display:inline-flex;flex-wrap:wrap;align-items:center;gap:8px;font-size:12px}.gb-members-actions>.gb-members-confirm{position:absolute;inset-block:0;right:0;flex-wrap:nowrap;justify-content:flex-end;padding:0 12px 0 24px;white-space:nowrap;background:linear-gradient(to right,transparent,var(--ui-accent-soft, #f0f1f4) 16px)}.gb-members-confirm__q{color:var(--gemboss-accent-strong, #3a44de);font-weight:600}.gb-members-cards{display:none;margin:0;padding:0;list-style:none}.gb-members-card{display:flex;align-items:center;gap:8px;padding:0 12px 0 0;border-bottom:1px solid var(--ui-border, #e5e7ea)}.gb-members-card:last-child{border-bottom:0}.gb-members .gb-members-card__open{display:flex;align-items:center;gap:10px;flex:1 1 auto;min-width:0;min-height:56px;padding:10px 0 10px 12px;border:0;background:transparent;color:var(--ui-text, #1b1c1e);font:inherit;font-size:13px;text-align:left;cursor:pointer}.gb-members .gb-members-card__open:hover,.gb-members .gb-members-card__open:active{background:transparent;color:var(--ui-text, #1b1c1e)}.gb-members .gb-members-card__open:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:-2px}.gb-members-card__text{display:grid;flex:1 1 auto;min-width:0}.gb-members-card__name{display:flex;align-items:center;gap:6px;font-weight:600;line-height:20px;overflow-wrap:anywhere}.gb-members-card__meta{font-size:12px;line-height:16px;color:var(--ui-text-muted, #686b71);overflow-wrap:anywhere}.gb-members-card__go{flex:none;color:var(--ui-text-muted, #686b71)}@container gb-members (max-width: 640px){.gb-members-scroll{display:none}.gb-members-cards{display:block}.gb-members-chips{flex:1 1 100%;flex-wrap:nowrap;overflow-x:auto;scrollbar-width:none;padding-bottom:2px}.gb-members-chips::-webkit-scrollbar{display:none}.gb-members-search{flex:1 1 100%;min-width:0}}.gb-members-drawer{display:grid}.gb-members-drawer__sec{display:grid;gap:8px;padding:0 0 16px}.gb-members-drawer__sec+.gb-members-drawer__sec{padding-top:16px;border-top:1px solid var(--ui-border, #e5e7ea)}.gb-members-drawer__h{margin:0;font-size:12px;line-height:16px;font-weight:600;color:var(--ui-text-muted, #686b71)}.gb-members-kv{display:grid;gap:8px;margin:0;font-size:13px;line-height:20px}.gb-members-kv__row{display:grid;grid-template-columns:128px minmax(0,1fr);gap:4px 12px;align-items:center}.gb-members-kv__row>dt{color:var(--ui-text-muted, #686b71)}.gb-members-kv__row>dd{display:flex;flex-wrap:wrap;align-items:center;gap:8px;margin:0;min-width:0}.gb-members-tag{padding:0 6px;border-radius:999px;font-size:11px;line-height:18px;font-weight:600}.gb-members-tag--ok{background:var(--gemboss-success-soft, #e3f1df);color:var(--gemboss-success-strong, #0a6a4c)}.gb-members-tag--warn{background:var(--gemboss-warning-soft, #fff8e0);color:var(--gemboss-warning, #9a6700)}.gb-members-drawer__buttons{display:flex;flex-wrap:wrap;gap:8px}.gb-members-drawer .gb-members-btn--danger{color:var(--gemboss-danger-strong, #b42318)}.gb-members-drawer .gb-members-btn--danger:hover{background:var(--gemboss-danger-soft, #fff0e9);color:var(--gemboss-danger-strong, #b42318)}.gb-members-drawer__slot{padding-top:16px;border-top:1px solid var(--ui-border, #e5e7ea);min-width:0}.gb-members-tabs{margin:-4px 0 12px}.gb-members-panel{display:grid;gap:8px}.gb-members-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.gb-members-field{display:grid;gap:4px;min-width:0}.gb-members-field__label{font-size:12px;line-height:16px;color:var(--ui-text-muted, #686b71)}.gb-members-input{width:100%}.gb-members-note{margin:0;font-size:12px;line-height:16px;color:var(--ui-text-muted, #686b71)}.gb-members-error{margin:0;font-size:12px;line-height:16px;color:var(--gemboss-danger-strong, #b42318)}.gb-members-csv{width:100%;box-sizing:border-box;font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px}.gb-members-tools{display:flex;flex-wrap:wrap;gap:8px}.gb-members-check{display:grid;margin:0;padding:0;list-style:none;border:1px solid var(--ui-border, #e5e7ea);border-radius:var(--ui-radius-md, 8px);font-size:12px}.gb-members-check__row{display:grid;grid-template-columns:16px minmax(0,1fr) auto;gap:8px;align-items:center;padding:6px 10px}.gb-members-check__row+.gb-members-check__row{border-top:1px solid var(--ui-border, #e5e7ea)}.gb-members-check__mark{font-weight:700;color:var(--gemboss-success, #007f5f)}.gb-members-check__row--skip .gb-members-check__mark{color:var(--gemboss-warning, #9a6700)}.gb-members-check__what{overflow-wrap:anywhere}.gb-members-check__why{font-style:normal;color:var(--ui-text-muted, #686b71);white-space:nowrap}@media (max-width: 47.9975em){.gb-members-form{grid-template-columns:minmax(0,1fr)}}
|