@hanzo/rooms 0.1.31 → 0.1.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/Account.d.ts +3 -1
- package/dist/Account.js +8 -7
- package/dist/Chat.js +6 -7
- package/dist/Me.js +6 -4
- package/dist/Shell.js +1 -1
- package/package.json +1 -1
package/dist/Account.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/** The block at the foot of the sidebar: press it for the menu. */
|
|
2
|
-
export declare function Account({ onToggleCollapse, onProfile, onAppearance, onUsage, }?: {
|
|
2
|
+
export declare function Account({ onToggleCollapse, onProfile, onAppearance, onUsage, onKeys, }?: {
|
|
3
3
|
onToggleCollapse?: () => void;
|
|
4
4
|
/** Opens the profile beside the room. Absent, the row goes to hanzo.id. */
|
|
5
5
|
onProfile?: () => void;
|
|
@@ -7,4 +7,6 @@ export declare function Account({ onToggleCollapse, onProfile, onAppearance, onU
|
|
|
7
7
|
onAppearance?: () => void;
|
|
8
8
|
/** Opens the plan's usage settings. Absent, the row is not drawn. */
|
|
9
9
|
onUsage?: () => void;
|
|
10
|
+
/** Opens the API keys settings. Absent, the row is not drawn. */
|
|
11
|
+
onKeys?: () => void;
|
|
10
12
|
}): import("react").JSX.Element;
|
package/dist/Account.js
CHANGED
|
@@ -3,13 +3,14 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
3
3
|
/**
|
|
4
4
|
* WHO YOU ARE, at the foot of the sidebar: the person, and the person's menu.
|
|
5
5
|
*
|
|
6
|
-
* Profile, appearance, usage, security and sign out — the account, and
|
|
7
|
-
* belongs to the workspace. Which workspace you stand in is the
|
|
8
|
-
* TOP of the sidebar, and what it may spend is its Billing, so
|
|
9
|
-
* neither: a balance here read as the person's money when it is
|
|
6
|
+
* Profile, appearance, usage, API keys, security and sign out — the account, and
|
|
7
|
+
* nothing that belongs to the workspace. Which workspace you stand in is the
|
|
8
|
+
* switcher at the TOP of the sidebar, and what it may spend is its Billing, so
|
|
9
|
+
* this card shows neither: a balance here read as the person's money when it is
|
|
10
|
+
* the workspace's.
|
|
10
11
|
*/
|
|
11
12
|
import { useEffect, useRef, useState } from 'react';
|
|
12
|
-
import { Activity, ChevronsUpDown, LogOut, PanelLeftClose, Palette, Shield, UserRound } from 'lucide-react';
|
|
13
|
+
import { Activity, ChevronsUpDown, KeyRound, LogOut, PanelLeftClose, Palette, Shield, UserRound } from 'lucide-react';
|
|
13
14
|
import { XStack, YStack, Text, Box } from '@hanzo/ui';
|
|
14
15
|
import { sheet } from '@hanzo/ui/glass';
|
|
15
16
|
import { useIam } from '@hanzo/iam/react';
|
|
@@ -22,7 +23,7 @@ function Row({ icon, onPress, children, }) {
|
|
|
22
23
|
return (_jsx(Box, { render: "button", onClick: onPress, width: "100%", px: "$3", py: "$2", rounded: "$2", hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { items: "center", gap: "$2", children: [icon, _jsx(Text, { fontSize: "$2", color: "$ink", children: children })] }) }));
|
|
23
24
|
}
|
|
24
25
|
/** The block at the foot of the sidebar: press it for the menu. */
|
|
25
|
-
export function Account({ onToggleCollapse, onProfile, onAppearance, onUsage, } = {}) {
|
|
26
|
+
export function Account({ onToggleCollapse, onProfile, onAppearance, onUsage, onKeys, } = {}) {
|
|
26
27
|
const { user } = useIam();
|
|
27
28
|
const logout = useSignOut();
|
|
28
29
|
const { user: account } = useAccount();
|
|
@@ -54,5 +55,5 @@ export function Account({ onToggleCollapse, onProfile, onAppearance, onUsage, }
|
|
|
54
55
|
// @ts-expect-error — ref is forwarded to the DOM node by the primitive.
|
|
55
56
|
, {
|
|
56
57
|
// @ts-expect-error — ref is forwarded to the DOM node by the primitive.
|
|
57
|
-
ref: holder, position: "relative", borderTopWidth: 1, borderColor: "$borderColor", children: [open ? (_jsxs(YStack, { role: "menu", "aria-label": "Account", position: "absolute", b: "calc(100% + 6px)", l: "$2", r: "$2", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", ...sheet(2), py: "$2", gap: "$1", z: "var(--z-modal)", children: [_jsx(Row, { icon: _jsx(UserRound, { size: 15, "aria-hidden": true }), onPress: act(() => (onProfile ? onProfile() : window.location.assign(link(`${iam()}/account`)))), children: "Profile" }), onAppearance ? (_jsx(Row, { icon: _jsx(Palette, { size: 15, "aria-hidden": true }), onPress: act(onAppearance), children: "Appearance" })) : null, onUsage ? (_jsx(Row, { icon: _jsx(Activity, { size: 15, "aria-hidden": true }), onPress: act(onUsage), children: "Usage" })) : null, _jsx(Row, { icon: _jsx(Shield, { size: 15, "aria-hidden": true }), onPress: act(() => window.location.assign(link(`${iam()}/account/security`))), children: "Security" }), _jsx(Box, { height: 1, bg: "$borderColor", my: "$1" }), _jsx(Row, { icon: _jsx(LogOut, { size: 15, "aria-hidden": true }), onPress: act(() => void logout()), children: "Sign out" })] })) : null, _jsxs(XStack, { items: "center", width: "100%", children: [_jsx(Box, { render: "button", onClick: () => setOpen((v) => !v), "aria-expanded": open, "aria-haspopup": "menu", "aria-label": "Account", flex: 1, minW: 0, px: "$3", py: "$2", hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [_jsx(Face, { src: face, name: called, size: 22 }), _jsxs(YStack, { flex: 1, minW: 0, items: "flex-start", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$color", numberOfLines: 1, children: called }), email && email !== called ? (_jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: email })) : null] }), _jsx(ChevronsUpDown, { size: 14, "aria-hidden": true })] }) }), onToggleCollapse ? (_jsx(Box, { render: "button", onClick: onToggleCollapse, "aria-label": "Collapse sidebar", p: "$2", mr: "$1.5", rounded: "$2", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(PanelLeftClose, { size: 16, "aria-hidden": true }) })) : null] })] }));
|
|
58
|
+
ref: holder, position: "relative", borderTopWidth: 1, borderColor: "$borderColor", children: [open ? (_jsxs(YStack, { role: "menu", "aria-label": "Account", position: "absolute", b: "calc(100% + 6px)", l: "$2", r: "$2", rounded: "$3", borderWidth: 1, borderColor: "$borderColor", ...sheet(2), py: "$2", gap: "$1", z: "var(--z-modal)", children: [_jsx(Row, { icon: _jsx(UserRound, { size: 15, "aria-hidden": true }), onPress: act(() => (onProfile ? onProfile() : window.location.assign(link(`${iam()}/account`)))), children: "Profile" }), onAppearance ? (_jsx(Row, { icon: _jsx(Palette, { size: 15, "aria-hidden": true }), onPress: act(onAppearance), children: "Appearance" })) : null, onUsage ? (_jsx(Row, { icon: _jsx(Activity, { size: 15, "aria-hidden": true }), onPress: act(onUsage), children: "Usage" })) : null, onKeys ? (_jsx(Row, { icon: _jsx(KeyRound, { size: 15, "aria-hidden": true }), onPress: act(onKeys), children: "API keys" })) : null, _jsx(Row, { icon: _jsx(Shield, { size: 15, "aria-hidden": true }), onPress: act(() => window.location.assign(link(`${iam()}/account/security`))), children: "Security" }), _jsx(Box, { height: 1, bg: "$borderColor", my: "$1" }), _jsx(Row, { icon: _jsx(LogOut, { size: 15, "aria-hidden": true }), onPress: act(() => void logout()), children: "Sign out" })] })) : null, _jsxs(XStack, { items: "center", width: "100%", children: [_jsx(Box, { render: "button", onClick: () => setOpen((v) => !v), "aria-expanded": open, "aria-haspopup": "menu", "aria-label": "Account", flex: 1, minW: 0, px: "$3", py: "$2", hoverStyle: { bg: '$hover' }, children: _jsxs(XStack, { items: "center", gap: "$2", minW: 0, children: [_jsx(Face, { src: face, name: called, size: 22 }), _jsxs(YStack, { flex: 1, minW: 0, items: "flex-start", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$color", numberOfLines: 1, children: called }), email && email !== called ? (_jsx(Text, { fontSize: "$1", color: "$soft", numberOfLines: 1, children: email })) : null] }), _jsx(ChevronsUpDown, { size: 14, "aria-hidden": true })] }) }), onToggleCollapse ? (_jsx(Box, { render: "button", onClick: onToggleCollapse, "aria-label": "Collapse sidebar", p: "$2", mr: "$1.5", rounded: "$2", hoverStyle: { bg: '$hover' }, cursor: "pointer", children: _jsx(PanelLeftClose, { size: 16, "aria-hidden": true }) })) : null] })] }));
|
|
58
59
|
}
|
package/dist/Chat.js
CHANGED
|
@@ -1185,12 +1185,11 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1185
1185
|
// `center` on the surface, which spaces the pair from outside it,
|
|
1186
1186
|
// because with a foot the composer is a shell around this frame and
|
|
1187
1187
|
// a margin given here would land inside the shell.
|
|
1188
|
-
// THE SAME MEASURE THE REST OF THIS FILE READS AT. The
|
|
1189
|
-
// the
|
|
1190
|
-
//
|
|
1191
|
-
// one.
|
|
1188
|
+
// THE SAME MEASURE THE REST OF THIS FILE READS AT. The transcript's
|
|
1189
|
+
// text sits at the measure less its own 0.75rem gutters, so the field
|
|
1190
|
+
// is that wide too and its edges line up with the words above it.
|
|
1192
1191
|
width: "calc(100% - 32px)",
|
|
1193
|
-
maxW: `calc(${MEASURE} -
|
|
1192
|
+
maxW: `calc(${MEASURE} - 1.5rem)`,
|
|
1194
1193
|
mx: "auto",
|
|
1195
1194
|
...(framed ? pane() : null),
|
|
1196
1195
|
// THE COMPONENT'S OWN SHAPE, and nothing here reaching into it.
|
|
@@ -1239,7 +1238,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1239
1238
|
},
|
|
1240
1239
|
// WHAT GOES WITH THE MESSAGE, above the frame: one chip a file, each
|
|
1241
1240
|
// with its own remove, and the reason any file was refused.
|
|
1242
|
-
head: files.length || turnedAway || preparing || talk.open || talk.refusal || pause ? (_jsxs(YStack, { width: "calc(100% - 32px)", maxW: `calc(${MEASURE} -
|
|
1241
|
+
head: files.length || turnedAway || preparing || talk.open || talk.refusal || pause ? (_jsxs(YStack, { width: "calc(100% - 32px)", maxW: `calc(${MEASURE} - 1.5rem)`, mx: "auto", gap: "$1.5", children: [pause ? (_jsx(LimitedBanner, { message: pause.message, actions: pause.actions, onAction: act, onUsage: () => showSettings("usage") })) : null, actWrong ? (_jsx(Text, { role: "alert", "data-slot": "limited-banner-wrong", fontSize: "$2", color: BAD, children: actWrong })) : null, files.length ? (_jsx(XStack, { gap: "$1.5", flexWrap: "wrap", role: "list", "aria-label": "Attached files", "data-slot": "composer-attached", children: files.map((one) => (_jsx(HeldChip, { one: one, onRemove: () => drop(at, one.id) }, one.id))) })) : null, preparing ? (_jsxs(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-preparing", fontSize: "$2", color: "$soft", children: [preparing, "\u2026"] })) : null, turnedAway ? (_jsx(Text, { role: "alert", fontSize: "$2", color: BAD, children: turnedAway })) : null, talk.open || talk.refusal ? (_jsx(Text, { role: "status", "aria-live": "polite", "data-slot": "composer-talk-reply", fontSize: "$2", color: talk.refusal ? BAD : "$soft", children: talk.refusal
|
|
1243
1242
|
? worded(talk.refusal)
|
|
1244
1243
|
: talk.reply
|
|
1245
1244
|
? `Hanzo: ${talk.reply}`
|
|
@@ -1251,7 +1250,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1251
1250
|
listening: "In conversation — click to hang up",
|
|
1252
1251
|
speaking: "Hanzo is speaking — talk to interrupt",
|
|
1253
1252
|
}, children: () => _jsx(AudioLines, { size: 15 }) }) }), _jsx(Control, { type: "button", size: ROUND, fill: true, "data-slot": "composer-send", "aria-label": chat.streaming ? "Stop" : "Send", opacity: chat.streaming || draft.trim() || files.length ? 1 : 0.4, onClick: () => (chat.streaming ? chat.stop() : submit()), children: chat.streaming ? (_jsx(Square, { size: 13, fill: "currentColor" })) : (_jsx(ArrowUp, { size: 15, strokeWidth: 2.5 })) })] })),
|
|
1254
|
-
} }), _jsx(Crew, {}), isFree(model) ? (_jsx(XStack, { items: "center", justify: "center", py: "$1", px: "$3", borderTopWidth: 1, borderColor: "$borderColor", bg: "$background", children: _jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Free chat is data-shared to train models. ", _jsx(Anchor, { href: site("/privacy"), fontSize: "$1", color: "$ink", children: "Privacy" })] }) })) : null, consent, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
|
|
1253
|
+
} }), said.length === 0 ? _jsx(Crew, {}) : null, isFree(model) ? (_jsx(XStack, { items: "center", justify: "center", py: "$1", px: "$3", borderTopWidth: 1, borderColor: "$borderColor", bg: "$background", children: _jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Free chat is data-shared to train models. ", _jsx(Anchor, { href: site("/privacy"), fontSize: "$1", color: "$ink", children: "Privacy" })] }) })) : null, consent, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
|
|
1255
1254
|
}
|
|
1256
1255
|
/** The agreement free asks for, in @hanzo/ai's words so every surface says one thing. */
|
|
1257
1256
|
function Consent({ question, onAgree, onCancel, }) {
|
package/dist/Me.js
CHANGED
|
@@ -8,8 +8,8 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
8
8
|
// switches with `pick()` (lib/auth/session.ts), the one switch the app has.
|
|
9
9
|
// Under the list: Create organization, Organization settings, and Hanzo Team —
|
|
10
10
|
// opened in the same organization for a team, offered as "Create a team" for a
|
|
11
|
-
// personal one. Then the balance with Add funds, Settings, Usage,
|
|
12
|
-
// help and Log out. A SuperAdmin also gets All organizations (support mode).
|
|
11
|
+
// personal one. Then the balance with Add funds, Settings, Usage, API keys, the
|
|
12
|
+
// plans, help and Log out. A SuperAdmin also gets All organizations (support mode).
|
|
13
13
|
//
|
|
14
14
|
// IAM is the source of every fact here: names and roles from the token's `orgs`
|
|
15
15
|
// claim, display names and which org is personal from `GET /v1/iam/organizations`,
|
|
@@ -18,7 +18,7 @@ import { Fragment as _Fragment, jsx as _jsx, jsxs as _jsxs } from "react/jsx-run
|
|
|
18
18
|
// Orgs.tsx); the next load mints a token that carries it.
|
|
19
19
|
import { useEffect, useRef, useState } from 'react';
|
|
20
20
|
import { Popover, SizableText, View, XStack, YStack } from '@hanzo/gui';
|
|
21
|
-
import { Building2, ChevronsUpDown, ExternalLink, Gauge, LifeBuoy, LogOut, Plus, Settings, Sparkles, Users, X } from 'lucide-react';
|
|
21
|
+
import { Building2, ChevronsUpDown, ExternalLink, Gauge, KeyRound, LifeBuoy, LogOut, Plus, Settings, Sparkles, Users, X } from 'lucide-react';
|
|
22
22
|
import { path, useWho } from '@hanzo/build';
|
|
23
23
|
import { useOrganizations } from '@hanzo/iam/react';
|
|
24
24
|
import { Button, Dialog, DialogContent, DialogTitle, Input } from '@hanzo/ui';
|
|
@@ -39,6 +39,8 @@ import { BAD } from './lib/mix.js';
|
|
|
39
39
|
const DOCS = 'https://docs.hanzo.ai/docs/dev';
|
|
40
40
|
/** Where an organization's own settings live. */
|
|
41
41
|
const ORG_SETTINGS = '/settings/organization';
|
|
42
|
+
/** The organization's API keys: many per person, each created and revoked on its own. */
|
|
43
|
+
const KEYS = `${ORG_SETTINGS}/keys`;
|
|
42
44
|
/** An organization this tab created, until the token carries it. */
|
|
43
45
|
const MADE = 'hanzo:org:made';
|
|
44
46
|
/** A role as a person reads it: `owner` → Owner. */
|
|
@@ -166,7 +168,7 @@ export function Me({ host, narrow = false, onOrg, }) {
|
|
|
166
168
|
menu.onOpenChange(false);
|
|
167
169
|
if (o.name !== current)
|
|
168
170
|
onOrg(o.name);
|
|
169
|
-
} }, o.name))) }), _jsx(Item, { icon: _jsx(Plus, { size: 15, "aria-hidden": true }), label: "Create organization", onPress: () => (menu.onOpenChange(false), setCreating(true)) }), _jsx(Item, { icon: _jsx(Settings, { size: 15, "aria-hidden": true }), label: "Organization settings", onPress: () => (menu.onOpenChange(false), window.location.assign(ORG_SETTINGS)) }), where().team ? null : here && !here.personal ? (_jsx(Item, { icon: _jsx(Users, { size: 15, "aria-hidden": true }), label: "Open in Hanzo Team", trail: _jsx(ExternalLink, { size: 13, "aria-hidden": true, opacity: 0.6 }), onPress: () => (menu.onOpenChange(false), window.location.assign(`${ENTRY}&org=${encodeURIComponent(here.name)}`)) })) : (_jsx(Item, { icon: _jsx(Users, { size: 15, "aria-hidden": true }), label: "Create a team", onPress: () => (menu.onOpenChange(false), setCreating(true)) })), superAdmin() ? (_jsx(Item, { icon: _jsx(Building2, { size: 15, "aria-hidden": true }), label: "All organizations", onPress: () => (menu.onOpenChange(false), setSupporting(true)) })) : null, _jsx(Rule, {}), _jsx(Item, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), label: "Add funds", sub: typeof tier?.balance?.effectiveAvailable === 'number' ? `Credits ${formatCents(tier.balance.effectiveAvailable)}` : 'Credits', onPress: () => (menu.onOpenChange(false), window.open(payPage(), '_blank', 'noopener')), trail: _jsx(ExternalLink, { size: 13, "aria-hidden": true, opacity: 0.6 }) }), _jsx(Item, { icon: _jsx(Settings, { size: 15, "aria-hidden": true }), label: "Settings", onPress: () => go(path({ kind: 'settings', section: 'general' })) }), _jsx(Item, { icon: _jsx(Gauge, { size: 15, "aria-hidden": true }), label: "Usage", onPress: () => go(path({ kind: 'settings', section: 'usage' })) }), _jsx(Item, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), label: "View all plans", onPress: () => go(path({ kind: 'screen', screen: 'plans' })) }), _jsx(Item, { icon: _jsx(LifeBuoy, { size: 15, "aria-hidden": true }), label: "Get help", onPress: () => (menu.onOpenChange(false), window.open(DOCS, '_blank', 'noopener,noreferrer')) }), host.signOut ? (_jsxs(_Fragment, { children: [_jsx(Rule, {}), _jsx(Item, { icon: _jsx(LogOut, { size: 15, "aria-hidden": true }), label: "Log out", onPress: () => (menu.onOpenChange(false), host.signOut?.()) })] })) : null] }) }) })] }), _jsx(Create, { open: creating, onOpenChange: setCreating }), supporting ? _jsx(SupportPicker, { onClose: () => setSupporting(false) }) : null] }));
|
|
171
|
+
} }, o.name))) }), _jsx(Item, { icon: _jsx(Plus, { size: 15, "aria-hidden": true }), label: "Create organization", onPress: () => (menu.onOpenChange(false), setCreating(true)) }), _jsx(Item, { icon: _jsx(Settings, { size: 15, "aria-hidden": true }), label: "Organization settings", onPress: () => (menu.onOpenChange(false), window.location.assign(ORG_SETTINGS)) }), where().team ? null : here && !here.personal ? (_jsx(Item, { icon: _jsx(Users, { size: 15, "aria-hidden": true }), label: "Open in Hanzo Team", trail: _jsx(ExternalLink, { size: 13, "aria-hidden": true, opacity: 0.6 }), onPress: () => (menu.onOpenChange(false), window.location.assign(`${ENTRY}&org=${encodeURIComponent(here.name)}`)) })) : (_jsx(Item, { icon: _jsx(Users, { size: 15, "aria-hidden": true }), label: "Create a team", onPress: () => (menu.onOpenChange(false), setCreating(true)) })), superAdmin() ? (_jsx(Item, { icon: _jsx(Building2, { size: 15, "aria-hidden": true }), label: "All organizations", onPress: () => (menu.onOpenChange(false), setSupporting(true)) })) : null, _jsx(Rule, {}), _jsx(Item, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), label: "Add funds", sub: typeof tier?.balance?.effectiveAvailable === 'number' ? `Credits ${formatCents(tier.balance.effectiveAvailable)}` : 'Credits', onPress: () => (menu.onOpenChange(false), window.open(payPage(), '_blank', 'noopener')), trail: _jsx(ExternalLink, { size: 13, "aria-hidden": true, opacity: 0.6 }) }), _jsx(Item, { icon: _jsx(Settings, { size: 15, "aria-hidden": true }), label: "Settings", onPress: () => go(path({ kind: 'settings', section: 'general' })) }), _jsx(Item, { icon: _jsx(Gauge, { size: 15, "aria-hidden": true }), label: "Usage", onPress: () => go(path({ kind: 'settings', section: 'usage' })) }), _jsx(Item, { icon: _jsx(KeyRound, { size: 15, "aria-hidden": true }), label: "API keys", onPress: () => (menu.onOpenChange(false), window.location.assign(KEYS)) }), _jsx(Item, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), label: "View all plans", onPress: () => go(path({ kind: 'screen', screen: 'plans' })) }), _jsx(Item, { icon: _jsx(LifeBuoy, { size: 15, "aria-hidden": true }), label: "Get help", onPress: () => (menu.onOpenChange(false), window.open(DOCS, '_blank', 'noopener,noreferrer')) }), host.signOut ? (_jsxs(_Fragment, { children: [_jsx(Rule, {}), _jsx(Item, { icon: _jsx(LogOut, { size: 15, "aria-hidden": true }), label: "Log out", onPress: () => (menu.onOpenChange(false), host.signOut?.()) })] })) : null] }) }) })] }), _jsx(Create, { open: creating, onOpenChange: setCreating }), supporting ? _jsx(SupportPicker, { onClose: () => setSupporting(false) }) : null] }));
|
|
170
172
|
}
|
|
171
173
|
/**
|
|
172
174
|
* The sheet that creates an organization: a name, then `POST /v1/account/orgs`,
|
package/dist/Shell.js
CHANGED
|
@@ -1223,7 +1223,7 @@ function Frame({ mode, children, navigate, back, forward, }) {
|
|
|
1223
1223
|
placeholder: "Filter", "aria-label": "Filter sidebar" }), flex: 1, minW: 0, bg: "transparent", borderWidth: 0, outlineStyle: "none", color: "inherit", fontSize: "$2" })] }) }), settingsPane ? (_jsx(SidebarScroll, { children: _jsx(SettingsList, { active: settingsPane, filter: filter, onPick: pick, onBack: () => showSettings(null) }) })) : (_jsx(_Fragment, { children: _jsx(SidebarScroll, { children: _jsxs(_Fragment, { children: [settled ? (_jsx(Index, { mode: mode, owner: owner, filter: filter, onPick: onPick, navigate: navigate })) : null, products.length ? (_jsx(SidebarFolder, { name: "Cloud & Platform", open: filter ? true : undefined, children: products.map((prod) => (_jsx(SidebarItem, { icon: _jsx(prod.icon, { size: 13, "aria-hidden": true }), onPress: () => window.open(prod.href, "_blank", "noopener"), children: prod.label }, prod.id))) })) : null, more.length ? (_jsx(SidebarFolder, { name: "More", open: filter ? true : undefined, children: more.map((tool) => (_jsx(SidebarItem, { icon: _jsx(tool.icon, { size: 13, "aria-hidden": true }), onPress: tool.go, children: tool.label }, tool.id))) })) : null] }) }) })), settled && onApex ? _jsx(Leave, { href: signedIn ? ENTRY : WORKSPACE, children: "Workspace" }) : null, settled ? (signedIn ? (_jsxs(_Fragment, { children: [superAdmin() ? (_jsx(SidebarItem, { icon: _jsx(Building2, { size: 15, "aria-hidden": true }), onPress: () => setSupporting(true), children: "All organizations" })) : null, _jsx(SidebarItem, { icon: _jsx(UserPlus, { size: 15, "aria-hidden": true }), onPress: () => window.open(invite(), "_blank", "noopener"), children: "Invite Teammates" }), _jsx(SidebarItem, { icon: _jsx(Share2, { size: 15, "aria-hidden": true }), onPress: () => {
|
|
1224
1224
|
navigate?.(site("/referral"));
|
|
1225
1225
|
dismiss();
|
|
1226
|
-
}, children: "Share Hanzo" }), _jsx(SidebarItem, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), onPress: () => window.open(BILLING, "_blank", "noopener"), children: "Upgrade" }), _jsx(Account, { onToggleCollapse: toggle, onProfile: () => setProfiling(true), onAppearance: () => showSettings("general"), onUsage: () => showSettings("usage") })] })) : null) : null] }));
|
|
1226
|
+
}, children: "Share Hanzo" }), _jsx(SidebarItem, { icon: _jsx(Sparkles, { size: 15, "aria-hidden": true }), onPress: () => window.open(BILLING, "_blank", "noopener"), children: "Upgrade" }), _jsx(Account, { onToggleCollapse: toggle, onProfile: () => setProfiling(true), onAppearance: () => showSettings("general"), onUsage: () => showSettings("usage"), onKeys: () => showSettings("keys") })] })) : null) : null] }));
|
|
1227
1227
|
return (_jsxs(YStack, { "data-slot": "workspace", "data-hydrated": settled ? "true" : undefined, "data-sidebar": asked ? "open" : "shut", display: "grid", gridTemplateColumns: `${asked ? 0 : 64}px auto minmax(0, 1fr) auto`, gridTemplateRows: "44px minmax(0, 1fr)", gridTemplateAreas: '"rail bar bar bar" "rail list pane side"', "$max-md": {
|
|
1228
1228
|
gridTemplateColumns: "minmax(0, 1fr)",
|
|
1229
1229
|
gridTemplateRows: `44px minmax(0, 1fr) ${TABS_HEIGHT}`,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/rooms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.33",
|
|
4
4
|
"description": "The workspace rooms — Home, Chat, Inbox, Contacts, Meet, Cal, Drive, Board, Work, Bots — and the frame that holds them, once, for every Hanzo surface.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|