@bysages/react 0.4.4 → 0.5.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 (310) hide show
  1. package/dist/ai-B3vbpXlK.mjs +309 -0
  2. package/dist/ai-prompt-input-k34KssHJ.mjs +401 -0
  3. package/dist/{ai-response-CjjjprMY.mjs → ai-response-DTxdL5rX.mjs} +9 -11
  4. package/dist/{chevron-BA7kV9m7.mjs → chevron-DnImlNip.mjs} +2 -3
  5. package/dist/components/accordion/index.d.mts +1 -2
  6. package/dist/components/accordion/index.mjs +3 -4
  7. package/dist/components/affix/index.d.mts +1 -2
  8. package/dist/components/affix/index.mjs +2 -3
  9. package/dist/components/ai/index.d.mts +107 -2
  10. package/dist/components/ai/index.mjs +7 -82
  11. package/dist/components/ai-action/index.d.mts +0 -2
  12. package/dist/components/ai-action/index.mjs +2 -3
  13. package/dist/components/ai-attachments/index.d.mts +0 -2
  14. package/dist/components/ai-attachments/index.mjs +4 -5
  15. package/dist/components/ai-message/index.d.mts +2 -14
  16. package/dist/components/ai-message/index.mjs +5 -4
  17. package/dist/components/ai-prompt-input/index.d.mts +14 -18
  18. package/dist/components/ai-prompt-input/index.mjs +1 -126
  19. package/dist/components/ai-reasoning/index.d.mts +0 -2
  20. package/dist/components/ai-reasoning/index.mjs +3 -4
  21. package/dist/components/ai-response/index.d.mts +1 -3
  22. package/dist/components/ai-response/index.mjs +1 -2
  23. package/dist/components/ai-source/index.d.mts +0 -2
  24. package/dist/components/ai-source/index.mjs +2 -3
  25. package/dist/components/ai-suggestion/index.d.mts +0 -2
  26. package/dist/components/ai-suggestion/index.mjs +2 -3
  27. package/dist/components/ai-tool/index.d.mts +2 -24
  28. package/dist/components/ai-tool/index.mjs +46 -14
  29. package/dist/components/alert/index.d.mts +1 -2
  30. package/dist/components/alert/index.mjs +2 -3
  31. package/dist/components/angle-slider/index.d.mts +1 -2
  32. package/dist/components/angle-slider/index.mjs +2 -3
  33. package/dist/components/aspect-ratio/index.d.mts +1 -2
  34. package/dist/components/aspect-ratio/index.mjs +2 -3
  35. package/dist/components/autocomplete/index.d.mts +1 -2
  36. package/dist/components/autocomplete/index.mjs +3 -4
  37. package/dist/components/avatar/index.d.mts +1 -2
  38. package/dist/components/avatar/index.mjs +2 -3
  39. package/dist/components/avatar-group/index.d.mts +1 -2
  40. package/dist/components/avatar-group/index.mjs +2 -3
  41. package/dist/components/back-top/index.d.mts +1 -2
  42. package/dist/components/back-top/index.mjs +3 -4
  43. package/dist/components/badge/index.d.mts +1 -2
  44. package/dist/components/badge/index.mjs +2 -3
  45. package/dist/components/banner/index.d.mts +1 -2
  46. package/dist/components/banner/index.mjs +3 -4
  47. package/dist/components/bento/index.d.mts +1 -3
  48. package/dist/components/bento/index.mjs +1 -2
  49. package/dist/components/block-ui/index.d.mts +1 -2
  50. package/dist/components/block-ui/index.mjs +2 -3
  51. package/dist/components/breadcrumb/index.d.mts +1 -2
  52. package/dist/components/breadcrumb/index.mjs +2 -3
  53. package/dist/components/browser/index.d.mts +1 -3
  54. package/dist/components/browser/index.mjs +1 -2
  55. package/dist/components/button/index.d.mts +1 -2
  56. package/dist/components/button/index.mjs +2 -3
  57. package/dist/components/button-group/index.d.mts +1 -2
  58. package/dist/components/button-group/index.mjs +1 -2
  59. package/dist/components/calendar/index.d.mts +1 -2
  60. package/dist/components/calendar/index.mjs +3 -4
  61. package/dist/components/card/index.d.mts +1 -3
  62. package/dist/components/card/index.mjs +1 -2
  63. package/dist/components/carousel/index.d.mts +1 -2
  64. package/dist/components/carousel/index.mjs +3 -4
  65. package/dist/components/cascade-select/index.d.mts +1 -2
  66. package/dist/components/cascade-select/index.mjs +6 -7
  67. package/dist/components/checkbox/index.d.mts +1 -2
  68. package/dist/components/checkbox/index.mjs +3 -4
  69. package/dist/components/checkbox-group/index.d.mts +1 -2
  70. package/dist/components/checkbox-group/index.mjs +3 -4
  71. package/dist/components/chip/index.d.mts +1 -2
  72. package/dist/components/chip/index.mjs +2 -3
  73. package/dist/components/client-only/index.d.mts +0 -2
  74. package/dist/components/client-only/index.mjs +2 -3
  75. package/dist/components/clipboard/index.d.mts +1 -2
  76. package/dist/components/clipboard/index.mjs +3 -4
  77. package/dist/components/collapsible/index.d.mts +1 -2
  78. package/dist/components/collapsible/index.mjs +3 -4
  79. package/dist/components/collection/index.mjs +1 -2
  80. package/dist/components/color-picker/index.d.mts +1 -2
  81. package/dist/components/color-picker/index.mjs +3 -4
  82. package/dist/components/combobox/index.d.mts +1 -2
  83. package/dist/components/combobox/index.mjs +3 -4
  84. package/dist/components/command/index.d.mts +1 -2
  85. package/dist/components/command/index.mjs +3 -4
  86. package/dist/components/comment/index.d.mts +1 -2
  87. package/dist/components/comment/index.mjs +2 -3
  88. package/dist/components/config-provider/index.d.mts +1 -2
  89. package/dist/components/config-provider/index.mjs +2 -3
  90. package/dist/components/container/index.d.mts +1 -2
  91. package/dist/components/container/index.mjs +2 -3
  92. package/dist/components/data-view/index.d.mts +1 -2
  93. package/dist/components/data-view/index.mjs +3 -4
  94. package/dist/components/date-input/index.d.mts +0 -2
  95. package/dist/components/date-input/index.mjs +2 -3
  96. package/dist/components/date-picker/index.d.mts +0 -2
  97. package/dist/components/date-picker/index.mjs +3 -4
  98. package/dist/components/deferred-content/index.d.mts +1 -2
  99. package/dist/components/deferred-content/index.mjs +2 -3
  100. package/dist/components/descriptions/index.d.mts +1 -2
  101. package/dist/components/descriptions/index.mjs +2 -3
  102. package/dist/components/dialog/index.d.mts +31 -4
  103. package/dist/components/dialog/index.mjs +41 -10
  104. package/dist/components/dock/index.d.mts +1 -3
  105. package/dist/components/dock/index.mjs +1 -2
  106. package/dist/components/download-trigger/index.d.mts +0 -2
  107. package/dist/components/download-trigger/index.mjs +2 -3
  108. package/dist/components/drawer/index.d.mts +1 -2
  109. package/dist/components/drawer/index.mjs +3 -4
  110. package/dist/components/dynamic-input/index.d.mts +1 -2
  111. package/dist/components/dynamic-input/index.mjs +5 -6
  112. package/dist/components/editable/index.d.mts +1 -2
  113. package/dist/components/editable/index.mjs +3 -4
  114. package/dist/components/ellipsis/index.d.mts +1 -2
  115. package/dist/components/ellipsis/index.mjs +2 -3
  116. package/dist/components/empty/index.d.mts +1 -3
  117. package/dist/components/empty/index.mjs +1 -2
  118. package/dist/components/field/index.d.mts +1 -2
  119. package/dist/components/field/index.mjs +2 -3
  120. package/dist/components/fieldset/index.d.mts +1 -2
  121. package/dist/components/fieldset/index.mjs +2 -3
  122. package/dist/components/file-upload/index.d.mts +1 -2
  123. package/dist/components/file-upload/index.mjs +3 -4
  124. package/dist/components/float-button/index.d.mts +1 -2
  125. package/dist/components/float-button/index.mjs +3 -4
  126. package/dist/components/floating-panel/index.d.mts +1 -2
  127. package/dist/components/floating-panel/index.mjs +3 -4
  128. package/dist/components/focus-trap/index.d.mts +0 -2
  129. package/dist/components/focus-trap/index.mjs +2 -3
  130. package/dist/components/form/index.d.mts +0 -2
  131. package/dist/components/form/index.mjs +2 -3
  132. package/dist/components/format/index.d.mts +1 -3
  133. package/dist/components/format/index.mjs +1 -2
  134. package/dist/components/frame/index.d.mts +1 -3
  135. package/dist/components/frame/index.mjs +3 -4
  136. package/dist/components/grid/index.d.mts +1 -2
  137. package/dist/components/grid/index.mjs +2 -3
  138. package/dist/components/highlight/index.d.mts +1 -3
  139. package/dist/components/highlight/index.mjs +2 -3
  140. package/dist/components/hover-card/index.d.mts +1 -2
  141. package/dist/components/hover-card/index.mjs +2 -3
  142. package/dist/components/icon/index.d.mts +1 -2
  143. package/dist/components/icon/index.mjs +2 -3
  144. package/dist/components/image/index.d.mts +1 -2
  145. package/dist/components/image/index.mjs +3 -4
  146. package/dist/components/image-cropper/index.d.mts +1 -2
  147. package/dist/components/image-cropper/index.mjs +2 -3
  148. package/dist/components/image-viewer/index.d.mts +1 -1
  149. package/dist/components/image-viewer/index.mjs +1 -2
  150. package/dist/components/input/index.d.mts +1 -3
  151. package/dist/components/input/index.mjs +1 -2
  152. package/dist/components/input-group/index.d.mts +1 -3
  153. package/dist/components/input-group/index.mjs +1 -2
  154. package/dist/components/json-tree-view/index.d.mts +1 -2
  155. package/dist/components/json-tree-view/index.mjs +3 -4
  156. package/dist/components/kbd/index.d.mts +1 -2
  157. package/dist/components/kbd/index.mjs +2 -3
  158. package/dist/components/layout/index.d.mts +1 -2
  159. package/dist/components/layout/index.mjs +19 -15
  160. package/dist/components/link/index.d.mts +1 -2
  161. package/dist/components/link/index.mjs +2 -3
  162. package/dist/components/list/index.d.mts +1 -2
  163. package/dist/components/list/index.mjs +1 -2
  164. package/dist/components/listbox/index.d.mts +0 -2
  165. package/dist/components/listbox/index.mjs +3 -4
  166. package/dist/components/marquee/index.d.mts +1 -2
  167. package/dist/components/marquee/index.mjs +2 -3
  168. package/dist/components/masonry/index.d.mts +1 -2
  169. package/dist/components/masonry/index.mjs +2 -3
  170. package/dist/components/media-player/index.d.mts +1 -1
  171. package/dist/components/media-player/index.mjs +1 -2
  172. package/dist/components/mentions/index.d.mts +2 -2
  173. package/dist/components/mentions/index.mjs +1 -2
  174. package/dist/components/menu/index.d.mts +1 -2
  175. package/dist/components/menu/index.mjs +3 -4
  176. package/dist/components/menubar/index.d.mts +1 -2
  177. package/dist/components/menubar/index.mjs +2 -3
  178. package/dist/components/meter/index.d.mts +1 -3
  179. package/dist/components/meter/index.mjs +1 -2
  180. package/dist/components/navigation-menu/index.d.mts +1 -2
  181. package/dist/components/navigation-menu/index.mjs +2 -3
  182. package/dist/components/number-input/index.d.mts +1 -2
  183. package/dist/components/number-input/index.mjs +3 -4
  184. package/dist/components/order-list/index.d.mts +1 -2
  185. package/dist/components/order-list/index.mjs +4 -5
  186. package/dist/components/page-header/index.d.mts +1 -3
  187. package/dist/components/page-header/index.mjs +1 -2
  188. package/dist/components/pagination/index.d.mts +3 -4
  189. package/dist/components/pagination/index.mjs +3 -4
  190. package/dist/components/password-input/index.d.mts +1 -2
  191. package/dist/components/password-input/index.mjs +3 -4
  192. package/dist/components/pin-input/index.d.mts +1 -2
  193. package/dist/components/pin-input/index.mjs +2 -3
  194. package/dist/components/popconfirm/index.d.mts +2 -3
  195. package/dist/components/popconfirm/index.mjs +2 -3
  196. package/dist/components/popover/index.d.mts +1 -1
  197. package/dist/components/popover/index.mjs +3 -4
  198. package/dist/components/presence/index.d.mts +0 -2
  199. package/dist/components/presence/index.mjs +2 -3
  200. package/dist/components/progress/index.d.mts +1 -2
  201. package/dist/components/progress/index.mjs +2 -3
  202. package/dist/components/progress-group/index.d.mts +1 -2
  203. package/dist/components/progress-group/index.mjs +2 -3
  204. package/dist/components/qr-code/index.d.mts +1 -2
  205. package/dist/components/qr-code/index.mjs +2 -3
  206. package/dist/components/radio-group/index.d.mts +1 -2
  207. package/dist/components/radio-group/index.mjs +2 -3
  208. package/dist/components/rating-group/index.d.mts +1 -2
  209. package/dist/components/rating-group/index.mjs +3 -4
  210. package/dist/components/result/index.d.mts +1 -2
  211. package/dist/components/result/index.mjs +2 -3
  212. package/dist/components/scroll-area/index.d.mts +8 -3
  213. package/dist/components/scroll-area/index.mjs +7 -6
  214. package/dist/components/segment-group/index.d.mts +1 -2
  215. package/dist/components/segment-group/index.mjs +2 -3
  216. package/dist/components/select/index.d.mts +1 -1
  217. package/dist/components/select/index.mjs +1 -2
  218. package/dist/components/separator/index.d.mts +1 -2
  219. package/dist/components/separator/index.mjs +2 -3
  220. package/dist/components/signature-pad/index.d.mts +1 -2
  221. package/dist/components/signature-pad/index.mjs +3 -4
  222. package/dist/components/skeleton/index.d.mts +1 -2
  223. package/dist/components/skeleton/index.mjs +2 -3
  224. package/dist/components/slider/index.d.mts +1 -2
  225. package/dist/components/slider/index.mjs +2 -3
  226. package/dist/components/spinner/index.d.mts +1 -2
  227. package/dist/components/spinner/index.mjs +3 -4
  228. package/dist/components/split-button/index.d.mts +1 -2
  229. package/dist/components/split-button/index.mjs +4 -5
  230. package/dist/components/splitter/index.d.mts +1 -2
  231. package/dist/components/splitter/index.mjs +2 -3
  232. package/dist/components/spotlight/index.d.mts +1 -2
  233. package/dist/components/spotlight/index.mjs +2 -3
  234. package/dist/components/stack/index.d.mts +1 -2
  235. package/dist/components/stack/index.mjs +2 -3
  236. package/dist/components/stat/index.d.mts +1 -3
  237. package/dist/components/stat/index.mjs +1 -2
  238. package/dist/components/steps/index.d.mts +0 -2
  239. package/dist/components/steps/index.mjs +2 -3
  240. package/dist/components/swap/index.d.mts +1 -2
  241. package/dist/components/swap/index.mjs +3 -4
  242. package/dist/components/switch/index.d.mts +1 -2
  243. package/dist/components/switch/index.mjs +2 -3
  244. package/dist/components/table/index.d.mts +0 -2
  245. package/dist/components/table/index.mjs +5 -6
  246. package/dist/components/tabs/index.d.mts +9 -3
  247. package/dist/components/tabs/index.mjs +36 -8
  248. package/dist/components/tag/index.d.mts +1 -2
  249. package/dist/components/tag/index.mjs +3 -4
  250. package/dist/components/tags-input/index.d.mts +1 -2
  251. package/dist/components/tags-input/index.mjs +3 -4
  252. package/dist/components/terminal/index.d.mts +4 -3
  253. package/dist/components/terminal/index.mjs +8 -7
  254. package/dist/components/textarea/index.d.mts +1 -2
  255. package/dist/components/textarea/index.mjs +2 -3
  256. package/dist/components/timeline/index.d.mts +1 -2
  257. package/dist/components/timeline/index.mjs +1 -2
  258. package/dist/components/timer/index.d.mts +1 -2
  259. package/dist/components/timer/index.mjs +2 -3
  260. package/dist/components/toast/index.d.mts +0 -2
  261. package/dist/components/toast/index.mjs +4 -5
  262. package/dist/components/toc/index.d.mts +1 -2
  263. package/dist/components/toc/index.mjs +2 -3
  264. package/dist/components/toggle/index.d.mts +1 -2
  265. package/dist/components/toggle/index.mjs +2 -3
  266. package/dist/components/toggle-group/index.d.mts +1 -2
  267. package/dist/components/toggle-group/index.mjs +3 -4
  268. package/dist/components/toolbar/index.d.mts +1 -2
  269. package/dist/components/toolbar/index.mjs +2 -3
  270. package/dist/components/tooltip/index.d.mts +1 -2
  271. package/dist/components/tooltip/index.mjs +2 -3
  272. package/dist/components/tour/index.d.mts +0 -2
  273. package/dist/components/tour/index.mjs +2 -3
  274. package/dist/components/transfer/index.d.mts +1 -2
  275. package/dist/components/transfer/index.mjs +5 -6
  276. package/dist/components/tree-select/index.d.mts +2 -3
  277. package/dist/components/tree-select/index.mjs +5 -6
  278. package/dist/components/tree-view/index.d.mts +15 -5
  279. package/dist/components/tree-view/index.mjs +30 -12
  280. package/dist/components/typography/index.d.mts +1 -3
  281. package/dist/components/typography/index.mjs +1 -2
  282. package/dist/components/user/index.d.mts +1 -2
  283. package/dist/components/user/index.mjs +2 -3
  284. package/dist/components/virtual-list/index.d.mts +1 -2
  285. package/dist/components/virtual-list/index.mjs +2 -3
  286. package/dist/components/watermark/index.d.mts +1 -2
  287. package/dist/components/watermark/index.mjs +2 -3
  288. package/dist/{family-DE_GQeeM.mjs → family-Co1YsN4N.mjs} +1 -2
  289. package/dist/generative/index.d.mts +0 -2
  290. package/dist/generative/index.mjs +28 -53
  291. package/dist/{icon-Cri0-7-x.mjs → icon-C9udWCyz.mjs} +1 -2
  292. package/dist/{id-C37UYLwJ.mjs → id-Ctic_3o8.mjs} +1 -2
  293. package/dist/{image-viewer-D4FuYrk6.mjs → image-viewer-BYiXpi1X.mjs} +21 -26
  294. package/dist/{index-Eu-Bttta.d.mts → index-BVdkcSSY.d.mts} +0 -2
  295. package/dist/index-CjO4Ggf0.d.mts +115 -0
  296. package/dist/{index-Dj8S4eyJ.d.mts → index-D4C52fI7.d.mts} +0 -4
  297. package/dist/{index-BcRdWGY-.d.mts → index-DIZEFqJM.d.mts} +0 -8
  298. package/dist/{index-Bbg4heDO.d.mts → index-DcpvCyt6.d.mts} +63 -18
  299. package/dist/{index-D_iKc2Uw.d.mts → index-DczfbPCg.d.mts} +0 -4
  300. package/dist/index-lCsvE2Vl.d.mts +37 -0
  301. package/dist/index.d.mts +10 -10
  302. package/dist/index.mjs +10 -10
  303. package/dist/{input-BDpQ0e6G.mjs → input-YRjehBhU.mjs} +3 -5
  304. package/dist/{media-player-C0WcjVI-.mjs → media-player-CO2Cczl-.mjs} +7 -12
  305. package/dist/mentions-De7ChJbl.mjs +335 -0
  306. package/dist/{messages-1jJWtaYU.mjs → messages-B6n0lVyt.mjs} +1 -2
  307. package/dist/{select-D_soVdWK.mjs → select-DQ5669_K.mjs} +4 -6
  308. package/package.json +17 -17
  309. package/dist/index-B4twHAQC.d.mts +0 -10456
  310. package/dist/mentions-BwnyvdXz.mjs +0 -213
