@hanzo/rooms 0.1.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.
Files changed (235) hide show
  1. package/LICENSE-APACHE +205 -0
  2. package/LICENSE-MIT +21 -0
  3. package/README.md +23 -0
  4. package/dist/Account.d.ts +8 -0
  5. package/dist/Account.js +58 -0
  6. package/dist/Beluga.d.ts +12 -0
  7. package/dist/Beluga.js +152 -0
  8. package/dist/Billing.d.ts +1 -0
  9. package/dist/Billing.js +31 -0
  10. package/dist/Board.d.ts +9 -0
  11. package/dist/Board.js +447 -0
  12. package/dist/Boxes.d.ts +1 -0
  13. package/dist/Boxes.js +173 -0
  14. package/dist/CalScheduler.d.ts +15 -0
  15. package/dist/CalScheduler.js +196 -0
  16. package/dist/Chat.d.ts +35 -0
  17. package/dist/Chat.js +1049 -0
  18. package/dist/Column.d.ts +15 -0
  19. package/dist/Column.js +88 -0
  20. package/dist/Contacts.d.ts +1 -0
  21. package/dist/Contacts.js +301 -0
  22. package/dist/Directory.d.ts +24 -0
  23. package/dist/Directory.js +356 -0
  24. package/dist/Drive.d.ts +2 -0
  25. package/dist/Drive.js +466 -0
  26. package/dist/Find.d.ts +7 -0
  27. package/dist/Find.js +82 -0
  28. package/dist/Guide.d.ts +6 -0
  29. package/dist/Guide.js +272 -0
  30. package/dist/Home.d.ts +39 -0
  31. package/dist/Home.js +306 -0
  32. package/dist/Inbox.d.ts +9 -0
  33. package/dist/Inbox.js +193 -0
  34. package/dist/Market.d.ts +3 -0
  35. package/dist/Market.js +149 -0
  36. package/dist/Me.d.ts +27 -0
  37. package/dist/Me.js +251 -0
  38. package/dist/Meet.d.ts +9 -0
  39. package/dist/Meet.js +370 -0
  40. package/dist/ModeMark.d.ts +8 -0
  41. package/dist/ModeMark.js +18 -0
  42. package/dist/OrgSwitcher.d.ts +31 -0
  43. package/dist/OrgSwitcher.js +120 -0
  44. package/dist/Orgs.d.ts +10 -0
  45. package/dist/Orgs.js +582 -0
  46. package/dist/Profile.d.ts +4 -0
  47. package/dist/Profile.js +67 -0
  48. package/dist/Prose.d.ts +5 -0
  49. package/dist/Prose.js +111 -0
  50. package/dist/ProviderMark.d.ts +17 -0
  51. package/dist/ProviderMark.js +277 -0
  52. package/dist/Recents.d.ts +10 -0
  53. package/dist/Recents.js +91 -0
  54. package/dist/RightPane.d.ts +13 -0
  55. package/dist/RightPane.js +426 -0
  56. package/dist/Room.d.ts +8 -0
  57. package/dist/Room.js +50 -0
  58. package/dist/Scene.d.ts +12 -0
  59. package/dist/Scene.js +105 -0
  60. package/dist/Settings.d.ts +46 -0
  61. package/dist/Settings.js +321 -0
  62. package/dist/Setup.d.ts +1 -0
  63. package/dist/Setup.js +36 -0
  64. package/dist/Share.d.ts +3 -0
  65. package/dist/Share.js +130 -0
  66. package/dist/Shared.d.ts +1 -0
  67. package/dist/Shared.js +113 -0
  68. package/dist/Shell.d.ts +63 -0
  69. package/dist/Shell.js +1225 -0
  70. package/dist/Start.d.ts +1 -0
  71. package/dist/Start.js +96 -0
  72. package/dist/Support.d.ts +14 -0
  73. package/dist/Support.js +122 -0
  74. package/dist/Talk.d.ts +4 -0
  75. package/dist/Talk.js +107 -0
  76. package/dist/Upgrade.d.ts +11 -0
  77. package/dist/Upgrade.js +75 -0
  78. package/dist/Usage.d.ts +1 -0
  79. package/dist/Usage.js +21 -0
  80. package/dist/Vibe.d.ts +2 -0
  81. package/dist/Vibe.js +188 -0
  82. package/dist/Work.d.ts +12 -0
  83. package/dist/Work.js +256 -0
  84. package/dist/bots/Bots.d.ts +2 -0
  85. package/dist/bots/Bots.js +456 -0
  86. package/dist/bots/Lights.d.ts +8 -0
  87. package/dist/bots/Lights.js +13 -0
  88. package/dist/bots/api.d.ts +120 -0
  89. package/dist/bots/api.js +75 -0
  90. package/dist/bots/face.d.ts +5 -0
  91. package/dist/bots/face.js +13 -0
  92. package/dist/bots/ink.d.ts +7 -0
  93. package/dist/bots/ink.js +29 -0
  94. package/dist/bots/kit.d.ts +113 -0
  95. package/dist/bots/kit.js +43 -0
  96. package/dist/bots/runtime.d.ts +4 -0
  97. package/dist/bots/runtime.js +326 -0
  98. package/dist/card.d.ts +52 -0
  99. package/dist/card.js +52 -0
  100. package/dist/cast.d.ts +143 -0
  101. package/dist/cast.js +251 -0
  102. package/dist/connect.d.ts +29 -0
  103. package/dist/connect.js +64 -0
  104. package/dist/contacts-store.d.ts +111 -0
  105. package/dist/contacts-store.js +276 -0
  106. package/dist/conversations.d.ts +54 -0
  107. package/dist/conversations.js +98 -0
  108. package/dist/copy.d.ts +23 -0
  109. package/dist/copy.js +39 -0
  110. package/dist/crew.d.ts +36 -0
  111. package/dist/crew.js +304 -0
  112. package/dist/dev.d.ts +3 -0
  113. package/dist/dev.js +102 -0
  114. package/dist/enso.d.ts +70 -0
  115. package/dist/enso.js +112 -0
  116. package/dist/failure.d.ts +57 -0
  117. package/dist/failure.js +143 -0
  118. package/dist/ground.d.ts +32 -0
  119. package/dist/ground.js +32 -0
  120. package/dist/host.d.ts +76 -0
  121. package/dist/host.js +76 -0
  122. package/dist/index.d.ts +14 -0
  123. package/dist/index.js +12 -0
  124. package/dist/kept.d.ts +5 -0
  125. package/dist/kept.js +27 -0
  126. package/dist/lib/account.d.ts +49 -0
  127. package/dist/lib/account.js +229 -0
  128. package/dist/lib/ai.d.ts +46 -0
  129. package/dist/lib/ai.js +140 -0
  130. package/dist/lib/api.d.ts +43 -0
  131. package/dist/lib/api.js +62 -0
  132. package/dist/lib/bare.d.ts +9 -0
  133. package/dist/lib/bare.js +7 -0
  134. package/dist/lib/coding.d.ts +105 -0
  135. package/dist/lib/coding.js +87 -0
  136. package/dist/lib/destination.d.ts +102 -0
  137. package/dist/lib/destination.js +260 -0
  138. package/dist/lib/durable.d.ts +66 -0
  139. package/dist/lib/durable.js +107 -0
  140. package/dist/lib/first.d.ts +11 -0
  141. package/dist/lib/first.js +23 -0
  142. package/dist/lib/home.d.ts +61 -0
  143. package/dist/lib/home.js +54 -0
  144. package/dist/lib/host.d.ts +104 -0
  145. package/dist/lib/host.js +132 -0
  146. package/dist/lib/hostname.d.ts +1 -0
  147. package/dist/lib/hostname.js +14 -0
  148. package/dist/lib/hydrated.d.ts +1 -0
  149. package/dist/lib/hydrated.js +20 -0
  150. package/dist/lib/integrations.d.ts +21 -0
  151. package/dist/lib/integrations.js +1 -0
  152. package/dist/lib/intent.d.ts +6 -0
  153. package/dist/lib/intent.js +71 -0
  154. package/dist/lib/invite.d.ts +155 -0
  155. package/dist/lib/invite.js +245 -0
  156. package/dist/lib/limits.d.ts +55 -0
  157. package/dist/lib/limits.js +119 -0
  158. package/dist/lib/list.d.ts +9 -0
  159. package/dist/lib/list.js +11 -0
  160. package/dist/lib/mark.d.ts +13 -0
  161. package/dist/lib/mark.js +85 -0
  162. package/dist/lib/mix.d.ts +22 -0
  163. package/dist/lib/mix.js +22 -0
  164. package/dist/lib/models.d.ts +27 -0
  165. package/dist/lib/models.js +106 -0
  166. package/dist/lib/org.d.ts +109 -0
  167. package/dist/lib/org.js +140 -0
  168. package/dist/lib/path.d.ts +9 -0
  169. package/dist/lib/path.js +29 -0
  170. package/dist/lib/plans.d.ts +193 -0
  171. package/dist/lib/plans.js +310 -0
  172. package/dist/lib/prose.d.ts +13 -0
  173. package/dist/lib/prose.js +62 -0
  174. package/dist/lib/reach.d.ts +17 -0
  175. package/dist/lib/reach.js +70 -0
  176. package/dist/lib/rooms.json +23 -0
  177. package/dist/lib/served.d.ts +20 -0
  178. package/dist/lib/served.js +92 -0
  179. package/dist/lib/session.d.ts +211 -0
  180. package/dist/lib/session.js +493 -0
  181. package/dist/lib/share.d.ts +131 -0
  182. package/dist/lib/share.js +216 -0
  183. package/dist/lib/signout.d.ts +14 -0
  184. package/dist/lib/signout.js +40 -0
  185. package/dist/lib/tags.d.ts +27 -0
  186. package/dist/lib/tags.js +46 -0
  187. package/dist/lib/tap.d.ts +17 -0
  188. package/dist/lib/tap.js +9 -0
  189. package/dist/lib/tier.d.ts +115 -0
  190. package/dist/lib/tier.js +207 -0
  191. package/dist/lib/tiers.d.ts +9 -0
  192. package/dist/lib/tiers.js +141 -0
  193. package/dist/lib/todo.d.ts +125 -0
  194. package/dist/lib/todo.js +379 -0
  195. package/dist/look.d.ts +1 -0
  196. package/dist/look.js +21 -0
  197. package/dist/meters.d.ts +8 -0
  198. package/dist/meters.js +31 -0
  199. package/dist/model.d.ts +4 -0
  200. package/dist/model.js +44 -0
  201. package/dist/network.d.ts +64 -0
  202. package/dist/network.js +216 -0
  203. package/dist/open.d.ts +81 -0
  204. package/dist/open.js +149 -0
  205. package/dist/pane.d.ts +92 -0
  206. package/dist/pane.js +231 -0
  207. package/dist/progress.d.ts +46 -0
  208. package/dist/progress.js +51 -0
  209. package/dist/recent.d.ts +67 -0
  210. package/dist/recent.js +161 -0
  211. package/dist/rooms.d.ts +131 -0
  212. package/dist/rooms.js +195 -0
  213. package/dist/roster.d.ts +28 -0
  214. package/dist/roster.js +70 -0
  215. package/dist/span.d.ts +14 -0
  216. package/dist/span.js +50 -0
  217. package/dist/speech.d.ts +44 -0
  218. package/dist/speech.js +229 -0
  219. package/dist/stars.d.ts +16 -0
  220. package/dist/stars.js +75 -0
  221. package/dist/tabs.d.ts +26 -0
  222. package/dist/tabs.js +25 -0
  223. package/dist/team.d.ts +11 -0
  224. package/dist/team.gen.d.ts +10 -0
  225. package/dist/team.gen.js +11 -0
  226. package/dist/team.js +30 -0
  227. package/dist/tools.d.ts +35 -0
  228. package/dist/tools.js +143 -0
  229. package/dist/tours.d.ts +24 -0
  230. package/dist/tours.js +311 -0
  231. package/dist/waiting.d.ts +15 -0
  232. package/dist/waiting.js +17 -0
  233. package/dist/where.d.ts +54 -0
  234. package/dist/where.js +14 -0
  235. package/package.json +108 -0
