@hanzo/app 0.3.66 → 0.3.69

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 (46) hide show
  1. package/dist/Account.js +1 -1
  2. package/dist/App.js +12 -5
  3. package/dist/Chat.js +82 -39
  4. package/dist/ProjectsTree.d.ts +39 -0
  5. package/dist/ProjectsTree.js +179 -0
  6. package/dist/Rail.d.ts +2 -2
  7. package/dist/Rail.js +5 -5
  8. package/dist/Recents.js +53 -10
  9. package/dist/RightPane.d.ts +10 -0
  10. package/dist/RightPane.js +18 -1
  11. package/dist/Shell.js +7 -7
  12. package/dist/Sidebar.js +12 -12
  13. package/dist/bots/Bots.d.ts +9 -2
  14. package/dist/bots/Bots.js +254 -467
  15. package/dist/bots/Make.d.ts +5 -0
  16. package/dist/bots/Make.js +60 -0
  17. package/dist/bots/Panel.d.ts +11 -0
  18. package/dist/bots/Panel.js +149 -0
  19. package/dist/bots/Roster.d.ts +11 -0
  20. package/dist/bots/Roster.js +50 -0
  21. package/dist/bots/Thread.d.ts +20 -0
  22. package/dist/bots/Thread.js +148 -0
  23. package/dist/bots/api.d.ts +27 -102
  24. package/dist/bots/api.js +26 -65
  25. package/dist/bots/carry.d.ts +18 -0
  26. package/dist/bots/carry.js +22 -0
  27. package/dist/bots/face.js +4 -4
  28. package/dist/bots/grid.d.ts +10 -0
  29. package/dist/bots/grid.js +20 -0
  30. package/dist/bots/ink.d.ts +12 -3
  31. package/dist/bots/ink.js +21 -22
  32. package/dist/bots/kit.d.ts +51 -87
  33. package/dist/bots/kit.js +21 -39
  34. package/dist/bots/refusal.d.ts +28 -0
  35. package/dist/bots/refusal.js +62 -0
  36. package/dist/bots/said.d.ts +34 -0
  37. package/dist/bots/said.js +43 -0
  38. package/dist/bots/time.d.ts +16 -0
  39. package/dist/bots/time.js +86 -0
  40. package/dist/lib/chatPreferences.d.ts +1 -1
  41. package/dist/lib/chatPreferences.js +5 -3
  42. package/dist/span.js +4 -0
  43. package/dist/thread.js +1 -1
  44. package/package.json +1 -1
  45. package/dist/bots/runtime.d.ts +0 -4
  46. package/dist/bots/runtime.js +0 -388
package/dist/Recents.js CHANGED
@@ -18,6 +18,7 @@ import { useKept } from './kept.js';
18
18
  import { app } from './lib/host.js';
19
19
  import { site } from './where.js';
20
20
  import { arrange, chats, MENUS, PINNED, PLAIN, runs, SINCE, UNFILED, UNTITLED, UNTITLED_RUN, viewOf } from './recent.js';
21
+ import { hasUnreadUpdate, ProjectsTree, useChatProjects } from './ProjectsTree.js';
21
22
  import { ConversationMenu, ThreadRow, useThreadList } from './thread.js';
22
23
  /** The menu's items: each section a heading and its options (recent.ts's phrases, drawn through `t`), the one in force checked. */
23
24
  function items(mode, view, set, t) {
@@ -60,7 +61,48 @@ function Chats({ thread, view, keep, onOpen, onNew, }) {
60
61
  const store = useThreadList(view.status === 'archived', thread);
61
62
  const rows = useMemo(() => chats(store.threads), [store.threads]);
62
63
  const byId = useMemo(() => new Map(store.threads.map((t) => [t.id, t])), [store.threads]);
63
- return (_jsx(List, { mode: "chat", rows: rows, view: view, keep: keep, open: (r) => r.id === thread, reading: store.loading && !store.threads.length, error: store.error, onOpen: onOpen, threads: byId, held: thread, onNew: onNew }));
64
+ const projects = useChatProjects(rows);
65
+ const [seenAt, setSeenAt] = useKept('hanzo.chat.seen.v1', {});
66
+ const seenRef = useRef(seenAt);
67
+ seenRef.current = seenAt;
68
+ useEffect(() => {
69
+ if (!store.threads.length)
70
+ return;
71
+ const now = Date.now();
72
+ const current = seenRef.current ?? {};
73
+ let changed = false;
74
+ const next = { ...current };
75
+ for (const item of store.threads) {
76
+ if (item.id === thread) {
77
+ const ts = item.updatedAt ? Date.parse(item.updatedAt) : now;
78
+ const target = Number.isFinite(ts) ? Math.max(now, ts) : now;
79
+ if ((next[item.id] ?? 0) < target) {
80
+ next[item.id] = target;
81
+ changed = true;
82
+ }
83
+ }
84
+ else if (next[item.id] === undefined) {
85
+ const ts = item.updatedAt ? Date.parse(item.updatedAt) : now;
86
+ next[item.id] = Number.isFinite(ts) ? ts : now;
87
+ changed = true;
88
+ }
89
+ }
90
+ if (changed) {
91
+ seenRef.current = next;
92
+ setSeenAt(next);
93
+ }
94
+ }, [store.threads, thread, setSeenAt]);
95
+ const unreadIds = useMemo(() => {
96
+ const out = new Set();
97
+ for (const item of store.threads) {
98
+ if (item.unread || hasUnreadUpdate(item.id, item.updatedAt, thread, seenAt ?? {})) {
99
+ out.add(item.id);
100
+ }
101
+ }
102
+ return out;
103
+ }, [store.threads, thread, seenAt]);
104
+ const unfiledRows = useMemo(() => (view.status === 'archived' ? rows : rows.filter((r) => r.pinned || !projects.filedIds.has(r.id))), [rows, projects.filedIds, view.status]);
105
+ return (_jsx(List, { mode: "chat", rows: unfiledRows, view: view, keep: keep, open: (r) => r.id === thread, reading: store.loading && !store.threads.length, error: store.error, onOpen: onOpen, threads: byId, held: thread, onNew: onNew, unreadIds: unreadIds, projectsNode: view.status === 'archived' ? null : (_jsx(ProjectsTree, { folders: projects.folders, openMap: projects.openMap, byFolder: projects.byFolder, threads: byId, activeId: thread, onToggle: projects.toggleFolder, onCreate: projects.createFolder, onOpen: onOpen, onNew: onNew })) }));
64
106
  }
65
107
  /** Dev's Recents: the org's coding runs alone. */
66
108
  function Runs({ host, view, keep, onOpen }) {
@@ -144,7 +186,7 @@ function Runs({ host, view, keep, onOpen }) {
144
186
  }), [host]);
