@hanzo/ui 8.29.11 → 8.29.13

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.
@@ -7,47 +7,90 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
7
7
  * nothing from an ad platform, no Google, and no event on our own stream before
8
8
  * Accept, and Google Consent Mode v2 starts denied.
9
9
  *
10
- * - every visitor, wherever they are, is asked: a banner with Accept all,
11
- * Reject all and Choose, until they have chosen. Nothing optional loads first.
10
+ * - every visitor, wherever they are, is asked: a bar with Manage preferences,
11
+ * Accept all and a ×, until they have chosen. Nothing optional loads first.
12
+ * - the bar's × is a choice, not a dismissal: it stores essential cookies only
13
+ * and closes, so refusing is one press, exactly as accepting is.
14
+ * - Manage preferences opens the Cookie Preferences sheet: a modal with one
15
+ * section per category, Strictly Necessary always on, the rest switches that
16
+ * start off until chosen, and the policy links.
12
17
  * - Global Privacy Control or Do Not Track is the visitor's answer already: they
13
18
  * are not asked, nothing optional runs, and the switches are locked off.
14
- * - cloud serves the policy with the site's tag config; the banner redraws when
15
- * it arrives, and asks again when the policy version changes.
19
+ * - cloud serves the policy with the site's tag config; the bar redraws when it
20
+ * arrives, and asks again when the policy version changes.
16
21
  *
