@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,409 @@
1
+ "use client";
2
+ import { cn, cnState } from "../../../utilities/cn/index.js";
3
+ import { Icon } from "../../icon/icon.js";
4
+ import { Timeline, TimelineConnector, TimelineDescription, TimelineItem, TimelineMarker, TimelineTime, TimelineTitle } from "../../timeline/timeline.js";
5
+ import { c } from "react/compiler-runtime";
6
+ import { useId } from "react";
7
+ import { jsx, jsxs } from "react/jsx-runtime";
8
+ import { Button } from "@ui-sdk/react/button";
9
+ // src/components/note-editor/parts/history.tsx
10
+ /**
11
+ * The column: a title, then what the app puts in it, like a filter and one
12
+ * `NoteEditorHistoryDay` per day.
13
+ */
14
+ function NoteEditorHistory(t0) {
15
+ const $ = c(22);
16
+ let children;
17
+ let className;
18
+ let props;
19
+ let t1;
20
+ let t2;
21
+ if ($[0] !== t0) {
22
+ ({title: t1, description: t2, className, children, ...props} = t0);
23
+ $[0] = t0;
24
+ $[1] = children;
25
+ $[2] = className;
26
+ $[3] = props;
27
+ $[4] = t1;
28
+ $[5] = t2;
29
+ } else {
30
+ children = $[1];
31
+ className = $[2];
32
+ props = $[3];
33
+ t1 = $[4];
34
+ t2 = $[5];
35
+ }
36
+ const title = t1 === void 0 ? "History" : t1;
37
+ const description = t2 === void 0 ? "Every change is saved" : t2;
38
+ const id = useId();
39
+ let t3;
40
+ if ($[6] !== className) {
41
+ t3 = cn("flex min-w-0 flex-col gap-3", className);
42
+ $[6] = className;
43
+ $[7] = t3;
44
+ } else t3 = $[7];
45
+ let t4;
46
+ if ($[8] !== id || $[9] !== title) {
47
+ t4 = /* @__PURE__ */ jsx("h2", {
48
+ id,
49
+ className: "min-w-0 flex-1 text-sm font-medium text-foreground",
50
+ children: title
51
+ });
52
+ $[8] = id;
53
+ $[9] = title;
54
+ $[10] = t4;
55
+ } else t4 = $[10];
56
+ let t5;
57
+ if ($[11] !== description) {
58
+ t5 = description && /* @__PURE__ */ jsx("p", {
59
+ className: "text-xs text-subtle",
60
+ children: description
61
+ });
62
+ $[11] = description;
63
+ $[12] = t5;
64
+ } else t5 = $[12];
65
+ let t6;
66
+ if ($[13] !== t4 || $[14] !== t5) {
67
+ t6 = /* @__PURE__ */ jsxs("div", {
68
+ className: "flex min-h-7 items-center gap-2",
69
+ children: [t4, t5]
70
+ });
71
+ $[13] = t4;
72
+ $[14] = t5;
73
+ $[15] = t6;
74
+ } else t6 = $[15];
75
+ let t7;
76
+ if ($[16] !== children || $[17] !== id || $[18] !== props || $[19] !== t3 || $[20] !== t6) {
77
+ t7 = /* @__PURE__ */ jsxs("section", {
78
+ "aria-labelledby": id,
79
+ "data-slot": "note-editor-history",
80
+ className: t3,
81
+ ...props,
82
+ children: [t6, children]
83
+ });
84
+ $[16] = children;
85
+ $[17] = id;
86
+ $[18] = props;
87
+ $[19] = t3;
88
+ $[20] = t6;
89
+ $[21] = t7;
90
+ } else t7 = $[21];
91
+ return t7;
92
+ }
93
+ /** One day's events, under its name, on a line. */
94
+ function NoteEditorHistoryDay(t0) {
95
+ const $ = c(15);
96
+ let className;
97
+ let label;
98
+ let props;
99
+ if ($[0] !== t0) {
100
+ ({label, className, ...props} = t0);
101
+ $[0] = t0;
102
+ $[1] = className;
103
+ $[2] = label;
104
+ $[3] = props;
105
+ } else {
106
+ className = $[1];
107
+ label = $[2];
108
+ props = $[3];
109
+ }
110
+ let t1;
111
+ if ($[4] !== label) {
112
+ t1 = /* @__PURE__ */ jsx("h3", {
113
+ "aria-hidden": "true",
114
+ className: "ps-9 text-xs font-medium text-muted-foreground",
115
+ children: label
116
+ });
117
+ $[4] = label;
118
+ $[5] = t1;
119
+ } else t1 = $[5];
120
+ let t2;
121
+ if ($[6] !== className) {
122
+ t2 = cnState("gap-0", className);
123
+ $[6] = className;
124
+ $[7] = t2;
125
+ } else t2 = $[7];
126
+ let t3;
127
+ if ($[8] !== label || $[9] !== props || $[10] !== t2) {
128
+ t3 = /* @__PURE__ */ jsx(Timeline, {
129
+ "aria-label": label,
130
+ className: t2,
131
+ ...props
132
+ });
133
+ $[8] = label;
134
+ $[9] = props;
135
+ $[10] = t2;
136
+ $[11] = t3;
137
+ } else t3 = $[11];
138
+ let t4;
139
+ if ($[12] !== t1 || $[13] !== t3) {
140
+ t4 = /* @__PURE__ */ jsxs("div", {
141
+ "data-slot": "note-editor-history-day",
142
+ className: "flex flex-col gap-1.5 not-first:pt-2",
143
+ children: [t1, t3]
144
+ });
145
+ $[12] = t1;
146
+ $[13] = t3;
147
+ $[14] = t4;
148
+ } else t4 = $[14];
149
+ return t4;
150
+ }
151
+ /**
152
+ * One change: a dot with its kind, then `NoteEditorHistoryEventTitle` and
153
+ * anything under it, like a detail, a quote or an action.
154
+ */
155
+ function NoteEditorHistoryEvent(t0) {
156
+ const $ = c(27);
157
+ let children;
158
+ let className;
159
+ let icon;
160
+ let media;
161
+ let props;
162
+ let t1;
163
+ let viewing;
164
+ if ($[0] !== t0) {
165
+ ({icon, media, viewing, viewingLabel: t1, className, children, ...props} = t0);
166
+ $[0] = t0;
167
+ $[1] = children;
168
+ $[2] = className;
169
+ $[3] = icon;
170
+ $[4] = media;
171
+ $[5] = props;
172
+ $[6] = t1;
173
+ $[7] = viewing;
174
+ } else {
175
+ children = $[1];
176
+ className = $[2];
177
+ icon = $[3];
178
+ media = $[4];
179
+ props = $[5];
180
+ t1 = $[6];
181
+ viewing = $[7];
182
+ }
183
+ const viewingLabel = t1 === void 0 ? "You're viewing this version" : t1;
184
+ const t2 = viewing ? "current" : void 0;
185
+ const t3 = viewing ? "" : void 0;
186
+ let t4;
187
+ if ($[8] !== className) {
188
+ t4 = cnState("group/history-event ps-9 pb-3 last:pb-0", className);
189
+ $[8] = className;
190
+ $[9] = t4;
191
+ } else t4 = $[9];
192
+ let t5;
193
+ if ($[10] !== icon || $[11] !== media) {
194
+ t5 = media ?? (icon && /* @__PURE__ */ jsx(Icon, { icon }));
195
+ $[10] = icon;
196
+ $[11] = media;
197
+ $[12] = t5;
198
+ } else t5 = $[12];
199
+ let t6;
200
+ if ($[13] !== t5) {
201
+ t6 = /* @__PURE__ */ jsx(TimelineMarker, {
202
+ className: "top-0 size-6 border-0 bg-muted text-muted-foreground data-current:bg-primary data-current:text-primary-foreground [&_svg]:size-3",
203
+ children: t5
204
+ });
205
+ $[13] = t5;
206
+ $[14] = t6;
207
+ } else t6 = $[14];
208
+ let t7;
209
+ if ($[15] === Symbol.for("react.memo_cache_sentinel")) {
210
+ t7 = /* @__PURE__ */ jsx(TimelineConnector, { className: "start-[calc(--spacing(3)-0.5px)] top-7 -bottom-0.5" });
211
+ $[15] = t7;
212
+ } else t7 = $[15];
213
+ let t8;
214
+ if ($[16] !== viewing || $[17] !== viewingLabel) {
215
+ t8 = viewing && viewingLabel && /* @__PURE__ */ jsx("p", {
216
+ className: "pt-1 text-xs text-subtle",
217
+ children: viewingLabel
218
+ });
219
+ $[16] = viewing;
220
+ $[17] = viewingLabel;
221
+ $[18] = t8;
222
+ } else t8 = $[18];
223
+ let t9;
224
+ if ($[19] !== children || $[20] !== props || $[21] !== t2 || $[22] !== t3 || $[23] !== t4 || $[24] !== t6 || $[25] !== t8) {
225
+ t9 = /* @__PURE__ */ jsxs(TimelineItem, {
226
+ status: t2,
227
+ "data-viewing": t3,
228
+ className: t4,
229
+ ...props,
230
+ children: [
231
+ t6,
232
+ t7,
233
+ children,
234
+ t8
235
+ ]
236
+ });
237
+ $[19] = children;
238
+ $[20] = props;
239
+ $[21] = t2;
240
+ $[22] = t3;
241
+ $[23] = t4;
242
+ $[24] = t6;
243
+ $[25] = t8;
244
+ $[26] = t9;
245
+ } else t9 = $[26];
246
+ return t9;
247
+ }
248
+ /** Who did what, with the names in `<strong>`, and when. */
249
+ function NoteEditorHistoryEventTitle(t0) {
250
+ const $ = c(16);
251
+ let className;
252
+ let dateTime;
253
+ let props;
254
+ let time;
255
+ if ($[0] !== t0) {
256
+ ({time, dateTime, className, ...props} = t0);
257
+ $[0] = t0;
258
+ $[1] = className;
259
+ $[2] = dateTime;
260
+ $[3] = props;
261
+ $[4] = time;
262
+ } else {
263
+ className = $[1];
264
+ dateTime = $[2];
265
+ props = $[3];
266
+ time = $[4];
267
+ }
268
+ let t1;
269
+ if ($[5] !== className) {
270
+ t1 = cnState("min-w-0 flex-1 text-sm font-normal text-foreground [&_strong]:font-medium", className);
271
+ $[5] = className;
272
+ $[6] = t1;
273
+ } else t1 = $[6];
274
+ let t2;
275
+ if ($[7] !== props || $[8] !== t1) {
276
+ t2 = /* @__PURE__ */ jsx(TimelineTitle, {
277
+ className: t1,
278
+ ...props
279
+ });
280
+ $[7] = props;
281
+ $[8] = t1;
282
+ $[9] = t2;
283
+ } else t2 = $[9];
284
+ let t3;
285
+ if ($[10] !== dateTime || $[11] !== time) {
286
+ t3 = time && /* @__PURE__ */ jsx(TimelineTime, {
287
+ dateTime,
288
+ className: "shrink-0 font-mono text-xs leading-5 text-subtle group-data-viewing/history-event:text-foreground",
289
+ children: time
290
+ });
291
+ $[10] = dateTime;
292
+ $[11] = time;
293
+ $[12] = t3;
294
+ } else t3 = $[12];
295
+ let t4;
296
+ if ($[13] !== t2 || $[14] !== t3) {
297
+ t4 = /* @__PURE__ */ jsxs("div", {
298
+ className: "flex w-full min-w-0 items-start gap-2 pt-0.5",
299
+ children: [t2, t3]
300
+ });
301
+ $[13] = t2;
302
+ $[14] = t3;
303
+ $[15] = t4;
304
+ } else t4 = $[15];
305
+ return t4;
306
+ }
307
+ /** A line under the title: "6 changes", who accepted it, a status's owner. */
308
+ function NoteEditorHistoryEventDetail(t0) {
309
+ const $ = c(8);
310
+ let className;
311
+ let props;
312
+ if ($[0] !== t0) {
313
+ ({className, ...props} = t0);
314
+ $[0] = t0;
315
+ $[1] = className;
316
+ $[2] = props;
317
+ } else {
318
+ className = $[1];
319
+ props = $[2];
320
+ }
321
+ let t1;
322
+ if ($[3] !== className) {
323
+ t1 = cnState("text-xs text-muted-foreground", className);
324
+ $[3] = className;
325
+ $[4] = t1;
326
+ } else t1 = $[4];
327
+ let t2;
328
+ if ($[5] !== props || $[6] !== t1) {
329
+ t2 = /* @__PURE__ */ jsx(TimelineDescription, {
330
+ className: t1,
331
+ ...props
332
+ });
333
+ $[5] = props;
334
+ $[6] = t1;
335
+ $[7] = t2;
336
+ } else t2 = $[7];
337
+ return t2;
338
+ }
339
+ /** The text a change touched, in a quiet box: what was added, or what was accepted. */
340
+ function NoteEditorHistoryEventQuote(t0) {
341
+ const $ = c(8);
342
+ let className;
343
+ let props;
344
+ if ($[0] !== t0) {
345
+ ({className, ...props} = t0);
346
+ $[0] = t0;
347
+ $[1] = className;
348
+ $[2] = props;
349
+ } else {
350
+ className = $[1];
351
+ props = $[2];
352
+ }
353
+ let t1;
354
+ if ($[3] !== className) {
355
+ t1 = cn("mt-1.5 flex w-full flex-col gap-1 rounded-md bg-muted px-2.5 py-2 text-xs text-foreground", className);
356
+ $[3] = className;
357
+ $[4] = t1;
358
+ } else t1 = $[4];
359
+ let t2;
360
+ if ($[5] !== props || $[6] !== t1) {
361
+ t2 = /* @__PURE__ */ jsx("div", {
362
+ "data-slot": "note-editor-history-quote",
363
+ className: t1,
364
+ ...props
365
+ });
366
+ $[5] = props;
367
+ $[6] = t1;
368
+ $[7] = t2;
369
+ } else t2 = $[7];
370
+ return t2;
371
+ }
372
+ /**
373
+ * An action inside a line, like "See the changes". Every event can have one,
374
+ * so give each a name that holds its text and stands alone: "See the
375
+ * changes: Diego, 09:31".
376
+ */
377
+ function NoteEditorHistoryEventAction(t0) {
378
+ const $ = c(8);
379
+ let className;
380
+ let props;
381
+ if ($[0] !== t0) {
382
+ ({className, ...props} = t0);
383
+ $[0] = t0;
384
+ $[1] = className;
385
+ $[2] = props;
386
+ } else {
387
+ className = $[1];
388
+ props = $[2];
389
+ }
390
+ let t1;
391
+ if ($[3] !== className) {
392
+ t1 = cnState("rounded-xs font-medium text-link underline decoration-link/40 underline-offset-2 transition-colors hover:decoration-link focus-ring", className);
393
+ $[3] = className;
394
+ $[4] = t1;
395
+ } else t1 = $[4];
396
+ let t2;
397
+ if ($[5] !== props || $[6] !== t1) {
398
+ t2 = /* @__PURE__ */ jsx(Button, {
399
+ "data-slot": "note-editor-history-action",
400
+ className: t1,
401
+ ...props
402
+ });
403
+ $[5] = props;
404
+ $[6] = t1;
405
+ $[7] = t2;
406
+ } else t2 = $[7];
407
+ return t2;
408
+ }
409
+ export { NoteEditorHistory, NoteEditorHistoryDay, NoteEditorHistoryEvent, NoteEditorHistoryEventAction, NoteEditorHistoryEventDetail, NoteEditorHistoryEventQuote, NoteEditorHistoryEventTitle };
@@ -0,0 +1,31 @@
1
+ import { IconSvgElement } from "../../icon/icon.js";
2
+ import { NotePerson } from "../person.js";
3
+ import "../people.js";
4
+ import { ComponentProps, ReactNode } from "react";
5
+ type NoteEditorPresenceProps = Omit<ComponentProps<"div">, "children"> & {
6
+ /** Who else has the note open. Inside `NoteEditor`, its `presence` by default. */
7
+ people?: readonly NotePerson[];
8
+ /** The most avatars shown; the rest is a count. */
9
+ max?: number;
10
+ /** The line beside the avatars, from how many are here. */
11
+ label?: (count: number) => string;
12
+ };
13
+ /**
14
+ * Who else has the note open: their avatars, ringed in their color, and how
15
+ * many. With nobody else, it shows nothing.
16
+ */
17
+ declare function NoteEditorPresence({ people: own, max, label, className, ...props }: NoteEditorPresenceProps): import("react").JSX.Element | null;
18
+ type NoteEditorBannerProps = ComponentProps<"div"> & {
19
+ /** An icon at the start, like a crossed-out Wi-Fi for being offline. */
20
+ icon?: IconSvgElement;
21
+ /** Something else at the start in place of the icon, like an avatar. */
22
+ media?: ReactNode;
23
+ /** At the end, like the time a change happened. */
24
+ end?: ReactNode;
25
+ };
26
+ /**
27
+ * A quiet bar under the page's header, never a floating notice: being
28
+ * offline, or someone moving the note while you write. Writing goes on.
29
+ */
30
+ declare function NoteEditorBanner({ icon, media, end, className, children, ...props }: NoteEditorBannerProps): import("react").JSX.Element;
31
+ export { NoteEditorBanner, type NoteEditorBannerProps, NoteEditorPresence, type NoteEditorPresenceProps };
@@ -0,0 +1,140 @@
1
+ "use client";
2
+ import { cn } from "../../../utilities/cn/index.js";
3
+ import { Avatar, AvatarFallback, AvatarImage } from "../../avatar/avatar.js";
4
+ import { AvatarGroup, AvatarGroupCount } from "../../avatar-group/avatar-group.js";
5
+ import { Icon } from "../../icon/icon.js";
6
+ import { NoteEditorContext } from "../editor.js";
7
+ import { initials, personColor } from "../person.js";
8
+ import "../people.js";
9
+ import { c } from "react/compiler-runtime";
10
+ import { use } from "react";
11
+ import { jsx, jsxs } from "react/jsx-runtime";
12
+ // src/components/note-editor/parts/presence.tsx
13
+ /**
14
+ * Who else has the note open: their avatars, ringed in their color, and how
15
+ * many. With nobody else, it shows nothing.
16
+ */
17
+ function NoteEditorPresence({ people: own, max = 3, label = (count) => `${count} here`, className, ...props }) {
18
+ const people = own ?? use(NoteEditorContext)?.presence ?? [];
19
+ if (people.length === 0) return null;
20
+ const shown = people.slice(0, max);
21
+ const text = label(people.length);
22
+ return /* @__PURE__ */ jsxs("div", {
23
+ role: "group",
24
+ "aria-label": `${text}: ${people.map((person) => person.name).join(", ")}`,
25
+ "data-slot": "note-editor-presence",
26
+ className: cn("flex shrink-0 items-center gap-2", className),
27
+ ...props,
28
+ children: [/* @__PURE__ */ jsxs(AvatarGroup, {
29
+ className: "-space-x-1 *:data-[slot=avatar]:ring-[1.5px] *:data-[slot=avatar]:ring-(--presence)",
30
+ children: [shown.map((person_0) => /* @__PURE__ */ jsxs(Avatar, {
31
+ role: "img",
32
+ "aria-label": person_0.name,
33
+ style: { "--presence": personColor(person_0) },
34
+ className: "size-6 border-[1.5px] border-background",
35
+ children: [person_0.image && /* @__PURE__ */ jsx(AvatarImage, {
36
+ src: person_0.image,
37
+ alt: ""
38
+ }), /* @__PURE__ */ jsx(AvatarFallback, {
39
+ "aria-hidden": true,
40
+ className: "text-xs",
41
+ children: initials(person_0.name)
42
+ })]
43
+ }, person_0.id)), people.length > shown.length && /* @__PURE__ */ jsxs(AvatarGroupCount, {
44
+ "aria-hidden": true,
45
+ className: "size-6 text-xs",
46
+ children: ["+", people.length - shown.length]
47
+ })]
48
+ }), /* @__PURE__ */ jsx("span", {
49
+ "aria-hidden": "true",
50
+ className: "text-xs text-muted-foreground",
51
+ children: text
52
+ })]
53
+ });
54
+ }
55
+ /**
56
+ * A quiet bar under the page's header, never a floating notice: being
57
+ * offline, or someone moving the note while you write. Writing goes on.
58
+ */
59
+ function NoteEditorBanner(t0) {
60
+ const $ = c(22);
61
+ let children;
62
+ let className;
63
+ let end;
64
+ let icon;
65
+ let media;
66
+ let props;
67
+ if ($[0] !== t0) {
68
+ ({icon, media, end, className, children, ...props} = t0);
69
+ $[0] = t0;
70
+ $[1] = children;
71
+ $[2] = className;
72
+ $[3] = end;
73
+ $[4] = icon;
74
+ $[5] = media;
75
+ $[6] = props;
76
+ } else {
77
+ children = $[1];
78
+ className = $[2];
79
+ end = $[3];
80
+ icon = $[4];
81
+ media = $[5];
82
+ props = $[6];
83
+ }
84
+ let t1;
85
+ if ($[7] !== className) {
86
+ t1 = cn("flex min-h-9 items-center gap-2 border-b border-border bg-muted px-3.5 py-2 text-xs text-foreground", className);
87
+ $[7] = className;
88
+ $[8] = t1;
89
+ } else t1 = $[8];
90
+ let t2;
91
+ if ($[9] !== icon || $[10] !== media) {
92
+ t2 = media ?? (icon && /* @__PURE__ */ jsx(Icon, {
93
+ icon,
94
+ className: "size-3.5 shrink-0 text-muted-foreground"
95
+ }));
96
+ $[9] = icon;
97
+ $[10] = media;
98
+ $[11] = t2;
99
+ } else t2 = $[11];
100
+ let t3;
101
+ if ($[12] !== children) {
102
+ t3 = /* @__PURE__ */ jsx("p", {
103
+ className: "min-w-0 flex-1",
104
+ children
105
+ });
106
+ $[12] = children;
107
+ $[13] = t3;
108
+ } else t3 = $[13];
109
+ let t4;
110
+ if ($[14] !== end) {
111
+ t4 = end && /* @__PURE__ */ jsx("span", {
112
+ className: "shrink-0 font-mono text-subtle",
113
+ children: end
114
+ });
115
+ $[14] = end;
116
+ $[15] = t4;
117
+ } else t4 = $[15];
118
+ let t5;
119
+ if ($[16] !== props || $[17] !== t1 || $[18] !== t2 || $[19] !== t3 || $[20] !== t4) {
120
+ t5 = /* @__PURE__ */ jsxs("div", {
121
+ role: "status",
122
+ "data-slot": "note-editor-banner",
123
+ className: t1,
124
+ ...props,
125
+ children: [
126
+ t2,
127
+ t3,
128
+ t4
129
+ ]
130
+ });
131
+ $[16] = props;
132
+ $[17] = t1;
133
+ $[18] = t2;
134
+ $[19] = t3;
135
+ $[20] = t4;
136
+ $[21] = t5;
137
+ } else t5 = $[21];
138
+ return t5;
139
+ }
140
+ export { NoteEditorBanner, NoteEditorPresence };
@@ -0,0 +1,45 @@
1
+ import { NoteActionDetails, NoteSuggestion } from "../people.js";
2
+ import { ComponentProps } from "react";
3
+ type NoteEditorSuggestionLabels = {
4
+ accept: string;
5
+ discard: string;
6
+ /** A stale suggestion's way forward: the app writes it again on the block as it is now. */
7
+ redo: string;
8
+ /** Before a stale suggestion's reason. */
9
+ stale: string;
10
+ /**
11
+ * Names one suggestion, from its author and the start of its block's text.
12
+ * Each button's name is its text and this, so several suggestions never
13
+ * share a name.
14
+ */
15
+ suggestion: (author: string, block: string) => string;
16
+ };
17
+ type SuggestionHandler = (suggestion: NoteSuggestion, details: NoteActionDetails) => void;
18
+ type NoteEditorSuggestionProps = Omit<ComponentProps<"div">, "children"> & {
19
+ suggestion: NoteSuggestion;
20
+ /** Runs on Accept. Inside `NoteEditor`, its `onSuggestionAccept` by default. */
21
+ onAccept?: SuggestionHandler;
22
+ /** Runs on Discard. Inside `NoteEditor`, its `onSuggestionDiscard` by default. */
23
+ onDiscard?: SuggestionHandler;
24
+ /** Runs on Redo, for a stale one. Without it, a stale suggestion only offers Discard. */
25
+ onRedo?: SuggestionHandler;
26
+ /** Replaces any of the default texts, to translate them. */
27
+ labels?: Partial<NoteEditorSuggestionLabels>;
28
+ /** What the suggestion's name calls its block. The start of the block's text inside `NoteEditor`. */
29
+ blockLabel?: string;
30
+ };
31
+ /** The assistant's mark: a dark square with its violet dot. Its events in the history take it too. */
32
+ declare function NoteEditorAssistantMark({ className, ...props }: Omit<ComponentProps<"span">, "children">): import("react").JSX.Element;
33
+ /**
34
+ * One suggestion: who wrote it and what it does, the text, what it read and
35
+ * Accept or Discard. `NoteEditorSuggestions` draws each one under its block;
36
+ * render this one yourself for a list beside the note.
37
+ */
38
+ declare function NoteEditorSuggestion({ suggestion, onAccept, onDiscard, onRedo, labels: own, blockLabel, className, ...props }: NoteEditorSuggestionProps): import("react").JSX.Element;
39
+ type NoteEditorSuggestionsProps = Omit<NoteEditorSuggestionProps, "suggestion">;
40
+ /**
41
+ * Draws each of `NoteEditor`'s `suggestions` under its block. `NoteEditor`
42
+ * renders one when it has no children.
43
+ */
44
+ declare function NoteEditorSuggestions(props: NoteEditorSuggestionsProps): import("react").ReactPortal[] | null;
45
+ export { NoteEditorAssistantMark, NoteEditorSuggestion, type NoteEditorSuggestionLabels, type NoteEditorSuggestionProps, NoteEditorSuggestions, type NoteEditorSuggestionsProps };