145
187
  return (_jsx(List, { mode: "dev", rows: rows, view: view, keep: keep, open: (row) => row.id === run, reading: store.loading && !store.value.length, error: store.error, onOpen: onOpen, threads: byId, held: run, onNew: () => host.go(''), customActions: devActions, hrefOf: (id) => new URL(site(app(id)), window.location.href).href }));
146
188
  }
147
- function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, held = null, onNew, customActions, hrefOf, }) {
189
+ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, held = null, onNew, customActions, hrefOf, unreadIds, projectsNode, }) {
148
190
  const { t } = useI18n();
149
191
  const label = useId();
150
192
  const [collapsedGroups, setCollapsedGroups] = useState({});
@@ -159,23 +201,24 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
159
201
  // shows on hover and focus, a run's state is a dot at its end.
160
202
  const row = (r) => {
161
203
  const one = threads?.get(r.id);
162
- const devAside = r.kind === 'dev' ? (_jsxs(XStack, { items: "center", gap: "$1", children: [r.pr ? _jsx(GitPullRequest, { size: 13, color: "var(--state-success)", "aria-hidden": true }) : null, _jsx(StatusDot, { status: DOTS[r.status] ?? 'idle' })] })) : undefined;
163
- const item = (_jsx(SidebarItem, { "data-kind": r.kind, active: open(r), rounded: "$4", minH: 31, paddingInlineStart: "$2", paddingInlineEnd: one || r.kind === 'dev' ? '$7' : '$2',
204
+ const isUnread = Boolean(r.kind === 'chat' && !open(r) && unreadIds?.has(r.id));
205
+ const rowAside = r.kind === 'dev' ? (_jsxs(XStack, { items: "center", gap: "$1", children: [r.pr ? _jsx(GitPullRequest, { size: 13, color: "var(--state-success)", "aria-hidden": true }) : null, _jsx(StatusDot, { status: DOTS[r.status] ?? 'idle' })] })) : isUnread ? (_jsx(XStack, { "data-slot": "thread-unread-dot", width: 6, height: 6, rounded: 999, bg: "var(--shell-unread-dot, var(--art-tide))", "aria-hidden": true })) : undefined;
206
+ const item = (_jsx(SidebarItem, { "data-kind": r.kind, active: open(r), rounded: 8, minH: 29, paddingInlineStart: "$2", paddingInlineEnd: one || r.kind === 'dev' ? '$6' : '$2',
164
207
  // A thumb's 44 on a touch screen; a conversation's ⋯ is a thumb wide there and always there: the title stops short of it.
165
208
  $touchable: one ? { minH: 44, paddingInlineEnd: 52 } : { minH: 44 }, onKeyDown: (e) => {
166
209
  if (e.key !== 'Enter' && e.key !== ' ')
167
210
  return;
168
211
  e.preventDefault?.();
169
212
  onOpen(r);
170
- }, onPress: () => onOpen(r), children: _jsx(SizableText, { size: "$3", color: open(r) ? '$ink' : '$quiet', numberOfLines: 1, display: "block", children: named(r.title) }) }));
213
+ }, onPress: () => onOpen(r), children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: open(r) ? 'var(--shell-row-active-fg, var(--text-primary))' : 'var(--shell-row-fg, var(--foreground))', numberOfLines: 1, display: "block", children: named(r.title) }) }));
171
214
  if (one)
172
- return (_jsx(ThreadRow, { t: one, active: open(r), aside: devAside, children: item }, r.id));
173
- return (_jsxs(YStack, { role: "listitem", position: "relative", children: [item, r.kind === 'dev' ? (_jsx(XStack, { position: "absolute", insetInlineEnd: "$2.5", t: 0, b: 0, items: "center", pointerEvents: "none", children: devAside })) : null] }, r.id));
215
+ return (_jsx(ThreadRow, { t: one, active: open(r), aside: rowAside, children: item }, r.id));
216
+ return (_jsxs(YStack, { role: "listitem", position: "relative", children: [item, rowAside ? (_jsx(XStack, { position: "absolute", insetInlineEnd: "$2.5", t: 0, b: 0, items: "center", pointerEvents: "none", children: rowAside })) : null] }, r.id));
174
217
  };
175
218
  // The view menu stands at the end of the Recents heading: the target's own, quiet until the pointer is near.
176
219
  const menu = (_jsx(DropdownMenu, { minWidth: 200, trigger: _jsx(XStack, { render: "button", "aria-label": t('Recents view'), width: 26, height: 26, rounded: "$2", items: "center", justify: "center", cursor: "pointer", opacity: narrowed ? 1 : 0, "$group-hover": { opacity: 1 }, focusStyle: { opacity: 1 }, $touchable: { opacity: 1 }, hoverStyle: { bg: '$hover' }, bg: narrowed ? '$hover' : 'transparent', children: _jsx(ListFilter, { size: 14, "aria-hidden": true }) }), items: items(mode, view, keep, t) }));
