@hanzo/app 0.3.70 → 0.3.71
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 +6 -13
- package/dist/Chat.js +6 -27
- package/dist/ProjectsTree.js +5 -5
- package/dist/Rail.d.ts +2 -2
- package/dist/Rail.js +4 -4
- package/dist/Recents.js +3 -3
- package/dist/RightPane.d.ts +0 -10
- package/dist/RightPane.js +1 -18
- package/dist/Shell.js +7 -7
- package/dist/Sidebar.js +9 -9
- 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, 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,8 +112,8 @@ 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:
|
|
116
|
-
const BAR =
|
|
115
|
+
/** The bar's height, px: a thin top bar on the ground. */
|
|
116
|
+
const BAR = 44;
|
|
117
117
|
/** Where each mode was last, so the rail goes back to it. */
|
|
118
118
|
const last = { chat: '', dev: '', studio: '', design: '', flow: '', tabs: '' };
|
|
119
119
|
/** Whether a key press is the reader typing, where the app's keys are the field's. */
|
|
@@ -332,14 +332,7 @@ 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 ?? 0) + 8, pr: 8, shrink: 0, width: closed ? RAIL : `calc(${RAIL}px + var(--app-sidebar-span, ${SIDE}px))`, ...(bar?.drag ?? null), children: [_jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) }), _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 }) }), _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) })] }), _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: [_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 === 'chat' ? '' : mode === 'dev' ? '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
337
|
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) => {
|
|
345
338
|
const e = down;
|
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 40px rounded square on the rail's 56px. */
|
|
7
|
+
export declare const MARK = 40;
|
|
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 40px rounded square on the rail's 56px. */
|
|
55
|
+
export const MARK = 40;
|
|
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: 12, items: "center", justify: "center", shrink: 0, cursor: "pointer", opacity: on ? 1 : 0.7, bg: on ? '$edge' : 'transparent', hoverStyle: { bg: on ? '$edge' : '$hover', 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,7 +126,7 @@ 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
|
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
|
*
|
|
@@ -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,
|
|
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": {
|
|
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 }),
|
|
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
|
|
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: "
|
|
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": {
|
|
1403
1403
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
1404
|
-
gridTemplateRows: `
|
|
1404
|
+
gridTemplateRows: `56px 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,
|
|
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) => {
|
|
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:
|
|
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: () => {
|
|
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
|
@@ -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:
|
|
71
|
+
/** A row of the sidebar: a full-width 40px pill, 44px on a touch screen, lit where the reader is. */
|
|
72
|
+
const ROW = { rounded: 12, minH: 40, py: 0, px: '$3', 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", 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))", rounded: drawer ? undefined : "var(--pane-round)", borderWidth: drawer ? 0 : 1, 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)' : 4,
|
|
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
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: 17, lineHeight: 24, 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,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", 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: () => {
|
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 = 40;
|
|
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 = 28;
|
|
41
|
+
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
+
export declare const SIDE = 280;
|
|
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 = 40;
|
|
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 = 28;
|
|
41
|
+
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
+
export const SIDE = 280;
|
|
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.71",
|
|
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",
|