17
- * `Consent` mounts once near the root; `ConsentLink` goes wherever a footer
18
- * link goes and opens the panel from anywhere. `brand` names who is asking.
22
+ * `Consent` mounts once near the root. `openConsent()`, `ConsentLink` and any
23
+ * link to `#choices` (the footer's Privacy choices) open the sheet from anywhere.
24
+ * `brand` names who is asking; `cookies`, `privacy` and `terms` are the brand's
25
+ * own policies.
19
26
  */
20
- import { Paragraph, XStack, YStack } from '@hanzo/gui';
21
- import { acceptAll, asks, declined, POLICY_EVENT, readConsent, rejectAll, saveConsent } from '@hanzo/event';
22
- import { useEffect, useRef, useState } from 'react';
27
+ import { Paragraph, Text, XStack, YStack } from '@hanzo/gui';
28
+ import { ChevronDown, X } from '@hanzogui/lucide-icons-2';
29
+ import { acceptAll, asks, declined, POLICY_EVENT, readConsent, rejectAll, saveConsent, storedConsent } from '@hanzo/event';
30
+ import { useEffect, useId, useRef, useState } from 'react';
23
31
  import { Button } from '../backends/gui/button.js';
32
+ import { align } from '../backends/gui/dir.js';
24
33
  import { Switch } from '../backends/gui/switch.js';
25
34
  import { slot } from '../backends/gui/slot.js';
26
35
  const OPEN = 'hzconsent-open';
36
+ /** The address that opens the sheet, from any link on any page. */
37
+ const HASH = '#choices';
27
38
  /** Opens the choices from anywhere. */
28
39
  export const openConsent = () => {
29
40
  if (typeof window !== 'undefined')
30
41
  window.dispatchEvent(new Event(OPEN));
31
42
  };
32
43
  const kinds = (brand) => [
33
- { key: 'analytics', title: 'Analytics', body: `Counts visits and finds what is broken, so ${brand} can get better.` },
34
- { key: 'marketing', title: 'Marketing', body: 'Lets ad platforms measure the sign-ups and orders their ads led to.' },
35
- { key: 'ads', title: 'Personalized ads', body: 'Lets those platforms use your visit to show you ads elsewhere.' },
44
+ {
45
+ id: 'necessary',
46
+ title: 'Strictly Necessary Cookies',
47
+ body: 'These cookies are needed for the site to work, so they are always on. They keep you signed in and your session secure, protect forms against cross-site request forgery, spread traffic across servers, remember the choice you make here, and keep what you have typed into a form. They are not used to track you, and they store no personally identifiable tracking information.',
48
+ },
49
+ {
50
+ id: 'analytics',
51
+ key: 'analytics',
52
+ title: 'Performance Cookies',
53
+ body: `These cookies count visits and where they come from, so ${brand} can measure and improve how the site performs: which pages are used most and least, how visitors move around, and what is broken. What they collect is aggregated.`,
54
+ },
55
+ {
56
+ id: 'marketing',
57
+ key: 'marketing',
58
+ title: 'Marketing Cookies',
59
+ body: `These cookies let advertising platforms measure the sign-ups and orders their ads led to, so ${brand} can tell which ads work. The platforms set them through this site, and they remember the ad you arrived from.`,
60
+ },
61
+ {
62
+ id: 'ads',
63
+ key: 'ads',
64
+ title: 'Sell, Share, or Use Your Data for Targeted Advertising',
65
+ body: 'Some US state privacy laws treat letting advertising platforms use what they learn from your visit to show you ads on other sites and apps as a “sale” or “sharing” of your personal information, or as “targeted advertising”, and give you the right to opt out. On, those platforms may use your visit to choose the ads you see elsewhere. It stays off unless you turn it on; to opt out, move this toggle to the left and select Save preferences.',
66
+ },
36
67
  ];
37
- /** The banner's inset from the window's foot and sides: 16px, or the device's inset and 8px where that is wider. */
68
+ /** The bar's and the sheet's inset from the window's edges: 16px, or the device's inset and 8px where that is wider. */
38
69
  const EDGE = {
70
+ top: 'max(16px, calc(var(--safe-top, env(safe-area-inset-top, 0px)) + 8px))',
39
71
  bottom: 'max(16px, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 8px))',
40
72
  left: 'max(16px, calc(var(--safe-left, env(safe-area-inset-left, 0px)) + 8px))',
41
73
  right: 'max(16px, calc(var(--safe-right, env(safe-area-inset-right, 0px)) + 8px))',
42
74
  };
75
+ /** The panel both wear: the card's ground, edge, corner (`$6`, the sign-in card's) and floating shadow. */
76
+ const PANEL = {
77
+ bg: '$background',
78
+ borderWidth: 1,
79
+ borderColor: '$borderColor',
80
+ rounded: '$6',
81
+ shadowColor: 'rgba(0,0,0,0.25)',
82
+ shadowRadius: 24,
83
+ shadowOffset: { width: 0, height: 8 },
84
+ };
43
85
  /**
44
- * Where the banner sits: fixed to the foot of the window, clear of the home
86
+ * Where the bar sits: fixed to the foot of the window, clear of the home
45
87
  * indicator and the notch, centred. It stands on design's banner rung
46
88
  * (`--z-banner`): over the page and its dock, under every overlay — a dialog, a
47
89
  * menu, a phone drawer — and is answered once they close.
48
90
  */
49
91
  const frame = {
50
92
  ...slot('consent'),
93
+ ...PANEL,
51
94
  role: 'dialog',
52
95
  'aria-label': 'Cookie preferences',
53
96
  position: 'fixed',
@@ -56,46 +99,166 @@ const frame = {
56
99
  r: EDGE.right,
57
100
  mx: 'auto',
58
101
  z: 'var(--z-banner, 50)',
59
- py: '$2.5',
60
- px: '$3.5',
61
- rounded: '$5',
62
- borderWidth: 1,
63
- borderColor: '$borderColor',
64
- bg: '$background',
65
- shadowColor: 'rgba(0,0,0,0.25)',
66
- shadowRadius: 24,
67
- shadowOffset: { width: 0, height: 8 },
102
+ py: '$3',
103
+ paddingInlineStart: '$4',
104
+ // Clear of the × in the corner: its 32px, and 12px either side.
105
+ paddingInlineEnd: 56,
68
106
  };
69
107
  /** The bar is as wide as its line and buttons, up to the window less its inset. */
70
108
  const FIT = { width: 'fit-content' };
71
- /** A link in the banner's line: the line's own ink, underlined, never broken across lines. */
109
+ /** The one filled control in the bar and in the sheet: the ink, as the sign-in card's Continue. */
110
+ const ACT = { bg: '$ink', color: '$background', borderColor: '$ink', hoverStyle: { opacity: 0.92 } };
111
+ /** A link in the sheet's intro: the line's own ink, underlined, never broken across lines. */
72
112
  const INLINE = { color: 'inherit', textDecoration: 'underline', whiteSpace: 'nowrap' };
73
- const Consent = ({ privacy = 'https://hanzo.ai/privacy', brand = 'Hanzo' }) => {
113
+ /** The sheet covers the window, on design's modal rung, over a scrim of its own. */
114
+ const COVER = { position: 'fixed', t: 0, r: 0, b: 0, l: 0 };
115
+ /** What Tab may land on inside the sheet. */
116
+ const FOCUSABLE = 'a[href], button:not([disabled]), [tabindex]:not([tabindex="-1"])';
117
+ /** A section's button never submits a form the sheet sits in. gui's stack props do not name `type`. */
118
+ const BUTTON = { type: 'button' };
119
+ const Consent = ({ cookies = 'https://hanzo.ai/cookies', privacy = 'https://hanzo.ai/privacy', terms = 'https://hanzo.ai/terms', brand = 'Hanzo', }) => {
74
120
  const [shown, setShown] = useState(false);
75
121
  const [choosing, setChoosing] = useState(false);
76
122
  const [draft, setDraft] = useState({ analytics: false, marketing: false, ads: false });
123
+ const [expanded, setExpanded] = useState({});
77
124
  // The choices are open because the visitor asked for them. A policy that
78
125
  // arrives after (cloud answers ~150ms into a page opened at #choices) redraws
79
- // the banner's question, and must not close what was asked for.
126
+ // the bar's question, and must not close what was asked for.
80
127
  const asked = useRef(false);
81
- // The browser refused, as the page sees it or as cloud saw the request.
82
- const locked = typeof window !== 'undefined' && declined();
128
+ // What had focus when the sheet opened, given it back when the sheet closes.
129
+ const back = useRef(null);
130
+ const sheet = useRef(null);
131
+ const manage = useRef(null);
132
+ const opened = useRef(false);
133
+ // The switches were filled from a stored choice, not left off.
134
+ const seeded = useRef(false);
135
+ const id = useId();
136
+ // The browser refused, as the page sees it or as cloud saw the request. State,
137
+ // so cloud's answer redraws an open sheet.
138
+ const [locked, setLocked] = useState(false);
139
+ const choose = () => {
140
+ // Already open: the visitor's unsaved switches and the focus to return stay as they are.
141
+ if (asked.current)
142
+ return;
143
+ const at = document.activeElement;
144
+ back.current = at instanceof HTMLElement && at !== document.body ? at : null;
145
+ asked.current = true;
146
+ setLocked(declined());
147
+ seeded.current = storedConsent();
148
+ setDraft(readConsent());
149
+ setChoosing(true);
150
+ setShown(true);
151
+ };
152
+ // Closing without a choice: a visitor who has not chosen is asked again by the bar.
153
+ const close = () => {
154
+ asked.current = false;
155
+ setChoosing(false);
156
+ setShown(asks());
157
+ };
83
158
  useEffect(() => {
84
- const sync = () => setShown(asks() || asked.current);
159
+ const sync = () => {
160
+ setShown(asks() || asked.current);
161
+ setLocked(declined());
162
+ // A policy version the stored choice was not made under: the switches the
163
+ // sheet opened with were an old grant, and are off until chosen again.
164
+ if (asked.current && seeded.current && !storedConsent()) {
165
+ seeded.current = false;
166
+ setDraft(readConsent());
167
+ }
168
+ };
85
169
  sync();
86
- const open = () => {
87
- asked.current = true;
88
- setDraft(readConsent());
89
- setChoosing(true);
90
- setShown(true);
170
+ // `#choices` opens the sheet: on arrival, on a hash change, and on a press of
171
+ // any link on this site to it, so the footer's Privacy choices and a link in
172
+ // a page are the same control.
173
+ const hash = () => {
174
+ if (window.location.hash !== HASH)
175
+ return;
176
+ // The router's own entry state is kept: only the address loses its hash. A
177
+ // microtask, so a router that wraps replaceState in its own mount effect
178
+ // (Next's, which runs after this child's) records the address without it.
179
+ queueMicrotask(() => history.replaceState(history.state, '', window.location.pathname + window.location.search));
180
+ choose();
181
+ };
182
+ // A plain press only: a modified one (new tab, new window) keeps the browser's
183
+ // meaning, and the page it opens at #choices opens the sheet on arrival.
184
+ const press = (e) => {
185
+ if (e.defaultPrevented || e.button !== 0 || e.metaKey || e.ctrlKey || e.shiftKey || e.altKey)
186
+ return;
187
+ // The attribute, not `.href`: an SVG link's `.href` is not a string.
188
+ const a = e.target?.closest?.('a[href]');
189
+ const href = a?.getAttribute('href');
190
+ const target = a?.getAttribute('target');
191
+ if (!href || a?.hasAttribute('download') || (target && target !== '_self'))
192
+ return;
193
+ let to;
194
+ try {
195
+ to = new URL(href, document.baseURI);
196
+ }
197
+ catch {
198
+ return;
199
+ }
200
+ if (to.hash !== HASH || to.origin !== window.location.origin)
201
+ return;
202
+ e.preventDefault();
203
+ choose();
91
204
  };
92
- window.addEventListener(OPEN, open);
205
+ hash();
206
+ window.addEventListener(OPEN, choose);
93
207
  window.addEventListener(POLICY_EVENT, sync);
208
+ window.addEventListener('hashchange', hash);
209
+ document.addEventListener('click', press, { capture: true });
94
210
  return () => {
95
- window.removeEventListener(OPEN, open);
211
+ window.removeEventListener(OPEN, choose);
96
212
  window.removeEventListener(POLICY_EVENT, sync);
213
+ window.removeEventListener('hashchange', hash);
214
+ document.removeEventListener('click', press, { capture: true });
97
215
  };
98
216
  }, []);
217
+ // Focus moves into the sheet when it opens, stays inside it while it is open,
218
+ // and returns to what opened it (or the bar's Manage preferences) when it closes.
219
+ useEffect(() => {
220
+ if (!choosing) {
221
+ if (!opened.current)
222
+ return;
223
+ opened.current = false;
224
+ const el = back.current;
225
+ back.current = null;
226
+ if (el?.isConnected)
227
+ el.focus();
228
+ else
229
+ manage.current?.focus();
230
+ return;
231
+ }
232
+ opened.current = true;
233
+ const all = () => [...(sheet.current?.querySelectorAll(FOCUSABLE) ?? [])];
234
+ all()[0]?.focus();
235
+ const keys = (e) => {
236
+ if (e.key === 'Escape') {
237
+ e.preventDefault();
238
+ close();
239
+ return;
240
+ }
241
+ if (e.key !== 'Tab')
242
+ return;
243
+ const list = all();
244
+ const first = list[0];
245
+ const last = list[list.length - 1];
246
+ if (!first || !last)
247
+ return;
248
+ const at = document.activeElement;
249
+ const inside = !!at && !!sheet.current?.contains(at);
250
+ if (e.shiftKey && (at === first || !inside)) {
251
+ e.preventDefault();
252
+ last.focus();
253
+ }
254
+ else if (!e.shiftKey && (at === last || !inside)) {
255
+ e.preventDefault();
256
+ first.focus();
257
+ }
258
+ };
259
+ document.addEventListener('keydown', keys);
260
+ return () => document.removeEventListener('keydown', keys);
261
+ }, [choosing]);
99
262
  if (!shown)
100
263
  return null;
101
264
  const done = (fn) => () => {
@@ -104,21 +267,18 @@ const Consent = ({ privacy = 'https://hanzo.ai/privacy', brand = 'Hanzo' }) => {
104
267
  setShown(false);
105
268
  setChoosing(false);
106
269
  };
107
- const choose = () => {
108
- asked.current = true;
109
- setDraft(readConsent());
110
- setChoosing(true);
111
- setShown(true);
112
- };
113
270
  if (choosing)
114
- return (_jsxs(YStack, { ...frame, maxW: 440, gap: "$3", maxH: `calc(100dvh - var(--safe-top, env(safe-area-inset-top, 0px)) - var(--header, 0px) - ${EDGE.bottom} - 16px)`, overflowY: "auto", children: [_jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: [`Choose what ${brand} may measure and share. You can change this at any time. `, _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$soft", m: 0, children: "Your browser asks sites not to track you, so all of these stay off." })) : null, kinds(brand).map((k) => {
115
- const off = locked;
116
- return (_jsxs(XStack, { gap: "$3", items: "center", justify: "space-between", children: [_jsxs(YStack, { flex: 1, children: [_jsx(Paragraph, { size: "$2", color: "$ink", fontWeight: "500", m: 0, children: k.title }), _jsx(Paragraph, { size: "$1", color: "$soft", m: 0, children: k.body })] }), _jsx(Switch, { "aria-label": k.title, disabled: off, checked: off ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })] }, k.key));
117
- }), _jsxs(XStack, { gap: "$2", justify: "flex-end", children: [_jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(() => saveConsent(draft)), children: "Save choices" })] })] }));
118
- // One bar: the line and its link, then the buttons. They share a row where
119
- // the line fits beside them and the buttons drop under it where it does not,
120
- // so a phone shows the line over one row of buttons and nothing breaks mid-control.
121
- return (_jsxs(XStack, { ...frame, style: FIT, maxW: 960, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$2", children: [_jsx(YStack, { shrink: 1, minW: 0, children: _jsxs(Paragraph, { size: "$2", color: "$ink", m: 0, children: ['Cookies measure visits and ads once you accept. ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy policy" })] }) }), _jsxs(XStack, { gap: "$2", marginInlineStart: "auto", items: "center", children: [_jsx(Button, { type: "button", size: "sm", variant: "link", onClick: choose, children: "Choose" }), _jsx(Button, { type: "button", size: "sm", variant: "secondary", onClick: done(rejectAll), children: "Reject all" }), _jsx(Button, { type: "button", size: "sm", onClick: done(acceptAll), children: "Accept all" })] })] }));
271
+ return (_jsxs(YStack, { ...slot('consent-sheet'), ...COVER, z: "var(--z-modal, 600)", items: "center", justify: "center",
272
+ // The device's insets are physical sides, so the shorthand names them in order.
273
+ style: { padding: `${EDGE.top} ${EDGE.right} ${EDGE.bottom} ${EDGE.left}` }, children: [_jsx(YStack, { ...COVER, position: "absolute", z: 0, bg: "rgba(0,0,0,0.6)", "aria-hidden": true, onPress: close }), _jsxs(YStack, { ...slot('consent'), ...PANEL, ref: sheet, role: "dialog", "aria-modal": true, "aria-labelledby": `${id}-title`, position: "relative", width: "100%", maxW: 560, maxH: "100%", overflow: "hidden", children: [_jsxs(XStack, { items: "center", justify: "space-between", gap: "$3", pt: "$5", pb: "$3", paddingInlineStart: "$5", paddingInlineEnd: "$4", children: [_jsx(Text, { render: "h2", id: `${id}-title`, m: 0, fontSize: "$6", lineHeight: "$6", fontWeight: "600", color: "$ink", children: "Cookie Preferences" }), _jsx(Button, { type: "button", size: "icon-sm", variant: "ghost", "aria-label": "Close", onClick: close, children: _jsx(X, { size: 16 }) })] }), _jsxs(YStack, { shrink: 1, minH: 0, overflowY: "auto", px: "$5", pb: "$2", style: { overscrollBehavior: 'contain' }, children: [_jsxs(Paragraph, { size: "$2", color: "$aside", m: 0, pb: "$3", children: ['We use cookies and similar technologies to provide our services, measure performance, and support advertising. Essential cookies are required for the site to work and cannot be turned off. You can allow or reject optional cookies below. Learn more in our ', _jsx("a", { href: cookies, style: INLINE, children: "Cookie Policy" }), ', ', _jsx("a", { href: privacy, style: INLINE, children: "Privacy Policy" }), ', and ', _jsx("a", { href: terms, style: INLINE, children: "Terms of Service" }), "."] }), locked ? (_jsx(Paragraph, { size: "$2", color: "$ink", m: 0, pb: "$3", children: "Your browser asks sites not to track you, so all of these stay off." })) : null, kinds(brand).map((k) => {
274
+ const open = expanded[k.id] === true;
275
+ const body = `${id}-${k.id}`;
276
+ return (_jsxs(YStack, { ...slot('consent-section'), borderTopWidth: 1, borderColor: "$borderColor", children: [_jsxs(XStack, { items: "center", gap: "$3", minH: 52, py: "$2", children: [_jsx(XStack, { render: "h3", flex: 1, minW: 0, m: 0, children: _jsxs(XStack, { render: "button", ...BUTTON, "aria-expanded": open, "aria-controls": body, onPress: () => setExpanded({ ...expanded, [k.id]: !open }), flex: 1, minW: 0, items: "center", gap: "$2", p: 0, bg: "transparent", borderWidth: 0, cursor: "pointer", children: [_jsx(XStack, { shrink: 0, rotate: open ? '180deg' : '0deg', opacity: 0.7, children: _jsx(ChevronDown, { size: 16 }) }), _jsx(Text, { fontSize: "$3", lineHeight: "$3", fontWeight: "600", color: "$ink", ...align('start'), children: k.title })] }) }), k.key ? (_jsx(Switch, { "aria-label": k.title, "aria-describedby": body, disabled: locked, checked: locked ? false : draft[k.key], onCheckedChange: (v) => setDraft({ ...draft, [k.key]: v === true }) })) : (_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", whiteSpace: "nowrap", children: "Always Active" }))] }), _jsx(YStack, { id: body, display: open ? 'flex' : 'none', pb: "$3", paddingInlineStart: 24, children: _jsx(Paragraph, { size: "$2", color: "$aside", m: 0, children: k.body }) })] }, k.id));
277
+ })] }), _jsxs(XStack, { flexWrap: "wrap", gap: "$2", px: "$5", py: "$4", borderTopWidth: 1, borderColor: "$borderColor", children: [locked ? null : (_jsx(Button, { type: "button", variant: "secondary", grow: 1, onClick: done(acceptAll), children: "Accept all" })), _jsx(Button, { type: "button", ...ACT, grow: 1, onClick: done(() => saveConsent(draft)), children: "Save preferences" })] })] })] }));
278
+ // One bar: the line, then the buttons. They share a row where the line fits
279
+ // beside them and the buttons drop under it where it does not, so a phone shows
280
+ // the line over one row of buttons and nothing breaks mid-control.
281
+ return (_jsxs(XStack, { ...frame, style: FIT, maxW: 1200, flexWrap: "wrap", items: "center", columnGap: "$4", rowGap: "$3", children: [_jsx(YStack, { shrink: 1, minW: 0, children: _jsx(Paragraph, { size: "$2", color: "$ink", m: 0, children: `Essential cookies keep ${brand} running. With your OK, optional cookies help us measure performance and ads.` }) }), _jsxs(XStack, { gap: "$2", marginInlineStart: "auto", items: "center", flexWrap: "wrap", children: [_jsx(Button, { ref: manage, type: "button", size: "sm", variant: "secondary", onClick: choose, children: "Manage preferences" }), _jsx(Button, { type: "button", size: "sm", ...ACT, onClick: done(acceptAll), children: "Accept all" })] }), _jsx(Button, { type: "button", size: "icon-sm", variant: "ghost", "aria-label": "Close and use essential cookies only", position: "absolute", t: "$3", insetInlineEnd: "$3", onClick: done(rejectAll), children: _jsx(X, { size: 16 }) })] }));
122
282
  };
123
283
  /** The footer link that reopens the choices, in every footer and every region. */
124
284
  const ConsentLink = ({ label = 'Cookie settings' }) => (_jsx(Button, { ...slot('consent-link'), type: "button", variant: "link", size: "sm", px: 0, minH: 0, onClick: openConsent, children: label }));
@@ -1 +1 @@
1
- {"version":3,"file":"Consent.js","sourceRoot":"","sources":["../../src/consent/Consent.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;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AO,EAAC,OAAO,gBACJ,sCAAsC,EACjD,QAAQ,EAAC,UAAU,EACnB,CAAC,EAAC,IAAI,EACN,cAAc,EAAC,IAAI,EACnB,OAAO,EAAE,IAAI,CAAC,SAAS,CAAC,YAExB,KAAC,CAAC,IAAC,IAAI,EAAE,EAAE,GAAI,GACR,IACF,CACV,CAAA;AACH,CAAC,CAAA;AAED,kFAAkF;AAClF,MAAM,WAAW,GAAG,CAAC,EAAE,KAAK,GAAG,iBAAiB,EAAsB,EAAE,EAAE,CAAC,CACzE,KAAC,MAAM,OAAK,IAAI,CAAC,cAAc,CAAC,EAAE,IAAI,EAAC,QAAQ,EAAC,OAAO,EAAC,MAAM,EAAC,IAAI,EAAC,IAAI,EAAC,EAAE,EAAE,CAAC,EAAE,IAAI,EAAE,CAAC,EAAE,OAAO,EAAE,WAAW,YAC1G,KAAK,GACC,CACV,CAAA;AAED,OAAO,EAAE,OAAO,EAAE,WAAW,EAAE,CAAA"}
@@ -15,11 +15,12 @@ const jsx_runtime_1 = require("react/jsx-runtime");
15
15
  * A small `?` sits at the bottom START corner of the window (bottom-left in a
16
16
  * left-to-right page, bottom-right in a right-to-left one), clear of the notch
17
17
  * and the home indicator. Pressing it opens one card that opens toward the
18
- * inside: the host's help links first, then Theme, Language and Currency. The
19
- * three settings a visitor is most likely to want are where they look when they
20
- * want the page to explain itself, on every surface, in the same place.
18
+ * inside: the host's help links first, then Theme, Language, Font (and Arabic
19
+ * font, on a page in Arabic script) and Currency. The settings a visitor is most
20
+ * likely to want are where they look when they want the page to explain itself,
21
+ * on every surface, in the same place.
21
22
  *
22
- * Theme is the library's own: `@hanzo/appearance`, written through `<Hanzo>`'s
23
+ * Theme and the faces are the library's own: `@hanzo/appearance`, written through `<Hanzo>`'s
23
24
  * resolved stack when there is one (`Look`), so it is stored, painted before
24
25
  * first paint and carried across origins exactly as the settings panel does.
25
26
  * Language and currency are the HOST's — this package depends on no i18n or
@@ -50,6 +51,8 @@ const Filters_1 = require("../product/Filters.cjs");
50
51
  const instrument_1 = require("../product/instrument.cjs");
51
52
  const look_1 = require("../look.cjs");
52
53
  const logic_1 = require("./logic.cjs");
54
+ /** The rows that open a list, in the order the card draws them. */
55
+ const LISTS = ['language', 'font', 'arabic', 'currency'];
53
56
  /**
54
57
  * The trigger's distance from the window's foot and its start edge: 10px, or the
55
58
  * device's inset and 4px where that is wider. A right-to-left page puts the
@@ -70,29 +73,30 @@ const MOVES = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End', 'PageDown', 'PageU
70
73
  /** Everything in the card the arrow keys step through, in document order. */
71
74
  const STOPS = '[data-corner-stop], [data-slot="segmented-item"][data-state="checked"]';
72
75
  /**
73
- * The theme, as the person chose it, and the one way to change it.
76
+ * One appearance axis — theme, face or Arabic face — as the person chose it,
77
+ * and the one way to change it.
74
78
  *
75
79
  * Under `<Hanzo>` it writes through the root's `useAppearance` (its org,
76
80
  * install and account layers). Under a host's own gui provider it writes the
77
81
  * device's layer and repaints the resolved stack, which is what `useAppearance`
78
- * would do there. Nobody chose yet: the row marks what the document shows.
82
+ * would do there. Nobody chose yet: undefined, and the row says what the
83
+ * document shows.
79
84
  */
80
- function useTheme() {
85
+ function useAxis(axis) {
81
86
  const look = (0, react_1.useContext)(look_1.Look);
82
- const ground = (0, appearance_1.useScheme)();
83
87
  const [own, setOwn] = (0, react_1.useState)(undefined);
84
88
  (0, react_1.useEffect)(() => {
85
89
  if (!look)
86
- setOwn((0, appearance_1.read)().theme);
87
- }, [look]);
88
- const set = (0, react_1.useCallback)((theme) => {
90
+ setOwn((0, appearance_1.read)()[axis]);
91
+ }, [look, axis]);
92
+ const set = (0, react_1.useCallback)((value) => {
89
93
  if (look)
90
- return look.set({ theme });
91
- (0, appearance_1.write)({ ...(0, appearance_1.read)(), theme });
94
+ return look.set({ [axis]: value });
95
+ (0, appearance_1.write)({ ...(0, appearance_1.read)(), [axis]: value });
92
96
  (0, appearance_1.apply)((0, appearance_1.current)().pref);
93
- setOwn(theme);
94
- }, [look]);
95
- return [(look ? look.pref.theme : own) ?? ground, set];
97
+ setOwn(value);
98
+ }, [look, axis]);
99
+ return [look ? look.pref[axis] : own, set];
96
100
  }
97
101
  function Corner({ help = [], language, currency, words }) {
98
102
  const w = { ...logic_1.WORDS, ...words };
@@ -101,11 +105,31 @@ function Corner({ help = [], language, currency, words }) {
101
105
  // Which row opened a list, so going back puts focus where it was.
102
106
  const [from, setFrom] = (0, react_1.useState)('main');
103
107
  const [rtl, setRtl] = (0, react_1.useState)(false);
104
- const [theme, setTheme] = useTheme();
108
+ const ground = (0, appearance_1.useScheme)();
109
+ const [scheme, setTheme] = useAxis('theme');
110
+ const theme = scheme ?? ground;
111
+ const [face, setFace] = useAxis('font');
112
+ const [arabicFace, setArabic] = useAxis('arabic');
105
113
  const emit = (0, instrument_1.useEmit)();
106
114
  const trigger = (0, react_1.useRef)(null);
107
115
  const panel = (0, react_1.useRef)(null);
108
- const settings = { language, currency };
116
+ // The faces are the library's own, like the theme, and drawn the way the
117
+ // host's lists are. The Arabic row only for a page in Arabic script: anywhere
118
+ // else it is a choice about letters the reader cannot see.
119
+ const font = {
120
+ value: face ?? 'default',
121
+ options: ['default', 'system', 'serif', 'mono'].map((code) => ({ code, label: w[code === 'default' ? 'sans' : code] })),
122
+ onChange: (code) => setFace(code),
123
+ };
124
+ const lang = language?.value ?? (typeof document !== 'undefined' ? document.documentElement.lang : '');
125
+ const script = (0, logic_1.arabic)(lang)
126
+ ? {
127
+ value: arabicFace && arabicFace !== 'default' ? arabicFace : ((0, appearance_1.companion)() ?? ''),
128
+ options: appearance_1.COMPANIONS.map((code) => ({ code, label: w[code] })),
129
+ onChange: (code) => setArabic(code),
130
+ }
131
+ : undefined;
132
+ const settings = { language, currency, font, arabic: script };
109
133
  // Focus follows the view: a list puts it on its search or its options, the
110
134
  // card on the row the list was opened from.
111
135
  (0, react_1.useEffect)(() => {
@@ -183,7 +207,7 @@ function Corner({ help = [], language, currency, words }) {
183
207
  { value: 'system', label: w.auto },
184
208
  { value: 'light', label: '', 'aria-label': w.light, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Sun, { size: 14, color: "$ink", "aria-hidden": true }) },
185
209
  { value: 'dark', label: '', 'aria-label': w.dark, icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.Moon, { size: 14, color: "$ink", "aria-hidden": true }) },
186
- ] })] }), ['language', 'currency'].map((kind) => {
210
+ ] })] }), LISTS.map((kind) => {
187
211
  const s = settings[kind];
188
212
  if (!s)
189
213
  return null;
@@ -1 +1 @@
1
- {"version":3,"file":"Corner.d.ts","sourceRoot":"","sources":["../../src/corner/Corner.tsx"],"names":[],"mappings":"AAsCA,OAAO,EAAgF,KAAK,SAAS,EAAE,MAAM,OAAO,CAAA;AAWpH,OAAO,EAAyC,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA;AAEzF,YAAY,EAAE,MAAM,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAA;AAErD,iHAAiH;AACjH,MAAM,MAAM,IAAI,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,SAAS,CAAA;CAAE,CAAA;AAEpE,MAAM,MAAM,WAAW,GAAG;IACxB,iGAAiG;IACjG,IAAI,CAAC,EAAE,SAAS,IAAI,EAAE,CAAA;IACtB,4EAA4E;IAC5E,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,oFAAoF;IACpF,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,sEAAsE;IACtE,KAAK,CAAC,EAAE,OAAO,CAAC,KAAK,CAAC,CAAA;CACvB,CAAA;AAuDD,wBAAgB,MAAM,CAAC,EAAE,IAAS,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,EAAE,EAAE,WAAW,+BA0O3E"}
1
+ {"version":3,"file":"Corner.d.ts","sourceRoot":"","sources":["../../src/corner/Corner.tsx"],"names":[],"mappings":"AA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