177
- /** A section's heading: the reference's quiet 14px label, the Recents one carrying the count and the menu. */
178
- const heading = (title, id, lead = false) => (_jsxs(XStack, { group: true, items: "center", justify: "space-between", height: 31, paddingInlineStart: "$2", paddingInlineEnd: "$1", mt: "$3", shrink: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(SizableText, { id: id, size: "$3", color: "$soft", children: title }), lead && running ? (_jsx(XStack, { "aria-label": t('{n} running', { n: running }), minW: 18, height: 18, px: "$1.5", rounded: 999, items: "center", justify: "center", bg: "$edge", borderWidth: 1, borderColor: "$borderColor", children: _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", "aria-hidden": true, "data-i18n-ltr": true, children: String(running) }) })) : null] }), _jsxs(XStack, { items: "center", gap: 2, children: [lead && rows.length > 0 ? (_jsx(XStack, { render: "button", "aria-label": t('Select multiple'), ...{ title: t('Select multiple') }, width: 26, height: 26, rounded: "$2", items: "center", justify: "center", cursor: "pointer", opacity: 0, "$group-hover": { opacity: 1 }, focusStyle: { opacity: 1 }, $touchable: { opacity: 1 }, hoverStyle: { bg: '$hover' }, onPress: () => {
220
+ /** A section's heading: quiet 11.5px label, the Recents one carrying the count and the menu. */
221
+ const heading = (title, id, lead = false) => (_jsxs(XStack, { group: true, items: "center", justify: "space-between", height: 26, paddingInlineStart: "$2", paddingInlineEnd: "$1", mt: "$2.5", shrink: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(SizableText, { id: id, fontSize: 11.5, lineHeight: 16, fontWeight: "500", color: "var(--shell-section-fg, var(--muted-foreground))", children: title }), lead && running ? (_jsx(XStack, { "aria-label": t('{n} running', { n: running }), minW: 18, height: 18, px: "$1.5", rounded: 999, items: "center", justify: "center", bg: "$edge", borderWidth: 1, borderColor: "$borderColor", children: _jsx(SizableText, { size: "$1", fontWeight: "600", color: "$ink", "aria-hidden": true, "data-i18n-ltr": true, children: String(running) }) })) : null] }), _jsxs(XStack, { items: "center", gap: 2, children: [lead && rows.length > 0 ? (_jsx(XStack, { render: "button", "aria-label": t('Select multiple'), ...{ title: t('Select multiple') }, width: 26, height: 26, rounded: "$2", items: "center", justify: "center", cursor: "pointer", opacity: 0, "$group-hover": { opacity: 1 }, focusStyle: { opacity: 1 }, $touchable: { opacity: 1 }, hoverStyle: { bg: '$hover' }, onPress: () => {
179
222
  if (typeof window !== 'undefined')
180
223
  window.dispatchEvent(new CustomEvent('hanzo:recents-select'));
181
224
  }, children: _jsx(CheckSquare, { size: 13, "aria-hidden": true }) })) : null, lead ? menu : null] })] }));
@@ -196,5 +239,5 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
196
239
  : pinned
197
240
  ? null
198
241
  : note;
199
- return (_jsx(YStack, { "data-slot": "recents", flex: 1, minH: 0, children: _jsxs(ScrollView, { flex: 1, showsVerticalScrollIndicator: false, ...{ overscrollBehavior: 'contain' }, children: [error ? _jsx(Note, { children: error.message }) : null, _jsxs(YStack, { role: "list", "aria-labelledby": label, gap: 1, children: [pinned ? (_jsxs(YStack, { role: "listitem", gap: 1, children: [heading(t(PINNED)), menus(_jsx(YStack, { role: "list", "aria-label": t(PINNED), gap: 1, children: pinned.rows.map(row) }), !loose.length)] })) : null, _jsxs(YStack, { role: "listitem", gap: 1, children: [heading(t('Recents'), label, true), menus(rest, true)] })] })] }) }));
242
+ return (_jsx(YStack, { "data-slot": "recents", flex: 1, minH: 0, children: _jsxs(ScrollView, { flex: 1, showsVerticalScrollIndicator: false, ...{ overscrollBehavior: 'contain' }, children: [error ? _jsx(Note, { children: error.message }) : null, projectsNode, _jsxs(YStack, { role: "list", "aria-labelledby": label, gap: 1, children: [pinned ? (_jsxs(YStack, { role: "listitem", gap: 1, children: [heading(t(PINNED)), menus(_jsx(YStack, { role: "list", "aria-label": t(PINNED), gap: 1, children: pinned.rows.map(row) }), !loose.length)] })) : null, _jsxs(YStack, { role: "listitem", gap: 1, children: [heading(t('Recents'), label, true), menus(rest, true)] })] })] }) }));
200
243
  }
@@ -52,3 +52,13 @@ export declare function useSites(): {
52
52
  title: string;
53
53
  url: string;
54
54
  }[];
55
+ /**
56
+ * Contextual top-right card showing Outputs and Sources when the full side
57
+ * panel is closed, matching the reference desktop layout.
58
+ */
59
+ export declare function ContextCard({ at, sections, onCreate, onOpenPanel, }: {
60
+ at: string;
61
+ sections: Section[];
62
+ onCreate: () => void;
63
+ onOpenPanel: () => void;
64
+ }): import("react").JSX.Element;
package/dist/RightPane.js CHANGED
@@ -19,7 +19,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
19
19
  import { useEffect, useMemo, useState } from 'react';
20
20
  import { useI18n } from '@hanzo/i18n/react';
21
21
  import { FileCode, Globe, Image as ImageMark, Paperclip, Plus } from 'lucide-react';
22
- import { Box, DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Text, } from '@hanzo/ui';
22
+ import { Box, DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Text, XStack, YStack, } from '@hanzo/ui';
23
23
  import { useAi } from '@hanzo/ai/react';
24
24
  import { artifacts, name as titleOf, PAGE } from '@hanzo/build';
25
25
  import { said as told } from './lib/attach.js';
@@ -245,3 +245,20 @@ export function useSites() {
245
245
  }, [site]);
246
246
  return rows;
247
247
  }
