@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,25 @@
1
+ import { VariantProps } from "../../utilities/cn/index.js";
2
+ import { ComponentProps } from "react";
3
+ import { Tabs as Tabs$1, TabsController, TabsIndicator as TabsIndicator$1, TabsList as TabsList$1, TabsOrientation, TabsPanel as TabsPanel$1, TabsTab as TabsTab$1, TabsTabIcon as TabsTabIcon$1, createTabsController } from "@ui-sdk/react/tabs";
4
+ type TabsProps<T extends string = string> = Parameters<typeof Tabs$1<T>>[0];
5
+ declare function Tabs<T extends string = string>({ className, ...props }: TabsProps<T>): import("react").JSX.Element;
6
+ declare const tabsListVariants: (props?: ({
7
+ variant?: "default" | "line" | "pill" | null | undefined;
8
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
9
+ type TabsListProps = ComponentProps<typeof TabsList$1> & VariantProps<typeof tabsListVariants>;
10
+ /**
11
+ * Name it with `aria-label`. `variant="line"` marks the selected tab with a
12
+ * line instead of a fill, and `variant="pill"` with a soft fill and no track. The fill, or the line, slides to the tab you
13
+ * select: the list draws a `TabsIndicator` when its children have none.
14
+ */
15
+ declare function TabsList({ variant, className, children, ...props }: TabsListProps): import("react").JSX.Element;
16
+ /** A tab with only an icon needs an `aria-label`. */
17
+ declare function TabsTab({ className, ...props }: ComponentProps<typeof TabsTab$1>): import("react").JSX.Element;
18
+ declare function TabsTabIcon({ className, ...props }: ComponentProps<typeof TabsTabIcon$1>): import("react").JSX.Element;
19
+ /**
20
+ * The fill, or the line, that slides to the selected tab. `TabsList` draws
21
+ * one by itself; render your own, last in the list, to give it a `className`.
22
+ */
23
+ declare function TabsIndicator({ className, ref, ...props }: ComponentProps<typeof TabsIndicator$1>): import("react").JSX.Element;
24
+ declare function TabsPanel({ className, ...props }: ComponentProps<typeof TabsPanel$1>): import("react").JSX.Element;
25
+ export { Tabs, type TabsController, TabsIndicator, TabsList, type TabsListProps, type TabsOrientation, TabsPanel, type TabsProps, TabsTab, TabsTabIcon, createTabsController, tabsListVariants };
@@ -0,0 +1,273 @@
1
+ "use client";
2
+ import { markPlaced } from "../../behaviors/selection/indicator.js";
3
+ import "../../behaviors/selection/index.js";
4
+ import { cnState, cva } from "../../utilities/cn/index.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { Children, isValidElement } from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ import { Tabs as Tabs$1, TabsIndicator as TabsIndicator$1, TabsList as TabsList$1, TabsPanel as TabsPanel$1, TabsTab as TabsTab$1, TabsTabIcon as TabsTabIcon$1, createTabsController } from "@ui-sdk/react/tabs";
9
+ // src/components/tabs/tabs.tsx
10
+ function Tabs(t0) {
11
+ const $ = c(8);
12
+ let className;
13
+ let props;
14
+ if ($[0] !== t0) {
15
+ ({className, ...props} = t0);
16
+ $[0] = t0;
17
+ $[1] = className;
18
+ $[2] = props;
19
+ } else {
20
+ className = $[1];
21
+ props = $[2];
22
+ }
23
+ let t1;
24
+ if ($[3] !== className) {
25
+ t1 = cnState("flex gap-2 data-[orientation=horizontal]:flex-col data-[orientation=vertical]:items-start", className);
26
+ $[3] = className;
27
+ $[4] = t1;
28
+ } else t1 = $[4];
29
+ let t2;
30
+ if ($[5] !== props || $[6] !== t1) {
31
+ t2 = /* @__PURE__ */ jsx(Tabs$1, {
32
+ className: t1,
33
+ ...props
34
+ });
35
+ $[5] = props;
36
+ $[6] = t1;
37
+ $[7] = t2;
38
+ } else t2 = $[7];
39
+ return t2;
40
+ }
41
+ const tabsListVariants = cva("group/tabs-list relative isolate inline-flex w-fit max-w-full shrink-0 items-center rounded-full p-1 data-[orientation=horizontal]:min-h-9 data-[orientation=vertical]:flex-col data-[orientation=vertical]:rounded-2xl data-[orientation=vertical]:items-stretch", {
42
+ variants: { variant: {
43
+ default: "bg-muted text-muted-foreground",
44
+ line: "gap-1 rounded-none bg-transparent text-subtle",
45
+ pill: "gap-1 bg-transparent p-0 text-subtle"
46
+ } },
47
+ defaultVariants: { variant: "default" }
48
+ });
49
+ /** Adds a `TabsIndicator` after the tabs, unless they already hold one. */
50
+ function withIndicator(children) {
51
+ return Children.toArray(children).some((child) => isValidElement(child) && child.type === TabsIndicator) ? children : /* @__PURE__ */ jsxs(Fragment$1, { children: [children, /* @__PURE__ */ jsx(TabsIndicator, {})] });
52
+ }
53
+ /**
54
+ * Name it with `aria-label`. `variant="line"` marks the selected tab with a
55
+ * line instead of a fill, and `variant="pill"` with a soft fill and no track. The fill, or the line, slides to the tab you
56
+ * select: the list draws a `TabsIndicator` when its children have none.
57
+ */
58
+ function TabsList(t0) {
59
+ const $ = c(15);
60
+ let children;
61
+ let className;
62
+ let props;
63
+ let variant;
64
+ if ($[0] !== t0) {
65
+ ({variant, className, children, ...props} = t0);
66
+ $[0] = t0;
67
+ $[1] = children;
68
+ $[2] = className;
69
+ $[3] = props;
70
+ $[4] = variant;
71
+ } else {
72
+ children = $[1];
73
+ className = $[2];
74
+ props = $[3];
75
+ variant = $[4];
76
+ }
77
+ const t1 = variant ?? "default";
78
+ let t2;
79
+ if ($[5] !== className || $[6] !== variant) {
80
+ t2 = cnState(tabsListVariants({ variant }), className);
81
+ $[5] = className;
82
+ $[6] = variant;
83
+ $[7] = t2;
84
+ } else t2 = $[7];
85
+ let t3;
86
+ if ($[8] !== children) {
87
+ t3 = typeof children === "function" ? (state) => withIndicator(children(state)) : withIndicator(children);
88
+ $[8] = children;
89
+ $[9] = t3;
90
+ } else t3 = $[9];
91
+ let t4;
92
+ if ($[10] !== props || $[11] !== t1 || $[12] !== t2 || $[13] !== t3) {
93
+ t4 = /* @__PURE__ */ jsx(TabsList$1, {
94
+ "data-variant": t1,
95
+ className: t2,
96
+ ...props,
97
+ children: t3
98
+ });
99
+ $[10] = props;
100
+ $[11] = t1;
101
+ $[12] = t2;
102
+ $[13] = t3;
103
+ $[14] = t4;
104
+ } else t4 = $[14];
105
+ return t4;
106
+ }
107
+ /**
108
+ * The line of the `line` variant, drawn past the edge of the box it marks.
109
+ * The indicator draws it, or the tab until the indicator is placed.
110
+ */
111
+ const lineClasses = "after:absolute after:bg-foreground after:opacity-0 after:transition-opacity data-[orientation=horizontal]:after:inset-x-0 data-[orientation=horizontal]:after:-bottom-[3px] data-[orientation=horizontal]:after:h-0.5 data-[orientation=vertical]:after:inset-y-0 data-[orientation=vertical]:after:-end-[3px] data-[orientation=vertical]:after:w-0.5";
112
+ /** A tab with only an icon needs an `aria-label`. */
113
+ function TabsTab(t0) {
114
+ const $ = c(8);
115
+ let className;
116
+ let props;
117
+ if ($[0] !== t0) {
118
+ ({className, ...props} = t0);
119
+ $[0] = t0;
120
+ $[1] = className;
121
+ $[2] = props;
122
+ } else {
123
+ className = $[1];
124
+ props = $[2];
125
+ }
126
+ let t1;
127
+ if ($[3] !== className) {
128
+ t1 = cnState([
129
+ "relative inline-flex min-h-7 flex-1 items-center justify-center gap-1.5 rounded-full px-3 py-0.5 text-sm font-medium whitespace-nowrap select-none transition-colors hover:text-foreground focus-ring data-disabled:pointer-events-none data-disabled:opacity-50 data-selected:text-foreground data-[orientation=vertical]:justify-start [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4",
130
+ "group-data-[variant=default]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:bg-background group-data-[variant=default]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:shadow-sm group-data-[variant=default]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:ring-1 group-data-[variant=default]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:ring-border",
131
+ lineClasses,
132
+ "group-data-[variant=line]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:after:opacity-100",
133
+ "group-data-[variant=pill]/tabs-list:group-not-has-[[data-slot=tabs-indicator][data-placed]]/tabs-list:data-selected:bg-muted"
134
+ ], className);
135
+ $[3] = className;
136
+ $[4] = t1;
137
+ } else t1 = $[4];
138
+ let t2;
139
+ if ($[5] !== props || $[6] !== t1) {
140
+ t2 = /* @__PURE__ */ jsx(TabsTab$1, {
141
+ className: t1,
142
+ ...props
143
+ });
144
+ $[5] = props;
145
+ $[6] = t1;
146
+ $[7] = t2;
147
+ } else t2 = $[7];
148
+ return t2;
149
+ }
150
+ function TabsTabIcon(t0) {
151
+ const $ = c(8);
152
+ let className;
153
+ let props;
154
+ if ($[0] !== t0) {
155
+ ({className, ...props} = t0);
156
+ $[0] = t0;
157
+ $[1] = className;
158
+ $[2] = props;
159
+ } else {
160
+ className = $[1];
161
+ props = $[2];
162
+ }
163
+ let t1;
164
+ if ($[3] !== className) {
165
+ t1 = cnState("flex shrink-0 items-center justify-center", className);
166
+ $[3] = className;
167
+ $[4] = t1;
168
+ } else t1 = $[4];
169
+ let t2;
170
+ if ($[5] !== props || $[6] !== t1) {
171
+ t2 = /* @__PURE__ */ jsx(TabsTabIcon$1, {
172
+ className: t1,
173
+ ...props
174
+ });
175
+ $[5] = props;
176
+ $[6] = t1;
177
+ $[7] = t2;
178
+ } else t2 = $[7];
179
+ return t2;
180
+ }
181
+ /**
182
+ * The fill, or the line, that slides to the selected tab. `TabsList` draws
183
+ * one by itself; render your own, last in the list, to give it a `className`.
184
+ */
185
+ function TabsIndicator(t0) {
186
+ const $ = c(12);
187
+ let className;
188
+ let props;
189
+ let ref;
190
+ if ($[0] !== t0) {
191
+ ({className, ref, ...props} = t0);
192
+ $[0] = t0;
193
+ $[1] = className;
194
+ $[2] = props;
195
+ $[3] = ref;
196
+ } else {
197
+ className = $[1];
198
+ props = $[2];
199
+ ref = $[3];
200
+ }
201
+ let t1;
202
+ if ($[4] !== ref) {
203
+ t1 = (element) => {
204
+ if (typeof ref === "function") ref(element);
205
+ else if (ref) ref.current = element;
206
+ return element ? markPlaced(element) : void 0;
207
+ };
208
+ $[4] = ref;
209
+ $[5] = t1;
210
+ } else t1 = $[5];
211
+ let t2;
212
+ if ($[6] !== className) {
213
+ t2 = cnState([
214
+ "pointer-events-none absolute top-0 left-0 -z-1 h-(--active-tab-height) w-(--active-tab-width) translate-x-(--active-tab-left) translate-y-(--active-tab-top) rounded-full motion-safe:data-placed:transition-[translate,width,height] motion-safe:data-placed:duration-popup motion-safe:data-placed:ease-in-out",
215
+ "group-data-[variant=default]/tabs-list:bg-background group-data-[variant=default]/tabs-list:shadow-sm group-data-[variant=default]/tabs-list:ring-1 group-data-[variant=default]/tabs-list:ring-border",
216
+ lineClasses,
217
+ "group-data-[variant=line]/tabs-list:after:opacity-100",
218
+ "group-data-[variant=pill]/tabs-list:bg-muted"
219
+ ], className);
220
+ $[6] = className;
221
+ $[7] = t2;
222
+ } else t2 = $[7];
223
+ let t3;
224
+ if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
225
+ t3 = /* @__PURE__ */ jsx(TabsIndicator$1, {
226
+ ref: t1,
227
+ className: t2,
228
+ ...props
229
+ });
230
+ $[8] = props;
231
+ $[9] = t1;
232
+ $[10] = t2;
233
+ $[11] = t3;
234
+ } else t3 = $[11];
235
+ return t3;
236
+ }
237
+ function TabsPanel(t0) {
238
+ const $ = c(8);
239
+ let className;
240
+ let props;
241
+ if ($[0] !== t0) {
242
+ ({className, ...props} = t0);
243
+ $[0] = t0;
244
+ $[1] = className;
245
+ $[2] = props;
246
+ } else {
247
+ className = $[1];
248
+ props = $[2];
249
+ }
250
+ let t1;
251
+ if ($[3] !== className) {
252
+ t1 = cnState([
253
+ "min-w-0 flex-1 rounded-sm text-sm focus-ring",
254
+ "motion-safe:not-inert:not-data-[activation-direction=none]:transition-[opacity,translate] motion-safe:not-inert:not-data-[activation-direction=none]:duration-popup motion-safe:not-inert:not-data-[activation-direction=none]:ease-out",
255
+ "inert:transition-none",
256
+ "motion-safe:not-data-[activation-direction=none]:data-starting-style:opacity-0 motion-safe:data-[activation-direction=right]:data-starting-style:translate-x-2 motion-safe:data-[activation-direction=left]:data-starting-style:-translate-x-2 motion-safe:data-[activation-direction=down]:data-starting-style:translate-y-2 motion-safe:data-[activation-direction=up]:data-starting-style:-translate-y-2"
257
+ ], className);
258
+ $[3] = className;
259
+ $[4] = t1;
260
+ } else t1 = $[4];
261
+ let t2;
262
+ if ($[5] !== props || $[6] !== t1) {
263
+ t2 = /* @__PURE__ */ jsx(TabsPanel$1, {
264
+ className: t1,
265
+ ...props
266
+ });
267
+ $[5] = props;
268
+ $[6] = t1;
269
+ $[7] = t2;
270
+ } else t2 = $[7];
271
+ return t2;
272
+ }
273
+ export { Tabs, TabsIndicator, TabsList, TabsPanel, TabsTab, TabsTabIcon, createTabsController, tabsListVariants };
@@ -0,0 +1,40 @@
1
+ import { TraceCollapsibleContent, TraceCollapsibleProps, TraceCollapsibleTrigger, TraceLineProps } from "../trace/trace.js";
2
+ import { ComponentProps, ReactNode } from "react";
3
+ /** `running` while the agent works on it, `error` when a step failed, nothing once it is done. */
4
+ type TaskStatus = "running" | "error";
5
+ type TaskProps = Omit<TraceCollapsibleProps, "className" | "children"> & {
6
+ /** The task is open while it is `running` and closes when it is done. `error` turns its line destructive. */
7
+ status?: TaskStatus;
8
+ className?: string;
9
+ children?: ReactNode;
10
+ };
11
+ /**
12
+ * One task: a `TaskTrigger` and a `TaskContent`. It is open while its `status`
13
+ * is `running` and closes after, until the person opens or closes it; from then
14
+ * on their choice stays. It takes Collapsible's props.
15
+ */
16
+ declare function Task({ status, open, defaultOpen, onOpenChange, className, children, ...props }: TaskProps): import("react").JSX.Element;
17
+ type TaskTriggerProps = ComponentProps<typeof TraceCollapsibleTrigger> & {
18
+ /** What the task is, in the present tense while it runs and in the past tense after. */
19
+ title?: ReactNode;
20
+ };
21
+ /**
22
+ * The task's line: an icon for its status and its `title`, announced while it
23
+ * runs. Children replace the icon and the title, inside the `TraceLine`.
24
+ */
25
+ declare function TaskTrigger({ title, children, ...props }: TaskTriggerProps): import("react").JSX.Element;
26
+ type TaskContentProps = ComponentProps<typeof TraceCollapsibleContent>;
27
+ /**
28
+ * The steps, as `TaskItem`s. They stay mounted while the task is closed, so a
29
+ * step that streams in doesn't replay its entrance when the task opens.
30
+ */
31
+ declare function TaskContent({ children, ...props }: TaskContentProps): import("react").JSX.Element;
32
+ type TaskItemProps = TraceLineProps & {
33
+ /** Drawn before the text, like a search or a file icon. */
34
+ icon?: ReactNode;
35
+ };
36
+ /** One step the agent took. Wrap it in a link to point at what it read. */
37
+ declare function TaskItem({ icon, children, ...props }: TaskItemProps): import("react").JSX.Element;
38
+ /** A file's name inside a `TaskItem`, as a small chip. */
39
+ declare function TaskItemFile({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
40
+ export { Task, TaskContent, type TaskContentProps, TaskItem, TaskItemFile, type TaskItemProps, type TaskProps, type TaskStatus, TaskTrigger, type TaskTriggerProps };
@@ -0,0 +1,262 @@
1
+ "use client";
2
+ import { cn } from "../../utilities/cn/index.js";
3
+ import { Icon } from "../icon/icon.js";
4
+ import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceIcon, TraceLine, TraceTitle } from "../trace/trace.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { createContext, useContext, useState } from "react";
7
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
8
+ import { AlertCircleIcon, CheckmarkCircle02Icon, Loading03Icon } from "@hugeicons/core-free-icons";
9
+ // src/components/task/task.tsx
10
+ const TaskContext = createContext(void 0);
11
+ /**
12
+ * One task: a `TaskTrigger` and a `TaskContent`. It is open while its `status`
13
+ * is `running` and closes after, until the person opens or closes it; from then
14
+ * on their choice stays. It takes Collapsible's props.
15
+ */
16
+ function Task(t0) {
17
+ const $ = c(21);
18
+ let children;
19
+ let className;
20
+ let defaultOpen;
21
+ let onOpenChange;
22
+ let open;
23
+ let props;
24
+ let status;
25
+ if ($[0] !== t0) {
26
+ ({status, open, defaultOpen, onOpenChange, className, children, ...props} = t0);
27
+ $[0] = t0;
28
+ $[1] = children;
29
+ $[2] = className;
30
+ $[3] = defaultOpen;
31
+ $[4] = onOpenChange;
32
+ $[5] = open;
33
+ $[6] = props;
34
+ $[7] = status;
35
+ } else {
36
+ children = $[1];
37
+ className = $[2];
38
+ defaultOpen = $[3];
39
+ onOpenChange = $[4];
40
+ open = $[5];
41
+ props = $[6];
42
+ status = $[7];
43
+ }
44
+ const [choice, setChoice] = useState(defaultOpen);
45
+ const t1 = open ?? choice ?? status === "running";
46
+ let t2;
47
+ if ($[8] !== onOpenChange) {
48
+ t2 = (next, details) => {
49
+ onOpenChange?.(next, details);
50
+ if (!details.canceled) setChoice(next);
51
+ };
52
+ $[8] = onOpenChange;
53
+ $[9] = t2;
54
+ } else t2 = $[9];
55
+ let t3;
56
+ if ($[10] !== children || $[11] !== props || $[12] !== t1 || $[13] !== t2) {
57
+ t3 = /* @__PURE__ */ jsx(TraceCollapsible, {
58
+ open: t1,
59
+ onOpenChange: t2,
60
+ ...props,
61
+ children
62
+ });
63
+ $[10] = children;
64
+ $[11] = props;
65
+ $[12] = t1;
66
+ $[13] = t2;
67
+ $[14] = t3;
68
+ } else t3 = $[14];
69
+ let t4;
70
+ if ($[15] !== className || $[16] !== t3) {
71
+ t4 = /* @__PURE__ */ jsx(Trace, {
72
+ "data-slot": "task",
73
+ className,
74
+ children: t3
75
+ });
76
+ $[15] = className;
77
+ $[16] = t3;
78
+ $[17] = t4;
79
+ } else t4 = $[17];
80
+ let t5;
81
+ if ($[18] !== status || $[19] !== t4) {
82
+ t5 = /* @__PURE__ */ jsx(TaskContext.Provider, {
83
+ value: status,
84
+ children: t4
85
+ });
86
+ $[18] = status;
87
+ $[19] = t4;
88
+ $[20] = t5;
89
+ } else t5 = $[20];
90
+ return t5;
91
+ }
92
+ /**
93
+ * The task's line: an icon for its status and its `title`, announced while it
94
+ * runs. Children replace the icon and the title, inside the `TraceLine`.
95
+ */
96
+ function TaskTrigger(t0) {
97
+ const $ = c(14);
98
+ let children;
99
+ let props;
100
+ let title;
101
+ if ($[0] !== t0) {
102
+ ({title, children, ...props} = t0);
103
+ $[0] = t0;
104
+ $[1] = children;
105
+ $[2] = props;
106
+ $[3] = title;
107
+ } else {
108
+ children = $[1];
109
+ props = $[2];
110
+ title = $[3];
111
+ }
112
+ const status = useContext(TaskContext);
113
+ let t1;
114
+ if ($[4] !== children || $[5] !== status || $[6] !== title) {
115
+ t1 = children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(TraceIcon, { children: status === "running" ? /* @__PURE__ */ jsx(Icon, {
116
+ icon: Loading03Icon,
117
+ className: "animate-spin motion-reduce:animate-none"
118
+ }) : /* @__PURE__ */ jsx(Icon, { icon: status === "error" ? AlertCircleIcon : CheckmarkCircle02Icon }) }), /* @__PURE__ */ jsx(TraceTitle, {
119
+ role: status === "running" ? "status" : void 0,
120
+ children: title
121
+ })] });
122
+ $[4] = children;
123
+ $[5] = status;
124
+ $[6] = title;
125
+ $[7] = t1;
126
+ } else t1 = $[7];
127
+ let t2;
128
+ if ($[8] !== status || $[9] !== t1) {
129
+ t2 = /* @__PURE__ */ jsx(TraceLine, {
130
+ status,
131
+ children: t1
132
+ });
133
+ $[8] = status;
134
+ $[9] = t1;
135
+ $[10] = t2;
136
+ } else t2 = $[10];
137
+ let t3;
138
+ if ($[11] !== props || $[12] !== t2) {
139
+ t3 = /* @__PURE__ */ jsx(TraceCollapsibleTrigger, {
140
+ "data-slot": "task-trigger",
141
+ ...props,
142
+ children: t2
143
+ });
144
+ $[11] = props;
145
+ $[12] = t2;
146
+ $[13] = t3;
147
+ } else t3 = $[13];
148
+ return t3;
149
+ }
150
+ /**
151
+ * The steps, as `TaskItem`s. They stay mounted while the task is closed, so a
152
+ * step that streams in doesn't replay its entrance when the task opens.
153
+ */
154
+ function TaskContent(t0) {
155
+ const $ = c(8);
156
+ let children;
157
+ let props;
158
+ if ($[0] !== t0) {
159
+ ({children, ...props} = t0);
160
+ $[0] = t0;
161
+ $[1] = children;
162
+ $[2] = props;
163
+ } else {
164
+ children = $[1];
165
+ props = $[2];
166
+ }
167
+ let t1;
168
+ if ($[3] !== children) {
169
+ t1 = /* @__PURE__ */ jsx(Trace, { children });
170
+ $[3] = children;
171
+ $[4] = t1;
172
+ } else t1 = $[4];
173
+ let t2;
174
+ if ($[5] !== props || $[6] !== t1) {
175
+ t2 = /* @__PURE__ */ jsx(TraceCollapsibleContent, {
176
+ "data-slot": "task-content",
177
+ keepMounted: true,
178
+ ...props,
179
+ children: t1
180
+ });
181
+ $[5] = props;
182
+ $[6] = t1;
183
+ $[7] = t2;
184
+ } else t2 = $[7];
185
+ return t2;
186
+ }
187
+ /** One step the agent took. Wrap it in a link to point at what it read. */
188
+ function TaskItem(t0) {
189
+ const $ = c(12);
190
+ let children;
191
+ let icon;
192
+ let props;
193
+ if ($[0] !== t0) {
194
+ ({icon, children, ...props} = t0);
195
+ $[0] = t0;
196
+ $[1] = children;
197
+ $[2] = icon;
198
+ $[3] = props;
199
+ } else {
200
+ children = $[1];
201
+ icon = $[2];
202
+ props = $[3];
203
+ }
204
+ let t1;
205
+ if ($[4] !== icon) {
206
+ t1 = icon && /* @__PURE__ */ jsx(TraceIcon, { children: icon });
207
+ $[4] = icon;
208
+ $[5] = t1;
209
+ } else t1 = $[5];
210
+ let t2;
211
+ if ($[6] !== children) {
212
+ t2 = /* @__PURE__ */ jsx(TraceTitle, { children });
213
+ $[6] = children;
214
+ $[7] = t2;
215
+ } else t2 = $[7];
216
+ let t3;
217
+ if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
218
+ t3 = /* @__PURE__ */ jsxs(TraceLine, {
219
+ ...props,
220
+ children: [t1, t2]
221
+ });
222
+ $[8] = props;
223
+ $[9] = t1;
224
+ $[10] = t2;
225
+ $[11] = t3;
226
+ } else t3 = $[11];
227
+ return t3;
228
+ }
229
+ /** A file's name inside a `TaskItem`, as a small chip. */
230
+ function TaskItemFile(t0) {
231
+ const $ = c(8);
232
+ let className;
233
+ let props;
234
+ if ($[0] !== t0) {
235
+ ({className, ...props} = t0);
236
+ $[0] = t0;
237
+ $[1] = className;
238
+ $[2] = props;
239
+ } else {
240
+ className = $[1];
241
+ props = $[2];
242
+ }
243
+ let t1;
244
+ if ($[3] !== className) {
245
+ t1 = cn("inline-flex items-center gap-1 rounded-md border bg-secondary px-1.5 align-middle text-xs text-secondary-foreground [&_svg:not([class*='size-'])]:size-3", className);
246
+ $[3] = className;
247
+ $[4] = t1;
248
+ } else t1 = $[4];
249
+ let t2;
250
+ if ($[5] !== props || $[6] !== t1) {
251
+ t2 = /* @__PURE__ */ jsx("span", {
252
+ "data-slot": "task-item-file",
253
+ className: t1,
254
+ ...props
255
+ });
256
+ $[5] = props;
257
+ $[6] = t1;
258
+ $[7] = t2;
259
+ } else t2 = $[7];
260
+ return t2;
261
+ }
262
+ export { Task, TaskContent, TaskItem, TaskItemFile, TaskTrigger };
@@ -0,0 +1,82 @@
1
+ import { ButtonProps } from "../button/button.js";
2
+ import { CodeBlockCopyButtonProps } from "../code-block/code-block.js";
3
+ import { TraceCollapsibleContent, TraceCollapsibleProps, TraceCollapsibleTrigger, TraceLineProps } from "../trace/trace.js";
4
+ import { ComponentProps, ReactNode } from "react";
5
+ type TerminalContextValue = {
6
+ /** What the command printed so far, ANSI escape codes included. */
7
+ output: string;
8
+ /** Whether the command is still running. */
9
+ isStreaming: boolean;
10
+ autoScroll: boolean;
11
+ onClear: (() => void) | undefined;
12
+ /** Whether there is output to open. */
13
+ collapsible: boolean;
14
+ };
15
+ /** What `Terminal` shares with its parts. Call it inside a `Terminal`. */
16
+ declare function useTerminal(): TerminalContextValue;
17
+ type TerminalProps = Omit<TraceCollapsibleProps, "className" | "children"> & {
18
+ /** What the command printed so far. ANSI colors are rendered. */
19
+ output: string;
20
+ /** Whether the command is still running. The line is open while it is, once it has output. */
21
+ isStreaming?: boolean;
22
+ /** Keep the end of the output in view as it grows. */
23
+ autoScroll?: boolean;
24
+ /** Called by `TerminalClearButton`, which shows only when this is set. */
25
+ onClear?: () => void;
26
+ className?: string;
27
+ children?: ReactNode;
28
+ };
29
+ /**
30
+ * One command: a `TerminalHeader` and a `TerminalContent`. Until the command
31
+ * prints something the line is plain text; then it is a button, open while
32
+ * `isStreaming` and closed when it ends, until the person opens or closes it.
33
+ * It takes Collapsible's props.
34
+ */
35
+ declare function Terminal({ output, isStreaming, autoScroll, onClear, open, defaultOpen, onOpenChange, className, children, ...props }: TerminalProps): import("react").JSX.Element;
36
+ /** The row with the line and, next to it, what can't sit inside a button: the status and the actions. */
37
+ declare function TerminalHeader({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
38
+ type TerminalTitleProps = Omit<ComponentProps<typeof TraceCollapsibleTrigger>, "children"> & {
39
+ /** Replaces the terminal icon. */
40
+ icon?: ReactNode;
41
+ /** The line's status. By default `running` while the command runs; pass `error` for a failed one. */
42
+ status?: TraceLineProps["status"];
43
+ /** The title, like "Ran pnpm build". */
44
+ children?: ReactNode;
45
+ };
46
+ /**
47
+ * The line: an icon and a title that says what ran. It opens the output once
48
+ * there is some. While the command runs the title is a live region, so it is
49
+ * announced once; the output is not, or a log would be read line by line.
50
+ */
51
+ declare function TerminalTitle({ icon, status, children, ...props }: TerminalTitleProps): import("react").JSX.Element;
52
+ /** A note next to the line that shows only while the command runs. */
53
+ declare function TerminalStatus({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element | null;
54
+ /** The buttons next to the line. */
55
+ declare function TerminalActions({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
56
+ type TerminalCopyButtonProps = Omit<CodeBlockCopyButtonProps, "value">;
57
+ /**
58
+ * Copies the output, without its ANSI codes. Its name is `aria-label`, "Copy"
59
+ * by default: with several terminals on a page, name the command in it.
60
+ */
61
+ declare function TerminalCopyButton(props: TerminalCopyButtonProps): import("react").JSX.Element;
62
+ /**
63
+ * Calls the terminal's `onClear`, and draws nothing without it. Its name is
64
+ * `aria-label`, "Clear" by default.
65
+ */
66
+ declare function TerminalClearButton({ variant, size, className, onClick, children, "aria-label": label, ...props }: ButtonProps): import("react").JSX.Element | null;
67
+ type TerminalContentProps = Omit<ComponentProps<typeof TraceCollapsibleContent>, "className"> & {
68
+ /**
69
+ * The name of the output block, "Output" by default. The block is a tab
70
+ * stop so the keyboard can scroll it: with several terminals on a page,
71
+ * name the command in it.
72
+ */
73
+ label?: string;
74
+ /** Goes on the block that scrolls, which is 16rem tall at most. */
75
+ className?: string;
76
+ };
77
+ /**
78
+ * The output in a Code Block, under the line, with its ANSI colors. It draws
79
+ * nothing until there is output. Children replace the output's lines.
80
+ */
81
+ declare function TerminalContent({ label, className, children, ...props }: TerminalContentProps): import("react").JSX.Element | null;
82
+ export { Terminal, TerminalActions, TerminalClearButton, TerminalContent, type TerminalContentProps, type TerminalContextValue, TerminalCopyButton, type TerminalCopyButtonProps, TerminalHeader, type TerminalProps, TerminalStatus, TerminalTitle, type TerminalTitleProps, useTerminal };