@unisim/sdk 0.123.4 → 0.125.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.
Files changed (56) hide show
  1. package/README.md +103 -6
  2. package/android/build.gradle +59 -0
  3. package/android/src/main/AndroidManifest.xml +88 -0
  4. package/android/src/main/java/uk/co/unisim/sdk/SuiteAuthProvider.java +107 -0
  5. package/android/src/main/java/uk/co/unisim/sdk/SuiteAuthStore.java +179 -0
  6. package/android/src/main/java/uk/co/unisim/sdk/UnisimSuiteAuthPlugin.java +214 -0
  7. package/dist/ChangelogMenu.js +7 -0
  8. package/dist/ChangelogMenu.js.map +1 -1
  9. package/dist/CompanyMenu.d.ts.map +1 -1
  10. package/dist/CompanyMenu.js +74 -2
  11. package/dist/CompanyMenu.js.map +1 -1
  12. package/dist/SuiteSwitcher.d.ts.map +1 -1
  13. package/dist/SuiteSwitcher.js +70 -4
  14. package/dist/SuiteSwitcher.js.map +1 -1
  15. package/dist/UniversalAppsNavBar.d.ts.map +1 -1
  16. package/dist/UniversalAppsNavBar.js +92 -6
  17. package/dist/UniversalAppsNavBar.js.map +1 -1
  18. package/dist/UniversalNavBar.d.ts +25 -3
  19. package/dist/UniversalNavBar.d.ts.map +1 -1
  20. package/dist/UniversalNavBar.js +144 -61
  21. package/dist/UniversalNavBar.js.map +1 -1
  22. package/dist/UserProfile.d.ts +108 -1
  23. package/dist/UserProfile.d.ts.map +1 -1
  24. package/dist/UserProfile.js +147 -78
  25. package/dist/UserProfile.js.map +1 -1
  26. package/dist/companies.d.ts +43 -0
  27. package/dist/companies.d.ts.map +1 -0
  28. package/dist/companies.js +98 -0
  29. package/dist/companies.js.map +1 -0
  30. package/dist/i18n.d.ts.map +1 -1
  31. package/dist/i18n.js +14 -0
  32. package/dist/i18n.js.map +1 -1
  33. package/dist/index.d.ts +8 -4
  34. package/dist/index.d.ts.map +1 -1
  35. package/dist/index.js +8 -3
  36. package/dist/index.js.map +1 -1
  37. package/dist/provider.d.ts +14 -0
  38. package/dist/provider.d.ts.map +1 -1
  39. package/dist/provider.js +181 -1
  40. package/dist/provider.js.map +1 -1
  41. package/dist/sessionStorage.d.ts +25 -7
  42. package/dist/sessionStorage.d.ts.map +1 -1
  43. package/dist/sessionStorage.js +49 -15
  44. package/dist/sessionStorage.js.map +1 -1
  45. package/dist/suiteApps.d.ts +66 -0
  46. package/dist/suiteApps.d.ts.map +1 -0
  47. package/dist/suiteApps.js +168 -0
  48. package/dist/suiteApps.js.map +1 -0
  49. package/dist/types.d.ts +1 -1
  50. package/dist/types.d.ts.map +1 -1
  51. package/dist/unisimMark.d.ts +1 -1
  52. package/dist/unisimMark.d.ts.map +1 -1
  53. package/dist/unisimMark.js +8 -5
  54. package/dist/unisimMark.js.map +1 -1
  55. package/ios/Sources/UnisimSuiteAuthPlugin/UnisimSuiteAuthPlugin.swift +63 -1
  56. package/package.json +8 -2