248
+ /**
249
+ * Contextual top-right card showing Outputs and Sources when the full side
250
+ * panel is closed, matching the reference desktop layout.
251
+ */
252
+ export function ContextCard({ at, sections, onCreate, onOpenPanel, }) {
253
+ const { t } = useI18n();
254
+ const ai = useAi();
255
+ const outputsSection = sections.find((s) => s.id === 'outputs');
256
+ const sourcesSection = sections.find((s) => s.id === 'sources');
257
+ return (_jsxs(YStack, { "data-slot": "context-card", width: 220, rounded: 12, bg: "var(--shell-card-bg, var(--surface-3))", borderWidth: 1, borderColor: "var(--shell-card-border, var(--border-strong))", overflow: "hidden", children: [_jsxs(YStack, { px: 14, py: 11, gap: 5, children: [_jsxs(XStack, { items: "center", justify: "space-between", minH: 20, children: [_jsx(Text, { fontSize: 12.5, lineHeight: 16, fontWeight: "600", color: "var(--shell-card-title, var(--text-primary))", children: t('Outputs') }), _jsx(Box, { render: "button", "aria-label": t('Create a file or site'), onClick: onCreate, p: "$1", rounded: "$2", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: _jsx(Plus, { size: 15, color: "var(--shell-section-fg, var(--muted-foreground))", "aria-hidden": true }) })] }), outputsSection && outputsSection.entries.length > 0 ? (_jsx(YStack, { gap: 3, children: outputsSection.entries.slice(0, 4).map((entry) => (_jsxs(XStack, { render: "button", items: "center", gap: 6, py: 2, px: 4, mx: -4, rounded: 6, cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => {
258
+ entry.open();
259
+ onOpenPanel();
260
+ }, children: [entry.icon, _jsx(Text, { fontSize: 12.5, lineHeight: 17, color: "$ink", numberOfLines: 1, flex: 1, children: entry.title })] }, entry.id))) })) : (_jsx(Box, { render: "button", onClick: onCreate, cursor: "pointer", self: "flex-start", children: _jsx(Text, { fontSize: 12.5, lineHeight: 17, color: "var(--shell-section-fg, var(--muted-foreground))", children: t('Create a file or site') }) }))] }), _jsx(Box, { height: 1, width: "100%", bg: "var(--shell-card-border, var(--border-strong))" }), _jsxs(YStack, { px: 14, py: 11, gap: 5, children: [_jsxs(XStack, { items: "center", justify: "space-between", minH: 20, children: [_jsx(Text, { fontSize: 12.5, lineHeight: 16, fontWeight: "600", color: "var(--shell-card-title, var(--text-primary))", children: t('Sources') }), _jsx(Add, { at: at })] }), sourcesSection && sourcesSection.entries.length > 0 ? (_jsx(YStack, { gap: 3, children: sourcesSection.entries.slice(0, 4).map((entry) => (_jsxs(XStack, { render: "button", items: "center", gap: 6, py: 2, px: 4, mx: -4, rounded: 6, cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => {
261
+ entry.open();
262
+ onOpenPanel();
263
+ }, children: [entry.icon, _jsx(Text, { fontSize: 12.5, lineHeight: 17, color: "$ink", numberOfLines: 1, flex: 1, children: entry.title })] }, entry.id))) })) : (_jsx(Box, { render: "button", onClick: () => take(at, { api: ai, org: org() }), cursor: "pointer", self: "flex-start", children: _jsx(Text, { fontSize: 12.5, lineHeight: 17, color: "var(--shell-section-fg, var(--muted-foreground))", children: t('Attach files or connect apps') }) }))] })] }));
264
+ }
package/dist/Shell.js CHANGED
@@ -955,7 +955,7 @@ const CEIL = 480;
955
955
  /** Per-reader, per-browser. A width that resets is a width you set every load. */
956
956
  const SPAN = "hanzo.sidebar.span";
957
957
  /** The shell's sidebar: its default width, px. */
