@hanzo/rooms 0.1.86 → 0.1.88
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/Chat.js +1 -1
- package/dist/Orgs.js +8 -10
- package/package.json +1 -1
package/dist/Chat.js
CHANGED
|
@@ -1529,7 +1529,7 @@ function Thread({ placeholder = message(), initial, anonymous = false, heading,
|
|
|
1529
1529
|
// with it when it did. `Ask` passes its own, because the page embedding
|
|
1530
1530
|
// it already has an `<h1>` and a second is the defect that took the
|
|
1531
1531
|
// landings off /chat and /dev.
|
|
1532
|
-
empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", width: "100%", pt: "$6", pb: "$2", ...(media.sm ? null : { flex: 1, justify: "
|
|
1532
|
+
empty: heading === null ? undefined : (_jsxs(YStack, { "data-slot": "opening", items: "center", width: "100%", pt: "$6", pb: "$2", ...(media.sm ? null : { flex: 1, justify: "flex-end" }), children: [room.length > 1 ? (_jsx(XStack, { items: "center", justify: "center", mb: "$4", children: room.map((name, i) => (_jsx(Box, { ml: i ? -16 : 0, rounded: 40, borderWidth: 2, borderColor: "$background", z: room.length - i, children: _jsx(Face, { src: faces[name]?.avatar, emoji: faces[name]?.emoji, name: name, size: 72 }) }, name))) })) : portrait ? (_jsx(Box, { width: 160, height: 160, rounded: 24, overflow: "hidden", borderWidth: 2, borderColor: "var(--white-15)", boxShadow: "0 10px 24px color-mix(in srgb, var(--pure-black) 70%, transparent)", mb: "$4", bg: "var(--neutral-900)", children: _jsx(View, { render: _jsx("img", { src: portrait, alt: withWhom }), width: "100%", height: "100%", objectFit: "cover" }) })) : null, room.length === 1 && !portrait ? (_jsx(Box, { mb: "$3", children: _jsx(Face, { emoji: mate?.emoji ?? persona?.emoji, name: withWhom, size: 72 }) })) : null, _jsx(Text, { render: "h1", fontSize: "$7", lineHeight: "$7", fontWeight: "700", color: "$ink", text: "center", mb: "$1", children: join(room) || heading || (firstName ? `What’s up, ${firstName}?` : "What’s up?") }), room.length === 1 && (mate?.description ?? persona?.description) ? (_jsx(Text, { fontSize: "$3", color: "$soft", text: "center", maxW: 500, mb: "$4", lineHeight: "$4", children: mate?.description ?? persona?.description })) : null] })),
|
|
1533
1533
|
// The transcript reads at the same measure. `Thread` defaults to 768
|
|
1534
1534
|
// itself; handing it the column here is what lets Width reach it.
|
|
1535
1535
|
column: { maxW: MEASURE }, composer: prompt({ ...composing, field: mention.field }, mention.state) }), _jsx(AgentMaker, {}), carry.dialog, _jsx(XStack, { items: "center", justify: "center", py: "$1", px: "$3", gap: "$2", children: isFree(model) ? (_jsxs(Text, { fontSize: "$1", color: "$soft", children: ["Free chat is data-shared to train models.", " ", _jsx(Anchor, { href: site("/legal/privacy"), fontSize: "$1", color: "$ink", children: "Privacy" })] })) : (_jsxs(_Fragment, { children: [_jsx(Anchor, { href: site("/legal/terms"), fontSize: "$1", color: "$soft", children: "Terms" }), _jsx(Text, { fontSize: "$1", color: "$soft", children: "\u00B7" }), _jsx(Anchor, { href: site("/legal/privacy"), fontSize: "$1", color: "$soft", children: "Privacy" })] })) }), consent, _jsx(Upgrade, { ask: ask, onClose: () => setAsk(null) })] }));
|
package/dist/Orgs.js
CHANGED
|
@@ -584,7 +584,7 @@ function Pick({ members, current, onPick, onClose, }) {
|
|
|
584
584
|
e.preventDefault();
|
|
585
585
|
if (shown[0])
|
|
586
586
|
onPick(shown[0].name);
|
|
587
|
-
}, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false)
|
|
587
|
+
}, children: _jsx(SearchInput, { name: "organizations", value: q, onChange: setQ, placeholder: sudo ? 'Search every organization' : 'Find an organization', actions: sudo ? null : (_jsxs(Button, { type: "button", onClick: () => setFounding(true), children: [_jsx(Plus, { size: 16, "aria-hidden": true }), "New organization"] })) }) }), _jsx(YStack, { render: "ul", "aria-label": "Your organizations", m: 0, p: 0, mt: 14, gap: 8, children: shown.map((o) => (_jsx(Choice, { org: o, current: o.name === current, onPress: () => onPick(o.name) }, o.name))) }), shown.length === 0 ? (_jsxs(Text, { render: "p", mt: 14, fontSize: "$3", color: "$soft", children: ["None of yours matches \u201C", q.trim(), "\u201D."] })) : null, sudo ? _jsx(Everyone, { q: q, skip: members }) : null] }), founding ? _jsx(Found, { onClose: () => setFounding(false) }) : null] }));
|
|
588
588
|
}
|
|
589
589
|
/**
|
|
590
590
|
* EVERY ORGANIZATION, for a SuperAdmin to step into.
|
|
@@ -656,9 +656,12 @@ function Everyone({ q, skip }) {
|
|
|
656
656
|
* re-keys the session (cloud cors_origin.go `sessionRoutes`). It is sent the
|
|
657
657
|
* name when the name makes the slug, and the slug when the slug was typed, the
|
|
658
658
|
* display name then written on the row (lib/invite.ts `setOrganizationProfile`).
|
|
659
|
-
* The token in hand predates it, so it is refreshed
|
|
659
|
+
* The token in hand predates it, so it is refreshed, and the organization opens on
|
|
660
|
+
* a load: @hanzo/iam's `useOrganizations` reads the token once per mount, and an
|
|
661
|
+
* instance the room mounts on the old token writes its home (the token's first
|
|
662
|
+
* org) back over the pick, which left the room unscoped after one request.
|
|
660
663
|
*/
|
|
661
|
-
function Found({ onClose
|
|
664
|
+
function Found({ onClose }) {
|
|
662
665
|
const { sdk } = useIam();
|
|
663
666
|
const [name, setName] = useState('');
|
|
664
667
|
const [typed, setTyped] = useState(null);
|
|
@@ -695,13 +698,8 @@ function Found({ onClose, onMade }) {
|
|
|
695
698
|
throw new Error(`${made} is made, and it is still called ${made}: ${say(err)}`);
|
|
696
699
|
});
|
|
697
700
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
pick(made);
|
|
701
|
-
window.location.reload();
|
|
702
|
-
return;
|
|
703
|
-
}
|
|
704
|
-
onMade(made);
|
|
701
|
+
pick(made);
|
|
702
|
+
window.location.reload();
|
|
705
703
|
}
|
|
706
704
|
catch (err) {
|
|
707
705
|
setRefused(say(err));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@hanzo/rooms",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.88",
|
|
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",
|