@@ -28,7 +28,7 @@ const LANGUAGE_LABELS = {
28
28
  // ──────────────────────────────────────────────────────────────────────────────
29
29
  // Component
30
30
  // ──────────────────────────────────────────────────────────────────────────────
31
- export function UserProfile({ name, email, photoUrl, initials, profileHref = 'https://app.unisim.co.uk/profile', signInHref, onSignInClick, appSettingsHref, onSignOut, extras, showLanguageSelector = true, actionsLabel, actions, pillTheme, theme = 'light', menuAlign = 'right', ariaLabel, noAccount = false, tier, showLimits = true, style, className, }) {
31
+ export function UserProfile({ name, email, photoUrl, initials, profileHref = 'https://app.unisim.co.uk/profile', signInHref, onSignInClick, appSettingsHref, onSignOut, extras, showLanguageSelector = true, actionsLabel, actions, pillTheme, theme = 'light', menuAlign = 'right', triggerStyle, inline = false, onClose, hideTriggerAvatar = false, ariaLabel, noAccount = false, tier, showLimits = true, style, className, }) {
32
32
  const { language, setLanguage } = useLanguage();
33
33
  // Not a destructuring default: `pillTheme` and `theme` are separate props and
34
34
  // the fallback has to read the OTHER one, which a default in the pattern
@@ -126,14 +126,116 @@ export function UserProfile({ name, email, photoUrl, initials, profileHref = 'ht
126
126
  const canHover = useCanHover();
127
127
  const hoverOpen = canHover ? openNow : undefined;
128
128
  const hoverClose = canHover ? closeSoon : undefined;
129
+ // Combined pill mode: the label (and/or the app's action rows) turn the bare
130
+ // avatar circle into one wider control carrying both identities. The avatar
131
+ // shrinks by the pill's 3px inset so the outer height still matches the 38px
132
+ // buttons it sits beside (SuiteSwitcher, ChangelogMenu).
133
+ const isPill = !!pillLabel || !!actions;
134
+ const avatarSize = isPill ? PILL_AVATAR : 36;
135
+ // Written once and rendered by both header branches. They ARE the same three
136
+ // rows — the interactive version only adds a hint line and a chevron — and
137
+ // the copy that used to sit in each drifted the moment one of them changed.
138
+ //
139
+ // Spans, not divs: the interactive branch puts these inside a <button>, whose
140
+ // content model is phrasing content only. `nameStyle`/`emailStyle` carry the
141
+ // `display: block` that used to come from the element.
142
+ const identityRows = (_jsxs(_Fragment, { children: [name && _jsx("span", { style: nameStyle(theme), children: name }), email && _jsx("span", { style: emailStyle(theme), children: email }), tier && _jsx(TierBadge, { tier: tier, language: language, theme: theme })] }));
143
+ // One close signal for every row, so `inline` mode — which has no dropdown of
144
+ // its own — can still dismiss the list it was rendered into. In dropdown mode
145
+ // `setOpen(false)` still does the real work and `onClose` is a notification;
146
+ // inline, the setState is inert and `onClose` is the whole job.
147
+ const closeMenu = () => {
148
+ setOpen(false);
149
+ onClose?.();
150
+ };
151
+ const avatar = (_jsx(ProfileAvatar, { photoUrl: photoUrl, name: name, initials: initials, noAccount: noAccount, size: avatarSize, theme: theme }));
152
+ // The menu's contents, written once. Both branches below render exactly this
153
+ // list in exactly this order — the dropdown wraps it in a floating surface,
154
+ // `inline` drops it straight into a list the host is already drawing. Keeping
155
+ // it in one place is the point: an inline copy would be a second account menu
156
+ // to hold in step, and it would drift on the first change to either.
157
+ const menuRows = (_jsxs(_Fragment, { children: [actions && (_jsxs(_Fragment, { children: [_jsx(AppMenuProvider, { close: closeMenu, children: actions }), _jsx(Divider, { theme: theme })] })), showHeader && (limitsEnabled ? (
158
+ // The same header, now a control. The identity rows are wrapped in
159
+ // one <span> so the chevron sits beside the block rather than under
160
+ // the email.
161
+ _jsxs("button", { ref: headerRef, type: "button", role: "menuitem", "aria-haspopup": "true", "aria-expanded": limitsOpen, onClick: () => {
162
+ setLimitsSeen(true);
163
+ setLimitsOpen((v) => !v);
164
+ }, style: headerButtonStyle(theme, limitsOpen), onMouseEnter: headerHoverIn(theme), onMouseLeave: headerHoverOut(theme, limitsOpen), children: [_jsxs("span", { style: { minWidth: 0, flex: 1 }, children: [identityRows, _jsx("span", { style: limitsHintStyle(theme), children: t(language, 'limits.title') })] }), _jsx(IconChevronRight, {})] })) : (_jsx("div", { style: headerStyle(theme), children: identityRows }))), limitsSeen && (_jsx(DropdownSurface, { open: limitsOpen, anchorRef: headerRef, placement: "side",
165
+ // The profile menu lives in the right-hand nav cluster, so the room
166
+ // is on its left. `side` is a preference — DropdownSurface flips it
167
+ // when the panel doesn't fit, which is what a narrow window does.
168
+ side: "left", gap: 6,
169
+ // The surface is a plain container; the labelled group is the div
170
+ // inside it, which is the element that can carry the accessible
171
+ // name. Not role="menu" either way — these are values, not
172
+ // commands, and announcing them as menu items would promise
173
+ // arrow-key navigation that isn't there.
174
+ role: "none", surfaceStyle: limitsSurfaceStyle(theme), onMouseEnter: hoverOpen, onMouseLeave: hoverClose, onRequestClose: () => setLimitsOpen(false), children: _jsx("div", { ref: limitsRef, role: "group", "aria-label": t(language, 'limits.title'), children: _jsx(AccountLimits, { language: language, theme: theme }) }) })), showSignIn ? (
175
+ // Guest / anonymous: prominent sign-in CTA instead of "View profile".
176
+ // Stays as an <a> (not a button) so middle-click / ctrl-click open the
177
+ // hub login in a new tab like a normal nav link.
178
+ _jsxs("a", { role: "menuitem", href: signInHref, onClick: (e) => {
179
+ if (!onSignInClick)
180
+ return;
181
+ // Only intercept a plain left-click; modified clicks keep the
182
+ // native new-tab/new-window behaviour of the underlying link.
183
+ if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
184
+ return;
185
+ e.preventDefault();
186
+ closeMenu();
187
+ onSignInClick();
188
+ }, style: primaryItemStyle(theme), onMouseEnter: primaryHoverIn, onMouseLeave: primaryHoverOut, children: [_jsx(IconSignIn, {}), " ", t(language, 'profile.sign_in')] })) : showProfile ? (desktop ? (_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
189
+ closeMenu();
190
+ setProfileOpen(true);
191
+ }, style: { ...itemStyle(theme), width: '100%', border: 0, background: 'transparent', cursor: 'pointer', font: 'inherit', textAlign: 'left' }, onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), children: [_jsx(IconUser, {}), " ", t(language, 'profile.view_profile')] })) : (_jsxs("a", { role: "menuitem", href: profileHref, style: itemStyle(theme), onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), children: [_jsx(IconUser, {}), " ", t(language, 'profile.view_profile')] }))) : null, appSettingsHref && (_jsxs("a", { role: "menuitem", href: appSettingsHref, style: itemStyle(theme), onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), onClick: (e) => {
192
+ // Same trap as "View profile" when this points at the hub: on
193
+ // desktop the plain href would open a signed-out browser tab.
194
+ // openHubUrl returns false in a browser, where the link is
195
+ // already right and must be left alone.
196
+ if (openHubUrl(appSettingsHref, desktop)) {
197
+ e.preventDefault();
198
+ closeMenu();
199
+ }
200
+ }, children: [_jsx(IconGear, {}), " ", t(language, 'profile.app_settings')] })), showLanguageSelector && (_jsxs("div", { role: "none", style: languageRowStyle(theme), children: [_jsx("span", { "aria-hidden": true, style: { display: 'inline-flex' }, children: _jsx(IconGlobe, {}) }), _jsx("span", { style: { flex: 1 }, children: t(language, 'profile.language') }), _jsx("select", { "aria-label": t(language, 'profile.language'), value: language, onChange: (e) => setLanguage(e.target.value), style: languageSelectStyle(theme, !canHover), children: SUPPORTED_LANGUAGES.map((lang) => (_jsx("option", { value: lang, children: LANGUAGE_LABELS[lang] ?? lang }, lang))) })] })), extras && (_jsxs(_Fragment, { children: [_jsx(Divider, { theme: theme }), extras] })), showSignOut && (_jsxs(_Fragment, { children: [_jsx(Divider, { theme: theme }), _jsxs("button", { type: "button", role: "menuitem", onClick: (e) => {
201
+ // The shell is holding a copy of this session for the hub
202
+ // window. Leaving it behind would sign the NEXT person in as
203
+ // the one who just left.
204
+ void desktop?.clearHub?.();
205
+ closeMenu();
206
+ onSignOut?.(e);
207
+ }, style: dangerItemStyle(theme), onMouseEnter: dangerHoverIn(theme), onMouseLeave: dangerHoverOut(theme), children: [_jsx(IconLogout, {}), " ", t(language, 'profile.sign_out')] })] }))] }));
208
+ const profileDialog = (_jsx(ProfileDialog, { open: profileOpen, onClose: () => setProfileOpen(false), email: email, tier: tier, profileHref: profileHref, theme: theme }));
209
+ // ── Inline: no trigger, no surface ──────────────────────────────────────
210
+ // `role="none"` on the container rather than `menu`: the host list these land
211
+ // in is already the menu, and nesting one inside it announces a group that
212
+ // isn't there.
213
+ if (inline) {
214
+ return (_jsxs("div", { role: "none", className: className, style: { color: MENU[theme].text, ...style }, children: [menuRows, profileDialog] }));
215
+ }
216
+ return (_jsxs("div", { ref: wrapRef, className: className, style: { position: 'relative', display: 'inline-block', ...style }, onMouseEnter: hoverOpen, onMouseLeave: hoverClose, children: [_jsx("button", { type: "button", "aria-label": pillLabel ? `${pillLabel} · ${resolvedAriaLabel}` : resolvedAriaLabel, "aria-expanded": open, "aria-haspopup": "true", onClick: () => setOpen((v) => !v), onFocus: hoverOpen, style: isPill
217
+ ? { ...pillTriggerStyle, ...PILL_THEMES[resolvedPillTheme].rest, ...(open ? PILL_THEMES[resolvedPillTheme].open : null), ...triggerStyle }
218
+ : { ...circleTriggerStyle(theme), ...triggerStyle }, children: isPill ? (_jsxs(_Fragment, { children: [pillLabel && _jsx("span", { style: pillLabelStyle, children: pillLabel }), _jsx(IconChevron, { open: open }), !hideTriggerAvatar && avatar] })) : (avatar) }), _jsx(DropdownSurface, { open: open, anchorRef: wrapRef, align: menuAlign, role: "menu", surfaceStyle: menuSurfaceStyle(theme), onMouseEnter: hoverOpen, onMouseLeave: hoverClose, onRequestClose: () => setOpen(false), children: menuRows }), profileDialog] }));
219
+ }
220
+ /**
221
+ * The avatar disc, extracted from <UserProfile /> so a second control can wear
222
+ * the same face without mounting a second profile menu behind it.
223
+ *
224
+ * Its one other caller today is the Assess phone bar's Actions pill (owner's
225
+ * ask, 2026-08-30: "Actions … with profile image (example profile image if
226
+ * none)"). Sharing the COMPONENT rather than copying the styles is what keeps
227
+ * the two from drifting: the '?' normalisation and the rotating-figure
228
+ * fallback below are the interesting half of this, and a copy loses them first.
229
+ */
230
+ export function ProfileAvatar({ photoUrl, name, initials, noAccount = false, size = 36, theme = 'light', }) {
129
231
  // Derive initials when not explicitly passed in.
130
232
  // '?' reads as "who are you?" — wrong when the product has no accounts at
131
233
  // all. The menu is a settings menu there, so show a settings glyph. (Visual
132
234
  // design of the trigger is the owner's to revisit; this only stops it
133
235
  // claiming to be an unidentified user.)
134
236
  // A '?' is not a set of initials, it's the absence of them — and it's what
135
- // every anonymous caller in the suite passes explicitly (both navbars below,
136
- // plus host apps that copied the pattern, e.g. Universal PDF's
237
+ // every anonymous caller in the suite passes explicitly (both navbars, plus
238
+ // host apps that copied the pattern, e.g. Universal PDF's
137
239
  // ToolbarUserProfile). Normalising it here is what makes the rotating avatar
138
240
  // reach those callers; without it they'd each need editing, and any future
139
241
  // copy of the idiom would silently regress to a question mark.
@@ -146,74 +248,12 @@ export function UserProfile({ name, email, photoUrl, initials, profileHref = 'ht
146
248
  // apologising for itself. `noAccount` keeps its gear, since that menu isn't
147
249
  // about a user at all.
148
250
  const showAvatarIcon = !photoUrl && !noAccount && !knownInitials;
149
- // Combined pill mode: the label (and/or the app's action rows) turn the bare
150
- // avatar circle into one wider control carrying both identities. The avatar
151
- // shrinks by the pill's 3px inset so the outer height still matches the 38px
152
- // buttons it sits beside (SuiteSwitcher, ChangelogMenu).
153
- const isPill = !!pillLabel || !!actions;
154
- const avatarSize = isPill ? PILL_AVATAR : 36;
155
- const sized = (base) => avatarSize === 36 ? base : { ...base, width: avatarSize, height: avatarSize };
156
- // Written once and rendered by both header branches. They ARE the same three
157
- // rows — the interactive version only adds a hint line and a chevron — and
158
- // the copy that used to sit in each drifted the moment one of them changed.
159
- //
160
- // Spans, not divs: the interactive branch puts these inside a <button>, whose
161
- // content model is phrasing content only. `nameStyle`/`emailStyle` carry the
162
- // `display: block` that used to come from the element.
163
- const identityRows = (_jsxs(_Fragment, { children: [name && _jsx("span", { style: nameStyle(theme), children: name }), email && _jsx("span", { style: emailStyle(theme), children: email }), tier && _jsx(TierBadge, { tier: tier, language: language, theme: theme })] }));
164
- const avatar = photoUrl ? (_jsx("img", { src: photoUrl, alt: "", "aria-hidden": true, style: sized(avatarImgStyle) })) : showAvatarIcon ? (_jsx(ProfileAvatarIcon, { size: avatarSize })) : (_jsx("span", { style: sized(noAccount ? avatarGlyphStyle(theme) : avatarFallbackStyle(theme)), children: derivedInitials }));
165
- return (_jsxs("div", { ref: wrapRef, className: className, style: { position: 'relative', display: 'inline-block', ...style }, onMouseEnter: hoverOpen, onMouseLeave: hoverClose, children: [_jsx("button", { type: "button", "aria-label": pillLabel ? `${pillLabel} · ${resolvedAriaLabel}` : resolvedAriaLabel, "aria-expanded": open, "aria-haspopup": "true", onClick: () => setOpen((v) => !v), onFocus: hoverOpen, style: isPill
166
- ? { ...pillTriggerStyle, ...PILL_THEMES[resolvedPillTheme].rest, ...(open ? PILL_THEMES[resolvedPillTheme].open : null) }
167
- : triggerStyle(theme), children: isPill ? (_jsxs(_Fragment, { children: [pillLabel && _jsx("span", { style: pillLabelStyle, children: pillLabel }), _jsx(IconChevron, { open: open }), avatar] })) : (avatar) }), _jsxs(DropdownSurface, { open: open, anchorRef: wrapRef, align: menuAlign, role: "menu", surfaceStyle: menuSurfaceStyle(theme), onMouseEnter: hoverOpen, onMouseLeave: hoverClose, onRequestClose: () => setOpen(false), children: [actions && (_jsxs(_Fragment, { children: [_jsx(AppMenuProvider, { close: () => setOpen(false), children: actions }), _jsx(Divider, { theme: theme })] })), showHeader && (limitsEnabled ? (
168
- // The same header, now a control. The identity rows are wrapped in
169
- // one <span> so the chevron sits beside the block rather than under
170
- // the email.
171
- _jsxs("button", { ref: headerRef, type: "button", role: "menuitem", "aria-haspopup": "true", "aria-expanded": limitsOpen, onClick: () => {
172
- setLimitsSeen(true);
173
- setLimitsOpen((v) => !v);
174
- }, style: headerButtonStyle(theme, limitsOpen), onMouseEnter: headerHoverIn(theme), onMouseLeave: headerHoverOut(theme, limitsOpen), children: [_jsxs("span", { style: { minWidth: 0, flex: 1 }, children: [identityRows, _jsx("span", { style: limitsHintStyle(theme), children: t(language, 'limits.title') })] }), _jsx(IconChevronRight, {})] })) : (_jsx("div", { style: headerStyle(theme), children: identityRows }))), limitsSeen && (_jsx(DropdownSurface, { open: limitsOpen, anchorRef: headerRef, placement: "side",
175
- // The profile menu lives in the right-hand nav cluster, so the room
176
- // is on its left. `side` is a preference — DropdownSurface flips it
177
- // when the panel doesn't fit, which is what a narrow window does.
178
- side: "left", gap: 6,
179
- // The surface is a plain container; the labelled group is the div
180
- // inside it, which is the element that can carry the accessible
181
- // name. Not role="menu" either way — these are values, not
182
- // commands, and announcing them as menu items would promise
183
- // arrow-key navigation that isn't there.
184
- role: "none", surfaceStyle: limitsSurfaceStyle(theme), onMouseEnter: hoverOpen, onMouseLeave: hoverClose, onRequestClose: () => setLimitsOpen(false), children: _jsx("div", { ref: limitsRef, role: "group", "aria-label": t(language, 'limits.title'), children: _jsx(AccountLimits, { language: language, theme: theme }) }) })), showSignIn ? (
185
- // Guest / anonymous: prominent sign-in CTA instead of "View profile".
186
- // Stays as an <a> (not a button) so middle-click / ctrl-click open the
187
- // hub login in a new tab like a normal nav link.
188
- _jsxs("a", { role: "menuitem", href: signInHref, onClick: (e) => {
189
- if (!onSignInClick)
190
- return;
191
- // Only intercept a plain left-click; modified clicks keep the
192
- // native new-tab/new-window behaviour of the underlying link.
193
- if (e.defaultPrevented || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
194
- return;
195
- e.preventDefault();
196
- setOpen(false);
197
- onSignInClick();
198
- }, style: primaryItemStyle(theme), onMouseEnter: primaryHoverIn, onMouseLeave: primaryHoverOut, children: [_jsx(IconSignIn, {}), " ", t(language, 'profile.sign_in')] })) : showProfile ? (desktop ? (_jsxs("button", { type: "button", role: "menuitem", onClick: () => {
199
- setOpen(false);
200
- setProfileOpen(true);
201
- }, style: { ...itemStyle(theme), width: '100%', border: 0, background: 'transparent', cursor: 'pointer', font: 'inherit', textAlign: 'left' }, onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), children: [_jsx(IconUser, {}), " ", t(language, 'profile.view_profile')] })) : (_jsxs("a", { role: "menuitem", href: profileHref, style: itemStyle(theme), onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), children: [_jsx(IconUser, {}), " ", t(language, 'profile.view_profile')] }))) : null, appSettingsHref && (_jsxs("a", { role: "menuitem", href: appSettingsHref, style: itemStyle(theme), onMouseEnter: hoverIn(theme), onMouseLeave: hoverOut(theme), onClick: (e) => {
202
- // Same trap as "View profile" when this points at the hub: on
203
- // desktop the plain href would open a signed-out browser tab.
204
- // openHubUrl returns false in a browser, where the link is
205
- // already right and must be left alone.
206
- if (openHubUrl(appSettingsHref, desktop)) {
207
- e.preventDefault();
208
- setOpen(false);
209
- }
210
- }, children: [_jsx(IconGear, {}), " ", t(language, 'profile.app_settings')] })), showLanguageSelector && (_jsxs("div", { role: "none", style: languageRowStyle(theme), children: [_jsx("span", { "aria-hidden": true, style: { display: 'inline-flex' }, children: _jsx(IconGlobe, {}) }), _jsx("span", { style: { flex: 1 }, children: t(language, 'profile.language') }), _jsx("select", { "aria-label": t(language, 'profile.language'), value: language, onChange: (e) => setLanguage(e.target.value), style: languageSelectStyle(theme, !canHover), children: SUPPORTED_LANGUAGES.map((lang) => (_jsx("option", { value: lang, children: LANGUAGE_LABELS[lang] ?? lang }, lang))) })] })), extras && (_jsxs(_Fragment, { children: [_jsx(Divider, { theme: theme }), extras] })), showSignOut && (_jsxs(_Fragment, { children: [_jsx(Divider, { theme: theme }), _jsxs("button", { type: "button", role: "menuitem", onClick: (e) => {
211
- // The shell is holding a copy of this session for the hub
212
- // window. Leaving it behind would sign the NEXT person in as
213
- // the one who just left.
214
- void desktop?.clearHub?.();
215
- onSignOut?.(e);
216
- }, style: dangerItemStyle(theme), onMouseEnter: dangerHoverIn(theme), onMouseLeave: dangerHoverOut(theme), children: [_jsx(IconLogout, {}), " ", t(language, 'profile.sign_out')] })] }))] }), _jsx(ProfileDialog, { open: profileOpen, onClose: () => setProfileOpen(false), email: email, tier: tier, profileHref: profileHref, theme: theme })] }));
251
+ const sized = (base) => size === 36 ? base : { ...base, width: size, height: size };
252
+ if (photoUrl)
253
+ return _jsx("img", { src: photoUrl, alt: "", "aria-hidden": true, style: sized(avatarImgStyle) });
254
+ if (showAvatarIcon)
255
+ return _jsx(ProfileAvatarIcon, { size: size });
256
+ return (_jsx("span", { style: sized(noAccount ? avatarGlyphStyle(theme) : avatarFallbackStyle(theme)), children: derivedInitials }));
217
257
  }
218
258
  // ──────────────────────────────────────────────────────────────────────────────
219
259
  // Helpers
@@ -298,7 +338,7 @@ function IconGlobe() {
298
338
  // Trigger sits in the right-cluster alongside the SuiteSwitcher (38×38 with
299
339
  // chrome) — match its dimensions and resting chrome so the row reads as a
300
340
  // uniform set of buttons rather than a chip next to a floating avatar.
301
- const triggerStyle = (theme) => ({
341
+ const circleTriggerStyle = (theme) => ({
302
342
  display: 'inline-flex',
303
343
  alignItems: 'center',
304
344
  justifyContent: 'center',
@@ -322,6 +362,38 @@ const triggerStyle = (theme) => ({
322
362
  // control rather than punched through its edge.
323
363
  const PILL_INSET = 3;
324
364
  const PILL_AVATAR = 38 - PILL_INSET * 2; // 32
365
+ /** Avatar diameter inside the combined pill. Exported for the Assess phone bar. */
366
+ export const PROFILE_PILL_AVATAR = PILL_AVATAR;
367
+ /** Where the label ellipsizes. See `pillLabelStyle` for why it is 190. */
368
+ export const PROFILE_PILL_LABEL_MAX = 190;
369
+ /**
370
+ * The pill's typography, spread into `pillTriggerStyle` below and exported so a
371
+ * caller measuring a candidate label off-screen measures it in the same face —
372
+ * a probe in a different weight answers a question nobody asked.
373
+ */
374
+ export const PROFILE_PILL_LABEL_FONT = {
375
+ fontFamily: 'inherit',
376
+ fontSize: 13,
377
+ fontWeight: 600,
378
+ letterSpacing: '-0.01em',
379
+ };
380
+ /**
381
+ * What a label costs the row, over and above the width of the text itself:
382
+ * everything `pillTriggerStyle` adds that the 38px circle does not — the two
383
+ * 1px borders, the 13px left inset, the two 7px gaps, the 12px chevron, the
384
+ * avatar and its 3px inset, less the 38px circle that would be there anyway.
385
+ *
386
+ * Exported because a bar cannot ask "does a label fit?" by rendering one and
387
+ * looking: rendering it is what changes the answer. `UniversalAppsNavBar`
388
+ * measures the free space on a phone and adds this to the measured text width
389
+ * to decide, so the number has to live here, next to the styles it is read off
390
+ * — a copy in the navbar would drift the first time the pill is re-padded.
391
+ *
392
+ * Assumes `box-sizing: border-box` (every host app runs Tailwind's preflight,
393
+ * which sets it). Under content-box the circle would be 40 rather than 38 and
394
+ * this is 2px pessimistic — comfortably inside the caller's clearance.
395
+ */
396
+ export const PROFILE_PILL_LABEL_COST = 2 + 13 + 7 + 12 + 7 + PILL_AVATAR + PILL_INSET - 38; // 38
325
397
  const pillTriggerStyle = {
326
398
  display: 'inline-flex',
327
399
  alignItems: 'center',
@@ -333,10 +405,7 @@ const pillTriggerStyle = {
333
405
  borderRadius: 999,
334
406
  border: '1px solid transparent',
335
407
  cursor: 'pointer',
336
- fontFamily: 'inherit',
337
- fontSize: 13,
338
- fontWeight: 600,
339
- letterSpacing: '-0.01em',
408
+ ...PROFILE_PILL_LABEL_FONT,
340
409
  whiteSpace: 'nowrap',
341
410
  transition: 'all 150ms cubic-bezier(0.16,1,0.3,1)',
342
411
  };
@@ -364,7 +433,7 @@ const pillLabelStyle = {
364
433
  // be anything, so cap it rather than let one long name push the pill across
365
434
  // the bar. 190 clears greeting + name at 13px ("Good day Konstantinos") — at
366
435
  // the old 140 the greeting alone ate the budget and long names ellipsised.
367
- maxWidth: 190,
436
+ maxWidth: PROFILE_PILL_LABEL_MAX,
368
437
  overflow: 'hidden',
369
438
  textOverflow: 'ellipsis',
370
439
  whiteSpace: 'nowrap',
@@ -379,7 +448,7 @@ const avatarImgStyle = {
379
448
  display: 'block',
380
449
  };
381
450
  // Fallback initials/icon when there's no photo. Same 36×36 inner size so
382
- // it sits flush inside the triggerStyle border ring. The orange/peach tint
451
+ // it sits flush inside the circleTriggerStyle border ring. The orange/peach tint
383
452
  // is kept as a subtle brand cue — readable on both signed-in and anonymous
384
453
  // states without competing with the avatar photo when it does exist.
385
454
  const avatarFallbackStyle = (theme) => ({
@@ -1 +1 @@
1
- {"version":3,"file":"UserProfile.js","sourceRoot":"","sources":["../src/UserProfile.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EACL,SAAS,EACT,QAAQ,EACR,MAAM,GAIP,MAAM,OAAO,CAAA;AACd,OAAO,EAAE,CAAC,EAAE,MAAM,WAAW,CAAA;AAC7B,OAAO,EAAE,mBAAmB,EAAiB,MAAM,WAAW,CAAA;AAC9D,OAAO,EAAE,WAAW,EAAE,MAAM,eAAe,CAAA;AAC3C,OAAO,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAA;AACtD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,UAAU,EAAE,gBAAgB,EAAE,MAAM,cAAc,CAAA;AAC3D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAA;AAClD,OAAO,EAAE,WAAW,EAAE,MAAM,YAAY,CAAA;AACxC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC1D,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAElC,OAAO,EAAE,IAAI,EAAE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C;IACxF,QAAQ,EAAM,aAAa,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,EAAE;IACrC,UAAU,EAAI,SAAS;IACvB,OAAO,EAAO,SAAS;IACvB,MAAM,EAAQ,aAAa,IAAI,CAAC,KAAK,CAAC,CAAC,WAAW,EAAE;IACpD,YAAY,EAAE,CAAC;IACf,UAAU,EAAI,IAAI,CAAC,KAAK,CAAC,CAAC,OAAO;IACjC,KAAK,EAAS,IAAI,CAAC,KAAK,CAAC,CAAC,SAAS;IACnC,8EAA8E;IAC9E,0EAA0E;IAC1E,uEAAuE;IACvE,0EAA0E;IAC1E,wDAAwD;IACxD,WAAW,EAAG,KAAK;IACnB,MAAM,EAAQ,SAAS;IACvB,OAAO,EAAO,MAAM;CACrB,CAAC,CAAA;AAEF,yEAAyE;AACzE,6EAA6E;AAC7E,2EAA2E;AAC3E,4DAA4D;AAC5D,MAAM,gBAAgB,GAAG,CAAC,KAAgB,EAAiB,EAAE,CAAC,CAAC;IAC7D,GAAG,SAAS,CAAC,KAAK,CAAC;IACnB,UAAU,EAAM,KAAK,CAAC,MAAM;IAC5B,6EAA6E;IAC7E,KAAK,EAAW,KAAK,CAAC,QAAQ;IAC9B,UAAU,EAAM,GAAG;IACnB,MAAM,EAAU,SAAS;IACzB,YAAY,EAAI,CAAC;IACjB,KAAK,EAAW,mBAAmB;IACnC,OAAO,EAAS,UAAU;IAC1B,cAAc,EAAE,YAAY;CAC7B,CAAC,CAAA"}
@@ -0,0 +1,43 @@
1
+ import type { Organisation, OrgRole, Subscription } from './types.js';
2
+ /** One company the signed-in user belongs to, with everything a card needs. */
3
+ export interface Company {
4
+ org: Organisation;
5
+ /** The user's role in THIS company — it can differ between companies. */
6
+ role: OrgRole | null;
7
+ /**
8
+ * The company's subscription, or null when it has none yet. Readable by
9
+ * plain members too: `subscriptions_member_read` is `using
10
+ * (is_org_member(org_id))`, i.e. scoped per-org, not per-user.
11
+ */
12
+ subscription: Subscription | null;
13
+ /**
14
+ * When the licence runs out. Null for a Lifetime company (which has no
15
+ * period end by construction — see `lifetime_at` on Subscription) and for a
16
+ * company with no subscription row at all.
17
+ */
18
+ expiresAt: string | null;
19
+ /** True for the Lifetime plan: enterprise tier, no period end, lifetime_at set. */
20
+ isLifetime: boolean;
21
+ }
22
+ export interface UseMyCompaniesResult {
23
+ companies: Company[];
24
+ loading: boolean;
25
+ /**
26
+ * Non-null when the query failed. `companies: []` alongside a non-null error
27
+ * means "unknown", NOT "you belong to nowhere" — callers must not offer to
28
+ * create a company from that state, or a network blip invites a user with
29
+ * two employers to start a third.
30
+ */
31
+ error: string | null;
32
+ refresh: () => void;
33
+ }
34
+ /**
35
+ * Every company the signed-in user belongs to, each with its role and licence.
36
+ *
37
+ * `useOrg()` already returns the full `orgs` list — it always has, because the
38
+ * membership join was never written single-org — but it deliberately carries
39
+ * only the organisation row. This adds the per-company role and subscription
40
+ * the hub's landing cards show, in two queries rather than 2N.
41
+ */
42
+ export declare function useMyCompanies(): UseMyCompaniesResult;
43
+ //# sourceMappingURL=companies.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companies.d.ts","sourceRoot":"","sources":["../src/companies.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,YAAY,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,YAAY,CAAA;AAErE,+EAA+E;AAC/E,MAAM,WAAW,OAAO;IACtB,GAAG,EAAE,YAAY,CAAA;IACjB,yEAAyE;IACzE,IAAI,EAAE,OAAO,GAAG,IAAI,CAAA;IACpB;;;;OAIG;IACH,YAAY,EAAE,YAAY,GAAG,IAAI,CAAA;IACjC;;;;OAIG;IACH,SAAS,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mFAAmF;IACnF,UAAU,EAAE,OAAO,CAAA;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,OAAO,EAAE,CAAA;IACpB,OAAO,EAAE,OAAO,CAAA;IAChB;;;;;OAKG;IACH,KAAK,EAAE,MAAM,GAAG,IAAI,CAAA;IACpB,OAAO,EAAE,MAAM,IAAI,CAAA;CACpB;AAED;;;;;;;GAOG;AACH,wBAAgB,cAAc,IAAI,oBAAoB,CAwGrD"}
@@ -0,0 +1,98 @@
1
+ 'use client';
2
+ import { useCallback, useEffect, useState } from 'react';
3
+ import { useUniversal } from './provider.js';
4
+ /**
5
+ * Every company the signed-in user belongs to, each with its role and licence.
6
+ *
7
+ * `useOrg()` already returns the full `orgs` list — it always has, because the
8
+ * membership join was never written single-org — but it deliberately carries
9
+ * only the organisation row. This adds the per-company role and subscription
10
+ * the hub's landing cards show, in two queries rather than 2N.
11
+ */
12
+ export function useMyCompanies() {
13
+ const { supabase, session } = useUniversal();
14
+ const [companies, setCompanies] = useState([]);
15
+ const [loading, setLoading] = useState(true);
16
+ const [error, setError] = useState(null);
17
+ const [reloadKey, setReloadKey] = useState(0);
18
+ const userId = session?.user?.id ?? null;
19
+ useEffect(() => {
20
+ if (!userId) {
21
+ setCompanies([]);
22
+ setError(null);
23
+ setLoading(false);
24
+ return;
25
+ }
26
+ let cancelled = false;
27
+ setLoading(true);
28
+ void (async () => {
29
+ // Join through org_members, never straight at `organisations`: the
30
+ // platform-admin RLS policy grants read-all there, so a direct query
31
+ // would hand accounts@unisim.co.uk every customer in the suite as
32
+ // "their" companies.
33
+ const { data: memberRows, error: memberError } = await supabase
34
+ .from('org_members')
35
+ .select('role, organisations(id, slug, name, logo_url, icon_url, brand_color, billing_email, people_marked_complete, places_marked_complete, projects_marked_complete)')
36
+ .eq('user_id', userId);
37
+ if (cancelled)
38
+ return;
39
+ if (memberError) {
40
+ console.error('[unisim/sdk] failed to load companies', memberError);
41
+ setError(memberError.message);
42
+ setLoading(false);
43
+ return;
44
+ }
45
+ // Supabase types the embedded relation as an array; a membership row
46
+ // points at exactly one organisation, so it is an object at runtime.
47
+ const rows = (memberRows ?? []);
48
+ const orgs = rows
49
+ .map((row) => ({ role: row.role, org: row.organisations }))
50
+ .filter((r) => r.org !== null);
51
+ if (orgs.length === 0) {
52
+ setCompanies([]);
53
+ setError(null);
54
+ setLoading(false);
55
+ return;
56
+ }
57
+ // One round trip for every company's licence rather than N.
58
+ // '*' rather than a column list so this works whether or not the
59
+ // lifetime_at migration (0044) has been pushed — same reasoning as
60
+ // useSubscription().
61
+ const { data: subRows, error: subError } = await supabase
62
+ .from('subscriptions')
63
+ .select('*')
64
+ .in('org_id', orgs.map((o) => o.org.id));
65
+ if (cancelled)
66
+ return;
67
+ // A failed subscription read is NOT fatal: the cards can still show the
68
+ // company with its licence line blank. Losing the whole list because
69
+ // billing data didn't load would be the worse failure.
70
+ if (subError) {
71
+ console.warn('[unisim/sdk] failed to load company subscriptions', subError);
72
+ }
73
+ const subsByOrg = new Map();
74
+ for (const s of (subRows ?? []))
75
+ subsByOrg.set(s.org_id, s);
76
+ setCompanies(orgs
77
+ .map(({ org, role }) => {
78
+ const subscription = subsByOrg.get(org.id) ?? null;
79
+ return {
80
+ org,
81
+ role,
82
+ subscription,
83
+ expiresAt: subscription?.current_period_end ?? null,
84
+ isLifetime: !!subscription?.lifetime_at,
85
+ };
86
+ })
87
+ .sort((a, b) => a.org.name.localeCompare(b.org.name)));
88
+ setError(null);
89
+ setLoading(false);
90
+ })();
91
+ return () => {
92
+ cancelled = true;
93
+ };
94
+ }, [supabase, userId, reloadKey]);
95
+ const refresh = useCallback(() => setReloadKey((k) => k + 1), []);
96
+ return { companies, loading, error, refresh };
97
+ }
98
+ //# sourceMappingURL=companies.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"companies.js","sourceRoot":"","sources":["../src/companies.ts"],"names":[],"mappings":"AAAA,YAAY,CAAA;AAEZ,OAAO,EAAE,WAAW,EAAE,SAAS,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAA;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,eAAe,CAAA;AAqC5C;;;;;;;GAOG;AACH,MAAM,UAAU,cAAc;IAC5B,MAAM,EAAE,QAAQ,EAAE,OA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