@hanzo/ui 8.29.8 → 8.29.10

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 (47) hide show
  1. package/dist/auth/signout.cjs +10 -6
  2. package/dist/auth/signout.d.ts +8 -1
  3. package/dist/auth/signout.d.ts.map +1 -1
  4. package/dist/auth/signout.js +10 -6
  5. package/dist/auth/signout.js.map +1 -1
  6. package/dist/backends/gui/tabs.cjs +6 -1
  7. package/dist/backends/gui/tabs.d.ts.map +1 -1
  8. package/dist/backends/gui/tabs.js +6 -1
  9. package/dist/backends/gui/tabs.js.map +1 -1
  10. package/dist/corner/Corner.cjs +279 -0
  11. package/dist/corner/Corner.d.ts +21 -0
  12. package/dist/corner/Corner.d.ts.map +1 -0
  13. package/dist/corner/Corner.js +277 -0
  14. package/dist/corner/Corner.js.map +1 -0
  15. package/dist/corner/index.cjs +11 -0
  16. package/dist/corner/index.d.ts +3 -0
  17. package/dist/corner/index.d.ts.map +1 -0
  18. package/dist/corner/index.js +3 -0
  19. package/dist/corner/index.js.map +1 -0
  20. package/dist/corner/logic.cjs +47 -0
  21. package/dist/corner/logic.d.ts +59 -0
  22. package/dist/corner/logic.d.ts.map +1 -0
  23. package/dist/corner/logic.js +42 -0
  24. package/dist/corner/logic.js.map +1 -0
  25. package/dist/gallery.cjs +3 -1
  26. package/dist/gallery.d.ts.map +1 -1
  27. package/dist/gallery.html +11 -5
  28. package/dist/gallery.js +3 -1
  29. package/dist/gallery.js.map +1 -1
  30. package/dist/look.cjs +19 -0
  31. package/dist/look.d.ts +9 -0
  32. package/dist/look.d.ts.map +1 -0
  33. package/dist/look.js +17 -0
  34. package/dist/look.js.map +1 -0
  35. package/dist/product/Filters.cjs +5 -1
  36. package/dist/product/Filters.d.ts.map +1 -1
  37. package/dist/product/Filters.js +5 -1
  38. package/dist/product/Filters.js.map +1 -1
  39. package/dist/root.cjs +8 -2
  40. package/dist/root.d.ts +1 -1
  41. package/dist/root.d.ts.map +1 -1
  42. package/dist/root.js +8 -2
  43. package/dist/root.js.map +1 -1
  44. package/dist/root.node.cjs +8 -2
  45. package/dist/root.node.js +8 -2
  46. package/dist/styles.css +6 -0
  47. package/package.json +8 -1