@@ -1,82 +1,7 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
- import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
3
- import { Action } from "../ai-action/index.mjs";
4
- import { AiMessage as Message } from "../ai-message/index.mjs";
5
- import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
6
- import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
7
- import { t as Response } from "../../ai-response-CjjjprMY.mjs";
8
- import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
9
- import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
10
- import { AiTool as Tool } from "../ai-tool/index.mjs";
11
- import { injectComponentStyle } from "@bysages/core/styling";
12
- import { jsx } from "react/jsx-runtime";
13
- //#region src/components/ai/index.tsx
14
- /** A conversation column: Root is the log, Message carries a role, and
15
- * the speaking parts — Response, Reasoning, Tool, Sources — part the
16
- * stream. The interactive folds are the shared Collapsible wearing a
17
- * `data-ai` marker, so the machine work is never ours. Parts stay
18
- * agnostic of any client; consumers map their message format (e.g. the
19
- * `UIMessage` parts re-exported here) onto these primitives. */
20
- function part(name, tag, extra = {}) {
21
- const Tag = tag;
22
- const Component = ({ children, ...rest }) => /* @__PURE__ */ jsx(Tag, {
23
- ...extra,
24
- ...rest,
25
- "data-scope": "ai",
26
- "data-part": name.toLowerCase(),
27
- children
28
- });
29
- Component.displayName = "Ai" + name;
30
- return Component;
31
- }
32
- /** The log itself: the column every stroke lands in, a landmark to
33
- * screen readers. */
34
- function AiConversation({ children, ...rest }) {
35
- const messages = useComponentMessages();
36
- return /* @__PURE__ */ jsx("div", {
37
- ...rest,
38
- role: "log",
39
- "aria-label": rest["aria-label"] ?? messages.ai.conversation,
40
- "data-scope": "ai",
41
- "data-part": "conversation",
42
- children
43
- });
44
- }
45
- /** The bubble's inner measure — content that belongs to neither side
46
- * specifically. */
47
- const AiContent = withSelfRoot(part("Content", "div"));
48
- /** The quiet row under a message — copy, retry, feedback. */
49
- const AiActions = withSelfRoot(part("Actions", "div"));
50
- /** The while-it-works whisper for the in-flight turns. */
51
- function AiLoader({ children, ...rest }) {
52
- const messages = useComponentMessages();
53
- return /* @__PURE__ */ jsx("span", {
54
- ...rest,
55
- role: "status",
56
- "aria-label": rest["aria-label"] ?? messages.ai.loading,
57
- "data-scope": "ai",
58
- "data-part": "loader",
59
- children
60
- });
61
- }
62
- /** The whole family under one handle — `Ai.Conversation`,
63
- * `Ai.Message`, and the rest, exactly as before the split. */
64
- const Ai = Object.assign(AiConversation, {
65
- Root: AiConversation,
66
- Conversation: AiConversation,
67
- MessageContent: AiContent,
68
- Actions: AiActions,
69
- Loader: AiLoader,
70
- Message,
71
- Response,
72
- Reasoning,
73
- Tool,
74
- Sources,
75
- Source,
76
- Action,
77
- Suggestion,
78
- PromptInput
79
- });
80
- injectComponentStyle("ai");
81
- //#endregion
82
- export { Ai, AiActions, AiContent };
1
+ import "../ai-action/index.mjs";
2
+ import "../ai-message/index.mjs";
3
+ import "../ai-reasoning/index.mjs";
4
+ import "../ai-source/index.mjs";
5
+ import "../ai-suggestion/index.mjs";
6
+ import "../ai-tool/index.mjs";
7
+ export { t as Ai, n as AiActions, r as AiContent, i as AiConversation, a as AiJumpToLatest, o as AiMedia, s as AiParts, c as toolPartDisplay } from "../../ai-B3vbpXlK.mjs";
@@ -1,5 +1,4 @@
1
1
  import { ButtonHTMLAttributes, ReactNode } from "react";
