@hanzo/app 0.2.57 → 0.3.0
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/README.md +8 -8
- package/dist/{Me.d.ts → Account.d.ts} +1 -1
- package/dist/{Me.js → Account.js} +3 -3
- package/dist/App.d.ts +2 -2
- package/dist/App.js +18 -15
- package/dist/{Top.d.ts → Bar.d.ts} +1 -1
- package/dist/{Top.js → Bar.js} +3 -3
- package/dist/Betas.js +1 -1
- package/dist/Board.js +4 -4
- package/dist/Chat.d.ts +4 -4
- package/dist/Chat.js +96 -96
- package/dist/Contacts.js +17 -15
- package/dist/Directory.js +7 -21
- package/dist/Drive.js +6 -6
- package/dist/{Orgs.d.ts → Gate.d.ts} +1 -1
- package/dist/{Orgs.js → Gate.js} +32 -32
- package/dist/{Chrome.d.ts → Header.d.ts} +1 -1
- package/dist/{Chrome.js → Header.js} +1 -1
- package/dist/Home.d.ts +3 -3
- package/dist/Home.js +30 -30
- package/dist/Inbox.js +29 -33
- package/dist/Meet.js +22 -22
- package/dist/Rail.js +6 -6
- package/dist/RightPane.js +2 -2
- package/dist/{Palette.d.ts → Search.d.ts} +1 -1
- package/dist/{Palette.js → Search.js} +1 -1
- package/dist/Settings.d.ts +3 -3
- package/dist/Settings.js +5 -5
- package/dist/SettingsPane.d.ts +2 -2
- package/dist/SettingsPane.js +5 -5
- package/dist/Setup.js +2 -2
- package/dist/Shell.d.ts +22 -31
- package/dist/Shell.js +167 -114
- package/dist/{Column.d.ts → Sidebar.d.ts} +1 -1
- package/dist/{Column.js → Sidebar.js} +5 -5
- package/dist/Support.js +2 -2
- package/dist/Talk.d.ts +3 -3
- package/dist/Talk.js +18 -18
- package/dist/TeamPreview.js +26 -26
- package/dist/TeamStory.js +1 -1
- package/dist/Usage.js +2 -2
- package/dist/Work.js +2 -2
- package/dist/bots/Bots.js +2 -2
- package/dist/bots/Lights.d.ts +1 -1
- package/dist/bots/Lights.js +1 -1
- package/dist/bots/api.d.ts +8 -7
- package/dist/bots/api.js +4 -4
- package/dist/bots/ink.js +3 -3
- package/dist/bots/kit.d.ts +2 -2
- package/dist/bots/kit.js +4 -4
- package/dist/bots/runtime.js +12 -12
- package/dist/cast.d.ts +14 -14
- package/dist/cast.js +12 -12
- package/dist/channels.d.ts +132 -0
- package/dist/{rooms.js → channels.js} +56 -55
- package/dist/conversations.d.ts +8 -8
- package/dist/conversations.js +18 -17
- package/dist/crew.d.ts +1 -1
- package/dist/crew.js +12 -12
- package/dist/dev.js +6 -6
- package/dist/failure.d.ts +2 -2
- package/dist/failure.js +6 -6
- package/dist/ground.d.ts +1 -1
- package/dist/ground.js +1 -1
- package/dist/help.d.ts +1 -1
- package/dist/help.js +2 -2
- package/dist/hint.d.ts +1 -1
- package/dist/hint.js +1 -1
- package/dist/host.d.ts +15 -15
- package/dist/host.js +13 -13
- package/dist/index.d.ts +5 -5
- package/dist/index.js +4 -4
- package/dist/lib/ai.js +1 -1
- package/dist/lib/api.d.ts +1 -1
- package/dist/lib/api.js +1 -1
- package/dist/lib/destination.d.ts +3 -3
- package/dist/lib/destination.js +3 -3
- package/dist/lib/home.d.ts +2 -2
- package/dist/lib/home.js +2 -2
- package/dist/lib/host.d.ts +17 -16
- package/dist/lib/host.js +19 -18
- package/dist/lib/hostname.d.ts +1 -1
- package/dist/lib/hostname.js +1 -1
- package/dist/lib/list.d.ts +1 -1
- package/dist/lib/list.js +1 -1
- package/dist/lib/models.js +1 -1
- package/dist/lib/org.d.ts +1 -1
- package/dist/lib/org.js +1 -1
- package/dist/lib/orgname.d.ts +1 -1
- package/dist/lib/orgname.js +1 -1
- package/dist/lib/session.d.ts +4 -4
- package/dist/lib/session.js +6 -6
- package/dist/lib/tier.d.ts +4 -4
- package/dist/lib/tier.js +5 -5
- package/dist/lib/tiers.d.ts +1 -1
- package/dist/lib/tiers.js +10 -10
- package/dist/lib/web.d.ts +1 -1
- package/dist/lib/web.js +1 -1
- package/dist/network.d.ts +18 -18
- package/dist/network.js +28 -28
- package/dist/open.d.ts +24 -22
- package/dist/open.js +19 -19
- package/dist/pane.d.ts +6 -6
- package/dist/pane.js +10 -10
- package/dist/roster.d.ts +2 -2
- package/dist/roster.js +1 -1
- package/dist/seek.js +1 -1
- package/dist/slide.d.ts +1 -1
- package/dist/slide.js +1 -1
- package/dist/span.js +1 -1
- package/dist/stars.d.ts +4 -4
- package/dist/stars.js +8 -10
- package/dist/tabs.d.ts +1 -1
- package/dist/tabs.js +1 -1
- package/dist/team.js +1 -1
- package/dist/thread.d.ts +3 -3
- package/dist/thread.js +4 -4
- package/dist/ui.d.ts +1 -1
- package/dist/ui.js +1 -1
- package/dist/where.d.ts +7 -7
- package/dist/where.js +2 -2
- package/dist/workday.d.ts +26 -26
- package/dist/workday.js +187 -187
- package/package.json +3 -3
- package/dist/Room.d.ts +0 -8
- package/dist/Room.js +0 -51
- package/dist/rooms.d.ts +0 -131
- /package/dist/lib/{rooms.json → routes.json} +0 -0
package/README.md
CHANGED
|
@@ -1,23 +1,23 @@
|
|
|
1
1
|
# @hanzo/app
|
|
2
2
|
|
|
3
3
|
The Hanzo workspace — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board,
|
|
4
|
-
Work, Bots and the
|
|
4
|
+
Work, Bots and the shell that holds them — as one package that every surface
|
|
5
5
|
imports.
|
|
6
6
|
|
|
7
7
|
```tsx
|
|
8
|
-
import { configure,
|
|
9
|
-
import {
|
|
8
|
+
import { configure, Host } from '@hanzo/app'
|
|
9
|
+
import { Shell } from '@hanzo/app/Shell'
|
|
10
10
|
import { CalScheduler } from '@hanzo/app/CalScheduler'
|
|
11
11
|
|
|
12
12
|
configure({ site: '', home: '/home', signUp: '/signup' })
|
|
13
13
|
|
|
14
|
-
<
|
|
15
|
-
<
|
|
16
|
-
</
|
|
14
|
+
<Host router={router} path={pathname} route={route} Link={Link}>
|
|
15
|
+
<Shell mode="cal"><CalScheduler /></Shell>
|
|
16
|
+
</Host>
|
|
17
17
|
```
|
|
18
18
|
|
|
19
19
|
`configure()` names the host's addresses (where its own pages live, the
|
|
20
|
-
gateway and IAM, the plan catalogue to paint first). `<
|
|
21
|
-
moves: the router, the path, the route and the link component. The
|
|
20
|
+
gateway and IAM, the plan catalogue to paint first). `<Host>` carries what
|
|
21
|
+
moves: the router, the path, the route and the link component. The apps
|
|
22
22
|
import nothing from a host, and their look comes from `@hanzo/appearance` and
|
|
23
23
|
`@hanzo/design` through `@hanzo/ui`.
|
|
@@ -21,7 +21,7 @@ export declare function Face({ host, size }: {
|
|
|
21
21
|
* plan, Free included, is one to move up from.
|
|
22
22
|
*/
|
|
23
23
|
export declare const upgrade: (family: string | null | undefined) => string;
|
|
24
|
-
export declare function
|
|
24
|
+
export declare function Account({ host, narrow, above, onOrg, defaultAccountOpen, }: {
|
|
25
25
|
host: Who;
|
|
26
26
|
/** The rail's: the face alone, the menu opening beside it. */
|
|
27
27
|
narrow?: boolean;
|
|
@@ -21,7 +21,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
21
21
|
// personal one first, with its plan — switched with `onOrg`; Create
|
|
22
22
|
// organization, Organization settings, and Hanzo Team (opened in the same
|
|
23
23
|
// organization for a team, offered as "Create a team" for a personal one); and
|
|
24
|
-
// All organizations for a SuperAdmin, which opens the chooser (
|
|
24
|
+
// All organizations for a SuperAdmin, which opens the chooser (Gate.tsx).
|
|
25
25
|
//
|
|
26
26
|
// Its words go through `t`; names, plans, addresses and keys are drawn as they
|
|
27
27
|
// are, a key isolated left to right so its `+` and `,` keep their places in a
|
|
@@ -30,7 +30,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
30
30
|
// IAM is the source of every fact here: names and roles from the token's `orgs`
|
|
31
31
|
// claim, display names and which org is personal from `GET /v1/iam/organizations`,
|
|
32
32
|
// the plan from billing and the limits. An organization is created by the same
|
|
33
|
-
// `POST /v1/account/orgs` the no-organization gate uses (
|
|
33
|
+
// `POST /v1/account/orgs` the no-organization gate uses (Gate.tsx); the next load
|
|
34
34
|
// mints a token that carries it.
|
|
35
35
|
import { phrase, locales } from '@hanzo/i18n';
|
|
36
36
|
import { useI18n } from '@hanzo/i18n/react';
|
|
@@ -142,7 +142,7 @@ const Mark = ({ org }) => (_jsx(XStack, { width: 16, height: 16, rounded: "$2",
|
|
|
142
142
|
export const upgrade = (family) => family === 'Enterprise' ? phrase('Enterprise plan') : family === 'Agency' ? phrase('Agency plan') : phrase('Upgrade plan');
|
|
143
143
|
/** The keys a row prints, in this platform's spelling. */
|
|
144
144
|
const mac = () => typeof navigator !== 'undefined' && /Mac|iPhone|iPad/.test(navigator.platform || navigator.userAgent);
|
|
145
|
-
export function
|
|
145
|
+
export function Account({ host, narrow = false, above = false, onOrg, defaultAccountOpen = false, }) {
|
|
146
146
|
const { t, dir, locale, setLocale } = useI18n();
|
|
147
147
|
const rtl = dir === 'rtl';
|
|
148
148
|
const [open, setOpen] = useState(false);
|
package/dist/App.d.ts
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* lights over the page there), and `drag`, the attributes the host's shell
|
|
5
5
|
* reads as the region that moves the window.
|
|
6
6
|
*/
|
|
7
|
-
export interface
|
|
7
|
+
export interface Titlebar {
|
|
8
8
|
inset?: number;
|
|
9
9
|
drag?: Record<string, unknown>;
|
|
10
10
|
controls?: React.ReactNode;
|
|
@@ -16,7 +16,7 @@ export interface Bar {
|
|
|
16
16
|
* window. Betas stands alone, as Tabs does: the rail and the pane, no sidebar.
|
|
17
17
|
*/
|
|
18
18
|
export interface Hosted {
|
|
19
|
-
bar?:
|
|
19
|
+
bar?: Titlebar;
|
|
20
20
|
betas?: React.ReactNode;
|
|
21
21
|
}
|
|
22
22
|
export declare function App({ bar, betas }?: Hosted): import("react").JSX.Element;
|
package/dist/App.js
CHANGED
|
@@ -5,15 +5,15 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
5
5
|
// and Studio, @hanzo/studio's `<Studio>` the same way, its places (`nav`) in the
|
|
6
6
|
// sidebar where Dev's stand for Dev.
|
|
7
7
|
//
|
|
8
|
-
// OUTER the rail (Rail.tsx) and the sidebar beside it (
|
|
8
|
+
// OUTER the rail (Rail.tsx) and the sidebar beside it (Sidebar.tsx), on the
|
|
9
9
|
// window's floor, with the window's bar above them where the host has
|
|
10
10
|
// no browser around it (`bar`).
|
|
11
11
|
// INNER the content, cut as one rounded panel inset from the window's edges
|
|
12
12
|
// and from the sidebar by the gutter (`--pane-gap`): Chat's
|
|
13
|
-
// conversation with its tabs beside it (
|
|
13
|
+
// conversation with its tabs beside it (Split), or Dev's builder.
|
|
14
14
|
//
|
|
15
15
|
// The rail moves between the modes; the sidebar holds the mode's name, the
|
|
16
|
-
// search (the palette,
|
|
16
|
+
// search (the palette, Search.tsx), New, Dev's places and the reader's
|
|
17
17
|
// Recents. The address says the mode, as a path (lib/host `talk`, `app`,
|
|
18
18
|
// `place`): `/` and `/chat` are Chat on a new conversation, `/chat/<id>` one of
|
|
19
19
|
// the reader's, and a path under `/dev` is Dev: `/dev/run/<id>` a run, `/dev/projects/<org>/<repo>` a project; a path
|
|
@@ -22,11 +22,11 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
22
22
|
// this one component for every path under each.
|
|
23
23
|
//
|
|
24
24
|
// Every host draws this: hanzo.ai at `/`, `/chat`, `/dev` and `/studio`, and the desktop
|
|
25
|
-
// app as its main window. The host mounts IamProvider and `<
|
|
25
|
+
// app as its main window. The host mounts IamProvider and `<Host>` with its
|
|
26
26
|
// router and the path, and draws this only for a signed-in reader; what a
|
|
27
27
|
// stranger sees is the host's.
|
|
28
28
|
//
|
|
29
|
-
// THE ORGANIZATION COMES FIRST (
|
|
29
|
+
// THE ORGANIZATION COMES FIRST (Gate.tsx), and the app mounts it itself, so no
|
|
30
30
|
// host draws the app without it: a reader with none makes one and a reader
|
|
31
31
|
// with several picks one. No plan is asked for here: that is the workspace's,
|
|
32
32
|
// on its own host (hanzo.team) and behind its front door.
|
|
@@ -69,22 +69,22 @@ import { nav as places } from '@hanzo/studio';
|
|
|
69
69
|
import { useAi } from './lib/ai.js';
|
|
70
70
|
import { Chat } from './Chat.js';
|
|
71
71
|
import { UsageProvider } from './Usage.js';
|
|
72
|
-
import {
|
|
72
|
+
import { Sidebar } from './Sidebar.js';
|
|
73
73
|
import { Learning } from './Learning.js';
|
|
74
74
|
import { isPlans, leave, useDevHost } from './dev.js';
|
|
75
|
-
import {
|
|
76
|
-
import {
|
|
75
|
+
import { Gate } from './Gate.js';
|
|
76
|
+
import { useHost } from './host.js';
|
|
77
77
|
import { useKept } from './kept.js';
|
|
78
78
|
import { Mark, raised, Rail, Toggle } from './Rail.js';
|
|
79
79
|
import { Layer, Lift, RAISED, useDrawer } from './Drawer.js';
|
|
80
80
|
import { empty, openThread, showSettings, useOpen } from './open.js';
|
|
81
|
-
import {
|
|
82
|
-
import {
|
|
81
|
+
import { Split } from './Shell.js';
|
|
82
|
+
import { Search } from './Search.js';
|
|
83
83
|
import { summons } from './seek.js';
|
|
84
84
|
import { floor, pane } from './ground.js';
|
|
85
85
|
import { pick } from './lib/session.js';
|
|
86
86
|
import { app, go, hosted, place, settings, studio, talk, TERMINALS, visit } from './lib/host.js';
|
|
87
|
-
import {
|
|
87
|
+
import { Bar } from './Bar.js';
|
|
88
88
|
import { FOOT, HEIGHT, TOP, useView } from './view.js';
|
|
89
89
|
import { dragWindow, toggleWindowMaximize, WindowControls } from './WindowControls.js';
|
|
90
90
|
/** Studio, fetched the first time the reader stands in it. */
|
|
@@ -107,7 +107,7 @@ const typing = (e) => {
|
|
|
107
107
|
return !!el && (el.isContentEditable || el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT');
|
|
108
108
|
};
|
|
109
109
|
export function App({ bar, betas } = {}) {
|
|
110
|
-
return (_jsx(
|
|
110
|
+
return (_jsx(Gate, { children: _jsx(Window, { bar: bar, betas: betas }) }));
|
|
111
111
|
}
|
|
112
112
|
/** The window itself, drawn once the organization is settled. */
|
|
113
113
|
function Window({ bar, betas }) {
|
|
@@ -135,7 +135,7 @@ function Window({ bar, betas }) {
|
|
|
135
135
|
go: (to, how) => (place(app(to)) ? depart : exit)((replace) => dev.go(to, replace ? { ...how, replace } : how)),
|
|
136
136
|
}), [dev, depart, exit]);
|
|
137
137
|
const { client } = useAi();
|
|
138
|
-
const { router, path } =
|
|
138
|
+
const { router, path } = useHost();
|
|
139
139
|
const here = path ?? '/';
|
|
140
140
|
const at = place(here) ?? HOME;
|
|
141
141
|
const mode = at.mode;
|
|
@@ -271,9 +271,12 @@ function Window({ bar, betas }) {
|
|
|
271
271
|
shut();
|
|
272
272
|
setFinding(true);
|
|
273
273
|
};
|
|
274
|
-
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", ...(bar ? floor : null), 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: [bar ? (_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", gap: 2, pl: (bar.inset ?? 0) + 6, pr: "$2", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, ...bar.drag, children: [_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) }), _jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(XStack, { flex: 1, self: "stretch", ...bar.drag }), bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null] })) : null, _jsxs(XStack, { ref: drawer.pane, "data-
|
|
274
|
+
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", ...(bar ? floor : null), 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: [bar ? (_jsxs(XStack, { "data-slot": "title-bar", height: BAR, shrink: 0, items: "center", gap: 2, pl: (bar.inset ?? 0) + 6, pr: "$2", onMouseDown: dragWindow, onDoubleClick: toggleWindowMaximize, ...bar.drag, children: [_jsx(XStack, { "$max-md": { display: 'none' }, children: _jsx(Toggle, { open: !closed, onPress: flip }) }), _jsx(XStack, { $md: { display: 'none' }, children: _jsx(Toggle, { open: drawer.state === 'open', onPress: drawer.open, label: t('Open sidebar') }) }), _jsx(Mark, { label: t('Back'), "data-slot": "back", onPress: () => router.back(), children: _jsx(ArrowLeft, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(Mark, { label: t('Forward'), "data-slot": "forward", onPress: () => router.forward(), children: _jsx(ArrowRight, { size: 18, "aria-hidden": true, "data-i18n-mirror": true }) }), _jsx(XStack, { flex: 1, self: "stretch", ...bar.drag }), bar.controls !== undefined ? (bar.controls) : !bar.inset ? (_jsx(WindowControls, {})) : null] })) : null, _jsxs(XStack, { ref: drawer.pane, "data-app": mode, "data-slot": "frame", ...(bar ? null : floor), ...(drawer.slide ? RAISED : null),
|
|
275
275
|
// inline-style: the slide, a transform with no logical form whose sign and distance the drawer writes on the element itself, a drag every frame (Drawer.tsx).
|
|
276
276
|
style: drawer.slide ?? undefined, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)",
|
|
277
277
|
// The gap above the pane is the gap at its end and foot; a window's own bar above it is that gap.
|
|
278
|
-
pt: bar ? 0 : 'var(--pane-gap)', "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, toggle: bar ? undefined : flip, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), closed || alone ? null : (_jsx(YStack, { "$max-md": { display: 'none' }, children: _jsx(
|
|
278
|
+
pt: bar ? 0 : 'var(--pane-gap)', "$max-md": { p: 0 }, children: [drawer.slide ? _jsx(Lift, {}) : null, _jsx(YStack, { height: "100%", "$max-md": { display: 'none' }, children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: !closed, toggle: bar ? undefined : flip, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), closed || alone ? null : (_jsx(YStack, { "$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", display: "grid", gridTemplateRows: bar ? '1fr' : 'auto minmax(0, 1fr)',
|
|
279
|
+
// The rest of the row beside the rail and the sidebar. At width 100% it was the whole row
|
|
280
|
+
// again, and a View does not shrink, so the pane stood past the window's edge.
|
|
281
|
+
flex: 1, height: "100%", minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, 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, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", display: "grid", gridTemplateColumns: "1fr", width: "100%", height: "100%", minW: 0, minH: 0, children: 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, children: _jsx(Suspense, { fallback: null, children: _jsx(Terminals, {}) }) })) : mode === 'studio' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 0, children: _jsx(YStack, { flex: 1, minH: 0, height: "100%", children: _jsx(Suspense, { fallback: null, children: _jsx(Studio, { host: maker, rail: false }) }) }) })) : at.mode === 'hosted' ? (_jsx(YStack, { render: "main", "data-slot": "pane", ...pane(), overflow: "hidden", flex: 1, minW: 0, minH: 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' }, children: betas ?? (_jsx(Suspense, { fallback: null, children: _jsx(Betas, { go: move }) })) })) : (_jsx(YStack, { render: "main", "data-slot": "pane", ...(run ? null : { ...pane(), overflow: 'hidden' }), flex: 1, minW: 0, minH: 0, children: 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: "$2", children: _jsx(Rail, { host: host, mode: mode, at: where, inside: inside, open: true, onChat: toChat, onDev: toDev, 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] }) }) }) }) }));
|
|
279
282
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { type Host } from '@hanzo/build';
|
|
2
2
|
import type { RailLink } from '@hanzo/ui/chat';
|
|
3
3
|
import { type Place } from './lib/host.js';
|
|
4
|
-
export declare function
|
|
4
|
+
export declare function Bar({ host, mode, places, open, go, onMenu, onChat, onDev, }: {
|
|
5
5
|
host: Host;
|
|
6
6
|
mode: Place['mode'];
|
|
7
7
|
/** The mode's places, where they are not Dev's (Studio's `nav`). */
|
package/dist/{Top.js → Bar.js}
RENAMED
|
@@ -48,10 +48,10 @@ function Lines() {
|
|
|
48
48
|
return (_jsx("svg", { width: 15, height: 9, viewBox: "0 0 19 11", fill: "none", stroke: "currentColor", strokeWidth: 2, strokeLinecap: "round", "aria-hidden": true, "data-i18n-mirror": true, children: _jsx("path", { d: "M1 1h17M1 10h10.7" }) }));
|
|
49
49
|
}
|
|
50
50
|
/** One side of the pill. */
|
|
51
|
-
function
|
|
51
|
+
function Segment({ value, children }) {
|
|
52
52
|
return (_jsx(ToggleGroupItem, { value: value, size: "sm", width: SEGMENT, height: 26, rounded: 9999, bg: "transparent", borderColor: "transparent", hoverStyle: { bg: '$hover' }, activeStyle: { bg: '$raised', borderColor: 'transparent' }, children: _jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", numberOfLines: 1, children: children }) }));
|
|
53
53
|
}
|
|
54
|
-
export function
|
|
54
|
+
export function Bar({ host, mode, places, open = false, go, onMenu, onChat, onDev, }) {
|
|
55
55
|
const { t } = useI18n();
|
|
56
56
|
const made = mode === 'chat' ? null : (places ?? nav(host, (p) => host.go(p), t)).flatMap((g) => g.links).find((l) => l.id === NEW);
|
|
57
57
|
const fresh = mode === 'chat'
|
|
@@ -63,5 +63,5 @@ export function Top({ host, mode, places, open = false, go, onMenu, onChat, onDe
|
|
|
63
63
|
},
|
|
64
64
|
}
|
|
65
65
|
: { label: made?.label ?? t('New'), onPress: made?.onPress };
|
|
66
|
-
return (_jsxs(XStack, { "data-slot": "app-bar", display: "grid", gridTemplateColumns: "1fr auto 1fr", items: "center", height: `calc(${BAND}px + var(--safe-top) + var(--pane-gap))`, pt: "calc(var(--safe-top) + var(--pane-gap))", px: "$4.5", shrink: 0, $md: { display: 'none' }, children: [_jsx(XStack, { justifySelf: "start", children: _jsx(Round, { label: t('Open sidebar'), "data-slot": "bar-menu", onPress: onMenu, pointerEvents: open ? 'none' : 'auto', children: _jsx(Lines, {}) }) }), _jsx(XStack, { "data-slot": "bar-mode", ...GLASS, height: LINE, p: "$1", items: "center", justifySelf: "center", children: _jsxs(ToggleGroup, { type: "single", "aria-label": t('App'), value: mode === 'chat' || mode === 'dev' ? mode : '', disableDeactivation: true, onValueChange: (v) => (v === 'chat' ? onChat() : v === 'dev' ? onDev() : undefined), children: [_jsx(
|
|
66
|
+
return (_jsxs(XStack, { "data-slot": "app-bar", display: "grid", gridTemplateColumns: "1fr auto 1fr", items: "center", height: `calc(${BAND}px + var(--safe-top) + var(--pane-gap))`, pt: "calc(var(--safe-top) + var(--pane-gap))", px: "$4.5", shrink: 0, $md: { display: 'none' }, children: [_jsx(XStack, { justifySelf: "start", children: _jsx(Round, { label: t('Open sidebar'), "data-slot": "bar-menu", onPress: onMenu, pointerEvents: open ? 'none' : 'auto', children: _jsx(Lines, {}) }) }), _jsx(XStack, { "data-slot": "bar-mode", ...GLASS, height: LINE, p: "$1", items: "center", justifySelf: "center", children: _jsxs(ToggleGroup, { type: "single", "aria-label": t('App'), value: mode === 'chat' || mode === 'dev' ? mode : '', disableDeactivation: true, onValueChange: (v) => (v === 'chat' ? onChat() : v === 'dev' ? onDev() : undefined), children: [_jsx(Segment, { value: "chat", children: t('Chat') }), _jsx(Segment, { value: "dev", children: "Dev" })] }) }), _jsx(XStack, { justifySelf: "end", children: fresh.onPress ? (_jsx(Round, { label: fresh.label, "data-slot": "bar-new", onPress: fresh.onPress, children: _jsx(SquarePen, { size: 16, strokeWidth: 1.75, "aria-hidden": true }) })) : (_jsx(XStack, { width: ROUND, height: ROUND, "aria-hidden": true })) })] }));
|
|
67
67
|
}
|
package/dist/Betas.js
CHANGED
|
@@ -121,7 +121,7 @@ export function useBetas() {
|
|
|
121
121
|
}
|
|
122
122
|
/**
|
|
123
123
|
* Whether this page is served from a developer's own machine, where every app
|
|
124
|
-
* opens:
|
|
124
|
+
* opens: an app nobody can open is an app nobody can work on. The ORIGIN, which
|
|
125
125
|
* no deployment can acquire by configuration.
|
|
126
126
|
*/
|
|
127
127
|
function here() {
|
package/dist/Board.js
CHANGED
|
@@ -4,7 +4,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
4
4
|
//
|
|
5
5
|
// NAMED BOARD, NOT TASKS, and the rename is the point rather than a tidy-up.
|
|
6
6
|
// `/v1/tasks` is Hanzo Tasks — the durable execution engine, ten thousand
|
|
7
|
-
// workflow runs deep — and this
|
|
7
|
+
// workflow runs deep — and this app is a board of forge issues. Two different
|
|
8
8
|
// things wearing one word is how somebody comes to believe the board IS the
|
|
9
9
|
// engine, and asks why their cards are not replayable. Tasks keeps the word it
|
|
10
10
|
// earned; this is the Board.
|
|
@@ -16,7 +16,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
16
16
|
// the forge, and everything written here is a row they will find there.
|
|
17
17
|
//
|
|
18
18
|
// TWO READINGS OF ONE SET OF CARDS, and one of them is up at a time: the board
|
|
19
|
-
// by column, the planner by date. The
|
|
19
|
+
// by column, the planner by date. The app opens on the board, which is what it
|
|
20
20
|
// is called. There is no inbox pane: the workspace already has one, and a second
|
|
21
21
|
// would be two places for the same arriving thing.
|
|
22
22
|
//
|
|
@@ -393,7 +393,7 @@ function Filter({ want, labels, onWant, onClose, }) {
|
|
|
393
393
|
[28, t('Moved in the last four weeks')],
|
|
394
394
|
].map(([days, label]) => (_jsx(Tick, { on: want.active === days, label: label, onPress: () => set({ active: want.active === days ? undefined : days }) }, days))), _jsx(Box, { render: "button", onClick: () => onWant({}), width: "100%", mt: "$2", p: "$2", rounded: "$2", borderWidth: 1, borderColor: "$borderColor", hoverStyle: { bg: '$hover' }, children: _jsx(Text, { fontSize: "$1", color: "$ink", children: t('Clear') }) })] }));
|
|
395
395
|
}
|
|
396
|
-
// ── the
|
|
396
|
+
// ── the app ─────────────────────────────────────────────────────────────────
|
|
397
397
|
function Cards() {
|
|
398
398
|
const { t, locale } = useI18n();
|
|
399
399
|
const { client } = useAi();
|
|
@@ -408,7 +408,7 @@ function Cards() {
|
|
|
408
408
|
const [keys, setKeys] = useState([]);
|
|
409
409
|
const [refused, setRefused] = useState(null);
|
|
410
410
|
// ONE STATE FOR TWO READINGS OF THE SAME CARDS. Two booleans — one per view
|
|
411
|
-
// — is how
|
|
411
|
+
// — is how an app ends up showing neither or both, and the foot ended up
|
|
412
412
|
// lighting Board while the planner was the thing on screen.
|
|
413
413
|
const { aside, showAside } = useOpen();
|
|
414
414
|
const [view, setView] = useState('board');
|
package/dist/Chat.d.ts
CHANGED
|
@@ -3,7 +3,7 @@ export declare function Chat(): import("react").JSX.Element;
|
|
|
3
3
|
* The same conversation, embedded in a page that is not /chat.
|
|
4
4
|
*
|
|
5
5
|
* R8: there were TWO live chat surfaces, so /models mounts this one and the
|
|
6
|
-
* second is gone. The data-share choice is made once at onboarding; this
|
|
6
|
+
* second is gone. The data-share choice is made once at onboarding; this view
|
|
7
7
|
* does not ask again when a message is sent. It carries no
|
|
8
8
|
* heading of its own: the host page already has one, and a second `<h1>` is the
|
|
9
9
|
* defect that took the landings off /chat and /dev.
|
|
@@ -16,10 +16,10 @@ export declare function Ask({ placeholder, idle, }: {
|
|
|
16
16
|
idle?: React.ReactNode;
|
|
17
17
|
}): import("react").JSX.Element;
|
|
18
18
|
/**
|
|
19
|
-
* The agents a question speaks to: those it names, or the whole
|
|
20
|
-
* names nobody — the rule the
|
|
19
|
+
* The agents a question speaks to: those it names, or the whole cast when it
|
|
20
|
+
* names nobody — the rule the cast's brief gives the model (cast.tsx `brief`).
|
|
21
21
|
*/
|
|
22
|
-
export declare function addressed(question: string,
|
|
22
|
+
export declare function addressed(question: string, cast: string[]): string[];
|
|
23
23
|
/**
|
|
24
24
|
* Which kind of refusal a failed turn met, read off the platform's own codes:
|
|
25
25
|
* the caller's wallet (`insufficient_balance`, the ai service's spend check), a visitor's
|