@@ -0,0 +1,277 @@
1
+ 'use client';
2
+ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ /**
4
+ * Corner — help and preferences, behind the one control that is on every page.
5
+ *
6
+ * <Corner
7
+ * help={[{ label: 'Get help', href: '/support' }, { label: 'Docs', href: 'https://docs.hanzo.ai' }]}
8
+ * language={{ value: locale, options: LANGUAGES, onChange: setLocale }}
9
+ * currency={{ value: fiat, options: CURRENCIES, onChange: setFiat }}
10
+ * />
11
+ *
12
+ * A small `?` sits at the bottom START corner of the window (bottom-left in a
13
+ * left-to-right page, bottom-right in a right-to-left one), clear of the notch
14
+ * and the home indicator. Pressing it opens one card that opens toward the
15
+ * inside: the host's help links first, then Theme, Language and Currency. The
16
+ * three settings a visitor is most likely to want are where they look when they
17
+ * want the page to explain itself, on every surface, in the same place.
18
+ *
19
+ * Theme is the library's own: `@hanzo/appearance`, written through `<Hanzo>`'s
20
+ * resolved stack when there is one (`Look`), so it is stored, painted before
21
+ * first paint and carried across origins exactly as the settings panel does.
22
+ * Language and currency are the HOST's — this package depends on no i18n or
23
+ * money library, so it draws the value it is handed and reports a choice. A row
24
+ * the host passes nothing for is not drawn.
25
+ *
26
+ * Behaviour is the package `Popover`'s: portalled, dismissed by Escape and an
27
+ * outside press, focus trapped while open and handed back to the trigger on
28
+ * close. Escape in a list returns to the card rather than closing it. Arrow keys
29
+ * move through the card's rows and through a list; a long list (more than
30
+ * `LONG`) gets a search field that owns the cursor (`aria-activedescendant`).
31
+ * Nothing animates, so there is no motion to reduce.
32
+ *
33
+ * Web-only — it is fixed to the window — so it ships at `@hanzo/ui/corner`
34
+ * beside `consent`, not on the barrel that promises native.
35
+ */
36
+ import { Anchor, Input as GuiInput, SizableText, XStack, YStack, usePopperContextSlow } from '@hanzo/gui';
37
+ import { Check, ChevronLeft, ChevronRight, CircleHelp, ExternalLink, Moon, Search, Sun, X } from '@hanzogui/lucide-icons-2';
38
+ import { apply, current, read, useScheme, write } from '@hanzo/appearance';
39
+ import { useCallback, useContext, useEffect, useId, useLayoutEffect, useRef, useState } from 'react';
40
+ import { Popover, PopoverContent, PopoverTrigger } from '../backends/gui/popover.js';
41
+ import { touch } from '../backends/gui/gesture.js';
42
+ import { RING, press } from '../backends/gui/press.js';
43
+ import { slot, tip } from '../backends/gui/slot.js';
44
+ import { leaves } from '../masthead/nav.js';
45
+ import { move } from '../product/chipSelect.logic.js';
46
+ import { Segmented } from '../product/Filters.js';
47
+ import { useEmit } from '../product/instrument.js';
48
+ import { Look } from '../look.js';
49
+ import { LONG, WORDS, find, shown } from './logic.js';
50
+ /**
51
+ * The trigger's distance from the window's foot and its start edge: 10px, or the
52
+ * device's inset and 4px where that is wider. A right-to-left page puts the
53
+ * trigger on the right, so the inline edge takes the wider of the two side insets.
54
+ */
55
+ const EDGE = {
56
+ bottom: 'max(10px, calc(var(--safe-bottom, env(safe-area-inset-bottom, 0px)) + 4px))',
57
+ start: 'max(10px, calc(max(var(--safe-left, env(safe-area-inset-left, 0px)), var(--safe-right, env(safe-area-inset-right, 0px))) + 4px))',
58
+ };
59
+ /**
60
+ * A row's height: 36 under a mouse, 44 under a finger. Rows sit edge to edge,
61
+ * so the height itself is the target — an overlay past it would land on the
62
+ * next row. (`[role=button]` gets the same floor from design's base sheet.)
63
+ */
64
+ const ROW = { minH: 36, $touchable: { minH: 44 } };
65
+ /** The keys a list answers. */
66
+ const MOVES = new Set(['ArrowDown', 'ArrowUp', 'Home', 'End', 'PageDown', 'PageUp']);
67
+ /** Everything in the card the arrow keys step through, in document order. */
68
+ const STOPS = '[data-corner-stop], [data-slot="segmented-item"][data-state="checked"]';
69
+ /**
70
+ * The theme, as the person chose it, and the one way to change it.
71
+ *
72
+ * Under `<Hanzo>` it writes through the root's `useAppearance` (its org,
73
+ * install and account layers). Under a host's own gui provider it writes the
74
+ * device's layer and repaints the resolved stack, which is what `useAppearance`
75
+ * would do there. Nobody chose yet: the row marks what the document shows.
76
+ */
77
+ function useTheme() {
78
+ const look = useContext(Look);
79
+ const ground = useScheme();
80
+ const [own, setOwn] = useState(undefined);
81
+ useEffect(() => {
82
+ if (!look)
83
+ setOwn(read().theme);
84
+ }, [look]);
85
+ const set = useCallback((theme) => {
86
+ if (look)
87
+ return look.set({ theme });
88
+ write({ ...read(), theme });
89
+ apply(current().pref);
90
+ setOwn(theme);
91
+ }, [look]);
92
+ return [(look ? look.pref.theme : own) ?? ground, set];
93
+ }
94
+ export function Corner({ help = [], language, currency, words }) {
95
+ const w = { ...WORDS, ...words };
96
+ const [open, setOpen] = useState(false);
97
+ const [view, setView] = useState('main');
98
+ // Which row opened a list, so going back puts focus where it was.
99
+ const [from, setFrom] = useState('main');
100
+ const [rtl, setRtl] = useState(false);
101
+ const [theme, setTheme] = useTheme();
102
+ const emit = useEmit();
103
+ const trigger = useRef(null);
104
+ const panel = useRef(null);
105
+ const settings = { language, currency };
106
+ // Focus follows the view: a list puts it on its search or its options, the
107
+ // card on the row the list was opened from.
108
+ useEffect(() => {
109
+ if (!open)
110
+ return;
111
+ const root = panel.current;
112
+ if (!root)
113
+ return;
114
+ const target = view === 'main'
115
+ ? from === 'main'
116
+ ? null
117
+ : root.querySelector(`[data-corner-row="${from}"]`)
118
+ : root.querySelector('[data-corner-field]');
119
+ target?.focus();
120
+ }, [open, view, from]);
121
+ const toggle = (next) => {
122
+ if (next) {
123
+ // A right-to-left page mirrors the chevrons; read once, where the trigger sits.
124
+ if (trigger.current && typeof getComputedStyle === 'function')
125
+ setRtl(getComputedStyle(trigger.current).direction === 'rtl');
126
+ setView('main');
127
+ setFrom('main');
128
+ emit({ component: 'Corner', action: 'open' });
129
+ }
130
+ setOpen(next);
131
+ };
132
+ const back = () => setView('main');
133
+ const choose = (kind, code) => {
134
+ const s = settings[kind];
135
+ if (!s)
136
+ return;
137
+ if (code !== s.value) {
138
+ emit({ component: 'Corner', action: 'change', id: kind, value: code });
139
+ s.onChange(code);
140
+ }
141
+ back();
142
+ };
143
+ // The card's own arrows: up and down walk its stops. A radio group keeps its
144
+ // arrows (they move the theme, as a radio group's should).
145
+ const onCard = (e) => {
146
+ const key = e.key;
147
+ if (key !== 'ArrowDown' && key !== 'ArrowUp' && key !== 'Home' && key !== 'End')
148
+ return;
149
+ const el = e.target;
150
+ if (el?.closest?.('[role="radiogroup"]') && (key === 'ArrowDown' || key === 'ArrowUp'))
151
+ return;
152
+ const stops = Array.from(panel.current?.querySelectorAll(STOPS) ?? []);
153
+ if (!stops.length)
154
+ return;
155
+ e.preventDefault?.();
156
+ const at = stops.findIndex((s) => s === el || s.contains(el));
157
+ const to = key === 'Home' ? 0 : key === 'End' ? stops.length - 1 : Math.max(0, Math.min(stops.length - 1, at + (key === 'ArrowDown' ? 1 : -1)));
158
+ stops[to]?.focus();
159
+ };
160
+ const Forward = rtl ? ChevronLeft : ChevronRight;
161
+ return (_jsx(XStack, { ...slot('corner'), position: "fixed", bottom: EDGE.bottom, insetInlineStart: EDGE.start, z: 'var(--z-dock, 40)', children: _jsxs(Popover, { open: open, onOpenChange: toggle, placement: "top-start", allowFlip: true, stayInFrame: true, children: [_jsx(PopoverTrigger, { asChild: true, children: _jsx(XStack, { ref: trigger, ...slot('corner-trigger'), ...tip(w.open), role: "button", tabIndex: 0, "aria-label": w.open, "aria-haspopup": "dialog", "aria-expanded": open, ...touch(32), width: 32, height: 32, items: "center", justify: "center", rounded: "$10", cursor: "pointer", opacity: open ? 1 : 0.85, hoverStyle: { opacity: 1 }, focusVisibleStyle: RING, onKeyDown: (e) => {
162
+ if (e?.key !== 'Enter' && e?.key !== ' ')
163
+ return;
164
+ e.preventDefault?.();
165
+ toggle(!open);
166
+ }, children: _jsx(CircleHelp, { size: 22, color: "$background", fill: "var(--foreground)", "aria-hidden": true }) }) }), _jsxs(PopoverContent, { ref: panel, ...slot('corner-card'), role: "dialog", "aria-label": w.open, solid: true, sideOffset: 6, width: 288, maxW: "calc(100vw - 20px)", maxH: 'calc(100dvh - 72px)', overflowY: "auto", p: "$3", gap: "$2", items: "stretch", elevation: "$4", trapFocus: true, onOpenAutoFocus: (e) => {
167
+ // The first thing in the card that does something, not its close button.
168
+ e.preventDefault();
169
+ panel.current?.querySelector(STOPS)?.focus();
170
+ }, onCloseAutoFocus: (e) => {
171
+ e.preventDefault();
172
+ trigger.current?.focus();
173
+ }, onEscapeKeyDown: (e) => {
174
+ // Escape in a list goes back to the card; on the card it closes.
175
+ if (view === 'main')
176
+ return;
177
+ e.preventDefault();
178
+ back();
179
+ }, children: [_jsx(Reflow, { on: view }), view === 'main' ? (_jsxs(YStack, { gap: "$2", onKeyDown: onCard, children: [help.length ? (_jsxs(_Fragment, { children: [_jsx(Head, { title: w.help, close: w.close, onClose: () => toggle(false) }), _jsx(YStack, { ...slot('corner-help'), role: "list", "aria-label": w.help, children: help.map((link) => (_jsx(Item, { link: link, leaving: w.leaves, onPress: () => emit({ component: 'Corner', action: 'click', id: link.label }) }, link.href + link.label))) }), _jsx(YStack, { height: 1, bg: "$borderColor", my: "$1", "aria-hidden": true })] })) : null, _jsx(Head, { title: w.preferences, close: help.length ? undefined : w.close, onClose: () => toggle(false) }), _jsxs(XStack, { ...slot('corner-theme'), ...ROW, items: "center", justify: "space-between", gap: "$3", children: [_jsx(SizableText, { size: "$3", color: "$aside", children: w.theme }), _jsx(Segmented, { variant: "track", itemWidth: "content", name: "theme", "aria-label": w.theme, value: theme, onChange: setTheme, options: [
180
+ { value: 'system', label: w.auto },
181
+ { value: 'light', label: '', 'aria-label': w.light, icon: _jsx(Sun, { size: 14, color: "$ink", "aria-hidden": true }) },
182
+ { value: 'dark', label: '', 'aria-label': w.dark, icon: _jsx(Moon, { size: 14, color: "$ink", "aria-hidden": true }) },
183
+ ] })] }), ['language', 'currency'].map((kind) => {
184
+ const s = settings[kind];
185
+ if (!s)
186
+ return null;
187
+ const chosen = s.options.find((o) => o.code === s.value);
188
+ return (_jsxs(XStack, { ...slot('corner-row'), ...press(() => {
189
+ setFrom(kind);
190
+ setView(kind);
191
+ }), "data-corner-stop": "", "data-corner-row": kind, "aria-haspopup": "listbox", ...ROW, items: "center", gap: "$3", mx: -8, px: "$2", rounded: "$3", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: [_jsx(SizableText, { size: "$3", color: "$aside", flex: 1, children: w[kind] }), _jsx(SizableText, { size: "$3", color: "$ink", fontWeight: "600", numberOfLines: 1, shrink: 1, ...(kind === 'language' ? { lang: s.value, dir: chosen?.dir } : null), children: shown(s) }), _jsx(Forward, { size: 16, color: "$hint", "aria-hidden": true })] }, kind));
192
+ })] })) : (_jsx(List, { kind: view, setting: settings[view], title: w[view], words: w, rtl: rtl, onBack: back, onChoose: (code) => choose(view, code) }, view))] })] }) }));
193
+ }
194
+ /**
195
+ * Places the card again when it changes size. gui's popper re-measures when its
196
+ * TRIGGER moves, never when the card does, so a card that grows into a list
197
+ * keeps its old top and runs off the foot of the window. Inside the content,
198
+ * so it reads the popper the content belongs to.
199
+ */
200
+ function Reflow({ on }) {
201
+ const { update } = usePopperContextSlow();
202
+ useLayoutEffect(() => {
203
+ update?.();
204
+ }, [on, update]);
205
+ return null;
206
+ }
207
+ /** A section's quiet title, and the card's close button when the section is first. */
208
+ function Head({ title, close, onClose }) {
209
+ return (_jsxs(XStack, { items: "center", justify: "space-between", minH: 28, children: [_jsx(SizableText, { size: "$2", color: "$hint", render: "h2", m: 0, children: title }), close ? _jsx(Icon, { label: close, onPress: onClose, glyph: _jsx(X, { size: 18, color: "$aside", "aria-hidden": true }) }) : null] }));
210
+ }
211
+ /** An icon-only button: 28px drawn, 44 under a finger. */
212
+ function Icon({ label, glyph, onPress }) {
213
+ return (_jsx(XStack, { ...press(onPress), ...tip(label), "aria-label": label, ...touch(28), width: 28, height: 28, marginInlineEnd: -6, items: "center", justify: "center", rounded: "$10", cursor: "pointer", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: glyph }));
214
+ }
215
+ /** One help link. A link that leaves the site opens a new tab and says so, to the eye and to a screen reader. */
216
+ function Item({ link, leaving, onPress }) {
217
+ const out = typeof location !== 'undefined' && leaves(link.href, location.origin);
218
+ return (_jsx(XStack, { role: "listitem", children: _jsxs(Anchor, { ...slot('corner-link'), "data-corner-stop": "", href: link.href, target: out ? '_blank' : undefined, rel: out ? 'noopener noreferrer' : undefined, "aria-label": out ? `${link.label} (${leaving})` : undefined, onPress: onPress, display: "flex", flexDirection: "row", flex: 1, items: "center", gap: "$2.5", ...ROW, mx: -8, px: "$2", rounded: "$3", textDecorationLine: "none", color: "$ink", hoverStyle: { bg: '$hover' }, focusVisibleStyle: RING, children: [link.icon ? (_jsx(XStack, { width: 20, items: "center", justify: "center", "aria-hidden": true, children: link.icon })) : null, _jsx(SizableText, { size: "$3", color: "$ink", fontWeight: "500", children: link.label }), out ? _jsx(ExternalLink, { size: 12, color: "$hint", "aria-hidden": true }) : null] }) }));
219
+ }
220
+ /**
221
+ * A setting's options, in place of the card: back, the title, a search when the
222
+ * list is long, then the options with a check on the current one.
223
+ *
224
+ * ARIA: the options are a listbox. With a search, the field is the combobox and
225
+ * owns the cursor through `aria-activedescendant`, so focus never leaves it
226
+ * while the arrows move; without one the listbox itself takes focus and does the
227
+ * same. Enter or a press chooses.
228
+ */
229
+ function List({ kind, setting, title, words, rtl, onBack, onChoose, }) {
230
+ const [q, setQ] = useState('');
231
+ const rows = find(setting.options, q);
232
+ const [at, setAt] = useState(() => Math.max(0, rows.findIndex((o) => o.code === setting.value)));
233
+ const id = useId();
234
+ const listId = `${id}-list`;
235
+ const optionId = (i) => `${id}-opt-${i}`;
236
+ const searchable = setting.options.length > LONG;
237
+ const Back = rtl ? ChevronRight : ChevronLeft;
238
+ // A new search starts the cursor at the top.
239
+ useEffect(() => {
240
+ if (q)
241
+ setAt(0);
242
+ }, [q]);
243
+ // Keep the row under the cursor in view as it moves.
244
+ useEffect(() => {
245
+ if (typeof document === 'undefined')
246
+ return;
247
+ document.getElementById(optionId(at))?.scrollIntoView?.({ block: 'nearest' });
248
+ // eslint-disable-next-line react-hooks/exhaustive-deps
249
+ }, [at]);
250
+ const onKey = (e) => {
251
+ const key = e?.key;
252
+ if (MOVES.has(key)) {
253
+ if ((key === 'Home' || key === 'End') && q)
254
+ return;
255
+ e.preventDefault?.();
256
+ setAt(move(key, at, rows.length));
257
+ return;
258
+ }
259
+ if (key === 'Enter' || (key === ' ' && !searchable)) {
260
+ e.preventDefault?.();
261
+ const o = rows[at];
262
+ if (o)
263
+ onChoose(o.code);
264
+ }
265
+ };
266
+ const active = rows[at] ? optionId(at) : undefined;
267
+ return (_jsxs(YStack, { gap: "$2", children: [_jsxs(XStack, { items: "center", gap: "$1", minH: 28, children: [_jsx(XStack, { marginInlineStart: -6, children: _jsx(Icon, { label: words.back, onPress: onBack, glyph: _jsx(Back, { size: 18, color: "$aside", "aria-hidden": true }) }) }), _jsx(SizableText, { size: "$3", color: "$ink", fontWeight: "600", render: "h2", m: 0, children: title })] }), searchable ? (_jsxs(XStack, { ...slot('corner-search'), height: 32, px: "$2", gap: "$1.5", items: "center", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", bg: "$background", focusWithinStyle: { borderColor: '$outlineColor' }, children: [_jsx(Search, { size: 14, color: "$hint", "aria-hidden": true }), _jsx(GuiInput, { ...slot('corner-input'), "data-corner-field": "", unstyled: true, flex: 1, minW: 0, height: 30, p: 0, borderWidth: 0, bg: "transparent", fontSize: "$3", color: "$ink", placeholderTextColor: "$placeholderColor", placeholder: words.search, value: q, onChangeText: setQ, role: "combobox", "aria-label": `${words.search}: ${title}`, "aria-expanded": true, "aria-controls": listId, "aria-autocomplete": "list", "aria-activedescendant": active, autoComplete: "off", spellCheck: false, onKeyDown: onKey })] })) : null, _jsxs(YStack, { ...slot('corner-list'), id: listId, role: "listbox", "aria-label": title, ...(searchable
268
+ ? null
269
+ : { 'data-corner-field': '', tabIndex: 0, 'aria-activedescendant': active, onKeyDown: onKey, focusVisibleStyle: RING }),
270
+ // A height, not a ceiling: a search that narrows the list leaves the card
271
+ // where it is instead of shrinking it away from the trigger.
272
+ height: 'min(320px, calc(100dvh - 180px))', overflowY: "auto", mx: -4, px: "$1", rounded: "$3", children: [rows.map((o, i) => {
273
+ const picked = o.code === setting.value;
274
+ return (_jsxs(XStack, { ...slot('corner-option'), id: optionId(i), role: "option", "aria-selected": picked, ...ROW, px: "$2", gap: "$2", items: "center", rounded: "$3", cursor: "pointer", bg: i === at ? '$hover' : 'transparent', onHoverIn: () => setAt(i), onPress: () => onChoose(o.code), children: [_jsx(YStack, { flex: 1, minW: 0, children: _jsx(SizableText, { size: "$3", color: "$ink", fontWeight: picked ? '600' : '400', numberOfLines: 1, self: "flex-start", maxW: "100%", ...(kind === 'language' ? { lang: o.code, dir: o.dir } : null), children: o.label }) }), o.hint ? (_jsx(SizableText, { size: "$2", color: "$hint", numberOfLines: 1, shrink: 0, children: o.hint })) : null, _jsx(XStack, { width: 16, items: "center", justify: "center", shrink: 0, "aria-hidden": true, children: picked ? _jsx(Check, { size: 16, color: "$ink" }) : null })] }, o.code));
275
+ }), rows.length === 0 ? (_jsx(XStack, { ...ROW, px: "$2", items: "center", role: "status", children: _jsx(SizableText, { size: "$3", color: "$hint", children: words.none }) })) : null] })] }));
276
+ }
277
+ //# sourceMappingURL=Corner.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Corner.js","sourceRoot":"","sources":["../../src/corner/Corner.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAA;;AAEZ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgCG;AACH,OAAO,EAAE,MAAM,EAAE,KAAK,IAAI,QAAQ,EAAE,WAAW,EAAE,MAAM,EAAE,MAAM,EAAE,oBAAoB,EAAE,MAAM,YAAY,CAAA;AACzG,OAAO,EAAE,KAAK,EAAE,WAAW,EAAE,Y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O,EAAC,aAAa,EAAE,CAAC,EAAE,MAAM,EAAE,CAAC,YAC7D,CAAC,CAAC,IAAI,GACK,CACf,CAAC,CAAC,CAAC,IAAI,EACR,KAAC,MAAM,IAAC,KAAK,EAAE,EAAE,EAAE,KAAK,EAAC,QAAQ,EAAC,OAAO,EAAC,QAAQ,EAAC,MAAM,EAAE,CAAC,iCACzD,MAAM,CAAC,CAAC,CAAC,KAAC,KAAK,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAC,MAAM,GAAG,CAAC,CAAC,CAAC,IAAI,GAC1C,KArCJ,CAAC,CAAC,IAAI,CAsCJ,CACV,CAAA;oBACH,CAAC,CAAC,EACD,IAAI,CAAC,MAAM,KAAK,CAAC,CAAC,CAAC,CAAC,CACnB,KAAC,MAAM,OAAK,GAAG,EAAE,EAAE,EAAC,IAAI,EAAC,KAAK,EAAC,QAAQ,EAAC,IAAI,EAAC,QAAQ,YACnD,KAAC,WAAW,IAAC,IAAI,EAAC,IAAI,EAAC,KAAK,EAAC,OAAO,YACjC,KAAK,CAAC,IAAI,GACC,GACP,CACV,CAAC,CAAC,CAAC,IAAI,IACD,IACF,CACV,CAAA;AACH,CAAC"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.shown = exports.fold = exports.find = exports.LONG = exports.WORDS = exports.Corner = void 0;
4
+ var Corner_1 = require("./Corner.cjs");
5
+ Object.defineProperty(exports, "Corner", { enumerable: true, get: function () { return Corner_1.Corner; } });
6
+ var logic_1 = require("./logic.cjs");
7
+ Object.defineProperty(exports, "WORDS", { enumerable: true, get: function () { return logic_1.WORDS; } });
8
+ Object.defineProperty(exports, "LONG", { enumerable: true, get: function () { return logic_1.LONG; } });
9
+ Object.defineProperty(exports, "find", { enumerable: true, get: function () { return logic_1.find; } });
10
+ Object.defineProperty(exports, "fold", { enumerable: true, get: function () { return logic_1.fold; } });
11
+ Object.defineProperty(exports, "shown", { enumerable: true, get: function () { return logic_1.shown; } });
@@ -0,0 +1,3 @@
1
+ export { Corner, type CornerProps, type Link } from './Corner.js';
2
+ export { WORDS, LONG, find, fold, shown, type Option, type Setting, type Words } from './logic.js';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/corner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,KAAK,WAAW,EAAE,KAAK,IAAI,EAAE,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,MAAM,EAAE,KAAK,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,SAAS,CAAA"}
@@ -0,0 +1,3 @@
1
+ export { Corner } from './Corner.js';
2
+ export { WORDS, LONG, find, fold, shown } from './logic.js';
3
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/corner/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAA+B,MAAM,UAAU,CAAA;AAC9D,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAyC,MAAM,SAAS,CAAA"}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+ /**
3
+ * Corner's decisions, as pure functions over plain values: which list gets a
4
+ * search, what a search matches, and the words the panel says. They import
5
+ * nothing, so they are tested in node and a server can load them.
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ exports.shown = exports.fold = exports.LONG = exports.WORDS = void 0;
9
+ exports.find = find;
10
+ exports.WORDS = {
11
+ open: 'Help and preferences',
12
+ help: 'Help',
13
+ preferences: 'Preferences',
14
+ theme: 'Theme',
15
+ auto: 'Auto',
16
+ light: 'Light',
17
+ dark: 'Dark',
18
+ language: 'Language',
19
+ currency: 'Currency',
20
+ search: 'Search',
21
+ back: 'Back',
22
+ close: 'Close',
23
+ none: 'No matches',
24
+ leaves: 'opens in a new tab',
25
+ };
26
+ /** Past this many options a list gets a search field. */
27
+ exports.LONG = 8;
28
+ /**
29
+ * Text as a search compares it: lower case, accents dropped, so `francais`
30
+ * finds `Français` and `turk` finds `Türkçe`. Scripts without case or marks
31
+ * pass through unchanged.
32
+ */
33
+ const fold = (s) => s.normalize('NFD').replace(/\p{M}+/gu, '').toLowerCase();
34
+ exports.fold = fold;
35
+ /**
36
+ * The options a search keeps, in the host's order. A literal substring of the
37
+ * label, the hint or the code, never a pattern: the needle is whatever was typed.
38
+ */
39
+ function find(options, q) {
40
+ const needle = (0, exports.fold)(q.trim());
41
+ if (!needle)
42
+ return options.slice();
43
+ return options.filter((o) => (0, exports.fold)(o.label).includes(needle) || (0, exports.fold)(o.hint ?? '').includes(needle) || (0, exports.fold)(o.code).includes(needle));
44
+ }
45
+ /** The label of the chosen option, or its code when the host did not list it. */
46
+ const shown = (s) => s.options.find((o) => o.code === s.value)?.label ?? s.value;
47
+ exports.shown = shown;
@@ -0,0 +1,59 @@
1
+ /**
2
+ * Corner's decisions, as pure functions over plain values: which list gets a
3
+ * search, what a search matches, and the words the panel says. They import
4
+ * nothing, so they are tested in node and a server can load them.
5
+ */
6
+ /** One choice a host offers: its code, its name in its own script, and how it is written. */
7
+ export type Option = {
8
+ /** What `onChange` receives: `en`, `ar`, `USD`. */
9
+ code: string;
10
+ /** The name shown, in the option's own script for a language: `Deutsch`, `العربية`. */
11
+ label: string;
12
+ /** A quieter second name, searched too: `German`, `US dollar`. */
13
+ hint?: string;
14
+ /** A language's writing direction, so its name lays out the way it is read. */
15
+ dir?: 'ltr' | 'rtl';
16
+ };
17
+ /** A preference the host owns. Corner draws it and reports a choice; the host stores it. */
18
+ export type Setting = {
19
+ value: string;
20
+ options: readonly Option[];
21
+ onChange: (code: string) => void;
22
+ };
23
+ /** What the panel says. A host that speaks another language passes its own. */
24
+ export type Words = {
25
+ /** The trigger's and the panel's name. */
26
+ open: string;
27
+ help: string;
28
+ preferences: string;
29
+ theme: string;
30
+ auto: string;
31
+ light: string;
32
+ dark: string;
33
+ language: string;
34
+ currency: string;
35
+ search: string;
36
+ back: string;
37
+ close: string;
38
+ /** A search that matched nothing. */
39
+ none: string;
40
+ /** Read after a link that opens in a new tab. */
41
+ leaves: string;
42
+ };
43
+ export declare const WORDS: Words;
44
+ /** Past this many options a list gets a search field. */
45
+ export declare const LONG = 8;
46
+ /**
47
+ * Text as a search compares it: lower case, accents dropped, so `francais`
48
+ * finds `Français` and `turk` finds `Türkçe`. Scripts without case or marks
49
+ * pass through unchanged.
50
+ */
51
+ export declare const fold: (s: string) => string;
52
+ /**
53
+ * The options a search keeps, in the host's order. A literal substring of the
54
+ * label, the hint or the code, never a pattern: the needle is whatever was typed.
55
+ */
56
+ export declare function find(options: readonly Option[], q: string): Option[];
57
+ /** The label of the chosen option, or its code when the host did not list it. */
58
+ export declare const shown: (s: Setting) => string;
59
+ //# sourceMappingURL=logic.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logic.d.ts","sourceRoot":"","sources":["../../src/corner/logic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,6FAA6F;AAC7F,MAAM,MAAM,MAAM,GAAG;IACnB,mDAAmD;IACnD,IAAI,EAAE,MAAM,CAAA;IACZ,uFAAuF;IACvF,KAAK,EAAE,MAAM,CAAA;IACb,kEAAkE;IAClE,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,+EAA+E;IAC/E,GAAG,CAAC,EAAE,KAAK,GAAG,KAAK,CAAA;CACpB,CAAA;AAED,4FAA4F;AAC5F,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,CAAA;IACb,OAAO,EAAE,SAAS,MAAM,EAAE,CAAA;IAC1B,QAAQ,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAA;CACjC,CAAA;AAED,+EAA+E;AAC/E,MAAM,MAAM,KAAK,GAAG;IAClB,0CAA0C;IAC1C,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,EAAE,MAAM,CAAA;IACZ,WAAW,EAAE,MAAM,CAAA;IACnB,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,QAAQ,EAAE,MAAM,CAAA;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,MAAM,EAAE,MAAM,CAAA;IACd,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAA;IACb,qCAAqC;IACrC,IAAI,EAAE,MAAM,CAAA;IACZ,iDAAiD;IACjD,MAAM,EAAE,MAAM,CAAA;CACf,CAAA;AAED,eAAO,MAAM,KAAK,EAAE,KAenB,CAAA;AAED,yDAAyD;AACzD,eAAO,MAAM,IAAI,IAAI,CAAA;AAErB;;;;GAIG;AACH,eAAO,MAAM,IAAI,MAAO,MAAM,KAAG,MACyB,CAAA;AAE1D;;;GAGG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,SAAS,MAAM,EAAE,EAAE,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAIpE;AAED,iFAAiF;AACjF,eAAO,MAAM,KAAK,MAAO,OAAO,KAAG,MAAqE,CAAA"}
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Corner's decisions, as pure functions over plain values: which list gets a
3
+ * search, what a search matches, and the words the panel says. They import
4
+ * nothing, so they are tested in node and a server can load them.
5
+ */
6
+ export const WORDS = {
7
+ open: 'Help and preferences',
8
+ help: 'Help',
9
+ preferences: 'Preferences',
10
+ theme: 'Theme',
11
+ auto: 'Auto',
12
+ light: 'Light',
13
+ dark: 'Dark',
14
+ language: 'Language',
15
+ currency: 'Currency',
16
+ search: 'Search',
17
+ back: 'Back',
18
+ close: 'Close',
19
+ none: 'No matches',
20
+ leaves: 'opens in a new tab',
21
+ };
22
+ /** Past this many options a list gets a search field. */
23
+ export const LONG = 8;
24
+ /**
25
+ * Text as a search compares it: lower case, accents dropped, so `francais`
26
+ * finds `Français` and `turk` finds `Türkçe`. Scripts without case or marks
27
+ * pass through unchanged.
28
+ */
29
+ export const fold = (s) => s.normalize('NFD').replace(/\p{M}+/gu, '').toLowerCase();
30
+ /**
31
+ * The options a search keeps, in the host's order. A literal substring of the
32
+ * label, the hint or the code, never a pattern: the needle is whatever was typed.
33
+ */
34
+ export function find(options, q) {
35
+ const needle = fold(q.trim());
36
+ if (!needle)
37
+ return options.slice();
38
+ return options.filter((o) => fold(o.label).includes(needle) || fold(o.hint ?? '').includes(needle) || fold(o.code).includes(needle));
39
+ }
40
+ /** The label of the chosen option, or its code when the host did not list it. */
41
+ export const shown = (s) => s.options.find((o) => o.code === s.value)?.label ?? s.value;
42
+ //# sourceMappingURL=logic.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logic.js","sourceRoot":"","sources":["../../src/corner/logic.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AA0CH,MAAM,CAAC,MAAM,KAAK,GAAU;IAC1B,IAAI,EAAE,sBAAsB;IAC5B,IAAI,EAAE,MAAM;IACZ,WAAW,EAAE,aAAa;IAC1B,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,MAAM;IACZ,QAAQ,EAAE,UAAU;IACpB,QAAQ,EAAE,UAAU;IACpB,MAAM,EAAE,QAAQ;IAChB,IAAI,EAAE,MAAM;IACZ,KAAK,EAAE,OAAO;IACd,IAAI,EAAE,YAAY;IAClB,MAAM,EAAE,oBAAoB;CAC7B,CAAA;AAED,yDAAyD;AACzD,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAA;AAErB;;;;GAIG;AACH,MAAM,CAAC,MAAM,IAAI,GAAG,CAAC,CAAS,EAAU,EAAE,CACxC,CAAC,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC,UAAU,EAAE,EAAE,CAAC,CAAC,WAAW,EAAE,CAAA;AAE1D;;;GAGG;AACH,MAAM,UAAU,IAAI,CAAC,OAA0B,EAAE,CAAS;IACxD,MAAM,MAAM,GAAG,IAAI,CAAC,CAAC,CAAC,IAAI,EAAE,CAAC,CAAA;IAC7B,IAAI,CAAC,MAAM;QAAE,OAAO,OAAO,CAAC,KAAK,EAAE,CAAA;IACnC,OAAO,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,IAAI,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,QAAQ,CAAC,MAAM,CAAC,CAAC,CAAA;AACtI,CAAC;AAED,iFAAiF;AACjF,MAAM,CAAC,MAAM,KAAK,GAAG,CAAC,CAAU,EAAU,EAAE,CAAC,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC,CAAC,IAAI,KAAK,CAAC,CAAC,KAAK,CAAC,EAAE,KAAK,IAAI,CAAC,CAAC,KAAK,CAAA"}
package/dist/gallery.cjs CHANGED
@@ -73,6 +73,8 @@ const lucide_icons_2_1 = require("@hanzogui/lucide-icons-2");
73
73
  const settings_1 = require("./settings/index.cjs");
