@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,262 @@
1
+ ---
2
+ name: blocks
3
+ description: "Use when copying one of abby's blocks (a whole screen, like Notes
4
+ or Shell) into an app and adapting it: which folder to copy, the imports and
5
+ tsconfig it needs, the adapter to connect to the app's API, the texts to
6
+ translate, and which of the design's choices to keep or change."
7
+ metadata:
8
+ purpose: Shows how to copy a block's source out of the abby package, mount it
9
+ with the memory adapter, connect its adapter to the app's API, translate it,
10
+ and change what belongs to the design it came from without breaking what an
11
+ agent reads.
12
+ type: lifecycle
13
+ library: abby
14
+ library_version: 0.1.1
15
+ sources:
16
+ - src/blocks/notes/notes-block.tsx
17
+ - src/blocks/notes/adapters.ts
18
+ - src/blocks/notes/data.ts
19
+ - src/blocks/notes/texts.ts
20
+ - src/blocks/notes/parts/*.tsx
21
+ - src/blocks/notes/parts/place.ts
22
+ - src/blocks/shell/shell-block.tsx
23
+ - src/blocks/shell/adapters.ts
24
+ - src/blocks/shell/data.ts
25
+ - src/blocks/shell/texts.ts
26
+ - src/blocks/shell/parts/*.tsx
27
+ - scripts/check-blocks.ts
28
+ requires:
29
+ - compose-screens
30
+ - note-editor
31
+ - note-status
32
+ ---
33
+
34
+ # Copy an abby block into an app
35
+
36
+ Read compose-screens first; a block is built the way it says. Read note-editor and note-status before changing the Notes block's editor or its tree.
37
+
38
+ A block is a whole screen made of abby's components, like shadcn's blocks. It is not imported: the app copies its folder and owns the code from then on. abby ships each block as source in the package, with no export:
39
+
40
+ | Block | Folder in the package | What it is |
41
+ | ----- | ------------------------------------ | ---------------------------------------------------------------------------------------------------------------------------- |
42
+ | Notes | `node_modules/abby/src/blocks/notes` | A team's notes: a tree by area, a home page, the editor with others in it, the assistant, history, review and Memory |
43
+ | Shell | `node_modules/abby/src/blocks/shell` | A team app's window: a rail of views and a column of rooms in one sidebar, ⌘N to write anywhere, and a home page beside them |
44
+
45
+ A block imports only abby's public entries (`abby/button`, `abby/note-editor`, `abby/utilities/platform`), never `@ui-sdk/*` or abby's internals, so the copy works in an app as it is.
46
+
47
+ ## Setup
48
+
49
+ 1. Install abby and import `abby/styles.css` (see the setup skill).
50
+ 2. Copy the block's folder into the app's source:
51
+
52
+ ```sh
53
+ cp -R node_modules/abby/src/blocks/notes src/blocks/notes
54
+ ```
55
+
56
+ 3. Let TypeScript accept the block's relative imports, which keep their extension (`./data.ts`). With a bundler (Vite, Next.js), add to `tsconfig.json`:
57
+
58
+ ```json
59
+ { "compilerOptions": { "allowImportingTsExtensions": true, "noEmit": true } }
60
+ ```
61
+
62
+ If the app's build can't take that, drop the extensions from the block's relative imports instead.
63
+
64
+ 4. Mount it with the memory adapter first, to see every screen work before connecting anything:
65
+
66
+ ```tsx no-check
67
+ "use client";
68
+
69
+ import { NotesBlock } from "./blocks/notes/notes-block.tsx";
70
+ import { createMemoryAdapter } from "./blocks/notes/adapters.ts";
71
+ import { workspace } from "./blocks/notes/data.ts";
72
+
73
+ const adapter = createMemoryAdapter(workspace);
74
+
75
+ export function NotesPage() {
76
+ return <NotesBlock workspace={workspace} adapter={adapter} />;
77
+ }
78
+ ```
79
+
80
+ The folder sits in the app's source, so Tailwind finds its classes with no `@source` line. Its stories aren't in the package; Storybook's Blocks/Notes/Screens shows each screen and Blocks/Notes/Guide explains it in Spanish.
81
+
82
+ ## Core Patterns
83
+
84
+ ### Know the files
85
+
86
+ | File | What it holds |
87
+ | ------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------ |
88
+ | `notes-block.tsx` | `NotesBlock`: what's on screen (the open note, the panel, focus mode, a version) and the adapter calls |
89
+ | `adapters.ts` | `NotesAdapter`, what the app connects, and `createMemoryAdapter`, which keeps nothing |
90
+ | `data.ts` | The types (`NotesWorkspace`, `NotesNote`, `NoteAccess`…), the example workspace, the templates |
91
+ | `texts.ts` | `notesTexts`: every text the block shows, by key |
92
+ | `parts/notes-sidebar.tsx` | The tree by area, "To review" above it and "In Memory" below |
93
+ | `parts/home.tsx` | Home: the title that starts a note, what waits for review, what changed lately |
94
+ | `parts/note-screen.tsx` | A note: its header, the editor, the bars (offline, save failed, in Memory) and the side column |
95
+ | `parts/panels.tsx` | The assistant, history and Memory panels |
96
+ | `parts/share.tsx`, `parts/review-dialog.tsx`, `parts/no-access.tsx` | Sharing, asking for a review, and a note the person can't open |
97
+
98
+ ### Connect the adapter
99
+
100
+ The block knows nothing about a server. It keeps what's on screen and calls the adapter for everything that leaves it. Each method returns a promise; a rejected one shows its error in place (the save bar with "Retry saving", a line in the review dialog) and the edit stays.
101
+
102
+ ```tsx no-check
103
+ import type { NotesAdapter } from "./blocks/notes/adapters.ts";
104
+
105
+ export const adapter: NotesAdapter = {
106
+ createNote: (input) => api.post("/notes", input),
107
+ saveBlocks: (id, blocks) => api.put(`/notes/${id}/blocks`, blocks),
108
+ saveTitle: (id, title) => api.patch(`/notes/${id}`, { title }),
109
+ setStatus: (id, status) => api.patch(`/notes/${id}`, { status }),
110
+ setPlace: (id, place) => api.patch(`/notes/${id}`, { place }),
111
+ requestReview: (id, input) => api.post(`/notes/${id}/review`, input),
112
+ restoreVersion: (id, version) => api.post(`/notes/${id}/versions/${version}/restore`),
113
+ requestAccess: (id, message) => api.post(`/notes/${id}/access`, { message }),
114
+ ask: (id, question) => api.post(`/notes/${id}/ask`, { question }),
115
+ };
116
+ ```
117
+
118
+ - `createNote` resolves with the note to open; the block shows it until `workspace.notes` lists it.
119
+ - `saveBlocks` gets each block with the id the editor gave it. Store the ids: cursors, comments and suggestions find their place by them.
120
+ - `restoreVersion` resolves with the blocks the note has now; the block shows them and leaves the version.
121
+ - `requestReview` is the app's to carry out: move the note to In review and tell the reviewers. The block moves it on screen once the promise resolves.
122
+
123
+ ### Feed it the app's data
124
+
125
+ `workspace` is the app's: `me`, `people`, `areas` (as `NotePlaceSelect` takes them), `notes` and `today`. The block reads it on every render, so new data shows as it arrives: pass `loading` while the tree loads, then the loaded workspace.
126
+
127
+ ```tsx no-check
128
+ const { data, isLoading } = useNotes();
129
+ const online = useOnline();
130
+
131
+ <NotesBlock
132
+ workspace={data ?? emptyWorkspace}
133
+ adapter={adapter}
134
+ loading={isLoading}
135
+ offline={!online}
136
+ href={(id) => `/notes/${id}`}
137
+ />;
138
+ ```
139
+
140
+ Real-time sync stays with the app, as in the note-editor skill: put others' `presence`, `comments` and `suggestions` on each note in `workspace.notes` and the block draws them. What the person changes in the block (the blocks, the title, the status, the access, comments, suggestions) shows over the app's note, field by field, until the app sends a new value for that field: its save echoed back, or someone else's edit. Keep each field's value the same object while it doesn't change; a new array on every render, for a field the person changed, puts the app's copy back at once.
141
+
142
+ `initial` sets what shows first (`{ note: "roadmap", panel: "assistant" }`), for a deep link or a test.
143
+
144
+ ### Translate the texts
145
+
146
+ Every text is a key in `texts.ts`, in English. Pass the ones that change; a text with a value is a function of it.
147
+
148
+ ```tsx no-check
149
+ <NotesBlock
150
+ workspace={workspace}
151
+ adapter={adapter}
152
+ texts={{
153
+ notes: "Notas",
154
+ newNote: "Nueva nota",
155
+ requestReview: "Pedir revisión",
156
+ sendReview: "Enviar a revisión",
157
+ writing: (names) => `${names.join(" y ")} escribiendo`,
158
+ }}
159
+ />
160
+ ```
161
+
162
+ The texts that name controls are also what an agent finds them by ("Status", "Request review", "Close panel"). After translating, run `checkAgent(agent)` on the screen: two controls can't share a name, and neither may hold the other's whole words.
163
+
164
+ ### Change what belongs to the design
165
+
166
+ The Notes block follows Alma's Notas page. These parts are Alma's way of working; change or remove them in the copy:
167
+
168
+ - **Memory**: a done note is "In Memory", read-only, with what it saved and where it came from (`MemoryPanel`, `NotesNote.memory`). Without it, drop the done status from the tree's footer and the panel from `note-screen.tsx`.
169
+ - **Review**: asking for a review picks people, sends a message and moves the note to In review (`review-dialog.tsx`).
170
+ - **Access**: a note is private, its area's, or shared, and inherits it from its folder (`share.tsx`). A note with `locked` shows `NoAccess` and stays out of the tree.
171
+ - **The assistant**: related notes, a conflict and a chat (`AssistantPanel`, `NotesNote.assistant`). It doesn't read a private note.
172
+ - **The icon rail** to the left of Alma's tree isn't in the Notes block: it's the app's navigation, and the Shell block draws it.
173
+
174
+ Keep each change inside the copy. The block's look comes from abby's components and tokens, so a theme change belongs in the app's theme (see the theming skill), not in the block's classes.
175
+
176
+ ### Copy the Shell block for an app's window
177
+
178
+ Shell is the window around a team app's pages, Alma's: a 52px rail of views and a 288px column of rooms share one `Sidebar variant="inset" collapsible="icon"`, with the page as a card beside them. Collapsed, only the rail stays and the column peeks out on hover. Its files follow the same plan:
179
+
180
+ | File | What it holds |
181
+ | ------------------------ | ------------------------------------------------------------------------------------------------------------ |
182
+ | `shell-block.tsx` | `ShellBlock`: the sidebar, the page's top bar, and home unless `children` gives another view's page |
183
+ | `adapters.ts` | `ShellAdapter` (`route`, `send`, `ask`, `markAllRead`, `openSearch`) and `createMemoryAdapter` |
184
+ | `data.ts` | `ShellWorkspace` (team, people, areas, rooms, what waits, the timeline, the night) and two example teams |
185
+ | `parts/rail.tsx` | The team, the views, the tools and the person, each a 36px circle on the rail's axis |
186
+ | `parts/rooms-column.tsx` | The team's name, ⌘N, grouping and "Mine", the rooms by area or by status, the night's card, the first steps |
187
+ | `parts/compose.tsx` | ⌘N: a field like a search box; its choices open under it, ↑/↓ pick, and ↵, ⌘↵ or ⌥↵ sends where `route` says |
188
+ | `parts/home.tsx` | The greeting, the composer that asks the assistant, what waits, what happened, what was learned |
189
+
190
+ ```tsx no-check
191
+ <ShellBlock
192
+ workspace={team}
193
+ adapter={adapter}
194
+ page="notes"
195
+ room={roomId}
196
+ href={(target) => ("room" in target ? `/rooms/${target.room}` : `/${target.page}`)}
197
+ >
198
+ <NotesPage />
199
+ </ShellBlock>
200
+ ```
201
+
202
+ - `route(text)` is called while the person types into ⌘N, once the typing settles. Resolve with the room that exists before a new one, and a `reason`; the block drops an answer for text that changed since.
203
+ - A room's `status` is one state at a time: `waiting` moves it to "For you" and out of its area, `working` draws the assistant's arc, `news` an ink dot, `quiet` nothing. `unread` sets the title's weight.
204
+ - In a desktop window (Electron, Tauri) the operating system draws the window's controls over the title bar: leave `windowControls` out. The block keeps their 80px free and centers its buttons with them. Collapsed, the title bar folds away so the rail starts at the top: hide the controls meanwhile from `onSidebarOpenChange` (Electron's `win.setWindowButtonVisibility(open)`).
205
+ - Its texts are the design's Spanish; pass `texts` to translate them, as with Notes.
206
+
207
+ ### Use the shortcuts
208
+
209
+ | Shortcut | What it does |
210
+ | ---------------------- | ---------------------------------------------- |
211
+ | `⌘⇧N` / `Ctrl+Shift+N` | New note: home, with the caret in the title |
212
+ | `↵` | In home's title, creates the note |
213
+ | `⌘↵` | In the review dialog, sends it |
214
+ | `/` and `@` | In the note, insert a block or mention someone |
215
+ | `⌘\` | Focus mode in and out |
216
+ | `⌘B` / `Ctrl+B` | Shell: collapse the sidebar to its rail |
217
+ | `⌘N` / `Ctrl+N` | Shell: write to the assistant or the team |
218
+ | `⌘K` / `Ctrl+K` | Shell: the app's search (`adapter.openSearch`) |
219
+
220
+ A browser keeps `⌘N` for a new window: Shell's works in a desktop app. They go through `useShortcut` and `useShortcutHint` from `abby/utilities/platform`, so the hints show Ctrl off a Mac.
221
+
222
+ ## Common Mistakes
223
+
224
+ ### HIGH: Importing the block from the package
225
+
226
+ ```tsx no-check
227
+ import { NotesBlock } from "abby/src/blocks/notes/notes-block.tsx";
228
+ ```
229
+
230
+ The package doesn't export its blocks, and the folder in `node_modules` changes with every update. Copy the folder into the app and import the copy.
231
+
232
+ ### HIGH: Keeping the memory adapter
233
+
234
+ `createMemoryAdapter` resolves every call and keeps nothing: a reload loses every note. Replace each method with a call to the app's API before shipping.
235
+
236
+ ### HIGH: Swallowing a failed save
237
+
238
+ ```tsx no-check
239
+ saveBlocks: async (id, blocks) => {
240
+ try {
241
+ await api.put(`/notes/${id}/blocks`, blocks);
242
+ } catch {}
243
+ },
244
+ ```
245
+
246
+ The block only shows the save bar when the promise rejects. Let the error through, and the person sees "Retry saving" with the edit kept.
247
+
248
+ ### MEDIUM: Translating two controls into one name
249
+
250
+ "Revisión" for both the header's "Request review" and the dialog's "Send for review" gives an agent two controls with one name, and `act()` refuses it. Keep them apart, as the English texts do.
251
+
252
+ ### MEDIUM: Pulling internals into the copy
253
+
254
+ A change that imports `@ui-sdk/react/*` or a file under abby's `src/` ties the copy to one version of abby. Use the public entries; inside abby's repository, `node scripts/check-blocks.ts` fails on anything else.
255
+
256
+ ## Completion
257
+
258
+ - The copied block renders every screen with the memory adapter: home, a note, focus mode, history, share, review, Memory and a note the person can't open.
259
+ - With the app's adapter, a new note is saved and opens, an edit is saved with its block ids, and a failed save shows the bar and keeps the edit.
260
+ - Translated texts read in the app's language, and `checkAgent(agent)` finds every control with a name of its own.
261
+ - The Shell block shows the app's rooms and pages, ⌘N sends where `route` says, and ⌘B collapses it to the rail.
262
+ - The parts of the design the app doesn't use are removed from the copy, and nothing in it imports outside abby's public entries.
@@ -0,0 +1,354 @@
1
+ ---
2
+ name: compose-screens
3
+ description: "Use when building screens, forms, dialogs, menus or lists from
4
+ abby components: parts and their composition, button looks on trigger parts,
5
+ Icon and Link, sizes, Field for labels and errors, items for lists, controlled
6
+ state, popups without portals. Takes precedence over generic ui-sdk or shadcn
7
+ examples."
8
+ metadata:
9
+ purpose: Shows how abby's styled components compose into screens, where they
10
+ differ from shadcn and from raw ui-sdk, and which choices keep them
11
+ accessible and usable by agents.
12
+ type: core
13
+ library: abby
14
+ library_version: 0.1.1
15
+ requires:
16
+ - setup
17
+ sources:
18
+ - src/components/*/*.tsx
19
+ - README.md
20
+ ---
21
+
22
+ # Compose screens from abby components
23
+
24
+ Read the setup skill first. abby's components are ui-sdk's parts with abby's styles, under shadcn's part and variant names (`DialogContent`, `variant="outline"`). The parts and props of each component are those in ui-sdk's docs for it: `node_modules/@ui-sdk/react/docs/components/<name>.md`. Read the page for the component you use, but import from `abby/<name>`, not `@ui-sdk/react/<name>`.
25
+
26
+ ## Setup
27
+
28
+ A form field is a `Field` with its label, control, description and error. The label names the control for people, screen readers and agents.
29
+
30
+ ```tsx
31
+ import { Field, FieldDescription, FieldError, FieldLabel } from "abby/field";
32
+ import { Input } from "abby/input";
33
+
34
+ export function DisplayName() {
35
+ return (
36
+ <Field name="displayName">
37
+ <FieldLabel>Display name</FieldLabel>
38
+ <Input defaultValue="Ada Lovelace" required />
39
+ <FieldDescription>This is your public name.</FieldDescription>
40
+ <FieldError />
41
+ </Field>
42
+ );
43
+ }
44
+ ```
45
+
46
+ `Field` passes `name`, `invalid`, `disabled` and the description and error ids to its control. Group fields with `FieldGroup`, and radios or checkboxes with `FieldSet` and `FieldLegend`.
47
+
48
+ ## Core Patterns
49
+
50
+ ### Give trigger parts a button look with `variant` and `size`
51
+
52
+ Parts that are buttons (`DialogTrigger`, `DialogClose`, `MenuTrigger`, `PopoverTrigger`, `ToastAction`) take `variant` and `size` themselves.
53
+
54
+ ```tsx
55
+ import { Cancel01Icon } from "@hugeicons/core-free-icons";
56
+ import {
57
+ Dialog,
58
+ DialogBackdrop,
59
+ DialogClose,
60
+ DialogContent,
61
+ DialogDescription,
62
+ DialogTitle,
63
+ DialogTrigger,
64
+ } from "abby/dialog";
65
+ import { Icon } from "abby/icon";
66
+
67
+ export function EditProfile() {
68
+ return (
69
+ <Dialog>
70
+ <DialogTrigger variant="outline">Edit profile</DialogTrigger>
71
+ <DialogBackdrop />
72
+ <DialogContent>
73
+ <DialogTitle>Edit your profile</DialogTitle>
74
+ <DialogDescription>Save when you are done.</DialogDescription>
75
+ <div className="flex justify-end gap-2">
76
+ <DialogClose variant="outline">Cancel</DialogClose>
77
+ <DialogClose value="save">Save changes</DialogClose>
78
+ </div>
79
+ <DialogClose
80
+ variant="ghost"
81
+ size="icon-sm"
82
+ aria-label="Close"
83
+ className="absolute end-2 top-2"
84
+ >
85
+ <Icon icon={Cancel01Icon} />
86
+ </DialogClose>
87
+ </DialogContent>
88
+ </Dialog>
89
+ );
90
+ }
91
+ ```
92
+
93
+ Popups (dialog, popover, menu, select, tooltip) open in the browser's top layer and render in place: there are no Portal, Positioner or Overlay parts. Placement (`side`, `align`, `sideOffset`) goes on the Content part. `presentation="sheet"` on `Dialog` opens it as a sheet.
94
+
95
+ ### Use the sizes, not classes that resize
96
+
97
+ Every control has one height per size: `xs` 24px, `sm` 28px (the usual button), `default` 36px (every field too) and `lg` 44px, the touch size. Buttons and one-line fields are capsules. A button with only an icon is a circle and uses `icon-xs`, `icon-sm`, `icon` or `icon-lg`, and needs an `aria-label`.
98
+
99
+ ```tsx
100
+ import { Button } from "abby/button";
101
+
102
+ export const Small = () => <Button size="xs">Undo archive</Button>;
103
+ ```
104
+
105
+ ### Draw icons with `Icon`
106
+
107
+ Icons come from `@hugeicons/core-free-icons` through `Icon`, which sets abby's size and stroke and hides the icon from screen readers. Pass `label` only when the icon says something no text around it says.
108
+
109
+ ```tsx
110
+ import { Search01Icon } from "@hugeicons/core-free-icons";
111
+ import { Icon } from "abby/icon";
112
+
113
+ export const SearchIcon = () => <Icon icon={Search01Icon} />;
114
+ ```
115
+
116
+ ### Render links with `Link`
117
+
118
+ `Link` is a link an agent can follow. With `variant` or `size` it looks like a button. For a router's link, pass it to `render`.
119
+
120
+ ```tsx
121
+ import { Link } from "abby/link";
122
+
123
+ export const Docs = () => <Link href="/docs">Read the docs</Link>;
124
+ export const NewProject = () => (
125
+ <Link href="/projects/new" variant="default">
126
+ New project
127
+ </Link>
128
+ );
129
+ ```
130
+
131
+ ### Pass lists as `items`
132
+
133
+ Select, Combobox, Autocomplete, Listbox, Menu and Command accept `items`. An empty Content part then renders them with abby's styles, and an agent can read the choices without opening the list.
134
+
135
+ ```tsx
136
+ "use client";
137
+
138
+ import { Field, FieldLabel } from "abby/field";
139
+ import { Select, SelectContent, SelectTrigger } from "abby/select";
140
+ import { Menu, MenuContent, MenuTrigger } from "abby/menu";
141
+
142
+ const plans = [
143
+ { value: "free", label: "Free" },
144
+ { value: "pro", label: "Pro" },
145
+ ];
146
+
147
+ export function PlanField() {
148
+ return (
149
+ <Field name="plan">
150
+ <FieldLabel>Plan</FieldLabel>
151
+ <Select items={plans} defaultValue="free">
152
+ <SelectTrigger />
153
+ <SelectContent />
154
+ </Select>
155
+ </Field>
156
+ );
157
+ }
158
+
159
+ export function FileMenu() {
160
+ return (
161
+ <Menu items={["Rename", "Duplicate"]} onAction={(value) => console.log(value)}>
162
+ <MenuTrigger variant="outline">File actions</MenuTrigger>
163
+ <MenuContent />
164
+ </Menu>
165
+ );
166
+ }
167
+ ```
168
+
169
+ Write the items as children instead (`SelectItem`, `MenuItem`) when each needs custom markup.
170
+
171
+ ### Control state with the value and open pairs
172
+
173
+ Components take `value`/`onValueChange`, `open`/`onOpenChange` and their `default*` forms. The callback's second argument has `reason`, `source` (`"agent"` when an agent made the change) and `cancel()`, which keeps the current state.
174
+
175
+ ```tsx
176
+ "use client";
177
+
178
+ import { useState } from "react";
179
+ import { Switch } from "abby/switch";
180
+
181
+ export function Notifications() {
182
+ const [on, setOn] = useState(false);
183
+ return (
184
+ <Switch
185
+ aria-label="Email notifications"
186
+ checked={on}
187
+ onCheckedChange={(next, details) => {
188
+ if (details.source === "agent" && next) details.cancel();
189
+ else setOn(next);
190
+ }}
191
+ />
192
+ );
193
+ }
194
+ ```
195
+
196
+ ### Open a popup from code with its controller
197
+
198
+ Each component exports `create<Name>Controller`. Pass it as `controller`, then call `open()`. Use this to open a dialog from a menu item: render the dialog outside the menu.
199
+
200
+ ```tsx
201
+ "use client";
202
+
203
+ import { useState } from "react";
204
+ import { createDialogController, Dialog, DialogContent, DialogTitle } from "abby/dialog";
205
+ import { Menu, MenuContent, MenuItem, MenuTrigger } from "abby/menu";
206
+
207
+ export function RenameFromMenu() {
208
+ const [rename] = useState(() => createDialogController());
209
+ return (
210
+ <>
211
+ <Menu>
212
+ <MenuTrigger variant="outline">File actions</MenuTrigger>
213
+ <MenuContent>
214
+ <MenuItem onSelect={() => rename.open()}>Rename…</MenuItem>
215
+ </MenuContent>
216
+ </Menu>
217
+ <Dialog controller={rename}>
218
+ <DialogContent>
219
+ <DialogTitle>Rename file</DialogTitle>
220
+ </DialogContent>
221
+ </Dialog>
222
+ </>
223
+ );
224
+ }
225
+ ```
226
+
227
+ ### Show toasts
228
+
229
+ Mount one `ToastRegion` in the app, then call `toast()` from anywhere.
230
+
231
+ ```tsx
232
+ "use client";
233
+
234
+ import { Button } from "abby/button";
235
+ import { toast, ToastRegion } from "abby/toast";
236
+
237
+ export function Toasts() {
238
+ return (
239
+ <>
240
+ <Button onClick={() => toast("Event created", { description: "Friday at 10:00" })}>
241
+ Create event
242
+ </Button>
243
+ <ToastRegion toaster={toast} />
244
+ </>
245
+ );
246
+ }
247
+ ```
248
+
249
+ ### Build a window with a rail and a column
250
+
251
+ An app's shell with two levels, Alma's, is shadcn's nested sidebars: one `Sidebar variant="inset" collapsible="icon"` holds a `SidebarTitlebar` and, in a row under it, a rail and a column as panels with `collapsible="none"`. The provider's width is both. Collapsed, the rail stays; with `peek`, the column floats out over the page while the pointer rests on the sidebar, and Escape sends it away. The column keeps its width (no `flex-1`): opening, the sidebar's edge uncovers it instead of squeezing its rows.
252
+
253
+ ```tsx
254
+ import { Icon } from "abby/icon";
255
+ import { Home01Icon } from "@hugeicons/core-free-icons";
256
+ import {
257
+ Sidebar,
258
+ SidebarInset,
259
+ SidebarInsetHeader,
260
+ SidebarMenu,
261
+ SidebarMenuBadge,
262
+ SidebarMenuButton,
263
+ SidebarMenuItem,
264
+ SidebarProvider,
265
+ SidebarTitlebar,
266
+ SidebarTrigger,
267
+ } from "abby/sidebar";
268
+ import type { CSSProperties } from "react";
269
+
270
+ const width = { "--sidebar-width": "calc(18rem + var(--sidebar-width-icon))" } as CSSProperties;
271
+
272
+ export function Shell() {
273
+ return (
274
+ <SidebarProvider style={width}>
275
+ <Sidebar variant="inset" collapsible="icon">
276
+ <SidebarTitlebar>
277
+ <SidebarTrigger />
278
+ </SidebarTitlebar>
279
+ <div className="flex min-h-0 flex-1">
280
+ <Sidebar collapsible="none" className="w-(--sidebar-width-icon)">
281
+ <SidebarMenu className="items-center">
282
+ <SidebarMenuItem>
283
+ <SidebarMenuButton size="icon" tooltip="Inbox" render={<a href="/inbox" />}>
284
+ <Icon icon={Home01Icon} />
285
+ <span>Inbox</span>
286
+ </SidebarMenuButton>
287
+ <SidebarMenuBadge variant="dot" className="bg-warning text-warning-foreground">
288
+ 2
289
+ </SidebarMenuBadge>
290
+ </SidebarMenuItem>
291
+ </SidebarMenu>
292
+ </Sidebar>
293
+ <Sidebar collapsible="none" peek>
294
+ {/* SidebarHeader, SidebarContent with groups of rows, SidebarFooter */}
295
+ </Sidebar>
296
+ </div>
297
+ </Sidebar>
298
+ <SidebarInset>
299
+ <SidebarInsetHeader>
300
+ <h1 className="flex-1 text-label">Inbox</h1>
301
+ </SidebarInsetHeader>
302
+ </SidebarInset>
303
+ </SidebarProvider>
304
+ );
305
+ }
306
+ ```
307
+
308
+ - A rail's button is `size="icon"`: a 36px circle whose name shows only in its tooltip. Its badge is `variant="dot"`: a dot while the column is open, the count once collapsed. Put what the badge says in the button's `aria-describedby`.
309
+ - A two-line row (a name and a line under it) is `size="lg"`, 48px. A row that's a link takes `render={<a href="…" />}`: the button turns it into a link an agent follows, so don't pass `LinkPart` there.
310
+ - `SidebarInsetHeader` is the page's top bar, lined up with the window's controls; while the sidebar is collapsed, put a `SidebarTrigger` first in it.
311
+ - Collapsed to the rail, the trigger moves to the page's top bar: render a `SidebarTrigger` in `SidebarTitlebar` and another as the first child of `SidebarInsetHeader` while collapsed. The two glide as one button on their own.
312
+ - Collapsed to the rail, `SidebarTitlebar` folds to 8px: no empty band over the rail. In a desktop app, hide the window's controls while it's collapsed (the provider's `onOpenChange`).
313
+ - The Shell block (see the blocks skill) is a whole window built this way.
314
+
315
+ ## Common Mistakes
316
+
317
+ ### HIGH: Rendering a `Button` into a trigger part
318
+
319
+ shadcn writes `<DialogTrigger render={<Button variant="outline" />}>`. In abby that shows an agent two controls with one name, and `act()` refuses the ambiguous name. Write `<DialogTrigger variant="outline">`. Source: `src/components/button/button.tsx` (`buttonLook`).
320
+
321
+ ### HIGH: A bare `<a>`, or a `Button` rendered as a link
322
+
323
+ An agent can't see a bare `<a>`. A `Button` with `render={<a />}` lists itself with nothing to press. Use `Link`, or `LinkPart` inside another component's part. Source: `src/components/link/link.tsx`.
324
+
325
+ ### HIGH: A control without a name
326
+
327
+ An icon-only button with no `aria-label`, a field with no `FieldLabel`, or two controls with the same name breaks screen readers and agents. Give each control a unique name that doesn't contain another's whole words ("Region" and "Suggest a region" collide). A visible amount like "124K / 200K" must be part of the trigger's name.
328
+
329
+ ### HIGH: Portal, Positioner and `asChild` from shadcn or Radix
330
+
331
+ abby has none of them. Remove the Portal and Positioner wrappers, put placement on the Content part, and replace `asChild` with `render`.
332
+
333
+ ### MEDIUM: Resizing with classes
334
+
335
+ `<Button className="h-6 px-2 text-xs">` breaks the shared heights. Use `size="xs"`.
336
+
337
+ ### MEDIUM: Icons from another set, or raw SVGs
338
+
339
+ lucide icons and inline SVGs miss abby's stroke and size, and stay visible to screen readers. Use `Icon` with a Hugeicons icon.
340
+
341
+ ### MEDIUM: A tooltip that repeats its trigger's name
342
+
343
+ The agent then sees the control twice. Put `data-agent-hidden` on that `TooltipContent`.
344
+
345
+ ### MEDIUM: Exit animations with `data-ending-style:`
346
+
347
+ ui-sdk drops `data-ending-style` a frame before the popup leaves, and the popup flashes back in. Style the exit with `data-closed:`.
348
+
349
+ ## Completion
350
+
351
+ - Each control has a unique accessible name, visible as a label or button text where possible.
352
+ - No component is wrapped in Portal or Positioner parts, and no trigger renders a `Button`.
353
+ - Opening and closing each popup with the keyboard (Enter, Escape) returns focus to its trigger.
354
+ - For agent use, follow the agent-ready-ui skill and run `checkAgent` on the screen.