@hanzo/app 0.3.72 → 0.3.74
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/assets/memoji/art.svg +4 -4
- package/assets/memoji/cyber.svg +2 -2
- package/assets/memoji/des.svg +4 -4
- package/assets/memoji/doc.svg +2 -2
- package/assets/memoji/edu.svg +2 -2
- package/assets/memoji/huma.svg +2 -2
- package/assets/memoji/lang.svg +2 -2
- package/assets/memoji/mana.svg +2 -2
- package/assets/memoji/mu.svg +2 -2
- package/assets/memoji/opera.svg +2 -2
- package/assets/memoji/vi.svg +2 -2
- package/assets/memoji/vid.svg +2 -2
- package/dist/App.js +17 -25
- package/dist/Chat.js +89 -93
- package/dist/PreferencesDialog.d.ts +5 -0
- package/dist/PreferencesDialog.js +25 -0
- package/dist/Rail.d.ts +2 -3
- package/dist/Rail.js +5 -6
- package/dist/Recents.js +5 -3
- package/dist/Shell.js +14 -16
- package/dist/Sidebar.js +9 -9
- package/dist/ToBottom.d.ts +3 -0
- package/dist/ToBottom.js +61 -0
- package/dist/bots/Bots.js +1 -1
- package/dist/bots/Panel.d.ts +3 -4
- package/dist/bots/Panel.js +74 -36
- package/dist/bots/Roster.js +40 -22
- package/dist/bots/Thread.d.ts +0 -1
- package/dist/bots/Thread.js +45 -30
- package/dist/bots/face.d.ts +3 -1
- package/dist/bots/face.js +12 -8
- package/dist/bots/grid.d.ts +1 -1
- package/dist/bots/grid.js +17 -2
- package/dist/bots/ink.d.ts +6 -6
- package/dist/bots/ink.js +8 -16
- package/dist/bots/kit.d.ts +13 -12
- package/dist/bots/kit.js +33 -11
- package/dist/bots/said.d.ts +16 -0
- package/dist/bots/said.js +63 -0
- package/dist/ground.d.ts +7 -3
- package/dist/ground.js +7 -3
- package/package.json +1 -1
package/dist/bots/Thread.js
CHANGED
|
@@ -1,11 +1,8 @@
|
|
|
1
1
|
'use client';
|
|
2
2
|
import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
|
-
// The thread with the open bot:
|
|
4
|
-
//
|
|
5
|
-
//
|
|
6
|
-
// A message is a run the platform recorded: your words are its input, the bot's
|
|
7
|
-
// its output (or the error its model returned). A run another bot asked for is
|
|
8
|
-
// marked as that bot's message. Nothing here is drawn that the runs do not say.
|
|
3
|
+
// The thread with the open bot: floating frosted bot pill and circular Share
|
|
4
|
+
// button over the scrolling messages, structured attachment/image cards,
|
|
5
|
+
// timestamps wherever the conversation paused, and the pill composer.
|
|
9
6
|
import { useEffect, useMemo, useRef, useState } from 'react';
|
|
10
7
|
import { navigable } from '@hanzo/ui/product/limits';
|
|
11
8
|
import { useI18n } from '@hanzo/i18n/react';
|
|
@@ -14,18 +11,27 @@ import { Text, XStack, YStack } from '@hanzo/gui';
|
|
|
14
11
|
import { Caret } from '@hanzo/ui/chat';
|
|
15
12
|
import { Composer, Control, Field } from '@hanzo/composer';
|
|
16
13
|
import { speech, useDictation, useVoice, Voice } from '@hanzo/voice';
|
|
17
|
-
import { ArrowLeft, ArrowUp, Gauge, Mic, Plus, X } from 'lucide-react';
|
|
14
|
+
import { ArrowLeft, ArrowUp, AudioLines, Check, Gauge, Mic, Plus, Share, X } from 'lucide-react';
|
|
18
15
|
import { base } from '../lib/ai.js';
|
|
19
16
|
import { Prose } from '../Prose.js';
|
|
17
|
+
import { called } from '../team.js';
|
|
20
18
|
import { Face } from './face.js';
|
|
21
19
|
import { CLIP, PILL, ROUND, WORD } from './kit.js';
|
|
22
|
-
import { DIM, EDGE, INK, LINE, MINE, RAISED } from './ink.js';
|
|
20
|
+
import { DIM, EDGE, GROUND, INK, LINE, MINE, RAISED } from './ink.js';
|
|
23
21
|
import { instant } from './time.js';
|
|
24
|
-
import { lines } from './said.js';
|
|
22
|
+
import { lines, partsOf } from './said.js';
|
|
25
23
|
import { compose, fits, MAX, texty } from './carry.js';
|
|
26
24
|
import { PARAM } from './api.js';
|
|
27
25
|
/** The widest a conversation reads, as the desktop app draws it. */
|
|
28
|
-
const MEASURE =
|
|
26
|
+
const MEASURE = 900;
|
|
27
|
+
function DocBadge({ ext }) {
|
|
28
|
+
const accent = ext === 'pdf'
|
|
29
|
+
? 'var(--destructive)'
|
|
30
|
+
: ext === 'ppt' || ext === 'pptx'
|
|
31
|
+
? 'var(--warning, var(--chrome-dot-yellow))'
|
|
32
|
+
: 'var(--info, var(--muted-foreground))';
|
|
33
|
+
return (_jsxs(YStack, { "aria-hidden": true, width: 40, height: 44, shrink: 0, rounded: 9, overflow: "hidden", bg: "var(--secondary)", borderWidth: 1, borderColor: LINE, children: [_jsxs(YStack, { flex: 1, px: 7, pt: 7, gap: 4, justify: "center", children: [_jsxs(XStack, { gap: 3, children: [_jsx(YStack, { width: 9, height: 9, rounded: 2, bg: "var(--muted-foreground)", opacity: 0.4 }), _jsxs(YStack, { flex: 1, gap: 3, justify: "center", children: [_jsx(YStack, { height: 3, rounded: 2, bg: "var(--muted-foreground)", opacity: 0.4 }), _jsx(YStack, { height: 3, width: "75%", rounded: 2, bg: "var(--muted-foreground)", opacity: 0.3 })] })] }), _jsx(YStack, { height: 3, rounded: 2, bg: "var(--muted-foreground)", opacity: 0.34 })] }), _jsx(YStack, { height: 12, bg: accent })] }));
|
|
34
|
+
}
|
|
29
35
|
/** "It resets in 3 days." from the instant a refusal lifts, in the reader's calendar days. */
|
|
30
36
|
function lifts(iso, now, t) {
|
|
31
37
|
const at = instant(iso ?? undefined);
|
|
@@ -46,14 +52,11 @@ export function Thread({ bot, bots, runs, pending, notice, wrong, side, live, lo
|
|
|
46
52
|
const [note, setNote] = useState(null);
|
|
47
53
|
const foot = useRef(null);
|
|
48
54
|
const pick = useRef(null);
|
|
49
|
-
// Dictation through Hanzo's own ear, as Chat's composer does: each pause is
|
|
50
|
-
// transcribed and lands after what the draft already held.
|
|
51
55
|
const { token } = useIamToken();
|
|
52
56
|
const ear = useMemo(() => speech({ ...base(), ...(token ? { token } : {}) }), [token]);
|
|
53
57
|
const voice = useVoice({ speech: ear, ...useDictation(draft, setDraft) });
|
|
54
58
|
const now = Date.now();
|
|
55
59
|
const said = useMemo(() => (bot ? lines(runs ?? [], bots, bot.name, pending, now, locale, t) : []),
|
|
56
|
-
// `now` moves every render; the stamps only need it when the thread does.
|
|
57
60
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
58
61
|
[bot, runs, bots, pending, locale, t]);
|
|
59
62
|
useEffect(() => {
|
|
@@ -64,7 +67,7 @@ export function Thread({ bot, bots, runs, pending, notice, wrong, side, live, lo
|
|
|
64
67
|
setFile(null);
|
|
65
68
|
setNote(null);
|
|
66
69
|
}, [bot?.name]);
|
|
67
|
-
|
|
70
|
+
const displayName = bot ? called(bot.name) : '';
|
|
68
71
|
const share = async () => {
|
|
69
72
|
if (!bot)
|
|
70
73
|
return;
|
|
@@ -74,20 +77,18 @@ export function Thread({ bot, bots, runs, pending, notice, wrong, side, live, lo
|
|
|
74
77
|
const nav = navigator;
|
|
75
78
|
try {
|
|
76
79
|
if (nav.share && window.matchMedia('(pointer: coarse)').matches)
|
|
77
|
-
await nav.share({ url: link, title:
|
|
80
|
+
await nav.share({ url: link, title: displayName });
|
|
78
81
|
else
|
|
79
82
|
await navigator.clipboard.writeText(link);
|
|
80
83
|
setShared(t('Link copied'));
|
|
81
84
|
}
|
|
82
85
|
catch (e) {
|
|
83
|
-
// A share the reader closed is not a failure; a copy the browser refused is.
|
|
84
86
|
if (e?.name === 'AbortError')
|
|
85
87
|
return;
|
|
86
88
|
setShared(t('Copy failed'));
|
|
87
89
|
}
|
|
88
90
|
window.setTimeout(() => setShared(null), 2000);
|
|
89
91
|
};
|
|
90
|
-
// A text file goes with the message, held beside the draft until it is sent.
|
|
91
92
|
const carry = async (picked) => {
|
|
92
93
|
setNote(null);
|
|
93
94
|
try {
|
|
@@ -111,35 +112,49 @@ export function Thread({ bot, bots, runs, pending, notice, wrong, side, live, lo
|
|
|
111
112
|
setDraft('');
|
|
112
113
|
setFile(null);
|
|
113
114
|
setNote(null);
|
|
114
|
-
void onSend(input).then((
|
|
115
|
-
|
|
116
|
-
if (said)
|
|
115
|
+
void onSend(input).then((ok) => {
|
|
116
|
+
if (ok)
|
|
117
117
|
return;
|
|
118
118
|
setDraft((d) => d || words);
|
|
119
119
|
setFile((f) => f ?? held);
|
|
120
120
|
});
|
|
121
121
|
};
|
|
122
|
-
|
|
122
|
+
const hasDraft = Boolean(draft.trim() || file);
|
|
123
|
+
return (_jsxs(YStack, { flex: 1, minH: 0, position: "relative", children: [_jsxs(XStack, { "data-parity-key": "bots.bar", position: "absolute", t: 0, l: 0, r: 0, z: 4, height: 58, px: 14, items: "center", gap: 8, pointerEvents: "none", "$platform-web": {
|
|
124
|
+
backgroundImage: `linear-gradient(to bottom, ${GROUND} 18%, color-mix(in srgb, ${GROUND} 68%, transparent) 64%, transparent)`,
|
|
125
|
+
}, children: [_jsx(XStack, { flex: 1, minW: 0, items: "center", children: _jsx(XStack, { ...ROUND, pointerEvents: "auto", "aria-label": t('All bots'), onClick: onBack, display: "none", "$max-md": { display: 'flex' }, children: _jsx(ArrowLeft, { size: 16, color: INK, "aria-hidden": true, "data-i18n-mirror": true }) }) }), bot ? (_jsxs(XStack, { ...PILL, pointerEvents: "auto", "data-parity-key": "bots.pill", "aria-label": t('{name}’s details', { name: displayName }), "aria-expanded": side, onClick: onSide, height: 36, pl: 6, pr: 13, maxW: "60%", bg: RAISED, "$platform-web": { backdropFilter: 'blur(16px)', WebkitBackdropFilter: 'blur(16px)' }, children: [_jsx(Face, { bot: bot, size: 24 }), _jsx(Text, { ...WORD, ...CLIP, children: displayName })] })) : null, _jsx(XStack, { flex: 1, minW: 0, items: "center", justify: "flex-end", children: bot ? (_jsx(XStack, { ...ROUND, pointerEvents: "auto", "data-parity-key": "bots.share", "aria-label": shared ?? t('Share'), onClick: share, "$platform-web": { backdropFilter: 'blur(16px)', WebkitBackdropFilter: 'blur(16px)' }, children: shared ? _jsx(Check, { size: 15, color: INK, "aria-hidden": true }) : _jsx(Share, { size: 15, color: INK, "aria-hidden": true }) })) : null })] }), !bot ? (_jsx(YStack, { flex: 1, items: "center", justify: "center", gap: 16, px: 24, children: live && loaded && bots.length === 0 ? (_jsxs(_Fragment, { children: [_jsx(Text, { render: "h1", m: 0, fontSize: 22, lineHeight: 28, fontWeight: "500", color: INK, children: t('Make your first bot') }), _jsx(XStack, { ...PILL, onClick: onMake, children: _jsx(Text, { ...WORD, children: t('New bot') }) })] })) : null })) : (_jsx(YStack, { "data-parity-key": "bots.thread", flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", children: _jsxs(YStack, { width: "100%", maxW: MEASURE + 48, mx: "auto", px: 24, pt: 64, pb: 18, "$max-md": { px: 12 }, children: [said.map((line, i) => {
|
|
123
126
|
const prev = said[i - 1];
|
|
124
|
-
const gap = !prev ? 0 : line.kind === prev.kind && (line.kind === 'mine' || line.kind === 'theirs') ?
|
|
127
|
+
const gap = !prev ? 0 : line.kind === prev.kind && (line.kind === 'mine' || line.kind === 'theirs') ? 6 : 16;
|
|
125
128
|
if (line.kind === 'stamp')
|
|
126
|
-
return (_jsx(Text, { self: "center", mt: i ? 22 :
|
|
129
|
+
return (_jsx(Text, { self: "center", mt: i ? 22 : 6, mb: 4, fontSize: 12, lineHeight: 17, color: DIM, children: line.text }, line.key));
|
|
127
130
|
if (line.kind === 'from')
|
|
128
|
-
return (_jsxs(XStack, { self: "center", mt: gap, items: "center", gap: 6, children: [_jsx(Text, { fontSize:
|
|
131
|
+
return (_jsxs(XStack, { self: "center", mt: gap, items: "center", gap: 6, children: [_jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: t('Message from') }), _jsx(Face, { bot: line.bot, size: 16 }), _jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: called(line.bot.name) })] }, line.key));
|
|
129
132
|
if (line.kind === 'mine')
|
|
130
|
-
return (_jsx(YStack, { self: "flex-end", items: "flex-end", maxW: "78%", mt: gap, children: _jsx(Text, { "data-parity-key": "bots.mine", render: "div", px:
|
|
133
|
+
return (_jsx(YStack, { self: "flex-end", items: "flex-end", maxW: "78%", mt: gap, children: _jsx(Text, { "data-parity-key": "bots.mine", render: "div", px: 14, py: 8, rounded: 18, fontSize: 15, lineHeight: 22, color: INK, whiteSpace: "pre-wrap", "$platform-web": { overflowWrap: 'anywhere', backgroundColor: MINE }, children: line.text }) }, line.key));
|
|
131
134
|
if (line.kind === 'thinking')
|
|
132
|
-
return (_jsx(XStack, { "data-parity-key": "bots.thinking", role: "status", "aria-label": t('{name} is working', { name:
|
|
133
|
-
|
|
134
|
-
|
|
135
|
+
return (_jsx(XStack, { "data-parity-key": "bots.thinking", role: "status", "aria-label": t('{name} is working', { name: displayName }), self: "flex-start", mt: gap, px: 14, height: 38, items: "center", rounded: 16, bg: RAISED, borderWidth: 1, borderColor: LINE, children: _jsx(Caret, {}) }, line.key));
|
|
136
|
+
if (line.kind === 'theirs' && line.failed)
|
|
137
|
+
return (_jsx(YStack, { "data-parity-key": "bots.theirs", self: "flex-start", maxW: 520, mt: gap, px: 15, py: 11, rounded: 18, bg: RAISED, borderWidth: 1, borderColor: LINE, "$max-md": { maxW: '88%' }, children: _jsx(Text, { fontSize: 15, lineHeight: 22, color: DIM, children: line.text }) }, line.key));
|
|
138
|
+
const parts = partsOf(line.text);
|
|
139
|
+
return (_jsx(YStack, { "data-parity-key": line.kind === 'other' ? 'bots.other' : 'bots.theirs', self: "flex-start", items: "flex-start", gap: 10, maxW: "100%", mt: gap, children: parts.map((part, idx) => {
|
|
140
|
+
if (part.kind === 'doc') {
|
|
141
|
+
const inner = (_jsxs(XStack, { px: 12, py: 10, gap: 12, items: "center", rounded: 16, bg: RAISED, borderWidth: 1, borderColor: LINE, maxW: 290, children: [_jsx(DocBadge, { ext: part.ext }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { ...CLIP, fontSize: 14, lineHeight: 19, fontWeight: "500", color: INK, children: part.name }), part.size ? (_jsx(Text, { fontSize: 12, lineHeight: 17, color: DIM, children: part.size })) : null] })] }));
|
|
142
|
+
return part.href ? (_jsx(YStack, { render: "a", href: part.href, target: '_blank', rel: 'noopener noreferrer', "$platform-web": { textDecoration: 'none' }, children: inner }, idx)) : (_jsx(YStack, { children: inner }, idx));
|
|
143
|
+
}
|
|
144
|
+
if (part.kind === 'image') {
|
|
145
|
+
return (_jsx(YStack, { width: 172, rounded: 14, overflow: "hidden", bg: RAISED, borderWidth: 1, borderColor: LINE, children: _jsx(YStack, { render: "img", src: part.src, alt: part.alt, width: "100%", height: "auto", display: "block" }) }, idx));
|
|
146
|
+
}
|
|
147
|
+
return (_jsx(YStack, { maxW: 520, px: 15, py: 11, rounded: 18, bg: RAISED, borderWidth: 1, borderColor: LINE, "$max-md": { maxW: '88%' }, children: _jsx(Prose, { text: part.text }) }, idx));
|
|
148
|
+
}) }, line.key));
|
|
149
|
+
}), wrong ? (_jsx(Text, { render: "p", self: "center", mt: 12, fontSize: 13, lineHeight: 18, color: DIM, children: wrong })) : null, _jsx("div", { ref: foot })] }) })), bot ? (_jsxs(YStack, { width: "100%", maxW: MEASURE + 48, mx: "auto", px: 20, pb: 14, gap: 8, shrink: 0, "$max-md": { px: 8, pb: 8 }, children: [notice ? (_jsxs(YStack, { "data-parity-key": "bots.notice", role: "alert", bg: RAISED, borderWidth: 1, borderColor: LINE, rounded: 16, pt: 12, pb: 10, px: 14, gap: 10, children: [_jsxs(XStack, { items: "flex-start", gap: 10, children: [_jsx(YStack, { pt: 3, children: _jsx(Gauge, { size: 16, color: DIM, "aria-hidden": true }) }), _jsxs(YStack, { flex: 1, minW: 0, children: [_jsx(Text, { fontSize: 15, lineHeight: 22, color: INK, children: notice.message }), lifts(notice.resets, now, t) ? (_jsx(Text, { fontSize: 15, lineHeight: 22, color: DIM, children: lifts(notice.resets, now, t) })) : null] }), _jsx(XStack, { ...ROUND, width: 28, height: 28, bg: "transparent", borderWidth: 0, "aria-label": t('Dismiss'), onClick: onDismiss, children: _jsx(X, { size: 14, color: DIM, "aria-hidden": true }) })] }), notice.actions.some(navigable) ? (_jsx(XStack, { justify: "flex-end", gap: 8, flexWrap: "wrap", children: notice.actions.filter(navigable).map((a, i, all) => (_jsx(XStack, { ...PILL, render: "a", href: a.url, height: 34, bg: i === all.length - 1 ? INK : RAISED, borderColor: i === all.length - 1 ? INK : LINE, "$platform-web": { textDecoration: 'none' }, children: _jsx(Text, { ...WORD, color: i === all.length - 1 ? 'var(--background)' : INK, children: a.label }) }, `${a.kind}-${a.label}`))) })) : null] })) : null, file ? (_jsxs(XStack, { self: "flex-start", items: "center", gap: 6, height: 30, pl: 12, pr: 4, rounded: 999, bg: RAISED, borderWidth: 1, borderColor: LINE, children: [_jsx(Text, { ...CLIP, maxW: 260, fontSize: 13, lineHeight: 18, color: INK, children: file.name }), _jsx(XStack, { ...ROUND, width: 24, height: 24, bg: "transparent", borderWidth: 0, "aria-label": t('Remove {name}', { name: file.name }), onClick: () => setFile(null), children: _jsx(X, { size: 12, color: DIM, "aria-hidden": true }) })] })) : null, note ? (_jsx(Text, { role: "alert", fontSize: 13, lineHeight: 18, color: DIM, px: 8, children: note })) : null, _jsx(Composer, { render: "form", onSubmit: (e) => {
|
|
135
150
|
e.preventDefault();
|
|
136
151
|
submit();
|
|
137
|
-
}, control: 32, width: "100%", children: _jsxs(XStack, { "data-parity-key": "bots.composer", height:
|
|
152
|
+
}, control: 32, width: "100%", children: _jsxs(XStack, { "data-parity-key": "bots.composer", height: 46, pl: 7, pr: 7, gap: 6, items: "center", rounded: 999, bg: RAISED, borderWidth: 1, borderColor: EDGE, focusWithinStyle: { borderColor: 'var(--ring)' }, children: [_jsx(Control, { type: "button", "aria-label": t('Add a text file'), onClick: () => pick.current?.click(), disabled: !live, children: _jsx(Plus, { size: 16 }) }), _jsx(Field, { value: draft, onChangeText: setDraft, onKeyDown: (e) => {
|
|
138
153
|
if (e.key === 'Enter' && !e.shiftKey && !e.nativeEvent?.isComposing) {
|
|
139
154
|
e.preventDefault();
|
|
140
155
|
submit();
|
|
141
156
|
}
|
|
142
|
-
}, placeholder: t('Message {name}', { name:
|
|
157
|
+
}, placeholder: t('Message {name}', { name: displayName }), "aria-label": t('Message {name}', { name: displayName }), disabled: !live, fontSize: 15, px: 4 }), _jsx(Control, { asChild: true, children: _jsx(Voice, { voice: voice, disabled: !live, children: (state) => _jsx(Mic, { size: 15, fill: state === 'idle' ? 'none' : 'currentColor' }) }) }), hasDraft ? (_jsx(Control, { type: "submit", "aria-label": t('Send'), fill: true, disabled: !live || Boolean(pending), children: _jsx(ArrowUp, { size: 15, strokeWidth: 2.5 }) })) : (_jsx(Voice, { voice: voice, disabled: !live, children: () => (_jsx(XStack, { width: 32, height: 32, rounded: 999, items: "center", justify: "center", bg: INK, opacity: live ? 1 : 0.45, children: _jsx(AudioLines, { size: 15, color: "var(--background)", strokeWidth: 2.2, "aria-hidden": true }) })) }))] }) }), _jsx("input", { ref: pick, type: "file", hidden: true, accept: "text/*,.md,.txt,.csv,.json,.yaml,.yml,.tsv,.log", onChange: (e) => {
|
|
143
158
|
const picked = e.target.files?.[0];
|
|
144
159
|
e.target.value = '';
|
|
145
160
|
if (picked)
|
package/dist/bots/face.d.ts
CHANGED
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { Agent } from '@hanzo/ai';
|
|
2
|
-
export declare function Face({ bot, size }: {
|
|
2
|
+
export declare function Face({ bot, size, person, starred, }: {
|
|
3
3
|
bot: Pick<Agent, 'name' | 'avatar' | 'emoji'>;
|
|
4
4
|
size?: number;
|
|
5
|
+
person?: boolean;
|
|
6
|
+
starred?: boolean;
|
|
5
7
|
}): import("react").JSX.Element;
|
package/dist/bots/face.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
1
|
'use client';
|
|
2
|
-
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
3
3
|
import { Text, YStack } from '@hanzo/gui';
|
|
4
|
-
import {
|
|
5
|
-
|
|
4
|
+
import { Star } from 'lucide-react';
|
|
5
|
+
import { roleOf } from '../cast.js';
|
|
6
|
+
import { called } from '../team.js';
|
|
7
|
+
import { FLOOR, INK } from './ink.js';
|
|
8
|
+
export function Face({ bot, size = 36, person = false, starred = false, }) {
|
|
6
9
|
const round = { width: size, height: size, shrink: 0, rounded: 9999, overflow: 'hidden' };
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// The glyph scales with the disc, so its size is a number of pixels rather
|
|
10
|
-
// than a rung; the leading is the size itself, which centres it.
|
|
10
|
+
const src = bot.avatar || (!person ? roleOf(bot.name)?.portrait : undefined);
|
|
11
|
+
const label = person ? (bot.name || '') : called(bot.name || '');
|
|
11
12
|
const glyph = Math.round(size * (bot.emoji ? 0.5 : 0.42));
|
|
12
|
-
|
|
13
|
+
const disc = src ? (_jsx(YStack, { render: "img", src, alt: '', "aria-hidden": true, ...round, objectFit: "cover" })) : (_jsx(YStack, { "aria-hidden": true, ...round, items: "center", justify: "center", bg: person ? 'var(--info, var(--secondary))' : 'var(--secondary)', userSelect: 'none', children: _jsx(Text, { color: person ? 'var(--pure-white, var(--foreground))' : INK, fontSize: glyph, lineHeight: glyph, fontWeight: "600", children: bot.emoji || (label || '?').trim().charAt(0).toUpperCase() }) }));
|
|
14
|
+
if (!starred)
|
|
15
|
+
return disc;
|
|
16
|
+
return (_jsxs(YStack, { position: "relative", width: size, height: size, shrink: 0, children: [disc, _jsx(YStack, { "aria-hidden": true, position: "absolute", r: -1, b: -1, width: 20, height: 20, rounded: 9999, items: "center", justify: "center", bg: "var(--warning, var(--chrome-dot-yellow))", borderWidth: 2, borderColor: FLOOR, children: _jsx(Star, { size: 10, color: "var(--pure-white, var(--foreground))", fill: "currentColor", strokeWidth: 2 }) })] }));
|
|
13
17
|
}
|
package/dist/bots/grid.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ import type { Agent, AgentRun } from '@hanzo/ai';
|
|
|
3
3
|
export declare const GRID = 12;
|
|
4
4
|
/** What a row says under a bot's name: its newest run's last word. */
|
|
5
5
|
export declare function lastWord(run: AgentRun | undefined): string;
|
|
6
|
-
/** The bots in the grid and the
|
|
6
|
+
/** The bots in the grid (lead seat order first, then creation order) and the rest in rows. */
|
|
7
7
|
export declare function split(bots: readonly Agent[], last: ReadonlyMap<string, AgentRun>): {
|
|
8
8
|
grid: Agent[];
|
|
9
9
|
rows: Agent[];
|
package/dist/bots/grid.js
CHANGED
|
@@ -1,17 +1,32 @@
|
|
|
1
1
|
// Which bots are faces in the grid and which are rows, and what a row says.
|
|
2
2
|
// Pure, so the roster's order is tested as data.
|
|
3
|
+
import { member } from '../team.js';
|
|
3
4
|
import { instant } from './time.js';
|
|
4
5
|
/** How many bots the grid holds before the rest become rows. */
|
|
5
6
|
export const GRID = 12;
|
|
7
|
+
const LEAD_ORDER = new Map(['vi', 'opera', 'mana', 'dev', 'des', 'fin', 'huma', 'mark', 'sal', 'sci', 'su', 'cyber'].map((id, i) => [id, i]));
|
|
8
|
+
function rankOf(name) {
|
|
9
|
+
const lead = LEAD_ORDER.get(name.toLowerCase());
|
|
10
|
+
if (lead !== undefined)
|
|
11
|
+
return lead;
|
|
12
|
+
const seat = member(name)?.seat;
|
|
13
|
+
return seat !== undefined ? 100 + seat : Number.MAX_SAFE_INTEGER;
|
|
14
|
+
}
|
|
6
15
|
/** What a row says under a bot's name: its newest run's last word. */
|
|
7
16
|
export function lastWord(run) {
|
|
8
17
|
if (!run)
|
|
9
18
|
return '';
|
|
10
19
|
return (run.output || run.error || run.input || '').replace(/\s+/g, ' ').trim();
|
|
11
20
|
}
|
|
12
|
-
/** The bots in the grid and the
|
|
21
|
+
/** The bots in the grid (lead seat order first, then creation order) and the rest in rows. */
|
|
13
22
|
export function split(bots, last) {
|
|
14
|
-
const made = [...bots].sort((a, b) =>
|
|
23
|
+
const made = [...bots].sort((a, b) => {
|
|
24
|
+
const sa = rankOf(a.name);
|
|
25
|
+
const sb = rankOf(b.name);
|
|
26
|
+
if (sa !== sb)
|
|
27
|
+
return sa - sb;
|
|
28
|
+
return (instant(a.createdAt) ?? 0) - (instant(b.createdAt) ?? 0);
|
|
29
|
+
});
|
|
15
30
|
const grid = made.slice(0, GRID);
|
|
16
31
|
const rows = made
|
|
17
32
|
.slice(GRID)
|
package/dist/bots/ink.d.ts
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
/** The roster's ground:
|
|
2
|
-
export declare const FLOOR = "var(--background)";
|
|
3
|
-
/** The thread's and the panel's ground. */
|
|
4
|
-
export declare const GROUND = "var(--card)";
|
|
1
|
+
/** The roster's ground: matches hanzo.app and hanzo.team sidebar surface. */
|
|
2
|
+
export declare const FLOOR = "var(--side-fill, var(--background))";
|
|
3
|
+
/** The thread's and the panel's ground: matches hanzo.app and hanzo.team main canvas. */
|
|
4
|
+
export declare const GROUND = "var(--pane-fill, var(--card))";
|
|
5
5
|
/** What stands on the ground: the pills, the cards, the composer, a bot's message. */
|
|
6
6
|
export declare const RAISED = "var(--surface-card-emphasis)";
|
|
7
7
|
/** The bot that is open, in the roster. */
|
|
8
8
|
export declare const PICKED = "var(--secondary)";
|
|
9
9
|
/** Your own message: lighter than a bot's, in either theme. */
|
|
10
|
-
export declare const MINE = "color-mix(in oklab, var(--foreground)
|
|
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
12
|
export declare const DIM = "var(--muted-foreground)";
|
|
13
13
|
export declare const FAINT = "$faint";
|
|
14
|
-
export declare const LINE = "var(--border)";
|
|
14
|
+
export declare const LINE = "var(--pane-edge, var(--border))";
|
|
15
15
|
/** The composer's edge, the one control drawn a step louder. */
|
|
16
16
|
export declare const EDGE = "var(--border-strong)";
|
package/dist/bots/ink.js
CHANGED
|
@@ -1,28 +1,20 @@
|
|
|
1
1
|
// The ramp the Bots app is drawn in.
|
|
2
2
|
//
|
|
3
|
-
// Greyscale,
|
|
4
|
-
//
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
// Two grounds, as the window is drawn: the roster stands on the floor and the
|
|
10
|
-
// thread and the panel on the ground one step above it.
|
|
11
|
-
/** The roster's ground: the window itself. */
|
|
12
|
-
export const FLOOR = 'var(--background)';
|
|
13
|
-
/** The thread's and the panel's ground. */
|
|
14
|
-
export const GROUND = 'var(--card)';
|
|
3
|
+
// Greyscale, aligned to the shared Hanzo deep-black product family (--side-fill
|
|
4
|
+
// on the roster column, --pane-fill on the thread and inspector surfaces).
|
|
5
|
+
/** The roster's ground: matches hanzo.app and hanzo.team sidebar surface. */
|
|
6
|
+
export const FLOOR = 'var(--side-fill, var(--background))';
|
|
7
|
+
/** The thread's and the panel's ground: matches hanzo.app and hanzo.team main canvas. */
|
|
8
|
+
export const GROUND = 'var(--pane-fill, var(--card))';
|
|
15
9
|
/** What stands on the ground: the pills, the cards, the composer, a bot's message. */
|
|
16
10
|
export const RAISED = 'var(--surface-card-emphasis)';
|
|
17
11
|
/** The bot that is open, in the roster. */
|
|
18
12
|
export const PICKED = 'var(--secondary)';
|
|
19
13
|
/** Your own message: lighter than a bot's, in either theme. */
|
|
20
|
-
export const MINE = 'color-mix(in oklab, var(--foreground)
|
|
14
|
+
export const MINE = 'color-mix(in oklab, var(--foreground) 17%, var(--pane-fill, var(--card)))';
|
|
21
15
|
export const INK = 'var(--foreground)';
|
|
22
16
|
export const DIM = 'var(--muted-foreground)';
|
|
23
|
-
// The dimmest ink is gui's `$faint` rung: design's --text-tertiary is 4.32:1 on
|
|
24
|
-
// the light ground, under text's 4.5.
|
|
25
17
|
export const FAINT = '$faint';
|
|
26
|
-
export const LINE = 'var(--border)';
|
|
18
|
+
export const LINE = 'var(--pane-edge, var(--border))';
|
|
27
19
|
/** The composer's edge, the one control drawn a step louder. */
|
|
28
20
|
export const EDGE = 'var(--border-strong)';
|
package/dist/bots/kit.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
/** A round icon control, 34px: the roster's search and new,
|
|
1
|
+
/** A round icon control, 34px: the roster's search and new, Share, Preferences, Close. */
|
|
2
2
|
export declare const ROUND: {
|
|
3
3
|
readonly render: 'button';
|
|
4
4
|
readonly type: 'button';
|
|
@@ -8,13 +8,13 @@ export declare const ROUND: {
|
|
|
8
8
|
readonly rounded: 999;
|
|
9
9
|
readonly bg: "var(--surface-card-emphasis)";
|
|
10
10
|
readonly borderWidth: 1;
|
|
11
|
-
readonly borderColor: "var(--border)";
|
|
11
|
+
readonly borderColor: "var(--pane-edge, var(--border))";
|
|
12
12
|
readonly items: 'center';
|
|
13
13
|
readonly justify: 'center';
|
|
14
14
|
readonly cursor: 'pointer';
|
|
15
15
|
readonly p: 0;
|
|
16
16
|
readonly hoverStyle: {
|
|
17
|
-
readonly bg:
|
|
17
|
+
readonly bg: "var(--secondary)";
|
|
18
18
|
};
|
|
19
19
|
readonly focusVisibleStyle: {
|
|
20
20
|
readonly outlineWidth: 2;
|
|
@@ -22,23 +22,23 @@ export declare const ROUND: {
|
|
|
22
22
|
readonly outlineColor: '$outlineColor';
|
|
23
23
|
};
|
|
24
24
|
};
|
|
25
|
-
/** A pill: the open bot in the bar,
|
|
25
|
+
/** A pill: the open bot in the bar, a notice's ways past. */
|
|
26
26
|
export declare const PILL: {
|
|
27
27
|
readonly render: 'button';
|
|
28
28
|
readonly type: 'button';
|
|
29
29
|
readonly display: 'flex';
|
|
30
30
|
readonly items: 'center';
|
|
31
31
|
readonly gap: 8;
|
|
32
|
-
readonly height:
|
|
33
|
-
readonly px:
|
|
32
|
+
readonly height: 36;
|
|
33
|
+
readonly px: 13;
|
|
34
34
|
readonly rounded: 999;
|
|
35
35
|
readonly bg: "var(--surface-card-emphasis)";
|
|
36
36
|
readonly borderWidth: 1;
|
|
37
|
-
readonly borderColor: "var(--border)";
|
|
37
|
+
readonly borderColor: "var(--pane-edge, var(--border))";
|
|
38
38
|
readonly cursor: 'pointer';
|
|
39
39
|
readonly shrink: 0;
|
|
40
40
|
readonly hoverStyle: {
|
|
41
|
-
readonly bg:
|
|
41
|
+
readonly bg: "var(--secondary)";
|
|
42
42
|
};
|
|
43
43
|
readonly focusVisibleStyle: {
|
|
44
44
|
readonly outlineWidth: 2;
|
|
@@ -48,8 +48,9 @@ export declare const PILL: {
|
|
|
48
48
|
};
|
|
49
49
|
/** A pill's words. */
|
|
50
50
|
export declare const WORD: {
|
|
51
|
-
readonly fontSize:
|
|
52
|
-
readonly lineHeight:
|
|
51
|
+
readonly fontSize: 14;
|
|
52
|
+
readonly lineHeight: 19;
|
|
53
|
+
readonly fontWeight: '500';
|
|
53
54
|
readonly color: "var(--foreground)";
|
|
54
55
|
readonly numberOfLines: 1;
|
|
55
56
|
};
|
|
@@ -66,8 +67,8 @@ export declare const LABEL: {
|
|
|
66
67
|
export declare const CARD: {
|
|
67
68
|
readonly bg: "var(--surface-card-emphasis)";
|
|
68
69
|
readonly borderWidth: 1;
|
|
69
|
-
readonly borderColor: "var(--border)";
|
|
70
|
-
readonly rounded:
|
|
70
|
+
readonly borderColor: "var(--pane-edge, var(--border))";
|
|
71
|
+
readonly rounded: 14;
|
|
71
72
|
};
|
|
72
73
|
/** One line, cut with an ellipsis where it runs out of space. */
|
|
73
74
|
export declare const CLIP: {
|
package/dist/bots/kit.js
CHANGED
|
@@ -1,25 +1,47 @@
|
|
|
1
1
|
// The controls the Bots app is drawn from, as gui props, stated once and spread
|
|
2
2
|
// where they are drawn.
|
|
3
|
-
import { DIM, INK, LINE, RAISED } from './ink.js';
|
|
4
|
-
/** A round icon control, 34px: the roster's search and new,
|
|
3
|
+
import { DIM, INK, LINE, PICKED, RAISED } from './ink.js';
|
|
4
|
+
/** A round icon control, 34px: the roster's search and new, Share, Preferences, Close. */
|
|
5
5
|
export const ROUND = {
|
|
6
|
-
render: 'button',
|
|
7
|
-
|
|
8
|
-
|
|
6
|
+
render: 'button',
|
|
7
|
+
type: 'button',
|
|
8
|
+
width: 34,
|
|
9
|
+
height: 34,
|
|
10
|
+
shrink: 0,
|
|
11
|
+
rounded: 999,
|
|
12
|
+
bg: RAISED,
|
|
13
|
+
borderWidth: 1,
|
|
14
|
+
borderColor: LINE,
|
|
15
|
+
items: 'center',
|
|
16
|
+
justify: 'center',
|
|
17
|
+
cursor: 'pointer',
|
|
18
|
+
p: 0,
|
|
19
|
+
hoverStyle: { bg: PICKED },
|
|
9
20
|
focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' },
|
|
10
21
|
};
|
|
11
|
-
/** A pill: the open bot in the bar,
|
|
22
|
+
/** A pill: the open bot in the bar, a notice's ways past. */
|
|
12
23
|
export const PILL = {
|
|
13
|
-
render: 'button',
|
|
14
|
-
|
|
15
|
-
|
|
24
|
+
render: 'button',
|
|
25
|
+
type: 'button',
|
|
26
|
+
display: 'flex',
|
|
27
|
+
items: 'center',
|
|
28
|
+
gap: 8,
|
|
29
|
+
height: 36,
|
|
30
|
+
px: 13,
|
|
31
|
+
rounded: 999,
|
|
32
|
+
bg: RAISED,
|
|
33
|
+
borderWidth: 1,
|
|
34
|
+
borderColor: LINE,
|
|
35
|
+
cursor: 'pointer',
|
|
36
|
+
shrink: 0,
|
|
37
|
+
hoverStyle: { bg: PICKED },
|
|
16
38
|
focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' },
|
|
17
39
|
};
|
|
18
40
|
/** A pill's words. */
|
|
19
|
-
export const WORD = { fontSize:
|
|
41
|
+
export const WORD = { fontSize: 14, lineHeight: 19, fontWeight: '500', color: INK, numberOfLines: 1 };
|
|
20
42
|
/** A section's heading in the panel. */
|
|
21
43
|
export const LABEL = { render: 'h3', fontSize: 13, lineHeight: 18, fontWeight: '400', color: DIM, m: 0 };
|
|
22
44
|
/** A card in the panel. */
|
|
23
|
-
export const CARD = { bg: RAISED, borderWidth: 1, borderColor: LINE, rounded:
|
|
45
|
+
export const CARD = { bg: RAISED, borderWidth: 1, borderColor: LINE, rounded: 14 };
|
|
24
46
|
/** One line, cut with an ellipsis where it runs out of space. */
|
|
25
47
|
export const CLIP = { whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' };
|
package/dist/bots/said.d.ts
CHANGED
|
@@ -32,3 +32,19 @@ export type Line = {
|
|
|
32
32
|
};
|
|
33
33
|
/** The thread as lines: stamps where it paused, each run as the messages it holds. */
|
|
34
34
|
export declare function lines(runs: readonly AgentRun[], bots: readonly Agent[], self: string, pending: Pending | null, now: number, locale: string, t: (s: string, v?: Record<string, unknown>) => string): Line[];
|
|
35
|
+
export type MessagePart = {
|
|
36
|
+
kind: 'prose';
|
|
37
|
+
text: string;
|
|
38
|
+
} | {
|
|
39
|
+
kind: 'doc';
|
|
40
|
+
name: string;
|
|
41
|
+
size?: string;
|
|
42
|
+
href?: string;
|
|
43
|
+
ext: string;
|
|
44
|
+
} | {
|
|
45
|
+
kind: 'image';
|
|
46
|
+
alt: string;
|
|
47
|
+
src: string;
|
|
48
|
+
};
|
|
49
|
+
/** Splits a message into prose blocks, standalone document cards, and standalone preview images. */
|
|
50
|
+
export declare function partsOf(raw: string): MessagePart[];
|
package/dist/bots/said.js
CHANGED
|
@@ -41,3 +41,66 @@ export function lines(runs, bots, self, pending, now, locale, t) {
|
|
|
41
41
|
}
|
|
42
42
|
return out;
|
|
43
43
|
}
|
|
44
|
+
function formatBytes(bytes) {
|
|
45
|
+
if (bytes >= 1_048_576)
|
|
46
|
+
return `${(bytes / 1_048_576).toFixed(1)}MB`;
|
|
47
|
+
if (bytes >= 1024)
|
|
48
|
+
return `${Math.max(1, Math.round(bytes / 1024))}KB`;
|
|
49
|
+
return `${bytes}B`;
|
|
50
|
+
}
|
|
51
|
+
const DOC_EXT = /\.(pdf|pptx?|docx?|xlsx?|csv|zip|md|json|txt)$/i;
|
|
52
|
+
/** Splits a message into prose blocks, standalone document cards, and standalone preview images. */
|
|
53
|
+
export function partsOf(raw) {
|
|
54
|
+
const out = [];
|
|
55
|
+
const prose = [];
|
|
56
|
+
const flush = () => {
|
|
57
|
+
const joined = prose.join('\n').trim();
|
|
58
|
+
if (joined)
|
|
59
|
+
out.push({ kind: 'prose', text: joined });
|
|
60
|
+
prose.length = 0;
|
|
61
|
+
};
|
|
62
|
+
const fenceRe = /^(`{3,})([^\n`]+\.[a-z0-9]{2,5})\n([\s\S]*?)\n\1$/gm;
|
|
63
|
+
let cursor = 0;
|
|
64
|
+
for (const match of raw.matchAll(fenceRe)) {
|
|
65
|
+
const before = raw.slice(cursor, match.index ?? 0);
|
|
66
|
+
parseLines(before, out, prose, flush);
|
|
67
|
+
flush();
|
|
68
|
+
const name = match[2].trim();
|
|
69
|
+
const ext = (name.split('.').pop() ?? '').toLowerCase();
|
|
70
|
+
out.push({ kind: 'doc', name, size: formatBytes(new TextEncoder().encode(match[3]).length), ext });
|
|
71
|
+
cursor = (match.index ?? 0) + match[0].length;
|
|
72
|
+
}
|
|
73
|
+
parseLines(raw.slice(cursor), out, prose, flush);
|
|
74
|
+
flush();
|
|
75
|
+
return out.length ? out : [{ kind: 'prose', text: raw }];
|
|
76
|
+
}
|
|
77
|
+
function parseLines(chunk, out, prose, flush) {
|
|
78
|
+
for (const line of chunk.split('\n')) {
|
|
79
|
+
const trimmed = line.trim();
|
|
80
|
+
const img = /^!\[([^\]]*)\]\(([^)]+)\)$/.exec(trimmed);
|
|
81
|
+
if (img) {
|
|
82
|
+
flush();
|
|
83
|
+
out.push({ kind: 'image', alt: img[1], src: img[2] });
|
|
84
|
+
continue;
|
|
85
|
+
}
|
|
86
|
+
const link = /^\[([^\]]+)\]\(([^)]+)\)$/.exec(trimmed);
|
|
87
|
+
if (link) {
|
|
88
|
+
const label = link[1].trim();
|
|
89
|
+
const parts = label.split(/\s*[·•|]\s*/);
|
|
90
|
+
const filePart = parts[0].trim();
|
|
91
|
+
const extMatch = DOC_EXT.exec(filePart);
|
|
92
|
+
if (extMatch) {
|
|
93
|
+
flush();
|
|
94
|
+
out.push({
|
|
95
|
+
kind: 'doc',
|
|
96
|
+
name: filePart,
|
|
97
|
+
size: parts[1]?.trim(),
|
|
98
|
+
href: link[2].trim(),
|
|
99
|
+
ext: extMatch[1].toLowerCase(),
|
|
100
|
+
});
|
|
101
|
+
continue;
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
prose.push(line);
|
|
105
|
+
}
|
|
106
|
+
}
|
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,9 +37,13 @@ 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 rail's width, px: two insets. */
|
|
42
|
+
export declare const RAIL: number;
|
|
43
|
+
/** The top bar's height, px, on every shell. */
|
|
44
|
+
export declare const BAR = 44;
|
|
41
45
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export declare const SIDE =
|
|
46
|
+
export declare const SIDE = 280;
|
|
43
47
|
/**
|
|
44
48
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
49
|
*/
|
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,9 +37,13 @@ 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 rail's width, px: two insets. */
|
|
42
|
+
export const RAIL = 2 * INSET;
|
|
43
|
+
/** The top bar's height, px, on every shell. */
|
|
44
|
+
export const BAR = 44;
|
|
41
45
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export const SIDE =
|
|
46
|
+
export const SIDE = 280;
|
|
43
47
|
/**
|
|
44
48
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
49
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.74",
|
|
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",
|