74
74
  // A catalogue page — web-only, like the grid its cards lay out on.
75
75
  const catalog_1 = require("./catalog/index.cjs");
76
+ // Help and preferences — web-only, fixed to the window, off the barrel.
77
+ const corner_1 = require("./corner/index.cjs");
76
78
  const agents_1 = require("./agents/index.cjs");
77
79
  /** A real <img> with real intrinsic pixels, inline so nothing hits the network.
78
80
  * 120x40 on purpose: the wrong ratio for every box it goes in, so a frame that
@@ -195,7 +197,7 @@ const Gallery = () => ((0, jsx_runtime_1.jsxs)("div", { style: { display: 'flex'
195
197
  email: 'dave@acme.test',
196
198
  groups: [{ label: 'Organization', items: [{ id: 'acme', label: 'acme', active: true, onPress: NOOP }] }],
197
199
  onSignOut: NOOP,
198
- }, onCollapse: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SessionRail, { onNew: NOOP, onSearch: NOOP, recents: SESSIONS, onOpen: NOOP, collapsed: true, onCollapse: NOOP, account: { name: 'Sign in', onPress: NOOP } })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 560 }, children: (0, jsx_runtime_1.jsx)(chat_1.RailBar, { onMenu: NOOP, menuLabel: "Open runs", brand: "Hanzo Build", onBrand: NOOP, onSearch: NOOP, searchLabel: "Search runs" }) }), (0, jsx_runtime_1.jsx)(chat_1.EmptyPrompt, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }) }), (0, jsx_runtime_1.jsx)("div", { "data-home": "demo", style: { display: 'flex', width: '100%', height: 320 }, children: (0, jsx_runtime_1.jsx)(chat_1.Home, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }), children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question" }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question", head: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Environment", label: "Default", onChange: NOOP, items: [] }), (0, jsx_runtime_1.jsx)(RepoSelect_1.RepoSelect, { value: { owner: 'hanzo-inc', name: 'cloud' }, onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(BranchSelect_1.BranchSelect, { value: "main", onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Disabled", label: "off", onChange: NOOP, items: [], disabled: true })] }), foot: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Attach", icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "+" }), onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Mode", text: "Auto", caret: true, onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Disabled", text: "off", disabled: true }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { flex: 1 }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Model", label: "Zen 5", onChange: NOOP, items: [], quiet: true })] }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "a draft", onChange: NOOP, onSend: NOOP, onStop: NOOP, busy: true }) })] }), (0, jsx_runtime_1.jsx)(section_1.Section, { name: "settings", children: (0, jsx_runtime_1.jsx)("div", { "data-settings": "demo", style: { display: 'flex', width: '100%', height: 560 }, children: (0, jsx_runtime_1.jsx)(settings_1.Settings, { entries: ENTRIES, active: "general", onPick: NOOP, children: (0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$6", children: [(0, jsx_runtime_1.jsx)(settings_1.Heading, { title: "General", detail: "How this surface looks and listens.", action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Save" }) }), (0, jsx_runtime_1.jsx)(settings_1.Group, { title: "Appearance", detail: "Per browser.", children: (0, jsx_runtime_1.jsxs)(settings_1.Card, { children: [(0, jsx_runtime_1.jsx)(settings_1.Row, { first: true, title: "Theme", detail: "Follows the system.", trailing: (0, jsx_runtime_1.jsx)(gui_2.Switch, {}) }), (0, jsx_runtime_1.jsx)(settings_1.Row, { mono: true, title: "hk-live-3f9a", leading: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "k" }) })] }) }), (0, jsx_runtime_1.jsx)(settings_1.Field, { label: "Call me", hint: "What the home page greets you by.", children: (0, jsx_runtime_1.jsx)(gui_2.Input, { placeholder: "Name", "aria-label": "Call me" }) }), (0, jsx_runtime_1.jsx)(settings_1.Card, { children: (0, jsx_runtime_1.jsx)(settings_1.Soft, { children: "No keys yet." }) }), (0, jsx_runtime_1.jsx)(settings_1.Soft, { action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Sign in" }), children: "Sign in to see your settings." }), (0, jsx_runtime_1.jsx)(settings_1.Note, { children: "Saved." }), (0, jsx_runtime_1.jsx)(settings_1.Once, { value: "hk-live-3f9a0c", label: "API key" })] }) }) }) }), (0, jsx_runtime_1.jsx)(section_1.Section, { name: "catalog", children: (0, jsx_runtime_1.jsx)("div", { "data-shelf": "demo", style: { display: 'flex', width: '100%', height: 720 }, children: (0, jsx_runtime_1.jsxs)(catalog_1.Shelf, { title: "Customize", detail: "What the agent brings to a run.", tabs: KINDS, tab: "skills", onTab: NOOP, view: "discover", onView: NOOP, search: "Search skills", query: "", onQuery: NOOP, add: "New skill", onAdd: NOOP, children: [(0, jsx_runtime_1.jsx)(catalog_1.Featured, { title: "Triage", detail: "How we triage an issue.", meta: "Saved Sep 21", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "t" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "Triage", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsxs)(catalog_1.Tiles, { label: "Skills to add", children: [(0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_repos", detail: "List the forge's repositories.", meta: "git", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "g" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_repos", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_branches", detail: "List a repository's branches.", meta: "git", onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_branches", added: true, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "kms_secrets", detail: "Read the names of an org's secrets.", action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "kms_secrets", added: false, busy: true, onPress: NOOP }) })] })] }) }) }), (0, jsx_runtime_1.jsxs)(section_1.Section, { name: "box", children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { items: "center", gap: 16, px: 24, py: 12, rounded: "var(--radius-lg, 0.75rem)", borderWidth: 1, children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "utility classes" }) }), (0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: 8, maxW: 768, ml: "auto", mr: "auto", overflow: "hidden", children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "column" }) })] }), (0, jsx_runtime_1.jsxs)(section_1.Section, { name: "onboarding", children: [(0, jsx_runtime_1.jsxs)(react_2.IamProvider, { config: { serverUrl: 'https://hanzo.id', clientId: 'hanzo-gallery', redirectUri: 'https://hanzo.ai/auth/callback' }, autoInit: false, children: [(0, jsx_runtime_1.jsx)(auth_1.SignIn, {}), (0, jsx_runtime_1.jsx)(auth_1.SignIn, { mode: "signup" }), (0, jsx_runtime_1.jsx)(auth_1.SignIn, { frame: false })] }), (0, jsx_runtime_1.jsx)(account_1.CreateAccount, { email: "you@example.com", onCreate: NOOP, onOther: NOOP }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Do more with Hanzo Pro", width: 340, children: (0, jsx_runtime_1.jsx)(screens_1.Pro, { interval: "annual", setInterval: NOOP, onPro: NOOP, onFree: NOOP, onAll: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "How are you planning to use Hanzo?", back: NOOP, children: (0, jsx_runtime_1.jsx)(screens_1.UseCards, { onPick: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Plans that grow with you", busy: true, width: 1140, children: (0, jsx_runtime_1.jsx)(screens_1.Plans, { interval: "annual", setInterval: NOOP, onFree: NOOP, onPick: NOOP, onTeam: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Let\u2019s create your team", center: true, children: (0, jsx_runtime_1.jsx)(screens_1.TeamName, { api: "", onCreated: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Choose your seats and plan", children: (0, jsx_runtime_1.jsx)(screens_1.Seats, { interval: "monthly", setInterval: NOOP, value: { plan: 'team_premium', seats: 20 }, setValue: NOOP, onContinue: NOOP, onEnterprise: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Talk to our sales team", children: (0, jsx_runtime_1.jsx)(screens_1.Enterprise, { api: "", onSent: NOOP }) }), (0, jsx_runtime_1.jsxs)(gui_3.ChoiceGroup, { label: "Billing interval", children: [(0, jsx_runtime_1.jsx)(gui_3.ChoiceCard, { selected: true, onSelect: NOOP, children: "Monthly" }), (0, jsx_runtime_1.jsx)(gui_3.ChoiceCard, { selected: false, onSelect: NOOP, children: "Annually" })] }), (0, jsx_runtime_1.jsx)(gui_3.Stepper, { label: "Seats", value: 2, min: 2, max: 150, onChange: NOOP })] }), (0, jsx_runtime_1.jsx)(records_1.Records, {})] }));
200
+ }, onCollapse: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.SessionRail, { onNew: NOOP, onSearch: NOOP, recents: SESSIONS, onOpen: NOOP, collapsed: true, onCollapse: NOOP, account: { name: 'Sign in', onPress: NOOP } })] }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 560 }, children: (0, jsx_runtime_1.jsx)(chat_1.RailBar, { onMenu: NOOP, menuLabel: "Open runs", brand: "Hanzo Build", onBrand: NOOP, onSearch: NOOP, searchLabel: "Search runs" }) }), (0, jsx_runtime_1.jsx)(chat_1.EmptyPrompt, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }) }), (0, jsx_runtime_1.jsx)("div", { "data-home": "demo", style: { display: 'flex', width: '100%', height: 320 }, children: (0, jsx_runtime_1.jsx)(chat_1.Home, { mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "h" }), children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question" }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "", onChange: NOOP, onSend: NOOP, placeholder: "Describe a task or ask a question", head: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Environment", label: "Default", onChange: NOOP, items: [] }), (0, jsx_runtime_1.jsx)(RepoSelect_1.RepoSelect, { value: { owner: 'hanzo-inc', name: 'cloud' }, onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(BranchSelect_1.BranchSelect, { value: "main", onChange: NOOP, load: NONE }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Disabled", label: "off", onChange: NOOP, items: [], disabled: true })] }), foot: (0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Attach", icon: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "+" }), onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Mode", text: "Auto", caret: true, onPress: NOOP }), (0, jsx_runtime_1.jsx)(chat_1.ComposerTool, { label: "Disabled", text: "off", disabled: true }), (0, jsx_runtime_1.jsx)(gui_1.XStack, { flex: 1 }), (0, jsx_runtime_1.jsx)(ChipSelect_1.ChipSelect, { name: "Model", label: "Zen 5", onChange: NOOP, items: [], quiet: true })] }) }) }), (0, jsx_runtime_1.jsx)("div", { style: { width: '100%', maxWidth: 768 }, children: (0, jsx_runtime_1.jsx)(chat_1.Composer, { inline: true, value: "a draft", onChange: NOOP, onSend: NOOP, onStop: NOOP, busy: true }) })] }), (0, jsx_runtime_1.jsx)(section_1.Section, { name: "settings", children: (0, jsx_runtime_1.jsx)("div", { "data-settings": "demo", style: { display: 'flex', width: '100%', height: 560 }, children: (0, jsx_runtime_1.jsx)(settings_1.Settings, { entries: ENTRIES, active: "general", onPick: NOOP, children: (0, jsx_runtime_1.jsxs)(gui_1.YStack, { gap: "$6", children: [(0, jsx_runtime_1.jsx)(settings_1.Heading, { title: "General", detail: "How this surface looks and listens.", action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Save" }) }), (0, jsx_runtime_1.jsx)(settings_1.Group, { title: "Appearance", detail: "Per browser.", children: (0, jsx_runtime_1.jsxs)(settings_1.Card, { children: [(0, jsx_runtime_1.jsx)(settings_1.Row, { first: true, title: "Theme", detail: "Follows the system.", trailing: (0, jsx_runtime_1.jsx)(gui_2.Switch, {}) }), (0, jsx_runtime_1.jsx)(settings_1.Row, { mono: true, title: "hk-live-3f9a", leading: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "k" }) })] }) }), (0, jsx_runtime_1.jsx)(settings_1.Field, { label: "Call me", hint: "What the home page greets you by.", children: (0, jsx_runtime_1.jsx)(gui_2.Input, { placeholder: "Name", "aria-label": "Call me" }) }), (0, jsx_runtime_1.jsx)(settings_1.Card, { children: (0, jsx_runtime_1.jsx)(settings_1.Soft, { children: "No keys yet." }) }), (0, jsx_runtime_1.jsx)(settings_1.Soft, { action: (0, jsx_runtime_1.jsx)(gui_2.Button, { size: "sm", children: "Sign in" }), children: "Sign in to see your settings." }), (0, jsx_runtime_1.jsx)(settings_1.Note, { children: "Saved." }), (0, jsx_runtime_1.jsx)(settings_1.Once, { value: "hk-live-3f9a0c", label: "API key" })] }) }) }) }), (0, jsx_runtime_1.jsx)(section_1.Section, { name: "corner", children: (0, jsx_runtime_1.jsx)(corner_1.Corner, { help: [{ label: 'Docs', href: 'https://docs.hanzo.ai', icon: (0, jsx_runtime_1.jsx)(lucide_icons_2_1.BookOpen, { size: 18 }) }], language: { value: 'en', options: [{ code: 'en', label: 'English' }], onChange: NOOP }, currency: { value: 'USD', options: [{ code: 'USD', label: 'USD' }], onChange: NOOP } }) }), (0, jsx_runtime_1.jsx)(section_1.Section, { name: "catalog", children: (0, jsx_runtime_1.jsx)("div", { "data-shelf": "demo", style: { display: 'flex', width: '100%', height: 720 }, children: (0, jsx_runtime_1.jsxs)(catalog_1.Shelf, { title: "Customize", detail: "What the agent brings to a run.", tabs: KINDS, tab: "skills", onTab: NOOP, view: "discover", onView: NOOP, search: "Search skills", query: "", onQuery: NOOP, add: "New skill", onAdd: NOOP, children: [(0, jsx_runtime_1.jsx)(catalog_1.Featured, { title: "Triage", detail: "How we triage an issue.", meta: "Saved Sep 21", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "t" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "Triage", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsxs)(catalog_1.Tiles, { label: "Skills to add", children: [(0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_repos", detail: "List the forge's repositories.", meta: "git", mark: (0, jsx_runtime_1.jsx)(gui_2.Badge, { children: "g" }), onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_repos", added: false, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "git_branches", detail: "List a repository's branches.", meta: "git", onOpen: NOOP, action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "git_branches", added: true, onPress: NOOP }) }), (0, jsx_runtime_1.jsx)(catalog_1.Tile, { title: "kms_secrets", detail: "Read the names of an org's secrets.", action: (0, jsx_runtime_1.jsx)(catalog_1.Add, { name: "kms_secrets", added: false, busy: true, onPress: NOOP }) })] })] }) }) }), (0, jsx_runtime_1.jsxs)(section_1.Section, { name: "box", children: [(0, jsx_runtime_1.jsx)(gui_1.XStack, { items: "center", gap: 16, px: 24, py: 12, rounded: "var(--radius-lg, 0.75rem)", borderWidth: 1, children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "utility classes" }) }), (0, jsx_runtime_1.jsx)(gui_1.YStack, { gap: 8, maxW: 768, ml: "auto", mr: "auto", overflow: "hidden", children: (0, jsx_runtime_1.jsx)(gui_2.CardTitle, { children: "column" }) })] }), (0, jsx_runtime_1.jsxs)(section_1.Section, { name: "onboarding", children: [(0, jsx_runtime_1.jsxs)(react_2.IamProvider, { config: { serverUrl: 'https://hanzo.id', clientId: 'hanzo-gallery', redirectUri: 'https://hanzo.ai/auth/callback' }, autoInit: false, children: [(0, jsx_runtime_1.jsx)(auth_1.SignIn, {}), (0, jsx_runtime_1.jsx)(auth_1.SignIn, { mode: "signup" }), (0, jsx_runtime_1.jsx)(auth_1.SignIn, { frame: false })] }), (0, jsx_runtime_1.jsx)(account_1.CreateAccount, { email: "you@example.com", onCreate: NOOP, onOther: NOOP }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Do more with Hanzo Pro", width: 340, children: (0, jsx_runtime_1.jsx)(screens_1.Pro, { interval: "annual", setInterval: NOOP, onPro: NOOP, onFree: NOOP, onAll: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "How are you planning to use Hanzo?", back: NOOP, children: (0, jsx_runtime_1.jsx)(screens_1.UseCards, { onPick: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Plans that grow with you", busy: true, width: 1140, children: (0, jsx_runtime_1.jsx)(screens_1.Plans, { interval: "annual", setInterval: NOOP, onFree: NOOP, onPick: NOOP, onTeam: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Let\u2019s create your team", center: true, children: (0, jsx_runtime_1.jsx)(screens_1.TeamName, { api: "", onCreated: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Choose your seats and plan", children: (0, jsx_runtime_1.jsx)(screens_1.Seats, { interval: "monthly", setInterval: NOOP, value: { plan: 'team_premium', seats: 20 }, setValue: NOOP, onContinue: NOOP, onEnterprise: NOOP }) }), (0, jsx_runtime_1.jsx)(frame_1.Page, { site: "Hanzo", title: "Talk to our sales team", children: (0, jsx_runtime_1.jsx)(screens_1.Enterprise, { api: "", onSent: NOOP }) }), (0, jsx_runtime_1.jsxs)(gui_3.ChoiceGroup, { label: "Billing interval", children: [(0, jsx_runtime_1.jsx)(gui_3.ChoiceCard, { selected: true, onSelect: NOOP, children: "Monthly" }), (0, jsx_runtime_1.jsx)(gui_3.ChoiceCard, { selected: false, onSelect: NOOP, children: "Annually" })] }), (0, jsx_runtime_1.jsx)(gui_3.Stepper, { label: "Seats", value: 2, min: 2, max: 150, onChange: NOOP })] }), (0, jsx_runtime_1.jsx)(records_1.Records, {})] }));
199
201
  exports.Gallery = Gallery;
200
202
  /**
201
203
  * A phone's page, driven: the bar opens the rail's drawer, and the host keeps
@@ -1 +1 @@
1
- {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAmPA;;;GAGG;AACH,eAAO,MAAM,OAAO,mCAw4BnB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,gCA4BpB;eAEc,OAAO"}
1
+ {"version":3,"file":"gallery.d.ts","sourceRoot":"","sources":["../src/gallery.tsx"],"names":[],"mappings":"AAqPA;;;GAGG;AACH,eAAO,MAAM,OAAO,mCAk5BnB,CAAA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,KAAK,gCA4BpB;eAEc,OAAO"}