@hanzo/app 0.3.70 → 0.3.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Account.js +1 -1
- package/dist/App.js +25 -26
- package/dist/Chat.js +6 -27
- package/dist/ProjectsTree.js +5 -5
- package/dist/Rail.d.ts +2 -2
- package/dist/Rail.js +5 -5
- package/dist/Recents.js +3 -3
- package/dist/RightPane.d.ts +0 -10
- package/dist/RightPane.js +1 -18
- package/dist/Shell.js +16 -11
- package/dist/Sidebar.js +12 -12
- package/dist/ground.d.ts +6 -3
- package/dist/ground.js +6 -3
- package/dist/where.d.ts +1 -1
- package/dist/where.js +4 -2
- package/package.json +1 -1
package/dist/Account.js
CHANGED
|
@@ -129,7 +129,7 @@ function usePlan(org, enabled) {
|
|
|
129
129
|
/** The person's picture, or their initials. */
|
|
130
130
|
export function Face({ host, size = 28 }) {
|
|
131
131
|
const p = host.person;
|
|
132
|
-
return (_jsx(XStack, { width: size, height: size, rounded: 9999, items: "center", justify: "center", bg:
|
|
132
|
+
return (_jsx(XStack, { width: size, height: size, rounded: 9999, items: "center", justify: "center", bg: "$raised", overflow: "hidden", shrink: 0, borderWidth: 1, borderColor: "$borderColor", children: p?.avatar ? (_jsx("img", { src: p.avatar, alt: "", width: size, height: size })) : (_jsx(SizableText, { fontSize: Math.max(10, Math.round(size * 0.39)), lineHeight: size, fontWeight: "600", color: "$ink", children: initials(p?.name || p?.email || '') })) }));
|
|
133
133
|
}
|
|
134
134
|
/** A row's face: its icon in a 20px well, its words, and what trails them. */
|
|
135
135
|
function Line({ icon, children, sub, trail }) {
|
package/dist/App.js
CHANGED
|
@@ -65,7 +65,7 @@ import { ArrowLeft, ArrowRight, Clapperboard, RefreshCw, Sparkles, Workflow } fr
|
|
|
65
65
|
import { AiProvider } from '@hanzo/ai/react';
|
|
66
66
|
import { XStack, YStack } from '@hanzo/gui';
|
|
67
67
|
import { Button, Text } from '@hanzo/ui';
|
|
68
|
-
import { Builder, HostProvider,
|
|
68
|
+
import { Builder, HostProvider, PrefsProvider, route, tabs } from '@hanzo/build';
|
|
69
69
|
import * as studioPkg from '@hanzo/studio';
|
|
70
70
|
import { nav as places } from '@hanzo/studio';
|
|
71
71
|
import { useAi } from './lib/ai.js';
|
|
@@ -77,13 +77,13 @@ import { isPlans, leave, useDevHost } from './dev.js';
|
|
|
77
77
|
import { Gate } from './Gate.js';
|
|
78
78
|
import { useHost } from './host.js';
|
|
79
79
|
import { useKept } from './kept.js';
|
|
80
|
-
import { Mark, raised, Rail, Toggle } from './Rail.js';
|
|
80
|
+
import { Mark, MARK, raised, Rail, RAIL, Toggle } from './Rail.js';
|
|
81
81
|
import { Layer, Lift, useDrawer } from './Drawer.js';
|
|
82
82
|
import { empty, openThread, showSettings, useOpen } from './open.js';
|
|
83
83
|
import { Split } from './Shell.js';
|
|
84
84
|
import { Search } from './Search.js';
|
|
85
85
|
import { summons } from './seek.js';
|
|
86
|
-
import { floor, pane } from './ground.js';
|
|
86
|
+
import { floor, pane, SIDE } from './ground.js';
|
|
87
87
|
import { org as currentOrg, pick } from './lib/session.js';
|
|
88
88
|
import { payUrl } from './lib/pay.js';
|
|
89
89
|
import { useFree } from './Upgrade.js';
|
|
@@ -112,7 +112,7 @@ const Hosted = lazy(() => import('./Hosted.js').then((m) => ({ default: m.Hosted
|
|
|
112
112
|
const Betas = lazy(() => import('./Betas.js').then((m) => ({ default: m.BetasPane })));
|
|
113
113
|
/** `/` is Chat on a new conversation. */
|
|
114
114
|
const HOME = { mode: 'chat', thread: null };
|
|
115
|
-
/** The bar's height, px:
|
|
115
|
+
/** The bar's height, px: a thin top bar on the ground. */
|
|
116
116
|
const BAR = 38;
|
|
117
117
|
/** Where each mode was last, so the rail goes back to it. */
|
|
118
118
|
const last = { chat: '', dev: '', studio: '', design: '', flow: '', tabs: '' };
|
|
@@ -332,16 +332,9 @@ function Window({ bar, betas }) {
|
|
|
332
332
|
shut();
|
|
333
333
|
setFinding(true);
|
|
334
334
|
};
|
|
335
|
-
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...
|
|
336
|
-
if (mode === 'dev')
|
|
337
|
-
host.go('');
|
|
338
|
-
else {
|
|
339
|
-
empty();
|
|
340
|
-
move(talk());
|
|
341
|
-
}
|
|
342
|
-
}, children: mode === 'dev' ? _jsx(MARKS.dev.make, { size: 15, "aria-hidden": true }) : _jsx(MARKS.chat.make, { size: 15, "aria-hidden": true }) }) })] }), bar ? (bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null) : null] })] }), _jsxs(XStack, { ref: drawer.pane, "data-app": mode, "data-slot": "frame", ...(bar ? null : floor), ...drawer.slide, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)",
|
|
335
|
+
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...floor, flex: 1, minW: 0, height: bar ? '100%' : '100dvh', overflow: "hidden", rounded: bar ? '$3' : undefined, "$max-md": { position: 'fixed', t: TOP, l: 0, r: 0, height: HEIGHT, ...{ overflow: 'clip' } }, children: [_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", "$max-md": bar ? undefined : { display: 'none' }, onMouseDown: bar ? dragWindow : undefined, onDoubleClick: bar ? toggleWindowMaximize : undefined, ...(bar?.drag ?? null), children: [_jsxs(XStack, { "data-slot": "title-bar-start", height: "100%", items: "center", gap: 2, pl: bar?.inset ? bar.inset + 4 : (RAIL - (MARK ?? 34)) / 2, pr: 8, shrink: 0, minW: closed || alone ? undefined : `calc(${RAIL}px + var(--app-sidebar-span, ${SIDE}px))`, ...(bar?.drag ?? null), children: [bar ? (_jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) })) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) })] }), _jsxs(XStack, { id: "hanzo-titlebar-slot", "data-slot": "title-bar-main", flex: 1, minW: 0, self: "stretch", items: "center", justify: "space-between", pl: 14, pr: 10, gap: 6, ...(bar?.drag ?? null), children: [mode === 'chat' ? null : (_jsx(XStack, { "data-slot": "titlebar-fallback", flex: 1, minW: 0, items: "center", justify: "space-between", gap: 8, children: _jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "500", color: "$ink", numberOfLines: 1, children: mode === 'dev' && !inPlace ? 'Dev' : mode === 'studio' ? 'Studio' : mode === 'design' ? 'Design' : mode === 'flow' ? 'Flow' : mode === 'tabs' ? 'Tabs' : '' }) })), bar ? (bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null) : null] })] }), _jsxs(XStack, { ref: drawer.pane, "data-app": mode, "data-slot": "frame", bg: "transparent", ...drawer.slide, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)",
|
|
343
336
|
// The gap above the pane is the gap at its end and foot; a window's own bar above it is that gap.
|
|
344
|
-
pt: bar ? 0 : 'var(--pane-gap)', "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsxs(YStack, { height: "100%", position: "relative", "$max-md": { display: 'none' }, children: [_jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), closed ? (_jsx(YStack, { "data-slot": "sidebar-reopen-edge", position: "absolute", t: 0, b: 0, r: -4, width: 8, z: 20, cursor: "ew-resize", onDoubleClick: () => setClosed(false), onMouseDown: (down) => {
|
|
337
|
+
pt: bar ? 0 : 'var(--pane-gap)', $md: { pt: 0 }, "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsxs(YStack, { height: "100%", position: "relative", "$max-md": { display: 'none' }, children: [_jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), closed ? (_jsx(YStack, { "data-slot": "sidebar-reopen-edge", position: "absolute", t: 0, b: 0, r: -4, width: 8, z: 20, cursor: "ew-resize", onDoubleClick: () => setClosed(false), onMouseDown: (down) => {
|
|
345
338
|
const e = down;
|
|
346
339
|
const startX = e.clientX ?? 0;
|
|
347
340
|
const onMove = (mv) => {
|
|
@@ -357,19 +350,25 @@ function Window({ bar, betas }) {
|
|
|
357
350
|
};
|
|
358
351
|
window.addEventListener('mousemove', onMove);
|
|
359
352
|
window.addEventListener('mouseup', onUp);
|
|
360
|
-
} })) : null] }),
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
353
|
+
} })) : null] }), _jsxs(XStack, { "data-slot": "inner-surface", flex: 1, minW: 0, minH: 0, $md: {
|
|
354
|
+
rounded: 'var(--pane-round)',
|
|
355
|
+
overflow: 'hidden',
|
|
356
|
+
borderWidth: 1,
|
|
357
|
+
borderColor: 'var(--pane-edge, var(--edge, var(--white-06)))',
|
|
358
|
+
bg: 'var(--pane-fill)',
|
|
359
|
+
}, children: [closed || alone ? null : (_jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage",
|
|
360
|
+
// A column: the phone's bar, then the panes taking the rest. Not a grid of `auto` and
|
|
361
|
+
// `1fr` rows: from md the bar is display none, which leaves the grid, so the panes were
|
|
362
|
+
// placed in the `auto` row and stood their content's height, and Dev's pane, which
|
|
363
|
+
// scrolls inside, collapsed to its border (Projects drew blank). The rest of the row
|
|
364
|
+
// beside the rail and the sidebar, never width 100%: a View does not shrink, so at the
|
|
365
|
+
// row's full width again the pane stood past the window's edge.
|
|
366
|
+
flex: 1, minW: 0, minH: 0, "$max-md": { pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: anonSettings && host.person === null ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(AnonSettingsPane, { host: host, onClose: () => {
|
|
367
|
+
setAnonSettings(false);
|
|
368
|
+
if (typeof window !== 'undefined') {
|
|
369
|
+
window.dispatchEvent(new CustomEvent('hanzo:anon-settings', { detail: { open: false } }));
|
|
370
|
+
}
|
|
371
|
+
} }) })) : mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'design' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : mode === 'flow' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Workflow, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Flow" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'flow')?.line ?? 'Visual workflows and multi-agent pipelines.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'flow'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(FlowStudio, { host: maker }) }) })) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Clapperboard, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Studio" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'studio')?.line ?? 'Director Studio for AI film, video, and creative production.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'studio'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(DirectorStudio, { host: maker }) }) })) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6', rounded: 0 }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsxs(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden', $md: { rounded: 0 } }), position: "relative", flex: 1, minW: 0, minH: 0, children: [!plans && !run && !inPlace && closed && free && host.person !== null ? (_jsx(XStack, { position: "absolute", t: 8, r: 12, z: 5, items: "center", "$max-md": { display: 'none' }, children: _jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t('Upgrade plan'), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => window.location.assign(payUrl('/cart', { org: currentOrg(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t('Upgrade plan') })] }) })) : null, plans ? null : _jsx(Builder, { host: host, rail: false })] })) })] })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "calc(var(--pane-gap) + 4px)", $touchable: { pt: 'calc(var(--pane-gap) + 4px)' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null, _jsx(AppContextMenu, { host: host, mode: mode, closed: closed, onToggleSidebar: flip, onSeek: seek, onNewChat: () => {
|
|
373
372
|
empty();
|
|
374
373
|
move(talk());
|
|
375
374
|
}, go: move })] }) }) }) }) }));
|
package/dist/Chat.js
CHANGED
|
@@ -58,11 +58,11 @@ import { useHydrated } from "./lib/hydrated.js";
|
|
|
58
58
|
import { base, served } from "./lib/ai.js";
|
|
59
59
|
import { onServed } from "./lib/served.js";
|
|
60
60
|
import { refused as worded, speech, useDictation, useTalk, useVoice } from "@hanzo/voice";
|
|
61
|
-
import { Check, ChevronDown, CircleAlert,
|
|
61
|
+
import { Check, ChevronDown, CircleAlert, FileText, Ghost, Image as ImageMark, Library as LibraryMark, Paperclip, Sparkles, SquarePlus, X } from "lucide-react";
|
|
62
62
|
import { ENSO } from "./lib/ai.js";
|
|
63
63
|
import { openThread, empty as emptyOpen, useOpen } from "./open.js";
|
|
64
64
|
import { Side } from "./Shell.js";
|
|
65
|
-
import {
|
|
65
|
+
import { SEED, look, useSections, useSites } from "./RightPane.js";
|
|
66
66
|
import { Share } from "./Share.js";
|
|
67
67
|
import { ConversationMenu, ThreadMore, useThreadActions, useThreadList } from "./thread.js";
|
|
68
68
|
import { Schedule } from "./Schedule.js";
|
|
@@ -106,26 +106,6 @@ import { handleHint } from './hint.js';
|
|
|
106
106
|
* since.
|
|
107
107
|
*/
|
|
108
108
|
const MAX_ANON_TURNS = 3;
|
|
109
|
-
function extractWritingTurn(text) {
|
|
110
|
-
const trimmed = text.trim();
|
|
111
|
-
if (!trimmed)
|
|
112
|
-
return null;
|
|
113
|
-
const fenced = trimmed.match(/^```(?:writing|markdown|md|text)\s*\n([\s\S]*?)\n```\s*$/i);
|
|
114
|
-
if (fenced)
|
|
115
|
-
return fenced[1]?.trim() || null;
|
|
116
|
-
if (!trimmed.includes("```") && trimmed.includes("\n\n"))
|
|
117
|
-
return trimmed;
|
|
118
|
-
return null;
|
|
119
|
-
}
|
|
120
|
-
function WritingCard({ text, label, copyLabel, copiedLabel, }) {
|
|
121
|
-
const [copied, setCopied] = useState(false);
|
|
122
|
-
return (_jsxs(YStack, { "data-slot": "writing-card", width: "100%", rounded: 14, borderWidth: 1, borderColor: "var(--writing-border, var(--border-strong))", overflow: "hidden", children: [_jsxs(XStack, { "data-slot": "writing-head", height: 36, px: 16, items: "center", justify: "space-between", bg: "var(--writing-head-bg, var(--surface-3))", borderBottomWidth: 1, borderColor: "var(--writing-divider, var(--border))", children: [_jsx(Text, { fontSize: 12, lineHeight: 16, fontWeight: "500", color: "var(--shell-section-fg, var(--muted-foreground))", children: label }), _jsx(Box, { render: "button", "data-slot": "writing-copy", "aria-label": copied ? copiedLabel : copyLabel, title: copied ? copiedLabel : copyLabel, width: 26, height: 26, rounded: 6, items: "center", justify: "center", cursor: "pointer", hoverStyle: { bg: "$hover" }, onClick: () => {
|
|
123
|
-
void navigator.clipboard?.writeText(text).then(() => {
|
|
124
|
-
setCopied(true);
|
|
125
|
-
setTimeout(() => setCopied(false), 1600);
|
|
126
|
-
});
|
|
127
|
-
}, children: copied ? (_jsx(Check, { size: 14, color: "var(--foreground)", "aria-hidden": true })) : (_jsx(Copy, { size: 14, color: "var(--shell-section-fg, var(--muted-foreground))", "aria-hidden": true })) })] }), _jsx(YStack, { px: 18, py: 16, bg: "var(--writing-body-bg, var(--surface-2))", children: _jsx(Prose, { text: text }) })] }));
|
|
128
|
-
}
|
|
129
109
|
function synthesizeAnonReply(prompt) {
|
|
130
110
|
const q = prompt.trim();
|
|
131
111
|
const lower = q.toLowerCase();
|
|
@@ -1838,7 +1818,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
1838
1818
|
const next = chatPrefs.approvalMode === "manual" ? "auto" : "manual";
|
|
1839
1819
|
setChatPrefs({ approvalMode: next });
|
|
1840
1820
|
carry.mode.set(next);
|
|
1841
|
-
}, children: [_jsx(CircleAlert, { size: 14, strokeWidth: 1.9, color: chatPrefs.approvalMode === "manual" ? "var(--
|
|
1821
|
+
}, children: [_jsx(CircleAlert, { size: 14, strokeWidth: 1.9, color: chatPrefs.approvalMode === "manual" ? "var(--muted-foreground)" : "var(--foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 12.5, lineHeight: 16, fontWeight: "500", color: chatPrefs.approvalMode === "manual" ? "var(--muted-foreground)" : "var(--foreground)", numberOfLines: 1, children: chatPrefs.approvalMode === "manual" ? t("Manual approval") : t("Full access") })] }), _jsxs(XStack, { items: "center", gap: 2, shrink: 0, children: [_jsx(Tune, { mind: { ...mind, models: filteredListed }, effort: {
|
|
1842
1822
|
value: chatPrefs.effort || "auto",
|
|
1843
1823
|
set: (eff) => {
|
|
1844
1824
|
setChatPrefs({ effort: eff });
|
|
@@ -1847,7 +1827,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
1847
1827
|
mind.pace(next);
|
|
1848
1828
|
},
|
|
1849
1829
|
items: EFFORTS,
|
|
1850
|
-
}, mode: null, limits: limits, onUpgrade: (id) => setAsk({ model: nameOf(id, listed) }) }), _jsx(ChevronDown, { size: 12, color: "var(--
|
|
1830
|
+
}, mode: null, limits: limits, onUpgrade: (id) => setAsk({ model: nameOf(id, listed) }) }), _jsx(ChevronDown, { size: 12, color: "var(--muted-foreground)", "aria-hidden": true })] })] })),
|
|
1851
1831
|
// A file or an image pasted into the field is held like a picked one;
|
|
1852
1832
|
// words paste as words.
|
|
1853
1833
|
field: {
|
|
@@ -2040,7 +2020,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
2040
2020
|
}, children: t("Sign up for free") }) }), _jsx(XStack, { display: "flex", $sm: { display: "none" }, children: _jsx(Button, { size: "xs", rounded: 9999, px: "$3", "data-slot": "header-signup-compact", onPress: () => {
|
|
2041
2021
|
if (typeof window !== "undefined")
|
|
2042
2022
|
window.location.assign("/signup?next=%2Fchat");
|
|
2043
|
-
}, children: t("Sign up") }) })] })) : free && (sidebarClosed || !media.md) ? (_jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t("Upgrade plan"), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t("Upgrade plan") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, {}) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), open ? _jsx(Share, { thread: open }) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), inTopChrome ? null : (_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) }))] })] })),
|
|
2023
|
+
}, children: t("Sign up") }) })] })) : free && (sidebarClosed || !media.md) ? (_jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t("Upgrade plan"), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, onPress: () => window.location.assign(payUrl('/cart', { org: org(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t("Upgrade plan") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, {}) })) : (_jsxs(Tooltip, { children: [_jsx(TooltipTrigger, { asChild: true, children: _jsx(XStack, { render: "button", "data-slot": "header-private-chat", "aria-label": t("Private chat"), "aria-pressed": forgetful, width: 32, height: 32, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: "$hover" }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: "solid", outlineColor: "var(--ring)" }, onPress: () => setForgetful(!forgetful), children: _jsx(Ghost, { size: 16, strokeWidth: 1.75, color: forgetful ? "var(--foreground)" : "var(--muted-foreground)", fill: forgetful ? "currentColor" : "none", "aria-hidden": true }) }) }), _jsx(TooltipContent, { children: forgetful ? t("Private chat is on: this conversation is not saved") : t("Private chat") })] })), open ? _jsx(Share, { thread: open }) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }) }), inTopChrome ? null : (_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }) }))] })] })), wide && aside !== null ? (_jsx(Side, { children: _jsx(Panel, { side: deck, kinds: NONE, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) })) : null, !wide && panel ? _jsx(Panel, { side: deck, kinds: NONE, sheet: true, onHide: () => setPanel(false), label: t("Tabs"), ...browsing }) : null, _jsx(XStack, { flex: 1, minH: 0, minW: 0, children: _jsx(YStack, { "data-slot": "talk", flex: 1, minH: 0, minW: 0, children: _jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
|
|
2044
2024
|
// WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
|
|
2045
2025
|
// composer are one pair centred in the pane (`center`: rows `1fr auto auto
|
|
2046
2026
|
// 1fr`), so the heading reads close above the field and nothing stands at
|
|
@@ -2104,8 +2084,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
2104
2084
|
: [];
|
|
2105
2085
|
return (_jsxs(YStack, { gap: "$3", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [parts.map((part, i) => (_jsxs(YStack, { gap: "$1", children: [part.who ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Face, { src: faces[part.who]?.avatar, emoji: faces[part.who]?.emoji, name: part.who, size: 20 }), _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: part.who })] })) : null, _jsx(Prose, { text: part.text }), part.text ? (_jsx(Reply, { text: part.text, title: shownTitle, listen: listen(part.who ?? withWhom ?? undefined), onOpen: opener(part.text), onRedo: (act) => redoTurn(turn.id, act), onBranch: () => branchTurn(turn.id) })) : null] }, i))), silent.length ? (_jsx(Text, { fontSize: "$2", color: "$soft", children: t("No answer from {names} in this reply.", { names: join(silent, t) }) })) : null, byline(turn.id)] }));
|
|
2106
2086
|
}
|
|
2107
|
-
|
|
2108
|
-
return (_jsxs(YStack, { gap: "$1.5", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [writingBody ? (_jsx(WritingCard, { text: writingBody, label: t("Writing"), copyLabel: t("Copy"), copiedLabel: t("Copied") })) : (_jsx(Prose, { text: said })), turn.role === "assistant" && said ? (_jsx(Reply, { text: writingBody ?? said, title: shownTitle, listen: listen(withWhom ?? undefined), onOpen: opener(said), onRedo: (act) => redoTurn(turn.id, act), onBranch: () => branchTurn(turn.id) })) : null, turn.role === "assistant" && said ? byline(turn.id) : null] }));
|
|
2087
|
+
return (_jsxs(YStack, { gap: "$1.5", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [_jsx(Prose, { text: said }), turn.role === "assistant" && said ? (_jsx(Reply, { text: said, title: shownTitle, listen: listen(withWhom ?? undefined), onOpen: opener(said), onRedo: (act) => redoTurn(turn.id, act), onBranch: () => branchTurn(turn.id) })) : null, turn.role === "assistant" && said ? byline(turn.id) : null] }));
|
|
2109
2088
|
},
|
|
2110
2089
|
// The page's ONE heading, and it belongs to the empty transcript rather
|
|
2111
2090
|
// than to a signed-out branch — the branch is gone, and the heading went
|
package/dist/ProjectsTree.js
CHANGED
|
@@ -152,15 +152,15 @@ export function ProjectsTree({ folders, openMap, byFolder, threads, activeId, on
|
|
|
152
152
|
setDraft('');
|
|
153
153
|
setCreating(false);
|
|
154
154
|
};
|
|
155
|
-
return (_jsxs(YStack, { "data-slot": "chat-projects", gap: 1, pt: "$2", children: [_jsxs(XStack, { group: true, items: "center", justify: "space-between", height: 26, paddingInlineStart: "$2", paddingInlineEnd: "$1", shrink: 0, children: [_jsx(SizableText, { fontSize: 11.5, lineHeight: 16, fontWeight: "500", color: "var(--
|
|
155
|
+
return (_jsxs(YStack, { "data-slot": "chat-projects", gap: 1, pt: "$2", children: [_jsxs(XStack, { group: true, items: "center", justify: "space-between", height: 26, paddingInlineStart: "$2", paddingInlineEnd: "$1", shrink: 0, children: [_jsx(SizableText, { fontSize: 11.5, lineHeight: 16, fontWeight: "500", color: "var(--muted-foreground)", children: t('Projects') }), _jsx(XStack, { render: "button", "data-slot": "chat-project-add", "aria-label": t('New project'), ...{ title: t('New project') }, width: 22, height: 22, rounded: "$2", items: "center", justify: "center", cursor: "pointer", opacity: folders.length === 0 ? 0.72 : 0, "$group-hover": { opacity: 1 }, focusStyle: { opacity: 1 }, $touchable: { opacity: 1 }, hoverStyle: { bg: '$hover', opacity: 1 }, onPress: () => setCreating(true), children: _jsx(Plus, { size: 13, color: "var(--muted-foreground)", "aria-hidden": true }) })] }), folders.length > 0 ? (_jsx(ConversationMenu, { threads: threads, active: activeId, onGone: onNew, primary: false, children: _jsx(YStack, { role: "list", "aria-label": t('Projects'), gap: 1, children: folders.map((folder) => {
|
|
156
156
|
const expanded = Boolean(openMap[folder.id]);
|
|
157
157
|
const children = byFolder.get(folder.id) ?? [];
|
|
158
|
-
return (_jsxs(YStack, { role: "listitem", gap: 1, children: [_jsx(SidebarItem, { "data-slot": "project-folder", "data-project-id": folder.id, "aria-expanded": expanded, rounded: 8, minH: 28, py: 0, px: "$2", $touchable: { minH: 40 }, icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: expanded ? (_jsx(FolderOpen, { size: 15, strokeWidth: 1.75, color: "var(--
|
|
158
|
+
return (_jsxs(YStack, { role: "listitem", gap: 1, children: [_jsx(SidebarItem, { "data-slot": "project-folder", "data-project-id": folder.id, "aria-expanded": expanded, rounded: 8, minH: 28, py: 0, px: "$2", $touchable: { minH: 40 }, icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: expanded ? (_jsx(FolderOpen, { size: 15, strokeWidth: 1.75, color: "var(--muted-foreground)", "aria-hidden": true })) : (_jsx(Folder, { size: 15, strokeWidth: 1.75, color: "var(--muted-foreground)", "aria-hidden": true })) }), onPress: () => onToggle(folder.id), onKeyDown: (e) => {
|
|
159
159
|
if (e.key !== 'Enter' && e.key !== ' ')
|
|
160
160
|
return;
|
|
161
161
|
e.preventDefault?.();
|
|
162
162
|
onToggle(folder.id);
|
|
163
|
-
}, children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: "var(--
|
|
163
|
+
}, children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: "var(--foreground)", numberOfLines: 1, display: "block", children: folder.name }) }), expanded ? (children.length > 0 ? (_jsx(YStack, { role: "list", "aria-label": folder.name, gap: 1, children: children.map((child) => {
|
|
164
164
|
const threadObj = threads.get(child.id);
|
|
165
165
|
const isOpen = child.id === activeId;
|
|
166
166
|
const labelText = child.title === UNTITLED ? t(UNTITLED) : child.title;
|
|
@@ -169,9 +169,9 @@ export function ProjectsTree({ folders, openMap, byFolder, threads, activeId, on
|
|
|
169
169
|
return;
|
|
170
170
|
e.preventDefault?.();
|
|
171
171
|
onOpen(child);
|
|
172
|
-
}, children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: isOpen ? 'var(--
|
|
172
|
+
}, children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: isOpen ? 'var(--text-primary)' : 'var(--text-secondary)', numberOfLines: 1, display: "block", children: labelText }) }));
|
|
173
173
|
return threadObj ? (_jsx(ThreadRow, { t: threadObj, active: isOpen, children: item }, child.id)) : (_jsx(YStack, { role: "listitem", children: item }, child.id));
|
|
174
|
-
}) })) : (_jsx(XStack, { height: 25, items: "center", paddingInlineStart: 28, paddingInlineEnd: "$2", "data-slot": "project-empty", children: _jsx(SizableText, { fontSize: 12.5, lineHeight: 17, color: "var(--
|
|
174
|
+
}) })) : (_jsx(XStack, { height: 25, items: "center", paddingInlineStart: 28, paddingInlineEnd: "$2", "data-slot": "project-empty", children: _jsx(SizableText, { fontSize: 12.5, lineHeight: 17, color: "var(--text-tertiary)", numberOfLines: 1, children: t('No chats') }) }))) : null] }, folder.id));
|
|
175
175
|
}) }) })) : null, _jsx(Dialog, { open: creating, onOpenChange: setCreating, children: _jsxs(DialogContent, { maxW: 400, rounded: "$6", gap: "$3", children: [_jsx(DialogTitle, { children: t('New project') }), _jsx(Input, { autoFocus: true, value: draft, onChangeText: setDraft, placeholder: t('Project name'), "aria-label": t('Project name'), maxLength: 64, onKeyDown: (e) => {
|
|
176
176
|
if (e.key === 'Enter' && !e.nativeEvent?.isComposing && e.keyCode !== 229)
|
|
177
177
|
submit();
|
package/dist/Rail.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type Host } from '@hanzo/build';
|
|
|
3
3
|
import { type Place } from './lib/host.js';
|
|
4
4
|
/** The rail's width, px. */
|
|
5
5
|
export declare const RAIL: number;
|
|
6
|
-
/** A mark, px: a
|
|
7
|
-
export declare const MARK =
|
|
6
|
+
/** A mark, px: a 34px rounded square on the rail's 48px. */
|
|
7
|
+
export declare const MARK = 34;
|
|
8
8
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
9
9
|
export declare const RAISED: {
|
|
10
10
|
readonly library: '-/artifacts';
|
package/dist/Rail.js
CHANGED
|
@@ -51,8 +51,8 @@ import { HEAD, INSET, TOUCH_HEAD } from './ground.js';
|
|
|
51
51
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
52
52
|
/** The rail's width, px. */
|
|
53
53
|
export const RAIL = 2 * INSET;
|
|
54
|
-
/** A mark, px: a
|
|
55
|
-
export const MARK =
|
|
54
|
+
/** A mark, px: a 34px rounded square on the rail's 48px. */
|
|
55
|
+
export const MARK = 34;
|
|
56
56
|
/** A mark on a touch screen, px: a thumb's 44. */
|
|
57
57
|
const TOUCH = 44;
|
|
58
58
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
@@ -72,7 +72,7 @@ export function raised(at) {
|
|
|
72
72
|
}
|
|
73
73
|
/** One mark: an icon button named for where it goes (`label`, already in the reader's language), its name its tooltip, lit where the reader is. */
|
|
74
74
|
export function Mark({ label, on = false, onPress, children, ...rest }) {
|
|
75
|
-
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded:
|
|
75
|
+
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded: 10, items: "center", justify: "center", shrink: 0, cursor: "pointer", opacity: on ? 1 : 0.72, bg: on ? 'var(--rail-active, var(--white-14))' : 'transparent', hoverStyle: { bg: on ? 'var(--rail-active, var(--white-14))' : 'var(--rail-hover, var(--white-08))', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' },
|
|
76
76
|
// A thumb's 44px on a touch screen.
|
|
77
77
|
$touchable: { width: TOUCH, height: TOUCH }, ...rest, children: children }));
|
|
78
78
|
}
|
|
@@ -126,12 +126,12 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
126
126
|
const betasDialog = _jsx(BetasDialog, { open: betas, onOpenChange: setBetas, go: reach });
|
|
127
127
|
if (rows)
|
|
128
128
|
return (_jsxs(YStack, { "data-slot": "places", render: "nav", "aria-label": t('Products'), pt: "$2", shrink: 0, children: [_jsxs(YStack, { role: "list", gap: 2, children: [anon ? null : (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "place-design", icon: _jsx(MARKS.design.icon, { size: 16, "aria-hidden": true }) }) })), !anon && opened('studio') ? (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "place-studio", icon: _jsx(MARKS.studio.icon, { size: 16, "aria-hidden": true }) }) })) : null, anon ? null : (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "place-tabs", icon: _jsx(MARKS.tabs.icon, { size: 16, "aria-hidden": true }) }) })), apps.map((a) => (_jsx(YStack, { role: "listitem", children: _jsx(Row, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `place-app-${a.id}`, icon: _jsx(a.icon, { size: 16, "aria-hidden": true }) }) }, a.id))), anon ? null : (_jsx(YStack, { role: "listitem", children: _jsx(DropdownMenu, { placement: "bottom-start", minWidth: 220, trigger: _jsx(Row, { label: t('More'), "data-slot": "place-more", "aria-haspopup": "menu", icon: _jsx(Ellipsis, { size: 16, "aria-hidden": true }) }), items: rest }) }))] }), betasDialog] }));
|
|
129
|
-
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
|
|
129
|
+
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
|
|
130
130
|
// As tall as the window and no taller: its marks scroll inside it (below), never the page.
|
|
131
131
|
minH: 0,
|
|
132
132
|
// The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot by the
|
|
133
133
|
// same inset, so the account mirrors the sidebar's toggle across the rail.
|
|
134
|
-
pt: (HEAD - MARK) / 2 +
|
|
134
|
+
pt: (HEAD - MARK) / 2 + 3, pb: 8, gap: 3, shrink: 0, items: "center", "$max-md": { pb: 0 }, $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2, pb: 0 }, children: [toggle ? (_jsx(YStack, { children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", items: "center", gap: 4, width: "100%", "$platform-web": { scrollbarWidth: 'none' }, children: [_jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MARKS.chat.icon, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(MARKS.dev.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "rail-design", children: _jsx(MARKS.design.icon, { size: 18, "aria-hidden": true }) })), !anon && opened('studio') ? (_jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(MARKS.studio.icon, { size: 18, "aria-hidden": true }) })) : null, anon ? null : (_jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(MARKS.tabs.icon, { size: 18, "aria-hidden": true }) })), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(MARKS.library.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(MARKS.scheduled.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(MARKS.customize.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) })), betasDialog, !anon && rest.length ? (_jsx(DropdownMenu
|
|
135
135
|
// Toward the content: right of the rail, left of it right to left.
|
|
136
136
|
, {
|
|
137
137
|
// Toward the content: right of the rail, left of it right to left.
|
package/dist/Recents.js
CHANGED
|
@@ -202,7 +202,7 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
|
|
|
202
202
|
const row = (r) => {
|
|
203
203
|
const one = threads?.get(r.id);
|
|
204
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(--
|
|
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(--foreground)", "aria-hidden": true })) : undefined;
|
|
206
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',
|
|
207
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.
|
|
208
208
|
$touchable: one ? { minH: 44, paddingInlineEnd: 52 } : { minH: 44 }, onKeyDown: (e) => {
|
|
@@ -210,7 +210,7 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
|
|
|
210
210
|
return;
|
|
211
211
|
e.preventDefault?.();
|
|
212
212
|
onOpen(r);
|
|
213
|
-
}, onPress: () => onOpen(r), children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: open(r) ? 'var(--
|
|
213
|
+
}, onPress: () => onOpen(r), children: _jsx(SizableText, { fontSize: 13, lineHeight: 18, color: open(r) ? 'var(--text-primary)' : 'var(--foreground)', numberOfLines: 1, display: "block", children: named(r.title) }) }));
|
|
214
214
|
if (one)
|
|
215
215
|
return (_jsx(ThreadRow, { t: one, active: open(r), aside: rowAside, children: item }, r.id));
|
|
216
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));
|
|
@@ -218,7 +218,7 @@ function List({ mode, rows, view, keep, open, reading, error, onOpen, threads, h
|
|
|
218
218
|
// The view menu stands at the end of the Recents heading: the target's own, quiet until the pointer is near.
|
|
219
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) }));
|
|
220
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(--
|
|
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(--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: () => {
|
|
222
222
|
if (typeof window !== 'undefined')
|
|
223
223
|
window.dispatchEvent(new CustomEvent('hanzo:recents-select'));
|
|
224
224
|
}, children: _jsx(CheckSquare, { size: 13, "aria-hidden": true }) })) : null, lead ? menu : null] })] }));
|
package/dist/RightPane.d.ts
CHANGED
|
@@ -52,13 +52,3 @@ 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,
|
|
22
|
+
import { Box, DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Text, } 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,20 +245,3 @@ 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 =
|
|
958
|
+
const SIDEBAR_WIDTH = 280;
|
|
959
959
|
/**
|
|
960
960
|
* Where an app's own column goes, when it has one.
|
|
961
961
|
*
|
|
@@ -1018,7 +1018,7 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1018
1018
|
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { render: "main", "data-slot": "pane", gridArea: "pane", position: "relative", ...(framed
|
|
1019
1019
|
? bare
|
|
1020
1020
|
? null
|
|
1021
|
-
: { ...pane(), overflow: "hidden" }
|
|
1021
|
+
: { ...pane(), overflow: "hidden", $md: { rounded: 0 } }
|
|
1022
1022
|
: {
|
|
1023
1023
|
...sheet(0),
|
|
1024
1024
|
// The edge the pane shares with the column before it: the left, or the right in a right-to-left language.
|
|
@@ -1052,9 +1052,14 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1052
1052
|
target.addEventListener("pointermove", onMove);
|
|
1053
1053
|
target.addEventListener("pointerup", cleanup);
|
|
1054
1054
|
target.addEventListener("pointercancel", cleanup);
|
|
1055
|
-
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ?
|
|
1056
|
-
|
|
1057
|
-
|
|
1055
|
+
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ? "var(--side-fill, var(--pane-fill))" : sheet(1).backgroundColor), ...(framed
|
|
1056
|
+
? {
|
|
1057
|
+
rounded: 0,
|
|
1058
|
+
borderInlineStartWidth: 1,
|
|
1059
|
+
borderInlineStartStyle: "solid",
|
|
1060
|
+
borderColor: "var(--pane-edge, var(--edge, var(--white-06)))",
|
|
1061
|
+
}
|
|
1062
|
+
: null), marginInlineStart: 0, ref: split.aside, position: "relative", shrink: 0, minH: 0, display: "none", $lg: { display: "flex" }, children: [split.grip ? (_jsx(Gutter, { ...split.grip, label: t("Resize side panel"), gap: split.side.hidden ? 0 : undefined, inset: split.side.hidden ? -4 : 1 })) : null, _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", rounded: framed ? 0 : "var(--pane-round)", ref: (el) => setSlot(el instanceof HTMLElement ? el : null) })] })) : null] }));
|
|
1058
1063
|
}
|
|
1059
1064
|
/**
|
|
1060
1065
|
* THE RAIL: where you can go, as marks with their names under them. It is the
|
|
@@ -1083,7 +1088,7 @@ function Leave({ href, children }) {
|
|
|
1083
1088
|
}
|
|
1084
1089
|
function Rail({ mode, places, team, open, navigate, onSettings, onMore, }) {
|
|
1085
1090
|
const { t } = useI18n();
|
|
1086
|
-
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t("Places"), ...sheet(0), gridArea: "rail", minH: 0,
|
|
1091
|
+
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": {
|
|
1087
1092
|
flexDirection: "row",
|
|
1088
1093
|
items: "center",
|
|
1089
1094
|
borderInlineEndWidth: 0,
|
|
@@ -1373,7 +1378,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1373
1378
|
},
|
|
1374
1379
|
signOut: () => void logout(),
|
|
1375
1380
|
};
|
|
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 }),
|
|
1381
|
+
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
|
|
1377
1382
|
// The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
|
|
1378
1383
|
, {
|
|
1379
1384
|
// The edge the sidebar is pinned to (Grip's, physical): its free edge is the other one.
|
|
@@ -1399,11 +1404,11 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1399
1404
|
navigate?.(site("/referral"));
|
|
1400
1405
|
dismiss();
|
|
1401
1406
|
}, 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: "
|
|
1407
|
+
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": {
|
|
1403
1408
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
1404
|
-
gridTemplateRows: `
|
|
1409
|
+
gridTemplateRows: `56px minmax(0, 1fr) ${TABS_HEIGHT}`,
|
|
1405
1410
|
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,
|
|
1411
|
+
}, 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) => {
|
|
1407
1412
|
if (typeof window === "undefined")
|
|
1408
1413
|
return;
|
|
1409
1414
|
try {
|
|
@@ -1466,7 +1471,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1466
1471
|
void switchToAccount(found);
|
|
1467
1472
|
else
|
|
1468
1473
|
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:
|
|
1474
|
+
}, 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: () => {
|
|
1470
1475
|
if (!asked)
|
|
1471
1476
|
setPeeking(false);
|
|
1472
1477
|
}, 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
|
@@ -38,7 +38,7 @@ import { useEffect, useId, useMemo, useState } from 'react';
|
|
|
38
38
|
import { Made } from './Account.js';
|
|
39
39
|
import { useBetas } from './Betas.js';
|
|
40
40
|
import { Recents } from './Recents.js';
|
|
41
|
-
import {
|
|
41
|
+
import { raised } from './Rail.js';
|
|
42
42
|
import { Setup } from './Setup.js';
|
|
43
43
|
import { ago, UNTITLED_RUN } from './recent.js';
|
|
44
44
|
import { empty } from './open.js';
|
|
@@ -49,12 +49,12 @@ import { HOSTED_APPS } from './lib/hosted.js';
|
|
|
49
49
|
import { payUrl } from './lib/pay.js';
|
|
50
50
|
import { brand, wordmark } from './where.js';
|
|
51
51
|
import { dragWindow, toggleWindowMaximize } from './WindowControls.js';
|
|
52
|
-
import { BAND, HEAD as LINE, TOUCH_HEAD } from './ground.js';
|
|
52
|
+
import { BAND, HEAD as LINE, SIDE, TOUCH_HEAD } from './ground.js';
|
|
53
53
|
/** The sidebar fills the column. Its `width` is typed in px alone, though its frame takes any gui size — the type is
|
|
54
54
|
* @hanzo/ui's to widen. */
|
|
55
55
|
const FILL = { width: '100%' };
|
|
56
56
|
/** The sidebar's width, px: its default, and the two a drag holds it between. */
|
|
57
|
-
const WIDTH =
|
|
57
|
+
const WIDTH = SIDE;
|
|
58
58
|
const FLOOR = 200;
|
|
59
59
|
const CEIL = 420;
|
|
60
60
|
/** Per reader, per browser. */
|
|
@@ -68,8 +68,8 @@ const keys = (press) => ({
|
|
|
68
68
|
press();
|
|
69
69
|
},
|
|
70
70
|
});
|
|
71
|
-
/** A row of the sidebar: a full-width
|
|
72
|
-
const ROW = { rounded: 8, minH:
|
|
71
|
+
/** A row of the sidebar: a full-width 32px pill, 44px on a touch screen, lit where the reader is. */
|
|
72
|
+
const ROW = { rounded: 8, minH: 32, py: 0, px: '$2.5', width: '100%', $touchable: { minH: 44 } };
|
|
73
73
|
/** A sidebar link row spans the column width so hover and active pills align with Recents. */
|
|
74
74
|
const COMPACT_ROW = ROW;
|
|
75
75
|
/** The run activity behind the bell: the runs that moved last, newest first. */
|
|
@@ -77,7 +77,7 @@ 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
79
|
/** A header mark: a 15px glyph in a 28px target, a thumb's 44 on a touch screen. */
|
|
80
|
-
const HEAD = { width:
|
|
80
|
+
const HEAD = { width: 32, height: 32, rounded: '$3', $touchable: { width: 44, height: 44 } };
|
|
81
81
|
export function dispatchTabsAction(detail) {
|
|
82
82
|
if (typeof window === 'undefined')
|
|
83
83
|
return;
|
|
@@ -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)`, bg: "var(--
|
|
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", z: drawer ? undefined : 5, 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: drawer ? undefined : "var(--side-fill, var(--sheet-2))", borderTopWidth: 0, borderBottomWidth: 0, borderRightWidth: drawer || dir === 'rtl' ? 0 : 1, borderLeftWidth: !drawer && dir === 'rtl' ? 1 : 0, borderStyle: "solid", borderColor: "var(--pane-edge, var(--edge, var(--white-06)))", 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
|
-
pb: drawer ? 0 :
|
|
355
|
+
pb: drawer ? 0 : 7, 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
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: [
|
|
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(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) }) }), 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
|
-
:
|
|
368
|
+
: HEAD), 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: 14, lineHeight: 20, 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,13 +385,13 @@ 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", 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:
|
|
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: 14, lineHeight: 20, 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: () => {
|
|
392
392
|
if (typeof window !== 'undefined')
|
|
393
393
|
window.location.assign('/signup?next=%2Fchat');
|
|
394
|
-
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH:
|
|
394
|
+
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH: 36, justify: "center", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-upgrade", icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: _jsx(Sparkles, { size: 15, "aria-hidden": true, color: "var(--muted-foreground)" }) }), onPress: () => window.location.assign(payUrl('/cart', { returnUrl: window.location.href })), ...keys(() => window.location.assign(payUrl('/cart', { returnUrl: window.location.href }))), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Upgrade plan') }) }) }) })) : null, _jsx(UpdatePill, {}), foot] }), drawer ? null : (_jsx(Gutter, { side: dir === 'rtl' ? 'right' : 'left', span: span.span, floor: FLOOR, ceil: CEIL, reset: WIDTH, onSpan: span.move, onKeep: span.keep, onShut: onShut, label: t('Resize sidebar') }))] }));
|
|
395
395
|
}
|
|
396
396
|
function UpdatePill() {
|
|
397
397
|
const { t } = useI18n();
|
package/dist/ground.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export declare const HEAD =
|
|
32
|
+
export declare const HEAD = 38;
|
|
33
33
|
export declare const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,15 +37,18 @@ export declare const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export declare const INSET =
|
|
40
|
+
export declare const INSET = 24;
|
|
41
|
+
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
+
export declare const SIDE = 260;
|
|
41
43
|
/**
|
|
42
44
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
43
45
|
*/
|
|
44
46
|
export declare const inPane: (row: number) => number;
|
|
45
47
|
/**
|
|
46
48
|
* THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
|
|
47
|
-
*
|
|
49
|
+
* the ground colour with `--pane-ground`, the host's soft radial light, on it.
|
|
48
50
|
*/
|
|
49
51
|
export declare const floor: {
|
|
50
52
|
readonly backgroundColor: 'var(--pane-floor)';
|
|
53
|
+
readonly backgroundImage: 'var(--pane-ground)';
|
|
51
54
|
};
|
package/dist/ground.js
CHANGED
|
@@ -29,7 +29,7 @@ export const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export const HEAD =
|
|
32
|
+
export const HEAD = 38;
|
|
33
33
|
export const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,15 +37,18 @@ export const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export const INSET =
|
|
40
|
+
export const INSET = 24;
|
|
41
|
+
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
+
export const SIDE = 260;
|
|
41
43
|
/**
|
|
42
44
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
43
45
|
*/
|
|
44
46
|
export const inPane = (row) => row;
|
|
45
47
|
/**
|
|
46
48
|
* THE FLOOR under the app's frame (app/_web.tsx, components/settings/Frame.tsx):
|
|
47
|
-
*
|
|
49
|
+
* the ground colour with `--pane-ground`, the host's soft radial light, on it.
|
|
48
50
|
*/
|
|
49
51
|
export const floor = {
|
|
50
52
|
backgroundColor: 'var(--pane-floor)',
|
|
53
|
+
backgroundImage: 'var(--pane-ground)',
|
|
51
54
|
};
|
package/dist/where.d.ts
CHANGED
|
@@ -81,7 +81,7 @@ export declare function configure(given: Partial<Addresses>): void;
|
|
|
81
81
|
export declare const where: () => Addresses;
|
|
82
82
|
/** The product's name, as the host states it. Read at call time, like every address. */
|
|
83
83
|
export declare const brand: () => string;
|
|
84
|
-
/** The product's name in each mode of the app
|
|
84
|
+
/** The product's name in each mode of the app, the section the reader is in: Chat, Dev, Design, Studio, Flow, Tabs, Betas. */
|
|
85
85
|
export declare const wordmark: (mode: 'chat' | 'dev' | 'studio' | 'design' | 'flow' | 'tabs' | 'beta' | 'hosted') => string;
|
|
86
86
|
/** A page of the app's own, from wherever the apps are mounted. */
|
|
87
87
|
export declare const site: (path: string) => string;
|
package/dist/where.js
CHANGED
|
@@ -11,7 +11,7 @@ export function configure(given) {
|
|
|
11
11
|
export const where = () => addresses;
|
|
12
12
|
/** The product's name, as the host states it. Read at call time, like every address. */
|
|
13
13
|
export const brand = () => addresses.brand ?? 'Hanzo';
|
|
14
|
-
/** The product's name in each mode of the app
|
|
14
|
+
/** The product's name in each mode of the app, the section the reader is in: Chat, Dev, Design, Studio, Flow, Tabs, Betas. */
|
|
15
15
|
export const wordmark = (mode) => mode === 'dev'
|
|
16
16
|
? 'Dev'
|
|
17
17
|
: mode === 'studio'
|
|
@@ -24,6 +24,8 @@ export const wordmark = (mode) => mode === 'dev'
|
|
|
24
24
|
? 'Tabs'
|
|
25
25
|
: mode === 'beta'
|
|
26
26
|
? 'Betas'
|
|
27
|
-
:
|
|
27
|
+
: mode === 'chat'
|
|
28
|
+
? 'Chat'
|
|
29
|
+
: brand();
|
|
28
30
|
/** A page of the app's own, from wherever the apps are mounted. */
|
|
29
31
|
export const site = (path) => `${addresses.site}${path}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.72",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|