@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,295 @@
1
+ ---
2
+ name: note-status
3
+ description: "Use when showing where a note is in an app built with abby: its
4
+ status (draft, in progress, in review, done) as a mark or a select by the
5
+ title, the area and folder it lives in as a searchable chip, and a tree of
6
+ notes in a sidebar with the current note, who is writing in each and each
7
+ note's status; and letting an AI agent read and change the status and the
8
+ place."
9
+ metadata:
10
+ purpose: Shows how to mark a note's status and place with abby's light entries,
11
+ list notes in a tree or a sidebar with the current one and who is writing,
12
+ and keep both usable by an agent without loading the editor.
13
+ type: core
14
+ library: abby
15
+ library_version: 0.1.1
16
+ sources:
17
+ - src/components/note-status/note-status.tsx
18
+ - src/components/note-place/note-place.tsx
19
+ - src/components/note-editor/person.ts
20
+ - src/components/tree/tree.tsx
21
+ - src/components/sidebar/sidebar.tsx
22
+ requires:
23
+ - compose-screens
24
+ - agent-ready-ui
25
+ ---
26
+
27
+ # Show a note's status and place with abby
28
+
29
+ Read the compose-screens skill first; read agent-ready-ui before letting an agent change a note's status or place. Two light entries cover where a note is, and neither loads the editor or Tiptap:
30
+
31
+ | Entry | What it holds |
32
+ | ------------------ | -------------------------------------------------------------------------------------------- |
33
+ | `abby/note-status` | `NoteStatusIcon` (a 14px mark), `NoteStatusSelect` (the status by the title), `NoteLiveDots` |
34
+ | `abby/note-place` | `NotePlaceSelect`: the area and folder a note lives in, as a chip with a searchable list |
35
+
36
+ A sidebar or a list of notes imports these, never `abby/note-editor`.
37
+
38
+ ## Setup
39
+
40
+ 1. Make sure the app imports `abby/styles.css` once (see the setup skill).
41
+ 2. Render the status and the place in a client component, and save what each `onValueChange` reports.
42
+
43
+ ```tsx
44
+ "use client";
45
+
46
+ import { useState } from "react";
47
+ import { NoteStatusSelect, type NoteStatus } from "abby/note-status";
48
+ import { NotePlaceSelect, type NotePlaceArea } from "abby/note-place";
49
+
50
+ const areas: NotePlaceArea[] = [
51
+ {
52
+ value: "product",
53
+ label: "Product",
54
+ mark: "bg-chart-1",
55
+ folders: [{ value: "product/portugal", label: "Portugal" }],
56
+ },
57
+ { value: "finance", label: "Finance", mark: "bg-chart-3" },
58
+ ];
59
+
60
+ export function NoteMeta() {
61
+ const [status, setStatus] = useState<NoteStatus>("doing");
62
+ const [place, setPlace] = useState("product/portugal");
63
+ return (
64
+ <div className="flex items-center gap-2">
65
+ <NotePlaceSelect
66
+ areas={areas}
67
+ value={place}
68
+ onValueChange={(value) => value && setPlace(value)}
69
+ />
70
+ <NoteStatusSelect value={status} onValueChange={(value) => value && setStatus(value)} />
71
+ </div>
72
+ );
73
+ }
74
+ ```
75
+
76
+ ## Core Patterns
77
+
78
+ ### Show the status
79
+
80
+ There are four statuses, in the order a note goes through them: `"draft"`, `"doing"`, `"review"` and `"done"` (`noteStatuses`). The app maps its own names onto them through `labels`.
81
+
82
+ ```tsx
83
+ import { NoteStatusSelect } from "abby/note-status";
84
+
85
+ export function Statuses() {
86
+ return (
87
+ <>
88
+ {/* By the title: a 24px trigger with the mark and the name, and a list of the others. */}
89
+ <NoteStatusSelect defaultValue="review" />
90
+
91
+ {/* Only some statuses offered: "done" is reached another way. */}
92
+ <NoteStatusSelect statuses={["draft", "doing", "review"]} defaultValue="draft" />
93
+
94
+ {/* A note that can't change: text, with no list. */}
95
+ <NoteStatusSelect value="done" readOnly />
96
+
97
+ {/* Translated: each status's name and the select's own. */}
98
+ <NoteStatusSelect
99
+ defaultValue="doing"
100
+ labels={{
101
+ status: "Estado",
102
+ draft: "Borrador",
103
+ doing: "En curso",
104
+ review: "En revisión",
105
+ done: "En Memoria",
106
+ }}
107
+ />
108
+ </>
109
+ );
110
+ }
111
+ ```
112
+
113
+ `NoteStatusIcon` draws the mark alone: a dashed ring for a draft, a ring half full while in progress, three quarters in amber while in review, and a green disc with a check once done. Next to the status's name it's decorative. Standing alone, give it a `label`:
114
+
115
+ ```tsx
116
+ <NoteStatusIcon status="review" label="In review" />
117
+ ```
118
+
119
+ ### Choose where a note lives
120
+
121
+ `NotePlaceSelect` takes the areas the person can write in, each with its color and folders. The chip shows "Area › Folder"; its list has a search field and one group per area. Each place's name is its whole path, so two folders named "Plans" in two areas never share a name, and the search finds a folder by its area too.
122
+
123
+ ```tsx
124
+ <NotePlaceSelect
125
+ areas={areas}
126
+ defaultValue="product/portugal"
127
+ labels={{
128
+ place: "Lugar",
129
+ search: "Buscar un área o carpeta",
130
+ empty: "Nada coincide",
131
+ none: "Elige dónde vive",
132
+ }}
133
+ />
134
+ ```
135
+
136
+ - `value` is an area's or a folder's `value`, as the app stores it.
137
+ - An area's `mark` is a `bg-*` token class: `bg-chart-1` … `bg-chart-5` tell up to five areas apart.
138
+ - With no value, the chip shows `labels.none` in the hint gray.
139
+ - List only the places the person can write in. Refusing a place after it's shown is for an agent's choice (see below).
140
+
141
+ ### List notes in a tree
142
+
143
+ `Tree` draws a guide down each group and bends it into the current row, in the color of a choice. Mark the note that's open with `current`, make each note a link with `LinkPart`, and put its end (who is writing, the status) after the name, hidden from the row's name.
144
+
145
+ ```tsx
146
+ "use client";
147
+
148
+ import { Folder01Icon } from "@hugeicons/core-free-icons";
149
+ import { Icon } from "abby/icon";
150
+ import { LinkPart } from "abby/link";
151
+ import { NoteLiveDots, NoteStatusIcon, type NotePerson, type NoteStatus } from "abby/note-status";
152
+ import { Tree, TreeGroup, TreeItem, TreeItemIndicator, TreeItemLabel } from "abby/tree";
153
+
154
+ type NoteNode = {
155
+ value: string;
156
+ label: string;
157
+ status?: NoteStatus;
158
+ writing?: NotePerson[];
159
+ children?: NoteNode[];
160
+ };
161
+
162
+ const statusNames: Record<NoteStatus, string> = {
163
+ draft: "Draft",
164
+ doing: "In progress",
165
+ review: "In review",
166
+ done: "Done",
167
+ };
168
+
169
+ function NoteRows({ nodes }: { nodes: NoteNode[] }) {
170
+ return nodes.map((node) => (
171
+ <TreeItem
172
+ key={node.value}
173
+ value={node.value}
174
+ // A tree written as children, with no `items`, learns its branches from `branch`.
175
+ branch={Boolean(node.children)}
176
+ aria-describedby={node.status ? `${node.value}-details` : undefined}
177
+ >
178
+ <TreeItemLabel
179
+ render={node.children ? undefined : <LinkPart href={`/notes/${node.value}`} />}
180
+ >
181
+ {node.children && <TreeItemIndicator />}
182
+ {node.children && <Icon icon={Folder01Icon} className="text-muted-foreground" />}
183
+ <span className="min-w-0 flex-1 truncate">{node.label}</span>
184
+ <span aria-hidden="true" className="flex shrink-0 items-center gap-2">
185
+ {node.writing && <NoteLiveDots people={node.writing} />}
186
+ <span className="flex w-7 justify-center text-xs text-subtle tabular-nums">
187
+ {node.status ? <NoteStatusIcon status={node.status} /> : node.children?.length}
188
+ </span>
189
+ </span>
190
+ </TreeItemLabel>
191
+ {/* Outside the row and hidden: the row's description, not its name. */}
192
+ {node.status && (
193
+ <span id={`${node.value}-details`} hidden aria-hidden="true">
194
+ {statusNames[node.status]}
195
+ {node.writing?.length ? `, ${node.writing.map((p) => p.name).join(" and ")} writing` : ""}
196
+ </span>
197
+ )}
198
+ {node.children && (
199
+ <TreeGroup>
200
+ <NoteRows nodes={node.children} />
201
+ </TreeGroup>
202
+ )}
203
+ </TreeItem>
204
+ ));
205
+ }
206
+
207
+ // `current` is the open note: it takes `aria-current="page"` and its branches open.
208
+ export function NotesTree({ notes, open }: { notes: NoteNode[]; open: string }) {
209
+ return (
210
+ <Tree aria-label="Notes" mode="none" current={open}>
211
+ <NoteRows nodes={notes} />
212
+ </Tree>
213
+ );
214
+ }
215
+ ```
216
+
217
+ - The trailing slot is `w-7` in every row, so the status marks and the counts share one column.
218
+ - `NoteLiveDots` takes the people writing right now, at most three dots, each in the person's color: the same color as their bar and cursor in the note (`personColor`). Give each person a stable `id`; the color comes from it.
219
+ - The guides and the bend are Tree's own: no class needed. A tree of files (`abby/file-tree`) gets them too.
220
+ - In a sidebar, `SidebarMenuSubItem` bends its line into the row whose `SidebarMenuSubButton` has `isActive`.
221
+
222
+ ### Let an agent read and change them
223
+
224
+ Both selects are lists to an agent: it finds them by their names ("Status", "Place"), reads every choice with the list closed and chooses one by its name.
225
+
226
+ ```ts
227
+ import { createAgent } from "abby/agents";
228
+
229
+ const agent = createAgent();
230
+ const status = agent.snapshot().find((entry) => entry.label === "Status")!;
231
+ await agent.query({ within: status.ref }); // Draft, In progress, In review, Done
232
+ await agent.act({ steps: [{ ref: "Status", action: "setValue", args: ["In review"] }] });
233
+ await agent.act({ steps: [{ ref: "Place", action: "setValue", args: ["Product › Portugal"] }] });
234
+ ```
235
+
236
+ The app can refuse an agent's change, like moving a note to review alone: cancel it in `onValueChange`. The select keeps its value.
237
+
238
+ ```tsx
239
+ <NoteStatusSelect
240
+ value={status}
241
+ onValueChange={(value, details) => {
242
+ if (details.source === "agent" && value === "done") return details.cancel();
243
+ if (value) setStatus(value);
244
+ }}
245
+ />
246
+ ```
247
+
248
+ `act()` reports no error for a cancelled change, so read the value back (see agent-ready-ui). A tree row's agent label is its note's name ("Roadmap 2027"), and a note row offers `follow`, which goes to its link.
249
+
250
+ ## Common Mistakes
251
+
252
+ ### HIGH: Putting the status in the row's name
253
+
254
+ ```tsx
255
+ <TreeItemLabel>
256
+ Roadmap 2027 <span className="sr-only">In progress</span>
257
+ </TreeItemLabel>
258
+ ```
259
+
260
+ The row's name becomes "Roadmap 2027 In progress": a screen reader reads it as the title, and an agent's label changes every time the status does. Hide the row's end with `aria-hidden` and give the status as the item's `aria-describedby`. Source: `src/components/tree/tree.stories.tsx` (`NotesGuides`, `NotesAgent`).
261
+
262
+ ### HIGH: A hidden details span inside the label
263
+
264
+ `hidden` alone doesn't keep text out of an agent's label: it reads the item's text content, minus `aria-hidden` subtrees. Put the details span after `TreeItemLabel`, with both `hidden` and `aria-hidden="true"`. `aria-describedby` still reads it.
265
+
266
+ ### HIGH: A composed tree without `branch`
267
+
268
+ A `Tree` written as children, with no `items`, can't tell a branch from a leaf: every row gets no `aria-expanded`, the indicator never rotates, and a branch's group stays shut. Pass `branch` on each `TreeItem` that holds a `TreeGroup`, as `NoteRows` does above. Source: `src/blocks/notes/parts/notes-sidebar.tsx`.
269
+
270
+ ### HIGH: Importing the editor in a sidebar
271
+
272
+ ```tsx no-check
273
+ import { NoteStatusIcon } from "abby/note-editor";
274
+ ```
275
+
276
+ `abby/note-editor` pulls Tiptap into every page with a sidebar. The status, the dots and `NotePerson` come from `abby/note-status`, which doesn't load it.
277
+
278
+ ### MEDIUM: Naming a folder alone in an agent's step
279
+
280
+ `setValue("Plans")` matches no place, since each place's name is its whole path: `act()` returns an error ("No item \"Plans\" in Place") listing every place, and the value stays. Use `"Marketing › Plans"`, or read the names with `agent.query({ within, text: "plans" })` first.
281
+
282
+ ### MEDIUM: Giving the select a name that changes
283
+
284
+ `labels.status` and `labels.place` name the control; the value shows after them. Don't put the current status into `labels.status`: an agent finds the control by a name that stays. Two selects on one page take names where neither holds the other's whole words: "Roadmap status" and "Brief status", never "Status" and "Brief status", which collide in `query({ within })`.
285
+
286
+ ### MEDIUM: Drawing the done mark with `Icon`
287
+
288
+ `Icon` strokes every part of a glyph in one color, which hides the check on the green disc. Use `NoteStatusIcon`; its colors are tokens (`text-success`, `text-warning`).
289
+
290
+ ## Completion
291
+
292
+ - The status select shows its mark and name, lists the statuses offered, and `onValueChange` saves the choice; with `readOnly` it's text.
293
+ - The place chip shows "Area › Folder", its search keeps only the areas with a match, and Enter chooses the highlighted place.
294
+ - In a tree, each branch has `aria-expanded` and its arrow turns, the guide bends into the current note's row, each note ends with its dots and status on one column, and the row's name is only the note's title.
295
+ - In tests, `checkAgent(agent)` passes, an agent's `setValue` on "Status" and "Place" changes them, `query` lists the choices with the list closed, and a refused change leaves the value as it was.
@@ -0,0 +1,136 @@
1
+ ---
2
+ name: setup
3
+ description: 'Use when installing abby in a React 19 and Tailwind CSS 4 app: the
4
+ CSS imports and their layer order, importing components from their own entries
5
+ (abby/button), server components and "use client", fonts, optional themes and
6
+ typeset. Read before writing the first abby import.'
7
+ metadata:
8
+ purpose: Gets an app from no abby to a rendered, styled abby component, with the
9
+ imports, CSS order and server rendering rules the package expects.
10
+ type: lifecycle
11
+ library: abby
12
+ library_version: 0.1.1
13
+ sources:
14
+ - README.md
15
+ - src/styles/index.css
16
+ - package.json
17
+ - scripts/release.ts
18
+ ---
19
+
20
+ # Set up abby in an app
21
+
22
+ abby is a React design system: components styled with Tailwind CSS 4 on top of ui-sdk's unstyled primitives. The app needs React 19 or newer and Tailwind CSS 4.
23
+
24
+ ## Setup
25
+
26
+ abby is published on npm as `@asanchez-sa/abby`. Install it under the alias `abby`, so every import reads `abby/...`:
27
+
28
+ ```bash
29
+ bun add abby@npm:@asanchez-sa/abby
30
+ # npm install abby@npm:@asanchez-sa/abby
31
+ # pnpm add abby@npm:@asanchez-sa/abby
32
+ ```
33
+
34
+ The app's `package.json` then holds `"abby": "npm:@asanchez-sa/abby"` (npm and pnpm add a range, `@^0.1.0`). Its fonts, icons and ui-sdk come with it as dependencies. In the app's global stylesheet, the one Tailwind processes (in Vite, `src/index.css` imported from `src/main.tsx`; in Next.js, `app/globals.css` imported from `app/layout.tsx`):
35
+
36
+ ```css
37
+ @layer ui-sdk;
38
+ @import "tailwindcss";
39
+ @import "abby/styles.css";
40
+ ```
41
+
42
+ The order matters:
43
+
44
+ - `@layer ui-sdk;` comes first so ui-sdk's own base styles sit under Tailwind's utilities.
45
+ - `abby/styles.css` comes after Tailwind. It holds the tokens, the dark scheme, the Geist fonts and the shared utilities. It also tells Tailwind to scan abby's components.
46
+
47
+ Then render a component from its own entry:
48
+
49
+ ```tsx
50
+ import { Button } from "abby/button";
51
+
52
+ export function SaveBar() {
53
+ return <Button variant="outline">Save</Button>;
54
+ }
55
+ ```
56
+
57
+ ## Core Patterns
58
+
59
+ ### Import each component from its own entry
60
+
61
+ Each component is its own entry, named like its folder: `abby/button`, `abby/dialog`, `abby/select`, `abby/date-picker`. There is no entry that exports them all. Everything that isn't a component comes from ui-sdk and is grouped by entry:
62
+
63
+ ```ts
64
+ import { cn, cva } from "abby/utilities/cn";
65
+ import { createLocalStorage } from "abby/utilities/storage";
66
+ import { createColorScheme } from "abby/behaviors/preferences";
67
+ import { createAgent } from "abby/agents";
68
+ import { checkAgent } from "abby/tools/testing";
69
+ ```
70
+
71
+ The entries are `abby/core`, `abby/agents`, `abby/utilities/<text|number|date|color|image|storage|platform|mobile|cn>`, `abby/behaviors/<focus|selection|drag-and-drop|dragging|lists|trees|transitions|popups|preferences|canvas>` and `abby/tools/<observe|testing>`. The package's `exports` field is the full list.
72
+
73
+ ### Add the optional stylesheets
74
+
75
+ ```css
76
+ @layer ui-sdk;
77
+ @import "tailwindcss";
78
+ @import "abby/styles.css";
79
+ @import "abby/typeset.css"; /* rendered markdown and plain HTML */
80
+ ```
81
+
82
+ `abby/styles.css` already carries abby's look, Alma's, in light and dark. There is no other theme to import today; the theming skill covers themes.
83
+
84
+ ### Render from server components
85
+
86
+ Every abby component file starts with `"use client"`, so a server component can render one directly. A prop that is a function can't cross from a server component to a client one: callbacks, and `className` or `children` written as a function of the state. Pass those from a file that has its own `"use client"`.
87
+
88
+ ```tsx
89
+ "use client";
90
+
91
+ import { Select, SelectContent, SelectTrigger } from "abby/select";
92
+
93
+ const plans = [
94
+ { value: "free", label: "Free" },
95
+ { value: "pro", label: "Pro" },
96
+ ];
97
+
98
+ export function PlanSelect() {
99
+ return (
100
+ <Select items={plans} defaultValue="free" onValueChange={(value) => console.log(value)}>
101
+ <SelectTrigger aria-label="Plan" />
102
+ <SelectContent />
103
+ </Select>
104
+ );
105
+ }
106
+ ```
107
+
108
+ ## Common Mistakes
109
+
110
+ ### HIGH: Importing from `abby` or from `@ui-sdk/*`
111
+
112
+ `import { Button } from "abby"` fails because there is no root entry. Importing a primitive from `@ui-sdk/react/button` gives the unstyled component. Use `abby/<component>` for components and abby's grouped entries for the rest. Source: `package.json` `exports`.
113
+
114
+ ### HIGH: Installing `abby` without the alias
115
+
116
+ `bun add abby` installs an unrelated package that npm gives that name. Installing `@asanchez-sa/abby` without the alias works, but then `abby/button` and every import in the skills and the blocks don't resolve. Install `abby@npm:@asanchez-sa/abby`. Source: `scripts/release.ts`.
117
+
118
+ ### HIGH: `abby/styles.css` before `tailwindcss`, or no `@layer ui-sdk`
119
+
120
+ With the wrong order, Tailwind's preflight resets abby's base styles, or ui-sdk's base styles override the utilities. Copy the three lines in the order shown. Source: `src/styles/index.css`.
121
+
122
+ ### HIGH: Copying shadcn or Radix code as is
123
+
124
+ abby keeps shadcn's part and variant names, but it has no `asChild` (use `render`), no Portal or Positioner parts, and no `tw-animate-css`. Follow the compose-screens skill instead of shadcn's examples.
125
+
126
+ ### MEDIUM: Passing a function prop from a server component
127
+
128
+ `onValueChange`, or a `className` written as a function, can't be serialized from a server component, and React throws. Move that piece into a client component.
129
+
130
+ ## Completion
131
+
132
+ - A component renders with abby's look: rounded corners, the Geist font, `bg-primary` on a default `Button`.
133
+ - In dark mode (`<html data-color-scheme="dark">`) the colors switch without `dark:` classes.
134
+ - The build has no unresolved `abby` imports.
135
+
136
+ If the component renders unstyled, check the CSS order, and that the stylesheet is the one Tailwind processes.
@@ -0,0 +1,216 @@
1
+ ---
2
+ name: theming
3
+ description: "Use when styling an app built with abby: color tokens instead of
4
+ palette colors, dark mode and a light/dark/system switch with
5
+ createColorScheme, the three grays of text, a custom theme with data-theme,
6
+ typeset for rendered markdown, and merging classes with cn and cva."
7
+ metadata:
8
+ purpose: Keeps an app's own styles on abby's tokens, so dark mode, themes and
9
+ contrast keep working, and shows how to switch schemes and themes.
10
+ type: core
11
+ library: abby
12
+ library_version: 0.1.1
13
+ requires:
14
+ - setup
15
+ sources:
16
+ - src/styles/tokens.css
17
+ - src/styles/color-scheme.css
18
+ - src/styles/themes/*.css
19
+ - src/styles/typeset.css
20
+ - src/styles/components.css
21
+ - src/utilities/cn/index.ts
22
+ ---
23
+
24
+ # Theme and style an app with abby
25
+
26
+ Read the setup skill first: this one assumes `abby/styles.css` is imported.
27
+
28
+ abby's colors follow shadcn's token names, so shadcn's classes work: `bg-background`, `text-muted-foreground`, `border-input`, `bg-sidebar-accent`. Each token holds its light and dark value in `light-dark()`, so a class almost never needs `dark:`.
29
+
30
+ ## Setup
31
+
32
+ Style the app's own markup with tokens, never with Tailwind's palette:
33
+
34
+ ```tsx
35
+ export function PlanCard() {
36
+ return (
37
+ <section className="rounded-xl border bg-card p-6 text-card-foreground">
38
+ <h2 className="text-heading-3">Pro</h2>
39
+ <p className="text-sm text-muted-foreground">For growing teams.</p>
40
+ </section>
41
+ );
42
+ }
43
+ ```
44
+
45
+ ## Core Patterns
46
+
47
+ ### Pick the token by role
48
+
49
+ | Token | Use |
50
+ | ------------------------------------------------ | ------------------------------------------------------- |
51
+ | `background` / `foreground` | Page surface and its text |
52
+ | `card`, `popover` (+ `-foreground`) | Raised and floating surfaces |
53
+ | `primary` / `primary-foreground` | The one main action on a screen |
54
+ | `secondary`, `muted`, `accent` (+ `-foreground`) | Lower emphasis, descriptions, hover |
55
+ | `brand` | Selection: a checked control, progress, a range (ink) |
56
+ | `link` | A link's text (ink, told apart by its underline) |
57
+ | `destructive`, `warning`, `success` | Status, in small icons and dots |
58
+ | `subtle` | Hints: a field's help, an inactive tab, a count, a time |
59
+ | `border`, `input`, `ring`, `overlay` | Separators, a control's edge, focus, a dialog's dim |
60
+ | `chart-1` … `chart-5` | Charts |
61
+ | `presence-1` … `presence-4`, `comment` | Other people in a note, and commented text |
62
+ | `assistant` | The assistant's name, edge and tint in a note |
63
+
64
+ Text roles carry size, line height and weight: `text-display-1` … `3`, `text-heading-1` … `4`, `text-body`, `text-label`, `text-supporting`, `text-footnote`, `text-micro` (8/10, only on a mark that repeats a name: a badge's count over an icon, a 16px avatar's initials), `text-chat`, `text-composer`, `text-code`. `text-sm` is 13/18, the dense size most text uses. Radii derive from `--radius`, 10px as in Alma: `rounded-lg` is a row, `rounded-xl` a card, a menu or a panel, `rounded-2xl` a dialog or a field of several lines, and a button or a one-line field is a capsule (`rounded-full`). Shadows have three levels: `shadow-sm`, `shadow-md` and `shadow-lg`. The theme sets the radius, the shadows and a heading's weight, so use the classes and never a px radius or a custom shadow.
65
+
66
+ ### Let the person choose light, dark or system
67
+
68
+ With no setup the page follows the device. To let the person choose, and keep the choice:
69
+
70
+ ```tsx
71
+ "use client";
72
+
73
+ import type { ReactNode } from "react";
74
+ import { createColorScheme, Preferences } from "abby/behaviors/preferences";
75
+ import { createLocalStorage } from "abby/utilities/storage";
76
+ import { Button } from "abby/button";
77
+
78
+ export const colorScheme = createColorScheme({
79
+ storage: createLocalStorage("color-scheme"),
80
+ global: true,
81
+ });
82
+
83
+ export function AppShell({ children }: { children: ReactNode }) {
84
+ return <Preferences preferences={[colorScheme]}>{children}</Preferences>;
85
+ }
86
+
87
+ export function DarkButton() {
88
+ return (
89
+ <Button variant="outline" onClick={() => colorScheme.set("dark")}>
90
+ Dark
91
+ </Button>
92
+ );
93
+ }
94
+ ```
95
+
96
+ `global: true` puts `data-color-scheme` on `<html>`. `Preferences` renders an inline script on the server that sets the saved value before the page paints. The attribute also works on any element, fixing the scheme of that area: `<aside data-color-scheme="dark">`. shadcn's `.dark` class is an alias.
97
+
98
+ ### Pick the gray of text
99
+
100
+ abby's look is Alma's, the only theme today: `abby/styles.css` carries it with no attribute. Its text is soft because each piece of text takes the lightest gray that fits its role:
101
+
102
+ | Class | For |
103
+ | ----------------------- | ------------------------------------------------------------------- |
104
+ | `text-foreground` | What names or holds content: a title, a label, a value, typed text |
105
+ | `text-muted-foreground` | Text that is read: a description, a panel's body, an alert's detail |
106
+ | `text-subtle` | A hint: a field's help, a count, a time, an icon |
107
+
108
+ All three pass 4.5:1 in light and dark on the page, a card and a popover. On a track or a fill (an inactive segment or tab), use `text-muted-foreground`: `subtle` falls under 4.5:1 there.
109
+
110
+ ```tsx
111
+ export function Usage() {
112
+ return (
113
+ <div className="flex flex-col gap-1">
114
+ <span className="text-label">Storage</span>
115
+ <p className="text-sm text-muted-foreground">Files, images and backups.</p>
116
+ <span className="text-xs text-subtle">12.4 GB of 50 GB</span>
117
+ </div>
118
+ );
119
+ }
120
+ ```
121
+
122
+ ### Write a custom theme
123
+
124
+ A theme redefines variables inside `[data-theme="<name>"]`. Besides the color tokens and the neutral scale (`--base-50` … `--base-950`), it can set:
125
+
126
+ | Variable | What it changes |
127
+ | ------------------------------------------- | ----------------------------------------------- |
128
+ | `--radius` | Every `rounded-*`, which are multiples of it |
129
+ | `--heading-weight` | The weight of `text-heading-1` … `4` |
130
+ | `--focus-ring` | The keyboard ring and a focused field's edge |
131
+ | `--focus-halo` | The faint halo around the ring and a field |
132
+ | `--focus-ring-width`, `--focus-ring-offset` | The ring's line: 1px, 1px off the edge |
133
+ | `--elevation-sm`, `-md`, `-lg` | The shadows behind `shadow-sm`, `-md`, `-lg` |
134
+ | `--popup-backdrop`, `--popup-backdrop-blur` | The dim and the blur behind a dialog or a sheet |
135
+
136
+ Put the colors under a second selector too, so an area with its own `data-color-scheme` keeps them:
137
+
138
+ ```css
139
+ [data-theme="brand"] {
140
+ --radius: 0.5rem;
141
+ --heading-weight: 500;
142
+ }
143
+
144
+ [data-theme="brand"],
145
+ [data-theme="brand"] :is([data-color-scheme], .dark):not([data-theme]) {
146
+ --brand: light-dark(var(--color-violet-600), var(--color-violet-400));
147
+ --brand-foreground: light-dark(var(--color-white), var(--color-neutral-950));
148
+ }
149
+ ```
150
+
151
+ Keep text pairs at 4.5:1 and `ring` at 3:1 against their surface, in light and dark; a translucent `ring` counts as blended over the halo and the surface. abby's default is ink: focus, selection and links carry no color. A theme that colors the focus sets `--ring` and `--focus-halo` together. Import the theme's file after `abby/styles.css` and set `data-theme="brand"` on `<html>` or on an area; `data-theme="default"` gives an area abby's own look back. `src/styles/tokens.css` in the package lists every variable a theme can set.
152
+
153
+ ### Style rendered markdown
154
+
155
+ Import `abby/typeset.css` after `abby/styles.css`, then put a preset on the container. The content takes no classes.
156
+
157
+ ```tsx
158
+ export function Answer({ html }: { html: string }) {
159
+ return <div className="typeset typeset-chat" dangerouslySetInnerHTML={{ __html: html }} />;
160
+ }
161
+ ```
162
+
163
+ The presets are `typeset-docs` (long pages), `typeset-chat` (a chat answer) and `typeset-compact` (dense panels). abby components inside keep their own styles. Opt other markup out with `not-typeset` or `data-not-typeset`. Wrap a wide table in `typeset-scroll` with `tabIndex={0}`, `role="region"` and an `aria-label`.
164
+
165
+ ### Merge classes
166
+
167
+ ```ts
168
+ import { cn, cva, type VariantProps } from "abby/utilities/cn";
169
+
170
+ export const tag = cva("inline-flex items-center rounded-md px-2 text-xs", {
171
+ variants: {
172
+ tone: { neutral: "bg-muted text-muted-foreground", brand: "bg-brand text-brand-foreground" },
173
+ },
174
+ defaultVariants: { tone: "neutral" },
175
+ });
176
+
177
+ export type TagProps = VariantProps<typeof tag>;
178
+
179
+ export const merged = cn("text-heading-2", "text-muted-foreground");
180
+ ```
181
+
182
+ `cn` knows abby's text roles and motion tokens, so `text-heading-2` and `text-muted-foreground` both survive. Plain `tailwind-merge` drops the role.
183
+
184
+ ## Common Mistakes
185
+
186
+ ### HIGH: Palette colors instead of tokens
187
+
188
+ `bg-neutral-900`, `text-gray-500` or `border-zinc-200` don't switch in dark mode and ignore `data-theme`. Use the token for the role. Source: `src/styles/tokens.css`.
189
+
190
+ ### HIGH: Adding `dark:` variants to tokens
191
+
192
+ `bg-card dark:bg-neutral-900` overrides a token that already switches, and breaks themes. Drop the `dark:` class.
193
+
194
+ ### HIGH: Using `primary` for everything
195
+
196
+ `primary` is the main action only. A checked control or progress uses `brand`. Secondary actions and metadata use `muted-foreground`.
197
+
198
+ ### MEDIUM: A custom theme's colors only on `[data-theme]`
199
+
200
+ abby declares its color tokens again on every element with `data-color-scheme`, so a theme whose colors sit only under `[data-theme="brand"]` loses them inside `<aside data-color-scheme="dark">`: that area shows the default colors. Add `[data-theme="brand"] :is([data-color-scheme], .dark):not([data-theme])` to the colors' selector. `--radius`, `--heading-weight`, `--focus-ring` and `--elevation-*` don't need it. Source: `src/styles/tokens.css`.
201
+
202
+ ### MEDIUM: Everything in `text-foreground`
203
+
204
+ Labels, descriptions, hints and inactive tabs all in `text-foreground` make the screen read heavy and flat: nothing tells a title from its help. Give each piece the gray of its role (see Pick the gray of text). `text-subtle` is not for a label or a field's value. Source: `src/styles/tokens.css`.
205
+
206
+ ### MEDIUM: Merging classes with `twMerge` or a bare template string
207
+
208
+ A later `text-*` color drops abby's `text-heading-*` role. Use `cn`. Source: `src/utilities/cn/index.ts`.
209
+
210
+ ## Completion
211
+
212
+ - The app's own classes contain no Tailwind palette color, except inside a custom theme's variables.
213
+ - Switching `data-color-scheme` between `light` and `dark` restyles every surface with no `dark:` class.
214
+ - Text uses the lightest of the three grays that fits its role: no `text-foreground` on a description or a hint.
215
+ - A custom theme's colors also hold inside an area with its own `data-color-scheme`.
216
+ - A text pair you added passes 4.5:1 in both schemes (check it with the browser's contrast tool or axe).