@asanchez-sa/abby 0.0.0-stage → 0.1.1

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 (391) hide show
  1. package/README.md +245 -2
  2. package/dist/_virtual/_rolldown/runtime.js +26 -0
  3. package/dist/agents/approvals.d.ts +46 -0
  4. package/dist/agents/approvals.js +58 -0
  5. package/dist/agents/changes.d.ts +21 -0
  6. package/dist/agents/changes.js +21 -0
  7. package/dist/agents/hooks.d.ts +20 -0
  8. package/dist/agents/hooks.js +58 -0
  9. package/dist/agents/index.d.ts +11 -0
  10. package/dist/agents/index.js +9 -0
  11. package/dist/agents/run-tool.d.ts +44 -0
  12. package/dist/agents/run-tool.js +79 -0
  13. package/dist/agents/ui-sdk.d.ts +5 -0
  14. package/dist/agents/ui-sdk.js +3 -0
  15. package/dist/behaviors/canvas/index.d.ts +2 -0
  16. package/dist/behaviors/canvas/index.js +1 -0
  17. package/dist/behaviors/canvas/ui-sdk.d.ts +2 -0
  18. package/dist/behaviors/canvas/ui-sdk.js +1 -0
  19. package/dist/behaviors/drag-and-drop/index.d.ts +2 -0
  20. package/dist/behaviors/drag-and-drop/index.js +1 -0
  21. package/dist/behaviors/drag-and-drop/ui-sdk.d.ts +2 -0
  22. package/dist/behaviors/drag-and-drop/ui-sdk.js +1 -0
  23. package/dist/behaviors/dragging/index.d.ts +2 -0
  24. package/dist/behaviors/dragging/index.js +1 -0
  25. package/dist/behaviors/dragging/ui-sdk.d.ts +2 -0
  26. package/dist/behaviors/dragging/ui-sdk.js +1 -0
  27. package/dist/behaviors/focus/index.d.ts +2 -0
  28. package/dist/behaviors/focus/index.js +1 -0
  29. package/dist/behaviors/focus/ui-sdk.d.ts +2 -0
  30. package/dist/behaviors/focus/ui-sdk.js +1 -0
  31. package/dist/behaviors/lists/index.d.ts +3 -0
  32. package/dist/behaviors/lists/index.js +3 -0
  33. package/dist/behaviors/lists/ui-sdk.d.ts +3 -0
  34. package/dist/behaviors/lists/ui-sdk.js +3 -0
  35. package/dist/behaviors/popups/index.d.ts +3 -0
  36. package/dist/behaviors/popups/index.js +3 -0
  37. package/dist/behaviors/popups/ui-sdk.d.ts +3 -0
  38. package/dist/behaviors/popups/ui-sdk.js +3 -0
  39. package/dist/behaviors/preferences/index.d.ts +3 -0
  40. package/dist/behaviors/preferences/index.js +3 -0
  41. package/dist/behaviors/preferences/ui-sdk.d.ts +3 -0
  42. package/dist/behaviors/preferences/ui-sdk.js +3 -0
  43. package/dist/behaviors/selection/index.d.ts +3 -0
  44. package/dist/behaviors/selection/index.js +3 -0
  45. package/dist/behaviors/selection/indicator.d.ts +13 -0
  46. package/dist/behaviors/selection/indicator.js +20 -0
  47. package/dist/behaviors/selection/ui-sdk.d.ts +2 -0
  48. package/dist/behaviors/selection/ui-sdk.js +1 -0
  49. package/dist/behaviors/transitions/index.d.ts +3 -0
  50. package/dist/behaviors/transitions/index.js +3 -0
  51. package/dist/behaviors/transitions/ui-sdk.d.ts +3 -0
  52. package/dist/behaviors/transitions/ui-sdk.js +3 -0
  53. package/dist/behaviors/trees/index.d.ts +2 -0
  54. package/dist/behaviors/trees/index.js +1 -0
  55. package/dist/behaviors/trees/ui-sdk.d.ts +2 -0
  56. package/dist/behaviors/trees/ui-sdk.js +1 -0
  57. package/dist/components/accordion/accordion.d.ts +13 -0
  58. package/dist/components/accordion/accordion.js +165 -0
  59. package/dist/components/alert/alert.d.ts +13 -0
  60. package/dist/components/alert/alert.js +131 -0
  61. package/dist/components/alert-dialog/alert-dialog.d.ts +15 -0
  62. package/dist/components/alert-dialog/alert-dialog.js +257 -0
  63. package/dist/components/aspect-ratio/aspect-ratio.d.ts +7 -0
  64. package/dist/components/aspect-ratio/aspect-ratio.js +57 -0
  65. package/dist/components/attachment/attachment.d.ts +48 -0
  66. package/dist/components/attachment/attachment.js +372 -0
  67. package/dist/components/autocomplete/autocomplete.d.ts +32 -0
  68. package/dist/components/autocomplete/autocomplete.js +466 -0
  69. package/dist/components/avatar/avatar.d.ts +6 -0
  70. package/dist/components/avatar/avatar.js +100 -0
  71. package/dist/components/avatar-group/avatar-group.d.ts +9 -0
  72. package/dist/components/avatar-group/avatar-group.js +75 -0
  73. package/dist/components/badge/badge.d.ts +15 -0
  74. package/dist/components/badge/badge.js +31 -0
  75. package/dist/components/breadcrumb/breadcrumb.d.ts +24 -0
  76. package/dist/components/breadcrumb/breadcrumb.js +279 -0
  77. package/dist/components/bubble/bubble.d.ts +26 -0
  78. package/dist/components/bubble/bubble.js +173 -0
  79. package/dist/components/button/button.d.ts +18 -0
  80. package/dist/components/button/button.js +91 -0
  81. package/dist/components/button-group/button-group.d.ts +15 -0
  82. package/dist/components/button-group/button-group.js +71 -0
  83. package/dist/components/calendar/calendar.d.ts +29 -0
  84. package/dist/components/calendar/calendar.js +453 -0
  85. package/dist/components/card/card.d.ts +14 -0
  86. package/dist/components/card/card.js +213 -0
  87. package/dist/components/carousel/carousel.d.ts +16 -0
  88. package/dist/components/carousel/carousel.js +364 -0
  89. package/dist/components/chain-of-thought/chain-of-thought.d.ts +72 -0
  90. package/dist/components/chain-of-thought/chain-of-thought.js +491 -0
  91. package/dist/components/chat/chat.d.ts +48 -0
  92. package/dist/components/chat/chat.js +207 -0
  93. package/dist/components/checkbox/checkbox.d.ts +10 -0
  94. package/dist/components/checkbox/checkbox.js +118 -0
  95. package/dist/components/checkpoint/checkpoint.d.ts +24 -0
  96. package/dist/components/checkpoint/checkpoint.js +178 -0
  97. package/dist/components/choice-cards/choice-cards.d.ts +38 -0
  98. package/dist/components/choice-cards/choice-cards.js +255 -0
  99. package/dist/components/code-block/code-block.d.ts +58 -0
  100. package/dist/components/code-block/code-block.js +506 -0
  101. package/dist/components/code-block/highlighter.js +96 -0
  102. package/dist/components/code-block/use-highlighted-code.d.ts +11 -0
  103. package/dist/components/code-block/use-highlighted-code.js +54 -0
  104. package/dist/components/collapsible/collapsible.d.ts +10 -0
  105. package/dist/components/collapsible/collapsible.js +92 -0
  106. package/dist/components/color-picker/color-picker.d.ts +17 -0
  107. package/dist/components/color-picker/color-picker.js +395 -0
  108. package/dist/components/combobox/combobox.d.ts +54 -0
  109. package/dist/components/combobox/combobox.js +683 -0
  110. package/dist/components/command/command.d.ts +23 -0
  111. package/dist/components/command/command.js +373 -0
  112. package/dist/components/command-dock/command-dock.d.ts +118 -0
  113. package/dist/components/command-dock/command-dock.js +944 -0
  114. package/dist/components/confirmation/confirmation.d.ts +58 -0
  115. package/dist/components/confirmation/confirmation.js +181 -0
  116. package/dist/components/context/context.d.ts +82 -0
  117. package/dist/components/context/context.js +490 -0
  118. package/dist/components/date-input/date-input.d.ts +16 -0
  119. package/dist/components/date-input/date-input.js +89 -0
  120. package/dist/components/date-picker/date-picker.d.ts +28 -0
  121. package/dist/components/date-picker/date-picker.js +361 -0
  122. package/dist/components/dialog/dialog.d.ts +14 -0
  123. package/dist/components/dialog/dialog.js +261 -0
  124. package/dist/components/drawer/drawer.d.ts +16 -0
  125. package/dist/components/drawer/drawer.js +309 -0
  126. package/dist/components/empty/empty.d.ts +18 -0
  127. package/dist/components/empty/empty.js +192 -0
  128. package/dist/components/field/field.d.ts +15 -0
  129. package/dist/components/field/field.js +261 -0
  130. package/dist/components/file-input/file-input.d.ts +12 -0
  131. package/dist/components/file-input/file-input.js +216 -0
  132. package/dist/components/file-tree/file-tree.d.ts +45 -0
  133. package/dist/components/file-tree/file-tree.js +283 -0
  134. package/dist/components/hover-card/hover-card.d.ts +10 -0
  135. package/dist/components/hover-card/hover-card.js +118 -0
  136. package/dist/components/icon/icon.d.ts +14 -0
  137. package/dist/components/icon/icon.js +60 -0
  138. package/dist/components/image-cropper/image-cropper.d.ts +15 -0
  139. package/dist/components/image-cropper/image-cropper.js +334 -0
  140. package/dist/components/inline-citation/inline-citation.d.ts +46 -0
  141. package/dist/components/inline-citation/inline-citation.js +269 -0
  142. package/dist/components/input/input.d.ts +9 -0
  143. package/dist/components/input/input.js +43 -0
  144. package/dist/components/input-group/input-group.d.ts +42 -0
  145. package/dist/components/input-group/input-group.js +192 -0
  146. package/dist/components/item/item.d.ts +32 -0
  147. package/dist/components/item/item.js +394 -0
  148. package/dist/components/kbd/kbd.d.ts +9 -0
  149. package/dist/components/kbd/kbd.js +75 -0
  150. package/dist/components/label/label.d.ts +6 -0
  151. package/dist/components/label/label.js +40 -0
  152. package/dist/components/link/link.d.ts +21 -0
  153. package/dist/components/link/link.js +126 -0
  154. package/dist/components/listbox/listbox.d.ts +20 -0
  155. package/dist/components/listbox/listbox.js +199 -0
  156. package/dist/components/marker/marker.d.ts +11 -0
  157. package/dist/components/marker/marker.js +88 -0
  158. package/dist/components/menu/menu.d.ts +38 -0
  159. package/dist/components/menu/menu.js +553 -0
  160. package/dist/components/menubar/menubar.d.ts +9 -0
  161. package/dist/components/menubar/menubar.js +47 -0
  162. package/dist/components/message/message.d.ts +44 -0
  163. package/dist/components/message/message.js +328 -0
  164. package/dist/components/message-scroller/message-scroller.d.ts +111 -0
  165. package/dist/components/message-scroller/message-scroller.js +957 -0
  166. package/dist/components/meter/meter.d.ts +8 -0
  167. package/dist/components/meter/meter.js +162 -0
  168. package/dist/components/model-selector/model-selector.d.ts +155 -0
  169. package/dist/components/model-selector/model-selector.js +905 -0
  170. package/dist/components/native-select/native-select.d.ts +27 -0
  171. package/dist/components/native-select/native-select.js +226 -0
  172. package/dist/components/navigation-menu/navigation-menu.d.ts +29 -0
  173. package/dist/components/navigation-menu/navigation-menu.js +318 -0
  174. package/dist/components/not-label.js +9 -0
  175. package/dist/components/note-editor/blocks.d.ts +22 -0
  176. package/dist/components/note-editor/blocks.js +245 -0
  177. package/dist/components/note-editor/diff.d.ts +19 -0
  178. package/dist/components/note-editor/diff.js +64 -0
  179. package/dist/components/note-editor/editor.js +249 -0
  180. package/dist/components/note-editor/note-editor.d.ts +109 -0
  181. package/dist/components/note-editor/note-editor.js +954 -0
  182. package/dist/components/note-editor/parts/comments.d.ts +24 -0
  183. package/dist/components/note-editor/parts/comments.js +337 -0
  184. package/dist/components/note-editor/parts/header.d.ts +25 -0
  185. package/dist/components/note-editor/parts/header.js +263 -0
  186. package/dist/components/note-editor/parts/history.d.ts +56 -0
  187. package/dist/components/note-editor/parts/history.js +409 -0
  188. package/dist/components/note-editor/parts/presence.d.ts +31 -0
  189. package/dist/components/note-editor/parts/presence.js +140 -0
  190. package/dist/components/note-editor/parts/suggestions.d.ts +45 -0
  191. package/dist/components/note-editor/parts/suggestions.js +316 -0
  192. package/dist/components/note-editor/parts/toolbar.d.ts +38 -0
  193. package/dist/components/note-editor/parts/toolbar.js +687 -0
  194. package/dist/components/note-editor/people.d.ts +84 -0
  195. package/dist/components/note-editor/people.js +276 -0
  196. package/dist/components/note-editor/person.d.ts +11 -0
  197. package/dist/components/note-editor/person.js +15 -0
  198. package/dist/components/note-place/note-place.d.ts +42 -0
  199. package/dist/components/note-place/note-place.js +256 -0
  200. package/dist/components/note-status/note-status.d.ts +59 -0
  201. package/dist/components/note-status/note-status.js +380 -0
  202. package/dist/components/number-input/number-input.d.ts +12 -0
  203. package/dist/components/number-input/number-input.js +252 -0
  204. package/dist/components/otp-input/otp-input.d.ts +12 -0
  205. package/dist/components/otp-input/otp-input.js +136 -0
  206. package/dist/components/pagination/pagination.d.ts +23 -0
  207. package/dist/components/pagination/pagination.js +218 -0
  208. package/dist/components/password-input/password-input.d.ts +11 -0
  209. package/dist/components/password-input/password-input.js +117 -0
  210. package/dist/components/plan/plan.d.ts +51 -0
  211. package/dist/components/plan/plan.js +320 -0
  212. package/dist/components/popover/popover.d.ts +16 -0
  213. package/dist/components/popover/popover.js +268 -0
  214. package/dist/components/preferences/preferences.d.ts +5 -0
  215. package/dist/components/preferences/preferences.js +18 -0
  216. package/dist/components/progress/progress.d.ts +8 -0
  217. package/dist/components/progress/progress.js +162 -0
  218. package/dist/components/prompt-input/prompt-input.d.ts +247 -0
  219. package/dist/components/prompt-input/prompt-input.js +1367 -0
  220. package/dist/components/questionnaire/questionnaire.d.ts +174 -0
  221. package/dist/components/questionnaire/questionnaire.js +1628 -0
  222. package/dist/components/queue/queue.d.ts +82 -0
  223. package/dist/components/queue/queue.js +471 -0
  224. package/dist/components/radio/radio.d.ts +7 -0
  225. package/dist/components/radio/radio.js +101 -0
  226. package/dist/components/rating/rating.d.ts +10 -0
  227. package/dist/components/rating/rating.js +95 -0
  228. package/dist/components/reasoning/reasoning.d.ts +50 -0
  229. package/dist/components/reasoning/reasoning.js +233 -0
  230. package/dist/components/resizable/resizable.d.ts +6 -0
  231. package/dist/components/resizable/resizable.js +100 -0
  232. package/dist/components/scroll-area/scroll-area.d.ts +17 -0
  233. package/dist/components/scroll-area/scroll-area.js +211 -0
  234. package/dist/components/segmented-control/segmented-control.d.ts +16 -0
  235. package/dist/components/segmented-control/segmented-control.js +142 -0
  236. package/dist/components/select/select.d.ts +43 -0
  237. package/dist/components/select/select.js +577 -0
  238. package/dist/components/separator/separator.d.ts +4 -0
  239. package/dist/components/separator/separator.js +38 -0
  240. package/dist/components/sheet/sheet.d.ts +24 -0
  241. package/dist/components/sheet/sheet.js +330 -0
  242. package/dist/components/sidebar/sidebar.d.ts +138 -0
  243. package/dist/components/sidebar/sidebar.js +1374 -0
  244. package/dist/components/skeleton/skeleton.d.ts +4 -0
  245. package/dist/components/skeleton/skeleton.js +40 -0
  246. package/dist/components/slider/slider.d.ts +9 -0
  247. package/dist/components/slider/slider.js +193 -0
  248. package/dist/components/sources/sources.d.ts +35 -0
  249. package/dist/components/sources/sources.js +209 -0
  250. package/dist/components/spinner/spinner.d.ts +11 -0
  251. package/dist/components/spinner/spinner.js +59 -0
  252. package/dist/components/stack-trace/parse-stack-trace.d.ts +21 -0
  253. package/dist/components/stack-trace/parse-stack-trace.js +61 -0
  254. package/dist/components/stack-trace/stack-trace.d.ts +79 -0
  255. package/dist/components/stack-trace/stack-trace.js +434 -0
  256. package/dist/components/subagent/subagent.d.ts +71 -0
  257. package/dist/components/subagent/subagent.js +450 -0
  258. package/dist/components/suggestion/suggestion.d.ts +21 -0
  259. package/dist/components/suggestion/suggestion.js +130 -0
  260. package/dist/components/switch/switch.d.ts +6 -0
  261. package/dist/components/switch/switch.js +70 -0
  262. package/dist/components/table/table.d.ts +19 -0
  263. package/dist/components/table/table.js +284 -0
  264. package/dist/components/table-of-contents/spy.js +84 -0
  265. package/dist/components/table-of-contents/table-of-contents.d.ts +92 -0
  266. package/dist/components/table-of-contents/table-of-contents.js +787 -0
  267. package/dist/components/tabs/tabs.d.ts +25 -0
  268. package/dist/components/tabs/tabs.js +273 -0
  269. package/dist/components/task/task.d.ts +40 -0
  270. package/dist/components/task/task.js +262 -0
  271. package/dist/components/terminal/terminal.d.ts +82 -0
  272. package/dist/components/terminal/terminal.js +457 -0
  273. package/dist/components/test-results/test-results.d.ts +127 -0
  274. package/dist/components/test-results/test-results.js +687 -0
  275. package/dist/components/textarea/textarea.d.ts +8 -0
  276. package/dist/components/textarea/textarea.js +43 -0
  277. package/dist/components/time-input/time-input.d.ts +7 -0
  278. package/dist/components/time-input/time-input.js +82 -0
  279. package/dist/components/timeline/timeline.d.ts +19 -0
  280. package/dist/components/timeline/timeline.js +247 -0
  281. package/dist/components/toast/toast.d.ts +12 -0
  282. package/dist/components/toast/toast.js +285 -0
  283. package/dist/components/toggle/toggle.d.ts +15 -0
  284. package/dist/components/toggle/toggle.js +137 -0
  285. package/dist/components/token-input/token-input.d.ts +7 -0
  286. package/dist/components/token-input/token-input.js +117 -0
  287. package/dist/components/tool/tool.d.ts +66 -0
  288. package/dist/components/tool/tool.js +413 -0
  289. package/dist/components/toolbar/toolbar.d.ts +91 -0
  290. package/dist/components/toolbar/toolbar.js +655 -0
  291. package/dist/components/tooltip/tooltip.d.ts +8 -0
  292. package/dist/components/tooltip/tooltip.js +97 -0
  293. package/dist/components/trace/trace.d.ts +31 -0
  294. package/dist/components/trace/trace.js +309 -0
  295. package/dist/components/tree/tree.d.ts +13 -0
  296. package/dist/components/tree/tree.js +258 -0
  297. package/dist/components/trigger-menu/trigger-menu.d.ts +30 -0
  298. package/dist/components/trigger-menu/trigger-menu.js +352 -0
  299. package/dist/components/usage/usage.d.ts +132 -0
  300. package/dist/components/usage/usage.js +1368 -0
  301. package/dist/components/waterfall/waterfall.d.ts +20 -0
  302. package/dist/components/waterfall/waterfall.js +360 -0
  303. package/dist/components/week-strip/week-strip.d.ts +177 -0
  304. package/dist/components/week-strip/week-strip.js +1081 -0
  305. package/dist/core/index.d.ts +7 -0
  306. package/dist/core/index.js +27 -0
  307. package/dist/core/ui-sdk.d.ts +3 -0
  308. package/dist/core/ui-sdk.js +3 -0
  309. package/dist/core/use-primitive-state.d.ts +14 -0
  310. package/dist/core/use-primitive-state.js +25 -0
  311. package/dist/styles/LICENSE-shadcn.md +21 -0
  312. package/dist/styles/color-scheme.css +32 -0
  313. package/dist/styles/components.css +303 -0
  314. package/dist/styles/index.css +41 -0
  315. package/dist/styles/tokens.css +474 -0
  316. package/dist/styles/typeset/shadcn.css +506 -0
  317. package/dist/styles/typeset.css +70 -0
  318. package/dist/styles/utilities.css +555 -0
  319. package/dist/tools/observe/index.d.ts +2 -0
  320. package/dist/tools/observe/index.js +3 -0
  321. package/dist/tools/observe/ui-sdk.d.ts +1 -0
  322. package/dist/tools/observe/ui-sdk.js +2 -0
  323. package/dist/tools/testing/check-agent.d.ts +28 -0
  324. package/dist/tools/testing/check-agent.js +42 -0
  325. package/dist/tools/testing/index.d.ts +4 -0
  326. package/dist/tools/testing/index.js +4 -0
  327. package/dist/tools/testing/ui-sdk.d.ts +1 -0
  328. package/dist/tools/testing/ui-sdk.js +2 -0
  329. package/dist/utilities/cn/index.d.ts +12 -0
  330. package/dist/utilities/cn/index.js +47 -0
  331. package/dist/utilities/color/index.d.ts +2 -0
  332. package/dist/utilities/color/index.js +3 -0
  333. package/dist/utilities/color/ui-sdk.d.ts +1 -0
  334. package/dist/utilities/color/ui-sdk.js +2 -0
  335. package/dist/utilities/date/index.d.ts +2 -0
  336. package/dist/utilities/date/index.js +6 -0
  337. package/dist/utilities/date/ui-sdk.d.ts +1 -0
  338. package/dist/utilities/date/ui-sdk.js +2 -0
  339. package/dist/utilities/image/index.d.ts +2 -0
  340. package/dist/utilities/image/index.js +3 -0
  341. package/dist/utilities/image/ui-sdk.d.ts +1 -0
  342. package/dist/utilities/image/ui-sdk.js +2 -0
  343. package/dist/utilities/mobile/index.d.ts +2 -0
  344. package/dist/utilities/mobile/index.js +1 -0
  345. package/dist/utilities/mobile/ui-sdk.d.ts +2 -0
  346. package/dist/utilities/mobile/ui-sdk.js +1 -0
  347. package/dist/utilities/number/index.d.ts +2 -0
  348. package/dist/utilities/number/index.js +3 -0
  349. package/dist/utilities/number/ui-sdk.d.ts +1 -0
  350. package/dist/utilities/number/ui-sdk.js +2 -0
  351. package/dist/utilities/platform/index.d.ts +3 -0
  352. package/dist/utilities/platform/index.js +14 -0
  353. package/dist/utilities/platform/ui-sdk.d.ts +3 -0
  354. package/dist/utilities/platform/ui-sdk.js +3 -0
  355. package/dist/utilities/storage/index.d.ts +2 -0
  356. package/dist/utilities/storage/index.js +1 -0
  357. package/dist/utilities/storage/ui-sdk.d.ts +2 -0
  358. package/dist/utilities/storage/ui-sdk.js +1 -0
  359. package/dist/utilities/text/index.d.ts +3 -0
  360. package/dist/utilities/text/index.js +3 -0
  361. package/dist/utilities/text/ui-sdk.d.ts +3 -0
  362. package/dist/utilities/text/ui-sdk.js +3 -0
  363. package/package.json +192 -4
  364. package/skills/agent-ready-ui/SKILL.md +229 -0
  365. package/skills/blocks/SKILL.md +262 -0
  366. package/skills/compose-screens/SKILL.md +354 -0
  367. package/skills/note-editor/SKILL.md +493 -0
  368. package/skills/note-status/SKILL.md +295 -0
  369. package/skills/setup/SKILL.md +136 -0
  370. package/skills/theming/SKILL.md +216 -0
  371. package/src/blocks/notes/adapters.ts +77 -0
  372. package/src/blocks/notes/data.ts +508 -0
  373. package/src/blocks/notes/notes-block.tsx +244 -0
  374. package/src/blocks/notes/parts/home.tsx +219 -0
  375. package/src/blocks/notes/parts/no-access.tsx +84 -0
  376. package/src/blocks/notes/parts/note-screen.tsx +412 -0
  377. package/src/blocks/notes/parts/notes-sidebar.tsx +277 -0
  378. package/src/blocks/notes/parts/panels.tsx +393 -0
  379. package/src/blocks/notes/parts/place.ts +15 -0
  380. package/src/blocks/notes/parts/review-dialog.tsx +159 -0
  381. package/src/blocks/notes/parts/share.tsx +172 -0
  382. package/src/blocks/notes/texts.ts +135 -0
  383. package/src/blocks/shell/adapters.ts +69 -0
  384. package/src/blocks/shell/data.ts +281 -0
  385. package/src/blocks/shell/parts/compose.tsx +292 -0
  386. package/src/blocks/shell/parts/home.tsx +203 -0
  387. package/src/blocks/shell/parts/marks.tsx +144 -0
  388. package/src/blocks/shell/parts/rail.tsx +166 -0
  389. package/src/blocks/shell/parts/rooms-column.tsx +326 -0
  390. package/src/blocks/shell/shell-block.tsx +210 -0
  391. package/src/blocks/shell/texts.ts +80 -0
