@hanzo/app 0.3.76 → 0.3.78
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 +3 -2
- package/dist/Chat.js +81 -79
- package/dist/Prose.js +4 -4
- package/dist/Rail.d.ts +2 -3
- package/dist/Rail.js +7 -8
- package/dist/RightPane.d.ts +10 -0
- package/dist/RightPane.js +41 -3
- package/dist/bots/ink.d.ts +1 -1
- package/dist/bots/ink.js +1 -1
- package/dist/bots/kit.d.ts +1 -1
- package/dist/ground.d.ts +5 -0
- package/dist/ground.js +5 -0
- package/package.json +1 -1
package/dist/Account.js
CHANGED
|
@@ -52,6 +52,7 @@ import { leave } from './dev.js';
|
|
|
52
52
|
import { payUrl } from './lib/pay.js';
|
|
53
53
|
import { asked, KEYS, legal, out, pages } from './help.js';
|
|
54
54
|
import { showSettings } from './open.js';
|
|
55
|
+
import { MARK } from './ground.js';
|
|
55
56
|
import { site, where } from './where.js';
|
|
56
57
|
import { BAD } from './lib/mix.js';
|
|
57
58
|
/** An organization this tab created, until the token carries it. */
|
|
@@ -288,9 +289,9 @@ export function Account({ host, narrow = false, above = false, onOrg, defaultAcc
|
|
|
288
289
|
// Clear of the rail's mark (or the row) it opens from, and flush with its foot.
|
|
289
290
|
offset: 8, children: [_jsx(DropdownMenuTrigger, { asChild: true, children: _jsxs(XStack, { ref: (el) => {
|
|
290
291
|
row.current = el instanceof HTMLElement ? el : null;
|
|
291
|
-
}, render: "button", "data-slot": "me", "aria-label": t('Account: {name}', { name: [who, current].filter(Boolean).join(' · ') }), width: narrow ? (above ? 44 :
|
|
292
|
+
}, render: "button", "data-slot": "me", "aria-label": t('Account: {name}', { name: [who, current].filter(Boolean).join(' · ') }), width: narrow ? (above ? 44 : MARK) : '100%', height: narrow ? (above ? 44 : MARK) : undefined, minH: narrow ? (above ? 44 : MARK) : 48,
|
|
292
293
|
// A thumb's 44 on a touch screen.
|
|
293
|
-
$touchable: narrow ? { width: 44, minH: 44 } : undefined, px: narrow ? 0 : '$2', gap: "$2.5", rounded: narrow ?
|
|
294
|
+
$touchable: narrow ? { width: 44, height: 44, minH: 44 } : undefined, px: narrow ? 0 : '$2', gap: "$2.5", rounded: narrow ? 12 : '$5', borderWidth: narrow && above ? 1 : 0, borderColor: narrow && above ? 'var(--border-strong)' : undefined, bg: narrow && above ? 'var(--pane-fill)' : narrow && open ? '$edge' : 'transparent', items: "center", justify: narrow ? 'center' : 'flex-start', hoverStyle: { bg: narrow && open ? '$edge' : '$hover' }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, cursor: "pointer", children: [_jsx(Face, { host: host, size: narrow ? (above ? 32 : 26) : 32 }), narrow ? null : (_jsxs(_Fragment, { children: [_jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$3", fontWeight: "600", color: "$ink", numberOfLines: 1, text: "start", children: who }), working ? (_jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, text: "start", children: working })) : null] }), isFree ? (_jsx(Button, { size: "xs", variant: "outline", "data-slot": "me-upgrade", px: "$2", py: "$0.5", rounded: "$3", onPress: (e) => {
|
|
294
295
|
e?.stopPropagation?.();
|
|
295
296
|
getPro();
|
|
296
297
|
}, cursor: "pointer", children: t('Upgrade plan') })) : null, _jsx(ChevronsUpDown, { size: 14, "aria-hidden": true, opacity: 0.6 })] }))] }) }), _jsxs(DropdownMenuContent, { minW: 260, maxW: "calc(100vw - 16px)", "aria-labelledby": undefined, "aria-label": t('Account'), onCloseAutoFocus: back, children: [_jsxs(DropdownMenuSub, { open: account, onOpenChange: setAccount, children: [_jsxs(DropdownMenuSubTrigger, { minH: 48, gap: "$2.5", "data-slot": "me-account", children: [_jsx(Face, { host: host, size: 28 }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(SizableText, { size: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: who }), _jsx(SizableText, { size: "$1", color: "$soft", numberOfLines: 1, children: host.person.email || working })] })] }), account ? (_jsxs(DropdownMenuSubContent, { minW: 240, maxW: "calc(100vw - 16px)", pointerEvents: "auto", children: [_jsx(YStack, { cursor: "pointer", rounded: "$3", hoverStyle: { bg: '$hover' }, onPress: () => {
|
package/dist/Chat.js
CHANGED
|
@@ -62,7 +62,7 @@ import { Check, ChevronDown, CircleAlert, FileText, Ghost, Image as ImageMark, L
|
|
|
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 { SEED, look, useSections, useSites } from "./RightPane.js";
|
|
65
|
+
import { OutputsCard, 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";
|
|
@@ -602,6 +602,8 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
602
602
|
const talkRef = useCallback((el) => setTalkBox(el instanceof HTMLElement ? el : null), []);
|
|
603
603
|
const wide = media.lg;
|
|
604
604
|
const [panel, setPanel] = usePanel(`chat:${at}`, false, wide);
|
|
605
|
+
const [summaryOpen, setSummaryOpen] = useState(false);
|
|
606
|
+
const dockSummary = Boolean(wide && aside === null);
|
|
605
607
|
const deck = useDeck(`chat:${at}`, SEED);
|
|
606
608
|
// The org's sites, which an empty tab suggests.
|
|
607
609
|
const sites = useSites();
|
|
@@ -1983,7 +1985,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
1983
1985
|
}, children: t("Log in") }), _jsx(Button, { size: "xs", rounded: 9999, px: "$3", "data-slot": "header-signup", onPress: () => {
|
|
1984
1986
|
if (typeof window !== "undefined")
|
|
1985
1987
|
window.location.assign("/signup?next=%2Fchat");
|
|
1986
|
-
}, children: t("Sign up for free") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: currentThread }) }) })) : (_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: 28, height: 28, 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: 15, 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(Summary, { sections: sections, onOpen: () => setPanel(true), label: t("Summary") }), _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }), _jsx(XStack, { render: "button", "data-slot": "titlebar-new-chat", "aria-label": t("New chat"), ...{ title: t("New chat") }, width: 28, height: 28, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", opacity: 0.78, hoverStyle: { bg: "$hover", opacity: 1 }, onPress: () => {
|
|
1988
|
+
}, children: t("Sign up for free") })] })) : null, said.length > 0 ? (_jsx(ConversationMenu, { threads: currentThreadMap, active: open || currentThread.id, onSchedule: anonymous || forgetful ? undefined : () => setPlan(lastAsked()), children: _jsx(XStack, { children: _jsx(ThreadMore, { t: currentThread }) }) })) : (_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: 28, height: 28, 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: 15, 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(Summary, { sections: sections, docked: dockSummary, open: summaryOpen, onOpenChange: setSummaryOpen, onOpen: () => setPanel(true), label: t("Summary") }), _jsx(PanelToggle, { open: panel, onToggle: () => setPanel(!panel) }), _jsx(XStack, { render: "button", "data-slot": "titlebar-new-chat", "aria-label": t("New chat"), ...{ title: t("New chat") }, width: 28, height: 28, items: "center", justify: "center", rounded: "$3", bg: "transparent", cursor: "pointer", opacity: 0.78, hoverStyle: { bg: "$hover", opacity: 1 }, onPress: () => {
|
|
1987
1989
|
emptyOpen();
|
|
1988
1990
|
go("/chat");
|
|
1989
1991
|
}, children: _jsx(SquarePlus, { size: 15, strokeWidth: 1.75, "aria-hidden": true }) })] })] }), titlebarSlot)
|
|
@@ -2014,83 +2016,83 @@ function Thread({ placeholder = message(), initial, anonymous = false, settled =
|
|
|
2014
2016
|
}, 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: () => {
|
|
2015
2017
|
if (typeof window !== "undefined")
|
|
2016
2018
|
window.location.assign("/signup?next=%2Fchat");
|
|
2017
|
-
}, 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,
|
|
2018
|
-
|
|
2019
|
-
|
|
2020
|
-
|
|
2021
|
-
|
|
2022
|
-
|
|
2023
|
-
|
|
2024
|
-
|
|
2025
|
-
|
|
2026
|
-
|
|
2027
|
-
|
|
2028
|
-
|
|
2029
|
-
|
|
2030
|
-
|
|
2031
|
-
|
|
2032
|
-
|
|
2033
|
-
|
|
2034
|
-
|
|
2035
|
-
|
|
2036
|
-
|
|
2037
|
-
|
|
2038
|
-
|
|
2039
|
-
|
|
2040
|
-
|
|
2041
|
-
|
|
2042
|
-
|
|
2043
|
-
|
|
2044
|
-
|
|
2045
|
-
|
|
2046
|
-
|
|
2047
|
-
|
|
2048
|
-
|
|
2049
|
-
|
|
2050
|
-
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
|
|
2054
|
-
|
|
2055
|
-
|
|
2056
|
-
|
|
2057
|
-
|
|
2058
|
-
|
|
2059
|
-
|
|
2060
|
-
|
|
2061
|
-
|
|
2062
|
-
|
|
2063
|
-
|
|
2064
|
-
|
|
2065
|
-
|
|
2066
|
-
|
|
2067
|
-
|
|
2068
|
-
|
|
2069
|
-
|
|
2070
|
-
|
|
2071
|
-
|
|
2072
|
-
|
|
2073
|
-
|
|
2074
|
-
|
|
2075
|
-
|
|
2076
|
-
|
|
2077
|
-
|
|
2078
|
-
|
|
2079
|
-
|
|
2080
|
-
|
|
2081
|
-
|
|
2082
|
-
|
|
2083
|
-
|
|
2084
|
-
|
|
2085
|
-
|
|
2086
|
-
|
|
2087
|
-
|
|
2088
|
-
|
|
2089
|
-
|
|
2090
|
-
|
|
2091
|
-
|
|
2092
|
-
|
|
2093
|
-
|
|
2019
|
+
}, 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, docked: dockSummary, open: summaryOpen, onOpenChange: setSummaryOpen, 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, _jsxs(XStack, { flex: 1, minH: 0, minW: 0, children: [_jsxs(YStack, { ref: talkRef, "data-slot": "talk", flex: 1, minH: 0, minW: 0, position: "relative", children: [_jsx(ChatSurface, { ...chat, messages: shown, send: guarded,
|
|
2020
|
+
// WHILE NOTHING HAS BEEN SAID, from a tablet up, the opening and the
|
|
2021
|
+
// composer are one pair centred in the pane (`center`: rows `1fr auto auto
|
|
2022
|
+
// 1fr`), so the heading reads close above the field and nothing stands at
|
|
2023
|
+
// the window's foot (owner, 2026-10-30). A phone keeps the composer at the
|
|
2024
|
+
// foot, over the keyboard, from the first moment; once a turn exists every
|
|
2025
|
+
// width does, and the transcript scrolls under it.
|
|
2026
|
+
center: media.md,
|
|
2027
|
+
// AS IT WAS WRITTEN. The package renders a turn's words plainly and
|
|
2028
|
+
// says so — it ships no markdown pipeline because the plugin set is the
|
|
2029
|
+
// surface's to choose — so an answer arrived here reading "```ts" with
|
|
2030
|
+
// the backticks on screen. `Prose` is the site's one renderer, reading
|
|
2031
|
+
// with the same `marked` the legal pages parse with and drawing every
|
|
2032
|
+
// token in gui elements, and the shared view draws through it too.
|
|
2033
|
+
body: (turn) => {
|
|
2034
|
+
if (String(turn.id).startsWith(`${FAILED}:`)) {
|
|
2035
|
+
const question = shown.find((one) => one.id === String(turn.id).slice(FAILED.length + 1));
|
|
2036
|
+
return question ? failure(question) : null;
|
|
2037
|
+
}
|
|
2038
|
+
// A QUESTION THAT CARRIED PICTURES draws them beside its words.
|
|
2039
|
+
if (turn.role === "user" && Array.isArray(turn.content)) {
|
|
2040
|
+
const parts = partsOf(turn.content);
|
|
2041
|
+
return (_jsx(YStack, { gap: "$1", children: _jsx(Parts, { parts: parts, prose: (text) => _jsx(Prose, { text: text }) }) }));
|
|
2042
|
+
}
|
|
2043
|
+
const said = typeof turn.content === "string" ? turn.content : "";
|
|
2044
|
+
// A QUESTION THAT CARRIED FILES draws its words and the files' chips;
|
|
2045
|
+
// the passages it handed the model are the model's to read, not ours.
|
|
2046
|
+
if (turn.role === "user" && said) {
|
|
2047
|
+
const read = told(said);
|
|
2048
|
+
if (read.carried)
|
|
2049
|
+
return (_jsx(YStack, { gap: "$1", children: _jsx(Carried, { text: read.text, attached: read.carried.attached, reused: read.carried.reused, onOpen: openFile, onSave: anonymous ? undefined : (url, id, f) => keepOne(url, id, f.name, f.type) }) }));
|
|
2050
|
+
}
|
|
2051
|
+
// WHILE THE ANSWER HAS NO WORDS YET: who is answering (the agents the
|
|
2052
|
+
// question addresses, or the whole cast when it names nobody), and the
|
|
2053
|
+
// model's reasoning as it streams (`reasoning` on the turn), dimmed and
|
|
2054
|
+
// cut to its last lines.
|
|
2055
|
+
const thought = turn.role === "assistant" && !said && chat.streaming ? (turn.reasoning ?? "").trim() : "";
|
|
2056
|
+
if (turn.role === "assistant" && !said && chat.streaming && (cast.length || thought)) {
|
|
2057
|
+
const q = [...shown].reverse().find((one) => one.role === "user");
|
|
2058
|
+
const whom = cast.length ? addressed(words(q?.content), cast) : [];
|
|
2059
|
+
return (_jsxs(YStack, { gap: "$1", "data-slot": "thinking", children: [_jsx(Text, { fontSize: "$2", color: "$soft", children: whom.length
|
|
2060
|
+
? whom.length > 1
|
|
2061
|
+
? thought
|
|
2062
|
+
? t("{names} are thinking…", { names: join(whom, t) })
|
|
2063
|
+
: t("{names} are answering…", { names: join(whom, t) })
|
|
2064
|
+
: thought
|
|
2065
|
+
? t("{names} is thinking…", { names: join(whom, t) })
|
|
2066
|
+
: t("{names} is answering…", { names: join(whom, t) })
|
|
2067
|
+
: t("Thinking…") }), thought ? (_jsx(Text, { fontSize: "$2", color: "$soft", opacity: 0.72, "data-slot": "thought", children: thought.length > THOUGHT ? `…${thought.slice(-THOUGHT).replace(/^\S*\s/, "")}` : thought })) : null] }));
|
|
2068
|
+
}
|
|
2069
|
+
// A CAST'S ANSWER IS SEVERAL PEOPLE'S. Each opens a line with their
|
|
2070
|
+
// name, as the brief asks, so each is drawn under their own face and
|
|
2071
|
+
// read in their own voice. A reply that names nobody is drawn whole.
|
|
2072
|
+
const parts = turn.role === "assistant" ? speakers(said, known) : null;
|
|
2073
|
+
if (parts && parts.some((part) => part.who)) {
|
|
2074
|
+
// Asked and silent: an agent the question addressed who has no part
|
|
2075
|
+
// in this reply.
|
|
2076
|
+
const at = shown.findIndex((one) => one.id === turn.id);
|
|
2077
|
+
const q = shown.slice(0, at).reverse().find((one) => one.role === "user");
|
|
2078
|
+
const silent = cast.length > 1 && !(chat.streaming && at === shown.length - 1)
|
|
2079
|
+
? addressed(words(q?.content), cast).filter((name) => !parts.some((part) => part.who?.toLowerCase() === name.toLowerCase()))
|
|
2080
|
+
: [];
|
|
2081
|
+
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)] }));
|
|
2082
|
+
}
|
|
2083
|
+
const ms = turn.durationMs;
|
|
2084
|
+
const worked = turn.role === "assistant" && typeof ms === "number" && ms >= 1000 ? ms : 0;
|
|
2085
|
+
return (_jsxs(YStack, { gap: "$1.5", "data-turn-id": String(turn.id), "data-turn-role": turn.role, children: [worked ? (_jsx(Text, { "data-slot": "worked-for", fontSize: "$2", color: "$soft", children: t("Worked for {n}s", { n: Math.round(worked / 1000) }) })) : null, _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] }));
|
|
2086
|
+
},
|
|
2087
|
+
// The page's ONE heading, and it belongs to the empty transcript rather
|
|
2088
|
+
// than to a signed-out branch — the branch is gone, and the heading went
|
|
2089
|
+
// with it when it did. `Ask` passes its own, because the page embedding
|
|
2090
|
+
// it already has an `<h1>` and a second is the defect that took the
|
|
2091
|
+
// landings off /chat and /dev.
|
|
2092
|
+
empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", justify: "flex-end", width: "100%", height: "100%", pt: "$6", pb: "$2", children: [cast.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: cast.map((name, i) => (_jsx(Box, { marginInlineStart: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: cast.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, cast.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, cast.length === 0 && !portrait ? (_jsx(Box, { mb: "$3", "data-slot": "opening-mark", children: _jsx(ProviderMark, { org: "hanzo", size: 44, ink: true }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(cast, t) || heading || (firstName ? t("Good to see you, {name}. What’s next?", { name: firstName }) : t("What’s next?")) }), cast.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
|
|
2093
|
+
// The transcript reads at the same measure as Composer (`--container-prose`, 48rem),
|
|
2094
|
+
// so user bubbles, assistant output cards, and the composer share exact left/right edges.
|
|
2095
|
+
column: { maxW: "var(--container-prose, 48rem)" }, composer: composer }), _jsx(ToBottom, { within: talkBox })] }), dockSummary && summaryOpen ? (_jsx(OutputsCard, { sections: sections, label: t("Summary"), onOpen: () => setPanel(true), onClose: () => setSummaryOpen(false) })) : null] }), _jsx(AgentMaker, {}), carry.dialog, _jsx(Dialog, { open: anonPluginsOpen, onOpenChange: setAnonPluginsOpen, children: _jsxs(DialogContent, { maxW: 480, width: "100%", gap: "$3", "data-slot": "anon-plugins-dialog", children: [_jsx(DialogTitle, { children: t("Plugins & Skills") }), _jsx(Text, { fontSize: "$2", color: "$soft", children: t("Enable plugins and skills for this conversation, or type / and @ in the composer.") }), _jsxs(YStack, { maxH: 320, overflow: "scroll", gap: "$1.5", children: [carry.plugins.rows.map((p) => (_jsxs(XStack, { render: "button", onPress: () => carry.plugins.pick(p.id), items: "center", justify: "space-between", p: "$2.5", rounded: "$3", borderWidth: 1, borderColor: p.on ? "$ink" : "$borderColor", bg: p.on ? "$hover" : "transparent", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: [_jsxs(XStack, { items: "center", gap: "$2.5", minW: 0, flex: 1, children: [p.icon, _jsxs(YStack, { minW: 0, flex: 1, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: p.label }), p.note ? (_jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: p.note })) : null] })] }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: p.on ? "$ink" : "$soft", children: p.on ? t("On") : t("Plugin") })] }, `plugin:${p.id}`))), carry.skills.rows.slice(0, 24).map((s) => (_jsxs(XStack, { render: "button", onPress: () => carry.skills.pick(s.id), items: "center", justify: "space-between", p: "$2", rounded: "$3", borderWidth: 1, borderColor: s.on ? "$ink" : "$borderColor", bg: s.on ? "$hover" : "transparent", hoverStyle: { bg: "$hover" }, cursor: "pointer", children: [_jsxs(XStack, { items: "center", gap: "$2", minW: 0, flex: 1, children: [s.icon, _jsxs(Text, { fontSize: "$2", color: "$ink", numberOfLines: 1, children: ["/", s.label] })] }), _jsx(Text, { fontSize: "$1", fontWeight: "600", color: s.on ? "$ink" : "$soft", children: s.on ? t("On") : t("Skill") })] }, `skill:${s.id}`)))] })] }) }), _jsx(Dialog, { open: anonGateOpen, onOpenChange: setAnonGateOpen, children: _jsxs(DialogContent, { maxW: 480, rounded: "$6", gap: "$3.5", children: [_jsx(DialogTitle, { children: t("Sign in to continue chatting") }), _jsx(Text, { fontSize: "$3", color: "$soft", lineHeight: "$4", children: t("Sign in or create a free Hanzo account to save this conversation and continue chatting.") }), _jsxs(YStack, { gap: "$2", pt: "$1", children: [_jsx(Button, { variant: "primary", size: "lg", width: "100%", onPress: () => window.location.assign("/signup?next=%2Fchat"), children: t("Create Free Account") }), _jsx(Button, { variant: "outline", size: "default", width: "100%", onPress: () => enter(LOGIN), children: t("Sign In") })] }), _jsxs(YStack, { gap: "$2", pt: "$2.5", borderTopWidth: 1, borderColor: "$borderColor", children: [_jsx(Text, { fontSize: "$1", fontFamily: "$mono", color: "$soft", children: t("NEED MORE CAPACITY? UPGRADE ANYTIME") }), _jsx(XStack, { gap: "$2", flexWrap: "wrap", children: [
|
|
2094
2096
|
["Go", "Pro"],
|
|
2095
2097
|
["Dev", "Max"],
|
|
2096
2098
|
].flat().map((label) => (_jsx(XStack, { render: "button", onPress: () => {
|
package/dist/Prose.js
CHANGED
|
@@ -4,9 +4,9 @@ import { Anchor, Text, View, XStack, YStack } from '@hanzo/gui';
|
|
|
4
4
|
import { Code } from '@hanzo/ui/chat';
|
|
5
5
|
import { destination, read } from './lib/prose.js';
|
|
6
6
|
const INK = 'var(--foreground)';
|
|
7
|
-
const QUIET = 'var(--muted-foreground)';
|
|
8
|
-
const EDGE = 'var(--border)';
|
|
9
|
-
const GROUND = 'var(--secondary)';
|
|
7
|
+
const QUIET = 'var(--text-secondary, var(--muted-foreground))';
|
|
8
|
+
const EDGE = 'var(--pane-edge, var(--border))';
|
|
9
|
+
const GROUND = 'var(--surface-card-emphasis, var(--secondary))';
|
|
10
10
|
/**
|
|
11
11
|
* The reading type, px: a 16px body on a 24px line, and a heading's size and
|
|
12
12
|
* line by depth, as the reference conversation sets them — the body a reader
|
|
@@ -98,7 +98,7 @@ function blocks(tokens, tone) {
|
|
|
98
98
|
// its language, a copy control, and a body that scrolls SIDEWAYS on its
|
|
99
99
|
// own, because wrapping code changes what it says.
|
|
100
100
|
case 'code':
|
|
101
|
-
return (_jsx(Code, { language: t.lang || 'text', value: t.text, children: t.text }, i));
|
|
101
|
+
return (_jsx(Code, { language: t.lang || 'text', value: t.text, rounded: 12, borderColor: EDGE, bg: "var(--side-fill, var(--card))", children: t.text }, i));
|
|
102
102
|
case 'blockquote':
|
|
103
103
|
return (_jsx(YStack, { render: "blockquote", m: 0, pl: "$3", gap: "$2", borderWidth: 0, borderLeftWidth: 2, borderStyle: "solid", borderColor: EDGE, children: blocks(t.tokens, QUIET) }, i));
|
|
104
104
|
case 'hr':
|
package/dist/Rail.d.ts
CHANGED
|
@@ -1,9 +1,8 @@
|
|
|
1
1
|
import { type ReactNode } from 'react';
|
|
2
2
|
import { type Host } from '@hanzo/build';
|
|
3
|
+
import { MARK } from './ground.js';
|
|
3
4
|
import { type Place } from './lib/host.js';
|
|
4
|
-
|
|
5
|
-
/** A mark, px: a 40px rounded square on the rail's 56px. */
|
|
6
|
-
export declare const MARK = 40;
|
|
5
|
+
export { MARK };
|
|
7
6
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
8
7
|
export declare const RAISED: {
|
|
9
8
|
readonly library: '-/artifacts';
|
package/dist/Rail.js
CHANGED
|
@@ -47,11 +47,9 @@ import { out } from './help.js';
|
|
|
47
47
|
import { BETAS } from './lib/betas.js';
|
|
48
48
|
import { HOSTED_APPS } from './lib/hosted.js';
|
|
49
49
|
import { Account } from './Account.js';
|
|
50
|
-
import { HEAD, RAIL, TOUCH_HEAD } from './ground.js';
|
|
50
|
+
import { HEAD, MARK, RAIL, TOUCH_HEAD } from './ground.js';
|
|
51
51
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
52
|
-
|
|
53
|
-
/** A mark, px: a 40px rounded square on the rail's 56px. */
|
|
54
|
-
export const MARK = 40;
|
|
52
|
+
export { MARK };
|
|
55
53
|
/** A mark on a touch screen, px: a thumb's 44. */
|
|
56
54
|
const TOUCH = 44;
|
|
57
55
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
@@ -128,13 +126,14 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
128
126
|
return (_jsxs(YStack, { "data-slot": "rail", render: "nav", "aria-label": t('Products'), width: RAIL, flex: 1,
|
|
129
127
|
// As tall as the window and no taller: its marks scroll inside it (below), never the page.
|
|
130
128
|
minH: 0,
|
|
131
|
-
// The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot
|
|
132
|
-
//
|
|
133
|
-
|
|
129
|
+
// The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot:
|
|
130
|
+
// the frame and drawer already leave `--pane-gap` below, so pb=0 aligns the account hover box symmetrically
|
|
131
|
+
// with the inner pane's bottom corner.
|
|
132
|
+
pt: (HEAD - MARK) / 2 + 2, pb: 0, gap: 3, shrink: 0, items: "center", $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
|
|
134
133
|
// Toward the content: right of the rail, left of it right to left.
|
|
135
134
|
, {
|
|
136
135
|
// Toward the content: right of the rail, left of it right to left.
|
|
137
|
-
placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded:
|
|
136
|
+
placement: dir === 'rtl' ? 'left-start' : 'right-start', minWidth: 220, trigger: _jsx(XStack, { render: "button", "aria-label": t('More'), ...{ title: t('More') }, "data-slot": "rail-more", width: MARK, height: MARK, rounded: 12, items: "center", justify: "center", cursor: "pointer", opacity: 0.62, hoverStyle: { bg: '$hover', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' }, $touchable: { width: 44, height: 44 }, children: _jsx(Ellipsis, { size: 18, "aria-hidden": true }) }), items: rest })) : null] }), anon ? (_jsxs(YStack, { gap: 4, items: "center", children: [_jsx(Mark, { label: t('See plans and pricing'), "data-slot": "anon-pricing", onPress: () => {
|
|
138
137
|
if (typeof window !== 'undefined')
|
|
139
138
|
window.location.assign('/pricing');
|
|
140
139
|
}, children: _jsx(Sparkles, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: t('Help'), "data-slot": "anon-help", onPress: () => {
|
package/dist/RightPane.d.ts
CHANGED
|
@@ -44,6 +44,16 @@ export declare function useSections({ at, said, held, deck, onCreate }: {
|
|
|
44
44
|
deck: Deck;
|
|
45
45
|
onCreate: () => void;
|
|
46
46
|
}): Section[];
|
|
47
|
+
/**
|
|
48
|
+
* Docked inner rounded Outputs / Sources card aligned at the top-right inside
|
|
49
|
+
* the inner Chat pane (`main[data-slot="pane"]`).
|
|
50
|
+
*/
|
|
51
|
+
export declare function OutputsCard({ sections, label, onOpen, onClose, }: {
|
|
52
|
+
sections: Section[];
|
|
53
|
+
label: string;
|
|
54
|
+
onOpen?: () => void;
|
|
55
|
+
onClose?: () => void;
|
|
56
|
+
}): import("react").JSX.Element;
|
|
47
57
|
/**
|
|
48
58
|
* The organization's sites, as an empty tab suggests them: `GET /v1/project`,
|
|
49
59
|
* every row with a live address. Read once a conversation; nothing on a refusal.
|
package/dist/RightPane.js
CHANGED
|
@@ -19,7 +19,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
19
19
|
import { useEffect, useMemo, useState } from 'react';
|
|
20
20
|
import { useI18n } from '@hanzo/i18n/react';
|
|
21
21
|
import { FileCode, Globe, Image as ImageMark, Paperclip, Plus } from 'lucide-react';
|
|
22
|
-
import { Box, DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Text, } from '@hanzo/ui';
|
|
22
|
+
import { Box, DropdownMenu, DropdownMenuContent, DropdownMenuCheckboxItem, DropdownMenuItem, DropdownMenuLabel, DropdownMenuSeparator, DropdownMenuTrigger, Text, XStack, YStack, } from '@hanzo/ui';
|
|
23
23
|
import { useAi } from '@hanzo/ai/react';
|
|
24
24
|
import { artifacts, name as titleOf, PAGE } from '@hanzo/build';
|
|
25
25
|
import { said as told } from './lib/attach.js';
|
|
@@ -216,12 +216,50 @@ export function useSections({ at, said, held, deck, onCreate }) {
|
|
|
216
216
|
const m = { id: call.id, name: call.name, kind: 'file', body: [call.asked, call.got ?? ''].filter(Boolean).join('\n\n'), mime: 'text/plain' };
|
|
217
217
|
return { ...row(m), title: call.name === 'web_search' || call.name === 'search' ? t('Web search') : call.name, icon: _jsx(Globe, { size: 15, "aria-hidden": true }), detail: call.asked };
|
|
218
218
|
});
|
|
219
|
+
const sourceRows = [...asked, ...took.map(row)];
|
|
219
220
|
return [
|
|
220
|
-
{
|
|
221
|
-
|
|
221
|
+
{
|
|
222
|
+
id: 'outputs',
|
|
223
|
+
title: t('Outputs'),
|
|
224
|
+
action: (_jsx(Box, { render: "button", "aria-label": t('Create a file or site'), onPress: onCreate, p: "$1", rounded: "$2", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: _jsx(Plus, { size: 16, "aria-hidden": true }) })),
|
|
225
|
+
lead: { title: t('Create a file or site'), run: onCreate },
|
|
226
|
+
entries: made.map(row),
|
|
227
|
+
},
|
|
228
|
+
{
|
|
229
|
+
id: 'sources',
|
|
230
|
+
title: t('Sources'),
|
|
231
|
+
action: _jsx(Add, { at: at }),
|
|
232
|
+
lead: sourceRows.length ? undefined : { title: t('Attach files or connect apps'), run: () => take(at, { api: ai, org: org() }) },
|
|
233
|
+
entries: sourceRows,
|
|
234
|
+
},
|
|
222
235
|
];
|
|
223
236
|
}, [at, made, took, done, deck, ai, onCreate, t]);
|
|
224
237
|
}
|
|
238
|
+
/**
|
|
239
|
+
* Docked inner rounded Outputs / Sources card aligned at the top-right inside
|
|
240
|
+
* the inner Chat pane (`main[data-slot="pane"]`).
|
|
241
|
+
*/
|
|
242
|
+
export function OutputsCard({ sections, label, onOpen, onClose, }) {
|
|
243
|
+
useEffect(() => {
|
|
244
|
+
if (!onClose)
|
|
245
|
+
return;
|
|
246
|
+
const onKeyDown = (e) => {
|
|
247
|
+
if (e.key !== 'Escape' || e.defaultPrevented)
|
|
248
|
+
return;
|
|
249
|
+
if (document.querySelector('[data-slot="dropdown-menu-content"], [role="menu"]'))
|
|
250
|
+
return;
|
|
251
|
+
onClose();
|
|
252
|
+
};
|
|
253
|
+
window.addEventListener('keydown', onKeyDown);
|
|
254
|
+
return () => window.removeEventListener('keydown', onKeyDown);
|
|
255
|
+
}, [onClose]);
|
|
256
|
+
return (_jsx(YStack, { "data-slot": "summary", role: "complementary", "aria-label": label, width: 268, shrink: 0, self: "flex-start", mt: 12, marginInlineEnd: 12, rounded: 12, borderWidth: 1, borderColor: "var(--pane-edge, var(--border))", bg: "var(--side-fill, var(--card))", overflow: "hidden", children: sections.map((s, i) => (_jsxs(YStack, { px: 12, py: 10, gap: 2, borderTopWidth: i ? 1 : 0, borderColor: "var(--pane-edge, var(--border))", children: [_jsxs(XStack, { items: "center", justify: "space-between", minH: 26, children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: s.title }), s.action] }), s.lead ? (_jsx(XStack, { render: "button", onPress: s.lead.run, items: "center", minH: 28, px: 6, mx: -6, rounded: "$2", cursor: "pointer", hoverStyle: { bg: '$hover' }, children: _jsx(Text, { fontSize: "$2", color: "var(--text-secondary, var(--muted-foreground))", numberOfLines: 1, children: s.lead.title }) })) : null, s.entries.map((e) => (_jsxs(XStack, { render: "button", onPress: e.open
|
|
257
|
+
? () => {
|
|
258
|
+
onOpen?.();
|
|
259
|
+
e.open?.();
|
|
260
|
+
}
|
|
261
|
+
: undefined, items: "center", gap: "$2", minH: 30, px: 6, mx: -6, rounded: "$2", cursor: e.open ? 'pointer' : undefined, hoverStyle: e.open ? { bg: '$hover' } : undefined, children: [e.icon ? (_jsx(XStack, { width: 16, justify: "center", shrink: 0, "$platform-web": { color: 'var(--text-secondary, var(--muted-foreground))' }, children: e.icon })) : null, _jsx(Text, { flex: 1, minW: 0, fontSize: "$2", fontWeight: "500", color: "$ink", numberOfLines: 1, children: e.title })] }, e.id)))] }, s.id))) }));
|
|
262
|
+
}
|
|
225
263
|
/**
|
|
226
264
|
* The organization's sites, as an empty tab suggests them: `GET /v1/project`,
|
|
227
265
|
* every row with a live address. Read once a conversation; nothing on a refusal.
|
package/dist/bots/ink.d.ts
CHANGED
|
@@ -9,7 +9,7 @@ export declare const PICKED = "var(--secondary)";
|
|
|
9
9
|
/** Your own message: lighter than a bot's, in either theme. */
|
|
10
10
|
export declare const MINE = "color-mix(in oklab, var(--foreground) 17%, var(--pane-fill, var(--card)))";
|
|
11
11
|
export declare const INK = "var(--foreground)";
|
|
12
|
-
export declare const DIM = "var(--muted-foreground)";
|
|
12
|
+
export declare const DIM = "var(--text-secondary, var(--muted-foreground))";
|
|
13
13
|
export declare const FAINT = "$faint";
|
|
14
14
|
export declare const LINE = "var(--pane-edge, var(--border))";
|
|
15
15
|
/** The composer's edge, the one control drawn a step louder. */
|
package/dist/bots/ink.js
CHANGED
|
@@ -13,7 +13,7 @@ export const PICKED = 'var(--secondary)';
|
|
|
13
13
|
/** Your own message: lighter than a bot's, in either theme. */
|
|
14
14
|
export const MINE = 'color-mix(in oklab, var(--foreground) 17%, var(--pane-fill, var(--card)))';
|
|
15
15
|
export const INK = 'var(--foreground)';
|
|
16
|
-
export const DIM = 'var(--muted-foreground)';
|
|
16
|
+
export const DIM = 'var(--text-secondary, var(--muted-foreground))';
|
|
17
17
|
export const FAINT = '$faint';
|
|
18
18
|
export const LINE = 'var(--pane-edge, var(--border))';
|
|
19
19
|
/** The composer's edge, the one control drawn a step louder. */
|
package/dist/bots/kit.d.ts
CHANGED
|
@@ -60,7 +60,7 @@ export declare const LABEL: {
|
|
|
60
60
|
readonly fontSize: 13;
|
|
61
61
|
readonly lineHeight: 18;
|
|
62
62
|
readonly fontWeight: '400';
|
|
63
|
-
readonly color: "var(--muted-foreground)";
|
|
63
|
+
readonly color: "var(--text-secondary, var(--muted-foreground))";
|
|
64
64
|
readonly m: 0;
|
|
65
65
|
};
|
|
66
66
|
/** A card in the panel. */
|
package/dist/ground.d.ts
CHANGED
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
export declare const pane: (fill?: string) => {
|
|
16
16
|
readonly backgroundColor: string;
|
|
17
17
|
readonly borderRadius: 'var(--pane-round)';
|
|
18
|
+
readonly borderWidth: 1;
|
|
19
|
+
readonly borderStyle: 'solid';
|
|
20
|
+
readonly borderColor: 'var(--pane-edge, var(--border))';
|
|
18
21
|
readonly backdropFilter: 'var(--pane-blur)';
|
|
19
22
|
};
|
|
20
23
|
/**
|
|
@@ -31,6 +34,8 @@ export declare const BAND = 52;
|
|
|
31
34
|
*/
|
|
32
35
|
export declare const HEAD = 40;
|
|
33
36
|
export declare const TOUCH_HEAD = 44;
|
|
37
|
+
/** A mark on the rail, px: a 40px rounded square leaving `--pane-gap` (4px) on each side of the 48px rail. */
|
|
38
|
+
export declare const MARK = 40;
|
|
34
39
|
/**
|
|
35
40
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
36
41
|
* window's start edge (the rail is twice this wide), and the pane head's last
|
package/dist/ground.js
CHANGED
|
@@ -15,6 +15,9 @@
|
|
|
15
15
|
export const pane = (fill = 'var(--pane-fill)') => ({
|
|
16
16
|
backgroundColor: fill,
|
|
17
17
|
borderRadius: 'var(--pane-round)',
|
|
18
|
+
borderWidth: 1,
|
|
19
|
+
borderStyle: 'solid',
|
|
20
|
+
borderColor: 'var(--pane-edge, var(--border))',
|
|
18
21
|
backdropFilter: 'var(--pane-blur)',
|
|
19
22
|
});
|
|
20
23
|
/**
|
|
@@ -31,6 +34,8 @@ export const BAND = 52;
|
|
|
31
34
|
*/
|
|
32
35
|
export const HEAD = 40;
|
|
33
36
|
export const TOUCH_HEAD = 44;
|
|
37
|
+
/** A mark on the rail, px: a 40px rounded square leaving `--pane-gap` (4px) on each side of the 48px rail. */
|
|
38
|
+
export const MARK = 40;
|
|
34
39
|
/**
|
|
35
40
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
36
41
|
* window's start edge (the rail is twice this wide), and the pane head's last
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.78",
|
|
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",
|