2
- //#region src/components/ai-action/index.d.ts
3
2
  /** A quiet icon button — copy, retry, thumbs. The label names it to
4
3
  * assistive tech and as the hover title. The control itself is the
5
4
  * shared Button in its ghost register. */
@@ -13,5 +12,4 @@ declare function ActionImpl({ label, children, ...rest }: ActionProps): import("
13
12
  export declare const Action: typeof ActionImpl & {
14
13
  Root: typeof ActionImpl;
15
14
  };
16
- //#endregion
17
15
  export { Action as AiAction };
@@ -1,8 +1,8 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
2
  import { Button } from "../button/index.mjs";
3
3
  import { injectComponentStyle } from "@bysages/core/styling";
4
4
  import { jsx } from "react/jsx-runtime";
5
- //#region src/components/ai-action/index.tsx
5
+ // src/components/ai-action/index.tsx
6
6
  function ActionImpl({ label, children, ...rest }) {
7
7
  injectComponentStyle("ai");
8
8
  return /* @__PURE__ */ jsx(Button, {
@@ -16,5 +16,4 @@ function ActionImpl({ label, children, ...rest }) {
16
16
  });
17
17
  }
18
18
  const Action = withSelfRoot(ActionImpl);
19
- //#endregion
20
19
  export { Action, Action as AiAction };
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- //#region src/components/ai-attachments/index.d.ts
3
2
  /** One file riding the prompt: its icon by extension, its name and
4
3
  * human size, and a quiet way to take it back off. Uploading reads as
5
4
  * a dashed ghost, error as danger ink. */
@@ -21,5 +20,4 @@ declare function AttachmentsImpl({ children, ...rest }: HTMLAttributes<HTMLSpanE
21
20
  export declare const Attachments: typeof AttachmentsImpl & {
22
21
  Root: typeof AttachmentsImpl;
23
22
  };
24
- //#endregion
25
23
  export { Attachment as AiAttachment, Attachments as AiAttachments };
@@ -1,9 +1,9 @@
1
- import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
2
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
3
- import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
1
+ import { r as iconNode } from "../../icon-C9udWCyz.mjs";
2
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
3
+ import { n as useComponentMessages, t as formatMessage } from "../../messages-B6n0lVyt.mjs";
4
4
  import { injectComponentStyle } from "@bysages/core/styling";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/ai-attachments/index.tsx
6
+ // src/components/ai-attachments/index.tsx
7
7
  const imageIcon = iconNode("image", {
8
8
  width: 16,
9
9
  height: 16
@@ -76,5 +76,4 @@ function AttachmentsImpl({ children, ...rest }) {
76
76
  });
77
77
  }
78
78
  const Attachments = withSelfRoot(AttachmentsImpl);
79
- //#endregion
80
79
  export { Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments };
@@ -1,14 +1,2 @@
1
- import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/ai-message/index.d.ts
3
- /** Whose stroke this is — the user's words sit in a recessed bubble,
4
- * the assistant speaks flat on the paper. */
5
- export interface MessageProps extends HTMLAttributes<HTMLElement> {
6
- role?: "user" | "assistant" | "system";
7
- children?: ReactNode;
8
- }
9
- declare function MessageImpl({ role, children, ...rest }: MessageProps): import("react").JSX.Element;
10
- export declare const Message: typeof MessageImpl & {
11
- Root: typeof MessageImpl;
12
- };
13
- //#endregion
14
- export { Message as AiMessage };
1
+ import { n as MessageProps, t as Message } from "../../index-CjO4Ggf0.mjs";
2
+ export { Message as AiMessage, Message, MessageProps };
@@ -1,17 +1,18 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
2
  import { injectComponentStyle } from "@bysages/core/styling";
3
3
  import { jsx } from "react/jsx-runtime";
4
- //#region src/components/ai-message/index.tsx
5
- function MessageImpl({ role = "assistant", children, ...rest }) {
4
+ // src/components/ai-message/index.tsx
5
+ function MessageImpl({ message, role: roleProp, children, ...rest }) {
6
6
  injectComponentStyle("ai");
7
+ const role = message?.role ?? roleProp ?? "assistant";
7
8
  return /* @__PURE__ */ jsx("article", {
8
9
  ...rest,
9
10
  "data-scope": "ai",
10
11
  "data-part": "message",
12
+ ...message ? { "data-message-id": message.id } : {},
11
13
  "data-role": role,
12
14
  children
13
15
  });
14
16
  }
15
17
  const Message = withSelfRoot(MessageImpl);
16
- //#endregion
17
18
  export { Message as AiMessage, Message };
@@ -1,19 +1,11 @@
1
- import { t as MentionEntry } from "../../index-Bbg4heDO.mjs";
1
+ import { c as MentionCommitKey, n as MentionPlacement, t as MentionEntry } from "../../index-DcpvCyt6.mjs";
2
2
  import { HTMLAttributes, ReactNode } from "react";
3
- //#region src/components/ai-prompt-input/index.d.ts
4
3
  /**
5
4
  * The prompt vessel: the shared field textarea — self-growing on the
6
- * machine's autoresize — with the submit seal riding its last line.
7
- * Around the body, props answer the composer's anatomy: `header` for
8
- * attachments riding above, `leading` for the tools at the text's
9
- * left, `trailing` for the seal itself, `footer` for the tools beneath,
10
- * and `footerEnd` for the controls that close the footer row — the
11
- * seal falls there by default, so a model picker dropped in rides the
12
- * send's shoulder. Controlled — bind `value` and take the text on
13
- * `submit`. Enter sends; Shift+Enter breaks the line. While `busy`
14
- * the seal becomes a stop seal and Enter holds its breath.
5
+ * machine's autoresize — with the submit seal riding its last line. With
6
+ * mentions it becomes a token editor; the bound value remains plain text.
15
7
  */
16
- export interface PromptInputProps extends Omit<HTMLAttributes<HTMLFormElement>, "onSubmit"> {
8
+ export interface PromptInputProps extends Omit<HTMLAttributes<HTMLFormElement>, "onSubmit" | "onSelect"> {
17
9
  /** The draft in the vessel — bind `value`; it clears itself on a
18
10
  * successful submit. */
19
11
  value: string;
@@ -28,23 +20,27 @@ export interface PromptInputProps extends Omit<HTMLAttributes<HTMLFormElement>,
28
20
  /** The machine is working — the seal becomes a stop seal and Enter
29
21
  * holds its breath. */
30
22
  busy?: boolean;
31
- /** Mention candidates for the field: pass the roster and the summon
32
- * character (`@` unless told otherwise) and the vessel rides the
33
- * textarea. While candidates are up, Enter inserts and the send
34
- * waits. */
23
+ /** Mention candidates. Rich tokens render after a choice; the value
24
+ * stays ordinary composer text. */
35
25
  mentions?: {
36
26
  items: MentionEntry[];
37
27
  trigger?: string;
28
+ triggers?: string | string[];
29
+ insertOnSelect?: boolean;
30
+ commitKeys?: MentionCommitKey[];
31
+ placement?: MentionPlacement;
32
+ clearQueryOnSelect?: boolean;
38
33
  };
34
+ /** The whole mention entry was selected. */
35
+ onSelect?: (entry: MentionEntry) => void;
39
36
  header?: ReactNode;
40
37
  leading?: ReactNode;
41
38
  trailing?: ReactNode;
42
39
  footer?: ReactNode;
43
40
  footerEnd?: ReactNode;
44
41
  }
45
- declare function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled, busy, mentions, header, leading, trailing, footer, footerEnd, ...rest }: PromptInputProps): import("react").JSX.Element;
42
+ declare function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled, busy, mentions, onSelect, header, leading, trailing, footer, footerEnd, ...rest }: PromptInputProps): import("react").JSX.Element;
46
43
  export declare const PromptInput: typeof PromptInputImpl & {
47
44
  Root: typeof PromptInputImpl;
48
45
  };
49
- //#endregion
50
46
  export { PromptInput as AiPromptInput };
@@ -1,126 +1 @@
1
- import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
2
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
3
- import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
4
- import { Button } from "../button/index.mjs";
5
- import { Field } from "../field/index.mjs";
6
- import { n as MentionsVessel, r as useMentions } from "../../mentions-BwnyvdXz.mjs";
7
- import { injectComponentStyle } from "@bysages/core/styling";
8
- import { Fragment, jsx, jsxs } from "react/jsx-runtime";
9
- import { useRef } from "react";
10
- //#region src/components/ai-prompt-input/index.tsx
11
- const arrowUpIcon = iconNode("arrow-up", {
12
- width: 14,
13
- height: 14
14
- });
15
- const stopIcon = iconNode("square", {
16
- width: 14,
17
- height: 14
18
- });
19
- /** An empty slot leaves no part in the anatomy — the bare vessel keeps
20
- * its single-line posture. */
21
- function row(part, content) {
22
- if (content == null || Array.isArray(content) && content.length === 0) return null;
23
- return /* @__PURE__ */ jsx("div", {
24
- "data-scope": "ai",
25
- "data-part": part,
26
- children: content
27
- });
28
- }
29
- function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled = false, busy = false, mentions, header, leading, trailing, footer, footerEnd, ...rest }) {
30
- injectComponentStyle("ai");
31
- const fieldRef = useRef(null);
32
- const messages = useComponentMessages();
33
- const placeholderText = placeholder ?? messages.ai.conversation;
34
- const mentionState = useMentions(() => ({
35
- items: mentions?.items ?? [],
36
- trigger: mentions?.trigger
37
- }), () => fieldRef.current, {
38
- getText: () => fieldRef.current?.value ?? value,
39
- setText: (next) => onValueChange?.(next)
40
- });
41
- const mentionsActive = mentions != null;
42
- const submit = () => {
43
- const text = value.trim();
44
- if (!text || disabled || busy) return;
45
- onSubmit?.(text);
46
- onValueChange?.("");
47
- };
48
- const seal = busy ? /* @__PURE__ */ jsx(Button, {
49
- variant: "solid",
50
- size: "sm",
51
- square: true,
52
- type: "button",
53
- "aria-label": messages.ai.stop,
54
- disabled,
55
- onClick: () => onStop?.(),
56
- children: stopIcon
57
- }) : /* @__PURE__ */ jsx(Button, {
58
- variant: "solid",
59
- size: "sm",
60
- square: true,
61
- type: "submit",
62
- "aria-label": messages.ai.send,
63
- disabled: disabled || !value.trim(),
64
- children: arrowUpIcon
65
- });
66
- const hasFooter = footer != null && (!Array.isArray(footer) || footer.length > 0);
67
- return /* @__PURE__ */ jsxs("form", {
68
- ...rest,
69
- "data-scope": "ai",
70
- "data-part": "prompt",
71
- onSubmit: (event) => {
72
- event.preventDefault();
73
- submit();
74
- },
75
- children: [
76
- row("prompt-header", header),
77
- /* @__PURE__ */ jsxs("div", {
78
- "data-scope": "ai",
79
- "data-part": "prompt-main",
80
- children: [
81
- row("prompt-leading", leading),
82
- /* @__PURE__ */ jsx(Field.Root, { children: /* @__PURE__ */ jsx(Field.Textarea, {
83
- ref: fieldRef,
84
- autoresize: true,
85
- rows: 1,
86
- value,
87
- placeholder: placeholderText,
88
- "aria-label": ariaLabel ?? messages.ai.conversation,
89
- disabled,
90
- onChange: (event) => {
91
- onValueChange?.(event.target.value);
92
- mentionState.onInput();
93
- },
94
- onKeyDown: (event) => {
95
- if (mentionState.onKeydown(event)) return;
96
- if (event.key === "Enter" && !event.shiftKey) {
97
- event.preventDefault();
98
- submit();
99
- }
100
- }
101
- }) }),
102
- mentionsActive ? /* @__PURE__ */ jsx(MentionsVessel, {
103
- open: mentionState.open,
104
- matches: mentionState.matches,
105
- active: mentionState.active,
106
- anchor: fieldRef.current,
107
- onInsert: mentionState.insert,
108
- onActiveChange: mentionState.setActive,
109
- onOpenChange: (open) => {
110
- if (!open) mentionState.close();
111
- }
112
- }) : null,
113
- row("prompt-trailing", hasFooter ? trailing : trailing ?? seal)
114
- ]
115
- }),
116
- hasFooter ? /* @__PURE__ */ jsxs("div", {
117
- "data-scope": "ai",
118
- "data-part": "prompt-footer",
119
- children: [footer, row("prompt-end", footerEnd == null ? seal : /* @__PURE__ */ jsxs(Fragment, { children: [footerEnd, seal] }))]
120
- }) : null
121
- ]
122
- });
123
- }
124
- const PromptInput = withSelfRoot(PromptInputImpl);
125
- //#endregion
126
- export { PromptInput as AiPromptInput, PromptInput };
1
+ export { t as AiPromptInput, t as PromptInput } from "../../ai-prompt-input-k34KssHJ.mjs";
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/ai-reasoning/index.d.ts
3
2
  /** The model's thought, folded by the shared collapsible in its quiet
4
3
  * register: bare ink for a trigger, the thought on one hairline. */
