@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,11 +1,16 @@
1
- import { t as Popover } from "./index-Eu-Bttta.mjs";
1
+ import { t as Popover } from "./index-BVdkcSSY.mjs";
2
2
  import { HTMLAttributes } from "react";
3
- //#region src/components/mentions/use-mentions.d.ts
3
+ type MentionCommitKey = "Enter" | "Tab" | " ";
4
4
  interface UseMentionsOptions {
5
- /** The candidates offered once the trigger character is typed. */
5
+ /** The candidates offered once a trigger character is typed. */
6
6
  items: MentionEntry[];
7
7
  /** The character that summons the candidates. */
8
8
  trigger?: string;
9
+ /** One or more summoning characters; the longest token closest to the
10
+ * caret wins when several triggers are active. */
11
+ triggers?: string | string[];
12
+ /** Keys that choose the highlighted candidate. */
13
+ commitKeys?: MentionCommitKey[];
9
14
  }
10
15
  interface UseMentionsHandlers {
11
16
  /** The text the field holds right now — read at keystroke time, never
@@ -13,6 +18,14 @@ interface UseMentionsHandlers {
13
18
  getText: () => string;
14
19
  /** Writes the field's next text: a mention inserted at the token. */
15
20
  setText: (value: string) => void;
21
+ /** The absolute text offset of the field caret; a rich editor supplies this.
22
+ * A textarea is read from its own selection when omitted. */
23
+ getCaret?: () => number | undefined;
24
+ /** Called before insertion. Return `false` to record the choice without
25
+ * rewriting composer text — useful for slash commands and context chips. */
26
+ select?: (entry: MentionEntry) => boolean | void;
27
+ /** Replaces default insertion so rich editors can commit their own token. */
28
+ commit?: (entry: MentionEntry) => void;
16
29
  }
17
30
  /** Whatever carries a key press — a native KeyboardEvent or a React
18
31
  * synthetic one; the detector only needs the key's name and the power
@@ -21,7 +34,7 @@ interface MentionKeyEvent {
21
34
  key: string;
22
35
  preventDefault: () => void;
23
36
  }
24
- /** The @-detection machinery behind a mention field: watch the caret,
37
+ /** The detection machinery behind a mention field: watch the caret,
25
38
  * offer the matching candidates, and answer for the keys that drive
26
39
  * them. The field element arrives as a getter because hosts wrap it
27
40
  * differently (a bare textarea, a field part's ref).
@@ -34,17 +47,38 @@ declare function useMentions(options: UseMentionsOptions | (() => UseMentionsOpt
34
47
  matches: MentionEntry[];
35
48
  active: number;
36
49
  setActive: import("react").Dispatch<import("react").SetStateAction<number>>;
50
+ anchorIndex: import("react").RefObject<number>;
51
+ caretIndex: import("react").RefObject<number>;
52
+ activeTrigger: import("react").RefObject<string>;
37
53
  insert: (entry: MentionEntry) => void;
38
54
  close: () => void;
39
55
  onInput: () => void;
40
56
  onKeydown: (event: MentionKeyEvent) => boolean;
41
57
  };
42
- //#endregion
43
- //#region src/components/mentions/index.d.ts
44
58
  interface MentionEntry {
59
+ /** Stable identity for tests, popups and business handlers. */
60
+ id?: string;
61
+ /** The primary words shown in the popup and inserted by default. */
45
62
  label: string;
63
+ /** The semantic value reported by the field. */
46
64
  value: string;
65
+ /** One line of supporting copy under the label. */
66
+ description?: string;
67
+ /** A curated core icon name. */
68
+ icon?: string;
69
+ /** Optional section heading; entries with the same heading travel together. */
70
+ group?: string;
71
+ /** The consumer's coarse entry type, such as `file`, `agent` or `command`. */
72
+ kind?: string;
73
+ /** A visible candidate the keyboard and pointer cannot choose. */
74
+ disabled?: boolean;
75
+ /** Exact composer text to insert; it bypasses `trigger + label`. */
76
+ insertText?: string;
77
+ /** Extra consumer data carried back through `onSelect`. */
78
+ meta?: Record<string, unknown>;
47
79
  }