958
- const SIDEBAR_WIDTH = 244;
958
+ const SIDEBAR_WIDTH = 240;
959
959
  /**
960
960
  * Where an app's own column goes, when it has one.
961
961
  *
@@ -1083,7 +1083,7 @@ function Leave({ href, children }) {
1083
1083
  }
1084
1084
  function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
1085
1085
  const { t } = useI18n();
1086
- return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t("Places"), ...sheet(0), gridArea: "rail", minH: 0, borderInlineEndWidth: 1, borderInlineEndStyle: "solid", borderColor: "var(--edge, var(--white-06))", "$max-md": {
1086
+ return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t("Places"), ...sheet(0), gridArea: "rail", minH: 0, bg: "var(--shell-rail-bg, var(--secondary))", borderInlineEndWidth: 1, borderInlineEndStyle: "solid", borderColor: "var(--shell-rail-border, var(--border))", "$max-md": {
1087
1087
  flexDirection: "row",
1088
1088
  items: "center",
1089
1089
  borderInlineEndWidth: 0,
@@ -1373,7 +1373,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
1373
1373
  },
1374
1374
  signOut: () => void logout(),
1375
1375
  };
1376
- const list = (_jsxs(Sidebar, { ref: side.ref, ...side.props, $md: { width: "var(--span)" }, "$max-md": { width: "100%", maxW: 280 }, ...sheet(0), ...(dir === "rtl" ? { borderRightWidth: 0, borderLeftWidth: 1 } : { borderRightWidth: 1 }), borderColor: "var(--edge, var(--white-06))", position: "relative", children: [_jsx(Gutter
1376
+ const list = (_jsxs(Sidebar, { ref: side.ref, ...side.props, $md: { width: "var(--span)" }, "$max-md": { width: "100%", maxW: 280 }, ...sheet(0), ...(dir === "rtl" ? { borderRightWidth: 0, borderLeftWidth: 1 } : { borderRightWidth: 1 }), bg: "var(--shell-sidebar-bg, var(--surface-2))", borderColor: "var(--shell-sidebar-border, var(--border))", position: "relative", children: [_jsx(Gutter
1377
1377
  // The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
1378
1378
  , {
1379
1379
  // The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
@@ -1399,11 +1399,11 @@ function Frame({ mode, children, navigate, back, forward, }) {
1399
1399
  navigate?.(site("/referral"));
1400
1400
  dismiss();
1401
1401
  }, children: t("Share Hanzo") }), _jsx(XStack, { items: "center", justify: "flex-end", gap: "$1", px: "$1.5", py: "$1", borderTopWidth: 1, borderColor: "$borderColor", children: _jsx(Box, { render: "button", onClick: toggle, "aria-label": t("Collapse sidebar"), p: "$2", rounded: "$2", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: _jsx(PanelLeftClose, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }) })] })) : null) : null] }));
1402
- return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: "64px auto minmax(0, 1fr) auto", gridTemplateRows: "56px minmax(0, 1fr)", gridTemplateAreas: '"bar bar bar bar" "rail list pane side"', "$max-md": {
1402
+ return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: "44px auto minmax(0, 1fr) auto", gridTemplateRows: "38px minmax(0, 1fr)", gridTemplateAreas: '"bar bar bar bar" "rail list pane side"', "$max-md": {
1403
1403
  gridTemplateColumns: "minmax(0, 1fr)",
1404
- gridTemplateRows: `56px minmax(0, 1fr) ${TABS_HEIGHT}`,
1404
+ gridTemplateRows: `44px minmax(0, 1fr) ${TABS_HEIGHT}`,
1405
1405
  gridTemplateAreas: '"bar" "pane" "rail"',
1406
- }, position: "relative", width: "100%", height: "100dvh", overflow: "hidden", bg: "$background", backgroundImage: "var(--pane-ground)", children: [_jsx(Rail, { mode: mode, places: places, open: asked, team: onApex ? (signedIn ? ENTRY : WORKSPACE) : undefined, navigate: navigate, onSettings: () => showSettings(FIRST), onMore: () => setFinding(true) }), _jsx(Box, { gridArea: "bar", "data-slot": "bar", "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, shrink: 0, children: _jsx(BusinessHeader, { appId: onApex ? (mode === "dev" ? "dev" : "chat") : "team", appTitle: onApex ? (mode === "dev" ? "Hanzo Dev" : "Hanzo Chat") : "Hanzo Team", apps: BUSINESS_APPS, brandMark: _jsx(HanzoMark, { size: 18 }), onSelectApp: (item) => {
1406
+ }, position: "relative", width: "100%", height: "100dvh", overflow: "hidden", bg: "$background", backgroundImage: "var(--pane-ground)", children: [_jsx(Rail, { mode: mode, places: places, open: asked, team: onApex ? (signedIn ? ENTRY : WORKSPACE) : undefined, navigate: navigate, onSettings: () => showSettings(FIRST), onMore: () => setFinding(true) }), _jsx(Box, { gridArea: "bar", "data-slot": "bar", "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, shrink: 0, bg: "var(--shell-bar-bg, var(--secondary))", borderBottomWidth: 1, borderColor: "var(--shell-bar-border, var(--border))", children: _jsx(BusinessHeader, { appId: onApex ? (mode === "dev" ? "dev" : "chat") : "team", appTitle: onApex ? (mode === "dev" ? "Hanzo Dev" : "Hanzo Chat") : "Hanzo Team", apps: BUSINESS_APPS, brandMark: _jsx(HanzoMark, { size: 18 }), onSelectApp: (item) => {
1407
1407
  if (typeof window === "undefined")
1408
1408
  return;
1409
1409
  try {
@@ -1466,7 +1466,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
1466
1466
  void switchToAccount(found);
1467
1467
  else
1468
1468
  void addAccount();
1469
- }, onAddAccount: () => void addAccount(), onSettings: () => showSettings(FIRST), onSignOut: () => void logout(), leftSlot: _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t(shown ? "Close sidebar" : "Open sidebar"), onPress: toggle, onMouseEnter: () => setPeeking(true), children: _jsx(PanelLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), back || forward ? (_jsxs(XStack, { display: "none", $md: { display: "flex" }, items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t("Back"), onPress: () => back?.(), children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), _jsx(SidebarIconButton, { ...TAP, label: t("Forward"), onPress: () => forward?.(), children: _jsx(ArrowRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] })) : null] }), rightSlot: _jsxs(XStack, { shrink: 0, minW: 0, justify: "flex-end", items: "center", gap: "$2", children: [settled && !signedIn ? (_jsx(Box, { ...TAP, render: "button", onClick: () => enter(LOGIN), display: "flex", items: "center", justify: "center", cursor: "pointer", children: _jsx(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Sign in") }) }) })) : null, settled && signedIn && free ? (_jsx(Box, { ...TAP, render: "button", onClick: () => window.location.assign(payUrl("/cart", { returnUrl: window.location.href })), display: "flex", items: "center", justify: "center", cursor: "pointer", "aria-label": t("Upgrade"), "data-slot": "bar-upgrade", children: _jsxs(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", gap: "$1.5", hoverStyle: { bg: "$hover" }, children: [_jsx(Sparkles, { size: 13, "aria-hidden": true, color: "var(--primary)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade") })] }) })) : null, _jsxs(XStack, { display: "none", $lg: { display: "flex" }, items: "center", gap: "$1", children: [_jsx(SidebarIconButton, { ...TAP, label: t(aside === "roster" ? "Hide directory & roster" : "Show directory & roster"), onPress: () => showAside(aside === "roster" ? null : "roster"), children: _jsx(Users, { size: 16, "aria-hidden": true }) }), _jsx(SidebarIconButton, { ...TAP, label: t(aside === "tasks" ? "Close side panel" : "Open side panel"), onPress: () => showAside(aside === "tasks" ? null : "tasks"), children: _jsx(PanelRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] }), _jsx(WindowControls, {})] }), children: _jsx(YStack, { width: 420, maxW: "100%", position: "relative", children: _jsxs(Box, { render: "button", onClick: () => setFinding(true), display: "flex", flexDirection: "row", "data-slot": "find", items: "center", "$max-md": { justify: "center" }, gap: "$2", width: "100%", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }), _jsx(Text, { fontSize: "$1", color: "$soft", "$max-md": { display: "none" }, children: t("Search {workspace}", { workspace }) }), _jsx(Shortcut, { keys: ["Mod", "K"], marginInlineStart: "auto", "data-i18n-ltr": "", "$max-md": { display: "none" } })] }) }) }) }), shown ? (_jsx(Box, { render: "button", "aria-label": t("Close sidebar"), onClick: dismiss, ...scrim, "data-slot": "scrim", position: "absolute", t: 56, r: 0, b: TABS_HEIGHT, l: 0, z: "var(--z-scrim)", $md: { display: "none" } })) : null, shown ? (_jsx(XStack, { "data-slot": "list", gridArea: "list", position: asked ? "relative" : "absolute", ...(asked ? {} : { top: 56, bottom: 0, insetInlineStart: 64 }), "$max-md": { position: "fixed", t: 56, r: 0, b: TABS_HEIGHT, l: 0, width: "100%" }, z: "var(--z-drawer)", bg: "$background", onMouseEnter: () => setPeeking(true), onMouseLeave: () => {
1469
+ }, onAddAccount: () => void addAccount(), onSettings: () => showSettings(FIRST), onSignOut: () => void logout(), leftSlot: _jsxs(XStack, { items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t(shown ? "Close sidebar" : "Open sidebar"), onPress: toggle, onMouseEnter: () => setPeeking(true), children: _jsx(PanelLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), back || forward ? (_jsxs(XStack, { display: "none", $md: { display: "flex" }, items: "center", gap: "$1", shrink: 0, children: [_jsx(SidebarIconButton, { ...TAP, label: t("Back"), onPress: () => back?.(), children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) }), _jsx(SidebarIconButton, { ...TAP, label: t("Forward"), onPress: () => forward?.(), children: _jsx(ArrowRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] })) : null] }), rightSlot: _jsxs(XStack, { shrink: 0, minW: 0, justify: "flex-end", items: "center", gap: "$2", children: [settled && !signedIn ? (_jsx(Box, { ...TAP, render: "button", onClick: () => enter(LOGIN), display: "flex", items: "center", justify: "center", cursor: "pointer", children: _jsx(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Sign in") }) }) })) : null, settled && signedIn && free ? (_jsx(Box, { ...TAP, render: "button", onClick: () => window.location.assign(payUrl("/cart", { returnUrl: window.location.href })), display: "flex", items: "center", justify: "center", cursor: "pointer", "aria-label": t("Upgrade"), "data-slot": "bar-upgrade", children: _jsxs(XStack, { items: "center", justify: "center", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", gap: "$1.5", hoverStyle: { bg: "$hover" }, children: [_jsx(Sparkles, { size: 13, "aria-hidden": true, color: "var(--primary)" }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: "$ink", children: t("Upgrade") })] }) })) : null, _jsxs(XStack, { display: "none", $lg: { display: "flex" }, items: "center", gap: "$1", children: [_jsx(SidebarIconButton, { ...TAP, label: t(aside === "roster" ? "Hide directory & roster" : "Show directory & roster"), onPress: () => showAside(aside === "roster" ? null : "roster"), children: _jsx(Users, { size: 16, "aria-hidden": true }) }), _jsx(SidebarIconButton, { ...TAP, label: t(aside === "tasks" ? "Close side panel" : "Open side panel"), onPress: () => showAside(aside === "tasks" ? null : "tasks"), children: _jsx(PanelRight, { size: 16, "aria-hidden": true, "data-i18n-mirror": "" }) })] }), _jsx(WindowControls, {})] }), children: _jsx(YStack, { width: 420, maxW: "100%", position: "relative", children: _jsxs(Box, { render: "button", onClick: () => setFinding(true), display: "flex", flexDirection: "row", "data-slot": "find", items: "center", "$max-md": { justify: "center" }, gap: "$2", width: "100%", height: CONTROL, px: "$2.5", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: "$hover" }, children: [_jsx(SearchIcon, { size: 13, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }), _jsx(Text, { fontSize: "$1", color: "$soft", "$max-md": { display: "none" }, children: t("Search {workspace}", { workspace }) }), _jsx(Shortcut, { keys: ["Mod", "K"], marginInlineStart: "auto", "data-i18n-ltr": "", "$max-md": { display: "none" } })] }) }) }) }), shown ? (_jsx(Box, { render: "button", "aria-label": t("Close sidebar"), onClick: dismiss, ...scrim, "data-slot": "scrim", position: "absolute", t: 38, r: 0, b: TABS_HEIGHT, l: 0, z: "var(--z-scrim)", $md: { display: "none" } })) : null, shown ? (_jsx(XStack, { "data-slot": "list", gridArea: "list", position: asked ? "relative" : "absolute", ...(asked ? {} : { top: 38, bottom: 0, insetInlineStart: 44 }), "$max-md": { position: "fixed", t: 44, r: 0, b: TABS_HEIGHT, l: 0, width: "100%" }, z: "var(--z-drawer)", bg: "var(--shell-sidebar-bg, var(--surface-2))", onMouseEnter: () => setPeeking(true), onMouseLeave: () => {
1470
1470
  if (!asked)
1471
1471
  setPeeking(false);
1472
1472
  }, children: list })) : null, _jsx(Split, { swap: settingsPane ? _jsx(Suspense, { fallback: null, children: _jsx(SettingsPane, { id: settingsPane }) }) : undefined, children: children }), finding ? (_jsx(Search, { actions: doors, onClose: found,
package/dist/Sidebar.js CHANGED
@@ -68,16 +68,16 @@ const keys = (press) => ({
68
68
  press();
69
69
  },
70
70
  });
71
- /** A row of the sidebar: a pill on a 36px pitch matching the rail's mark height, a thumb's 44 on a touch screen, lit where the reader is. */
72
- const ROW = { rounded: '$4', minH: MARK, py: 0, px: '$2', $touchable: { minH: 44 } };
73
- /** A sidebar link row hugs its icon and label rather than stretching across the full column width. */
74
- const COMPACT_ROW = { ...ROW, self: 'flex-start', '$platform-web': { width: 'fit-content', maxWidth: '100%' } };
71
+ /** A row of the sidebar: a full-width 29px pill, 44px on a touch screen, lit where the reader is. */
72
+ const ROW = { rounded: 8, minH: 29, py: 0, px: '$2', width: '100%', $touchable: { minH: 44 } };
73
+ /** A sidebar link row spans the column width so hover and active pills align with Recents. */
74
+ const COMPACT_ROW = ROW;
75
75
  /** The run activity behind the bell: the runs that moved last, newest first. */