5
4
  export interface ReasoningProps extends HTMLAttributes<HTMLDivElement> {
@@ -12,5 +11,4 @@ declare function ReasoningImpl({ label, children, ...rest }: ReasoningProps): im
12
11
  export declare const Reasoning: typeof ReasoningImpl & {
13
12
  Root: typeof ReasoningImpl;
14
13
  };
15
- //#endregion
16
14
  export { Reasoning as AiReasoning };
@@ -1,9 +1,9 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
- import { t as chevron } from "../../chevron-BA7kV9m7.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
+ import { t as chevron } from "../../chevron-DnImlNip.mjs";
3
3
  import { Collapsible } from "../collapsible/index.mjs";
4
4
  import { injectComponentStyle } from "@bysages/core/styling";
5
5
  import { jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/ai-reasoning/index.tsx
6
+ // src/components/ai-reasoning/index.tsx
7
7
  function ReasoningImpl({ label = "Thinking", children, ...rest }) {
8
8
  injectComponentStyle("ai");
9
9
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
@@ -17,5 +17,4 @@ function ReasoningImpl({ label = "Thinking", children, ...rest }) {
17
17
  });
18
18
  }
19
19
  const Reasoning = withSelfRoot(ReasoningImpl);
20
- //#endregion
21
20
  export { Reasoning as AiReasoning, Reasoning };
@@ -1,7 +1,6 @@
1
1
  import { HTMLAttributes } from "react";
2
- //#region src/components/ai-response/index.d.ts
3
2
  /** Markdown set on the paper. Rendering goes through
4
- * `@tanstack/markdown`, whose defaults leave raw HTML and executable
3
+ * `@bysages/core/markdown`, whose defaults leave raw HTML and executable
5
4
  * links inert — streaming-safe by construction. An optional
6
5
  * highlighter re-inks fenced code; the component stays agnostic about
7
6
  * which engine provides it. */
@@ -23,5 +22,4 @@ declare function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ..
23
22
  export declare const Response: typeof ResponseImpl & {
24
23
  Root: typeof ResponseImpl;
25
24
  };
26
- //#endregion
27
25
  export { Response as AiResponse };
@@ -1,2 +1 @@
1
- import { t as Response } from "../../ai-response-CjjjprMY.mjs";
2
- export { Response as AiResponse, Response };
1
+ export { t as AiResponse, t as Response } from "../../ai-response-DTxdL5rX.mjs";
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/ai-source/index.d.ts
3
2
  /** One place the ink came from; href and the rest ride the anchor. */
4
3
  export interface SourceProps extends HTMLAttributes<HTMLAnchorElement> {
5
4
  /** Where the ink came from — also the link text when no children are
@@ -19,5 +18,4 @@ declare function SourcesImpl({ children, ...rest }: SourcesProps): import("react
19
18
  export declare const Sources: typeof SourcesImpl & {
20
19
  Root: typeof SourcesImpl;
21
20
  };
22
- //#endregion
23
21
  export { Source as AiSource, Sources as AiSources };
@@ -1,7 +1,7 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
2
  import { injectComponentStyle } from "@bysages/core/styling";
3
3
  import { jsx } from "react/jsx-runtime";
4
- //#region src/components/ai-source/index.tsx
4
+ // src/components/ai-source/index.tsx
5
5
  function SourceImpl({ href, children, ...rest }) {
6
6
  injectComponentStyle("ai");
7
7
  return /* @__PURE__ */ jsx("li", {
@@ -26,5 +26,4 @@ function SourcesImpl({ children, ...rest }) {
26
26
  });
27
27
  }
28
28
  const Sources = withSelfRoot(SourcesImpl);
29
- //#endregion
30
29
  export { Source as AiSource, Source, Sources as AiSources, Sources };
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes } from "react";
2
- //#region src/components/ai-suggestion/index.d.ts
3
2
  /** A seal-cut button proposing the next stroke; selection hands back
4
3
  * the prompt. The shared Button in its outline register. */
5
4
  export interface SuggestionProps extends Omit<HTMLAttributes<HTMLButtonElement>, "onSelect"> {
@@ -12,5 +11,4 @@ declare function SuggestionImpl({ prompt, onSelect, ...rest }: SuggestionProps):
12
11
  export declare const Suggestion: typeof SuggestionImpl & {
13
12
  Root: typeof SuggestionImpl;
14
13
  };
15
- //#endregion
16
14
  export { Suggestion as AiSuggestion };
@@ -1,8 +1,8 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
2
  import { Button } from "../button/index.mjs";
3
3
  import { injectComponentStyle } from "@bysages/core/styling";
4
4
  import { jsx } from "react/jsx-runtime";
5
- //#region src/components/ai-suggestion/index.tsx
5
+ // src/components/ai-suggestion/index.tsx
6
6
  function SuggestionImpl({ prompt, onSelect, ...rest }) {
7
7
  injectComponentStyle("ai");
8
8
  return /* @__PURE__ */ jsx(Button, {
@@ -14,5 +14,4 @@ function SuggestionImpl({ prompt, onSelect, ...rest }) {
14
14
  });
15
15
  }
16
16
  const Suggestion = withSelfRoot(SuggestionImpl);
17
- //#endregion
18
17
  export { Suggestion as AiSuggestion, Suggestion };
@@ -1,24 +1,2 @@
1
- import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/ai-tool/index.d.ts
3
- export type ToolStatus = "pending" | "running" | "completed" | "error";
4
- /** A tool call: the shared collapsible as the vessel — the name it was
5
- * reached by and the state it reached in on the trigger, its input and
6
- * output folded inside. */
7
- export interface ToolProps extends HTMLAttributes<HTMLDivElement> {
8
- /** The name the tool was reached by — shown raw on the trigger
9
- * unless a `label` speaks friendlier words ("Searching pages…"). */
10
- name: string;
11
- label?: ReactNode;
12
- /** The state the call reached — pending, running, completed, or
13
- * error; stamped on the fold and whispered in the status chip. */
14
- status?: ToolStatus;
15
- defaultOpen?: boolean;
16
- input?: ReactNode;
17
- output?: ReactNode;
18
- }
19
- declare function ToolImpl({ name, label, status, input, output, ...rest }: ToolProps): import("react").JSX.Element;
20
- export declare const Tool: typeof ToolImpl & {
21
- Root: typeof ToolImpl;
22
- };
23
- //#endregion
24
- export { Tool as AiTool };
1
+ import { a as ToolValue, i as ToolStatus, n as ToolApproval, r as ToolProps, t as Tool } from "../../index-lCsvE2Vl.mjs";
2
+ export { Tool as AiTool, Tool, ToolApproval, ToolProps, ToolStatus, ToolValue };
@@ -1,15 +1,28 @@
1
- import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
- import { t as chevron } from "../../chevron-BA7kV9m7.mjs";
1
+ import { t as withSelfRoot } from "../../family-Co1YsN4N.mjs";
2
+ import { n as useComponentMessages } from "../../messages-B6n0lVyt.mjs";
3
+ import { Button } from "../button/index.mjs";
4
+ import { t as chevron } from "../../chevron-DnImlNip.mjs";
3
5
  import { Collapsible } from "../collapsible/index.mjs";
4
6
  import { injectComponentStyle } from "@bysages/core/styling";
5
7
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
- //#region src/components/ai-tool/index.tsx
7
- function ToolImpl({ name, label, status, input, output, ...rest }) {
8
+ // src/components/ai-tool/index.tsx
9
+ function formatValue(value) {
10
+ if (typeof value === "string") return value;
11
+ if (typeof value === "number" || typeof value === "boolean" || value === null) return String(value);
12
+ if (value === void 0) return "";
13
+ return JSON.stringify(value, null, 2) ?? "";
14
+ }
15
+ function ToolImpl({ name, label, status, approval, input, inputValue, output, outputValue, defaultOpen = false, onApprove, onDeny, ...rest }) {
8
16
  injectComponentStyle("ai");
17
+ const messages = useComponentMessages();
18
+ const inputContent = input ?? (inputValue !== void 0 ? formatValue(inputValue) : null);
19
+ const outputContent = output ?? (outputValue !== void 0 ? formatValue(outputValue) : null);
9
20
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
10
21
  ...rest,
22
+ defaultOpen,
11
23
  "data-ai": "tool",
12
24
  "data-status": status,
25
+ "data-approval": approval,
13
26
  children: [/* @__PURE__ */ jsxs(Collapsible.Trigger, { children: [
14
27
  /* @__PURE__ */ jsx("span", { children: label ?? name }),
15
28
  status ? /* @__PURE__ */ jsx("span", {
@@ -21,18 +34,37 @@ function ToolImpl({ name, label, status, input, output, ...rest }) {
21
34
  ] }), /* @__PURE__ */ jsx(Collapsible.Content, { children: /* @__PURE__ */ jsxs("div", {
22
35
  "data-scope": "ai",
23
36
  "data-part": "tool-body",
24
- children: [input ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
25
- "data-scope": "ai",
26
- "data-part": "tool-label",
27
- children: "Input"
28
- }), /* @__PURE__ */ jsx("pre", { children: input })] }) : null, output ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
29
- "data-scope": "ai",
30
- "data-part": "tool-label",
31
- children: "Output"
32
- }), /* @__PURE__ */ jsx("pre", { children: output })] }) : null]
37
+ children: [
38
+ inputContent != null ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
39
+ "data-scope": "ai",
40
+ "data-part": "tool-label",
41
+ children: messages.ai.input
42
+ }), /* @__PURE__ */ jsx("pre", { children: inputContent })] }) : null,
43
+ outputContent != null ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx("span", {
44
+ "data-scope": "ai",
45
+ "data-part": "tool-label",
46
+ children: messages.ai.output
47
+ }), /* @__PURE__ */ jsx("pre", { children: outputContent })] }) : null,
48
+ approval === "required" ? /* @__PURE__ */ jsxs("div", {
49
+ "data-scope": "ai",
50
+ "data-part": "tool-actions",
51
+ "data-approval": approval,
52
+ children: [/* @__PURE__ */ jsx(Button, {
53
+ variant: "outline",
54
+ size: "sm",
55
+ tone: "danger",
56
+ onClick: () => onDeny?.(),
57
+ children: messages.ai.deny
58
+ }), /* @__PURE__ */ jsx(Button, {
59
+ variant: "solid",
60
+ size: "sm",
61
+ onClick: () => onApprove?.(),
62
+ children: messages.ai.approve
63
+ })]
64
+ }) : null
65
+ ]
33
66
  }) })]