80
+ type MentionTriggers = string | string[];
81
+ type MentionPlacement = "bottom-start" | "top-start";
48
82
  interface MentionsVesselProps {
49
83
  id?: string;
50
84
  /** The host field's rung, so the rows keep the field's register. */
@@ -56,7 +90,9 @@ interface MentionsVesselProps {
56
90
  /** The keyboard's active row. */
57
91
  active?: number;
58
92
  /** The rectangle the vessel points at — the host's textarea. */
59
- anchor?: HTMLTextAreaElement | null;
93
+ anchor?: HTMLElement | null;
94
+ /** Which side of the anchor hosts the candidates. */
95
+ placement?: MentionPlacement;
60
96
  /** A candidate was chosen. */
61
97
  onInsert?: (entry: MentionEntry) => void;
62
98
  /** The pointer moved to a row. */
@@ -69,16 +105,16 @@ interface MentionsVesselProps {
69
105
  * its own anatomy (the textarea rides where the host puts it) and the
70
106
  * vessel still points at the right place. Shares the detection state
71
107
  * with the host through `useMentions`. */
72
- declare function MentionsVesselImpl({ size, open, matches, active, anchor, onInsert, onActiveChange, onOpenChange, id }: MentionsVesselProps): import("react").JSX.Element;
108
+ declare function MentionsVesselImpl({ size, open, matches, active, anchor, placement, onInsert, onActiveChange, onOpenChange, id }: MentionsVesselProps): import("react").JSX.Element;
73
109
  declare const MentionsVessel: typeof MentionsVesselImpl & {
74
110
  Root: typeof MentionsVesselImpl;
75
111
  };
76
112
  /**
77
- * @-mentions: a plain textarea that, when the text before the caret ends
78
- * with the trigger character followed by a token, offers the matching
79
- * candidates in a small anchored vessel; choosing one replaces the token
80
- * with `trigger + label` and hands the whole text back through
81
- * `onValueChange`. Arrows move, Enter inserts, Escape dismisses.
113
+ * Mentions: a textarea that, when the text before the caret ends with a
114
+ * trigger character followed by a token, offers matching candidates in a
115
+ * small anchored vessel. Entries may carry descriptions, icons, groups
116
+ * and consumer metadata. Selecting reports the whole entry; by default it
117
+ * also replaces the token with `trigger + label`.
82
118
  *
83
119
  * The field is the shared `Field.Textarea` — field wiring (label ids,
84
120
  * the invalid state, autoresize) rides on it for free — and the vessel
@@ -88,14 +124,22 @@ declare const MentionsVessel: typeof MentionsVesselImpl & {
88
124
  * input) skip this shell and wire `useMentions` plus `MentionsVessel`
89
125
  * themselves.
90
126
  */
91
- interface MentionsProps extends HTMLAttributes<HTMLDivElement> {
92
- /** The candidates offered once the trigger character is typed. */
127
+ interface MentionsProps extends Omit<HTMLAttributes<HTMLDivElement>, "onSelect"> {
128
+ /** The candidates offered once a trigger character is typed. */
93
129
  items?: MentionEntry[];
94
130
  /** The text held by the field. Supply it to control the field;
95
131
  * changes are reported via `onValueChange`. */
96
132
  value?: string;
97
133
  /** The character that summons the candidates. */
98
134
  trigger?: string;
135
+ /** One or more summoning characters, such as `@` and `/`. */
136
+ triggers?: MentionTriggers;
137
+ /** Keep composer text untouched when a candidate is selected. */
138
+ insertOnSelect?: boolean;
139
+ /** Keys that choose the highlighted candidate. */
140
+ commitKeys?: MentionCommitKey[];
141
+ /** Which side of the field hosts the candidates. */
142
+ placement?: MentionPlacement;
99
143
  placeholder?: string;
100
144
  /** Let the field grow with its text instead of holding `rows`. */
101
145
  autoresize?: boolean;
@@ -106,8 +150,9 @@ interface MentionsProps extends HTMLAttributes<HTMLDivElement> {
106
150
  size?: "sm" | "md" | "lg";
107
151
  /** Reports the field's next text. */
108
152
  onValueChange?: (value: string) => void;
153
+ /** Reports the whole selected entry. */
154
+ onSelect?: (entry: MentionEntry) => void;
109
155
  }
110
- declare function MentionsImpl({ items, value, trigger, placeholder, autoresize, invalid, size, onValueChange, children, ...rest }: MentionsProps): import("react").JSX.Element;
156
+ declare function MentionsImpl({ items, value, trigger, triggers, insertOnSelect, commitKeys, placement, placeholder, autoresize, invalid, size, onValueChange, onSelect, children, ...rest }: MentionsProps): import("react").JSX.Element;
111
157
  declare const Mentions: typeof MentionsImpl & typeof Popover;
112
- //#endregion
113
- export { MentionsVesselProps as a, useMentions as c, MentionsVessel as i, Mentions as n, UseMentionsHandlers as o, MentionsProps as r, UseMentionsOptions as s, MentionEntry as t };
158
+ export { MentionsProps as a, MentionCommitKey as c, useMentions as d, Mentions as i, UseMentionsHandlers as l, MentionPlacement as n, MentionsVessel as o, MentionTriggers as r, MentionsVesselProps as s, MentionEntry as t, UseMentionsOptions as u };
@@ -1,7 +1,6 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  import { CollectionItem } from "@ark-ui/react/collection";
3
3
  import { Select, SelectRootComponentProps } from "@ark-ui/react/select";
4
- //#region src/components/select/native.d.ts
5
4
  /** One row of the platform's own list. */
6
5
  interface NativeSelectOption {
7
6
  label: string;
@@ -23,8 +22,6 @@ interface NativeSelectProps extends Omit<HTMLAttributes<HTMLSpanElement>, "child
23
22
  onValueChange?: (value: string) => void;
24
23
  }
25
24
  declare function NativeSelect({ value, options, size, invalid, placeholder, disabled, onValueChange, "aria-label": ariaLabel, "aria-labelledby": ariaLabelledby, ...rest }: NativeSelectProps): import("react").JSX.Element;
26
- //#endregion
27
- //#region src/components/select/index.d.ts
28
25
  /** Ark's Select, dressed in the paper-and-ink system: the trigger is the
29
26
  * whole control and its list dissolves open as a paper vessel, the checked
30
27
  * row taking the flat ink fill. The API is Ark's own — Root, Label, Control,
@@ -67,5 +64,4 @@ declare namespace SelectFacade {
67
64
  var displayName: string;
68
65
  }
69
66
  declare const Select$1: typeof SelectFacade & SelectParts;
70
- //#endregion
71
67
  export { NativeSelectProps as a, NativeSelectOption as i, SelectFacadeProps as n, NativeSelect as r, Select$1 as t };
@@ -0,0 +1,37 @@
1
+ import { HTMLAttributes, ReactNode } from "react";
2
+ type ToolStatus = "pending" | "running" | "completed" | "error" | "denied";
3
+ type ToolApproval = "required" | "approved" | "denied";
4
+ type ToolValue = string | number | boolean | null | ToolValue[] | {
5
+ [key: string]: ToolValue;
6
+ };
7
+ /** A tool call: the shared collapsible as the vessel — the name it was
8
+ * reached by and the state it reached in on the trigger, its input and
9
+ * output folded inside. */
10
+ interface ToolProps extends HTMLAttributes<HTMLDivElement> {
11
+ /** The name the tool was reached by — shown raw on the trigger
12
+ * unless a `label` speaks friendlier words ("Searching pages…"). */
13
+ name: string;
14
+ label?: ReactNode;
15
+ /** The state the call reached — pending, running, completed, error,
16
+ * or denied; stamped on the fold and whispered in the status chip. */
17
+ status?: ToolStatus;
18
+ /** The human approval gate, when the call needs one. */
19
+ approval?: ToolApproval;
20
+ /** Custom request display; structured data can ride `inputValue`. */
21
+ input?: ReactNode;
22
+ /** The machine-readable request, formatted automatically. */
23
+ inputValue?: ToolValue;
24
+ /** Custom answer display; structured data can ride `outputValue`. */
25
+ output?: ReactNode;
26
+ /** The machine-readable answer, formatted automatically. */
27
+ outputValue?: ToolValue;
28
+ /** The fold arrives open when set — rides the shared collapsible. */
29
+ defaultOpen?: boolean;
30
+ onApprove?: () => void;
31
+ onDeny?: () => void;
32
+ }
33
+ declare function ToolImpl({ name, label, status, approval, input, inputValue, output, outputValue, defaultOpen, onApprove, onDeny, ...rest }: ToolProps): import("react").JSX.Element;
34
+ declare const Tool: typeof ToolImpl & {
35
+ Root: typeof ToolImpl;
36
+ };
37
+ export { ToolValue as a, ToolStatus as i, ToolApproval as n, ToolProps as r, Tool as t };
package/dist/index.d.mts CHANGED
@@ -2,16 +2,16 @@ import { Accordion, AccordionFacadeProps, AccordionItem } from "./components/acc
2
2
  import { Affix, AffixProps } from "./components/affix/index.mjs";
3
3
  import { Action, ActionProps } from "./components/ai-action/index.mjs";
4
4
  import { AiAttachment as Attachment, AiAttachments as Attachments, AttachmentProps } from "./components/ai-attachments/index.mjs";
5
- import { AiMessage as Message, MessageProps } from "./components/ai-message/index.mjs";
6
- import { n as PopoverFacadeProps, t as Popover } from "./index-Eu-Bttta.mjs";
7
- import { a as MentionsVesselProps, c as useMentions, i as MentionsVessel, n as Mentions, o as UseMentionsHandlers, r as MentionsProps, s as UseMentionsOptions, t as MentionEntry } from "./index-Bbg4heDO.mjs";
5
+ import { a as ToolValue, i as ToolStatus, n as ToolApproval, r as ToolProps, t as Tool } from "./index-lCsvE2Vl.mjs";
6
+ import { C as toolPartDisplay, S as AiToolDisplay, _ as AiSdkSourceDocumentPart, a as AiMediaProps, b as AiSdkTextPart, c as AiPartsSlots, d as AiSdkFilePart, f as AiSdkMediaPart, g as AiSdkReasoningPart, h as AiSdkReasoningFilePart, i as AiMediaKind, l as AiSdkCustomPart, m as AiSdkMessagePart, n as MessageProps, o as AiParts, p as AiSdkMessage, r as AiMedia, s as AiPartsProps, t as Message, u as AiSdkDataPart, v as AiSdkSourceUrlPart, x as AiSdkToolPart, y as AiSdkStepStartPart } from "./index-CjO4Ggf0.mjs";
7
+ import { n as PopoverFacadeProps, t as Popover } from "./index-BVdkcSSY.mjs";
8
+ import { a as MentionsProps, c as MentionCommitKey, d as useMentions, i as Mentions, l as UseMentionsHandlers, n as MentionPlacement, o as MentionsVessel, r as MentionTriggers, s as MentionsVesselProps, t as MentionEntry, u as UseMentionsOptions } from "./index-DcpvCyt6.mjs";
8
9
  import { AiPromptInput as PromptInput, PromptInputProps } from "./components/ai-prompt-input/index.mjs";
9
10
  import { AiReasoning as Reasoning, ReasoningProps } from "./components/ai-reasoning/index.mjs";
10
11
  import { AiResponse as Response, ResponseProps } from "./components/ai-response/index.mjs";
11
12
  import { AiSource as Source, AiSources as Sources, SourceProps, SourcesProps } from "./components/ai-source/index.mjs";
12
13
  import { AiSuggestion as Suggestion, SuggestionProps } from "./components/ai-suggestion/index.mjs";
13
- import { AiTool as Tool, ToolProps, ToolStatus } from "./components/ai-tool/index.mjs";
14
- import { a as FileUIPart, c as SourceUrlUIPart, d as ToolUIPart, f as UIMessage, i as DataUIPart, l as StepStartUIPart, n as AiActions, o as ReasoningUIPart, p as UIMessagePart, r as AiContent, s as SourceDocumentUIPart, t as Ai, u as TextUIPart } from "./index-B4twHAQC.mjs";
14
+ import { Ai, AiActions, AiContent, AiConversation, AiJumpToLatest, ChatOnDataCallback, ChatOnErrorCallback, ChatOnFinishCallback, ChatState, ChatStatus, CreateUIMessage, CustomContentUIPart, DataUIPart, DynamicToolUIPart, FileUIPart, InferUITools, ProviderMetadata, ProviderReference, ReasoningFileUIPart, ReasoningUIPart, SourceDocumentUIPart, SourceUrlUIPart, StepStartUIPart, TextUIPart, ToolSet, ToolUIPart, UIDataTypes, UIMessage, UIMessageChunk, UIMessagePart, UITool, UIToolInvocation, UITools } from "./components/ai/index.mjs";
15
15
  import { Alert, AlertProps, AlertStatus } from "./components/alert/index.mjs";
16
16
  import { AngleSlider, AngleSliderFacadeProps } from "./components/angle-slider/index.mjs";
17
17
  import { AspectRatio, AspectRatioProps } from "./components/aspect-ratio/index.mjs";
@@ -71,7 +71,7 @@ import { Highlight } from "./components/highlight/index.mjs";
71
71
  import { HoverCard, HoverCardFacadeProps } from "./components/hover-card/index.mjs";
72
72
  import { Icon, IconProps } from "./components/icon/index.mjs";
73
73
  import { ImageCropper, ImageCropperFacadeProps } from "./components/image-cropper/index.mjs";
74
- import { n as ImageViewerProps, t as ImageViewer } from "./index-Dj8S4eyJ.mjs";
74
+ import { n as ImageViewerProps, t as ImageViewer } from "./index-D4C52fI7.mjs";
75
75
  import { Image, ImageProps } from "./components/image/index.mjs";
76
76
  import { InputGroup, InputGroupPartProps } from "./components/input-group/index.mjs";
77
77
  import { Input, InputProps } from "./components/input/index.mjs";
@@ -83,7 +83,7 @@ import { List, ListContentProps, ListRootProps } from "./components/list/index.m
83
83
  import { Listbox } from "./components/listbox/index.mjs";
84
84
  import { Marquee } from "./components/marquee/index.mjs";
85
85
  import { Masonry, MasonryProps } from "./components/masonry/index.mjs";
86
- import { a as MediaTextTrackOption, i as MediaSourceOption, n as Video, o as formatMediaTime, r as MediaPlayerProps, t as Audio } from "./index-BcRdWGY-.mjs";
86
+ import { a as MediaTextTrackOption, i as MediaSourceOption, n as Video, o as formatMediaTime, r as MediaPlayerProps, t as Audio } from "./index-DIZEFqJM.mjs";
87
87
  import { Menu, MenuFacadeProps, MenuItemOption } from "./components/menu/index.mjs";
88
88
  import { Menubar, MenubarEntry, MenubarGroup, MenubarProps } from "./components/menubar/index.mjs";
89
89
  import { Meter, MeterRootProps } from "./components/meter/index.mjs";
@@ -104,7 +104,7 @@ import { RatingGroup, RatingGroupFacadeProps } from "./components/rating-group/i
104
104
  import { Result, ResultIcon, ResultRoot, ResultRootProps } from "./components/result/index.mjs";
105
105
  import { ScrollArea } from "./components/scroll-area/index.mjs";
106
106
  import { SegmentGroup, SegmentGroupFacadeProps, SegmentGroupItem } from "./components/segment-group/index.mjs";
107
- import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "./index-D_iKc2Uw.mjs";
107
+ import { a as NativeSelectProps, i as NativeSelectOption, n as SelectFacadeProps, r as NativeSelect, t as Select } from "./index-DczfbPCg.mjs";
108
108
  import { Separator, SeparatorProps } from "./components/separator/index.mjs";
109
109
  import { SignaturePad } from "./components/signature-pad/index.mjs";
110
110
  import { Skeleton, SkeletonProps } from "./components/skeleton/index.mjs";
@@ -135,10 +135,10 @@ import { Tooltip, TooltipFacadeProps } from "./components/tooltip/index.mjs";
135
135
  import { Tour, TourFacadeProps, TourInteractOutsideEvent, TourPointerDownOutsideEvent, TourStepDetails, useTour } from "./components/tour/index.mjs";
136
136
  import { Transfer, TransferItem, TransferProps } from "./components/transfer/index.mjs";
137
137
  import { TreeSelect, TreeSelectNode, TreeSelectProps } from "./components/tree-select/index.mjs";
138
- import { TreeView } from "./components/tree-view/index.mjs";
138
+ import { TreeView, TreeViewOption } from "./components/tree-view/index.mjs";
139
139
  import { Typography } from "./components/typography/index.mjs";
140
140
  import { User, UserProps } from "./components/user/index.mjs";
141
141
  import { VirtualList, VirtualListProps } from "./components/virtual-list/index.mjs";
142
142
  import { Watermark, WatermarkProps } from "./components/watermark/index.mjs";
143
143
  export * from "@bysages/core";
144
- export { Accordion, AccordionFacadeProps, AccordionItem, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AlertProps, AlertStatus, AngleSlider, AngleSliderFacadeProps, AspectRatio, AspectRatioProps, AttachmentProps, Audio, AutoComplete, AutoCompleteProps, Avatar, AvatarFacadeProps, AvatarGroup, AvatarGroupProps, AvatarProps, AvatarSize, BackTop, BackTopProps, Badge, BadgeProps, Banner, BannerFacadeProps, BannerRootProps, BannerStatus, Bento, BentoCell, BentoCellProps, BentoProps, BentoRoot, BlockUI, BlockUIProps, Breadcrumb, BreadcrumbFacadeProps, BreadcrumbItem, Browser, BrowserBody, BrowserDots, BrowserPartProps, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarProps, Card, Carousel, CascadeSelect, CascadeSelectNode, CascadeSelectProps, Checkbox, CheckboxFacadeProps, CheckboxGroup, CheckboxGroupProps, CheckboxOption, Chip, ChipProps, ClientOnly, type ClientOnlyProps, Clipboard, Collapsible, CollapsibleFacadeProps, type CollectionItem, type CollectionOptions, ColorPicker, type ColumnDef, Combobox, Command, CommandEntry, CommandProps, Comment, CommentProps, ConfigContext, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, Container, ContainerProps, type CreateToasterReturn, DataTable, DataTableProps, type DataUIPart, DataView, DataViewProps, DateInput, type DateInputFocusChangeDetails, type DateInputValueChangeDetails, DatePicker, type DatePickerFocusChangeDetails, type DatePickerOpenChangeDetails, type DatePickerValueChangeDetails, type DatePickerViewChangeDetails, type DatePickerVisibleRangeChangeDetails, DeferredContent, DeferredContentProps, Descriptions, DescriptionsItemData, DescriptionsRoot, DescriptionsRootProps, Dialog, DialogFacadeProps, type DialogOpenChangeDetails, Dock, DockItem, DockItemProps, DockProps, DockRoot, DownloadTrigger, type DownloadTriggerBaseProps, type DownloadTriggerProps, type DownloadableData, Drawer, DrawerFacadeProps, DynamicInput, DynamicInputProps, Editable, Ellipsis, EllipsisProps, Empty, FLOAT_BUTTON_CONTEXT, Field, type FieldApi, Fieldset, type FilePathTreeNode, type FileUIPart, FileUpload, type FlatTreeNode, FlexRender, FloatButton, FloatButtonAction, FloatButtonContextValue, FloatButtonFacadeProps, FloatButtonPlacement, FloatButtonRootProps, FloatButtonSize, FloatingPanel, FloatingPanelFacadeProps, FocusTrap, type FocusTrapBaseProps, type FocusTrapProps, Form, type FormApi, FormField, FormFieldProps, FormProps, Format, Frame, Grid, type GridCollection, type GridCollectionOptions, GridProps, Highlight, HoverCard, HoverCardFacadeProps, Icon, IconProps, Image, ImageCropper, ImageCropperFacadeProps, ImageProps, ImageViewer, ImageViewerProps, Input, InputGroup, InputGroupPartProps, InputProps, JsonTreeView, Kbd, KbdProps, Layout, LayoutContextValue, LayoutResizeHandlers, LayoutRootProps, LayoutSiderProps, LayoutSiderState, Link, LinkProps, List, type ListCollection, ListContentProps, ListRootProps, Listbox, Marquee, Masonry, MasonryProps, type MediaPlayerProps, type MediaSourceOption, type MediaTextTrackOption, MentionEntry, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, Menu, MenuFacadeProps, MenuItemOption, Menubar, MenubarEntry, MenubarGroup, MenubarProps, MessageProps, Meter, MeterRootProps, NativeSelect, type NativeSelectOption, type NativeSelectProps, NavigationMenu, NavigationMenuFacadeProps, NavigationMenuLinkOption, NumberInput, OrderList, OrderListProps, OrderOption, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, PopconfirmProps, Popover, PopoverFacadeProps, Presence, type PresenceBaseProps, type PresenceProps, PresenceProvider, Progress, ProgressGroup, ProgressGroupProps, ProgressSegment, PromptInputProps, QrCode, RadioGroup, RadioGroupFacadeProps, RadioGroupItem, RatingGroup, RatingGroupFacadeProps, ReasoningProps, type ReasoningUIPart, ResponseProps, Result, ResultIcon, ResultRoot, ResultRootProps, ScrollArea, SegmentGroup, SegmentGroupFacadeProps, SegmentGroupItem, Select, SelectFacadeProps, Separator, SeparatorProps, SignaturePad, Skeleton, SkeletonProps, Slider, SliderFacadeProps, type SortingState, type SourceDocumentUIPart, SourceProps, type SourceUrlUIPart, SourcesProps, Spinner, SpinnerProps, SplitButton, SplitButtonEntry, SplitButtonProps, Splitter, SplitterFacadeProps, SplitterItem, Spotlight, SpotlightProps, Stack, StackProps, Stat, StatDeltaProps, type StepStartUIPart, Steps, StepsFacadeProps, StepsItem, SuggestionProps, Swap, Switch, SwitchFacadeProps, Tabs, TabsFacadeProps, TabsItem, Tag, TagProps, TagsInput, Terminal, TerminalProps, type TextUIPart, Textarea, TextareaProps, Timeline, Timer, Toast, Toaster, Toc, TocFacadeProps, Toggle, ToggleFacadeProps, ToggleGroup, ToggleGroupFacadeProps, ToggleGroupItem, ToolProps, ToolStatus, type ToolUIPart, Toolbar, ToolbarProps, Tooltip, TooltipFacadeProps, Tour, TourFacadeProps, type TourInteractOutsideEvent, type TourPointerDownOutsideEvent, type TourStepDetails, Transfer, TransferItem, TransferProps, type TreeCollection, type TreeCollectionOptions, type TreeNode, TreeSelect, TreeSelectNode, TreeSelectProps, TreeView, Typography, type UIMessage, type UIMessagePart, type UseAsyncListProps, type UseAsyncListReturn, type UseDownloadProps, type UseDownloadReturn, type UseListCollectionProps, type UseListCollectionReturn, type UseListSelectionProps, type UseListSelectionReturn, type UseMentionsHandlers, type UseMentionsOptions, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, User, UserProps, Video, VirtualList, VirtualListProps, Watermark, WatermarkProps, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, formatMediaTime, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
144
+ export { Accordion, AccordionFacadeProps, AccordionItem, Action, Action as AiAction, ActionProps, Affix, AffixProps, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiJumpToLatest, AiMedia, type AiMediaKind, type AiMediaProps, Message as AiMessage, Message, AiParts, type AiPartsProps, type AiPartsSlots, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, type AiSdkCustomPart, type AiSdkDataPart, type AiSdkFilePart, type AiSdkMediaPart, type AiSdkMessage, type AiSdkMessagePart, type AiSdkReasoningFilePart, type AiSdkReasoningPart, type AiSdkSourceDocumentPart, type AiSdkSourceUrlPart, type AiSdkStepStartPart, type AiSdkTextPart, type AiSdkToolPart, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, type AiToolDisplay, Alert, AlertProps, AlertStatus, AngleSlider, AngleSliderFacadeProps, AspectRatio, AspectRatioProps, AttachmentProps, Audio, AutoComplete, AutoCompleteProps, Avatar, AvatarFacadeProps, AvatarGroup, AvatarGroupProps, AvatarProps, AvatarSize, BackTop, BackTopProps, Badge, BadgeProps, Banner, BannerFacadeProps, BannerRootProps, BannerStatus, Bento, BentoCell, BentoCellProps, BentoProps, BentoRoot, BlockUI, BlockUIProps, Breadcrumb, BreadcrumbFacadeProps, BreadcrumbItem, Browser, BrowserBody, BrowserDots, BrowserPartProps, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, ButtonGroupProps, ButtonProps, Calendar, CalendarProps, Card, Carousel, CascadeSelect, CascadeSelectNode, CascadeSelectProps, type ChatOnDataCallback, type ChatOnErrorCallback, type ChatOnFinishCallback, type ChatState, type ChatStatus, Checkbox, CheckboxFacadeProps, CheckboxGroup, CheckboxGroupProps, CheckboxOption, Chip, ChipProps, ClientOnly, type ClientOnlyProps, Clipboard, Collapsible, CollapsibleFacadeProps, type CollectionItem, type CollectionOptions, ColorPicker, type ColumnDef, Combobox, Command, CommandEntry, CommandProps, Comment, CommentProps, ConfigContext, ConfigDensity, ConfigProvider, ConfigProviderProps, ConfigScene, Container, ContainerProps, type CreateToasterReturn, type CreateUIMessage, type CustomContentUIPart, DataTable, DataTableProps, type DataUIPart, DataView, DataViewProps, DateInput, type DateInputFocusChangeDetails, type DateInputValueChangeDetails, DatePicker, type DatePickerFocusChangeDetails, type DatePickerOpenChangeDetails, type DatePickerValueChangeDetails, type DatePickerViewChangeDetails, type DatePickerVisibleRangeChangeDetails, DeferredContent, DeferredContentProps, Descriptions, DescriptionsItemData, DescriptionsRoot, DescriptionsRootProps, Dialog, DialogFacadeProps, type DialogOpenChangeDetails, Dock, DockItem, DockItemProps, DockProps, DockRoot, DownloadTrigger, type DownloadTriggerBaseProps, type DownloadTriggerProps, type DownloadableData, Drawer, DrawerFacadeProps, DynamicInput, DynamicInputProps, type DynamicToolUIPart, Editable, Ellipsis, EllipsisProps, Empty, FLOAT_BUTTON_CONTEXT, Field, type FieldApi, Fieldset, type FilePathTreeNode, type FileUIPart, FileUpload, type FlatTreeNode, FlexRender, FloatButton, FloatButtonAction, FloatButtonContextValue, FloatButtonFacadeProps, FloatButtonPlacement, FloatButtonRootProps, FloatButtonSize, FloatingPanel, FloatingPanelFacadeProps, FocusTrap, type FocusTrapBaseProps, type FocusTrapProps, Form, type FormApi, FormField, FormFieldProps, FormProps, Format, Frame, Grid, type GridCollection, type GridCollectionOptions, GridProps, Highlight, HoverCard, HoverCardFacadeProps, Icon, IconProps, Image, ImageCropper, ImageCropperFacadeProps, ImageProps, ImageViewer, ImageViewerProps, type InferUITools, Input, InputGroup, InputGroupPartProps, InputProps, JsonTreeView, Kbd, KbdProps, Layout, LayoutContextValue, LayoutResizeHandlers, LayoutRootProps, LayoutSiderProps, LayoutSiderState, Link, LinkProps, List, type ListCollection, ListContentProps, ListRootProps, Listbox, Marquee, Masonry, MasonryProps, type MediaPlayerProps, type MediaSourceOption, type MediaTextTrackOption, type MentionCommitKey, MentionEntry, MentionPlacement, MentionTriggers, Mentions, MentionsProps, MentionsVessel, MentionsVesselProps, Menu, MenuFacadeProps, MenuItemOption, Menubar, MenubarEntry, MenubarGroup, MenubarProps, MessageProps, Meter, MeterRootProps, NativeSelect, type NativeSelectOption, type NativeSelectProps, NavigationMenu, NavigationMenuFacadeProps, NavigationMenuLinkOption, NumberInput, OrderList, OrderListProps, OrderOption, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, PopconfirmProps, Popover, PopoverFacadeProps, Presence, type PresenceBaseProps, type PresenceProps, PresenceProvider, Progress, ProgressGroup, ProgressGroupProps, ProgressSegment, PromptInputProps, type ProviderMetadata, type ProviderReference, QrCode, RadioGroup, RadioGroupFacadeProps, RadioGroupItem, RatingGroup, RatingGroupFacadeProps, type ReasoningFileUIPart, ReasoningProps, type ReasoningUIPart, ResponseProps, Result, ResultIcon, ResultRoot, ResultRootProps, ScrollArea, SegmentGroup, SegmentGroupFacadeProps, SegmentGroupItem, Select, SelectFacadeProps, Separator, SeparatorProps, SignaturePad, Skeleton, SkeletonProps, Slider, SliderFacadeProps, type SortingState, type SourceDocumentUIPart, SourceProps, type SourceUrlUIPart, SourcesProps, Spinner, SpinnerProps, SplitButton, SplitButtonEntry, SplitButtonProps, Splitter, SplitterFacadeProps, SplitterItem, Spotlight, SpotlightProps, Stack, StackProps, Stat, StatDeltaProps, type StepStartUIPart, Steps, StepsFacadeProps, StepsItem, SuggestionProps, Swap, Switch, SwitchFacadeProps, Tabs, TabsFacadeProps, TabsItem, Tag, TagProps, TagsInput, Terminal, TerminalProps, type TextUIPart, Textarea, TextareaProps, Timeline, Timer, Toast, Toaster, Toc, TocFacadeProps, Toggle, ToggleFacadeProps, ToggleGroup, ToggleGroupFacadeProps, ToggleGroupItem, ToolApproval, ToolProps, type ToolSet, ToolStatus, type ToolUIPart, ToolValue, Toolbar, ToolbarProps, Tooltip, TooltipFacadeProps, Tour, TourFacadeProps, type TourInteractOutsideEvent, type TourPointerDownOutsideEvent, type TourStepDetails, Transfer, TransferItem, TransferProps, type TreeCollection, type TreeCollectionOptions, type TreeNode, TreeSelect, TreeSelectNode, TreeSelectProps, TreeView, TreeViewOption, Typography, type UIDataTypes, type UIMessage, type UIMessageChunk, type UIMessagePart, type UITool, type UIToolInvocation, type UITools, type UseAsyncListProps, type UseAsyncListReturn, type UseDownloadProps, type UseDownloadReturn, type UseListCollectionProps, type UseListCollectionReturn, type UseListSelectionProps, type UseListSelectionReturn, type UseMentionsHandlers, type UseMentionsOptions, type UsePresenceContext, type UsePresenceProps, type UsePresenceReturn, User, UserProps, Video, VirtualList, VirtualListProps, Watermark, WatermarkProps, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, formatMediaTime, toolPartDisplay, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
package/dist/index.mjs CHANGED
@@ -5,16 +5,17 @@ import { Button } from "./components/button/index.mjs";
5
5
  import { Action } from "./components/ai-action/index.mjs";
6
6
  import { AiMessage as Message } from "./components/ai-message/index.mjs";
7
7
  import { Field } from "./components/field/index.mjs";
8
+ import { Icon } from "./components/icon/index.mjs";
8
9
  import { Popover } from "./components/popover/index.mjs";
9
- import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions-BwnyvdXz.mjs";
10
- import { AiPromptInput as PromptInput } from "./components/ai-prompt-input/index.mjs";
10
+ import { n as MentionsVessel, r as useMentions, t as Mentions } from "./mentions-De7ChJbl.mjs";
11
+ import { t as PromptInput } from "./ai-prompt-input-k34KssHJ.mjs";
11
12
  import { Collapsible } from "./components/collapsible/index.mjs";
12
13
  import { AiReasoning as Reasoning } from "./components/ai-reasoning/index.mjs";
13
- import { t as Response } from "./ai-response-CjjjprMY.mjs";
14
+ import { t as Response } from "./ai-response-DTxdL5rX.mjs";
14
15
  import { AiSource as Source, AiSources as Sources } from "./components/ai-source/index.mjs";
15
16
  import { AiSuggestion as Suggestion } from "./components/ai-suggestion/index.mjs";
16
17
  import { AiTool as Tool } from "./components/ai-tool/index.mjs";
17
- import { Ai, AiActions, AiContent } from "./components/ai/index.mjs";
18
+ import { a as AiJumpToLatest, c as toolPartDisplay, i as AiConversation, n as AiActions, o as AiMedia, r as AiContent, s as AiParts, t as Ai } from "./ai-B3vbpXlK.mjs";
18
19
  import { AiAttachment as Attachment, AiAttachments as Attachments } from "./components/ai-attachments/index.mjs";
19
20
  import { Alert } from "./components/alert/index.mjs";
20
21
  import { AngleSlider } from "./components/angle-slider/index.mjs";
@@ -36,7 +37,7 @@ import { DatePicker } from "./components/date-picker/index.mjs";
36
37
  import { Calendar } from "./components/calendar/index.mjs";
37
38
  import { Card } from "./components/card/index.mjs";
38
39
  import { Carousel } from "./components/carousel/index.mjs";
39
- import { t as Input } from "./input-BDpQ0e6G.mjs";
40
+ import { t as Input } from "./input-YRjehBhU.mjs";
40
41
  import { CascadeSelect } from "./components/cascade-select/index.mjs";
41
42
  import { Checkbox } from "./components/checkbox/index.mjs";
42
43
  import { CheckboxGroup } from "./components/checkbox-group/index.mjs";
@@ -72,10 +73,9 @@ import { Frame } from "./components/frame/index.mjs";
72
73
  import { Grid } from "./components/grid/index.mjs";
73
74
  import { Highlight } from "./components/highlight/index.mjs";
74
75
  import { HoverCard } from "./components/hover-card/index.mjs";
75
- import { Icon } from "./components/icon/index.mjs";
76
76
  import { Image } from "./components/image/index.mjs";
77
77
  import { ImageCropper } from "./components/image-cropper/index.mjs";
78
- import { t as ImageViewer } from "./image-viewer-D4FuYrk6.mjs";
78
+ import { t as ImageViewer } from "./image-viewer-BYiXpi1X.mjs";
79
79
  import { InputGroup } from "./components/input-group/index.mjs";
80
80
  import { JsonTreeView } from "./components/json-tree-view/index.mjs";
81
81
  import { Kbd } from "./components/kbd/index.mjs";
@@ -104,7 +104,7 @@ import { RatingGroup } from "./components/rating-group/index.mjs";
104
104
  import { Result, ResultIcon, ResultRoot } from "./components/result/index.mjs";
105
105
  import { ScrollArea } from "./components/scroll-area/index.mjs";
106
106
  import { SegmentGroup } from "./components/segment-group/index.mjs";
107
- import { n as NativeSelect, t as Select } from "./select-D_soVdWK.mjs";
107
+ import { n as NativeSelect, t as Select } from "./select-DQ5669_K.mjs";
108
108
  import { Separator } from "./components/separator/index.mjs";
109
109
  import { SignaturePad } from "./components/signature-pad/index.mjs";
110
110
  import { Skeleton } from "./components/skeleton/index.mjs";
@@ -139,6 +139,6 @@ import { Typography } from "./components/typography/index.mjs";
139
139
  import { User } from "./components/user/index.mjs";
140
140
  import { VirtualList } from "./components/virtual-list/index.mjs";
141
141
  import { Watermark } from "./components/watermark/index.mjs";
142
- import { n as Video, r as formatMediaTime, t as Audio } from "./media-player-C0WcjVI-.mjs";
142
+ import { n as Video, r as formatMediaTime, t as Audio } from "./media-player-CO2Cczl-.mjs";
143
143
  export * from "@bysages/core";
144
- export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, Message as AiMessage, Message, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, Audio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Bento, BentoCell, BentoRoot, BlockUI, Breadcrumb, Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigProvider, Container, DataTable, DataView, DateInput, DatePicker, DeferredContent, Descriptions, DescriptionsRoot, Dialog, Dock, DockItem, DockRoot, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, FLOAT_BUTTON_CONTEXT, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NativeSelect, NavigationMenu, NumberInput, OrderList, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, Result, ResultIcon, ResultRoot, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Spotlight, Stack, Stat, Steps, Swap, Switch, Tabs, Tag, TagsInput, Terminal, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Toolbar, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, User, Video, VirtualList, Watermark, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, formatMediaTime, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
144
+ export { Accordion, Action, Action as AiAction, Affix, Ai, AiActions, Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments, AiContent, AiConversation, AiJumpToLatest, AiMedia, Message as AiMessage, Message, AiParts, PromptInput as AiPromptInput, PromptInput, Reasoning as AiReasoning, Reasoning, Response as AiResponse, Response, Source as AiSource, Source, Sources as AiSources, Sources, Suggestion as AiSuggestion, Suggestion, Tool as AiTool, Tool, Alert, AngleSlider, AspectRatio, Audio, AutoComplete, Avatar, AvatarGroup, BackTop, Badge, Banner, Bento, BentoCell, BentoRoot, BlockUI, Breadcrumb, Browser, BrowserBody, BrowserDots, BrowserRoot, BrowserTitleBar, BrowserUrlBar, Button, ButtonGroup, Calendar, Card, Carousel, CascadeSelect, Checkbox, CheckboxGroup, Chip, ClientOnly, Clipboard, Collapsible, ColorPicker, Combobox, Command, Comment, ConfigProvider, Container, DataTable, DataView, DateInput, DatePicker, DeferredContent, Descriptions, DescriptionsRoot, Dialog, Dock, DockItem, DockRoot, DownloadTrigger, Drawer, DynamicInput, Editable, Ellipsis, Empty, FLOAT_BUTTON_CONTEXT, Field, Fieldset, FileUpload, FlexRender, FloatButton, FloatingPanel, FocusTrap, Form, FormField, Format, Frame, Grid, Highlight, HoverCard, Icon, Image, ImageCropper, ImageViewer, Input, InputGroup, JsonTreeView, Kbd, Layout, Link, List, Listbox, Marquee, Masonry, Mentions, MentionsVessel, Menu, Menubar, Meter, NativeSelect, NavigationMenu, NumberInput, OrderList, PageHeader, Pagination, PasswordInput, PinInput, Popconfirm, Popover, Presence, PresenceProvider, Progress, ProgressGroup, QrCode, RadioGroup, RatingGroup, Result, ResultIcon, ResultRoot, ScrollArea, SegmentGroup, Select, Separator, SignaturePad, Skeleton, Slider, Spinner, SplitButton, Splitter, Spotlight, Stack, Stat, Steps, Swap, Switch, Tabs, Tag, TagsInput, Terminal, Textarea, Timeline, Timer, Toast, Toaster, Toc, Toggle, ToggleGroup, Toolbar, Tooltip, Tour, Transfer, TreeSelect, TreeView, Typography, User, Video, VirtualList, Watermark, createColumnHelper, createFileTreeCollection, createGridCollection, createToaster, createTreeCollection, formatMediaTime, toolPartDisplay, useAsyncList, useConfig, useDownload, useField, useForm, useListCollection, useListSelection, useMentions, usePresence, usePresenceContext, useTour };
@@ -1,9 +1,9 @@
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
4
  import { forwardRef } from "react";
5
5
  import { useFieldContext } from "@ark-ui/react/field";
6
- //#region src/components/input/mask.ts
6
+ // src/components/input/mask.ts
7
7
  function accepts(slot, ch) {
8
8
  if (slot === "9") return /\d/.test(ch);
9
9
  if (slot === "a") return /[a-zA-Z]/.test(ch);
@@ -37,8 +37,7 @@ function applyMask(raw, mask) {
37
37
  }
38
38
  return out;
39
39
  }
40
- //#endregion
41
- //#region src/components/input/index.tsx
40
+ // src/components/input/index.tsx
42
41
  const InputImpl = forwardRef(function Input({ value, size = "md", invalid = false, mask, onValueChange, ...rest }, ref) {
43
42
  injectComponentStyle("input");
44
43
  const field = useFieldContext();
@@ -56,5 +55,4 @@ const InputImpl = forwardRef(function Input({ value, size = "md", invalid = fals
56
55
  });
57
56
  });
58
57
  const Input = withSelfRoot(InputImpl);
59
- //#endregion
60
58
  export { Input as t };
@@ -1,17 +1,16 @@
1
- import { r as iconNode } from "./icon-Cri0-7-x.mjs";
2
- import { t as Select } from "./select-D_soVdWK.mjs";
1
+ import { r as iconNode } from "./icon-C9udWCyz.mjs";
2
+ import { t as Select } from "./select-DQ5669_K.mjs";
3
3
  import { injectComponentStyle } from "@bysages/core/styling";
4
4
  import { jsx, jsxs } from "react/jsx-runtime";
5
5
  import { createContext, useCallback, useContext, useEffect, useRef, useState } from "react";
6
- //#region src/components/media-player/context.ts
6
+ // src/components/media-player/context.ts
7
7
  const MediaPlayerProvider = createContext(null);
8
8
  function useMediaPlayer() {
9
9
  const context = useContext(MediaPlayerProvider);
10
10
  if (!context) throw new Error("Media player parts must be used inside Audio.Root or Video.Root");
11
11
  return context;
12
12
  }
13
- //#endregion
14
- //#region src/components/media-player/use-media-controls.ts
13
+ // src/components/media-player/use-media-controls.ts
15
14
  /** The shared HTMLMediaElement state: one source of truth for both the
16
15
  * audio and video faces, so their controls never drift apart. */
17
16
  function useMediaControls(media) {
@@ -156,8 +155,7 @@ function formatMediaTime(seconds) {
156
155
  const secs = String(whole % 3600 % 60).padStart(2, "0");
157
156
  return hours > 0 ? `${hours}:${String(minutes).padStart(2, "0")}:${secs}` : `${minutes}:${secs}`;
158
157
  }
159
- //#endregion
160
- //#region src/components/media-player/parts.tsx
158
+ // src/components/media-player/parts.tsx
161
159
  function part(name) {
162
160
  function MediaPart(props) {
163
161
  return /* @__PURE__ */ jsx("div", {
@@ -409,8 +407,7 @@ function FullscreenButton({ label = "Toggle fullscreen", ...props }) {
409
407
  }
410
408
  const Stage = part("Stage");
411
409
  const Controls = part("Controls");
412
- //#endregion
413
- //#region src/components/media-player/shell.tsx
410
+ // src/components/media-player/shell.tsx
414
411
  /** The headless shell: it owns the media reference and the shared state
415
412
  * machine, while the public parts remain free to compose in any order. */
416
413
  function MediaPlayerShell(props) {
@@ -473,8 +470,7 @@ function MediaPlayerShell(props) {
473
470
  })
474
471
  });
475
472
  }
476
- //#endregion
477
- //#region src/components/media-player/index.tsx
473
+ // src/components/media-player/index.tsx
478
474
  function createRoot(kind) {
479
475
  function MediaRoot(props) {
480
476
  return /* @__PURE__ */ jsx(MediaPlayerShell, {
@@ -550,5 +546,4 @@ const Video = Object.assign(VideoFacade, {
550
546
  PipButton,
551
547
  FullscreenButton
552
548
  });
553
- //#endregion
554
549
  export { Video as n, formatMediaTime as r, Audio as t };