76
76
  const RECENT = 6;
77
77
  /** What a place that takes the sidebar is called at its head. */
78
78
  const TITLE = { library: phrase('Library'), scheduled: phrase('Scheduled tasks'), customize: phrase('Customize') };
79
- /** A header mark: a 16px glyph in a 32px target, a thumb's 44 on a touch screen. */
80
- const HEAD = { width: 32, height: 32, rounded: '$3', $touchable: { width: 44, height: 44 } };
79
+ /** A header mark: a 15px glyph in a 28px target, a thumb's 44 on a touch screen. */
80
+ const HEAD = { width: 28, height: 28, rounded: '$3', $touchable: { width: 44, height: 44 } };
81
81
  export function dispatchTabsAction(detail) {
82
82
  if (typeof window === 'undefined')
83
83
  return;
@@ -251,7 +251,7 @@ function Activity({ host }) {
251
251
  }))
252
252
  : [{ key: 'none', label: t('Nothing new'), disabled: true, onSelect: () => { } }]),
253
253
  ];
254
- return (_jsx(DropdownMenu, { minWidth: 280, trigger: _jsx(XStack, { render: "button", "aria-label": t('Activity'), ...{ title: t('Activity') }, ...HEAD, items: "center", justify: "center", cursor: "pointer", opacity: 0.7, hoverStyle: { bg: '$hover', opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, children: _jsx(Bell, { size: 16, "aria-hidden": true }) }), items: items }));
254
+ return (_jsx(DropdownMenu, { minWidth: 280, trigger: _jsx(XStack, { render: "button", "aria-label": t('Activity'), ...{ title: t('Activity') }, ...HEAD, items: "center", justify: "center", cursor: "pointer", opacity: 0.7, hoverStyle: { bg: '$hover', opacity: 1 }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, children: _jsx(Bell, { size: 15, "aria-hidden": true }) }), items: items }));
255
255
  }
256
256
  export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer = false, rail, foot, places, }) {
257
257
  const { t, dir } = useI18n();
@@ -350,13 +350,13 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
350
350
  empty();
351
351
  go(talk());
352
352
  };
353
- return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : { '$platform-web': { '--span': `${span.span}px`, ...(anon ? { overflow: 'visible' } : null) } }), position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : `var(--span, ${WIDTH}px)`, maxW: drawer ? undefined : `var(--span, ${WIDTH}px)`, children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: "$2", pt: drawer ? 'var(--pane-gap)' : 0,
353
+ return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : { '$platform-web': { '--span': `${span.span}px`, ...(anon ? { overflow: 'visible' } : null) } }), position: "relative", flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : `var(--span, ${WIDTH}px)`, maxW: drawer ? undefined : `var(--span, ${WIDTH}px)`, bg: "var(--shell-sidebar-bg, var(--surface-2))", borderRightWidth: drawer ? 0 : 1, borderColor: "var(--shell-sidebar-border, var(--border))", children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: 8, pt: drawer ? 'var(--pane-gap)' : 2,
354
354
  // In the drawer the menu's own foot padding is the gap; its foot row stands on it.
