@asanchez-sa/abby 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (391) hide show
  1. package/README.md +217 -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 +336 -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 +683 -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,24 @@
1
+ import { PopoverContent } from "../../popover/popover.js";
2
+ import { ComponentProps } from "react";
3
+ type NoteEditorCommentsLabels = {
4
+ /** The floating panel's accessible name. */
5
+ panel: string;
6
+ /** The reply field's name, with the thread's first author. */
7
+ reply: (author: string | undefined) => string;
8
+ /** The reply field's placeholder. */
9
+ replyPlaceholder: string;
10
+ send: string;
11
+ resolve: string;
12
+ };
13
+ type NoteEditorCommentsProps = Omit<ComponentProps<typeof PopoverContent>, "children"> & {
14
+ /** Replaces any of the default names, to translate them. */
15
+ labels?: Partial<NoteEditorCommentsLabels>;
16
+ };
17
+ /**
18
+ * The thread of the comment the caret is in: who wrote what, a reply field
19
+ * and Resolve. `NoteEditor` renders one when it has no children. The app
20
+ * keeps the threads: `comments`, `onCommentReply` and `onCommentResolve` on
21
+ * `NoteEditor`.
22
+ */
23
+ declare function NoteEditorComments({ labels: own, className, ...props }: NoteEditorCommentsProps): import("react").JSX.Element;
24
+ export { NoteEditorComments, type NoteEditorCommentsLabels, type NoteEditorCommentsProps };
@@ -0,0 +1,336 @@
1
+ "use client";
2
+ import { cnState } from "../../../utilities/cn/index.js";
3
+ import { Avatar, AvatarFallback, AvatarImage } from "../../avatar/avatar.js";
4
+ import { Button } from "../../button/button.js";
5
+ import { Icon } from "../../icon/icon.js";
6
+ import { Input } from "../../input/input.js";
7
+ import { Popover, PopoverContent } from "../../popover/popover.js";
8
+ import { NoteEditorContext, focusEditor, selectionStore } from "../editor.js";
9
+ import { initials } from "../person.js";
10
+ import { commentRange } from "../people.js";
11
+ import { c } from "react/compiler-runtime";
12
+ import { use, useEffect, useRef, useState, useSyncExternalStore } from "react";
13
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
14
+ import { ArrowUp02Icon } from "@hugeicons/core-free-icons";
15
+ import { posToDOMRect } from "@tiptap/core";
16
+ // src/components/note-editor/parts/comments.tsx
17
+ const defaultLabels = {
18
+ panel: "Comments",
19
+ reply: (author) => author ? `Reply to ${author}` : "Write a comment",
20
+ replyPlaceholder: "Reply…",
21
+ send: "Send reply",
22
+ resolve: "Resolve thread"
23
+ };
24
+ const noSubscription = () => () => {};
25
+ function useSelection(editor) {
26
+ const $ = c(4);
27
+ let t0;
28
+ if ($[0] !== editor) {
29
+ t0 = editor ? selectionStore(editor) : null;
30
+ $[0] = editor;
31
+ $[1] = t0;
32
+ } else t0 = $[1];
33
+ const store = t0;
34
+ let t1;
35
+ if ($[2] !== store) {
36
+ t1 = () => store?.get() ?? null;
37
+ $[2] = store;
38
+ $[3] = t1;
39
+ } else t1 = $[3];
40
+ return useSyncExternalStore(store ? store.subscribe : noSubscription, t1, _temp);
41
+ }
42
+ /** The open thread whose text holds the caret, with that text's range. */
43
+ function _temp() {
44
+ return null;
45
+ }
46
+ function activeComment(editor, selection, comments, pinned) {
47
+ if (!editor || editor.isDestroyed) return null;
48
+ if (pinned) {
49
+ const comment = comments.find((each) => each.id === pinned && !each.resolved);
50
+ const range = comment && commentRange(editor.state.doc, comment);
51
+ return comment && range ? {
52
+ comment,
53
+ range
54
+ } : null;
55
+ }
56
+ if (!selection || selection.from !== selection.to) return null;
57
+ for (const comment of comments) {
58
+ if (comment.resolved) continue;
59
+ const range = commentRange(editor.state.doc, comment);
60
+ if (range && range.from <= selection.from && selection.from <= range.to) return {
61
+ comment,
62
+ range
63
+ };
64
+ }
65
+ return null;
66
+ }
67
+ function PersonAvatar(t0) {
68
+ const $ = c(9);
69
+ const { person } = t0;
70
+ let t1;
71
+ if ($[0] !== person.image) {
72
+ t1 = person.image && /* @__PURE__ */ jsx(AvatarImage, {
73
+ src: person.image,
74
+ alt: ""
75
+ });
76
+ $[0] = person.image;
77
+ $[1] = t1;
78
+ } else t1 = $[1];
79
+ let t2;
80
+ if ($[2] !== person.name) {
81
+ t2 = initials(person.name);
82
+ $[2] = person.name;
83
+ $[3] = t2;
84
+ } else t2 = $[3];
85
+ let t3;
86
+ if ($[4] !== t2) {
87
+ t3 = /* @__PURE__ */ jsx(AvatarFallback, {
88
+ className: "text-xs",
89
+ children: t2
90
+ });
91
+ $[4] = t2;
92
+ $[5] = t3;
93
+ } else t3 = $[5];
94
+ let t4;
95
+ if ($[6] !== t1 || $[7] !== t3) {
96
+ t4 = /* @__PURE__ */ jsxs(Avatar, {
97
+ "aria-hidden": "true",
98
+ className: "size-6",
99
+ children: [t1, t3]
100
+ });
101
+ $[6] = t1;
102
+ $[7] = t3;
103
+ $[8] = t4;
104
+ } else t4 = $[8];
105
+ return t4;
106
+ }
107
+ /**
108
+ * The thread of the comment the caret is in: who wrote what, a reply field
109
+ * and Resolve. `NoteEditor` renders one when it has no children. The app
110
+ * keeps the threads: `comments`, `onCommentReply` and `onCommentResolve` on
111
+ * `NoteEditor`.
112
+ */
113
+ function NoteEditorComments(t0) {
114
+ const $ = c(22);
115
+ let className;
116
+ let own;
117
+ let props;
118
+ if ($[0] !== t0) {
119
+ ({labels: own, className, ...props} = t0);
120
+ $[0] = t0;
121
+ $[1] = className;
122
+ $[2] = own;
123
+ $[3] = props;
124
+ } else {
125
+ className = $[1];
126
+ own = $[2];
127
+ props = $[3];
128
+ }
129
+ const labels = {
130
+ ...defaultLabels,
131
+ ...own
132
+ };
133
+ const context = use(NoteEditorContext);
134
+ const editor = context?.editor ?? null;
135
+ const selection = useSelection(editor);
136
+ const [within, setWithin] = useState(false);
137
+ const [dismissed, setDismissed] = useState(null);
138
+ const [pinned, setPinned] = useState(null);
139
+ const pinnedText = useRef(null);
140
+ const readOnly = !!context?.readOnly;
141
+ const shownPin = readOnly ? pinned : null;
142
+ const active = activeComment(editor, selection, context?.comments ?? [], shownPin);
143
+ const key = active && selection ? `${active.comment.id}:${selection.from}` : "";
144
+ const open = shownPin ? !!active : !!active && (!!selection?.focused || within) && dismissed !== key;
145
+ const thread = active?.comment;
146
+ const author = thread?.messages[0]?.author.name;
147
+ const onReply = context?.onCommentReply;
148
+ const onResolve = context?.onCommentResolve;
149
+ let t1;
150
+ let t2;
151
+ if ($[4] !== editor || $[5] !== readOnly) {
152
+ t1 = () => {
153
+ if (!editor || editor.isDestroyed || !readOnly) return;
154
+ const dom = editor.view.dom;
155
+ const target = (event) => {
156
+ const text = event.target instanceof Element ? event.target.closest("[data-comment]") : null;
157
+ if (text) pinnedText.current = text;
158
+ return text?.dataset.comment;
159
+ };
160
+ const onClick = (event_0) => {
161
+ const id = target(event_0);
162
+ if (id) setPinned(id);
163
+ };
164
+ const onKeyDown = (event_1) => {
165
+ if (event_1.key !== "Enter" && event_1.key !== " ") return;
166
+ const id_0 = target(event_1);
167
+ if (!id_0) return;
168
+ event_1.preventDefault();
169
+ setPinned(id_0);
170
+ };
171
+ dom.addEventListener("click", onClick);
172
+ dom.addEventListener("keydown", onKeyDown);
173
+ return () => {
174
+ dom.removeEventListener("click", onClick);
175
+ dom.removeEventListener("keydown", onKeyDown);
176
+ };
177
+ };
178
+ t2 = [editor, readOnly];
179
+ $[4] = editor;
180
+ $[5] = readOnly;
181
+ $[6] = t1;
182
+ $[7] = t2;
183
+ } else {
184
+ t1 = $[6];
185
+ t2 = $[7];
186
+ }
187
+ useEffect(t1, t2);
188
+ const anchor = { getBoundingClientRect: () => {
189
+ if (!editor || editor.isDestroyed || !active) return new DOMRect();
190
+ return posToDOMRect(editor.view, active.range.from, active.range.to);
191
+ } };
192
+ let t3;
193
+ if ($[8] !== editor) {
194
+ t3 = (panel) => {
195
+ if (!panel || !editor) return;
196
+ const dom_0 = editor.view.dom;
197
+ const onKeyDown_0 = (event_2) => {
198
+ if (event_2.key !== "F10" || !event_2.altKey) return;
199
+ event_2.preventDefault();
200
+ panel.querySelector("input, button:not([disabled])")?.focus();
201
+ };
202
+ dom_0.addEventListener("keydown", onKeyDown_0);
203
+ return () => dom_0.removeEventListener("keydown", onKeyDown_0);
204
+ };
205
+ $[8] = editor;
206
+ $[9] = t3;
207
+ } else t3 = $[9];
208
+ const reach = t3;
209
+ let t4;
210
+ if ($[10] !== editor || $[11] !== key) {
211
+ t4 = () => {
212
+ setDismissed(key);
213
+ setWithin(false);
214
+ if (editor) focusEditor(editor);
215
+ };
216
+ $[10] = editor;
217
+ $[11] = key;
218
+ $[12] = t4;
219
+ } else t4 = $[12];
220
+ const close = t4;
221
+ let t5;
222
+ if ($[13] !== close || $[14] !== shownPin) {
223
+ t5 = (next, details) => {
224
+ if (next) return;
225
+ if (shownPin) setPinned(null);
226
+ else if (details.reason === "escape-key") close();
227
+ };
228
+ $[13] = close;
229
+ $[14] = shownPin;
230
+ $[15] = t5;
231
+ } else t5 = $[15];
232
+ const t6 = labels.panel;
233
+ let t7;
234
+ if ($[16] !== readOnly) {
235
+ t7 = readOnly ? () => pinnedText.current : "none";
236
+ $[16] = readOnly;
237
+ $[17] = t7;
238
+ } else t7 = $[17];
239
+ let t8;
240
+ if ($[18] !== className) {
241
+ t8 = cnState("data-[presentation=popover]:w-96 data-[presentation=popover]:gap-2 data-[presentation=popover]:px-3.5 data-[presentation=popover]:py-3", className);
242
+ $[18] = className;
243
+ $[19] = t8;
244
+ } else t8 = $[19];
245
+ let t10;
246
+ let t9;
247
+ if ($[20] === Symbol.for("react.memo_cache_sentinel")) {
248
+ t9 = () => setWithin(true);
249
+ t10 = (event_3) => {
250
+ if (!event_3.currentTarget.contains(event_3.relatedTarget)) setWithin(false);
251
+ };
252
+ $[20] = t10;
253
+ $[21] = t9;
254
+ } else {
255
+ t10 = $[20];
256
+ t9 = $[21];
257
+ }
258
+ return /* @__PURE__ */ jsx(Popover, {
259
+ open,
260
+ onOpenChange: t5,
261
+ children: /* @__PURE__ */ jsx(PopoverContent, {
262
+ ref: reach,
263
+ "aria-label": t6,
264
+ anchor,
265
+ initialFocus: shownPin || thread && thread.messages.length === 0 ? void 0 : "none",
266
+ finalFocus: t7,
267
+ side: "bottom",
268
+ align: "start",
269
+ sideOffset: 6,
270
+ className: t8,
271
+ onFocus: t9,
272
+ onBlur: t10,
273
+ ...props,
274
+ children: thread && /* @__PURE__ */ jsxs(Fragment$1, { children: [thread.messages.length > 0 && /* @__PURE__ */ jsx("ol", {
275
+ className: "flex flex-col gap-3",
276
+ children: thread.messages.map(_temp2)
277
+ }), (onReply || onResolve) && /* @__PURE__ */ jsxs("form", {
278
+ className: "flex items-center gap-2 ps-8",
279
+ onSubmit: (event_4) => {
280
+ event_4.preventDefault();
281
+ const form = event_4.currentTarget;
282
+ const field = new FormData(form).get("reply");
283
+ const text_0 = typeof field === "string" ? field.trim() : "";
284
+ if (!text_0) return;
285
+ onReply?.(thread.id, text_0, { source: "person" });
286
+ form.reset();
287
+ },
288
+ children: [onReply && /* @__PURE__ */ jsxs(Fragment$1, { children: [/* @__PURE__ */ jsx(Input, {
289
+ "aria-label": labels.reply(author),
290
+ placeholder: labels.replyPlaceholder,
291
+ name: "reply",
292
+ autoComplete: "off",
293
+ className: "h-7 flex-1"
294
+ }), /* @__PURE__ */ jsx(Button, {
295
+ type: "submit",
296
+ variant: "ghost",
297
+ size: "icon-sm",
298
+ "aria-label": labels.send,
299
+ children: /* @__PURE__ */ jsx(Icon, { icon: ArrowUp02Icon })
300
+ })] }), onResolve && /* @__PURE__ */ jsx(Button, {
301
+ variant: "ghost",
302
+ size: "sm",
303
+ className: "ms-auto text-muted-foreground",
304
+ onClick: () => {
305
+ onResolve(thread.id, { source: "person" });
306
+ if (shownPin) setPinned(null);
307
+ else if (editor) focusEditor(editor);
308
+ },
309
+ children: labels.resolve
310
+ })]
311
+ })] })
312
+ })
313
+ });
314
+ }
315
+ function _temp2(message) {
316
+ return /* @__PURE__ */ jsxs("li", {
317
+ className: "flex items-start gap-2",
318
+ children: [/* @__PURE__ */ jsx(PersonAvatar, { person: message.author }), /* @__PURE__ */ jsxs("div", {
319
+ className: "flex min-w-0 flex-1 flex-col gap-0.5",
320
+ children: [/* @__PURE__ */ jsxs("p", {
321
+ className: "flex items-baseline gap-1.5",
322
+ children: [/* @__PURE__ */ jsx("span", {
323
+ className: "text-sm font-medium text-foreground",
324
+ children: message.author.name
325
+ }), message.time && /* @__PURE__ */ jsx("span", {
326
+ className: "font-mono text-xs text-subtle",
327
+ children: message.time
328
+ })]
329
+ }), /* @__PURE__ */ jsx("p", {
330
+ className: "text-sm whitespace-pre-wrap text-foreground",
331
+ children: message.text
332
+ })]
333
+ })]
334
+ }, message.id);
335
+ }
336
+ export { NoteEditorComments };
@@ -0,0 +1,25 @@
1
+ import { NoteBlockInput } from "../blocks.js";
2
+ import { ComponentProps } from "react";
3
+ import { Button } from "@ui-sdk/react/button";
4
+ import { Textarea } from "@ui-sdk/react/textarea";
5
+ /** The note's meta line and title, above its text. */
6
+ declare function NoteEditorHeader({ className, ...props }: ComponentProps<"header">): import("react").JSX.Element;
7
+ /** A line of facts above the title: the area, who edited it and when. */
8
+ declare function NoteEditorMeta({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
9
+ /** The area's color, as a small square before its name. Set it with a `bg-*` class. */
10
+ declare function NoteEditorMetaMark({ className, ...props }: ComponentProps<"span">): import("react").JSX.Element;
11
+ type NoteEditorTitleProps = ComponentProps<typeof Textarea>;
12
+ /**
13
+ * The note's title, a field that grows with it. Enter moves to the text below.
14
+ * Give it an `aria-label`, "Title" by default, and a `placeholder`.
15
+ */
16
+ declare function NoteEditorTitle({ className, onKeyDown, placeholder, ...props }: NoteEditorTitleProps): import("react").JSX.Element;
17
+ /** Ways to start an empty note, shown only while the note is empty. */
18
+ declare function NoteEditorTemplates({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element | null;
19
+ type NoteEditorTemplateProps = ComponentProps<typeof Button> & {
20
+ /** The blocks the note starts with. */
21
+ blocks: NoteBlockInput[];
22
+ };
23
+ /** Fills the empty note with its blocks. Its name stands alone for an agent: "PRD". */
24
+ declare function NoteEditorTemplate({ blocks, className, onClick, ...props }: NoteEditorTemplateProps): import("react").JSX.Element;
25
+ export { NoteEditorHeader, NoteEditorMeta, NoteEditorMetaMark, NoteEditorTemplate, type NoteEditorTemplateProps, NoteEditorTemplates, NoteEditorTitle, type NoteEditorTitleProps };
@@ -0,0 +1,263 @@
1
+ "use client";
2
+ import { cn, cnState } from "../../../utilities/cn/index.js";
3
+ import { NoteEditorContext, focusEditor } from "../editor.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { use } from "react";
6
+ import { jsx } from "react/jsx-runtime";
7
+ import { Button } from "@ui-sdk/react/button";
8
+ import { Textarea } from "@ui-sdk/react/textarea";
9
+ // src/components/note-editor/parts/header.tsx
10
+ /** The note's meta line and title, above its text. */
11
+ function NoteEditorHeader(t0) {
12
+ const $ = c(8);
13
+ let className;
14
+ let props;
15
+ if ($[0] !== t0) {
16
+ ({className, ...props} = t0);
17
+ $[0] = t0;
18
+ $[1] = className;
19
+ $[2] = props;
20
+ } else {
21
+ className = $[1];
22
+ props = $[2];
23
+ }
24
+ let t1;
25
+ if ($[3] !== className) {
26
+ t1 = cn("flex flex-col gap-2 pb-4", className);
27
+ $[3] = className;
28
+ $[4] = t1;
29
+ } else t1 = $[4];
30
+ let t2;
31
+ if ($[5] !== props || $[6] !== t1) {
32
+ t2 = /* @__PURE__ */ jsx("header", {
33
+ "data-slot": "note-editor-header",
34
+ className: t1,
35
+ ...props
36
+ });
37
+ $[5] = props;
38
+ $[6] = t1;
39
+ $[7] = t2;
40
+ } else t2 = $[7];
41
+ return t2;
42
+ }
43
+ /** A line of facts above the title: the area, who edited it and when. */
44
+ function NoteEditorMeta(t0) {
45
+ const $ = c(8);
46
+ let className;
47
+ let props;
48
+ if ($[0] !== t0) {
49
+ ({className, ...props} = t0);
50
+ $[0] = t0;
51
+ $[1] = className;
52
+ $[2] = props;
53
+ } else {
54
+ className = $[1];
55
+ props = $[2];
56
+ }
57
+ let t1;
58
+ if ($[3] !== className) {
59
+ t1 = cn("flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-1 text-supporting text-subtle", className);
60
+ $[3] = className;
61
+ $[4] = t1;
62
+ } else t1 = $[4];
63
+ let t2;
64
+ if ($[5] !== props || $[6] !== t1) {
65
+ t2 = /* @__PURE__ */ jsx("div", {
66
+ "data-slot": "note-editor-meta",
67
+ className: t1,
68
+ ...props
69
+ });
70
+ $[5] = props;
71
+ $[6] = t1;
72
+ $[7] = t2;
73
+ } else t2 = $[7];
74
+ return t2;
75
+ }
76
+ /** The area's color, as a small square before its name. Set it with a `bg-*` class. */
77
+ function NoteEditorMetaMark(t0) {
78
+ const $ = c(8);
79
+ let className;
80
+ let props;
81
+ if ($[0] !== t0) {
82
+ ({className, ...props} = t0);
83
+ $[0] = t0;
84
+ $[1] = className;
85
+ $[2] = props;
86
+ } else {
87
+ className = $[1];
88
+ props = $[2];
89
+ }
90
+ let t1;
91
+ if ($[3] !== className) {
92
+ t1 = cn("size-2 shrink-0 rounded-2xs bg-subtle", className);
93
+ $[3] = className;
94
+ $[4] = t1;
95
+ } else t1 = $[4];
96
+ let t2;
97
+ if ($[5] !== props || $[6] !== t1) {
98
+ t2 = /* @__PURE__ */ jsx("span", {
99
+ "aria-hidden": "true",
100
+ "data-slot": "note-editor-meta-mark",
101
+ className: t1,
102
+ ...props
103
+ });
104
+ $[5] = props;
105
+ $[6] = t1;
106
+ $[7] = t2;
107
+ } else t2 = $[7];
108
+ return t2;
109
+ }
110
+ /**
111
+ * The note's title, a field that grows with it. Enter moves to the text below.
112
+ * Give it an `aria-label`, "Title" by default, and a `placeholder`.
113
+ */
114
+ function NoteEditorTitle(t0) {
115
+ const $ = c(15);
116
+ let className;
117
+ let onKeyDown;
118
+ let props;
119
+ let t1;
120
+ if ($[0] !== t0) {
121
+ ({className, onKeyDown, placeholder: t1, ...props} = t0);
122
+ $[0] = t0;
123
+ $[1] = className;
124
+ $[2] = onKeyDown;
125
+ $[3] = props;
126
+ $[4] = t1;
127
+ } else {
128
+ className = $[1];
129
+ onKeyDown = $[2];
130
+ props = $[3];
131
+ t1 = $[4];
132
+ }
133
+ const placeholder = t1 === void 0 ? "Untitled" : t1;
134
+ const editor = use(NoteEditorContext)?.editor ?? null;
135
+ let t2;
136
+ if ($[5] !== editor || $[6] !== onKeyDown) {
137
+ t2 = (event) => {
138
+ onKeyDown?.(event);
139
+ if (event.defaultPrevented || event.key !== "Enter" || event.shiftKey) return;
140
+ if (event.nativeEvent.isComposing || !editor) return;
141
+ event.preventDefault();
142
+ focusEditor(editor, "start");
143
+ };
144
+ $[5] = editor;
145
+ $[6] = onKeyDown;
146
+ $[7] = t2;
147
+ } else t2 = $[7];
148
+ let t3;
149
+ if ($[8] !== className) {
150
+ t3 = cnState("w-full resize-none bg-transparent text-display-3 text-foreground outline-none placeholder:text-placeholder", className);
151
+ $[8] = className;
152
+ $[9] = t3;
153
+ } else t3 = $[9];
154
+ let t4;
155
+ if ($[10] !== placeholder || $[11] !== props || $[12] !== t2 || $[13] !== t3) {
156
+ t4 = /* @__PURE__ */ jsx(Textarea, {
157
+ "aria-label": "Title",
158
+ rows: 1,
159
+ autoResize: true,
160
+ placeholder,
161
+ onKeyDown: t2,
162
+ className: t3,
163
+ ...props
164
+ });
165
+ $[10] = placeholder;
166
+ $[11] = props;
167
+ $[12] = t2;
168
+ $[13] = t3;
169
+ $[14] = t4;
170
+ } else t4 = $[14];
171
+ return t4;
172
+ }
173
+ /** Ways to start an empty note, shown only while the note is empty. */
174
+ function NoteEditorTemplates(t0) {
175
+ const $ = c(8);
176
+ let className;
177
+ let props;
178
+ if ($[0] !== t0) {
179
+ ({className, ...props} = t0);
180
+ $[0] = t0;
181
+ $[1] = className;
182
+ $[2] = props;
183
+ } else {
184
+ className = $[1];
185
+ props = $[2];
186
+ }
187
+ const context = use(NoteEditorContext);
188
+ if (!context?.empty || context.readOnly) return null;
189
+ let t1;
190
+ if ($[3] !== className) {
191
+ t1 = cn("mt-3 flex flex-wrap items-center gap-x-1.5 gap-y-1 text-sm text-subtle", "[&>button+button]:before:me-1.5 [&>button+button]:before:text-subtle [&>button+button]:before:content-['·']", className);
192
+ $[3] = className;
193
+ $[4] = t1;
194
+ } else t1 = $[4];
195
+ let t2;
196
+ if ($[5] !== props || $[6] !== t1) {
197
+ t2 = /* @__PURE__ */ jsx("div", {
198
+ role: "group",
199
+ "aria-label": "Templates",
200
+ "data-slot": "note-editor-templates",
201
+ className: t1,
202
+ ...props
203
+ });
204
+ $[5] = props;
205
+ $[6] = t1;
206
+ $[7] = t2;
207
+ } else t2 = $[7];
208
+ return t2;
209
+ }
210
+ /** Fills the empty note with its blocks. Its name stands alone for an agent: "PRD". */
211
+ function NoteEditorTemplate(t0) {
212
+ const $ = c(15);
213
+ let blocks;
214
+ let className;
215
+ let onClick;
216
+ let props;
217
+ if ($[0] !== t0) {
218
+ ({blocks, className, onClick, ...props} = t0);
219
+ $[0] = t0;
220
+ $[1] = blocks;
221
+ $[2] = className;
222
+ $[3] = onClick;
223
+ $[4] = props;
224
+ } else {
225
+ blocks = $[1];
226
+ className = $[2];
227
+ onClick = $[3];
228
+ props = $[4];
229
+ }
230
+ const context = use(NoteEditorContext);
231
+ let t1;
232
+ if ($[5] !== className) {
233
+ t1 = cnState("inline-flex items-center rounded-xs font-medium text-muted-foreground transition-colors hover:text-foreground focus-ring motion-reduce:transition-none", className);
234
+ $[5] = className;
235
+ $[6] = t1;
236
+ } else t1 = $[6];
237
+ let t2;
238
+ if ($[7] !== blocks || $[8] !== context || $[9] !== onClick) {
239
+ t2 = (event, ...t3) => {
240
+ onClick?.(event, ...t3);
241
+ if (!event.defaultPrevented) context?.applyTemplate(blocks);
242
+ };
243
+ $[7] = blocks;
244
+ $[8] = context;
245
+ $[9] = onClick;
246
+ $[10] = t2;
247
+ } else t2 = $[10];
248
+ let t3;
249
+ if ($[11] !== props || $[12] !== t1 || $[13] !== t2) {
250
+ t3 = /* @__PURE__ */ jsx(Button, {
251
+ "data-slot": "note-editor-template",
252
+ className: t1,
253
+ onClick: t2,
254
+ ...props
255
+ });
256
+ $[11] = props;
257
+ $[12] = t1;
258
+ $[13] = t2;
259
+ $[14] = t3;
260
+ } else t3 = $[14];
261
+ return t3;
262
+ }
263
+ export { NoteEditorHeader, NoteEditorMeta, NoteEditorMetaMark, NoteEditorTemplate, NoteEditorTemplates, NoteEditorTitle };
@@ -0,0 +1,56 @@
1
+ import { IconSvgElement } from "../../icon/icon.js";
2
+ import { Timeline, TimelineDescription, TimelineItem, TimelineTitle } from "../../timeline/timeline.js";
3
+ import { ComponentProps, ReactNode } from "react";
4
+ import { Button } from "@ui-sdk/react/button";
5
+ type NoteEditorHistoryProps = ComponentProps<"section"> & {
6
+ /** The column's title. */
7
+ title?: ReactNode;
8
+ /** A line beside the title. */
9
+ description?: ReactNode;
10
+ };
11
+ /**
12
+ * The column: a title, then what the app puts in it, like a filter and one
13
+ * `NoteEditorHistoryDay` per day.
14
+ */
15
+ declare function NoteEditorHistory({ title, description, className, children, ...props }: NoteEditorHistoryProps): import("react").JSX.Element;
16
+ type NoteEditorHistoryDayProps = Omit<ComponentProps<typeof Timeline>, "aria-label"> & {
17
+ /** The day, as the app writes it: "Today", "Yesterday", "4 Nov". It also names the day's list. */
18
+ label: string;
19
+ };
20
+ /** One day's events, under its name, on a line. */
21
+ declare function NoteEditorHistoryDay({ label, className, ...props }: NoteEditorHistoryDayProps): import("react").JSX.Element;
22
+ type NoteEditorHistoryEventProps = Omit<ComponentProps<typeof TimelineItem>, "status" | "children"> & {
23
+ children?: ReactNode;
24
+ /** What kind of change: an edit, the assistant, a status, a share. */
25
+ icon?: IconSvgElement;
26
+ /** Something else in the dot in place of the icon, like the assistant's mark. */
27
+ media?: ReactNode;
28
+ /** The version being looked at: its dot fills and it says so. */
29
+ viewing?: boolean;
30
+ /** The line under the version being looked at. */
31
+ viewingLabel?: ReactNode;
32
+ };
33
+ /**
34
+ * One change: a dot with its kind, then `NoteEditorHistoryEventTitle` and
35
+ * anything under it, like a detail, a quote or an action.
36
+ */
37
+ declare function NoteEditorHistoryEvent({ icon, media, viewing, viewingLabel, className, children, ...props }: NoteEditorHistoryEventProps): import("react").JSX.Element;
38
+ type NoteEditorHistoryEventTitleProps = ComponentProps<typeof TimelineTitle> & {
39
+ /** When it happened, as the app writes it: "17:42". */
40
+ time?: ReactNode;
41
+ /** The time in machine form, like "2026-11-14T17:42". */
42
+ dateTime?: string;
43
+ };
44
+ /** Who did what, with the names in `<strong>`, and when. */
45
+ declare function NoteEditorHistoryEventTitle({ time, dateTime, className, ...props }: NoteEditorHistoryEventTitleProps): import("react").JSX.Element;
46
+ /** A line under the title: "6 changes", who accepted it, a status's owner. */
47
+ declare function NoteEditorHistoryEventDetail({ className, ...props }: ComponentProps<typeof TimelineDescription>): import("react").JSX.Element;
48
+ /** The text a change touched, in a quiet box: what was added, or what was accepted. */
49
+ declare function NoteEditorHistoryEventQuote({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
50
+ /**
51
+ * An action inside a line, like "See the changes". Every event can have one,
52
+ * so give each a name that holds its text and stands alone: "See the
53
+ * changes: Diego, 09:31".
54
+ */
55
+ declare function NoteEditorHistoryEventAction({ className, ...props }: ComponentProps<typeof Button>): import("react").JSX.Element;
56
+ export { NoteEditorHistory, NoteEditorHistoryDay, type NoteEditorHistoryDayProps, NoteEditorHistoryEvent, NoteEditorHistoryEventAction, NoteEditorHistoryEventDetail, type NoteEditorHistoryEventProps, NoteEditorHistoryEventQuote, NoteEditorHistoryEventTitle, type NoteEditorHistoryEventTitleProps, type NoteEditorHistoryProps };