@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,450 @@
1
+ "use client";
2
+ import { cn } from "../../utilities/cn/index.js";
3
+ import { Badge } from "../badge/badge.js";
4
+ import { CodeBlock, CodeBlockContent, CodeBlockHeader, CodeBlockTitle } from "../code-block/code-block.js";
5
+ import { Icon } from "../icon/icon.js";
6
+ import { Tool, ToolContent, ToolHeader, getToolStatus } from "../tool/tool.js";
7
+ import { Trace, TraceCollapsible, TraceCollapsibleContent, TraceCollapsibleTrigger, TraceDescription, TraceIcon, TraceLine, TraceTitle } from "../trace/trace.js";
8
+ import { c } from "react/compiler-runtime";
9
+ import { createContext, useContext } from "react";
10
+ import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
11
+ import { AlertCircleIcon, CheckmarkCircle02Icon, Loading03Icon } from "@hugeicons/core-free-icons";
12
+ // src/components/subagent/subagent.tsx
13
+ /** The icon a line draws for its status when it is given none. */
14
+ function StatusIcon(t0) {
15
+ const $ = c(3);
16
+ const { status } = t0;
17
+ if (status === "running") {
18
+ let t1;
19
+ if ($[0] === Symbol.for("react.memo_cache_sentinel")) {
20
+ t1 = /* @__PURE__ */ jsx(Icon, {
21
+ icon: Loading03Icon,
22
+ className: "animate-spin motion-reduce:animate-none"
23
+ });
24
+ $[0] = t1;
25
+ } else t1 = $[0];
26
+ return t1;
27
+ }
28
+ const t1 = status === "error" ? AlertCircleIcon : CheckmarkCircle02Icon;
29
+ let t2;
30
+ if ($[1] !== t1) {
31
+ t2 = /* @__PURE__ */ jsx(Icon, { icon: t1 });
32
+ $[1] = t1;
33
+ $[2] = t2;
34
+ } else t2 = $[2];
35
+ return t2;
36
+ }
37
+ const SubagentContext = createContext(null);
38
+ function useSubagent() {
39
+ const context = useContext(SubagentContext);
40
+ if (!context) throw new Error("Subagent's parts must be used within Subagent.");
41
+ return context;
42
+ }
43
+ /**
44
+ * A subagent's run: a `SubagentHeader` and a `SubagentContent`. It takes
45
+ * Collapsible's props. Put it in a `Trace` next to the turn's other lines.
46
+ */
47
+ function Subagent(t0) {
48
+ const $ = c(17);
49
+ let children;
50
+ let className;
51
+ let props;
52
+ let t1;
53
+ if ($[0] !== t0) {
54
+ ({collapsible: t1, className, children, ...props} = t0);
55
+ $[0] = t0;
56
+ $[1] = children;
57
+ $[2] = className;
58
+ $[3] = props;
59
+ $[4] = t1;
60
+ } else {
61
+ children = $[1];
62
+ className = $[2];
63
+ props = $[3];
64
+ t1 = $[4];
65
+ }
66
+ const collapsible = t1 === void 0 ? true : t1;
67
+ let t2;
68
+ if ($[5] !== collapsible) {
69
+ t2 = { collapsible };
70
+ $[5] = collapsible;
71
+ $[6] = t2;
72
+ } else t2 = $[6];
73
+ let t3;
74
+ if ($[7] !== children || $[8] !== collapsible || $[9] !== props) {
75
+ t3 = collapsible ? /* @__PURE__ */ jsx(TraceCollapsible, {
76
+ ...props,
77
+ children
78
+ }) : children;
79
+ $[7] = children;
80
+ $[8] = collapsible;
81
+ $[9] = props;
82
+ $[10] = t3;
83
+ } else t3 = $[10];
84
+ let t4;
85
+ if ($[11] !== className || $[12] !== t3) {
86
+ t4 = /* @__PURE__ */ jsx(Trace, {
87
+ "data-slot": "subagent",
88
+ className,
89
+ children: t3
90
+ });
91
+ $[11] = className;
92
+ $[12] = t3;
93
+ $[13] = t4;
94
+ } else t4 = $[13];
95
+ let t5;
96
+ if ($[14] !== t2 || $[15] !== t4) {
97
+ t5 = /* @__PURE__ */ jsx(SubagentContext.Provider, {
98
+ value: t2,
99
+ children: t4
100
+ });
101
+ $[14] = t2;
102
+ $[15] = t4;
103
+ $[16] = t5;
104
+ } else t5 = $[16];
105
+ return t5;
106
+ }
107
+ /**
108
+ * The run's line. Children replace the icon, the title and the description,
109
+ * inside the `TraceLine`. While the run has nothing to open, a running title
110
+ * is announced; once it opens, the calls inside announce the wait.
111
+ */
112
+ function SubagentHeader(t0) {
113
+ const $ = c(27);
114
+ let children;
115
+ let description;
116
+ let icon;
117
+ let model;
118
+ let name;
119
+ let props;
120
+ let status;
121
+ if ($[0] !== t0) {
122
+ ({name, model, status, description, icon, children, ...props} = t0);
123
+ $[0] = t0;
124
+ $[1] = children;
125
+ $[2] = description;
126
+ $[3] = icon;
127
+ $[4] = model;
128
+ $[5] = name;
129
+ $[6] = props;
130
+ $[7] = status;
131
+ } else {
132
+ children = $[1];
133
+ description = $[2];
134
+ icon = $[3];
135
+ model = $[4];
136
+ name = $[5];
137
+ props = $[6];
138
+ status = $[7];
139
+ }
140
+ const { collapsible } = useSubagent();
141
+ let t1;
142
+ if ($[8] !== children || $[9] !== collapsible || $[10] !== description || $[11] !== icon || $[12] !== name || $[13] !== status) {
143
+ t1 = children ?? /* @__PURE__ */ jsxs(Fragment$1, { children: [
144
+ /* @__PURE__ */ jsx(TraceIcon, { children: icon ?? /* @__PURE__ */ jsx(StatusIcon, { status }) }),
145
+ /* @__PURE__ */ jsx(TraceTitle, {
146
+ role: status === "running" && !collapsible ? "status" : void 0,
147
+ children: name
148
+ }),
149
+ description != null && /* @__PURE__ */ jsx(TraceDescription, { children: description })
150
+ ] });
151
+ $[8] = children;
152
+ $[9] = collapsible;
153
+ $[10] = description;
154
+ $[11] = icon;
155
+ $[12] = name;
156
+ $[13] = status;
157
+ $[14] = t1;
158
+ } else t1 = $[14];
159
+ let t2;
160
+ if ($[15] !== status || $[16] !== t1) {
161
+ t2 = /* @__PURE__ */ jsx(TraceLine, {
162
+ status,
163
+ children: t1
164
+ });
165
+ $[15] = status;
166
+ $[16] = t1;
167
+ $[17] = t2;
168
+ } else t2 = $[17];
169
+ const line = t2;
170
+ let t3;
171
+ if ($[18] !== collapsible || $[19] !== line || $[20] !== props) {
172
+ t3 = collapsible ? /* @__PURE__ */ jsx(TraceCollapsibleTrigger, {
173
+ ...props,
174
+ children: line
175
+ }) : line;
176
+ $[18] = collapsible;
177
+ $[19] = line;
178
+ $[20] = props;
179
+ $[21] = t3;
180
+ } else t3 = $[21];
181
+ let t4;
182
+ if ($[22] !== model) {
183
+ t4 = model != null && /* @__PURE__ */ jsx(Badge, {
184
+ variant: "secondary",
185
+ className: "font-mono",
186
+ children: model
187
+ });
188
+ $[22] = model;
189
+ $[23] = t4;
190
+ } else t4 = $[23];
191
+ let t5;
192
+ if ($[24] !== t3 || $[25] !== t4) {
193
+ t5 = /* @__PURE__ */ jsxs("div", {
194
+ "data-slot": "subagent-header",
195
+ className: "flex min-w-0 items-center gap-2",
196
+ children: [t3, t4]
197
+ });
198
+ $[24] = t3;
199
+ $[25] = t4;
200
+ $[26] = t5;
201
+ } else t5 = $[26];
202
+ return t5;
203
+ }
204
+ /**
205
+ * What the run opens into. It stays mounted while closed, so a call the person
206
+ * opened is still open when the run opens again.
207
+ */
208
+ function SubagentContent(t0) {
209
+ const $ = c(8);
210
+ let className;
211
+ let props;
212
+ if ($[0] !== t0) {
213
+ ({className, ...props} = t0);
214
+ $[0] = t0;
215
+ $[1] = className;
216
+ $[2] = props;
217
+ } else {
218
+ className = $[1];
219
+ props = $[2];
220
+ }
221
+ const { collapsible } = useSubagent();
222
+ if (!collapsible) return null;
223
+ let t1;
224
+ if ($[3] !== className) {
225
+ t1 = cn("flex flex-col gap-3", className);
226
+ $[3] = className;
227
+ $[4] = t1;
228
+ } else t1 = $[4];
229
+ let t2;
230
+ if ($[5] !== props || $[6] !== t1) {
231
+ t2 = /* @__PURE__ */ jsx(TraceCollapsibleContent, {
232
+ "data-slot": "subagent-content",
233
+ keepMounted: true,
234
+ className: t1,
235
+ ...props
236
+ });
237
+ $[5] = props;
238
+ $[6] = t1;
239
+ $[7] = t2;
240
+ } else t2 = $[7];
241
+ return t2;
242
+ }
243
+ /** The task the subagent was given. */
244
+ function SubagentInstructions(t0) {
245
+ const $ = c(16);
246
+ let children;
247
+ let className;
248
+ let props;
249
+ let t1;
250
+ if ($[0] !== t0) {
251
+ ({label: t1, className, children, ...props} = t0);
252
+ $[0] = t0;
253
+ $[1] = children;
254
+ $[2] = className;
255
+ $[3] = props;
256
+ $[4] = t1;
257
+ } else {
258
+ children = $[1];
259
+ className = $[2];
260
+ props = $[3];
261
+ t1 = $[4];
262
+ }
263
+ const label = t1 === void 0 ? "Instructions" : t1;
264
+ let t2;
265
+ if ($[5] !== className) {
266
+ t2 = cn("flex flex-col gap-1", className);
267
+ $[5] = className;
268
+ $[6] = t2;
269
+ } else t2 = $[6];
270
+ let t3;
271
+ if ($[7] !== label) {
272
+ t3 = label != null && /* @__PURE__ */ jsx("span", {
273
+ className: "text-xs font-medium",
274
+ children: label
275
+ });
276
+ $[7] = label;
277
+ $[8] = t3;
278
+ } else t3 = $[8];
279
+ let t4;
280
+ if ($[9] !== children) {
281
+ t4 = /* @__PURE__ */ jsx("p", { children });
282
+ $[9] = children;
283
+ $[10] = t4;
284
+ } else t4 = $[10];
285
+ let t5;
286
+ if ($[11] !== props || $[12] !== t2 || $[13] !== t3 || $[14] !== t4) {
287
+ t5 = /* @__PURE__ */ jsxs("div", {
288
+ "data-slot": "subagent-instructions",
289
+ className: t2,
290
+ ...props,
291
+ children: [t3, t4]
292
+ });
293
+ $[11] = props;
294
+ $[12] = t2;
295
+ $[13] = t3;
296
+ $[14] = t4;
297
+ $[15] = t5;
298
+ } else t5 = $[15];
299
+ return t5;
300
+ }
301
+ /** The calls the subagent made, as a Trace of `SubagentTool`. */
302
+ function SubagentTools(props) {
303
+ const $ = c(2);
304
+ let t0;
305
+ if ($[0] !== props) {
306
+ t0 = /* @__PURE__ */ jsx(Trace, {
307
+ "data-slot": "subagent-tools",
308
+ ...props
309
+ });
310
+ $[0] = props;
311
+ $[1] = t0;
312
+ } else t0 = $[1];
313
+ return t0;
314
+ }
315
+ /**
316
+ * One call the subagent made: a `Tool` whose icon follows its state. For more
317
+ * control, put a `Tool` in `SubagentTools` instead.
318
+ */
319
+ function SubagentTool(t0) {
320
+ const $ = c(26);
321
+ let children;
322
+ let getTitle;
323
+ let icon;
324
+ let props;
325
+ let state;
326
+ let title;
327
+ let toolName;
328
+ let type;
329
+ if ($[0] !== t0) {
330
+ ({state, type, toolName, title, icon, getTitle, children, ...props} = t0);
331
+ $[0] = t0;
332
+ $[1] = children;
333
+ $[2] = getTitle;
334
+ $[3] = icon;
335
+ $[4] = props;
336
+ $[5] = state;
337
+ $[6] = title;
338
+ $[7] = toolName;
339
+ $[8] = type;
340
+ } else {
341
+ children = $[1];
342
+ getTitle = $[2];
343
+ icon = $[3];
344
+ props = $[4];
345
+ state = $[5];
346
+ title = $[6];
347
+ toolName = $[7];
348
+ type = $[8];
349
+ }
350
+ const collapsible = children != null && children !== false;
351
+ let t1;
352
+ if ($[9] !== icon || $[10] !== state) {
353
+ t1 = icon ?? /* @__PURE__ */ jsx(StatusIcon, { status: getToolStatus(state) });
354
+ $[9] = icon;
355
+ $[10] = state;
356
+ $[11] = t1;
357
+ } else t1 = $[11];
358
+ let t2;
359
+ if ($[12] !== getTitle || $[13] !== state || $[14] !== t1 || $[15] !== title || $[16] !== toolName || $[17] !== type) {
360
+ t2 = /* @__PURE__ */ jsx(ToolHeader, {
361
+ state,
362
+ type,
363
+ toolName,
364
+ title,
365
+ getTitle,
366
+ icon: t1
367
+ });
368
+ $[12] = getTitle;
369
+ $[13] = state;
370
+ $[14] = t1;
371
+ $[15] = title;
372
+ $[16] = toolName;
373
+ $[17] = type;
374
+ $[18] = t2;
375
+ } else t2 = $[18];
376
+ let t3;
377
+ if ($[19] !== children) {
378
+ t3 = /* @__PURE__ */ jsx(ToolContent, { children });
379
+ $[19] = children;
380
+ $[20] = t3;
381
+ } else t3 = $[20];
382
+ let t4;
383
+ if ($[21] !== collapsible || $[22] !== props || $[23] !== t2 || $[24] !== t3) {
384
+ t4 = /* @__PURE__ */ jsxs(Tool, {
385
+ collapsible,
386
+ ...props,
387
+ children: [t2, t3]
388
+ });
389
+ $[21] = collapsible;
390
+ $[22] = props;
391
+ $[23] = t2;
392
+ $[24] = t3;
393
+ $[25] = t4;
394
+ } else t4 = $[25];
395
+ return t4;
396
+ }
397
+ /** The schema of the subagent's output, in a small code block. */
398
+ function SubagentOutput(t0) {
399
+ const $ = c(15);
400
+ let props;
401
+ let schema;
402
+ let t1;
403
+ let t2;
404
+ if ($[0] !== t0) {
405
+ ({schema, label: t1, size: t2, ...props} = t0);
406
+ $[0] = t0;
407
+ $[1] = props;
408
+ $[2] = schema;
409
+ $[3] = t1;
410
+ $[4] = t2;
411
+ } else {
412
+ props = $[1];
413
+ schema = $[2];
414
+ t1 = $[3];
415
+ t2 = $[4];
416
+ }
417
+ const label = t1 === void 0 ? "Output Schema" : t1;
418
+ const size = t2 === void 0 ? "sm" : t2;
419
+ let t3;
420
+ if ($[5] !== label) {
421
+ t3 = /* @__PURE__ */ jsx(CodeBlockHeader, { children: /* @__PURE__ */ jsx(CodeBlockTitle, { children: label }) });
422
+ $[5] = label;
423
+ $[6] = t3;
424
+ } else t3 = $[6];
425
+ let t4;
426
+ if ($[7] !== label || $[8] !== schema) {
427
+ t4 = /* @__PURE__ */ jsx(CodeBlockContent, {
428
+ "aria-label": label,
429
+ children: schema
430
+ });
431
+ $[7] = label;
432
+ $[8] = schema;
433
+ $[9] = t4;
434
+ } else t4 = $[9];
435
+ let t5;
436
+ if ($[10] !== props || $[11] !== size || $[12] !== t3 || $[13] !== t4) {
437
+ t5 = /* @__PURE__ */ jsxs(CodeBlock, {
438
+ size,
439
+ ...props,
440
+ children: [t3, t4]
441
+ });
442
+ $[10] = props;
443
+ $[11] = size;
444
+ $[12] = t3;
445
+ $[13] = t4;
446
+ $[14] = t5;
447
+ } else t5 = $[14];
448
+ return t5;
449
+ }
450
+ export { Subagent, SubagentContent, SubagentHeader, SubagentInstructions, SubagentOutput, SubagentTool, SubagentTools };
@@ -0,0 +1,21 @@
1
+ import { ButtonProps } from "../button/button.js";
2
+ import { ComponentProps } from "react";
3
+ type SuggestionsProps = ComponentProps<"div">;
4
+ /**
5
+ * The row of suggestions. It scrolls sideways when they don't fit and fades
6
+ * the edge that has more to show; a suggestion that takes focus scrolls fully
7
+ * into view.
8
+ */
9
+ declare function Suggestions({ className, onFocus, ...props }: SuggestionsProps): import("react").JSX.Element;
10
+ type SuggestionProps = Omit<ButtonProps, "onClick"> & {
11
+ /** The prompt. It is the button's label unless it has children, and what `onClick` receives. */
12
+ suggestion: string;
13
+ /** Runs on a press, with the suggestion: send it as is, like typed text. */
14
+ onClick?: (suggestion: string) => void;
15
+ };
16
+ /**
17
+ * One suggestion: a pill Button that stays on one line, with an optional
18
+ * `Icon` before the prompt. It takes Button's props.
19
+ */
20
+ declare function Suggestion({ suggestion, onClick, variant, size, className, children, ...props }: SuggestionProps): import("react").JSX.Element;
21
+ export { Suggestion, type SuggestionProps, Suggestions, type SuggestionsProps };
@@ -0,0 +1,130 @@
1
+ "use client";
2
+ import { cn, cnState } from "../../utilities/cn/index.js";
3
+ import { Button } from "../button/button.js";
4
+ import { c } from "react/compiler-runtime";
5
+ import { jsx } from "react/jsx-runtime";
6
+ // src/components/suggestion/suggestion.tsx
7
+ /**
8
+ * The row of suggestions. It scrolls sideways when they don't fit and fades
9
+ * the edge that has more to show; a suggestion that takes focus scrolls fully
10
+ * into view.
11
+ */
12
+ function Suggestions(t0) {
13
+ const $ = c(12);
14
+ let className;
15
+ let onFocus;
16
+ let props;
17
+ if ($[0] !== t0) {
18
+ ({className, onFocus, ...props} = t0);
19
+ $[0] = t0;
20
+ $[1] = className;
21
+ $[2] = onFocus;
22
+ $[3] = props;
23
+ } else {
24
+ className = $[1];
25
+ onFocus = $[2];
26
+ props = $[3];
27
+ }
28
+ let t1;
29
+ if ($[4] !== className) {
30
+ t1 = cn("-m-1 flex scroll-fade-x no-scrollbar gap-2 scroll-px-1 overflow-x-auto overscroll-x-contain p-1", className);
31
+ $[4] = className;
32
+ $[5] = t1;
33
+ } else t1 = $[5];
34
+ let t2;
35
+ if ($[6] !== onFocus) {
36
+ t2 = (event) => {
37
+ onFocus?.(event);
38
+ if (event.target !== event.currentTarget) event.target.scrollIntoView({
39
+ block: "nearest",
40
+ inline: "nearest"
41
+ });
42
+ };
43
+ $[6] = onFocus;
44
+ $[7] = t2;
45
+ } else t2 = $[7];
46
+ let t3;
47
+ if ($[8] !== props || $[9] !== t1 || $[10] !== t2) {
48
+ t3 = /* @__PURE__ */ jsx("div", {
49
+ "data-slot": "suggestions",
50
+ className: t1,
51
+ onFocus: t2,
52
+ ...props
53
+ });
54
+ $[8] = props;
55
+ $[9] = t1;
56
+ $[10] = t2;
57
+ $[11] = t3;
58
+ } else t3 = $[11];
59
+ return t3;
60
+ }
61
+ const suggestionClasses = "shrink-0 rounded-full border-border bg-transparent px-3 font-normal dark:bg-transparent text-muted-foreground hover:text-foreground [&_[data-slot=icon]]:text-muted-foreground";
62
+ /**
63
+ * One suggestion: a pill Button that stays on one line, with an optional
64
+ * `Icon` before the prompt. It takes Button's props.
65
+ */
66
+ function Suggestion(t0) {
67
+ const $ = c(20);
68
+ let children;
69
+ let className;
70
+ let onClick;
71
+ let props;
72
+ let suggestion;
73
+ let t1;
74
+ let t2;
75
+ if ($[0] !== t0) {
76
+ ({suggestion, onClick, variant: t1, size: t2, className, children, ...props} = t0);
77
+ $[0] = t0;
78
+ $[1] = children;
79
+ $[2] = className;
80
+ $[3] = onClick;
81
+ $[4] = props;
82
+ $[5] = suggestion;
83
+ $[6] = t1;
84
+ $[7] = t2;
85
+ } else {
86
+ children = $[1];
87
+ className = $[2];
88
+ onClick = $[3];
89
+ props = $[4];
90
+ suggestion = $[5];
91
+ t1 = $[6];
92
+ t2 = $[7];
93
+ }
94
+ const variant = t1 === void 0 ? "outline" : t1;
95
+ const size = t2 === void 0 ? "sm" : t2;
96
+ let t3;
97
+ if ($[8] !== className) {
98
+ t3 = cnState(suggestionClasses, className);
99
+ $[8] = className;
100
+ $[9] = t3;
101
+ } else t3 = $[9];
102
+ let t4;
103
+ if ($[10] !== onClick || $[11] !== suggestion) {
104
+ t4 = () => onClick?.(suggestion);
105
+ $[10] = onClick;
106
+ $[11] = suggestion;
107
+ $[12] = t4;
108
+ } else t4 = $[12];
109
+ const t5 = children ?? suggestion;
110
+ let t6;
111
+ if ($[13] !== props || $[14] !== size || $[15] !== t3 || $[16] !== t4 || $[17] !== t5 || $[18] !== variant) {
112
+ t6 = /* @__PURE__ */ jsx(Button, {
113
+ variant,
114
+ size,
115
+ className: t3,
116
+ onClick: t4,
117
+ ...props,
118
+ children: t5
119
+ });
120
+ $[13] = props;
121
+ $[14] = size;
122
+ $[15] = t3;
123
+ $[16] = t4;
124
+ $[17] = t5;
125
+ $[18] = variant;
126
+ $[19] = t6;
127
+ } else t6 = $[19];
128
+ return t6;
129
+ }
130
+ export { Suggestion, Suggestions };
@@ -0,0 +1,6 @@
1
+ import { ComponentProps } from "react";
2
+ import { Switch as Switch$1, SwitchThumb as SwitchThumb$1, createSwitchController } from "@ui-sdk/react/switch";
3
+ declare function Switch({ className, ...props }: ComponentProps<typeof Switch$1>): import("react").JSX.Element;
4
+ /** The thumb. It slides to the far end while the switch is on, mirrored under `dir="rtl"`. */
5
+ declare function SwitchThumb({ className, ...props }: ComponentProps<typeof SwitchThumb$1>): import("react").JSX.Element;
6
+ export { Switch, SwitchThumb, createSwitchController };
@@ -0,0 +1,70 @@
1
+ "use client";
2
+ import { cnState } from "../../utilities/cn/index.js";
3
+ import { c } from "react/compiler-runtime";
4
+ import { jsx } from "react/jsx-runtime";
5
+ import { Switch as Switch$1, SwitchThumb as SwitchThumb$1, createSwitchController } from "@ui-sdk/react/switch";
6
+ // src/components/switch/switch.tsx
7
+ function Switch(t0) {
8
+ const $ = c(8);
9
+ let className;
10
+ let props;
11
+ if ($[0] !== t0) {
12
+ ({className, ...props} = t0);
13
+ $[0] = t0;
14
+ $[1] = className;
15
+ $[2] = props;
16
+ } else {
17
+ className = $[1];
18
+ props = $[2];
19
+ }
20
+ let t1;
21
+ if ($[3] !== className) {
22
+ t1 = cnState("peer relative inline-flex h-5 w-8 shrink-0 items-center rounded-full border border-transparent transition-colors focus-ring after:absolute after:-inset-x-3 after:-inset-y-2 data-checked:bg-brand data-disabled:cursor-not-allowed data-disabled:opacity-50 data-invalid:border-destructive data-invalid:ring-3 data-invalid:ring-destructive/20 data-unchecked:bg-input", className);
23
+ $[3] = className;
24
+ $[4] = t1;
25
+ } else t1 = $[4];
26
+ let t2;
27
+ if ($[5] !== props || $[6] !== t1) {
28
+ t2 = /* @__PURE__ */ jsx(Switch$1, {
29
+ className: t1,
30
+ ...props
31
+ });
32
+ $[5] = props;
33
+ $[6] = t1;
34
+ $[7] = t2;
35
+ } else t2 = $[7];
36
+ return t2;
37
+ }
38
+ /** The thumb. It slides to the far end while the switch is on, mirrored under `dir="rtl"`. */
39
+ function SwitchThumb(t0) {
40
+ const $ = c(8);
41
+ let className;
42
+ let props;
43
+ if ($[0] !== t0) {
44
+ ({className, ...props} = t0);
45
+ $[0] = t0;
46
+ $[1] = className;
47
+ $[2] = props;
48
+ } else {
49
+ className = $[1];
50
+ props = $[2];
51
+ }
52
+ let t1;
53
+ if ($[3] !== className) {
54
+ t1 = cnState("pointer-events-none block size-4 rounded-full bg-background transition-transform ease-out data-checked:translate-x-[calc(100%-2px)] data-unchecked:translate-x-0 motion-reduce:transition-none rtl:data-checked:-translate-x-[calc(100%-2px)]", className);
55
+ $[3] = className;
56
+ $[4] = t1;
57
+ } else t1 = $[4];
58
+ let t2;
59
+ if ($[5] !== props || $[6] !== t1) {
60
+ t2 = /* @__PURE__ */ jsx(SwitchThumb$1, {
61
+ className: t1,
62
+ ...props
63
+ });
64
+ $[5] = props;
65
+ $[6] = t1;
66
+ $[7] = t2;
67
+ } else t2 = $[7];
68
+ return t2;
69
+ }
70
+ export { Switch, SwitchThumb, createSwitchController };
@@ -0,0 +1,19 @@
1
+ import { ComponentProps } from "react";
2
+ type TableProps = ComponentProps<"table"> & {
3
+ /**
4
+ * Names the area that scrolls sideways when the table is wider than its
5
+ * place, like "Invoices, scrollable". With it the area is a region the
6
+ * keyboard can reach and scroll. Give it to any table that can overflow.
7
+ */
8
+ scrollLabel?: string;
9
+ };
10
+ declare function Table({ className, scrollLabel, ...props }: TableProps): import("react").JSX.Element;
11
+ declare function TableHeader({ className, ...props }: ComponentProps<"thead">): import("react").JSX.Element;
12
+ declare function TableBody({ className, ...props }: ComponentProps<"tbody">): import("react").JSX.Element;
13
+ declare function TableFooter({ className, ...props }: ComponentProps<"tfoot">): import("react").JSX.Element;
14
+ /** Mark a selected row with `data-selected`. */
15
+ declare function TableRow({ className, ...props }: ComponentProps<"tr">): import("react").JSX.Element;
16
+ declare function TableHead({ className, ...props }: ComponentProps<"th">): import("react").JSX.Element;
17
+ declare function TableCell({ className, ...props }: ComponentProps<"td">): import("react").JSX.Element;
18
+ declare function TableCaption({ className, ...props }: ComponentProps<"caption">): import("react").JSX.Element;
19
+ export { Table, TableBody, TableCaption, TableCell, TableFooter, TableHead, TableHeader, type TableProps, TableRow };