355
355
  pb: drawer ? 0 : '$2', gap: "$0", "$platform-web": anon && !drawer ? { overflow: 'visible' } : undefined, children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
356
356
  // The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
357
- height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 18, lineHeight: 24, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 4, paddingInlineEnd: 2,
357
+ height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 15, lineHeight: 20, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: 2, paddingInlineStart: 8, paddingInlineEnd: 2,
358
358
  // The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
359
- height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(Text, { flex: 1, minW: 0, fontSize: 24, lineHeight: 28, fontWeight: "700", color: "$ink", numberOfLines: 1, children: wordmark(mode) }), drawer || anon ? null : _jsx(Activity, { host: host }), anon ? null : (_jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
359
+ height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsxs(XStack, { flex: 1, minW: 0, items: "center", gap: 4, children: [_jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "600", color: "$ink", numberOfLines: 1, children: wordmark(mode) }), _jsx(ChevronDown, { size: 13, strokeWidth: 2, color: "var(--shell-section-fg, var(--muted-foreground))", "aria-hidden": true })] }), drawer || anon ? null : _jsx(Activity, { host: host }), anon ? null : (_jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
360
360
  ? {
361
361
  width: 40,
362
362
  height: 40,
@@ -365,7 +365,7 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
365
365
  borderColor: 'var(--border-strong)',
366
366
  bg: 'var(--pane-fill)',
367
367
  }
368
- : HEAD), children: _jsx(Search, { size: drawer ? 18 : 16, "aria-hidden": true }) }))] })), mode === 'chat' ? (_jsxs(YStack, { role: "list", gap: 2, shrink: 0, pt: drawer ? 0 : 4, children: [_jsx(YStack, { role: "listitem", self: "flex-start", children: _jsx(SidebarItem, { "data-slot": "app-new", ...COMPACT_ROW, active: !thread && !anonSettingsOpen && !anonThreadTitle, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(MARKS.chat.make, { size: 16, "aria-hidden": true }) }), onPress: create, ...keys(create), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('New chat') }) }) }), anon ? (_jsxs(_Fragment, { children: [_jsx(YStack, { role: "listitem", self: "flex-start", children: _jsx(SidebarItem, { "data-slot": "app-images", ...COMPACT_ROW, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(ImageMark, { size: 16, "aria-hidden": true }) }), onPress: () => {
368
+ : { width: 28, height: 28, rounded: '$3', $touchable: { width: 44, height: 44 } }), children: _jsx(Search, { size: drawer ? 18 : 15, "aria-hidden": true }) }))] })), mode === 'chat' ? (_jsxs(YStack, { role: "list", gap: 2, shrink: 0, pt: drawer ? 0 : 2, children: [_jsx(YStack, { role: "listitem", width: "100%", children: _jsx(SidebarItem, { "data-slot": "app-new", ...COMPACT_ROW, active: !thread && !anonSettingsOpen && !anonThreadTitle, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: _jsx(MARKS.chat.make, { size: 15, "aria-hidden": true }) }), onPress: create, ...keys(create), children: _jsx(Text, { fontSize: 13, lineHeight: 18, color: "$ink", children: t('New chat') }) }) }), anon ? (_jsxs(_Fragment, { children: [_jsx(YStack, { role: "listitem", self: "flex-start", children: _jsx(SidebarItem, { "data-slot": "app-images", ...COMPACT_ROW, bg: "transparent", hoverStyle: { bg: '$hover' }, icon: _jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: _jsx(ImageMark, { size: 16, "aria-hidden": true }) }), onPress: () => {
369
369
  create();
370
370
  if (typeof window !== 'undefined') {
371
371
  window.dispatchEvent(new CustomEvent('hanzo:anon-prompt', { detail: { text: t('Create an image of ') } }));
@@ -385,7 +385,7 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
385
385
  if (typeof window !== 'undefined') {
386
386
  window.dispatchEvent(new CustomEvent('hanzo:anon-plugins'));
387
387
  }
388
- }), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Plugins') }) }) })] })) : null] })) : mode === 'beta' && !drawer ? null : (_jsx(YStack, { "data-slot": "app-places", shrink: 0, pt: drawer ? 0 : 4, children: groups.map((g, i) => (_jsxs(YStack, { pt: i ? '$2' : 0, children: [i && g.label ? (_jsx(Text, { id: `${uid}-${g.id}`, paddingInlineStart: "$2", pb: 2, fontSize: "$3", color: "$soft", children: g.label })) : null, _jsx(YStack, { role: "list", "aria-labelledby": i && g.label ? `${uid}-${g.id}` : undefined, "aria-label": i && g.label ? undefined : g.label || (at ? t(TITLE[at]) : g.id), gap: 1, children: g.links.map((link) => (_jsx(YStack, { role: "listitem", self: "flex-start", maxW: "100%", minW: 0, children: _jsx(SidebarItem, { ...COMPACT_ROW, "data-place-id": link.id, ...(link.id === NEW ? { 'data-slot': 'app-new' } : {}), active: link.active, icon: link.icon || link.id === NEW ? (_jsx(XStack, { width: 20, height: 20, items: "center", justify: "center", shrink: 0, children: link.icon ?? _jsx(Make, { size: 16, "aria-hidden": true }) })) : null, onPress: link.onPress, ...keys(() => link.onPress?.()), children: _jsx(Text, { fontSize: "$3", color: link.active ? '$ink' : '$quiet', numberOfLines: 1, children: link.label }) }) }, link.id))) })] }, g.id))) })), rail, mode === 'beta' && !drawer ? (_jsx(YStack, { "data-slot": "beta-sidebar-slot", flex: 1, minH: 0, pt: 4 })) : anon && mode === 'chat' && anonThreadTitle ? (_jsxs(YStack, { "data-slot": "recents", flex: 1, minH: 0, pt: "$3", children: [_jsx(Text, { paddingInlineStart: "$2", pb: "$1", fontSize: "$3", color: "$soft", children: t('Recents') }), _jsx(YStack, { role: "list", gap: 1, children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, active: !anonSettingsOpen, onPress: () => setAnonSettings(false), children: _jsx(Text, { fontSize: "$3", color: "$ink", numberOfLines: 1, children: anonThreadTitle }) }) }) })] })) : mode === 'hosted' || mode === 'beta' || mode === 'tabs' || anon || at ? (_jsx(YStack, { flex: 1, minH: 0 })) : (_jsx(Recents, { host: host, mode: mode === 'dev' ? 'dev' : 'chat', thread: thread, onOpen: open, onNew: create })), anon ? (_jsx(YStack, { "data-slot": "anon-foot", gap: "$2", pt: "$2", shrink: 0, z: 10, children: _jsxs(YStack, { "data-slot": "anon-tailored", gap: "$2", pt: "$1", pb: "$1", px: "$2", children: [_jsxs(XStack, { render: "button", "aria-expanded": tailoredOpen, "aria-label": t('Get responses tailored to you'), items: "center", justify: "space-between", gap: "$1.5", cursor: "pointer", onPress: () => setTailoredOpen((v) => !v), hoverStyle: { opacity: 0.85 }, children: [_jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "700", color: "$ink", numberOfLines: 1, flex: 1, children: t('Get responses tailored to you') }), tailoredOpen ? (_jsx(ChevronDown, { size: 14, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" })) : (_jsx(ChevronUp, { size: 14, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }))] }), tailoredOpen ? (_jsx(Text, { fontSize: 12, lineHeight: 17, color: "$soft", children: t('Log in to get answers based on saved chats, plus create images and upload files.') })) : null, _jsxs(XStack, { gap: "$2", pt: "$0.5", children: [_jsx(Button, { size: "sm", variant: "outline", flex: 1, rounded: 9999, "data-slot": "column-login", onPress: () => {
388
+ }), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Plugins') }) }) })] })) : null] })) : mode === 'beta' && !drawer ? null : (_jsx(YStack, { "data-slot": "app-places", shrink: 0, pt: drawer ? 0 : 4, children: groups.map((g, i) => (_jsxs(YStack, { pt: i ? '$2' : 0, children: [i && g.label ? (_jsx(Text, { id: `${uid}-${g.id}`, paddingInlineStart: "$2", pb: 2, fontSize: "$3", color: "$soft", children: g.label })) : null, _jsx(YStack, { role: "list", "aria-labelledby": i && g.label ? `${uid}-${g.id}` : undefined, "aria-label": i && g.label ? undefined : g.label || (at ? t(TITLE[at]) : g.id), gap: 1, children: g.links.map((link) => (_jsx(YStack, { role: "listitem", width: "100%", minW: 0, children: _jsx(SidebarItem, { ...COMPACT_ROW, "data-place-id": link.id, ...(link.id === NEW ? { 'data-slot': 'app-new' } : {}), active: link.active, icon: link.icon || link.id === NEW ? (_jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: link.icon ?? _jsx(Make, { size: 15, "aria-hidden": true }) })) : null, onPress: link.onPress, ...keys(() => link.onPress?.()), children: _jsx(Text, { fontSize: 13, lineHeight: 18, color: link.active ? '$ink' : '$quiet', numberOfLines: 1, children: link.label }) }) }, link.id))) })] }, g.id))) })), rail, mode === 'beta' && !drawer ? (_jsx(YStack, { "data-slot": "beta-sidebar-slot", flex: 1, minH: 0, pt: 4 })) : anon && mode === 'chat' && anonThreadTitle ? (_jsxs(YStack, { "data-slot": "recents", flex: 1, minH: 0, pt: "$3", children: [_jsx(Text, { paddingInlineStart: "$2", pb: "$1", fontSize: "$3", color: "$soft", children: t('Recents') }), _jsx(YStack, { role: "list", gap: 1, children: _jsx(YStack, { role: "listitem", children: _jsx(SidebarItem, { ...ROW, active: !anonSettingsOpen, onPress: () => setAnonSettings(false), children: _jsx(Text, { fontSize: "$3", color: "$ink", numberOfLines: 1, children: anonThreadTitle }) }) }) })] })) : mode === 'hosted' || mode === 'beta' || mode === 'tabs' || anon || at ? (_jsx(YStack, { flex: 1, minH: 0 })) : (_jsx(Recents, { host: host, mode: mode === 'dev' ? 'dev' : 'chat', thread: thread, onOpen: open, onNew: create })), anon ? (_jsx(YStack, { "data-slot": "anon-foot", gap: "$2", pt: "$2", shrink: 0, z: 10, children: _jsxs(YStack, { "data-slot": "anon-tailored", gap: "$2", pt: "$1", pb: "$1", px: "$2", children: [_jsxs(XStack, { render: "button", "aria-expanded": tailoredOpen, "aria-label": t('Get responses tailored to you'), items: "center", justify: "space-between", gap: "$1.5", cursor: "pointer", onPress: () => setTailoredOpen((v) => !v), hoverStyle: { opacity: 0.85 }, children: [_jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "700", color: "$ink", numberOfLines: 1, flex: 1, children: t('Get responses tailored to you') }), tailoredOpen ? (_jsx(ChevronDown, { size: 14, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" })) : (_jsx(ChevronUp, { size: 14, "aria-hidden": true, color: "var(--soft, var(--muted-foreground))" }))] }), tailoredOpen ? (_jsx(Text, { fontSize: 12, lineHeight: 17, color: "$soft", children: t('Log in to get answers based on saved chats, plus create images and upload files.') })) : null, _jsxs(XStack, { gap: "$2", pt: "$0.5", children: [_jsx(Button, { size: "sm", variant: "outline", flex: 1, rounded: 9999, "data-slot": "column-login", onPress: () => {
389
389
  if (typeof window !== 'undefined')
390
390
  window.location.assign('/login?next=%2Fchat');
391
391
  }, children: t('Log in') }), _jsx(Button, { size: "sm", flex: 1, rounded: 9999, "data-slot": "column-signup", onPress: () => {
@@ -1,2 +1,9 @@
1
- import React from 'react';
2
- export declare function Bots(): React.JSX.Element;
1
+ export declare function Bots({ foot, bot: held, onBot, }?: {
2
+ /** The reader and the other apps at the roster's foot. A host whose own chrome
3
+ * already holds both (hanzo.team's rail and bar) passes false. */
4
+ foot?: boolean;
5
+ /** The open bot, when the host's router holds the address (`?bot=`); with it,
6
+ * `onBot` is how a press or Back moves it. Absent, the app keeps the address. */
7
+ bot?: string | null;
8
+ onBot?: (name: string | null, step: boolean) => void;
9
+ }): import("react").JSX.Element;