@hanzo/rooms 0.1.72 → 0.1.74

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.
Files changed (110) hide show
  1. package/assets/personas/ada.md +187 -0
  2. package/assets/personas/adi_shamir.md +155 -0
  3. package/assets/personas/al_khwarizmi.md +168 -0
  4. package/assets/personas/al_kindi.md +172 -0
  5. package/assets/personas/alan_kay.md +154 -0
  6. package/assets/personas/analyst.md +138 -0
  7. package/assets/personas/andrew_yao.md +155 -0
  8. package/assets/personas/auguste_kerckhoffs.md +168 -0
  9. package/assets/personas/barbara_liskov.md +154 -0
  10. package/assets/personas/butler_lampson.md +156 -0
  11. package/assets/personas/charles_babbage.md +175 -0
  12. package/assets/personas/creative.md +141 -0
  13. package/assets/personas/curry.md +169 -0
  14. package/assets/personas/cynthia_dwork.md +158 -0
  15. package/assets/personas/david_chaum.md +157 -0
  16. package/assets/personas/david_parnas.md +153 -0
  17. package/assets/personas/dennis_ritchie.md +153 -0
  18. package/assets/personas/dijkstra.md +187 -0
  19. package/assets/personas/donald_knuth.md +156 -0
  20. package/assets/personas/douglas_engelbart.md +175 -0
  21. package/assets/personas/edgar_codd.md +151 -0
  22. package/assets/personas/engineer.md +140 -0
  23. package/assets/personas/feynman.md +178 -0
  24. package/assets/personas/finney.md +187 -0
  25. package/assets/personas/fred_brooks.md +152 -0
  26. package/assets/personas/geoffrey_hinton.md +194 -0
  27. package/assets/personas/herbert_simon.md +190 -0
  28. package/assets/personas/hickey.md +169 -0
  29. package/assets/personas/hopper.md +191 -0
  30. package/assets/personas/hubert_dreyfus.md +184 -0
  31. package/assets/personas/humberto_maturana.md +156 -0
  32. package/assets/personas/index.json +1 -0
  33. package/assets/personas/jcr_licklider.md +178 -0
  34. package/assets/personas/jobs.md +177 -0
  35. package/assets/personas/joe_armstrong.md +155 -0
  36. package/assets/personas/john_backus.md +179 -0
  37. package/assets/personas/john_mccarthy.md +177 -0
  38. package/assets/personas/jon_postel.md +149 -0
  39. package/assets/personas/joseph_weizenbaum.md +185 -0
  40. package/assets/personas/judea_pearl.md +192 -0
  41. package/assets/personas/karen_sparck_jones.md +154 -0
  42. package/assets/personas/konrad_zuse.md +175 -0
  43. package/assets/personas/kunihiko_fukushima.md +152 -0
  44. package/assets/personas/leslie_lamport.md +156 -0
  45. package/assets/personas/markov.md +171 -0
  46. package/assets/personas/mentor.md +141 -0
  47. package/assets/personas/nancy_lynch.md +154 -0
  48. package/assets/personas/niklaus_wirth.md +154 -0
  49. package/assets/personas/norbert_wiener.md +179 -0
  50. package/assets/personas/north-star.md +138 -0
  51. package/assets/personas/peter_naur.md +151 -0
  52. package/assets/personas/pike.md +165 -0
  53. package/assets/personas/radia_perlman.md +156 -0
  54. package/assets/personas/raj_reddy.md +154 -0
  55. package/assets/personas/ralph_merkle.md +152 -0
  56. package/assets/personas/richard_sutton.md +156 -0
  57. package/assets/personas/robin_milner.md +149 -0
  58. package/assets/personas/shafi_goldwasser.md +156 -0
  59. package/assets/personas/shannon.md +184 -0
  60. package/assets/personas/stafford_beer.md +157 -0
  61. package/assets/personas/taher_elgamal.md +180 -0
  62. package/assets/personas/tesla.md +181 -0
  63. package/assets/personas/tony_hoare.md +153 -0
  64. package/assets/personas/torvalds.md +188 -0
  65. package/assets/personas/tpope.md +163 -0
  66. package/assets/personas/turing.md +188 -0
  67. package/assets/personas/whitfield_diffie.md +159 -0
  68. package/assets/personas/zeekay.md +151 -0
  69. package/dist/App.js +26 -22
  70. package/dist/Chat.js +51 -38
  71. package/dist/Column.d.ts +3 -3
  72. package/dist/Column.js +5 -27
  73. package/dist/Me.d.ts +8 -3
  74. package/dist/Me.js +79 -108
  75. package/dist/Palette.d.ts +18 -0
  76. package/dist/Palette.js +131 -0
  77. package/dist/Rail.js +3 -15
  78. package/dist/Recents.d.ts +1 -2
  79. package/dist/Recents.js +9 -9
  80. package/dist/Shell.d.ts +7 -0
  81. package/dist/Shell.js +65 -46
  82. package/dist/Top.d.ts +17 -0
  83. package/dist/Top.js +58 -0
  84. package/dist/agents.d.ts +64 -0
  85. package/dist/agents.js +62 -0
  86. package/dist/crew.d.ts +26 -5
  87. package/dist/crew.js +208 -83
  88. package/dist/help.d.ts +43 -0
  89. package/dist/help.js +58 -0
  90. package/dist/lib/session.d.ts +5 -10
  91. package/dist/lib/session.js +6 -10
  92. package/dist/lib/web.d.ts +6 -0
  93. package/dist/lib/web.js +39 -7
  94. package/dist/recent.d.ts +2 -2
  95. package/dist/recent.js +3 -5
  96. package/dist/seek.d.ts +37 -0
  97. package/dist/seek.js +55 -0
  98. package/dist/team.js +3 -11
  99. package/dist/thread.js +7 -2
  100. package/dist/view.d.ts +44 -0
  101. package/dist/view.js +98 -0
  102. package/package.json +7 -7
  103. package/dist/Account.d.ts +0 -12
  104. package/dist/Account.js +0 -65
  105. package/dist/Find.d.ts +0 -7
  106. package/dist/Find.js +0 -82
  107. package/dist/Profile.d.ts +0 -4
  108. package/dist/Profile.js +0 -67
  109. package/dist/Standing.d.ts +0 -4
  110. package/dist/Standing.js +0 -16