package/dist/tours.js ADDED
@@ -0,0 +1,311 @@
1
+ 'use client';
2
+ export const seen = (el) => {
3
+ if (!el)
4
+ return null;
5
+ const r = el.getBoundingClientRect();
6
+ if (r.width < 6 || r.height < 6)
7
+ return null;
8
+ const s = getComputedStyle(el);
9
+ if (s.visibility === 'hidden' || s.display === 'none' || Number(s.opacity) === 0)
10
+ return null;
11
+ return el;
12
+ };
13
+ export const byLabel = (...labels) => {
14
+ for (const l of labels) {
15
+ const el = seen(document.querySelector(`[aria-label="${l}"]`));
16
+ if (el)
17
+ return el;
18
+ }
19
+ return null;
20
+ };
21
+ const byAttr = (attr, ...values) => {
22
+ for (const v of values) {
23
+ const el = seen(document.querySelector(`[${attr}="${v}"]`));
24
+ if (el)
25
+ return el;
26
+ }
27
+ return null;
28
+ };
29
+ export const byPlaceholder = (...values) => byAttr('placeholder', ...values);
30
+ export const byTitle = (...values) => byAttr('title', ...values);
31
+ /** The smallest element whose own text is exactly this word. */
32
+ export const byText = (text, within) => {
33
+ const root = within ?? document.body;
34
+ let best = null;
35
+ for (const el of root.querySelectorAll('button,a,[role="button"]')) {
36
+ if ((el.textContent || '').trim() !== text)
37
+ continue;
38
+ const ok = seen(el);
39
+ if (!ok)
40
+ continue;
41
+ if (!best || el.getBoundingClientRect().width < best.getBoundingClientRect().width)
42
+ best = el;
43
+ }
44
+ return best;
45
+ };
46
+ /** A field whose placeholder starts with these words. */
47
+ const byPlaceholderStart = (start) => {
48
+ for (const el of document.querySelectorAll('input,textarea')) {
49
+ if ((el.getAttribute('placeholder') || '').startsWith(start) && seen(el))
50
+ return el;
51
+ }
52
+ return null;
53
+ };
54
+ /** The composer is the one visible textarea in the room. */
55
+ export const composer = () => {
56
+ const all = [...document.querySelectorAll('textarea')].map(seen).filter(Boolean);
57
+ return all.sort((a, b) => b.getBoundingClientRect().width - a.getBoundingClientRect().width)[0] ?? null;
58
+ };
59
+ /** The Enso control on the composer: effort, and the model override inside it. */
60
+ export const modelChip = () => seen(document.querySelector('[aria-label^="Enso"]'));
61
+ /** A place on the rail, by the word under its icon. */
62
+ const rail = (label) => {
63
+ const b = byText(label);
64
+ return b?.parentElement ?? b;
65
+ };
66
+ const CHAT = [
67
+ {
68
+ id: 'composer',
69
+ title: 'What are you interested in? How can Hanzo help you?',
70
+ body: 'Type what you want in plain words. Paste an error, describe a feature, or drop in a file.',
71
+ side: 'top',
72
+ find: composer,
73
+ },
74
+ {
75
+ id: 'model',
76
+ title: 'Perfectly tuned with 500+ of the leading models',
77
+ body: 'Enso reads your question and picks the best model for it. Tap here to choose one yourself.',
78
+ side: 'top',
79
+ find: modelChip,
80
+ },
81
+ {
82
+ id: 'work',
83
+ title: 'Audit the work-flow',
84
+ body: "Show work opens the AI's steps and the tools it used. Turn it on when an answer surprises you.",
85
+ side: 'top',
86
+ find: () => byText('Show work') || byText('Hide work'),
87
+ },
88
+ {
89
+ id: 'scene',
90
+ title: 'More than chat',
91
+ body: 'Chat with a bot, bring in the team, and take it to a call. Watch one happen.',
92
+ side: 'right',
93
+ scene: true,
94
+ find: () => rail('Chat'),
95
+ },
96
+ {
97
+ id: 'roster',
98
+ title: 'People and agents, one list',
99
+ body: 'Your team and your AI agents sit together. Click any of them to start talking. An agent answers like a person.',
100
+ side: 'right',
101
+ find: () => {
102
+ const az = byLabel('A-Z', 'Sort A-Z');
103
+ if (az?.parentElement)
104
+ return az.parentElement;
105
+ const dir = byText('Directory');
106
+ return dir?.parentElement ?? dir;
107
+ },
108
+ },
109
+ {
110
+ id: 'find',
111
+ title: 'Find anything',
112
+ body: 'Press ⌘K to search chats, people, agents and every section at once.',
113
+ side: 'bottom',
114
+ find: () => {
115
+ for (const b of document.querySelectorAll('button,[role="button"]')) {
116
+ if (/^Search\b/.test((b.textContent || '').trim()) && seen(b))
117
+ return b;
118
+ }
119
+ return null;
120
+ },
121
+ },
122
+ {
123
+ id: 'aside',
124
+ title: 'Results stay beside you',
125
+ body: 'Files, sources and previews collect in the side panel, so the chat stays easy to read.',
126
+ side: 'bottom',
127
+ find: () => byLabel('Open side panel', 'Close side panel'),
128
+ },
129
+ {
130
+ id: 'orgs',
131
+ title: 'Switch workspaces',
132
+ body: 'Each icon on the far left is a workspace, with its own chats, agents, files and billing.',
133
+ side: 'right',
134
+ find: () => {
135
+ // The rail is a column of small square marks pinned to the far edge —
136
+ // that shape is what identifies it, not a label, because each mark is
137
+ // labelled with its own workspace ("LUX", "ZOO", an initial) and none of
138
+ // them names the rail. Take their common parent.
139
+ const marks = [...document.querySelectorAll('button,[role="button"]')].filter((el) => {
140
+ const r = el.getBoundingClientRect();
141
+ return r.left < 64 && r.width >= 26 && r.width <= 60 && Math.abs(r.width - r.height) < 10 && seen(el);
142
+ });
143
+ if (marks.length < 2)
144
+ return byLabel('Switch organization');
145
+ let node = marks[0].parentElement;
146
+ while (node && !marks.every((m) => node.contains(m)))
147
+ node = node.parentElement;
148
+ return seen(node) ?? marks[0];
149
+ },
150
+ },
151
+ {
152
+ id: 'account',
153
+ title: 'Your plan',
154
+ body: 'See your credit, manage payment and change settings. Free uses the open models. Paid unlocks the rest.',
155
+ side: 'top',
156
+ find: () => byLabel('Account, plan and workspace'),
157
+ },
158
+ ];
159
+ const MEET = [
160
+ {
161
+ id: 'start',
162
+ title: 'Start a meeting',
163
+ body: 'One click opens a room. Share the link and anyone can join from a browser.',
164
+ side: 'bottom',
165
+ find: () => byText('Start Instant Meeting'),
166
+ },
167
+ {
168
+ id: 'join',
169
+ title: 'Join with a code',
170
+ body: 'Paste a meeting code or link here to join a call someone else started.',
171
+ side: 'bottom',
172
+ find: () => byPlaceholder('Enter meeting code or link'),
173
+ },
174
+ {
175
+ id: 'transcript',
176
+ title: 'Every call is written down',
177
+ body: 'A Hanzo bot sits in and transcribes. What everyone said is saved with the meeting.',
178
+ side: 'left',
179
+ find: () => {
180
+ for (const el of document.querySelectorAll('div,p,section')) {
181
+ if (el.childElementCount === 0 && /transcription/i.test(el.textContent || '') && seen(el))
182
+ return el.parentElement ?? el;
183
+ }
184
+ return null;
185
+ },
186
+ },
187
+ ];
188
+ const CALENDAR = [
189
+ {
190
+ id: 'schedule',
191
+ title: 'Add an event or a routine',
192
+ body: 'A meeting, a reminder, or a job an agent runs on a schedule. Name it and pick the time.',
193
+ side: 'bottom',
194
+ find: () => byText('Schedule Event / Routine'),
195
+ },
196
+ {
197
+ id: 'crons',
198
+ title: 'Bots on a timer',
199
+ body: 'Bot Crons lists what your bots run and when. Change a time here and the bot follows it.',
200
+ side: 'bottom',
201
+ find: () => byText('Bot Crons'),
202
+ },
203
+ {
204
+ id: 'booker',
205
+ title: 'Let people book you',
206
+ body: 'A public page where anyone can pick a free time on your calendar.',
207
+ side: 'bottom',
208
+ find: () => byText('Public Booker'),
209
+ },
210
+ ];
211
+ const CONTACTS = [
212
+ {
213
+ id: 'search',
214
+ title: 'Everyone in one place',
215
+ body: 'People and agents, side by side. Search by name to find anyone fast.',
216
+ side: 'bottom',
217
+ find: () => byLabel('Search contacts') || byPlaceholder('Search'),
218
+ },
219
+ {
220
+ id: 'invite',
221
+ title: 'Invite your team',
222
+ body: 'Send an invite by email, or share a link anyone can use to join your organization.',
223
+ side: 'bottom',
224
+ find: () => byLabel('Invite') || byText('Invite'),
225
+ },
226
+ {
227
+ id: 'agent',
228
+ title: 'Make an agent',
229
+ body: 'Give it a name and a job. It joins the roster next to your people and answers like one.',
230
+ side: 'bottom',
231
+ find: () => byText('New agent'),
232
+ },
233
+ ];
234
+ const INBOX = [
235
+ {
236
+ id: 'connect',
237
+ title: 'Every channel, one inbox',
238
+ body: 'Connect Slack, email, Discord and the rest. Their messages land here together.',
239
+ side: 'bottom',
240
+ find: () => byText('Connect an app'),
241
+ },
242
+ {
243
+ id: 'channels',
244
+ title: 'Your channels',
245
+ body: 'Each connected app is a channel on the left. Nothing gets lost between them.',
246
+ side: 'right',
247
+ find: () => byLabel('Resize inbox channel list')?.parentElement ?? null,
248
+ },
249
+ {
250
+ id: 'reply',
251
+ title: 'Reply where it came from',
252
+ body: 'Answer here and it goes back on the same channel the message arrived on.',
253
+ side: 'top',
254
+ find: () => byPlaceholderStart('Reply on'),
255
+ },
256
+ ];
257
+ const DRIVE = [
258
+ {
259
+ id: 'search',
260
+ title: 'Search everything',
261
+ body: 'Every file your team and your agents made, found by name or by what is inside it.',
262
+ side: 'bottom',
263
+ find: () => byLabel('Search Drive'),
264
+ },
265
+ {
266
+ id: 'upload',
267
+ title: 'Bring files in',
268
+ body: 'Upload anything. Agents can read it, and it shows up in chat when you ask.',
269
+ side: 'bottom',
270
+ find: () => byTitle('Upload'),
271
+ },
272
+ {
273
+ id: 'folder',
274
+ title: 'Keep it tidy',
275
+ body: 'Make folders for projects, clients or agents. Drag files between them.',
276
+ side: 'bottom',
277
+ find: () => byTitle('Add Folder'),
278
+ },
279
+ ];
280
+ const BOARD = [
281
+ {
282
+ id: 'add',
283
+ title: 'Add a card',
284
+ body: 'One card per task. Give it a date, a priority, and a person or an agent to do it.',
285
+ side: 'bottom',
286
+ find: () => byText('Add a card') || byPlaceholder('Add an item'),
287
+ },
288
+ {
289
+ id: 'planner',
290
+ title: 'Plan by day',
291
+ body: 'Planner lays the cards out by date, so today is one column and next week is a glance away.',
292
+ side: 'bottom',
293
+ find: () => byText('Planner'),
294
+ },
295
+ {
296
+ id: 'filter',
297
+ title: 'See only what matters now',
298
+ body: 'Filter by who, by when, or by what is finished.',
299
+ side: 'bottom',
300
+ find: () => byText('Filter'),
301
+ },
302
+ ];
303
+ export const TOURS = {
304
+ chat: CHAT,
305
+ meet: MEET,
306
+ calendar: CALENDAR,
307
+ contacts: CONTACTS,
308
+ inbox: INBOX,
309
+ drive: DRIVE,
310
+ board: BOARD,
311
+ };
@@ -0,0 +1,15 @@
1
+ /**
2
+ * What a route shows while it is handing the reader somewhere else.
3
+ *
4
+ * IAM owns the sign-in form, so /login, /signup and /auth/callback each do one
5
+ * thing: say where you are going, and go. All three drew that screen from their
6
+ * own copy of the same markup, and each asked for a whole viewport of it inside
7
+ * a layout that already supplies a header and a footer — so a page carrying one
8
+ * line of text scrolled, and the line sat below the middle of it.
9
+ *
10
+ * It takes the space a short message needs and leaves the rest to the layout.
11
+ */
12
+ export declare function Waiting({ title, lede }: {
13
+ title: string;
14
+ lede?: string;
15
+ }): import("react").JSX.Element;
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Spinner, Text, YStack } from '@hanzo/gui';
4
+ /**
5
+ * What a route shows while it is handing the reader somewhere else.
6
+ *
7
+ * IAM owns the sign-in form, so /login, /signup and /auth/callback each do one
8
+ * thing: say where you are going, and go. All three drew that screen from their
9
+ * own copy of the same markup, and each asked for a whole viewport of it inside
10
+ * a layout that already supplies a header and a footer — so a page carrying one
11
+ * line of text scrolled, and the line sat below the middle of it.
12
+ *
13
+ * It takes the space a short message needs and leaves the rest to the layout.
14
+ */
15
+ export function Waiting({ title, lede }) {
16
+ return (_jsxs(YStack, { items: "center", justify: "center", gap: "$5", minH: 360, px: "$4", py: "$10", children: [_jsx(Spinner, { size: "small", color: "$ink", width: 28, height: 28, shrink: 0 }), _jsx(Text, { render: "h1", fontSize: "$7", fontWeight: "500", color: "$ink", text: "center", children: title }), lede ? (_jsx(Text, { fontSize: "$4", color: "$soft", text: "center", children: lede })) : null] }));
17
+ }
@@ -0,0 +1,54 @@
1
+ /**
2
+ * The host's addresses — where its own pages live, which gateway and IAM to
3
+ * talk to, the plan catalogue to paint first — stated once with `configure()`.
4
+ *
5
+ * A plain module, with no client directive, because plain modules read it:
6
+ * `api()`, `iam()`, `site()` and the plan reads run in server components and
7
+ * outside any component, where a client module's export is only a reference
8
+ * and calling it throws.
9
+ */
10
+ import type { ComponentType } from 'react';
11
+ import type { BillingPlan } from './lib/plans.js';
12
+ import type { Integration } from './lib/integrations.js';
13
+ /** The addresses a host serves from, which plain modules read. */
14
+ export interface Addresses {
15
+ /** The gateway's origin. Absent, the rooms derive it from the page's host. */
16
+ api?: string;
17
+ /** IAM's origin. Absent, hanzo.id. */
18
+ iam?: string;
19
+ /**
20
+ * Where the app's own pages live — `/dev`, `/account`, `/legal/*`.
21
+ * Empty on the site that serves them; `https://hanzo.ai` on hanzo.team.
22
+ */
23
+ site: string;
24
+ /** The rooms' Home: `/home` beside the app, `/` on hanzo.team. */
25
+ home: string;
26
+ /** Where a new account starts: `/signup`, or hanzo.team's `/start`. */
27
+ signUp: string;
28
+ /** The publishable key anonymous calls carry. */
29
+ key?: string;
30
+ /** The plan catalogue as the host's build last read it: the first paint. */
31
+ plans?: BillingPlan[];
32
+ /** The SDKs and frameworks Directory lists, which the host publishes. */
33
+ integrations?: Integration[];
34
+ /**
35
+ * The host's front door, for a workspace rooted at `/` (hanzo.team): what a
36
+ * stranger at Home is shown instead of the sign-in, and the business sign-up
37
+ * `/start` draws. A host without one gets the sign-in.
38
+ */
39
+ Landing?: ComponentType<{
40
+ member?: boolean;
41
+ }>;
42
+ Signup?: ComponentType;
43
+ }
44
+ /**
45
+ * State the host's addresses, at module scope, before anything renders. Each
46
+ * call adds to what is stated, so a host can name its cheap addresses at its
47
+ * root and the heavy ones (the plan catalogue, the integrations) only where the
48
+ * rooms are drawn.
49
+ */
50
+ export declare function configure(given: Partial<Addresses>): void;
51
+ /** The host's addresses, for code that runs outside a component. */
52
+ export declare const where: () => Addresses;
53
+ /** A page of the app's own, from wherever the rooms are mounted. */
54
+ export declare const site: (path: string) => string;
package/dist/where.js ADDED
@@ -0,0 +1,14 @@
1
+ let addresses = { site: '', home: '/home', signUp: '/signup' };
2
+ /**
3
+ * State the host's addresses, at module scope, before anything renders. Each
4
+ * call adds to what is stated, so a host can name its cheap addresses at its
5
+ * root and the heavy ones (the plan catalogue, the integrations) only where the
6
+ * rooms are drawn.
7
+ */
8
+ export function configure(given) {
9
+ addresses = { ...addresses, ...given };
10
+ }
11
+ /** The host's addresses, for code that runs outside a component. */
12
+ export const where = () => addresses;
13
+ /** A page of the app's own, from wherever the rooms are mounted. */
14
+ export const site = (path) => `${addresses.site}${path}`;
package/package.json ADDED
@@ -0,0 +1,108 @@
1
+ {
2
+ "name": "@hanzo/rooms",
3
+ "version": "0.1.0",
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
+ "type": "module",
6
+ "main": "./dist/index.js",
7
+ "module": "./dist/index.js",
8
+ "types": "./dist/index.d.ts",
9
+ "exports": {
10
+ ".": {
11
+ "types": "./dist/index.d.ts",
12
+ "import": "./dist/index.js",
13
+ "default": "./dist/index.js"
14
+ },
15
+ "./*": {
16
+ "types": "./dist/*.d.ts",
17
+ "import": "./dist/*.js",
18
+ "default": "./dist/*.js"
19
+ },
20
+ "./lib/*": {
21
+ "types": "./dist/lib/*.d.ts",
22
+ "import": "./dist/lib/*.js",
23
+ "default": "./dist/lib/*.js"
24
+ },
25
+ "./bots/*": {
26
+ "types": "./dist/bots/*.d.ts",
27
+ "import": "./dist/bots/*.js",
28
+ "default": "./dist/bots/*.js"
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "LICENSE-APACHE",
34
+ "LICENSE-MIT"
35
+ ],
36
+ "sideEffects": false,
37
+ "publishConfig": {
38
+ "access": "public",
39
+ "registry": "https://registry.npmjs.org/"
40
+ },
41
+ "license": "Apache-2.0 OR MIT",
42
+ "dependencies": {
43
+ "@hanzo/personas": "1.0.5",
44
+ "marked": "18.0.12",
45
+ "simple-icons": "16.30.0"
46
+ },
47
+ "peerDependencies": {
48
+ "@hanzo/ai": ">=0.6.17",
49
+ "@hanzo/appearance": ">=0.2.6",
50
+ "@hanzo/build": ">=0.2.34",
51
+ "@hanzo/composer": ">=0.2.0",
52
+ "@hanzo/event": ">=0.3.56",
53
+ "@hanzo/gui": "^8.3.5",
54
+ "@hanzo/iam": ">=0.21.28",
55
+ "@hanzo/logo": ">=1.0.26",
56
+ "@hanzo/plans": ">=1.8.9",
57
+ "@hanzo/ui": ">=8.27.51",
58
+ "@hanzo/usage": ">=0.1.17",
59
+ "@hanzo/voice": ">=0.1.8",
60
+ "@hanzogui/shell": "^8.3.20",
61
+ "lucide-react": ">=1.42.0",
62
+ "react": ">=19.2.8",
63
+ "react-dom": ">=19.2.8"
64
+ },
65
+ "devDependencies": {
66
+ "@hanzo/ai": "0.6.17",
67
+ "@hanzo/appearance": "0.2.6",
68
+ "@hanzo/build": "0.2.34",
69
+ "@hanzo/composer": "0.2.0",
70
+ "@hanzo/event": "0.3.56",
71
+ "@hanzo/gui": "8.3.5",
72
+ "@hanzo/iam": "0.21.28",
73
+ "@hanzo/logo": "1.0.26",
74
+ "@hanzo/plans": "1.8.9",
75
+ "@hanzo/ui": "8.27.51",
76
+ "@hanzo/usage": "0.1.17",
77
+ "@hanzo/voice": "0.1.8",
78
+ "@hanzogui/config": "8.3.5",
79
+ "@hanzogui/core": "8.3.5",
80
+ "@hanzogui/shell": "8.3.20",
81
+ "@hanzogui/web": "8.3.5",
82
+ "@types/node": "26.5.0",
83
+ "@types/react": "19.2.18",
84
+ "@types/react-dom": "19.2.7",
85
+ "lucide-react": "1.42.0",
86
+ "react": "19.2.8",
87
+ "react-dom": "19.2.8",
88
+ "react-native-web": "0.21.2",
89
+ "typescript": "7.0.2",
90
+ "vitest": "4.1.11",
91
+ "@hanzo/design": "0.5.33",
92
+ "@hanzogui/lucide-icons-2": "8.3.5"
93
+ },
94
+ "repository": {
95
+ "type": "git",
96
+ "url": "git+https://github.com/hanzoai/rooms.git"
97
+ },
98
+ "engines": {
99
+ "node": ">=22.18"
100
+ },
101
+ "scripts": {
102
+ "gen": "node scripts/team.mjs",
103
+ "build": "rm -rf dist && node scripts/team.mjs && tsc -p tsconfig.build.json && node scripts/specifiers.mjs",
104
+ "typecheck": "tsc --noEmit",
105
+ "test": "vitest run --passWithNoTests",
106
+ "lint:design": "hanzo-design-lint src"
107
+ }
108
+ }