@unisim/sdk 0.221.0 → 0.223.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/README.md CHANGED
@@ -98,6 +98,17 @@ function Header() {
98
98
  `nativeProvidersToOffer()` decide whether to offer it.
99
99
  - `<OAuthButtons providers={…} />` — the buttons. Without `providers` it shows
100
100
  Google and Microsoft only, because the hub's labels predate Apple.
101
+ - **Two-step is asked for by the provider itself (since 0.223.0).** Any
102
+ sign-in but a passkey (password, emailed code, Google, Apple) leaves an
103
+ account that has an authenticator app at aal1 until its code is entered.
104
+ `<UniversalProvider>` mounts `<TwoStepPrompt />`, which watches the session
105
+ (a new sign-in and one already in the browser alike) and asks for the code
106
+ while `readAssuranceLevel()` says a step is owed, with Sign out as the only
107
+ other way out. Verifying fires `TWO_STEP_VERIFIED_EVENT`
108
+ (`unisim:two-step-verified`) on `window`, so a page the API refused at aal1
109
+ can load again. Off with config `twoStepPrompt: false`, only for a page that
110
+ asks for the code itself (the Hub's /login). Not shown with `mockAuth` or
111
+ `noAccounts`. Test: `npm run test:two-step-prompt`.
101
112
 
102
113
  ### Trial mode (anonymous-auth users)
103
114
  - `useTrialMode()` — `{ isTrial, hasSession, email }` for gating exports / multi-user
@@ -718,6 +729,27 @@ import { Button, Tabs, Tab, buttonClass } from '@unisim/sdk'
718
729
  - `npm run test:controls` measures every label and key icon on both grounds, the tab states
719
730
  and the dot, with a negative control.
720
731
 
732
+ ### On a phone, navigation sits at the bottom (since 0.222.0)
733
+ Owner rule 2026-11-19 (BRANDING.md). Below 768px:
734
+
735
+ - **`<UniversalNavBar />` is fixed to the foot of the screen** and its Actions panel opens
736
+ upward. It publishes its height as `--u-bar-bottom` on `<html>` and pads `<body>` by it.
737
+ A host whose scroller is not `<body>`, or that has its own fixed bottom element, uses
738
+ `var(--u-bar-bottom, 0px)`. `phonePlacement="top"` keeps the old in-flow bar.
739
+ - **A tray that switches the app's main sections docks at the bottom:** `<Tabs dock>`, or
740
+ `u-tabs--dock` / `data-u-dock="true"` on your own tray markup. It floats 8px above the
741
+ bottom bar (or the home indicator), the segments share the width, and `<body>` is padded
742
+ by `--u-dock-space`; pad an inner scroller with `var(--u-dock-space, 0px)`. Wider
743
+ screens keep the tray where the markup puts it. Never on a phone app's own tab bar.
744
+ - ⚠️ **`html, body { height: 100% }` defeats the body padding**: the content overflows
745
+ `<body>`, so its padding sits at the bottom of the screen, not under the last line, and the
746
+ page's end hides behind the dock (found in Converter, QR, Invoices, PalsPayIn, BlackBook,
747
+ Jukebox, the Hub and comply-hub on 2026-11-19). Pad the app's root instead
748
+ (`pb-[var(--u-dock-space,0px)]`, or `var(--u-bar-bottom, 0px)` for the bar alone), or make
749
+ `body` `height: auto` on phones.
750
+ - `npm run test:phone-bottom-nav` checks both at 390px and 320px, the panel opening up, the
751
+ `top` opt-out and that nothing moves at 1024px.
752
+
721
753
  ### Theme (light / dark / system)
722
754
  - `createThemeStore(storageKey)` (since 0.140.0) — an app's theme preference, as a hook.
723
755
  Call it once at module level: `export const useThemeStore = createThemeStore('unisim-<app>-theme')`,
package/dist/Tabs.d.ts CHANGED
@@ -3,10 +3,16 @@ import type { ChipGround } from './Chip.js';
3
3
  export interface TabsProps extends HTMLAttributes<HTMLDivElement> {
4
4
  /** Forces a ground; otherwise the nearest `data-u-ground` / `dark` ancestor decides (light if none). */
5
5
  ground?: ChipGround;
6
+ /**
7
+ * The app's main sections: on a phone (below 768px) the tray docks at the
8
+ * bottom of the screen, within thumb reach (BRANDING.md → "On a phone,
9
+ * navigation sits at the bottom"). Wider screens keep it in place.
10
+ */
11
+ dock?: boolean;
6
12
  children?: ReactNode;
7
13
  }
8
14
  /** The tray: a `role="tablist"`. */
9
- export declare function Tabs({ ground, className, children, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
15
+ export declare function Tabs({ ground, dock, className, children, ...rest }: TabsProps): import("react/jsx-runtime").JSX.Element;
10
16
  export interface TabProps extends ButtonHTMLAttributes<HTMLButtonElement> {
11
17
  selected?: boolean;
12
18
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AA4B3C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,wGAAwG;IACxG,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,oCAAoC;AACpC,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAOvE;AAED,MAAM,WAAW,QAAS,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,qFAAqF;AACrF,wBAAgB,GAAG,CAAC,EAAE,QAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,2CAY3E"}
1
+ {"version":3,"file":"Tabs.d.ts","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAsB,KAAK,oBAAoB,EAAE,KAAK,cAAc,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAE1G,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,WAAW,CAAA;AA4B3C,MAAM,WAAW,SAAU,SAAQ,cAAc,CAAC,cAAc,CAAC;IAC/D,wGAAwG;IACxG,MAAM,CAAC,EAAE,UAAU,CAAA;IACnB;;;;OAIG;IACH,IAAI,CAAC,EAAE,OAAO,CAAA;IACd,QAAQ,CAAC,EAAE,SAAS,CAAA;CACrB;AAED,oCAAoC;AACpC,wBAAgB,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAE,EAAE,SAAS,2CAO7E;AAED,MAAM,WAAW,QAAS,SAAQ,oBAAoB,CAAC,iBAAiB,CAAC;IACvE,QAAQ,CAAC,EAAE,OAAO,CAAA;CACnB;AAED,qFAAqF;AACrF,wBAAgB,GAAG,CAAC,EAAE,QAAgB,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAE,EAAE,QAAQ,2CAY3E"}
package/dist/Tabs.js CHANGED
@@ -25,9 +25,9 @@ function useTabStyles() {
25
25
  }
26
26
  const cx = (...names) => names.filter(Boolean).join(' ');
27
27
  /** The tray: a `role="tablist"`. */
28
- export function Tabs({ ground, className, children, ...rest }) {
28
+ export function Tabs({ ground, dock, className, children, ...rest }) {
29
29
  useTabStyles();
30
- return (_jsx("div", { role: "tablist", ...rest, className: cx('u-tabs', className), "data-u-ground": ground, children: children }));
30
+ return (_jsx("div", { role: "tablist", ...rest, className: cx('u-tabs', dock && 'u-tabs--dock', className), "data-u-ground": ground, children: children }));
31
31
  }
32
32
  /** One segment: a `role="tab"` button. Only the selected tab is in the tab order. */
33
33
  export function Tab({ selected = false, className, type, ...rest }) {
package/dist/Tabs.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"Tabs.js","sourceRoot":"","sources":["../src/Tabs.tsx"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAkE,MAAM,OAAO,CAAA;AAC1G,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AAGjD,yEAAyE;AACzE,gBAAgB;AAChB,EAAE;AACF,mCAAmC;AACnC,iCAAiC;AACjC,yBAAyB;AACzB,8FAA8F;AAC9F,qEAAqE;AACrE,oBAAoB;AACpB,eAAe;AACf,UAAU;AACV,YAAY;AACZ,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,gFAAgF;AAChF,4CAA4C;AAE5C,SAAS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qE;AACrE,oBAAoB;AACpB,eAAe;AACf,UAAU;AACV,YAAY;AACZ,EAAE;AACF,8EAA8E;AAC9E,6EAA6E;AAC7E,gFAAgF;AAChF,4CAA4C;AAE5C,SAAS,YAAY;IACnB,kBAAkB,CAAC,GAAG,EAAE;QACtB,gBAAgB,EAAE,CAAA;IACpB,CAAC,EAAE,EAAE,CAAC,CAAA;AACR,CAAC;AAED,MAAM,EAAE,GAAG,CAAC,GAAG,KAAqC,EAAE,EAAE,CAAC,KAAK,CAAC,MAAM,CAAC,OAAO,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAA;AAcxF,oCAAoC;AACpC,MAAM,UAAU,IAAI,CAAC,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,EAAE,QAAQ,EAAE,GAAG,IAAI,EAAa;IAC5E,YAAY,EAAE,CAAA;IACd,OAAO,CACL,cAAK,IAAI,EAAC,SAAS,KAAK,IAAI,EAAE,SAAS,EAAE,EAAE,CAAC,QAAQ,EAAE,IAAI,IAAI,cAAc,EAAE,SAAS,CAAC,mBAAiB,MAAM,YAC5G,QAAQ,GACL,CACP,CAAA;AACH,CAAC;AAMD,qFAAqF;AACrF,MAAM,UAAU,GAAG,CAAC,EAAE,QAAQ,GAAG,KAAK,EAAE,SAAS,EAAE,IAAI,EAAE,GAAG,IAAI,EAAY;IAC1E,YAAY,EAAE,CAAA;IACd,OAAO,CACL,iBACE,IAAI,EAAC,KAAK,EACV,QAAQ,EAAE,QAAQ,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,KACvB,IAAI,EACR,IAAI,EAAE,IAAI,IAAI,QAAQ,mBACP,QAAQ,EACvB,SAAS,EAAE,EAAE,CAAC,OAAO,EAAE,SAAS,CAAC,GACjC,CACH,CAAA;AACH,CAAC"}
@@ -0,0 +1,4 @@
1
+ /** Fired on `window` once this session has passed its second step. */
2
+ export declare const TWO_STEP_VERIFIED_EVENT = "unisim:two-step-verified";
3
+ export declare function TwoStepPrompt(): import("react/jsx-runtime").JSX.Element | null;
4
+ //# sourceMappingURL=TwoStepPrompt.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TwoStepPrompt.d.ts","sourceRoot":"","sources":["../src/TwoStepPrompt.tsx"],"names":[],"mappings":"AAuCA,sEAAsE;AACtE,eAAO,MAAM,uBAAuB,6BAA6B,CAAA;AAIjE,wBAAgB,aAAa,mDAkC5B"}
@@ -0,0 +1,209 @@
1
+ 'use client';
2
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useEffect, useRef, useState } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import { NAV_OVERLAY_Z_INDEX } from './DropdownSurface.js';
6
+ import { MENU } from './menuTheme.js';
7
+ import { t } from './i18n.js';
8
+ import { useLanguage, useUniversal } from './provider.js';
9
+ import { readAssuranceLevel } from './security.js';
10
+ // ──────────────────────────────────────────────────────────────────────────────
11
+ // <TwoStepPrompt /> — "Enter the code from your authenticator app", for a
12
+ // signed-in session that still owes its second step. Mounted by
13
+ // <UniversalProvider> itself (config `twoStepPrompt`, on unless false), so every
14
+ // product gets it by bumping the SDK.
15
+ //
16
+ // James, 2026-11-19: "It seems to be forgetting that I used 2FA". It wasn't
17
+ // forgetting: the SDK's own sign-in (password, emailed code, Google, Apple)
18
+ // never asked for the code. Each of those returns a valid aal1 session, and an
19
+ // account with a verified authenticator only reaches aal2 by passing a
20
+ // challenge. Only the Hub's /login asked for it, and a Hub sign-in does not
21
+ // reach a product on its own domain (ergoassess.app), so Ergo signed him in on
22
+ // a password alone and then its API refused him for missing two-step.
23
+ //
24
+ // So this watches the SESSION, not the sign-in form: a fresh password sign-in,
25
+ // the return from Google, and a session that was already sitting in the browser
26
+ // at aal1 all owe the same code, and all get this dialog. A passkey sign-in
27
+ // needs nothing: the platform's access-token hook (migration 0294) makes it
28
+ // aal2. Sign out is the only other way out; there is no "not now", because a
29
+ // password alone is not meant to sign in an account that has two-step on.
30
+ //
31
+ // ⚠️ A challenge is burnt by its first verify, right or wrong, so every retry
32
+ // mints a fresh one (the Hub's AuthScreen and StepUpCode do the same).
33
+ //
34
+ // Verifying fires `unisim:two-step-verified` on window, so a page that was
35
+ // refused while the session was still aal1 can load again (see
36
+ // TWO_STEP_VERIFIED_EVENT).
37
+ // ──────────────────────────────────────────────────────────────────────────────
38
+ /** Fired on `window` once this session has passed its second step. */
39
+ export const TWO_STEP_VERIFIED_EVENT = 'unisim:two-step-verified';
40
+ export function TwoStepPrompt() {
41
+ const { supabase, session } = useUniversal();
42
+ const userId = session?.user && !session.user.is_anonymous
43
+ ? session.user.id
44
+ : null;
45
+ const token = session?.access_token ?? null;
46
+ const [challenge, setChallenge] = useState(null);
47
+ // Re-asked whenever the token changes: a sign-in, a refresh, a verify. The
48
+ // assurance read is local (it decodes the token and reads the session's
49
+ // user); only an owed step costs a factor list and a challenge.
50
+ useEffect(() => {
51
+ if (!userId || !token) {
52
+ setChallenge(null);
53
+ return;
54
+ }
55
+ let cancelled = false;
56
+ (async () => {
57
+ try {
58
+ const { challengeRequired } = await readAssuranceLevel(supabase);
59
+ if (!challengeRequired) {
60
+ if (!cancelled)
61
+ setChallenge(null);
62
+ return;
63
+ }
64
+ const { data } = await supabase.auth.mfa.listFactors();
65
+ const factor = data?.totp?.find((f) => f.status === 'verified') ?? null;
66
+ if (cancelled || !factor)
67
+ return;
68
+ const { data: ch } = await supabase.auth.mfa.challenge({ factorId: factor.id });
69
+ if (cancelled || !ch)
70
+ return;
71
+ setChallenge((prev) => prev ?? { factorId: factor.id, challengeId: ch.id });
72
+ }
73
+ catch {
74
+ // A client without MFA (mock auth, the offline desktop stub) or a
75
+ // network failure: ask nothing. The API still refuses what needs aal2.
76
+ }
77
+ })();
78
+ return () => { cancelled = true; };
79
+ }, [supabase, userId, token]);
80
+ if (!challenge || typeof document === 'undefined')
81
+ return null;
82
+ return _jsx(TwoStepPromptBody, { challenge: challenge, setChallenge: setChallenge });
83
+ }
84
+ function TwoStepPromptBody({ challenge, setChallenge }) {
85
+ const { supabase, session } = useUniversal();
86
+ const { language } = useLanguage();
87
+ const p = MENU.light;
88
+ const [code, setCode] = useState('');
89
+ const [busy, setBusy] = useState(false);
90
+ const [error, setError] = useState(null);
91
+ const inputRef = useRef(null);
92
+ useEffect(() => { inputRef.current?.focus(); }, []);
93
+ async function submit(e) {
94
+ e.preventDefault();
95
+ if (busy || code.length < 6)
96
+ return;
97
+ setBusy(true);
98
+ setError(null);
99
+ const { error: err } = await supabase.auth.mfa.verify({ ...challenge, code });
100
+ if (err) {
101
+ const { data: ch } = await supabase.auth.mfa.challenge({ factorId: challenge.factorId });
102
+ setBusy(false);
103
+ setCode('');
104
+ setError(t(language, 'twostep.wrong'));
105
+ if (ch)
106
+ setChallenge({ factorId: challenge.factorId, challengeId: ch.id });
107
+ inputRef.current?.focus();
108
+ return;
109
+ }
110
+ setBusy(false);
111
+ setChallenge(null);
112
+ try {
113
+ window.dispatchEvent(new Event(TWO_STEP_VERIFIED_EVENT));
114
+ }
115
+ catch { /* old browser */ }
116
+ }
117
+ async function signOut() {
118
+ setBusy(true);
119
+ await supabase.auth.signOut().catch(() => undefined);
120
+ setBusy(false);
121
+ setChallenge(null);
122
+ }
123
+ return createPortal(_jsx("div", { style: overlayStyle, role: "presentation", children: _jsxs("form", { role: "dialog", "aria-modal": "true", "aria-labelledby": "unisim-two-step-title", "data-testid": "unisim-two-step-prompt", onSubmit: submit, style: cardStyle(p), children: [_jsx("h2", { id: "unisim-two-step-title", style: titleStyle(p.text), children: t(language, 'twostep.title') }), _jsxs("p", { style: bodyStyle(p), children: [t(language, 'twostep.body'), session?.user?.email ? (_jsxs(_Fragment, { children: [" (", _jsx("strong", { style: { color: p.text, wordBreak: 'break-all' }, children: session.user.email }), ")"] })) : null] }), _jsx("label", { htmlFor: "unisim-two-step-code", style: labelStyle(p), children: t(language, 'twostep.label') }), _jsx("input", { ref: inputRef, id: "unisim-two-step-code", value: code, onChange: (e) => setCode(e.target.value.replace(/\D/g, '').slice(0, 6)), inputMode: "numeric", autoComplete: "one-time-code",
124
+ /* No maxLength: it would cut a pasted "123 456" before the digits
125
+ are picked out. The handler keeps six. */
126
+ disabled: busy, style: inputStyle(p) }), error && _jsx("div", { role: "alert", style: errorStyle(p), children: error }), _jsxs("div", { style: buttonRowStyle, children: [_jsx("button", { type: "button", onClick: () => void signOut(), disabled: busy, style: secondaryButtonStyle(p, busy), children: t(language, 'twostep.sign_out') }), _jsx("button", { type: "submit", disabled: busy || code.length < 6, style: primaryButtonStyle(busy || code.length < 6), children: busy ? t(language, 'twostep.verifying') : t(language, 'twostep.verify') })] })] }) }), document.body);
127
+ }
128
+ const overlayStyle = {
129
+ position: 'fixed',
130
+ inset: 0,
131
+ background: 'rgba(15, 23, 42, 0.5)',
132
+ display: 'flex',
133
+ alignItems: 'center',
134
+ justifyContent: 'center',
135
+ padding: 'max(16px, env(safe-area-inset-top)) 16px max(16px, env(safe-area-inset-bottom))',
136
+ boxSizing: 'border-box',
137
+ zIndex: NAV_OVERLAY_Z_INDEX + 200,
138
+ fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",
139
+ };
140
+ const cardStyle = (p) => ({
141
+ width: '100%',
142
+ maxWidth: 400,
143
+ background: p.surface,
144
+ color: p.text,
145
+ borderRadius: 16,
146
+ border: `1px solid ${p.border}`,
147
+ boxShadow: p.shadow,
148
+ padding: '22px 22px 18px',
149
+ boxSizing: 'border-box',
150
+ });
151
+ const titleStyle = (color) => ({
152
+ margin: 0, fontSize: 18, fontWeight: 700, letterSpacing: '-0.01em', color,
153
+ });
154
+ const bodyStyle = (p) => ({
155
+ margin: '10px 0 0', fontSize: 14, lineHeight: 1.5, color: p.body,
156
+ });
157
+ const labelStyle = (p) => ({
158
+ display: 'block', margin: '16px 0 6px', fontSize: 12.5, fontWeight: 600, color: p.body,
159
+ });
160
+ /** ⚠️ 16px: iOS zooms the page in on focus below that, and stays zoomed. */
161
+ const inputStyle = (p) => ({
162
+ width: '100%',
163
+ padding: '9px 11px',
164
+ borderRadius: 9,
165
+ border: `1px solid ${p.border}`,
166
+ background: p.inputBg,
167
+ color: p.inputText,
168
+ fontSize: 16,
169
+ letterSpacing: '0.3em',
170
+ fontVariantNumeric: 'tabular-nums',
171
+ boxSizing: 'border-box',
172
+ outline: 'none',
173
+ });
174
+ const errorStyle = (p) => ({
175
+ marginTop: 12,
176
+ padding: '8px 11px',
177
+ borderRadius: 9,
178
+ background: p.dangerHoverBg,
179
+ color: p.dangerHoverText,
180
+ fontSize: 12.5,
181
+ lineHeight: 1.45,
182
+ });
183
+ const buttonRowStyle = {
184
+ display: 'flex', flexWrap: 'wrap', justifyContent: 'flex-end', gap: 8, marginTop: 16,
185
+ };
186
+ const secondaryButtonStyle = (p, disabled) => ({
187
+ padding: '10px 16px',
188
+ borderRadius: 10,
189
+ border: `1px solid ${p.border}`,
190
+ background: 'transparent',
191
+ color: p.body,
192
+ fontSize: 14,
193
+ fontWeight: 600,
194
+ cursor: disabled ? 'default' : 'pointer',
195
+ opacity: disabled ? 0.5 : 1,
196
+ });
197
+ // The suite's orange-700 (white on it is 5.2:1).
198
+ const primaryButtonStyle = (disabled) => ({
199
+ padding: '10px 16px',
200
+ borderRadius: 10,
201
+ border: 0,
202
+ background: '#c2410c',
203
+ color: '#ffffff',
204
+ fontSize: 14,
205
+ fontWeight: 600,
206
+ cursor: disabled ? 'default' : 'pointer',
207
+ opacity: disabled ? 0.5 : 1,
208
+ });
209
+ //# sourceMappingURL=TwoStepPrompt.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TwoStepPrompt.js","sourceRoot":"","sources":["../src/TwoStepPrompt.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ,OAAO,EAAE,SAAS,EAAE,MAAM,EAAE,QAAQ,EAAsC,MAAM,OAAO,CAAA;AACvF,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAA;AACxC,OAAO,E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Q,EAAE,MAAM,EAAE,cAAc,EAAE,UAAU,EAAE,GAAG,EAAE,CAAC,EAAE,SAAS,EAAE,EAAE;CACrF,CAAA;AAED,MAAM,oBAAoB,GAAG,CAAC,CAAU,EAAE,QAAiB,EAAiB,EAAE,CAAC,CAAC;IAC9E,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,aAAa,CAAC,CAAC,MAAM,EAAE;IAC/B,UAAU,EAAE,aAAa;IACzB,KAAK,EAAE,CAAC,CAAC,IAAI;IACb,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;IACxC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAA;AAEF,iDAAiD;AACjD,MAAM,kBAAkB,GAAG,CAAC,QAAiB,EAAiB,EAAE,CAAC,CAAC;IAChE,OAAO,EAAE,WAAW;IACpB,YAAY,EAAE,EAAE;IAChB,MAAM,EAAE,CAAC;IACT,UAAU,EAAE,SAAS;IACrB,KAAK,EAAE,SAAS;IAChB,QAAQ,EAAE,EAAE;IACZ,UAAU,EAAE,GAAG;IACf,MAAM,EAAE,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,SAAS;IACxC,OAAO,EAAE,QAAQ,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;CAC5B,CAAC,CAAA"}
@@ -220,6 +220,18 @@ export interface UniversalNavBarProps {
220
220
  * constraint entirely.
221
221
  */
222
222
  contentMaxWidth?: number | string;
223
+ /**
224
+ * Where the bar sits on a phone (below 768px). Default `'bottom'` (owner
225
+ * rule 2026-11-19, BRANDING.md → "On a phone, navigation sits at the
226
+ * bottom"): the bar is fixed to the foot of the screen, inside thumb reach,
227
+ * and the Actions panel opens UP from it. The bar publishes its height as
228
+ * `--u-bar-bottom` on `<html>` and pads `<body>` by it; a host whose scroller
229
+ * is not `<body>`, or that has its own fixed bottom element, uses
230
+ * `var(--u-bar-bottom, 0px)`. A docked tab tray (`u-tabs--dock`) sits on
231
+ * top of it by itself. `'top'` keeps the old in-flow bar. Wider screens are
232
+ * unaffected either way.
233
+ */
234
+ phonePlacement?: 'bottom' | 'top';
223
235
  className?: string;
224
236
  style?: CSSProperties;
225
237
  }
@@ -244,6 +256,8 @@ export interface UniversalNavBarProps {
244
256
  * — the product's own name where "Universal Simulation" used to be, the
245
257
  * company's logo alone (no "for", no company name, and nothing at all when
246
258
  * there is no company), then the controls. Nothing lives under the bar.
259
+ * Since 0.222.0 that row is fixed to the BOTTOM of the screen by default and
260
+ * its panel opens upward (`phonePlacement`; BRANDING.md, 2026-11-19).
247
261
  *
248
262
  * The Actions pill carries the signed-in user's face (photo → initials →
249
263
  * rotating suite figure), the same `<ProfileAvatar />` the profile menu inside
@@ -251,5 +265,5 @@ export interface UniversalNavBarProps {
251
265
  * on the bar the word "Actions" drops and the pill is chevron + face, so the
252
266
  * product name keeps its room — see `showPillLabel`.
253
267
  */
254
- export declare function UniversalNavBar({ product, productLogo, productMark, companyLabel, companyIconUrl, newAssessmentHref, newAssessmentLabel, knowledgeBase, settingsHref, user, profileExtras, showLanguageSelector, appPreferences, about, onResetDefaults, themeStore, fixedColorScheme, appName, showAppPreferences, showGlobalPreferences, versionChip, suiteSwitcherIconSrc, hubSwitcher, showBrandStrip, theme, hubLoginHref, pricingHref: pricingHrefProp, contentMaxWidth, className, style, }: UniversalNavBarProps): import("react/jsx-runtime").JSX.Element;
268
+ export declare function UniversalNavBar({ product, productLogo, productMark, companyLabel, companyIconUrl, newAssessmentHref, newAssessmentLabel, knowledgeBase, settingsHref, user, profileExtras, showLanguageSelector, appPreferences, about, onResetDefaults, themeStore, fixedColorScheme, appName, showAppPreferences, showGlobalPreferences, versionChip, suiteSwitcherIconSrc, hubSwitcher, showBrandStrip, theme, hubLoginHref, pricingHref: pricingHrefProp, contentMaxWidth, phonePlacement, className, style, }: UniversalNavBarProps): import("react/jsx-runtime").JSX.Element;
255
269
  //# sourceMappingURL=UniversalNavBar.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"UniversalNavBar.d.ts","sourceRoot":"","sources":["../src/UniversalNavBar.tsx"],"names":[],"mappings":"AAEA,OAAO,EAA+B,KAAK,aAAa,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAMvF,OAAO,EAIL,KAAK,cAAc,EACpB,MAAM,oBAAoB,CAAA;AAE3B,OAAO,EAAO,KAAK,QAAQ,EAAE,MAAM,eAAe,CAAA;AAClD,OAAO,EAAqB,KAAK,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAClF,OAAO,EAAmD,KAAK,gBAAgB,EAAE,MAAM,kBAAkB,CAAA;AAKzG,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAA;AAO5D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAUjD,MAAM,WAAW,oBAAoB;IAEnC,2EAA2E;IAC3E,OAAO,EAAE,cAAc,CAAA;IACvB;;;;;;;;;;;;;;;;;;;;;;;;OAwBG;IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IACvB,2EAA2E;IAC3E,WAAW,EAAE,SAAS,CAAA;IAGtB,4EAA4E;IAC5E,YAAY,CAAC,EAAE,MAAM,CAAA;IACrB,+EAA+E;IAC/E,cAAc,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAG9B;;;OAGG;IACH,iBAAiB,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAEjC;;;;;;;OAOG;IACH,kBAAkB,CAAC,EAAE,MAAM,CAAA;IAE3B,kFAAkF;IAClF,aAAa,CAAC,EAAE;QACd,YAAY,CAAC,EAAG,iBAAiB,EAAE,CAAA;QACnC,aAAa,CAAC,EAAE,MAAM,CAAA;QACtB,YAAY,CAAC,EAAG,MAAM,CAAA;QACtB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IACH,WAAW,CAAC,EAAE,SAAS,CAAA;IAEvB;;;;;OAKG;IACH,oBAAoB,CAAC,EAAE,MAAM,CAAA;IAE7B;;;;;;OAMG;IACH,WAAW,CAAC,EAAE,OAAO,CAAA;IAErB,4DAA4D;IAC5D,cAAc,CAAC,EAAE,OAAO,CAAA;IAExB;;;;;;;;;;;;;;;;;;;;OAoBG;IACH,KAAK,CAAC,EAAE,QAAQ,CAAA;IAEhB;;;OAGG;IACH,YAAY,CAAC,EAAE,MAAM,CAAA;IAErB;;;;;;;;;;;;;;;;;;;;;OAqBG;IACH,WAAW,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAE3B;;;;;;;;OAQG;IACH,eAAe,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAEjC;;;;;;;;;;OAUG;IACH,cAAc,CAAC,EAAE,QAAQ,GAAG,KAAK,CAAA;IAGjC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,KAAK,CAAC,EAAM,aAAa,CAAA;CAC1B;AAMD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AACH,wBAAgB,eAAe,CAAC,EAC9B,OAAO,EACP,WAAW,EACX,WAAW,EACX,YAAY,EACZ,cAAc,EACd,iBAA0B,EAC1B,kBAAkB,EAClB,aAAa,EACb,YAAY,EACZ,IAAI,EACJ,aAAa,EACb,oBAA2B,EAC3B,cAAc,EACd,KAAK,EACL,eAAe,EACf,UAAU,EACV,gBAAgB,EAChB,OAAO,EACP,kBAAkB,EAClB,qBAAqB,EACrB,WAAW,EACX,oBAAoB,EACpB,WAAmB,EACnB,cAAqB,EACrB,KAAe,EACf,YAA+C,EAC/C,WAAW,EAAE,eAAe,EAC5B,eAAsB,EACtB,cAAyB,EACzB,SAAS,EACT,KAAK,GACN,EAAE,oBAAoB,2CA0ftB"}
@@ -48,6 +48,8 @@ const DEFAULT_PRICING_HREF = 'https://unisim.co.uk/subscription';
48
48
  * — the product's own name where "Universal Simulation" used to be, the
49
49
  * company's logo alone (no "for", no company name, and nothing at all when
50
50
  * there is no company), then the controls. Nothing lives under the bar.
51
+ * Since 0.222.0 that row is fixed to the BOTTOM of the screen by default and
52
+ * its panel opens upward (`phonePlacement`; BRANDING.md, 2026-11-19).
51
53
  *
52
54
  * The Actions pill carries the signed-in user's face (photo → initials →
53
55
  * rotating suite figure), the same `<ProfileAvatar />` the profile menu inside
@@ -55,7 +57,7 @@ const DEFAULT_PRICING_HREF = 'https://unisim.co.uk/subscription';
55
57
  * on the bar the word "Actions" drops and the pill is chevron + face, so the
56
58
  * product name keeps its room — see `showPillLabel`.
57
59
  */
58
- export function UniversalNavBar({ product, productLogo, productMark, companyLabel, companyIconUrl, newAssessmentHref = '/new', newAssessmentLabel, knowledgeBase, settingsHref, user, profileExtras, showLanguageSelector = true, appPreferences, about, onResetDefaults, themeStore, fixedColorScheme, appName, showAppPreferences, showGlobalPreferences, versionChip, suiteSwitcherIconSrc, hubSwitcher = false, showBrandStrip = true, theme = 'light', hubLoginHref = 'https://app.unisim.co.uk/login', pricingHref: pricingHrefProp, contentMaxWidth = 1280, className, style, }) {
60
+ export function UniversalNavBar({ product, productLogo, productMark, companyLabel, companyIconUrl, newAssessmentHref = '/new', newAssessmentLabel, knowledgeBase, settingsHref, user, profileExtras, showLanguageSelector = true, appPreferences, about, onResetDefaults, themeStore, fixedColorScheme, appName, showAppPreferences, showGlobalPreferences, versionChip, suiteSwitcherIconSrc, hubSwitcher = false, showBrandStrip = true, theme = 'light', hubLoginHref = 'https://app.unisim.co.uk/login', pricingHref: pricingHrefProp, contentMaxWidth = 1280, phonePlacement = 'bottom', className, style, }) {
59
61
  // ── Company label + icon ────────────────────────────────────────────────
60
62
  const { language } = useLanguage();
61
63
  // App / Global preferences, identical for the phone panel and the desktop
@@ -181,6 +183,30 @@ export function UniversalNavBar({ product, productLogo, productMark, companyLabe
181
183
  if (!isMobile)
182
184
  setMobileMenuOpen(false);
183
185
  }, [isMobile]);
186
+ // ── On a phone the bar sits at the bottom (BRANDING.md, 2026-11-19) ──────
187
+ // Fixed to the foot of the screen, so it takes no room in the flow: it
188
+ // publishes its height (home-indicator inset included) as --u-bar-bottom,
189
+ // which pads <body> (BAR_BOTTOM_CSS) and lifts a docked tab tray above it.
190
+ const atBottom = isMobile && phonePlacement === 'bottom';
191
+ useEffect(() => {
192
+ if (!atBottom)
193
+ return;
194
+ const el = mobileHeaderRef.current;
195
+ const root = document.documentElement;
196
+ if (!el)
197
+ return;
198
+ installBarBottomStyles();
199
+ const publish = () => root.style.setProperty('--u-bar-bottom', `${el.offsetHeight}px`);
200
+ publish();
201
+ root.setAttribute('data-u-bar-bottom', '');
202
+ const ro = new ResizeObserver(publish);
203
+ ro.observe(el);
204
+ return () => {
205
+ ro.disconnect();
206
+ root.removeAttribute('data-u-bar-bottom');
207
+ root.style.removeProperty('--u-bar-bottom');
208
+ };
209
+ }, [atBottom]);
184
210
  useEffect(() => {
185
211
  if (!mobileMenuOpen)
186
212
  return;
@@ -252,9 +278,11 @@ export function UniversalNavBar({ product, productLogo, productMark, companyLabe
252
278
  eyebrow: t(language, 'suite.portal_eyebrow'),
253
279
  title: t(language, 'suite.portal_title_apps'),
254
280
  } : undefined, collapseProductsLabel: hubSwitcher ? t(language, 'suite.assess_apps') : undefined, children: [isMobile && productMark ? productMark : productLogo, isMobile && productMark && _jsx(ProductLockup, { product: product, theme: theme })] }), isMobile && mobileCompanyBadge, !isMobile && hasCompany && (_jsxs(_Fragment, { children: [_jsx("span", { style: separatorStyle(theme), "aria-hidden": true, children: "\u00B7" }), _jsx("span", { style: { color: BAR[theme].faint, marginRight: 6 }, children: t(language, 'nav.for') }), _jsx(CompanyBadge, { iconUrl: resolvedIconUrl, initial: initial, iconBg: iconBg, hasOrg: !!org, theme: theme }), _jsx("span", { style: companyLabelStyle, children: _jsx("span", { style: { color: org?.name ? BAR[theme].text : BAR[theme].faint }, children: resolvedCompany }) })] }))] }));
255
- return (_jsxs("div", { className: className, style: style, children: [showBrandStrip && _jsx(UniversalBar, {}), isMobile ? (
281
+ return (_jsxs("div", { className: className, style: style, children: [showBrandStrip && !atBottom && _jsx(UniversalBar, {}), isMobile ? (
256
282
  // ── Mobile layout ─────────────────────────────────────────────────
257
- _jsxs("div", { ref: mobileHeaderRef, style: { ...headerOuterStyle(theme), position: 'relative' }, children: [_jsxs("header", { style: mobileHeaderInnerStyle, children: [identityBlock, _jsxs("div", { style: mobileActionsRowStyle, children: [_jsxs("button", { type: "button", "aria-label": mobileMenuOpen ? t(language, 'nav.menu_close') : t(language, 'nav.menu_open'), "aria-expanded": mobileMenuOpen, "aria-controls": "universal-mobile-menu", onClick: () => setMobileMenuOpen((v) => !v), style: actionsPillStyle(theme, mobileMenuOpen, showPillLabel), children: [showPillLabel && _jsx("span", { style: actionsPillLabelStyle, children: t(language, 'profile.actions') }), _jsx(Chevron, { open: mobileMenuOpen }), _jsx(ProfileAvatar, { photoUrl: resolvedUser.photoUrl, name: resolvedUser.name, initials: resolvedUser.initials, size: PROFILE_PILL_AVATAR, theme: theme })] }), _jsx(ChangelogMenu, { iconSrc: suiteSwitcherIconSrc, theme: theme })] })] }), _jsxs("div", { id: "universal-mobile-menu", role: "navigation", "aria-label": t(language, 'nav.menu_primary'), style: mobilePanelStyle(mobileMenuOpen, theme), children: [newAssessmentHref && (_jsx("a", { href: newAssessmentHref, style: mobileLinkRowStyle(theme), onClick: () => setMobileMenuOpen(false), children: newAssessmentLabel ?? t(language, 'nav.new_assessment') })), knowledgeBase && (_jsx("div", { style: mobileMenuWrapStyle(theme), children: _jsx(KnowledgeBaseMenu, { productItems: knowledgeBase.productItems, productKBHref: knowledgeBase.productKBHref, productLabel: knowledgeBase.productLabel, companyItems: knowledgeBase.companyItems, companyKBHref: knowledgeBase.companyKBHref, style: { display: 'block' }, triggerStyle: mobileMenuTriggerStyle(theme), theme: theme }) })), showPricing ? (_jsx("a", { href: pricingHref, style: mobileLinkRowStyle(theme), onClick: () => setMobileMenuOpen(false), children: t(language, 'nav.pricing') })) : showCompany ? (_jsx("div", { style: mobileMenuWrapStyle(theme), children: _jsx(CompanyMenu, { style: { display: 'block' }, triggerStyle: mobileMenuTriggerStyle(theme), theme: theme }) })) : null, _jsx("div", { style: mobileAccountStyle(theme), children: _jsx(UserProfile, { ...resolvedUser, inline: true, onClose: () => setMobileMenuOpen(false), appSettingsHref: resolvedUser.appSettingsHref ?? settingsHref, extras: resolvedUser.extras ?? profileExtras, showLanguageSelector: showLanguageSelector, tier: subscription?.tier, theme: theme, ...preferencesProps }) })] })] })) : (
283
+ // At the bottom (the default) the same bar, fixed to the foot of the
284
+ // screen with the brand strip along its top edge; the panel opens up.
285
+ _jsxs("div", { ref: mobileHeaderRef, "data-u-bar-placement": atBottom ? 'bottom' : 'top', style: atBottom ? barAtBottomStyle(theme) : { ...headerOuterStyle(theme), position: 'relative' }, children: [showBrandStrip && atBottom && _jsx(UniversalBar, {}), _jsxs("header", { style: mobileHeaderInnerStyle, children: [identityBlock, _jsxs("div", { style: mobileActionsRowStyle, children: [_jsxs("button", { type: "button", "aria-label": mobileMenuOpen ? t(language, 'nav.menu_close') : t(language, 'nav.menu_open'), "aria-expanded": mobileMenuOpen, "aria-controls": "universal-mobile-menu", onClick: () => setMobileMenuOpen((v) => !v), style: actionsPillStyle(theme, mobileMenuOpen, showPillLabel), children: [showPillLabel && _jsx("span", { style: actionsPillLabelStyle, children: t(language, 'profile.actions') }), _jsx(Chevron, { open: atBottom ? !mobileMenuOpen : mobileMenuOpen }), _jsx(ProfileAvatar, { photoUrl: resolvedUser.photoUrl, name: resolvedUser.name, initials: resolvedUser.initials, size: PROFILE_PILL_AVATAR, theme: theme })] }), _jsx(ChangelogMenu, { iconSrc: suiteSwitcherIconSrc, theme: theme })] })] }), _jsxs("div", { id: "universal-mobile-menu", role: "navigation", "aria-label": t(language, 'nav.menu_primary'), style: mobilePanelStyle(mobileMenuOpen, theme, atBottom), children: [newAssessmentHref && (_jsx("a", { href: newAssessmentHref, style: mobileLinkRowStyle(theme), onClick: () => setMobileMenuOpen(false), children: newAssessmentLabel ?? t(language, 'nav.new_assessment') })), knowledgeBase && (_jsx("div", { style: mobileMenuWrapStyle(theme), children: _jsx(KnowledgeBaseMenu, { productItems: knowledgeBase.productItems, productKBHref: knowledgeBase.productKBHref, productLabel: knowledgeBase.productLabel, companyItems: knowledgeBase.companyItems, companyKBHref: knowledgeBase.companyKBHref, style: { display: 'block' }, triggerStyle: mobileMenuTriggerStyle(theme), theme: theme }) })), showPricing ? (_jsx("a", { href: pricingHref, style: mobileLinkRowStyle(theme), onClick: () => setMobileMenuOpen(false), children: t(language, 'nav.pricing') })) : showCompany ? (_jsx("div", { style: mobileMenuWrapStyle(theme), children: _jsx(CompanyMenu, { style: { display: 'block' }, triggerStyle: mobileMenuTriggerStyle(theme), theme: theme }) })) : null, _jsx("div", { style: mobileAccountStyle(theme), children: _jsx(UserProfile, { ...resolvedUser, inline: true, onClose: () => setMobileMenuOpen(false), appSettingsHref: resolvedUser.appSettingsHref ?? settingsHref, extras: resolvedUser.extras ?? profileExtras, showLanguageSelector: showLanguageSelector, tier: subscription?.tier, theme: theme, ...preferencesProps }) })] })] })) : (
258
286
  // ── Desktop layout ────────────────────────────────────────────────
259
287
  // The ChangelogMenu is intentionally lifted out of the inner row and
260
288
  // pinned to the viewport's right edge (outside the maxWidth content
@@ -538,6 +566,8 @@ function ProductLockup({ product, theme }) {
538
566
  _jsxs("span", { style: lockupStyle, "aria-label": name, children: [_jsx("span", { "aria-hidden": true, style: lockupNameStyle(theme), children: head ?? name }), head && _jsx("span", { "aria-hidden": true, style: lockupFamilyStyle(theme), children: "Assess" })] }));
539
567
  }
540
568
  /** The ⌄ on the Actions pill. Mirrors the Apps bar's. */
569
+ // `open` flips it to point up. A bar at the bottom passes the opposite, so the
570
+ // arrow points the way its panel opens (up) and turns down to close it.
541
571
  function Chevron({ open }) {
542
572
  return (_jsx("svg", { width: "12", height: "12", viewBox: "0 0 16 16", fill: "none", stroke: "currentColor", strokeWidth: "2", "aria-hidden": true, style: { transition: 'transform 160ms', transform: open ? 'rotate(180deg)' : undefined, flexShrink: 0 }, children: _jsx("path", { d: "m4 6 4 4 4-4", strokeLinecap: "round", strokeLinejoin: "round" }) }));
543
573
  }
@@ -644,24 +674,64 @@ const mobileHeaderInnerStyle = {
644
674
  minHeight: 56,
645
675
  boxSizing: 'border-box',
646
676
  };
647
- function mobilePanelStyle(open, theme) {
677
+ function mobilePanelStyle(open, theme, up = false) {
648
678
  return {
649
679
  position: 'absolute',
650
- top: '100%',
680
+ // A bar at the foot of the screen opens its panel UP, the account rows
681
+ // nearest the thumb; it scrolls rather than running off the top.
682
+ ...(up
683
+ ? {
684
+ bottom: '100%',
685
+ borderTop: `1px solid ${BAR[theme].panelBorder}`,
686
+ maxHeight: 'calc(100dvh - 72px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px))',
687
+ overflowY: 'auto',
688
+ overscrollBehavior: 'contain',
689
+ }
690
+ : { top: '100%', borderBottom: `1px solid ${BAR[theme].panelBorder}` }),
651
691
  left: 0,
652
692
  right: 0,
653
693
  background: BAR[theme].panelBg,
654
- borderBottom: `1px solid ${BAR[theme].panelBorder}`,
655
694
  boxShadow: BAR[theme].panelShadow,
656
695
  opacity: open ? 1 : 0,
657
696
  visibility: open ? 'visible' : 'hidden',
658
- transform: open ? 'translateY(0)' : 'translateY(-6px)',
697
+ transform: open ? 'translateY(0)' : `translateY(${up ? 6 : -6}px)`,
659
698
  transition: 'opacity 160ms cubic-bezier(0.16,1,0.3,1), transform 160ms cubic-bezier(0.16,1,0.3,1), visibility 160ms',
660
699
  zIndex: 1000,
661
- overflow: 'visible',
700
+ ...(up ? null : { overflow: 'visible' }),
662
701
  fontFamily: "'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif",
663
702
  };
664
703
  }
704
+ /**
705
+ * The phone bar at the foot of the screen (BRANDING.md, 2026-11-19): the
706
+ * same surface, fixed, its rule on top instead of underneath, and padded over
707
+ * the home indicator so its background runs to the screen edge.
708
+ */
709
+ function barAtBottomStyle(theme) {
710
+ return {
711
+ ...headerOuterStyle(theme),
712
+ position: 'fixed',
713
+ left: 0,
714
+ right: 0,
715
+ bottom: 0,
716
+ borderBottom: 'none',
717
+ borderTop: `1px solid ${BAR[theme].border}`,
718
+ paddingBottom: 'env(safe-area-inset-bottom, 0px)',
719
+ paddingLeft: 'env(safe-area-inset-left, 0px)',
720
+ paddingRight: 'env(safe-area-inset-right, 0px)',
721
+ boxShadow: '0 -1px 12px rgba(15, 23, 42, 0.06)',
722
+ };
723
+ }
724
+ /** Pads the page by the bottom bar's height on a phone (`--u-bar-bottom`). */
725
+ const BAR_BOTTOM_STYLE_ID = 'unisim-bar-bottom-css';
726
+ const BAR_BOTTOM_CSS = `@media (max-width: 767.98px) { html[data-u-bar-bottom] body { padding-bottom: var(--u-bar-bottom, 0px); } }`;
727
+ function installBarBottomStyles() {
728
+ if (typeof document === 'undefined' || document.getElementById(BAR_BOTTOM_STYLE_ID))
729
+ return;
730
+ const el = document.createElement('style');
731
+ el.id = BAR_BOTTOM_STYLE_ID;
732
+ el.textContent = BAR_BOTTOM_CSS;
733
+ document.head.appendChild(el);
734
+ }
665
735
  const mobileLinkRowStyle = (theme) => ({
666
736
  display: 'block',
667
737
  padding: '14px 20px',