cursedauth 0.11.0 → 0.12.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.
|
@@ -85,7 +85,7 @@ import { type ReactNode } from "react";
|
|
|
85
85
|
* `../ui/panelWidth.test.ts` can assert the two against each other instead of
|
|
86
86
|
* a sentence here promising they match. */
|
|
87
87
|
export declare const PANEL_WIDTH = 272;
|
|
88
|
-
export declare const STYLES = "\n.sam{--sam-panel:#ffffff;--sam-border:#d9dde3;--sam-text:#1a1d21;--sam-muted:#68707c;\n --sam-hover:#f2f4f7;--sam-danger:#b42318;--sam-accent:#4f6ef7;--sam-shadow:0 12px 32px rgba(16,18,22,.16);\n font:14px/1.5 ui-sans-serif,system-ui,-apple-system,sans-serif;color:var(--sam-text)}\n.sam[data-dark=\"true\"]{--sam-panel:#181b21;--sam-border:#2c313a;--sam-text:#e6e9ee;--sam-muted:#8b93a1;\n --sam-hover:#22262e;--sam-danger:#f97066;--sam-accent:#7f97ff;--sam-shadow:0 12px 32px rgba(0,0,0,.5)}\n/* \uD83D\uDD34 `min-width:0` is what makes `.sam-who`'s ellipsis (below) REACHABLE, and\n without it that rule is dead CSS \u2014 measured on live roms, 2026-09-08.\n\n A flex item's `min-width` defaults to `auto`, i.e. its min-content width, and\n `.sam-who` is `white-space:nowrap` \u2014 so the launcher's min-content size is the\n WHOLE name, however long. Flex could not shrink it, the name never truncated,\n and the launcher simply overflowed its slot. Where it overflowed was decided by\n the host header's `justify-content`: roms right-aligns its account controls, so\n the overflow travelled LEFT and painted the account button on top of the app\n title \u2014 79px of overlap at 320px, 39px at 360px, and the button's own avatar\n starting at x=-26, off the side of the screen. `document.scrollWidth` was\n unchanged throughout, which is why nothing anywhere reported it: the row does\n not push the page wide, it collides inside itself.\n\n With these two declarations the ellipsis finally does its job \u2014 the name gives\n up as much width as the row needs and gives up the last of it entirely, leaving\n the avatar and its caret, which is the right phone-shaped answer for an account\n control anyway. Nothing changes at a width that already fit (measured: 430px\n identical before and after), because flex only shrinks an item that has to.\n `max-width:100%` keeps the wrapper from being the new floor now that the\n launcher inside it can shrink.\n\n The header that found it asserts the outcome rather than this mechanism \u2014\n apps/roms/__smoke/headerFit.spec.ts, which measures real boxes in a real\n browser at four phone widths. It is the only kind of check that can see this. */\n.sam-wrap{position:relative;display:inline-block;min-width:0;max-width:100%}\n.sam-launch{display:inline-flex;align-items:center;gap:7px;max-width:min(14rem,100%);height:34px;\n min-width:0;padding:0 8px 0 4px;\n border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;cursor:pointer;\n font:inherit;font-size:13px}\n@media (pointer:coarse){.sam-launch{height:44px}}\n/* The circle. --sam-av is the ONE size knob: the ring, the glyph and the initials all\n derive from it, so the launcher and the panel head cannot drift apart. */\n.sam-av{--sam-av:26px;flex:none;display:inline-flex;align-items:center;justify-content:center;\n width:var(--sam-av);height:var(--sam-av);border-radius:50%;overflow:hidden;\n background:color-mix(in srgb,var(--sam-accent,#4f6ef7) 16%,transparent);\n color:var(--sam-accent,#4f6ef7);font-size:calc(var(--sam-av) * .42);font-weight:650;\n line-height:1;letter-spacing:.02em;user-select:none}\n.sam-av img{width:100%;height:100%;object-fit:cover;display:block}\n.sam-head .sam-av{--sam-av:40px}\n.sam-launch:hover,.sam-launch[aria-expanded=\"true\"]{background:var(--sam-hover);border-color:var(--sam-border)}\n/* `min-width:0` for the same reason as `.sam-launch` above, one level down: this\n is itself a flex item, so its `auto` minimum is the un-wrappable name and the\n ellipsis below it could never fire. All three levels of the chain have to\n allow shrinking or none of them does \u2014 the launcher stops overflowing its\n header while the LABEL goes on overflowing the launcher, which is a collision\n that has merely moved one control to the right. Measured: the first attempt at\n this fix did exactly that, and headerFit.spec.ts is what said so. */\n.sam-who{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/* \uD83D\uDD34 On a phone the launcher is the AVATAR \u2014 the name is not painted (2026-09-26).\n Owner, 2026-09-25: *\"The rules are to use icons not words unless there is a purposefully\n made exception.\"* The ellipsis above only fires when the row squeezes the launcher, and\n cursedbelt's `TopBar` holds its trailing cluster at `shrink-0` by design (the account\n menu must always be reachable), so there it never squeezed: family's bar measured 402px on\n a 390px screen with the name painted. The `aria-label` (\"Signed in as \u2026\") and the panel's\n own head still carry the name. 639.98px is Tailwind's `sm` breakpoint, the one TopBar\n drops its words at. */\n@media (max-width:639.98px){.sam-who{display:none}}\n.sam-caret{flex:none;opacity:.6;font-size:10px}\n/* \uD83D\uDD34 `left` and `top` are BOTH set inline by usePopoverPosition, and the panel\n is PORTALED to <body> \u2014 see `anchoredTop`. `fixed` because the panel is no\n longer inside the launcher, and NO default `top`, because a hardcoded\n \"always below\" is what put the fleet launcher's panel off the bottom of the\n screen (E22, 2026-09-09). This menu shares the control, so it shares the fix. */\n.sam-pop{position:fixed;right:auto;z-index:2147482000;width:min(17rem,calc(100vw - 32px));\n background:var(--sam-panel);border:1px solid var(--sam-border);border-radius:12px;box-shadow:var(--sam-shadow);\n padding:6px;display:flex;flex-direction:column;gap:1px}\n.sam-head{display:flex;align-items:center;gap:10px;padding:8px 8px 10px;\n border-bottom:1px solid var(--sam-border);margin-bottom:5px}\n.sam-head-text{min-width:0;flex:1}\n.sam-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.sam-sub{font-size:11.5px;color:var(--sam-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/* \uD83D\uDD34 44px, the designer's number for a menu row (2026-08-19). display:flex rather\n than block so the min-height actually centres the label instead of leaving it\n glued to the top of a taller box. */\n.sam-item{display:flex;align-items:center;width:100%;min-height:44px;text-align:left;\n padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;\n font-size:13px;cursor:pointer;text-decoration:none}\n.sam-item:hover{background:var(--sam-hover)}\n.sam-item[data-tone=\"danger\"]{color:var(--sam-danger)}\n.sam-hint{font-size:11px;color:var(--sam-muted);padding:1px 8px 4px}\n.sam-rule{height:1px;background:var(--sam-border);margin:5px 0}\n.sam-label{font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;\n color:var(--sam-muted);padding:4px 8px 3px}\n/* One row per other account: a big target that SWITCHES, plus a small one that\n opens a second window. Grid rather than flex so the switch button gets every\n pixel the open button does not, and long addresses ellipsize instead of\n pushing the \u29C9 off the panel. */\n.sam-acct{display:grid;grid-template-columns:1fr auto;align-items:stretch;gap:1px;border-radius:8px}\n.sam-acct:hover{background:var(--sam-hover)}\n.sam-acct .sam-item{display:block;border-radius:8px 0 0 8px;padding-top:6px;padding-bottom:6px}\n.sam-acct-who{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.sam-acct-sub{display:block;font-size:11px;color:var(--sam-muted);overflow:hidden;\n text-overflow:ellipsis;white-space:nowrap}\n.sam-open{flex:none;width:44px;border:0;border-radius:0 8px 8px 0;background:transparent;\n color:var(--sam-muted);cursor:pointer;font:inherit;font-size:13px}\n.sam-open:hover{background:var(--sam-hover);color:var(--sam-text)}\n.sam-badge{font-size:10px;font-weight:600;color:var(--sam-muted);border:1px solid var(--sam-border);\n border-radius:5px;padding:0 4px;margin-left:6px;vertical-align:1px}\n";
|
|
88
|
+
export declare const STYLES = "\n.sam{--sam-panel:#ffffff;--sam-border:#d9dde3;--sam-text:#1a1d21;--sam-muted:#68707c;\n --sam-hover:#f2f4f7;--sam-danger:#b42318;--sam-accent:#4f6ef7;--sam-shadow:0 12px 32px rgba(16,18,22,.16);\n font:14px/1.5 ui-sans-serif,system-ui,-apple-system,sans-serif;color:var(--sam-text)}\n.sam[data-dark=\"true\"]{--sam-panel:#181b21;--sam-border:#2c313a;--sam-text:#e6e9ee;--sam-muted:#8b93a1;\n --sam-hover:#22262e;--sam-danger:#f97066;--sam-accent:#7f97ff;--sam-shadow:0 12px 32px rgba(0,0,0,.5)}\n/* \uD83D\uDD34 `min-width:0` is what makes `.sam-who`'s ellipsis (below) REACHABLE, and\n without it that rule is dead CSS \u2014 measured on live roms, 2026-09-08.\n\n A flex item's `min-width` defaults to `auto`, i.e. its min-content width, and\n `.sam-who` is `white-space:nowrap` \u2014 so the launcher's min-content size is the\n WHOLE name, however long. Flex could not shrink it, the name never truncated,\n and the launcher simply overflowed its slot. Where it overflowed was decided by\n the host header's `justify-content`: roms right-aligns its account controls, so\n the overflow travelled LEFT and painted the account button on top of the app\n title \u2014 79px of overlap at 320px, 39px at 360px, and the button's own avatar\n starting at x=-26, off the side of the screen. `document.scrollWidth` was\n unchanged throughout, which is why nothing anywhere reported it: the row does\n not push the page wide, it collides inside itself.\n\n With these two declarations the ellipsis finally does its job \u2014 the name gives\n up as much width as the row needs and gives up the last of it entirely, leaving\n the avatar and its caret, which is the right phone-shaped answer for an account\n control anyway. Nothing changes at a width that already fit (measured: 430px\n identical before and after), because flex only shrinks an item that has to.\n `max-width:100%` keeps the wrapper from being the new floor now that the\n launcher inside it can shrink.\n\n The header that found it asserts the outcome rather than this mechanism \u2014\n apps/roms/__smoke/headerFit.spec.ts, which measures real boxes in a real\n browser at four phone widths. It is the only kind of check that can see this. */\n.sam-wrap{position:relative;display:inline-block;min-width:0;max-width:100%}\n.sam-launch{display:inline-flex;align-items:center;gap:7px;max-width:min(14rem,100%);height:34px;\n min-width:0;padding:0 8px 0 4px;\n border:1px solid transparent;border-radius:999px;background:transparent;color:inherit;cursor:pointer;\n font:inherit;font-size:13px}\n@media (pointer:coarse){.sam-launch{height:44px}}\n/* The circle. --sam-av is the ONE size knob: the ring, the glyph and the initials all\n derive from it, so the launcher and the panel head cannot drift apart. */\n.sam-av{--sam-av:26px;flex:none;display:inline-flex;align-items:center;justify-content:center;\n width:var(--sam-av);height:var(--sam-av);border-radius:50%;overflow:hidden;\n background:color-mix(in srgb,var(--sam-accent,#4f6ef7) 16%,transparent);\n color:var(--sam-accent,#4f6ef7);font-size:calc(var(--sam-av) * .42);font-weight:650;\n line-height:1;letter-spacing:.02em;user-select:none}\n.sam-av img{width:100%;height:100%;object-fit:cover;display:block}\n.sam-head .sam-av{--sam-av:40px}\n.sam-launch:hover,.sam-launch[aria-expanded=\"true\"]{background:var(--sam-hover);border-color:var(--sam-border)}\n/* `min-width:0` for the same reason as `.sam-launch` above, one level down: this\n is itself a flex item, so its `auto` minimum is the un-wrappable name and the\n ellipsis below it could never fire. All three levels of the chain have to\n allow shrinking or none of them does \u2014 the launcher stops overflowing its\n header while the LABEL goes on overflowing the launcher, which is a collision\n that has merely moved one control to the right. Measured: the first attempt at\n this fix did exactly that, and headerFit.spec.ts is what said so. */\n.sam-who{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/* \uD83D\uDD34 On a phone the launcher is the AVATAR \u2014 the name is not painted (2026-09-26).\n Owner, 2026-09-25: *\"The rules are to use icons not words unless there is a purposefully\n made exception.\"* The ellipsis above only fires when the row squeezes the launcher, and\n cursedbelt's `TopBar` holds its trailing cluster at `shrink-0` by design (the account\n menu must always be reachable), so there it never squeezed: family's bar measured 402px on\n a 390px screen with the name painted. The `aria-label` (\"Signed in as \u2026\") and the panel's\n own head still carry the name. 639.98px is Tailwind's `sm` breakpoint, the one TopBar\n drops its words at. */\n@media (max-width:639.98px){.sam-who{display:none}}\n.sam-caret{flex:none;opacity:.6;font-size:10px}\n/* launcher=\"avatar\": the circle alone (AccountMenuProps.launcher says why). */\n.sam[data-launcher=\"avatar\"] .sam-who,.sam[data-launcher=\"avatar\"] .sam-caret{display:none}\n.sam[data-launcher=\"avatar\"] .sam-launch{width:34px;padding:0;gap:0;justify-content:center}\n@media (pointer:coarse){.sam[data-launcher=\"avatar\"] .sam-launch{width:44px}}\n/* \uD83D\uDD34 `left` and `top` are BOTH set inline by usePopoverPosition, and the panel\n is PORTALED to <body> \u2014 see `anchoredTop`. `fixed` because the panel is no\n longer inside the launcher, and NO default `top`, because a hardcoded\n \"always below\" is what put the fleet launcher's panel off the bottom of the\n screen (E22, 2026-09-09). This menu shares the control, so it shares the fix. */\n.sam-pop{position:fixed;right:auto;z-index:2147482000;width:min(17rem,calc(100vw - 32px));\n background:var(--sam-panel);border:1px solid var(--sam-border);border-radius:12px;box-shadow:var(--sam-shadow);\n padding:6px;display:flex;flex-direction:column;gap:1px}\n.sam-head{display:flex;align-items:center;gap:10px;padding:8px 8px 10px;\n border-bottom:1px solid var(--sam-border);margin-bottom:5px}\n.sam-head-text{min-width:0;flex:1}\n.sam-name{font-size:13px;font-weight:600;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.sam-sub{font-size:11.5px;color:var(--sam-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n/* \uD83D\uDD34 44px, the designer's number for a menu row (2026-08-19). display:flex rather\n than block so the min-height actually centres the label instead of leaving it\n glued to the top of a taller box. */\n.sam-item{display:flex;align-items:center;width:100%;min-height:44px;text-align:left;\n padding:7px 10px;border:0;border-radius:8px;background:transparent;color:inherit;font:inherit;\n font-size:13px;cursor:pointer;text-decoration:none}\n.sam-item:hover{background:var(--sam-hover)}\n.sam-item[data-tone=\"danger\"]{color:var(--sam-danger)}\n.sam-hint{font-size:11px;color:var(--sam-muted);padding:1px 8px 4px}\n.sam-rule{height:1px;background:var(--sam-border);margin:5px 0}\n.sam-label{font-size:10.5px;font-weight:600;letter-spacing:.04em;text-transform:uppercase;\n color:var(--sam-muted);padding:4px 8px 3px}\n/* One row per other account: a big target that SWITCHES, plus a small one that\n opens a second window. Grid rather than flex so the switch button gets every\n pixel the open button does not, and long addresses ellipsize instead of\n pushing the \u29C9 off the panel. */\n.sam-acct{display:grid;grid-template-columns:1fr auto;align-items:stretch;gap:1px;border-radius:8px}\n.sam-acct:hover{background:var(--sam-hover)}\n.sam-acct .sam-item{display:block;border-radius:8px 0 0 8px;padding-top:6px;padding-bottom:6px}\n.sam-acct-who{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}\n.sam-acct-sub{display:block;font-size:11px;color:var(--sam-muted);overflow:hidden;\n text-overflow:ellipsis;white-space:nowrap}\n.sam-open{flex:none;width:44px;border:0;border-radius:0 8px 8px 0;background:transparent;\n color:var(--sam-muted);cursor:pointer;font:inherit;font-size:13px}\n.sam-open:hover{background:var(--sam-hover);color:var(--sam-text)}\n.sam-badge{font-size:10px;font-weight:600;color:var(--sam-muted);border:1px solid var(--sam-border);\n border-radius:5px;padding:0 4px;margin-left:6px;vertical-align:1px}\n";
|
|
89
89
|
/**
|
|
90
90
|
* What the launcher draws, and what the panel's first line repeats.
|
|
91
91
|
*
|
|
@@ -191,6 +191,16 @@ export interface AccountMenuProps {
|
|
|
191
191
|
* request.
|
|
192
192
|
*/
|
|
193
193
|
userId?: string;
|
|
194
|
+
/**
|
|
195
|
+
* What the closed launcher paints. `"name"` (the default) is the avatar, the name and a
|
|
196
|
+
* caret, with the name dropped below 640px. `"avatar"` is the circle alone at every width:
|
|
197
|
+
* for a sidebar head, or a rail folded to icons, where the brand needs the room (task 3464:
|
|
198
|
+
* four apps had each hidden `.sam-who` with their own CSS aimed at this file's class names).
|
|
199
|
+
* A square hit target, 44px under a coarse pointer like the named launcher; the `aria-label`
|
|
200
|
+
* and the panel's head still carry the name. Its rules are kept terse in `STYLES` because
|
|
201
|
+
* every byte of that string ships.
|
|
202
|
+
*/
|
|
203
|
+
launcher?: "name" | "avatar";
|
|
194
204
|
}
|
|
195
205
|
/** One account signed in on this browser, as `/api/auth/session` reports it. */
|
|
196
206
|
export interface BrowserAccount {
|
|
@@ -215,7 +225,7 @@ export declare function resetAccountPictureProbe(): void;
|
|
|
215
225
|
* The header account menu. Renders a name button; the panel carries whatever
|
|
216
226
|
* the app passed as `children`, then the account block.
|
|
217
227
|
*/
|
|
218
|
-
export declare function AccountMenu({ name, email, accountsUrl, children, onSignOut, onLeave, startPath, signOutPath, accounts, sessionPath, userId, }: AccountMenuProps): import("react").JSX.Element;
|
|
228
|
+
export declare function AccountMenu({ name, email, accountsUrl, children, onSignOut, onLeave, startPath, signOutPath, accounts, sessionPath, userId, launcher, }: AccountMenuProps): import("react").JSX.Element;
|
|
219
229
|
export { AccountNotice, type AccountNoticeProps } from "./AccountNotice.js";
|
|
220
230
|
export { useAccountNotice, type AccountNoticeState } from "./accountNotice.state.js";
|
|
221
231
|
//# sourceMappingURL=AccountMenu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMenu.d.ts","sourceRoot":"","sources":["../../src/account/AccountMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AA4B5E;;;;;;;;;;;4CAW4C;AAC5C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,MAAM,
|
|
1
|
+
{"version":3,"file":"AccountMenu.d.ts","sourceRoot":"","sources":["../../src/account/AccountMenu.tsx"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,EAAQ,KAAK,SAAS,EAAiC,MAAM,OAAO,CAAC;AA4B5E;;;;;;;;;;;4CAW4C;AAC5C,eAAO,MAAM,WAAW,MAAM,CAAC;AAC/B,eAAO,MAAM,MAAM,klQA6GlB,CAAC;AAEF;;;;;;;;;;;;;;;;GAgBG;AACH,wBAAgB,YAAY,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAEhF;AAED,MAAM,WAAW,gBAAgB;IAChC;;;;;;;;;OASG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;oEAEgE;IAChE,KAAK,CAAC,EAAE,MAAM,CAAC;IACf;;;;;;;;;OASG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IAC5B;;;;;;;;;OASG;IACH,QAAQ,CAAC,EAAE,CAAC,KAAK,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
|
@media (max-width:639.98px){.sam-who{display:none}}
|
|
171
171
|
.sam-caret{flex:none;opacity:.6;font-size:10px}
|
|
172
|
+
/* launcher="avatar": the circle alone (AccountMenuProps.launcher says why). */
|
|
173
|
+
.sam[data-launcher="avatar"] .sam-who,.sam[data-launcher="avatar"] .sam-caret{display:none}
|
|
174
|
+
.sam[data-launcher="avatar"] .sam-launch{width:34px;padding:0;gap:0;justify-content:center}
|
|
175
|
+
@media (pointer:coarse){.sam[data-launcher="avatar"] .sam-launch{width:44px}}
|
|
172
176
|
/* 🔴 \`left\` and \`top\` are BOTH set inline by usePopoverPosition, and the panel
|
|
173
177
|
is PORTALED to <body> — see \`anchoredTop\`. \`fixed\` because the panel is no
|
|
174
178
|
longer inside the launcher, and NO default \`top\`, because a hardcoded
|
|
@@ -370,7 +374,7 @@ function AccountAvatar({ name, email, accountsUrl, userId, }) {
|
|
|
370
374
|
* The header account menu. Renders a name button; the panel carries whatever
|
|
371
375
|
* the app passed as `children`, then the account block.
|
|
372
376
|
*/
|
|
373
|
-
export function AccountMenu({ name, email, accountsUrl, children, onSignOut, onLeave, startPath, signOutPath, accounts, sessionPath = SESSION_PATH, userId, }) {
|
|
377
|
+
export function AccountMenu({ name, email, accountsUrl, children, onSignOut, onLeave, startPath, signOutPath, accounts, sessionPath = SESSION_PATH, userId, launcher = "name", }) {
|
|
374
378
|
useInjectedStyles(STYLE_ID, STYLES);
|
|
375
379
|
const dark = useHostDark();
|
|
376
380
|
const { open, close, toggle, wrapRef, panelRef, position } = usePopover(PANEL_WIDTH);
|
|
@@ -411,7 +415,7 @@ export function AccountMenu({ name, email, accountsUrl, children, onSignOut, onL
|
|
|
411
415
|
const here = `${globalThis.location?.pathname ?? "/"}${globalThis.location?.search ?? ""}`;
|
|
412
416
|
globalThis.location?.assign(slotUrl(here, slot));
|
|
413
417
|
};
|
|
414
|
-
return (_jsxs("span", { className: "sam sam-wrap", "data-dark": dark ? "true" : "false", ref: wrapRef, children: [notice ? (_jsx(Suspense, { fallback: null, children: _jsx(AccountNotice, { notice: notice, onDismiss: () => setNotice(null), ...(accountsUrl ? { accountsUrl } : {}), ...(startPath ? { startPath } : {}), signedInAs: label }) })) : null, _jsxs("button", { type: "button", className: "sam-launch", "aria-expanded": open, "aria-haspopup": "true", "aria-label": `Signed in as ${label}`, onClick: toggle, children: [_jsx(AccountAvatar, { ...(name ? { name } : {}), ...(email ? { email } : {}), ...(accountsUrl ? { accountsUrl } : {}), ...(browser.userId ? { userId: browser.userId } : {}) }), _jsx("span", { className: "sam-who", children: label }), _jsx("span", { className: "sam-caret", "aria-hidden": "true", children: "\u25BE" })] }), open &&
|
|
418
|
+
return (_jsxs("span", { className: "sam sam-wrap", "data-dark": dark ? "true" : "false", "data-launcher": launcher, ref: wrapRef, children: [notice ? (_jsx(Suspense, { fallback: null, children: _jsx(AccountNotice, { notice: notice, onDismiss: () => setNotice(null), ...(accountsUrl ? { accountsUrl } : {}), ...(startPath ? { startPath } : {}), signedInAs: label }) })) : null, _jsxs("button", { type: "button", className: "sam-launch", "aria-expanded": open, "aria-haspopup": "true", "aria-label": `Signed in as ${label}`, onClick: toggle, children: [_jsx(AccountAvatar, { ...(name ? { name } : {}), ...(email ? { email } : {}), ...(accountsUrl ? { accountsUrl } : {}), ...(browser.userId ? { userId: browser.userId } : {}) }), _jsx("span", { className: "sam-who", children: label }), _jsx("span", { className: "sam-caret", "aria-hidden": "true", children: "\u25BE" })] }), open &&
|
|
415
419
|
typeof document !== "undefined" &&
|
|
416
420
|
createPortal(
|
|
417
421
|
// 🔴 PORTALED to <body> for the same reason as the app switcher beside
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AccountMenu.js","sourceRoot":"","sources":["../../src/account/AccountMenu.tsx"],"names":[],"mappings":";AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAwEG;AACH,OAAO,EAAE,IAAI,EAAkB,QAAQ,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ACC,IAAI,EAAC,QAAQ,EACb,SAAS,EAAC,UAAU,eACV,QAAQ,EAClB,OAAO,EAAE,GAAG,EAAE;gCACb,KAAK,EAAE,CAAC;gCACR,OAAO,EAAE,EAAE,CAAC;gCACZ,eAAe,CAAC,EAAE,WAAW,EAAE,IAAI,EAAE,GAAG,CAAC,WAAW,CAAC,CAAC,CAAC,EAAE,WAAW,EAAE,CAAC,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC;4BACjF,CAAC,yCAGO,CACT,CAAC,CAAC,CAAC,IAAI,EACP,GAAG,CAAC,CAAC,CAAC,CACN,YAAG,SAAS,EAAC,UAAU,YACrB,OAAO;gCACP,CAAC,CAAC,kEAAkE;gCACpE,CAAC,CAAC,yCAAyC,GACzC,CACJ,CAAC,CAAC,CAAC,IAAI,IACH,EACN,QAAQ,CAAC,IAAI,CACb,IACI,CACP,CAAC;AACH,CAAC;AAED;;;;qCAIqC;AACrC,OAAO,EAAE,aAAa,EAA2B,MAAM,oBAAoB,CAAC;AAC5E,OAAO,EAAE,gBAAgB,EAA2B,MAAM,0BAA0B,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "cursedauth",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.12.0",
|
|
4
4
|
"description": "The app side of fleet SSO — sign in through the accounts service, keep a local snapshot of who signed in, and gate the app on it. Bun + Hono + React, one SQLite file per app.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -177,6 +177,10 @@ export const STYLES = `
|
|
|
177
177
|
drops its words at. */
|
|
178
178
|
@media (max-width:639.98px){.sam-who{display:none}}
|
|
179
179
|
.sam-caret{flex:none;opacity:.6;font-size:10px}
|
|
180
|
+
/* launcher="avatar": the circle alone (AccountMenuProps.launcher says why). */
|
|
181
|
+
.sam[data-launcher="avatar"] .sam-who,.sam[data-launcher="avatar"] .sam-caret{display:none}
|
|
182
|
+
.sam[data-launcher="avatar"] .sam-launch{width:34px;padding:0;gap:0;justify-content:center}
|
|
183
|
+
@media (pointer:coarse){.sam[data-launcher="avatar"] .sam-launch{width:44px}}
|
|
180
184
|
/* 🔴 \`left\` and \`top\` are BOTH set inline by usePopoverPosition, and the panel
|
|
181
185
|
is PORTALED to <body> — see \`anchoredTop\`. \`fixed\` because the panel is no
|
|
182
186
|
longer inside the launcher, and NO default \`top\`, because a hardcoded
|
|
@@ -327,6 +331,16 @@ export interface AccountMenuProps {
|
|
|
327
331
|
* request.
|
|
328
332
|
*/
|
|
329
333
|
userId?: string;
|
|
334
|
+
/**
|
|
335
|
+
* What the closed launcher paints. `"name"` (the default) is the avatar, the name and a
|
|
336
|
+
* caret, with the name dropped below 640px. `"avatar"` is the circle alone at every width:
|
|
337
|
+
* for a sidebar head, or a rail folded to icons, where the brand needs the room (task 3464:
|
|
338
|
+
* four apps had each hidden `.sam-who` with their own CSS aimed at this file's class names).
|
|
339
|
+
* A square hit target, 44px under a coarse pointer like the named launcher; the `aria-label`
|
|
340
|
+
* and the panel's head still carry the name. Its rules are kept terse in `STYLES` because
|
|
341
|
+
* every byte of that string ships.
|
|
342
|
+
*/
|
|
343
|
+
launcher?: "name" | "avatar";
|
|
330
344
|
}
|
|
331
345
|
|
|
332
346
|
/** One account signed in on this browser, as `/api/auth/session` reports it. */
|
|
@@ -520,6 +534,7 @@ export function AccountMenu({
|
|
|
520
534
|
accounts,
|
|
521
535
|
sessionPath = SESSION_PATH,
|
|
522
536
|
userId,
|
|
537
|
+
launcher = "name",
|
|
523
538
|
}: AccountMenuProps) {
|
|
524
539
|
useInjectedStyles(STYLE_ID, STYLES);
|
|
525
540
|
const dark = useHostDark();
|
|
@@ -565,7 +580,12 @@ export function AccountMenu({
|
|
|
565
580
|
};
|
|
566
581
|
|
|
567
582
|
return (
|
|
568
|
-
<span
|
|
583
|
+
<span
|
|
584
|
+
className="sam sam-wrap"
|
|
585
|
+
data-dark={dark ? "true" : "false"}
|
|
586
|
+
data-launcher={launcher}
|
|
587
|
+
ref={wrapRef}
|
|
588
|
+
>
|
|
569
589
|
{/* Nothing at all until the account goes wrong — and then it is fetched.
|
|
570
590
|
It lives here rather than in each app's shell because "here" is the
|
|
571
591
|
one component all nineteen already mount. */}
|