34
67
  });
35
68
  }
36
69
  const Tool = withSelfRoot(ToolImpl);
37
- //#endregion
38
70
  export { Tool as AiTool, Tool };
@@ -1,5 +1,4 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
- //#region src/components/alert/index.d.ts
3
2
  export type AlertStatus = "ink" | "info" | "success" | "warning" | "danger";
4
3
  /** A notice
5
4
 
@@ -22,4 +21,4 @@ export declare const Alert: typeof AlertRoot & {
22
21
  Title: typeof Title;
23
22
  Description: typeof Description;
24
23
  };
25
- //#endregion
24
+ export {};
@@ -1,8 +1,8 @@
1
- import { r as iconNode } from "../../icon-Cri0-7-x.mjs";
1
+ import { r as iconNode } from "../../icon-C9udWCyz.mjs";
2
2
  import { injectComponentStyle } from "@bysages/core/styling";
3
3
  import { jsx } from "react/jsx-runtime";
4
4
  import { createContext, useContext } from "react";
5
- //#region src/components/alert/index.tsx
5
+ // src/components/alert/index.tsx
6
6
  const StatusContext = createContext("ink");
7
7
  function statusIcon(status) {
8
8
  return iconNode({
@@ -69,5 +69,4 @@ const Alert = Object.assign(AlertRoot, {
69
69
  Description
70
70
  });
71
71
  injectComponentStyle("alert");
72
- //#endregion
73
72
  export { Alert };
@@ -1,6 +1,5 @@
1
1
  import { ComponentProps } from "react";
2
2
  import { AngleSlider as AngleSlider$1 } from "@ark-ui/react/angle-slider";
3
- //#region src/components/angle-slider/index.d.ts
4
3
  type AngleSliderRootProps = ComponentProps<typeof AngleSlider$1.Root> & {
5
4
  /** One rung of the dial ladder — the diameter the needle sweeps. */
6
5
  size?: "sm" | "md" | "lg";
@@ -30,4 +29,4 @@ type AngleSliderParts = Omit<typeof AngleSlider$1, "Root"> & {
30
29
  Root: typeof AngleSliderRoot;
31
30
  };
32
31
  export declare const AngleSlider: typeof AngleSliderFacade & AngleSliderParts;
33
- //#endregion
32
+ export {};