@hanzo/app 0.3.71 → 0.3.72
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/App.js +23 -17
- package/dist/Rail.d.ts +2 -2
- package/dist/Rail.js +4 -4
- package/dist/Shell.js +9 -4
- package/dist/Sidebar.js +7 -7
- package/dist/ground.d.ts +3 -3
- package/dist/ground.js +3 -3
- package/package.json +1 -1
package/dist/App.js
CHANGED
|
@@ -77,7 +77,7 @@ 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, RAIL, Toggle } from './Rail.js';
|
|
80
|
+
import { Mark, MARK, raised, Rail, RAIL, Toggle } from './Rail.js';
|
|
81
81
|
import { Layer, Lift, useDrawer } from './Drawer.js';
|
|
82
82
|
import { empty, openThread, showSettings, useOpen } from './open.js';
|
|
83
83
|
import { Split } from './Shell.js';
|
|
@@ -113,7 +113,7 @@ const Betas = lazy(() => import('./Betas.js').then((m) => ({ default: m.BetasPan
|
|
|
113
113
|
/** `/` is Chat on a new conversation. */
|
|
114
114
|
const HOME = { mode: 'chat', thread: null };
|
|
115
115
|
/** The bar's height, px: a thin top bar on the ground. */
|
|
116
|
-
const BAR =
|
|
116
|
+
const BAR = 38;
|
|
117
117
|
/** Where each mode was last, so the rail goes back to it. */
|
|
118
118
|
const last = { chat: '', dev: '', studio: '', design: '', flow: '', tabs: '' };
|
|
119
119
|
/** Whether a key press is the reader typing, where the app's keys are the field's. */
|
|
@@ -332,9 +332,9 @@ function Window({ bar, betas }) {
|
|
|
332
332
|
shut();
|
|
333
333
|
setFinding(true);
|
|
334
334
|
};
|
|
335
|
-
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...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:
|
|
335
|
+
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { children: _jsx(UsageProvider, { children: _jsxs(YStack, { ref: windowRef, "data-slot": "window", ...floor, flex: 1, minW: 0, height: bar ? '100%' : '100dvh', overflow: "hidden", rounded: bar ? '$3' : undefined, "$max-md": { position: 'fixed', t: TOP, l: 0, r: 0, height: HEIGHT, ...{ overflow: 'clip' } }, children: [_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", "$max-md": bar ? undefined : { display: 'none' }, onMouseDown: bar ? dragWindow : undefined, onDoubleClick: bar ? toggleWindowMaximize : undefined, ...(bar?.drag ?? null), children: [_jsxs(XStack, { "data-slot": "title-bar-start", height: "100%", items: "center", gap: 2, pl: bar?.inset ? bar.inset + 4 : (RAIL - (MARK ?? 34)) / 2, pr: 8, shrink: 0, minW: closed || alone ? undefined : `calc(${RAIL}px + var(--app-sidebar-span, ${SIDE}px))`, ...(bar?.drag ?? null), children: [bar ? (_jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) })) : null, _jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 15, "aria-hidden": true, "data-i18n-mirror": true }) })] }), _jsxs(XStack, { id: "hanzo-titlebar-slot", "data-slot": "title-bar-main", flex: 1, minW: 0, self: "stretch", items: "center", justify: "space-between", pl: 14, pr: 10, gap: 6, ...(bar?.drag ?? null), children: [mode === 'chat' ? null : (_jsx(XStack, { "data-slot": "titlebar-fallback", flex: 1, minW: 0, items: "center", justify: "space-between", gap: 8, children: _jsx(Text, { fontSize: 13, lineHeight: 18, fontWeight: "500", color: "$ink", numberOfLines: 1, children: mode === 'dev' && !inPlace ? 'Dev' : mode === 'studio' ? 'Studio' : mode === 'design' ? 'Design' : mode === 'flow' ? 'Flow' : mode === 'tabs' ? 'Tabs' : '' }) })), bar ? (bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null) : null] })] }), _jsxs(XStack, { ref: drawer.pane, "data-app": mode, "data-slot": "frame", bg: "transparent", ...drawer.slide, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)",
|
|
336
336
|
// The gap above the pane is the gap at its end and foot; a window's own bar above it is that gap.
|
|
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) => {
|
|
337
|
+
pt: bar ? 0 : 'var(--pane-gap)', $md: { pt: 0 }, "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsxs(YStack, { height: "100%", position: "relative", "$max-md": { display: 'none' }, children: [_jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), closed ? (_jsx(YStack, { "data-slot": "sidebar-reopen-edge", position: "absolute", t: 0, b: 0, r: -4, width: 8, z: 20, cursor: "ew-resize", onDoubleClick: () => setClosed(false), onMouseDown: (down) => {
|
|
338
338
|
const e = down;
|
|
339
339
|
const startX = e.clientX ?? 0;
|
|
340
340
|
const onMove = (mv) => {
|
|
@@ -350,19 +350,25 @@ function Window({ bar, betas }) {
|
|
|
350
350
|
};
|
|
351
351
|
window.addEventListener('mousemove', onMove);
|
|
352
352
|
window.addEventListener('mouseup', onUp);
|
|
353
|
-
} })) : null] }),
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
353
|
+
} })) : null] }), _jsxs(XStack, { "data-slot": "inner-surface", flex: 1, minW: 0, minH: 0, $md: {
|
|
354
|
+
rounded: 'var(--pane-round)',
|
|
355
|
+
overflow: 'hidden',
|
|
356
|
+
borderWidth: 1,
|
|
357
|
+
borderColor: 'var(--pane-edge, var(--edge, var(--white-06)))',
|
|
358
|
+
bg: 'var(--pane-fill)',
|
|
359
|
+
}, children: [closed || alone ? null : (_jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage",
|
|
360
|
+
// A column: the phone's bar, then the panes taking the rest. Not a grid of `auto` and
|
|
361
|
+
// `1fr` rows: from md the bar is display none, which leaves the grid, so the panes were
|
|
362
|
+
// placed in the `auto` row and stood their content's height, and Dev's pane, which
|
|
363
|
+
// scrolls inside, collapsed to its border (Projects drew blank). The rest of the row
|
|
364
|
+
// beside the rail and the sidebar, never width 100%: a View does not shrink, so at the
|
|
365
|
+
// row's full width again the pane stood past the window's edge.
|
|
366
|
+
flex: 1, minW: 0, minH: 0, "$max-md": { pb: `max(var(--pane-gap), ${FOOT})` }, children: [bar ? null : _jsx(Bar, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open }), _jsx(XStack, { "data-slot": "panes", flex: 1, display: "grid", gridTemplateAreas: '"pane side"', gridTemplateColumns: "minmax(0, 1fr) auto", gridTemplateRows: "minmax(0, 1fr)", minW: 0, minH: 0, children: anonSettings && host.person === null ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(AnonSettingsPane, { host: host, onClose: () => {
|
|
367
|
+
setAnonSettings(false);
|
|
368
|
+
if (typeof window !== 'undefined') {
|
|
369
|
+
window.dispatchEvent(new CustomEvent('hanzo:anon-settings', { detail: { open: false } }));
|
|
370
|
+
}
|
|
371
|
+
} }) })) : mode === 'chat' ? (_jsx(Split, { framed: true, children: _jsx(Chat, {}) })) : mode === 'tabs' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'design' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : mode === 'flow' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Workflow, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Flow" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'flow')?.line ?? 'Visual workflows and multi-agent pipelines.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'flow'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(FlowStudio, { host: maker }) }) })) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: blockedBeta ? (_jsx(YStack, { "data-slot": "hosted-request", flex: 1, minH: 0, items: "center", justify: "center", p: "$6", children: _jsxs(YStack, { width: "100%", maxW: 440, gap: "$4", children: [_jsxs(XStack, { items: "center", gap: "$3", children: [_jsx(XStack, { width: 44, height: 44, rounded: "$4", bg: "$hover", items: "center", justify: "center", shrink: 0, children: _jsx(Clapperboard, { size: 22, "aria-hidden": true }) }), _jsxs(YStack, { gap: 2, minW: 0, children: [_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Text, { fontSize: "$6", fontWeight: "600", color: "$ink", children: "Studio" }), _jsx(Text, { fontSize: "$1", color: "$quiet", px: "$2", py: 2, rounded: "$2", bg: "$hover", children: t('Beta') })] }), _jsx(Text, { fontSize: "$3", color: "$quiet", children: BETAS.find((b) => b.id === 'studio')?.line ?? 'Director Studio for AI film, video, and creative production.' })] })] }), _jsxs(XStack, { items: "center", gap: "$2", pt: "$1", children: [_jsx(Ask, { beta: BETAS.find((b) => b.id === 'studio'), go: move }), _jsx(Button, { variant: "ghost", size: "sm", onPress: () => move('/beta'), children: t('All betas') })] })] }) })) : (_jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(DirectorStudio, { host: maker }) }) })) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, $md: { rounded: 0 }, children: _jsx(Suspense, { fallback: null, children: _jsx(Hosted, { id: at.id, go: move }) }) })) : mode === 'beta' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflowY: "auto", overflowX: "hidden", flex: 1, minW: 0, minH: 0, p: "$4", $md: { p: '$6', rounded: 0 }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsxs(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden', $md: { rounded: 0 } }), position: "relative", flex: 1, minW: 0, minH: 0, children: [!plans && !run && !inPlace && closed && free && host.person !== null ? (_jsx(XStack, { position: "absolute", t: 8, r: 12, z: 5, items: "center", "$max-md": { display: 'none' }, children: _jsxs(XStack, { render: "button", "data-slot": "header-upgrade", "aria-label": t('Upgrade plan'), items: "center", gap: "$1.5", px: "$2", py: "$1", rounded: "$3", bg: "transparent", cursor: "pointer", hoverStyle: { bg: '$hover' }, onPress: () => window.location.assign(payUrl('/cart', { org: currentOrg(), returnUrl: window.location.href })), children: [_jsx(Sparkles, { size: 14, color: "var(--muted-foreground)", "aria-hidden": true }), _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "500", color: "$soft", numberOfLines: 1, children: t('Upgrade plan') })] }) })) : null, plans ? null : _jsx(Builder, { host: host, rail: false })] })) })] })] })] }), drawer.state === 'shut' ? null : (_jsx(Layer, { drawer: drawer, top: bar ? BAR : 0, children: _jsxs(XStack, { flex: 1, minH: 0, children: [_jsx(YStack, { "data-slot": "drawer-rail", shrink: 0, pt: "calc(var(--pane-gap) + 4px)", $touchable: { pt: 'calc(var(--pane-gap) + 4px)' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, onDesign: toDesign, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), _jsx(YStack, { flex: 1, minW: 0, children: _jsx(Sidebar, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar }) })] }) })), finding ? _jsx(Search, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null, _jsx(AppContextMenu, { host: host, mode: mode, closed: closed, onToggleSidebar: flip, onSeek: seek, onNewChat: () => {
|
|
366
372
|
empty();
|
|
367
373
|
move(talk());
|
|
368
374
|
}, go: move })] }) }) }) }) }));
|
package/dist/Rail.d.ts
CHANGED
|
@@ -3,8 +3,8 @@ import { type Host } from '@hanzo/build';
|
|
|
3
3
|
import { type Place } from './lib/host.js';
|
|
4
4
|
/** The rail's width, px. */
|
|
5
5
|
export declare const RAIL: number;
|
|
6
|
-
/** A mark, px: a
|
|
7
|
-
export declare const MARK =
|
|
6
|
+
/** A mark, px: a 34px rounded square on the rail's 48px. */
|
|
7
|
+
export declare const MARK = 34;
|
|
8
8
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
9
9
|
export declare const RAISED: {
|
|
10
10
|
readonly library: '-/artifacts';
|
package/dist/Rail.js
CHANGED
|
@@ -51,8 +51,8 @@ import { HEAD, INSET, TOUCH_HEAD } from './ground.js';
|
|
|
51
51
|
import { app, hosted, WORKSPACE } from './lib/host.js';
|
|
52
52
|
/** The rail's width, px. */
|
|
53
53
|
export const RAIL = 2 * INSET;
|
|
54
|
-
/** A mark, px: a
|
|
55
|
-
export const MARK =
|
|
54
|
+
/** A mark, px: a 34px rounded square on the rail's 48px. */
|
|
55
|
+
export const MARK = 34;
|
|
56
56
|
/** A mark on a touch screen, px: a thumb's 44. */
|
|
57
57
|
const TOUCH = 44;
|
|
58
58
|
/** The places the rail holds beside the products, by the builder address each opens. */
|
|
@@ -72,7 +72,7 @@ export function raised(at) {
|
|
|
72
72
|
}
|
|
73
73
|
/** One mark: an icon button named for where it goes (`label`, already in the reader's language), its name its tooltip, lit where the reader is. */
|
|
74
74
|
export function Mark({ label, on = false, onPress, children, ...rest }) {
|
|
75
|
-
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded:
|
|
75
|
+
return (_jsx(XStack, { render: "button", "aria-label": label, ...{ title: label }, "aria-current": on ? 'page' : undefined, onPress: onPress, width: MARK, height: MARK, rounded: 10, items: "center", justify: "center", shrink: 0, cursor: "pointer", opacity: on ? 1 : 0.72, bg: on ? 'var(--rail-active, var(--white-14))' : 'transparent', hoverStyle: { bg: on ? 'var(--rail-active, var(--white-14))' : 'var(--rail-hover, var(--white-08))', opacity: 1 }, pressStyle: { bg: '$raised' }, focusVisibleStyle: { outlineWidth: 2, outlineStyle: 'solid', outlineColor: '$outlineColor' },
|
|
76
76
|
// A thumb's 44px on a touch screen.
|
|
77
77
|
$touchable: { width: TOUCH, height: TOUCH }, ...rest, children: children }));
|
|
78
78
|
}
|
|
@@ -131,7 +131,7 @@ export function Rail({ host, mode, at, open, toggle, inside = null, rows = false
|
|
|
131
131
|
minH: 0,
|
|
132
132
|
// The first mark stands at the pane's top edge, one head row high (HEAD), and the last at its foot by the
|
|
133
133
|
// same inset, so the account mirrors the sidebar's toggle across the rail.
|
|
134
|
-
pt: (HEAD - MARK) / 2 +
|
|
134
|
+
pt: (HEAD - MARK) / 2 + 3, pb: 8, gap: 3, shrink: 0, items: "center", "$max-md": { pb: 0 }, $touchable: { pt: (TOUCH_HEAD - TOUCH) / 2, pb: 0 }, children: [toggle ? (_jsx(YStack, { children: _jsx(Toggle, { open: open, onPress: toggle }) })) : null, _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", items: "center", gap: 4, width: "100%", "$platform-web": { scrollbarWidth: 'none' }, children: [_jsx(Mark, { label: t('Chat'), on: mode === 'chat', onPress: onChat, "data-slot": "rail-chat", children: _jsx(MARKS.chat.icon, { size: 18, "aria-hidden": true }) }), _jsx(Mark, { label: "Dev", on: mode === 'dev' && !here, onPress: onDev, "data-slot": "rail-dev", children: _jsx(MARKS.dev.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: "Design", on: mode === 'design', onPress: onDesign, "data-slot": "rail-design", children: _jsx(MARKS.design.icon, { size: 18, "aria-hidden": true }) })), !anon && opened('studio') ? (_jsx(Mark, { label: "Studio", on: mode === 'studio', onPress: onStudio, "data-slot": "rail-studio", children: _jsx(MARKS.studio.icon, { size: 18, "aria-hidden": true }) })) : null, anon ? null : (_jsx(Mark, { label: "Tabs", on: mode === 'tabs', onPress: onTabs, "data-slot": "rail-tabs", children: _jsx(MARKS.tabs.icon, { size: 18, "aria-hidden": true }) })), apps.map((a) => (_jsx(Mark, { label: a.name, on: inside === a.id, onPress: () => go(hosted(a.id)), "data-slot": `rail-app-${a.id}`, children: _jsx(a.icon, { size: 18, "aria-hidden": true }) }, a.id))), _jsx(Mark, { label: t('Library'), on: here === 'library', onPress: to(RAISED.library), "data-slot": "rail-library", children: _jsx(MARKS.library.icon, { size: 18, "aria-hidden": true }) }), anon ? null : (_jsx(Mark, { label: t('Scheduled tasks'), on: here === 'scheduled', onPress: to(RAISED.scheduled), "data-slot": "rail-scheduled", children: _jsx(MARKS.scheduled.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Customize'), on: here === 'customize', onPress: to(RAISED.customize), "data-slot": "rail-customize", children: _jsx(MARKS.customize.icon, { size: 18, "aria-hidden": true }) })), anon ? null : (_jsx(Mark, { label: t('Betas'), on: mode === 'beta', onPress: () => go('/beta'), "data-slot": "rail-betas", children: _jsx(FlaskConical, { size: 18, "aria-hidden": true }) })), betasDialog, !anon && rest.length ? (_jsx(DropdownMenu
|
|
135
135
|
// Toward the content: right of the rail, left of it right to left.
|
|
136
136
|
, {
|
|
137
137
|
// Toward the content: right of the rail, left of it right to left.
|
package/dist/Shell.js
CHANGED
|
@@ -1018,7 +1018,7 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1018
1018
|
return (_jsxs(_Fragment, { children: [_jsxs(YStack, { render: "main", "data-slot": "pane", gridArea: "pane", position: "relative", ...(framed
|
|
1019
1019
|
? bare
|
|
1020
1020
|
? null
|
|
1021
|
-
: { ...pane(), overflow: "hidden" }
|
|
1021
|
+
: { ...pane(), overflow: "hidden", $md: { rounded: 0 } }
|
|
1022
1022
|
: {
|
|
1023
1023
|
...sheet(0),
|
|
1024
1024
|
// The edge the pane shares with the column before it: the left, or the right in a right-to-left language.
|
|
@@ -1052,9 +1052,14 @@ export function Split({ children, swap, framed = false, bare = false, }) {
|
|
|
1052
1052
|
target.addEventListener("pointermove", onMove);
|
|
1053
1053
|
target.addEventListener("pointerup", cleanup);
|
|
1054
1054
|
target.addEventListener("pointercancel", cleanup);
|
|
1055
|
-
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ?
|
|
1056
|
-
|
|
1057
|
-
|
|
1055
|
+
} })) : null] }), aside ? (_jsxs(YStack, { render: "aside", "data-slot": "side", gridArea: "side", ...pane(framed ? "var(--side-fill, var(--pane-fill))" : sheet(1).backgroundColor), ...(framed
|
|
1056
|
+
? {
|
|
1057
|
+
rounded: 0,
|
|
1058
|
+
borderInlineStartWidth: 1,
|
|
1059
|
+
borderInlineStartStyle: "solid",
|
|
1060
|
+
borderColor: "var(--pane-edge, var(--edge, var(--white-06)))",
|
|
1061
|
+
}
|
|
1062
|
+
: null), marginInlineStart: 0, ref: split.aside, position: "relative", shrink: 0, minH: 0, display: "none", $lg: { display: "flex" }, children: [split.grip ? (_jsx(Gutter, { ...split.grip, label: t("Resize side panel"), gap: split.side.hidden ? 0 : undefined, inset: split.side.hidden ? -4 : 1 })) : null, _jsx(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", rounded: framed ? 0 : "var(--pane-round)", ref: (el) => setSlot(el instanceof HTMLElement ? el : null) })] })) : null] }));
|
|
1058
1063
|
}
|
|
1059
1064
|
/**
|
|
1060
1065
|
* THE RAIL: where you can go, as marks with their names under them. It is the
|
package/dist/Sidebar.js
CHANGED
|
@@ -38,7 +38,7 @@ import { useEffect, useId, useMemo, useState } from 'react';
|
|
|
38
38
|
import { Made } from './Account.js';
|
|
39
39
|
import { useBetas } from './Betas.js';
|
|
40
40
|
import { Recents } from './Recents.js';
|
|
41
|
-
import {
|
|
41
|
+
import { raised } from './Rail.js';
|
|
42
42
|
import { Setup } from './Setup.js';
|
|
43
43
|
import { ago, UNTITLED_RUN } from './recent.js';
|
|
44
44
|
import { empty } from './open.js';
|
|
@@ -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 32px pill, 44px on a touch screen, lit where the reader is. */
|
|
72
|
+
const ROW = { rounded: 8, minH: 32, py: 0, px: '$2.5', width: '100%', $touchable: { minH: 44 } };
|
|
73
73
|
/** A sidebar link row spans the column width so hover and active pills align with Recents. */
|
|
74
74
|
const COMPACT_ROW = ROW;
|
|
75
75
|
/** The run activity behind the bell: the runs that moved last, newest first. */
|
|
@@ -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: drawer ? undefined : "var(--side-fill, var(--sheet-2))",
|
|
353
|
+
return (_jsxs(YStack, { "data-slot": "app-column", ref: drawer ? undefined : span.ref, ...(drawer ? null : { '$platform-web': { '--span': `${span.span}px`, ...(anon ? { overflow: 'visible' } : null) } }), position: "relative", z: drawer ? undefined : 5, flex: drawer ? 1 : undefined, shrink: drawer ? 1 : 0, minW: 0, height: "100%", width: drawer ? undefined : `var(--span, ${WIDTH}px)`, maxW: drawer ? undefined : `var(--span, ${WIDTH}px)`, bg: drawer ? undefined : "var(--side-fill, var(--sheet-2))", borderTopWidth: 0, borderBottomWidth: 0, borderRightWidth: drawer || dir === 'rtl' ? 0 : 1, borderLeftWidth: !drawer && dir === 'rtl' ? 1 : 0, borderStyle: "solid", borderColor: "var(--pane-edge, var(--edge, var(--white-06)))", children: [_jsxs(Base, { "data-slot": "app-rail", role: "navigation", "aria-label": brand(), bg: "transparent", borderWidth: 0, ...FILL, px: 8, pt: drawer ? 'var(--pane-gap)' : 2,
|
|
354
354
|
// In the drawer the menu's own foot padding is the gap; its foot row stands on it.
|
|
355
|
-
pb: drawer ? 0 :
|
|
355
|
+
pb: drawer ? 0 : 7, gap: "$0", "$platform-web": anon && !drawer ? { overflow: 'visible' } : undefined, children: [at ? (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: "$1", paddingInlineStart: 2, paddingInlineEnd: 2,
|
|
356
356
|
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
357
357
|
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(SidebarIconButton, { label: t('Back'), "data-slot": "place-back", "data-tauri-drag-region": "false", onPress: onBack, ...HEAD, children: _jsx(ArrowLeft, { size: 16, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Text, { flex: 1, minW: 0, fontSize: 15, lineHeight: 20, fontWeight: "600", color: "$ink", numberOfLines: 1, "data-slot": "place-name", children: t(TITLE[at]) })] })) : (_jsxs(XStack, { "data-slot": "app-head", items: "center", gap: 2, paddingInlineStart: 8, paddingInlineEnd: 2,
|
|
358
358
|
// The phone's drawer lines up with its bar (BAND); beside the rail, with the rail's first mark (ground.ts HEAD).
|
|
359
|
-
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(XStack, { flex: 1, minW: 0, items: "center", gap: 4, children: _jsx(Text, { fontSize:
|
|
359
|
+
height: drawer ? BAND : LINE, $touchable: drawer ? undefined : { height: TOUCH_HEAD }, shrink: 0, minW: 0, "data-tauri-drag-region": "deep", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, children: [_jsx(XStack, { flex: 1, minW: 0, items: "center", gap: 4, children: _jsx(Text, { fontSize: 15, lineHeight: 20, fontWeight: "600", color: "$ink", numberOfLines: 1, children: wordmark(mode) }) }), drawer || anon ? null : _jsx(Activity, { host: host }), anon ? null : (_jsx(SidebarIconButton, { label: t('Search'), "data-tauri-drag-region": "false", onPress: onSeek, "aria-haspopup": "dialog", ...(drawer
|
|
360
360
|
? {
|
|
361
361
|
width: 40,
|
|
362
362
|
height: 40,
|
|
@@ -391,7 +391,7 @@ export function Sidebar({ host, mode, thread, go, onShut, onSeek, onBack, drawer
|
|
|
391
391
|
}, children: t('Log in') }), _jsx(Button, { size: "sm", flex: 1, rounded: 9999, "data-slot": "column-signup", onPress: () => {
|
|
392
392
|
if (typeof window !== 'undefined')
|
|
393
393
|
window.location.assign('/signup?next=%2Fchat');
|
|
394
|
-
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH:
|
|
394
|
+
}, children: t('Sign up') })] })] }) })) : at || mode === 'beta' || mode === 'hosted' ? null : (_jsxs(YStack, { gap: "$2", pt: "$2", shrink: 0, minW: 0, maxW: "100%", children: [_jsx(Made, {}), _jsx(Setup, { go: go })] })), !anon && free && (drawer || (mode !== 'beta' && mode !== 'hosted')) ? (_jsx(YStack, { role: "list", gap: 2, shrink: 0, pt: "$2", children: _jsx(YStack, { role: "listitem", minH: 36, justify: "center", children: _jsx(SidebarItem, { ...ROW, "data-slot": "column-upgrade", icon: _jsx(XStack, { width: 18, height: 18, items: "center", justify: "center", shrink: 0, children: _jsx(Sparkles, { size: 15, "aria-hidden": true, color: "var(--muted-foreground)" }) }), onPress: () => window.location.assign(payUrl('/cart', { returnUrl: window.location.href })), ...keys(() => window.location.assign(payUrl('/cart', { returnUrl: window.location.href }))), children: _jsx(Text, { fontSize: "$3", color: "$ink", children: t('Upgrade plan') }) }) }) })) : null, _jsx(UpdatePill, {}), foot] }), drawer ? null : (_jsx(Gutter, { side: dir === 'rtl' ? 'right' : 'left', span: span.span, floor: FLOOR, ceil: CEIL, reset: WIDTH, onSpan: span.move, onKeep: span.keep, onShut: onShut, label: t('Resize sidebar') }))] }));
|
|
395
395
|
}
|
|
396
396
|
function UpdatePill() {
|
|
397
397
|
const { t } = useI18n();
|
package/dist/ground.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export declare const HEAD =
|
|
32
|
+
export declare const HEAD = 38;
|
|
33
33
|
export declare const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,9 +37,9 @@ export declare const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export declare const INSET =
|
|
40
|
+
export declare const INSET = 24;
|
|
41
41
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export declare const SIDE =
|
|
42
|
+
export declare const SIDE = 260;
|
|
43
43
|
/**
|
|
44
44
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
45
|
*/
|
package/dist/ground.js
CHANGED
|
@@ -29,7 +29,7 @@ export const BAND = 52;
|
|
|
29
29
|
* top, left, right"). A thumb's mark is 44 on a touch screen, and the rows grow
|
|
30
30
|
* with it (`TOUCH_HEAD`).
|
|
31
31
|
*/
|
|
32
|
-
export const HEAD =
|
|
32
|
+
export const HEAD = 38;
|
|
33
33
|
export const TOUCH_HEAD = 44;
|
|
34
34
|
/**
|
|
35
35
|
* A corner mark's centre from its edge, px: the rail's first mark from the
|
|
@@ -37,9 +37,9 @@ export const TOUCH_HEAD = 44;
|
|
|
37
37
|
* mark from the pane's end edge, so the two top corners mirror each other
|
|
38
38
|
* (owner, 2026-10-30: "top left / top right").
|
|
39
39
|
*/
|
|
40
|
-
export const INSET =
|
|
40
|
+
export const INSET = 24;
|
|
41
41
|
/** The sidebar's width before the reader pulls its edge, px. */
|
|
42
|
-
export const SIDE =
|
|
42
|
+
export const SIDE = 260;
|
|
43
43
|
/**
|
|
44
44
|
* A row INSIDE a pane shares the height of the row it lines up with.
|
|
45
45
|
*/
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.72",
|
|
4
4
|
"description": "Hanzo's app: the shell and its apps (Home, Chat, Inbox, Contacts, Meet, Calendar, Drive, Board, Work, Bots), once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|