@@ -0,0 +1,292 @@
1
+ "use client";
2
+
3
+ import { Add01Icon, LockIcon, PencilEdit02Icon } from "@hugeicons/core-free-icons";
4
+ import { Button } from "abby/button";
5
+ import { Icon } from "abby/icon";
6
+ import { InputGroup, InputGroupAddon, InputGroupInput } from "abby/input-group";
7
+ import { Kbd } from "abby/kbd";
8
+ import { Popover, PopoverContent } from "abby/popover";
9
+ import { useShortcut, useShortcutHint } from "abby/utilities/platform";
10
+ import {
11
+ useEffect,
12
+ useRef,
13
+ useState,
14
+ type KeyboardEvent,
15
+ type ReactNode,
16
+ type RefObject,
17
+ } from "react";
18
+ import type { ShellAdapter, ShellDestination, ShellRoute } from "../adapters.ts";
19
+ import type { ShellWorkspace } from "../data.ts";
20
+ import type { ShellTexts } from "../texts.ts";
21
+ import { AreaMark, WorkingArc } from "./marks.tsx";
22
+
23
+ // ⌘N: the field at the top of the column, where the person writes first and
24
+ // decides after, like a search box. A click (or ⌘N) puts the caret in it;
25
+ // while they type, the assistant's choices open under it: the room that
26
+ // exists before a new one, and why. ↑ and ↓ move between them, Enter takes
27
+ // the highlighted one, ⌘Enter a new room, ⌥Enter keeps it private. Focus
28
+ // stays in the field the whole time.
29
+
30
+ type ComposeProps = {
31
+ workspace: ShellWorkspace;
32
+ adapter: ShellAdapter;
33
+ texts: ShellTexts;
34
+ /** The field, so the column's "New room" can put the caret in it. */
35
+ inputRef: RefObject<HTMLInputElement | null>;
36
+ /** What's typed at first, with the choices open, as when a story starts written. */
37
+ defaultText?: string;
38
+ };
39
+
40
+ type Choice = {
41
+ key: string;
42
+ to: ShellDestination;
43
+ mark: ReactNode;
44
+ title: string;
45
+ detail: string;
46
+ keys: string;
47
+ };
48
+
49
+ export function Compose({ workspace, adapter, texts, inputRef, defaultText = "" }: ComposeProps) {
50
+ const [text, setText] = useState(defaultText);
51
+ const [open, setOpen] = useState(defaultText !== "");
52
+ const [active, setActive] = useState(0);
53
+ const [route, setRoute] = useState<{ text: string; route: ShellRoute }>();
54
+ const [failed, setFailed] = useState(false);
55
+ const [sending, setSending] = useState(false);
56
+ const field = useRef<HTMLDivElement>(null);
57
+ const hint = useShortcutHint("mod+n");
58
+ const typed = text.trim();
59
+ // The choices hang from the whole field, read when the popover places itself.
60
+ const anchor = { getBoundingClientRect: () => field.current!.getBoundingClientRect() };
61
+ const current = route && route.text === typed ? route.route : undefined;
62
+
63
+ useShortcut("mod+n", () => inputRef.current?.focus(), { description: texts.compose });
64
+
65
+ // Ask where the message goes once the typing settles; a later answer
66
+ // replaces an earlier one, and one for older text is dropped.
67
+ useEffect(() => {
68
+ if (!typed) return;
69
+ let live = true;
70
+ const timer = setTimeout(() => {
71
+ adapter.route(typed).then(
72
+ (next) => live && setRoute({ text: typed, route: next }),
73
+ () => {},
74
+ );
75
+ }, 150);
76
+ return () => {
77
+ live = false;
78
+ clearTimeout(timer);
79
+ };
80
+ }, [adapter, typed]);
81
+
82
+ const area = (id: string) => workspace.areas.find((each) => each.id === id);
83
+ const choices: Choice[] = [];
84
+ if (current?.room) {
85
+ choices.push({
86
+ key: "room",
87
+ to: { kind: "room", id: current.room.id },
88
+ mark: <AreaMark color={area(current.room.area)?.color ?? "var(--subtle)"} />,
89
+ title: current.room.title,
90
+ detail: current.room.detail,
91
+ keys: "↵",
92
+ });
93
+ }
94
+ if (current) {
95
+ choices.push({
96
+ key: "new",
97
+ to: { kind: "new", area: current.newRoom.area, name: current.newRoom.name },
98
+ mark: <Icon icon={Add01Icon} className="size-3 text-muted-foreground" />,
99
+ title: texts.composeNew(current.newRoom.place),
100
+ detail: texts.composeNamed(current.newRoom.name),
101
+ keys: current.room ? "⌘↵" : "↵",
102
+ });
103
+ }
104
+ choices.push({
105
+ key: "private",
106
+ to: { kind: "private" },
107
+ mark: <Icon icon={LockIcon} className="size-3 text-muted-foreground" />,
108
+ title: texts.composePrivate,
109
+ detail: texts.composePrivateDetail,
110
+ keys: "⌥↵",
111
+ });
112
+ const highlighted = Math.min(active, choices.length - 1);
113
+
114
+ const send = (to: ShellDestination) => {
115
+ if (!typed || sending) return;
116
+ setSending(true);
117
+ adapter.send({ text: typed, to }).then(
118
+ () => {
119
+ setSending(false);
120
+ setFailed(false);
121
+ setText("");
122
+ setOpen(false);
123
+ },
124
+ () => {
125
+ setSending(false);
126
+ setFailed(true);
127
+ },
128
+ );
129
+ };
130
+
131
+ const keys = (event: KeyboardEvent<HTMLInputElement>) => {
132
+ if (!typed || event.nativeEvent.isComposing) return;
133
+ // Focus is in the field, not the popover: Escape closes the choices from here.
134
+ if (event.key === "Escape" && open) {
135
+ event.preventDefault();
136
+ setOpen(false);
137
+ return;
138
+ }
139
+ if (event.key === "ArrowDown" || event.key === "ArrowUp") {
140
+ event.preventDefault();
141
+ setOpen(true);
142
+ const step = event.key === "ArrowDown" ? 1 : -1;
143
+ setActive((highlighted + step + choices.length) % choices.length);
144
+ return;
145
+ }
146
+ if (event.key !== "Enter") return;
147
+ event.preventDefault();
148
+ if (event.altKey) send({ kind: "private" });
149
+ else if (event.metaKey || event.ctrlKey) {
150
+ const fresh = choices.find((choice) => choice.key === "new");
151
+ if (fresh) send(fresh.to);
152
+ } else send(choices[highlighted]!.to);
153
+ };
154
+
155
+ return (
156
+ <>
157
+ {/* Alma's field: a white capsule with a hairline, the pencil in ink. */}
158
+ <InputGroup
159
+ ref={field}
160
+ data-compose=""
161
+ className="border-border bg-background dark:bg-background"
162
+ >
163
+ <InputGroupAddon align="inline-start">
164
+ <Icon icon={PencilEdit02Icon} className="text-foreground" />
165
+ </InputGroupAddon>
166
+ <InputGroupInput
167
+ ref={inputRef}
168
+ aria-label={texts.composeLabel}
169
+ aria-keyshortcuts={hint.ariaKeyshortcuts}
170
+ placeholder={texts.compose}
171
+ value={text}
172
+ onValueChange={(next) => {
173
+ setText(next);
174
+ setOpen(next.trim() !== "");
175
+ setActive(0);
176
+ setFailed(false);
177
+ }}
178
+ onClick={() => setOpen(typed !== "")}
179
+ onKeyDown={keys}
180
+ className="placeholder:text-muted-foreground"
181
+ />
182
+ <InputGroupAddon align="inline-end">
183
+ <Kbd aria-hidden="true" className="font-normal">
184
+ {hint.text}
185
+ </Kbd>
186
+ </InputGroupAddon>
187
+ </InputGroup>
188
+ <Popover
189
+ open={open && typed !== ""}
190
+ onOpenChange={(next, details) => {
191
+ // A press on the field itself keeps the choices: they belong to it.
192
+ if (!next && details.event?.target instanceof Node) {
193
+ if (field.current?.contains(details.event.target)) return details.cancel();
194
+ }
195
+ setOpen(next);
196
+ }}
197
+ >
198
+ <PopoverContent
199
+ anchor={anchor}
200
+ initialFocus="none"
201
+ finalFocus="none"
202
+ side="bottom"
203
+ align="start"
204
+ aria-label={texts.composeHint}
205
+ data-compose-popup=""
206
+ className="gap-0 data-[presentation=popover]:w-97 data-[presentation=popover]:p-0"
207
+ >
208
+ <div role="group" aria-label={texts.composeHint} className="flex flex-col p-1.5">
209
+ <p
210
+ aria-hidden="true"
211
+ className="px-3 pt-1.5 pb-1 text-footnote font-medium text-muted-foreground"
212
+ >
213
+ {current ? texts.composeHint : texts.composeSearching}
214
+ </p>
215
+ {choices.map((choice, index) => (
216
+ <ChoiceRow
217
+ key={choice.key}
218
+ choice={choice}
219
+ selected={index === highlighted}
220
+ onHover={() => setActive(index)}
221
+ onClick={() => send(choice.to)}
222
+ disabled={sending}
223
+ />
224
+ ))}
225
+ </div>
226
+ {failed && (
227
+ <p
228
+ role="alert"
229
+ className="border-t border-border px-3.5 py-2.5 text-supporting text-destructive"
230
+ >
231
+ {texts.composeFailed}
232
+ </p>
233
+ )}
234
+ {current?.reason && (
235
+ <p className="flex items-center gap-1.5 border-t border-border px-3.5 py-2.5 text-supporting text-muted-foreground">
236
+ <WorkingArc />
237
+ {current.reason}
238
+ </p>
239
+ )}
240
+ </PopoverContent>
241
+ </Popover>
242
+ </>
243
+ );
244
+ }
245
+
246
+ /** One place the message can go: what it is, a line under it, and its keys. */
247
+ function ChoiceRow({
248
+ choice,
249
+ selected,
250
+ onHover,
251
+ onClick,
252
+ disabled,
253
+ }: {
254
+ choice: Choice;
255
+ selected: boolean;
256
+ onHover: () => void;
257
+ onClick: () => void;
258
+ disabled?: boolean;
259
+ }) {
260
+ return (
261
+ <Button
262
+ variant="ghost"
263
+ onClick={onClick}
264
+ onPointerEnter={onHover}
265
+ // The field keeps focus: a press here sends, and the caret stays where it was.
266
+ onPointerDown={(event) => event.preventDefault()}
267
+ disabled={disabled}
268
+ data-selected={selected ? "" : undefined}
269
+ className="h-auto w-full justify-start gap-2 rounded-lg py-2 ps-3 pe-2 text-start font-normal text-foreground hover:bg-transparent data-selected:bg-accent data-selected:hover:bg-accent"
270
+ >
271
+ <span aria-hidden="true" className="flex w-3 shrink-0 justify-center">
272
+ {choice.mark}
273
+ </span>
274
+ <span className="flex min-w-0 flex-1 flex-col gap-px">
275
+ <span className={`truncate ${selected ? "font-medium" : ""}`}>{choice.title}</span>
276
+ <span className="truncate text-supporting text-muted-foreground">{choice.detail}</span>
277
+ </span>
278
+ {selected ? (
279
+ <kbd
280
+ aria-hidden="true"
281
+ className="rounded-sm border border-border bg-background px-1.25 py-0.5 font-sans text-footnote text-muted-foreground"
282
+ >
283
+ {choice.keys}
284
+ </kbd>
285
+ ) : (
286
+ <kbd aria-hidden="true" className="font-sans text-footnote text-subtle">
287
+ {choice.keys}
288
+ </kbd>
289
+ )}
290
+ </Button>
291
+ );
292
+ }
@@ -0,0 +1,203 @@
1
+ "use client";
2
+
3
+ import { ArrowDown01Icon } from "@hugeicons/core-free-icons";
4
+ import { Icon } from "abby/icon";
5
+ import { Link } from "abby/link";
6
+ import {
7
+ PromptInput,
8
+ PromptInputFooter,
9
+ PromptInputSubmit,
10
+ PromptInputTextarea,
11
+ PromptInputTools,
12
+ } from "abby/prompt-input";
13
+ import {
14
+ Select,
15
+ SelectContent,
16
+ SelectItem,
17
+ SelectLabel,
18
+ SelectTrigger,
19
+ SelectValue,
20
+ } from "abby/select";
21
+ import { useState } from "react";
22
+ import type { ShellAdapter } from "../adapters.ts";
23
+ import type { ShellWorkspace } from "../data.ts";
24
+ import type { ShellTexts } from "../texts.ts";
25
+ import { AreaMark, AssistantMark, Strong } from "./marks.tsx";
26
+
27
+ // Home: the greeting, the composer that takes the person to the right room,
28
+ // what waits for them, what happened while they were away, and what the
29
+ // assistant learned overnight. A 720px column, 40px under the top bar.
30
+
31
+ type HomeProps = {
32
+ workspace: ShellWorkspace;
33
+ adapter: ShellAdapter;
34
+ texts: ShellTexts;
35
+ roomHref: (id: string) => string;
36
+ learnedHref: string;
37
+ };
38
+
39
+ const auto = "auto";
40
+
41
+ export function Home({ workspace, adapter, texts, roomHref, learnedHref }: HomeProps) {
42
+ const [area, setArea] = useState(auto);
43
+ const areaItems = [
44
+ { value: auto, label: texts.askAuto },
45
+ ...workspace.areas.map((each) => ({ value: each.id, label: each.name })),
46
+ ];
47
+ const firstName = workspace.me.name.split(" ")[0]!;
48
+
49
+ return (
50
+ <div className="flex min-h-0 flex-1 justify-center overflow-auto px-12 pt-10 pb-12">
51
+ <div className="flex w-180 max-w-full flex-col gap-8">
52
+ <div className="flex flex-col gap-1.5">
53
+ <h2 className="text-display-2">{texts.greeting(firstName)}</h2>
54
+ <p className="text-heading-3 leading-5.5 font-normal text-muted-foreground">
55
+ {workspace.summary}
56
+ </p>
57
+ </div>
58
+
59
+ {/*
60
+ Alma's composer: 96px with its controls, the text 18px in and the
61
+ footer 12px from the bottom, where the library's default is 90px.
62
+ */}
63
+ <PromptInput
64
+ onSubmit={({ text }) => adapter.ask({ text, area: area === auto ? undefined : area })}
65
+ >
66
+ <PromptInputTextarea
67
+ aria-label={texts.ask}
68
+ placeholder={texts.askPlaceholder}
69
+ className="group-has-[>[data-align=block-end]]/input-group:ps-4.5"
70
+ />
71
+ <PromptInputFooter className="ps-4.5 pe-4 pt-3.5 pb-3">
72
+ <PromptInputTools className="min-w-0 gap-2">
73
+ <Select
74
+ items={areaItems}
75
+ value={area}
76
+ onValueChange={(value) => setArea(value ?? auto)}
77
+ >
78
+ <SelectLabel className="sr-only">{texts.askArea}</SelectLabel>
79
+ {/* A chip, not a field: the selected fill, Alma's mark and a small chevron. */}
80
+ <SelectTrigger className="h-7 w-auto shrink-0 gap-1.5 rounded-full border-0 bg-accent px-2.5 text-xs shadow-none dark:bg-accent">
81
+ {area === auto ? (
82
+ <AssistantMark className="size-3.5 shrink-0" />
83
+ ) : (
84
+ <AreaMark
85
+ color={workspace.areas.find((each) => each.id === area)?.color ?? ""}
86
+ />
87
+ )}
88
+ <SelectValue />
89
+ <Icon icon={ArrowDown01Icon} className="size-2.5" />
90
+ </SelectTrigger>
91
+ <SelectContent>
92
+ {areaItems.map((item) => (
93
+ <SelectItem key={item.value} value={item.value}>
94
+ {item.label}
95
+ </SelectItem>
96
+ ))}
97
+ </SelectContent>
98
+ </Select>
99
+ {/* The design's placeholder gray falls under 4.5:1: the examples are text, so `subtle`. */}
100
+ <span className="truncate text-xs text-subtle">{texts.askExamples}</span>
101
+ </PromptInputTools>
102
+ <PromptInputSubmit label={texts.send} />
103
+ </PromptInputFooter>
104
+ </PromptInput>
105
+
106
+ {workspace.waiting.length > 0 && (
107
+ <section aria-labelledby="shell-waiting" className="flex flex-col gap-2.5">
108
+ <h3 id="shell-waiting" className="flex items-center gap-2 text-label">
109
+ <span aria-hidden="true" className="size-1.75 rounded-full bg-chart-3" />
110
+ {texts.waitingHeading}
111
+ <span className="font-normal text-muted-foreground">{workspace.waiting.length}</span>
112
+ </h3>
113
+ <ul className="flex flex-col divide-y divide-border rounded-xl border border-border">
114
+ {workspace.waiting.map((item) => {
115
+ const room = workspace.rooms.find((each) => each.id === item.room);
116
+ const color = workspace.areas.find((each) => each.id === room?.area)?.color;
117
+ return (
118
+ <li
119
+ key={item.id}
120
+ data-waiting={item.id}
121
+ className="flex items-center gap-3.5 px-4 py-3.5"
122
+ >
123
+ <AreaMark color={color ?? "var(--subtle)"} />
124
+ <div className="flex min-w-0 flex-1 flex-col gap-0.5">
125
+ <p className="text-body">
126
+ <strong className="font-medium">{item.lead}</strong> {item.text}
127
+ </p>
128
+ <p className="text-supporting text-muted-foreground">{item.detail}</p>
129
+ </div>
130
+ {/* Review is the page's one black button; reply stays an outline. */}
131
+ <Link
132
+ href={roomHref(item.room)}
133
+ variant={item.action === "review" ? "default" : "outline"}
134
+ size="sm"
135
+ aria-label={`${item.action === "review" ? texts.review : texts.reply}: ${room?.title ?? item.text}`}
136
+ className="shrink-0"
137
+ >
138
+ {item.action === "review" ? texts.review : texts.reply}
139
+ </Link>
140
+ </li>
141
+ );
142
+ })}
143
+ </ul>
144
+ </section>
145
+ )}
146
+
147
+ {(workspace.timeline.length > 0 || workspace.learned.items.length > 0) && (
148
+ <div className="flex gap-6">
149
+ {workspace.timeline.length > 0 && (
150
+ <section aria-labelledby="shell-away" className="flex min-w-0 flex-1 flex-col gap-3">
151
+ <h3 id="shell-away" className="text-label">
152
+ {texts.whileAway}
153
+ </h3>
154
+ <ul className="flex flex-col gap-3">
155
+ {workspace.timeline.map((line) => (
156
+ <li key={line.time} className="flex gap-2.5 text-sm">
157
+ <span className="w-10 shrink-0 font-mono text-footnote leading-4.5 text-muted-foreground">
158
+ {line.time}
159
+ </span>
160
+ <span>
161
+ <Strong text={line.text} />
162
+ </span>
163
+ </li>
164
+ ))}
165
+ </ul>
166
+ </section>
167
+ )}
168
+ {workspace.learned.items.length > 0 && (
169
+ <section
170
+ aria-labelledby="shell-learned"
171
+ className="flex w-80 shrink-0 flex-col gap-3 rounded-xl bg-sidebar p-4"
172
+ >
173
+ <div className="flex items-center gap-2">
174
+ <h3 id="shell-learned" className="flex-1 text-label">
175
+ {texts.learnedHeading}
176
+ </h3>
177
+ <Link
178
+ href={learnedHref}
179
+ className="text-xs font-medium text-foreground no-underline hover:underline"
180
+ >
181
+ {texts.seeAll(workspace.learned.total)}
182
+ </Link>
183
+ </div>
184
+ {workspace.learned.items.map((item) => (
185
+ <div key={item.text} className="flex flex-col gap-0.75">
186
+ <p
187
+ className={`font-mono text-footnote tracking-wider uppercase ${
188
+ item.kind === "lesson" ? "text-success" : "text-warning"
189
+ }`}
190
+ >
191
+ {item.kind === "lesson" ? texts.lesson : texts.warning} · {item.area}
192
+ </p>
193
+ <p className="text-sm">{item.text}</p>
194
+ </div>
195
+ ))}
196
+ </section>
197
+ )}
198
+ </div>
199
+ )}
200
+ </div>
201
+ </div>
202
+ );
203
+ }
@@ -0,0 +1,144 @@
1
+ "use client";
2
+
3
+ import type { CSSProperties, ReactNode } from "react";
4
+ import type { ShellPerson, ShellRoomStatus } from "../data.ts";
5
+
6
+ // The small marks the screen repeats: the assistant's logo, an area's
7
+ // square, the arc of the assistant at work, a room's status and the people's
8
+ // faces. All of them only repeat what a name or a line already says, so they
9
+ // take `aria-hidden`.
10
+
11
+ /**
12
+ * A color's tint over a surface, and the same color, darker, for text on
13
+ * it: an avatar's or a team's fill. `color-mix` keeps both in light and in
14
+ * dark, since the color and the surface carry their pairs.
15
+ */
16
+ export function tint(color: string, surface = "var(--background)"): CSSProperties {
17
+ return {
18
+ backgroundColor: `color-mix(in oklab, ${color} 22%, ${surface})`,
19
+ color: `color-mix(in oklab, ${color} 72%, var(--foreground))`,
20
+ };
21
+ }
22
+
23
+ /** The assistant's logo: an ink tile with its violet core. */
24
+ export function AssistantMark({ className }: { className?: string }) {
25
+ return (
26
+ <svg viewBox="0 0 24 24" aria-hidden="true" className={className}>
27
+ <rect width="24" height="24" rx="7" className="fill-foreground" />
28
+ <circle cx="12" cy="12" r="2.6" className="fill-chart-2" />
29
+ <g className="fill-background">
30
+ <circle cx="16.2" cy="10.4" r="1" />
31
+ <circle cx="9.4" cy="15.8" r="1" />
32
+ <circle cx="8.6" cy="8.9" r="0.9" opacity="0.8" />
33
+ <circle cx="15.1" cy="16.4" r="0.9" opacity="0.8" />
34
+ <circle cx="12.6" cy="6.6" r="0.75" opacity="0.6" />
35
+ <circle cx="17.6" cy="13.9" r="0.75" opacity="0.6" />
36
+ <circle cx="6.5" cy="12.6" r="0.75" opacity="0.6" />
37
+ </g>
38
+ </svg>
39
+ );
40
+ }
41
+
42
+ /** An area's color: an 8px square with 2px corners. */
43
+ export function AreaMark({ color }: { color: string }) {
44
+ return (
45
+ <span
46
+ aria-hidden="true"
47
+ className="size-2 shrink-0 rounded-2xs"
48
+ style={{ backgroundColor: color }}
49
+ />
50
+ );
51
+ }
52
+
53
+ /** The assistant at work: a quarter of a ring, in its color, over the ring's track. */
54
+ export function WorkingArc({ className = "size-2.5" }: { className?: string }) {
55
+ return (
56
+ <svg viewBox="0 0 12 12" aria-hidden="true" className={`shrink-0 ${className}`}>
57
+ <circle
58
+ cx="6"
59
+ cy="6"
60
+ r="4.5"
61
+ fill="none"
62
+ strokeWidth="1.5"
63
+ className="stroke-foreground/12"
64
+ />
65
+ <path
66
+ d="M6 1.5a4.5 4.5 0 0 1 4.5 4.5"
67
+ fill="none"
68
+ strokeWidth="1.5"
69
+ strokeLinecap="round"
70
+ className="stroke-assistant"
71
+ />
72
+ </svg>
73
+ );
74
+ }
75
+
76
+ /**
77
+ * A room's status in its 16px slot, on the line of its title: an orange dot
78
+ * while it waits for the person, the arc while the assistant works, an ink
79
+ * dot for news, and nothing when it's quiet.
80
+ */
81
+ export function RoomStatusMark({ status }: { status: ShellRoomStatus }) {
82
+ return (
83
+ <span aria-hidden="true" className="flex w-4 shrink-0 justify-center">
84
+ {status === "waiting" && <span className="mt-1.5 size-1.75 rounded-full bg-chart-3" />}
85
+ {status === "working" && <WorkingArc className="mt-1.25 size-2.5" />}
86
+ {status === "news" && <span className="mt-1.5 size-1.75 rounded-full bg-foreground" />}
87
+ </span>
88
+ );
89
+ }
90
+
91
+ export function initialsOf(person: ShellPerson): string {
92
+ if (person.initials) return person.initials;
93
+ const words = person.name.trim().split(/\s+/);
94
+ const letters = words.length > 1 ? [words[0]!, words.at(-1)!] : words;
95
+ return letters.map((word) => word[0]!.toUpperCase()).join("");
96
+ }
97
+
98
+ /**
99
+ * Someone's face with no photo: their initials on their tint, 16px in a row's
100
+ * line (Alma's), 22px in the top bar. An agent is a small square in mono.
101
+ */
102
+ export function Face({
103
+ person,
104
+ size = "sm",
105
+ className = "",
106
+ }: {
107
+ person: ShellPerson;
108
+ size?: "sm" | "md";
109
+ className?: string;
110
+ }) {
111
+ const box = size === "sm" ? "size-4" : "size-5.5";
112
+ if (person.agent) {
113
+ return (
114
+ <span
115
+ aria-hidden="true"
116
+ className={`grid shrink-0 place-items-center rounded-xs border border-input bg-background font-mono text-micro font-normal text-foreground ${box} ${className}`}
117
+ >
118
+ {initialsOf(person)}
119
+ </span>
120
+ );
121
+ }
122
+ return (
123
+ <span
124
+ aria-hidden="true"
125
+ className={`grid shrink-0 place-items-center rounded-full text-micro ${box} ${className}`}
126
+ style={tint(person.color)}
127
+ >
128
+ {initialsOf(person)}
129
+ </span>
130
+ );
131
+ }
132
+
133
+ /** Text with the parts between `**` in medium weight: a room's name in a sentence. */
134
+ export function Strong({ text }: { text: string }): ReactNode {
135
+ return text.split("**").map((part, index) =>
136
+ index % 2 ? (
137
+ <strong key={index} className="font-medium">
138
+ {part}
139
+ </strong>
140
+ ) : (
141
+ part
142
+ ),
143
+ );
144
+ }