package/dist/Profile.d.ts DELETED
@@ -1,4 +0,0 @@
1
- export declare function Profile({ open, onClose }: {
2
- open: boolean;
3
- onClose: () => void;
4
- }): import("react").JSX.Element;
package/dist/Profile.js DELETED
@@ -1,67 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- // The reader's own profile, in the column beside the room.
4
- //
5
- // A WORKSPACE OPENS A PROFILE IN A PANEL, not a page. The page exists — it is
6
- // Settings (/settings), where the whole record is edited — but reaching it from a
7
- // conversation costs the conversation: the room, the sidebar and the rail all
8
- // go, and coming back is a navigation rather than a close. Slack, Teams and
9
- // every app shaped like them put this in the right column for that reason, and
10
- // so does the thread view that will share this slot.
11
- //
12
- // EVERY CONTROL DOES ITS VERB. Slack's panel carries "Set a status" and "View
13
- // as" and this one does not, because IAM stores no status and there is nobody
14
- // to view as. What is here is what there is: the picture can be changed, the
15
- // record can be edited, and the rest is read.
16
- import { useRooms } from './host.js';
17
- import { site } from './where.js';
18
- import { useRef, useState } from 'react';
19
- import { Camera, Mail, Phone, X } from 'lucide-react';
20
- import { Box, Text, View, XStack, YStack } from '@hanzo/ui';
21
- import { sheet } from '@hanzo/ui/glass';
22
- import { pane } from './ground.js';
23
- import { useAccount } from './lib/account.js';
24
- import { reach } from './lib/reach.js';
25
- import { mark } from './lib/mark.js';
26
- import { BAD } from './lib/mix.js';
27
- /** Slack's is 380 and the thread panel that shares this slot is the same. */
28
- const WIDTH = 380;
29
- const ACCOUNT = '/settings';
30
- export function Profile({ open, onClose }) {
31
- const { Link } = useRooms();
32
- const { user, updateUserProfile } = useAccount();
33
- const picker = useRef(null);
34
- const [busy, setBusy] = useState(false);
35
- const [failed, setFailed] = useState(null);
36
- if (!open || !user)
37
- return null;
38
- const pick = async (file) => {
39
- if (!file)
40
- return;
41
- setBusy(true);
42
- setFailed(null);
43
- try {
44
- await updateUserProfile({ avatar: await mark(file) });
45
- }
46
- catch (e) {
47
- // In the panel rather than a toast: the picture is here, so the reason it
48
- // did not change belongs here too.
49
- setFailed(reach(e));
50
- }
51
- finally {
52
- setBusy(false);
53
- }
54
- };
55
- return (_jsxs(YStack, { ...pane(sheet(2).backgroundColor), width: WIDTH, maxW: "100%", shrink: 0, minH: 0,
56
- // A column on a laptop. On a phone the room is already the whole screen,
57
- // so this covers it rather than squeezing it to nothing.
58
- position: "absolute", t: 0, r: 0, b: 0, l: 0, z: "var(--z-panel)", $lg: { position: 'relative', z: 'var(--z-base)', l: 'auto' }, children: [_jsxs(XStack, { items: "center", px: "$4", py: "$3", gap: "$2", children: [_jsx(Text, { flex: 1, fontSize: "$5", fontWeight: "600", color: "$ink", children: "Profile" }), _jsx(Box, { render: "button", onClick: onClose, "aria-label": "Close profile", p: "$2", rounded: "$2", hoverStyle: { bg: '$hover' }, children: _jsx(X, { size: 16, "aria-hidden": true }) })] }), _jsxs(YStack, { flex: 1, minH: 0, overflowY: "auto", overflowX: "hidden", px: "$4", pb: "$5", gap: "$4", children: [_jsx("input", { ref: picker, type: "file", accept: "image/png,image/jpeg,image/gif,image/webp", hidden: true, onChange: (e) => {
59
- const file = e.target.files?.[0];
60
- e.target.value = '';
61
- void pick(file);
62
- } }), _jsxs(Box, { render: "button", onClick: () => {
63
- if (busy)
64
- return;
65
- picker.current?.click();
66
- }, "aria-label": "Change your picture", "aria-disabled": busy, width: "100%", aspectRatio: 1, rounded: "$5", overflow: "hidden", borderWidth: 1, borderColor: "$borderColor", bg: "$raised", position: "relative", children: [user.avatar ? (_jsx(View, { render: _jsx("img", { src: user.avatar, alt: "" }), width: "100%", height: "100%", objectFit: "cover", display: "block" })) : (_jsx(YStack, { width: "100%", height: "100%", items: "center", justify: "center", children: _jsx(Text, { fontSize: 72, fontWeight: "600", color: "$soft", children: (user.name?.trim()[0] ?? '?').toUpperCase() }) })), _jsxs(XStack, { position: "absolute", l: 0, r: 0, b: 0, items: "center", justify: "center", gap: "$2", py: "$2", bg: "$background", opacity: 0.85, children: [_jsx(Camera, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$2", color: "$ink", children: busy ? 'Saving…' : user.avatar ? 'Change picture' : 'Add a picture' })] })] }), failed ? (_jsx(Text, { fontSize: "$2", color: BAD, children: failed })) : null, _jsxs(XStack, { items: "baseline", gap: "$3", children: [_jsx(Text, { flex: 1, fontSize: "$6", fontWeight: "600", color: "$ink", numberOfLines: 2, children: user.name }), _jsx(Link, { href: site(ACCOUNT), children: _jsx(Text, { fontSize: "$2", color: "$quiet", children: "Edit" }) })] }), user.bio ? (_jsx(Text, { fontSize: "$3", color: "$soft", children: user.bio })) : null, _jsxs(YStack, { gap: "$2", pt: "$3", borderTopWidth: 1, borderColor: "$edge", children: [_jsx(Text, { fontSize: "$2", fontWeight: "600", color: "$ink", children: "Contact information" }), _jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Mail, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$3", color: "$soft", children: user.email })] }), user.phone ? (_jsxs(XStack, { items: "center", gap: "$2", children: [_jsx(Phone, { size: 14, "aria-hidden": true }), _jsx(Text, { fontSize: "$3", color: "$soft", children: user.phone })] })) : null] })] })] }));
67
- }
@@ -1,4 +0,0 @@
1
- export declare function Standing({ onPlans, onBilling }: {
2
- onPlans: () => void;
3
- onBilling: () => void;
4
- }): import("react").JSX.Element;
package/dist/Standing.js DELETED
@@ -1,16 +0,0 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- // The plan at the head of the account menu (Account.tsx): @hanzo/build's
4
- // `Meter` over the organization's standing, read when the menu opens. Its own
5
- // module so the menu's foot row costs a room's first screen nothing: it loads
6
- // with the menu.
7
- import { useMemo } from 'react';
8
- import { Meter, useStanding } from '@hanzo/build';
9
- import { api } from './lib/api.js';
10
- import { bearer, org } from './lib/session.js';
11
- export function Standing({ onPlans, onBilling }) {
12
- const scoped = org();
13
- const target = useMemo(() => ({ api: api(), token: bearer, org: scoped }), [scoped]);
14
- const plan = useStanding(target, true);
15
- return _jsx(Meter, { read: plan, onPlans: onPlans, onBilling: onBilling });
16
- }