@hanzo/app 0.2.25 → 0.2.27
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.d.ts +10 -2
- package/dist/App.js +7 -5
- package/dist/Betas.js +1 -0
- package/dist/Top.js +1 -1
- package/dist/lib/betas.d.ts +4 -3
- package/dist/lib/betas.js +10 -3
- package/package.json +1 -1
package/dist/App.d.ts
CHANGED
|
@@ -9,6 +9,14 @@ export interface Bar {
|
|
|
9
9
|
drag?: Record<string, unknown>;
|
|
10
10
|
controls?: React.ReactNode;
|
|
11
11
|
}
|
|
12
|
-
|
|
12
|
+
/**
|
|
13
|
+
* `betas`, what a host draws as Betas' whole pane (`/beta`) in place of the
|
|
14
|
+
* app's own list (Betas.tsx `BetasPane`): a site that runs its own beta program
|
|
15
|
+
* (its application, its plan, its referral board) shows it inside the app's
|
|
16
|
+
* window. Betas stands alone, as Tabs does: the rail and the pane, no sidebar.
|
|
17
|
+
*/
|
|
18
|
+
export interface Hosted {
|
|
13
19
|
bar?: Bar;
|
|
14
|
-
|
|
20
|
+
betas?: React.ReactNode;
|
|
21
|
+
}
|
|
22
|
+
export declare function App({ bar, betas }?: Hosted): import("react").JSX.Element;
|
package/dist/App.js
CHANGED
|
@@ -103,11 +103,11 @@ const typing = (e) => {
|
|
|
103
103
|
const el = e.target;
|
|
104
104
|
return !!el && (el.isContentEditable || el.tagName === 'INPUT' || el.tagName === 'TEXTAREA' || el.tagName === 'SELECT');
|
|
105
105
|
};
|
|
106
|
-
export function App({ bar } = {}) {
|
|
107
|
-
return (_jsx(Orgs, { children: _jsx(Window, { bar: bar }) }));
|
|
106
|
+
export function App({ bar, betas } = {}) {
|
|
107
|
+
return (_jsx(Orgs, { children: _jsx(Window, { bar: bar, betas: betas }) }));
|
|
108
108
|
}
|
|
109
109
|
/** The window itself, drawn once the organization is settled. */
|
|
110
|
-
function Window({ bar }) {
|
|
110
|
+
function Window({ bar, betas }) {
|
|
111
111
|
const { t } = useI18n();
|
|
112
112
|
const drawer = useDrawer();
|
|
113
113
|
const { close: shut, depart, exit } = drawer;
|
|
@@ -136,6 +136,8 @@ function Window({ bar }) {
|
|
|
136
136
|
const here = path ?? '/';
|
|
137
137
|
const at = place(here) ?? HOME;
|
|
138
138
|
const mode = at.mode;
|
|
139
|
+
// Tabs and Betas are their panes alone: no sidebar beside them, and no Dev places in a phone's menu.
|
|
140
|
+
const alone = mode === 'tabs' || mode === 'beta';
|
|
139
141
|
const where = at.mode === 'dev' ? at.at : null;
|
|
140
142
|
// Studio's host: Dev's, at Studio's address, its moves under /studio, and
|
|
141
143
|
// another organization opening Studio's New in it.
|
|
@@ -259,7 +261,7 @@ function Window({ bar }) {
|
|
|
259
261
|
pick(o);
|
|
260
262
|
window.location.assign(mode === 'dev' ? app('') : mode === 'studio' ? studio('') : mode === 'tabs' ? TERMINALS : talk());
|
|
261
263
|
};
|
|
262
|
-
const sidebar = mode === 'studio' ? places(maker, (p) => maker.go(p)) : mode === 'dev' && raised(where) === 'customize'
|
|
264
|
+
const sidebar = mode === 'beta' ? [] : mode === 'studio' ? places(maker, (p) => maker.go(p)) : mode === 'dev' && raised(where) === 'customize'
|
|
263
265
|
? tabs(host, (p) => host.go(p), t).map((group) => ({ ...group, links: [...group.links, {
|
|
264
266
|
id: 'learning', label: t('Learning'), active: learning, icon: _jsx(RefreshCw, { size: 16, "aria-hidden": true }),
|
|
265
267
|
onPress: () => { shut(); setLearning(true); },
|
|
@@ -271,5 +273,5 @@ function Window({ bar }) {
|
|
|
271
273
|
};
|
|
272
274
|
return (_jsx(AiProvider, { client: client ?? undefined, children: _jsx(HostProvider, { host: host, children: _jsx(PrefsProvider, { 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-room": "", "data-app": mode, "data-slot": "frame", ...(bar ? null : floor), ...(drawer.slide ? RAISED : null),
|
|
273
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).
|
|
274
|
-
style: drawer.slide ?? undefined, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)", pt: 0, "$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, open: !closed, toggle: bar ? undefined : flip, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }) }), closed ||
|
|
276
|
+
style: drawer.slide ?? undefined, flex: 1, minW: 0, minH: 0, paddingInlineEnd: "var(--pane-gap)", pb: "var(--pane-gap)", pt: 0, "$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, 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(Column, { host: host, mode: mode, thread: thread, go: move, onShut: () => setClosed(true), onSeek: seek, onBack: back, places: sidebar }) })), _jsxs(YStack, { "data-slot": "stage", flex: 1, minW: 0, minH: 0, marginInlineStart: closed || alone ? 0 : 'var(--pane-gap)', "$max-md": { marginInlineStart: 0, pb: FOOT }, children: [bar ? null : _jsx(Top, { host: host, mode: mode, places: sidebar, open: drawer.state !== 'shut', go: move, onMenu: drawer.open, onChat: toChat, onDev: toDev }), _jsx(XStack, { "data-slot": "panes", flex: 1, minW: 0, minH: 0, children: mode === 'chat' ? (_jsx(Paned, { 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 }) }) }) })) : 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: _jsx(Column, { host: host, mode: mode, thread: thread, go: move, onShut: shut, onSeek: seek, onBack: back, drawer: true, places: sidebar, rail: _jsx(Rail, { host: host, mode: mode, at: where, open: true, rows: true, onChat: toChat, onDev: toDev, onStudio: toStudio, onTabs: toTabs, go: move, onOrg: org }), foot: _jsx(Foot, { host: host, onChat: fresh, onOrg: org }) }) })), finding ? _jsx(Palette, { go: move, onClose: found, mode: mode, host: host }) : null, learning ? _jsx(Learning, { open: true, onClose: () => setLearning(false) }) : null] }) }) }) }));
|
|
275
277
|
}
|
package/dist/Betas.js
CHANGED
package/dist/Top.js
CHANGED
|
@@ -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", height: `calc(${LINE}px + var(--safe-top))`, pt: "var(--safe-top)", px: "$4.5", items: "center", justify: "space-between", shrink: 0, $md: { display: 'none' }, 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", 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(Side, { value: "chat", children: t('Chat') }), _jsx(Side, { value: "dev", children: "Dev" })] }) }), _jsx(Round, { label: fresh.label, "data-slot": "bar-new", onPress: fresh.onPress, children: _jsx(SquarePen, { size: 20, "aria-hidden": true }) })] }));
|
|
66
|
+
return (_jsxs(XStack, { "data-slot": "app-bar", height: `calc(${LINE}px + var(--safe-top))`, pt: "var(--safe-top)", px: "$4.5", items: "center", justify: "space-between", shrink: 0, $md: { display: 'none' }, 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", 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(Side, { value: "chat", children: t('Chat') }), _jsx(Side, { value: "dev", children: "Dev" })] }) }), fresh.onPress ? (_jsx(Round, { label: fresh.label, "data-slot": "bar-new", onPress: fresh.onPress, children: _jsx(SquarePen, { size: 20, "aria-hidden": true }) })) : (_jsx(XStack, { width: 44, height: 44, "aria-hidden": true }))] }));
|
|
67
67
|
}
|
package/dist/lib/betas.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The apps in beta: every Hanzo app that exists or is
|
|
3
|
-
* Hanzo app does not offer everyone yet, once, for every
|
|
2
|
+
* The apps and models in beta: every Hanzo app or model that exists or is
|
|
3
|
+
* announced and that the Hanzo app does not offer everyone yet, once, for every
|
|
4
|
+
* list that names them —
|
|
4
5
|
* the app's Betas list (Betas.tsx) and hanzo.ai/beta's.
|
|
5
6
|
*
|
|
6
7
|
* Each is a principal switch on the cloud, `beta.<id>` (hanzo-inc/cloud
|
|
@@ -18,7 +19,7 @@
|
|
|
18
19
|
* A `line` is authored English, written through phrase() and drawn through `t`;
|
|
19
20
|
* a `name` is the app's name and is never translated.
|
|
20
21
|
*/
|
|
21
|
-
export declare const GROUPS: readonly ['Business', 'Data', 'Agents', 'Build & run', 'Security', 'Creative'];
|
|
22
|
+
export declare const GROUPS: readonly ['Business', 'Data', 'Agents', 'Build & run', 'Security', 'Creative', 'Models'];
|
|
22
23
|
export type Group = (typeof GROUPS)[number];
|
|
23
24
|
export interface Beta {
|
|
24
25
|
/** Stable, lowercase, one word: the switch is `beta.<id>`. */
|
package/dist/lib/betas.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* The apps in beta: every Hanzo app that exists or is
|
|
3
|
-
* Hanzo app does not offer everyone yet, once, for every
|
|
2
|
+
* The apps and models in beta: every Hanzo app or model that exists or is
|
|
3
|
+
* announced and that the Hanzo app does not offer everyone yet, once, for every
|
|
4
|
+
* list that names them —
|
|
4
5
|
* the app's Betas list (Betas.tsx) and hanzo.ai/beta's.
|
|
5
6
|
*
|
|
6
7
|
* Each is a principal switch on the cloud, `beta.<id>` (hanzo-inc/cloud
|
|
@@ -19,7 +20,7 @@
|
|
|
19
20
|
* a `name` is the app's name and is never translated.
|
|
20
21
|
*/
|
|
21
22
|
import { phrase } from '@hanzo/i18n';
|
|
22
|
-
export const GROUPS = ['Business', 'Data', 'Agents', 'Build & run', 'Security', 'Creative'];
|
|
23
|
+
export const GROUPS = ['Business', 'Data', 'Agents', 'Build & run', 'Security', 'Creative', 'Models'];
|
|
23
24
|
/** The developer platform, where a module in beta opens at its own address for anyone who has it. */
|
|
24
25
|
const PLATFORM = 'https://platform.hanzo.ai';
|
|
25
26
|
export const BETAS = [
|
|
@@ -58,7 +59,13 @@ export const BETAS = [
|
|
|
58
59
|
{ id: 'sentinel', name: 'Sentinel', line: phrase('Errors and slow requests, caught early'), group: 'Security', href: 'https://sentry.hanzo.ai' },
|
|
59
60
|
{ id: 'authz', name: 'Authz', line: phrase('Fine-grained authorization, Zanzibar style'), group: 'Security', href: `${PLATFORM}/authz` },
|
|
60
61
|
{ id: 'hsm', name: 'HSM', line: phrase('Hardware-backed keys across cloud KMSs'), group: 'Security', href: `${PLATFORM}/hsm` },
|
|
62
|
+
{ id: 'koma', name: 'Koma', line: phrase('Cinematic video with character continuity and shot-level control'), group: 'Creative' },
|
|
63
|
+
{ id: 'iro', name: 'Iro', line: phrase('High-fidelity images, creative direction and consistent visual assets'), group: 'Creative' },
|
|
64
|
+
{ id: 'mori', name: 'Mori', line: phrase('3D assets, materials, environments and spatially consistent scenes'), group: 'Creative' },
|
|
61
65
|
{ id: 'oto', name: 'Oto', line: phrase('Sound effects and Foley for film and games'), group: 'Creative' },
|
|
66
|
+
{ id: 'koe', name: 'Koe', line: phrase('Directable speech, character performances and dubbing'), group: 'Creative' },
|
|
67
|
+
{ id: 'uta', name: 'Uta', line: phrase('Soundtracks, original songs and cue-driven scoring'), group: 'Creative' },
|
|
68
|
+
{ id: 'zen7', name: 'Zen 7', line: phrase('The next Zen, in research preview: no public weights yet'), group: 'Models' },
|
|
62
69
|
];
|
|
63
70
|
/** The switch of one app in beta. */
|
|
64
71
|
export const key = (id) => `beta.${id}`;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/app",
|
|
3
|
-
"version": "0.2.
|
|
3
|
+
"version": "0.2.27",
|
|
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",
|