@bysages/react 0.3.1 → 0.4.1

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 (286) hide show
  1. package/dist/{ai-response-BfKTmtCt.mjs → ai-response-nhDOlELQ.mjs} +4 -2
  2. package/dist/chevron-a2nIZKN4.mjs +6 -0
  3. package/dist/components/accordion/index.d.mts +22 -4
  4. package/dist/components/accordion/index.mjs +32 -2
  5. package/dist/components/affix/index.d.mts +4 -1
  6. package/dist/components/affix/index.mjs +6 -4
  7. package/dist/components/ai/index.d.mts +1 -1
  8. package/dist/components/ai/index.mjs +6 -4
  9. package/dist/components/ai-action/index.d.mts +4 -1
  10. package/dist/components/ai-action/index.mjs +4 -2
  11. package/dist/components/ai-attachments/index.d.mts +10 -4
  12. package/dist/components/ai-attachments/index.mjs +17 -45
  13. package/dist/components/ai-message/index.d.mts +4 -1
  14. package/dist/components/ai-message/index.mjs +4 -2
  15. package/dist/components/ai-prompt-input/index.d.mts +5 -2
  16. package/dist/components/ai-prompt-input/index.mjs +11 -15
  17. package/dist/components/ai-reasoning/index.d.mts +4 -1
  18. package/dist/components/ai-reasoning/index.mjs +5 -3
  19. package/dist/components/ai-response/index.d.mts +4 -1
  20. package/dist/components/ai-response/index.mjs +1 -1
  21. package/dist/components/ai-source/index.d.mts +8 -2
  22. package/dist/components/ai-source/index.mjs +6 -3
  23. package/dist/components/ai-suggestion/index.d.mts +4 -1
  24. package/dist/components/ai-suggestion/index.mjs +4 -2
  25. package/dist/components/ai-tool/index.d.mts +4 -1
  26. package/dist/components/ai-tool/index.mjs +5 -3
  27. package/dist/components/alert/index.d.mts +2 -0
  28. package/dist/components/alert/index.mjs +12 -19
  29. package/dist/components/angle-slider/index.d.mts +19 -2
  30. package/dist/components/angle-slider/index.mjs +32 -9
  31. package/dist/components/aspect-ratio/index.d.mts +4 -1
  32. package/dist/components/aspect-ratio/index.mjs +4 -2
  33. package/dist/components/autocomplete/index.d.mts +3 -1
  34. package/dist/components/autocomplete/index.mjs +15 -3
  35. package/dist/components/avatar/index.d.mts +2 -2
  36. package/dist/components/avatar/index.mjs +10 -3
  37. package/dist/components/avatar-group/index.d.mts +4 -1
  38. package/dist/components/avatar-group/index.mjs +4 -2
  39. package/dist/components/back-top/index.d.mts +7 -1
  40. package/dist/components/back-top/index.mjs +13 -18
  41. package/dist/components/badge/index.d.mts +4 -1
  42. package/dist/components/badge/index.mjs +4 -2
  43. package/dist/components/banner/index.mjs +3 -12
  44. package/dist/components/bento/index.mjs +1 -1
  45. package/dist/components/block-ui/index.d.mts +4 -1
  46. package/dist/components/block-ui/index.mjs +4 -2
  47. package/dist/components/breadcrumb/index.mjs +1 -1
  48. package/dist/components/browser/index.mjs +1 -1
  49. package/dist/components/button/index.d.mts +4 -1
  50. package/dist/components/button/index.mjs +4 -2
  51. package/dist/components/button-group/index.mjs +1 -1
  52. package/dist/components/calendar/index.d.mts +3 -1
  53. package/dist/components/calendar/index.mjs +10 -11
  54. package/dist/components/card/index.mjs +1 -1
  55. package/dist/components/carousel/index.d.mts +21 -1
  56. package/dist/components/carousel/index.mjs +44 -3
  57. package/dist/components/cascade-select/index.d.mts +6 -1
  58. package/dist/components/cascade-select/index.mjs +13 -36
  59. package/dist/components/checkbox/index.d.mts +20 -2
  60. package/dist/components/checkbox/index.mjs +29 -9
  61. package/dist/components/checkbox-group/index.d.mts +8 -6
  62. package/dist/components/checkbox-group/index.mjs +45 -49
  63. package/dist/components/chip/index.d.mts +4 -1
  64. package/dist/components/chip/index.mjs +4 -2
  65. package/dist/components/client-only/index.d.mts +7 -2
  66. package/dist/components/client-only/index.mjs +5 -1
  67. package/dist/components/clipboard/index.d.mts +17 -4
  68. package/dist/components/clipboard/index.mjs +34 -6
  69. package/dist/components/collapsible/index.d.mts +16 -4
  70. package/dist/components/collapsible/index.mjs +26 -2
  71. package/dist/components/color-picker/index.d.mts +20 -4
  72. package/dist/components/color-picker/index.mjs +57 -15
  73. package/dist/components/combobox/index.d.mts +27 -1
  74. package/dist/components/combobox/index.mjs +63 -6
  75. package/dist/components/command/index.d.mts +4 -1
  76. package/dist/components/command/index.mjs +8 -2
  77. package/dist/components/comment/index.d.mts +4 -1
  78. package/dist/components/comment/index.mjs +4 -2
  79. package/dist/components/config-provider/index.d.mts +4 -1
  80. package/dist/components/config-provider/index.mjs +3 -1
  81. package/dist/components/container/index.d.mts +4 -1
  82. package/dist/components/container/index.mjs +4 -2
  83. package/dist/components/data-view/index.d.mts +4 -1
  84. package/dist/components/data-view/index.mjs +4 -2
  85. package/dist/components/date-input/index.d.mts +19 -4
  86. package/dist/components/date-input/index.mjs +34 -10
  87. package/dist/components/date-picker/index.d.mts +21 -4
  88. package/dist/components/date-picker/index.mjs +59 -12
  89. package/dist/components/deferred-content/index.d.mts +4 -1
  90. package/dist/components/deferred-content/index.mjs +4 -2
  91. package/dist/components/descriptions/index.d.mts +10 -2
  92. package/dist/components/descriptions/index.mjs +14 -9
  93. package/dist/components/dialog/index.d.mts +18 -5
  94. package/dist/components/dialog/index.mjs +44 -2
  95. package/dist/components/dock/index.mjs +1 -1
  96. package/dist/components/download-trigger/index.d.mts +7 -2
  97. package/dist/components/download-trigger/index.mjs +5 -1
  98. package/dist/components/drawer/index.d.mts +18 -6
  99. package/dist/components/drawer/index.mjs +41 -2
  100. package/dist/components/dynamic-input/index.d.mts +4 -1
  101. package/dist/components/dynamic-input/index.mjs +11 -19
  102. package/dist/components/editable/index.d.mts +28 -7
  103. package/dist/components/editable/index.mjs +44 -5
  104. package/dist/components/ellipsis/index.d.mts +4 -1
  105. package/dist/components/ellipsis/index.mjs +4 -2
  106. package/dist/components/empty/index.mjs +1 -1
  107. package/dist/components/field/index.d.mts +30 -5
  108. package/dist/components/field/index.mjs +37 -4
  109. package/dist/components/fieldset/index.d.mts +19 -4
  110. package/dist/components/fieldset/index.mjs +29 -4
  111. package/dist/components/file-upload/index.d.mts +29 -9
  112. package/dist/components/file-upload/index.mjs +47 -11
  113. package/dist/components/float-button/index.mjs +1 -1
  114. package/dist/components/floating-panel/index.d.mts +18 -6
  115. package/dist/components/floating-panel/index.mjs +56 -2
  116. package/dist/components/focus-trap/index.d.mts +7 -2
  117. package/dist/components/focus-trap/index.mjs +5 -1
  118. package/dist/components/form/index.d.mts +1 -1
  119. package/dist/components/form/index.mjs +6 -3
  120. package/dist/components/frame/index.d.mts +4 -8
  121. package/dist/components/frame/index.mjs +13 -1
  122. package/dist/components/grid/index.d.mts +4 -1
  123. package/dist/components/grid/index.mjs +4 -2
  124. package/dist/components/highlight/index.d.mts +3 -5
  125. package/dist/components/highlight/index.mjs +7 -2
  126. package/dist/components/hover-card/index.d.mts +20 -4
  127. package/dist/components/hover-card/index.mjs +33 -2
  128. package/dist/components/icon/index.d.mts +10 -8
  129. package/dist/components/icon/index.mjs +6 -4
  130. package/dist/components/image/index.d.mts +5 -2
  131. package/dist/components/image/index.mjs +15 -30
  132. package/dist/components/image-cropper/index.d.mts +13 -2
  133. package/dist/components/image-cropper/index.mjs +35 -3
  134. package/dist/components/image-viewer/index.d.mts +2 -24
  135. package/dist/components/image-viewer/index.mjs +3 -113
  136. package/dist/components/input/index.d.mts +3 -1
  137. package/dist/components/input/index.mjs +1 -1
  138. package/dist/components/input-group/index.mjs +1 -1
  139. package/dist/components/json-tree-view/index.d.mts +17 -1
  140. package/dist/components/json-tree-view/index.mjs +27 -6
  141. package/dist/components/kbd/index.d.mts +4 -1
  142. package/dist/components/kbd/index.mjs +4 -2
  143. package/dist/components/layout/index.d.mts +25 -7
  144. package/dist/components/layout/index.mjs +158 -64
  145. package/dist/components/link/index.d.mts +4 -1
  146. package/dist/components/link/index.mjs +4 -2
  147. package/dist/components/list/index.mjs +1 -1
  148. package/dist/components/listbox/index.d.mts +22 -1
  149. package/dist/components/listbox/index.mjs +37 -5
  150. package/dist/components/marquee/index.d.mts +18 -1
  151. package/dist/components/marquee/index.mjs +35 -3
  152. package/dist/components/masonry/index.d.mts +4 -1
  153. package/dist/components/masonry/index.mjs +4 -2
  154. package/dist/components/media-player/index.d.mts +2 -0
  155. package/dist/components/media-player/index.mjs +2 -0
  156. package/dist/components/mentions/index.d.mts +1 -1
  157. package/dist/components/mentions/index.mjs +1 -1
  158. package/dist/components/menu/index.d.mts +29 -11
  159. package/dist/components/menu/index.mjs +35 -13
  160. package/dist/components/menubar/index.d.mts +3 -1
  161. package/dist/components/menubar/index.mjs +7 -2
  162. package/dist/components/meter/index.mjs +1 -1
  163. package/dist/components/navigation-menu/index.d.mts +25 -1
  164. package/dist/components/navigation-menu/index.mjs +37 -2
  165. package/dist/components/number-input/index.d.mts +28 -6
  166. package/dist/components/number-input/index.mjs +34 -9
  167. package/dist/components/order-list/index.d.mts +4 -1
  168. package/dist/components/order-list/index.mjs +27 -25
  169. package/dist/components/page-header/index.mjs +1 -1
  170. package/dist/components/pagination/index.d.mts +23 -3
  171. package/dist/components/pagination/index.mjs +58 -13
  172. package/dist/components/password-input/index.d.mts +24 -6
  173. package/dist/components/password-input/index.mjs +32 -9
  174. package/dist/components/pin-input/index.d.mts +23 -5
  175. package/dist/components/pin-input/index.mjs +30 -8
  176. package/dist/components/popconfirm/index.d.mts +9 -5
  177. package/dist/components/popconfirm/index.mjs +24 -19
  178. package/dist/components/popover/index.d.mts +2 -8
  179. package/dist/components/popover/index.mjs +45 -5
  180. package/dist/components/presence/index.d.mts +10 -2
  181. package/dist/components/presence/index.mjs +6 -1
  182. package/dist/components/progress/index.d.mts +18 -3
  183. package/dist/components/progress/index.mjs +35 -10
  184. package/dist/components/progress-group/index.d.mts +4 -1
  185. package/dist/components/progress-group/index.mjs +5 -3
  186. package/dist/components/qr-code/index.d.mts +14 -1
  187. package/dist/components/qr-code/index.mjs +27 -3
  188. package/dist/components/radio-group/index.d.mts +27 -2
  189. package/dist/components/radio-group/index.mjs +33 -9
  190. package/dist/components/rating-group/index.d.mts +20 -3
  191. package/dist/components/rating-group/index.mjs +27 -9
  192. package/dist/components/result/index.d.mts +1 -1
  193. package/dist/components/result/index.mjs +3 -3
  194. package/dist/components/scroll-area/index.d.mts +14 -1
  195. package/dist/components/scroll-area/index.mjs +33 -3
  196. package/dist/components/segment-group/index.d.mts +28 -2
  197. package/dist/components/segment-group/index.mjs +35 -8
  198. package/dist/components/select/index.d.mts +2 -2
  199. package/dist/components/select/index.mjs +1 -1
  200. package/dist/components/separator/index.d.mts +4 -1
  201. package/dist/components/separator/index.mjs +4 -2
  202. package/dist/components/signature-pad/index.d.mts +25 -5
  203. package/dist/components/signature-pad/index.mjs +38 -4
  204. package/dist/components/skeleton/index.d.mts +4 -1
  205. package/dist/components/skeleton/index.mjs +4 -2
  206. package/dist/components/slider/index.d.mts +21 -2
  207. package/dist/components/slider/index.mjs +32 -9
  208. package/dist/components/spinner/index.d.mts +4 -1
  209. package/dist/components/spinner/index.mjs +4 -2
  210. package/dist/components/split-button/index.d.mts +3 -1
  211. package/dist/components/split-button/index.mjs +13 -18
  212. package/dist/components/splitter/index.d.mts +17 -4
  213. package/dist/components/splitter/index.mjs +36 -2
  214. package/dist/components/spotlight/index.d.mts +4 -1
  215. package/dist/components/spotlight/index.mjs +4 -2
  216. package/dist/components/stack/index.d.mts +4 -1
  217. package/dist/components/stack/index.mjs +7 -5
  218. package/dist/components/stat/index.mjs +1 -1
  219. package/dist/components/steps/index.d.mts +26 -6
  220. package/dist/components/steps/index.mjs +27 -12
  221. package/dist/components/swap/index.d.mts +11 -5
  222. package/dist/components/swap/index.mjs +31 -4
  223. package/dist/components/switch/index.d.mts +20 -2
  224. package/dist/components/switch/index.mjs +28 -9
  225. package/dist/components/table/index.d.mts +4 -1
  226. package/dist/components/table/index.mjs +38 -60
  227. package/dist/components/tabs/index.d.mts +24 -2
  228. package/dist/components/tabs/index.mjs +26 -10
  229. package/dist/components/tags-input/index.d.mts +33 -8
  230. package/dist/components/tags-input/index.mjs +42 -10
  231. package/dist/components/terminal/index.d.mts +4 -1
  232. package/dist/components/terminal/index.mjs +4 -2
  233. package/dist/components/textarea/index.d.mts +4 -1
  234. package/dist/components/textarea/index.mjs +4 -2
  235. package/dist/components/timeline/index.mjs +1 -1
  236. package/dist/components/timer/index.d.mts +18 -1
  237. package/dist/components/timer/index.mjs +52 -3
  238. package/dist/components/toast/index.d.mts +3 -6
  239. package/dist/components/toast/index.mjs +23 -3
  240. package/dist/components/toc/index.d.mts +19 -5
  241. package/dist/components/toc/index.mjs +32 -6
  242. package/dist/components/toggle/index.d.mts +11 -4
  243. package/dist/components/toggle/index.mjs +22 -2
  244. package/dist/components/toggle-group/index.d.mts +26 -2
  245. package/dist/components/toggle-group/index.mjs +32 -7
  246. package/dist/components/toolbar/index.d.mts +4 -1
  247. package/dist/components/toolbar/index.mjs +4 -2
  248. package/dist/components/tooltip/index.d.mts +17 -4
  249. package/dist/components/tooltip/index.mjs +29 -2
  250. package/dist/components/tour/index.d.mts +18 -9
  251. package/dist/components/tour/index.mjs +45 -3
  252. package/dist/components/transfer/index.d.mts +3 -1
  253. package/dist/components/transfer/index.mjs +15 -27
  254. package/dist/components/tree-select/index.d.mts +3 -1
  255. package/dist/components/tree-select/index.mjs +12 -23
  256. package/dist/components/tree-view/index.d.mts +22 -2
  257. package/dist/components/tree-view/index.mjs +51 -9
  258. package/dist/components/typography/index.d.mts +4 -0
  259. package/dist/components/typography/index.mjs +2 -1
  260. package/dist/components/user/index.d.mts +4 -1
  261. package/dist/components/user/index.mjs +4 -2
  262. package/dist/components/virtual-list/index.d.mts +4 -1
  263. package/dist/components/virtual-list/index.mjs +11 -13
  264. package/dist/components/watermark/index.d.mts +4 -1
  265. package/dist/components/watermark/index.mjs +5 -3
  266. package/dist/family-DE_GQeeM.mjs +9 -0
  267. package/dist/icon-BALgGtNK.mjs +18 -0
  268. package/dist/id-C37UYLwJ.mjs +13 -0
  269. package/dist/image-viewer-B-hKFkEw.mjs +141 -0
  270. package/dist/{index-Dn5mHf1g.d.mts → index-B4twHAQC.d.mts} +194 -106
  271. package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
  272. package/dist/index-BcRdWGY-.d.mts +115 -0
  273. package/dist/{index-Iy8m0Qev.d.mts → index-D_iKc2Uw.d.mts} +31 -2
  274. package/dist/index-Dj8S4eyJ.d.mts +41 -0
  275. package/dist/index-Eu-Bttta.d.mts +24 -0
  276. package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
  277. package/dist/index.d.mts +36 -35
  278. package/dist/index.mjs +11 -10
  279. package/dist/{input-2oezH-dY.mjs → input-BDpQ0e6G.mjs} +4 -2
  280. package/dist/media-player-DjVvo1_7.mjs +554 -0
  281. package/dist/{mentions-DMIBCBOd.mjs → mentions-BwnyvdXz.mjs} +75 -43
  282. package/dist/select-i9UZsQCU.mjs +121 -0
  283. package/package.json +9 -81
  284. package/dist/chevron-BeHvt46K.mjs +0 -17
  285. package/dist/glyph-VI989p8H.mjs +0 -14
  286. package/dist/select-eAHutw56.mjs +0 -70
@@ -1,5 +1,6 @@
1
+ import { t as withSelfRoot } from "./family-DE_GQeeM.mjs";
1
2
  import { n as useComponentMessages } from "./messages-1jJWtaYU.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  import { useEffect, useRef } from "react";
5
6
  import { renderHtml } from "@tanstack/markdown/html";
@@ -100,7 +101,7 @@ function wrapResponseTables(root) {
100
101
  }
101
102
  //#endregion
102
103
  //#region src/components/ai-response/index.tsx
103
- function Response({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
104
+ function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
104
105
  injectComponentStyle("ai");
105
106
  const messages = useComponentMessages();
106
107
  const resolvedCopyLabel = copyLabel ?? messages.ai.copyCode;
@@ -127,5 +128,6 @@ function Response({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
127
128
  dangerouslySetInnerHTML: { __html: renderHtml(content, highlighter ? { highlighter } : void 0) }
128
129
  });
129
130
  }
131
+ const Response = withSelfRoot(ResponseImpl);
130
132
  //#endregion
131
133
  export { Response as t };
@@ -0,0 +1,6 @@
1
+ import { t as iconNode } from "./icon-BALgGtNK.mjs";
2
+ //#region src/components/ai/chevron.tsx
3
+ /** The folding chevron the shared indicator turns. */
4
+ const chevron = iconNode("chevron-right");
5
+ //#endregion
6
+ export { chevron as t };
@@ -1,7 +1,25 @@
1
1
  import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
2
2
  //#region src/components/accordion/index.d.ts
3
- /** Ark's Accordion, dressed in the paper-and-ink system: a ruled sheet
4
- * folded by quiet rows, unfolding with a spring-chevoned dissolve. The
5
- * API is Ark's own — Root, Item, ItemTrigger, ItemContent, ItemIndicator. */
6
- export declare const Accordion: typeof Accordion$1;
3
+ export type AccordionItem = {
4
+ value: string;
5
+ title: string;
6
+ content: string;
7
+ };
8
+ export interface AccordionFacadeProps {
9
+ value?: string[];
10
+ defaultValue?: string[];
11
+ items: AccordionItem[];
12
+ multiple?: boolean;
13
+ collapsible?: boolean;
14
+ disabled?: boolean;
15
+ orientation?: "horizontal" | "vertical";
16
+ className?: string;
17
+ onValueChange?: (value: string[]) => void;
18
+ }
19
+ declare function AccordionFacade({ value, defaultValue, items, multiple, collapsible, disabled, orientation, className, onValueChange }: AccordionFacadeProps): import("react").JSX.Element;
20
+ declare namespace AccordionFacade {
21
+ var displayName: string;
22
+ }
23
+ type AccordionParts = typeof Accordion$1;
24
+ export declare const Accordion: typeof AccordionFacade & AccordionParts;
7
25
  //#endregion
@@ -1,10 +1,40 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
2
3
  import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
5
+ import { jsx, jsxs } from "react/jsx-runtime";
3
6
  //#region src/components/accordion/index.tsx
4
7
  /** Ark's Accordion, dressed in the paper-and-ink system: a ruled sheet
5
8
  * folded by quiet rows, unfolding with a spring-chevoned dissolve. The
6
9
  * API is Ark's own — Root, Item, ItemTrigger, ItemContent, ItemIndicator. */
7
- const Accordion = Accordion$1;
10
+ function AccordionRoot(props) {
11
+ const id = useElementId("accordion", props);
12
+ return /* @__PURE__ */ jsx(Accordion$1.Root, {
13
+ ...props,
14
+ id
15
+ });
16
+ }
17
+ function AccordionFacade({ value, defaultValue, items, multiple = false, collapsible = true, disabled = false, orientation = "vertical", className, onValueChange }) {
18
+ return /* @__PURE__ */ jsx(AccordionRoot, {
19
+ className,
20
+ disabled,
21
+ multiple,
22
+ collapsible,
23
+ orientation,
24
+ defaultValue,
25
+ ...value === void 0 ? {} : { value },
26
+ onValueChange: (details) => onValueChange?.(details.value),
27
+ children: items.map((item) => /* @__PURE__ */ jsxs(Accordion$1.Item, {
28
+ value: item.value,
29
+ children: [/* @__PURE__ */ jsxs(Accordion$1.ItemTrigger, { children: [item.title, /* @__PURE__ */ jsx(Accordion$1.ItemIndicator, { children: iconNode("chevron-down") })] }), /* @__PURE__ */ jsx(Accordion$1.ItemContent, { children: /* @__PURE__ */ jsx("p", { children: item.content }) })]
30
+ }, item.value))
31
+ });
32
+ }
33
+ AccordionFacade.displayName = "SAccordion";
34
+ const Accordion = Object.assign(AccordionFacade, {
35
+ ...Accordion$1,
36
+ Root: AccordionRoot
37
+ });
8
38
  injectComponentStyle("accordion");
9
39
  //#endregion
10
40
  export { Accordion };
@@ -16,5 +16,8 @@ export interface AffixProps extends HTMLAttributes<HTMLDivElement> {
16
16
  /** Where it pins from the bottom instead, for footers and action bars. */
17
17
  offsetBottom?: string;
18
18
  }
19
- export declare function Affix({ offsetTop, offsetBottom, ...rest }: AffixProps): import("react").JSX.Element;
19
+ declare function AffixImpl({ offsetTop, offsetBottom, ...rest }: AffixProps): import("react").JSX.Element;
20
+ export declare const Affix: typeof AffixImpl & {
21
+ Root: typeof AffixImpl;
22
+ };
20
23
  //#endregion
@@ -1,18 +1,20 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/affix/index.tsx
4
- function Affix({ offsetTop = "0px", offsetBottom = "0px", ...rest }) {
5
+ function AffixImpl({ offsetTop, offsetBottom, ...rest }) {
5
6
  injectComponentStyle("affix");
6
7
  return /* @__PURE__ */ jsx("div", {
7
8
  ...rest,
8
9
  style: {
9
10
  ...rest.style,
10
- top: offsetTop,
11
- bottom: offsetBottom
11
+ "--bs-affix-top": offsetTop,
12
+ "--bs-affix-bottom": offsetBottom
12
13
  },
13
14
  "data-scope": "affix",
14
15
  "data-part": "root"
15
16
  });
16
17
  }
18
+ const Affix = withSelfRoot(AffixImpl);
17
19
  //#endregion
18
20
  export { Affix };
@@ -1,2 +1,2 @@
1
- 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-Dn5mHf1g.mjs";
1
+ 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";
2
2
  export { Ai, AiActions, AiContent, type DataUIPart, type FileUIPart, type ReasoningUIPart, type SourceDocumentUIPart, type SourceUrlUIPart, type StepStartUIPart, type TextUIPart, type ToolUIPart, type UIMessage, type UIMessagePart };
@@ -1,13 +1,14 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
3
  import { Action } from "../ai-action/index.mjs";
3
4
  import { AiMessage as Message } from "../ai-message/index.mjs";
4
5
  import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
5
6
  import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
6
- import { t as Response } from "../../ai-response-BfKTmtCt.mjs";
7
+ import { t as Response } from "../../ai-response-nhDOlELQ.mjs";
7
8
  import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
8
9
  import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
9
10
  import { AiTool as Tool } from "../ai-tool/index.mjs";
10
- import { injectComponentStyle } from "@bysages/core";
11
+ import { injectComponentStyle } from "@bysages/core/styling";
11
12
  import { jsx } from "react/jsx-runtime";
12
13
  //#region src/components/ai/index.tsx
13
14
  /** A conversation column: Root is the log, Message carries a role, and
@@ -43,9 +44,9 @@ function AiConversation({ children, ...rest }) {
43
44
  }
44
45
  /** The bubble's inner measure — content that belongs to neither side
45
46
  * specifically. */
46
- const AiContent = part("Content", "div");
47
+ const AiContent = withSelfRoot(part("Content", "div"));
47
48
  /** The quiet row under a message — copy, retry, feedback. */
48
- const AiActions = part("Actions", "div");
49
+ const AiActions = withSelfRoot(part("Actions", "div"));
49
50
  /** The while-it-works whisper for the in-flight turns. */
50
51
  function AiLoader({ children, ...rest }) {
51
52
  const messages = useComponentMessages();
@@ -61,6 +62,7 @@ function AiLoader({ children, ...rest }) {
61
62
  /** The whole family under one handle — `Ai.Conversation`,
62
63
  * `Ai.Message`, and the rest, exactly as before the split. */
63
64
  const Ai = Object.assign(AiConversation, {
65
+ Root: AiConversation,
64
66
  Conversation: AiConversation,
65
67
  MessageContent: AiContent,
66
68
  Actions: AiActions,
@@ -9,6 +9,9 @@ export interface ActionProps extends ButtonHTMLAttributes<HTMLButtonElement> {
9
9
  label: string;
10
10
  children?: ReactNode;
11
11
  }
12
- export declare function Action({ label, children, ...rest }: ActionProps): import("react").JSX.Element;
12
+ declare function ActionImpl({ label, children, ...rest }: ActionProps): import("react").JSX.Element;
13
+ export declare const Action: typeof ActionImpl & {
14
+ Root: typeof ActionImpl;
15
+ };
13
16
  //#endregion
14
17
  export { Action as AiAction };
@@ -1,8 +1,9 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { Button } from "../button/index.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  //#region src/components/ai-action/index.tsx
5
- function Action({ label, children, ...rest }) {
6
+ function ActionImpl({ label, children, ...rest }) {
6
7
  injectComponentStyle("ai");
7
8
  return /* @__PURE__ */ jsx(Button, {
8
9
  variant: "ghost",
@@ -14,5 +15,6 @@ function Action({ label, children, ...rest }) {
14
15
  children
15
16
  });
16
17
  }
18
+ const Action = withSelfRoot(ActionImpl);
17
19
  //#endregion
18
20
  export { Action, Action as AiAction };
@@ -1,10 +1,10 @@
1
1
  import { HTMLAttributes } from "react";
2
2
  //#region src/components/ai-attachments/index.d.ts
3
- /** One file riding the prompt: its glyph by extension, its name and
3
+ /** One file riding the prompt: its icon by extension, its name and
4
4
  * human size, and a quiet way to take it back off. Uploading reads as
5
5
  * a dashed ghost, error as danger ink. */
6
6
  export interface AttachmentProps extends HTMLAttributes<HTMLSpanElement> {
7
- /** The file's name — it picks the glyph by extension. */
7
+ /** The file's name — it picks the icon by extension. */
8
8
  name: string;
9
9
  /** The file's size in bytes, when known — rendered human. */
10
10
  size?: number;
@@ -12,8 +12,14 @@ export interface AttachmentProps extends HTMLAttributes<HTMLSpanElement> {
12
12
  status?: "uploading" | "ready" | "error";
13
13
  onRemove?: () => void;
14
14
  }
15
- export declare function Attachment({ name, size, status, onRemove, ...rest }: AttachmentProps): import("react").JSX.Element;
15
+ declare function AttachmentImpl({ name, size, status, onRemove, ...rest }: AttachmentProps): import("react").JSX.Element;
16
+ export declare const Attachment: typeof AttachmentImpl & {
17
+ Root: typeof AttachmentImpl;
18
+ };
16
19
  /** The row the files ride in — a wrapping line of chips. */
17
- export declare function Attachments({ children, ...rest }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
20
+ declare function AttachmentsImpl({ children, ...rest }: HTMLAttributes<HTMLSpanElement>): import("react").JSX.Element;
21
+ export declare const Attachments: typeof AttachmentsImpl & {
22
+ Root: typeof AttachmentsImpl;
23
+ };
18
24
  //#endregion
19
25
  export { Attachment as AiAttachment, Attachments as AiAttachments };
@@ -1,50 +1,20 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
3
  import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
3
5
  import { jsx, jsxs } from "react/jsx-runtime";
4
6
  //#region src/components/ai-attachments/index.tsx
5
- const imageGlyph = /* @__PURE__ */ jsxs("svg", {
6
- viewBox: "0 0 16 16",
7
- "aria-hidden": "true",
8
- fill: "none",
9
- stroke: "currentColor",
10
- strokeWidth: 1.5,
11
- strokeLinecap: "square",
12
- children: [
13
- /* @__PURE__ */ jsx("rect", {
14
- x: 2.5,
15
- y: 3.5,
16
- width: 11,
17
- height: 9
18
- }),
19
- /* @__PURE__ */ jsx("path", { d: "M2.5 10.5 6 7l3 3 2-1.5 2.5 2" }),
20
- /* @__PURE__ */ jsx("circle", {
21
- cx: 6,
22
- cy: 6,
23
- r: .75,
24
- fill: "currentColor",
25
- stroke: "none"
26
- })
27
- ]
7
+ const imageIcon = iconNode("image", {
8
+ width: 16,
9
+ height: 16
28
10
  });
29
- const fileGlyph = /* @__PURE__ */ jsxs("svg", {
30
- viewBox: "0 0 16 16",
31
- "aria-hidden": "true",
32
- fill: "none",
33
- stroke: "currentColor",
34
- strokeWidth: 1.5,
35
- strokeLinecap: "square",
36
- children: [/* @__PURE__ */ jsx("path", { d: "M4 2.5h5l3 3V13.5H4z" }), /* @__PURE__ */ jsx("path", { d: "M9 2.5v3h3" })]
11
+ const fileIcon = iconNode("file", {
12
+ width: 16,
13
+ height: 16
37
14
  });
38
- const removeGlyph = /* @__PURE__ */ jsx("svg", {
39
- viewBox: "0 0 16 16",
15
+ const removeIcon = iconNode("x", {
40
16
  width: 12,
41
- height: 12,
42
- "aria-hidden": "true",
43
- fill: "none",
44
- stroke: "currentColor",
45
- strokeWidth: 1.5,
46
- strokeLinecap: "square",
47
- children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8" })
17
+ height: 12
48
18
  });
49
19
  const IMAGE_EXTS = [
50
20
  "png",
@@ -73,7 +43,7 @@ const humanSize = (bytes) => {
73
43
  } while (value >= 1024 && unit < units.length - 1);
74
44
  return `${value.toFixed(1)} ${units[unit]}`;
75
45
  };
76
- function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
46
+ function AttachmentImpl({ name, size, status = "ready", onRemove, ...rest }) {
77
47
  injectComponentStyle("ai");
78
48
  const messages = useComponentMessages();
79
49
  return /* @__PURE__ */ jsxs("span", {
@@ -82,7 +52,7 @@ function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
82
52
  "data-part": "attachment",
83
53
  "data-status": status,
84
54
  children: [
85
- isImage(name) ? imageGlyph : fileGlyph,
55
+ isImage(name) ? imageIcon : fileIcon,
86
56
  /* @__PURE__ */ jsx("span", { children: name }),
87
57
  size !== void 0 ? /* @__PURE__ */ jsx("span", { children: humanSize(size) }) : null,
88
58
  /* @__PURE__ */ jsx("button", {
@@ -90,13 +60,14 @@ function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
90
60
  "data-remove": "",
91
61
  "aria-label": formatMessage(messages.ai.removeAttachment, { name }),
92
62
  onClick: () => onRemove?.(),
93
- children: removeGlyph
63
+ children: removeIcon
94
64
  })
95
65
  ]
96
66
  });
97
67
  }
68
+ const Attachment = withSelfRoot(AttachmentImpl);
98
69
  /** The row the files ride in — a wrapping line of chips. */
99
- function Attachments({ children, ...rest }) {
70
+ function AttachmentsImpl({ children, ...rest }) {
100
71
  return /* @__PURE__ */ jsx("span", {
101
72
  ...rest,
102
73
  "data-scope": "ai",
@@ -104,5 +75,6 @@ function Attachments({ children, ...rest }) {
104
75
  children
105
76
  });
106
77
  }
78
+ const Attachments = withSelfRoot(AttachmentsImpl);
107
79
  //#endregion
108
80
  export { Attachment as AiAttachment, Attachment, Attachments as AiAttachments, Attachments };
@@ -6,6 +6,9 @@ export interface MessageProps extends HTMLAttributes<HTMLElement> {
6
6
  role?: "user" | "assistant" | "system";
7
7
  children?: ReactNode;
8
8
  }
9
- export declare function Message({ role, children, ...rest }: MessageProps): import("react").JSX.Element;
9
+ declare function MessageImpl({ role, children, ...rest }: MessageProps): import("react").JSX.Element;
10
+ export declare const Message: typeof MessageImpl & {
11
+ Root: typeof MessageImpl;
12
+ };
10
13
  //#endregion
11
14
  export { Message as AiMessage };
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/ai-message/index.tsx
4
- function Message({ role = "assistant", children, ...rest }) {
5
+ function MessageImpl({ role = "assistant", children, ...rest }) {
5
6
  injectComponentStyle("ai");
6
7
  return /* @__PURE__ */ jsx("article", {
7
8
  ...rest,
@@ -11,5 +12,6 @@ function Message({ role = "assistant", children, ...rest }) {
11
12
  children
12
13
  });
13
14
  }
15
+ const Message = withSelfRoot(MessageImpl);
14
16
  //#endregion
15
17
  export { Message as AiMessage, Message };
@@ -1,4 +1,4 @@
1
- import { t as MentionEntry } from "../../index-Uefyw7Im.mjs";
1
+ import { t as MentionEntry } from "../../index-Bbg4heDO.mjs";
2
2
  import { HTMLAttributes, ReactNode } from "react";
3
3
  //#region src/components/ai-prompt-input/index.d.ts
4
4
  /**
@@ -42,6 +42,9 @@ export interface PromptInputProps extends Omit<HTMLAttributes<HTMLFormElement>,
42
42
  footer?: ReactNode;
43
43
  footerEnd?: ReactNode;
44
44
  }
45
- export declare function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled, busy, mentions, header, leading, trailing, footer, footerEnd, ...rest }: PromptInputProps): import("react").JSX.Element;
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;
46
+ export declare const PromptInput: typeof PromptInputImpl & {
47
+ Root: typeof PromptInputImpl;
48
+ };
46
49
  //#endregion
47
50
  export { PromptInput as AiPromptInput };
@@ -1,23 +1,18 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
3
  import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
2
4
  import { Button } from "../button/index.mjs";
3
5
  import { Field } from "../field/index.mjs";
4
- import { n as MentionsVessel, r as useMentions } from "../../mentions-DMIBCBOd.mjs";
5
- import { injectComponentStyle } from "@bysages/core";
6
+ import { n as MentionsVessel, r as useMentions } from "../../mentions-BwnyvdXz.mjs";
7
+ import { injectComponentStyle } from "@bysages/core/styling";
6
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
7
9
  import { useRef } from "react";
8
10
  //#region src/components/ai-prompt-input/index.tsx
9
- const arrowUpGlyph = /* @__PURE__ */ jsx("svg", {
10
- viewBox: "0 0 16 16",
11
+ const arrowUpIcon = iconNode("arrow-up", {
11
12
  width: 14,
12
- height: 14,
13
- "aria-hidden": "true",
14
- fill: "none",
15
- stroke: "currentColor",
16
- strokeWidth: 1.5,
17
- strokeLinecap: "square",
18
- children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5" })
13
+ height: 14
19
14
  });
20
- const stopGlyph = /* @__PURE__ */ jsx("svg", {
15
+ const stopIcon = /* @__PURE__ */ jsx("svg", {
21
16
  viewBox: "0 0 16 16",
22
17
  width: 14,
23
18
  height: 14,
@@ -40,7 +35,7 @@ function row(part, content) {
40
35
  children: content
41
36
  });
42
37
  }
43
- function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled = false, busy = false, mentions, header, leading, trailing, footer, footerEnd, ...rest }) {
38
+ function PromptInputImpl({ value, onValueChange, onSubmit, onStop, placeholder, "aria-label": ariaLabel, disabled = false, busy = false, mentions, header, leading, trailing, footer, footerEnd, ...rest }) {
44
39
  injectComponentStyle("ai");
45
40
  const fieldRef = useRef(null);
46
41
  const messages = useComponentMessages();
@@ -67,7 +62,7 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
67
62
  "aria-label": messages.ai.stop,
68
63
  disabled,
69
64
  onClick: () => onStop?.(),
70
- children: stopGlyph
65
+ children: stopIcon
71
66
  }) : /* @__PURE__ */ jsx(Button, {
72
67
  variant: "solid",
73
68
  size: "sm",
@@ -75,7 +70,7 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
75
70
  type: "submit",
76
71
  "aria-label": messages.ai.send,
77
72
  disabled: disabled || !value.trim(),
78
- children: arrowUpGlyph
73
+ children: arrowUpIcon
79
74
  });
80
75
  const hasFooter = footer != null && (!Array.isArray(footer) || footer.length > 0);
81
76
  return /* @__PURE__ */ jsxs("form", {
@@ -135,5 +130,6 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder, "ari
135
130
  ]
136
131
  });
137
132
  }
133
+ const PromptInput = withSelfRoot(PromptInputImpl);
138
134
  //#endregion
139
135
  export { PromptInput as AiPromptInput, PromptInput };
@@ -8,6 +8,9 @@ export interface ReasoningProps extends HTMLAttributes<HTMLDivElement> {
8
8
  defaultOpen?: boolean;
9
9
  children?: ReactNode;
10
10
  }
11
- export declare function Reasoning({ label, children, ...rest }: ReasoningProps): import("react").JSX.Element;
11
+ declare function ReasoningImpl({ label, children, ...rest }: ReasoningProps): import("react").JSX.Element;
12
+ export declare const Reasoning: typeof ReasoningImpl & {
13
+ Root: typeof ReasoningImpl;
14
+ };
12
15
  //#endregion
13
16
  export { Reasoning as AiReasoning };
@@ -1,9 +1,10 @@
1
- import { t as chevron } from "../../chevron-BeHvt46K.mjs";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { t as chevron } from "../../chevron-a2nIZKN4.mjs";
2
3
  import { Collapsible } from "../collapsible/index.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
4
5
  import { jsx, jsxs } from "react/jsx-runtime";
5
6
  //#region src/components/ai-reasoning/index.tsx
6
- function Reasoning({ label = "Thinking", children, ...rest }) {
7
+ function ReasoningImpl({ label = "Thinking", children, ...rest }) {
7
8
  injectComponentStyle("ai");
8
9
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
9
10
  ...rest,
@@ -15,5 +16,6 @@ function Reasoning({ label = "Thinking", children, ...rest }) {
15
16
  }) })]
16
17
  });
17
18
  }
19
+ const Reasoning = withSelfRoot(ReasoningImpl);
18
20
  //#endregion
19
21
  export { Reasoning as AiReasoning, Reasoning };
@@ -19,6 +19,9 @@ export interface ResponseProps extends HTMLAttributes<HTMLDivElement> {
19
19
  * unset for the resolved default. */
20
20
  copiedLabel?: string;
21
21
  }
22
- export declare function Response({ content, highlighter, copyLabel, copiedLabel, ...rest }: ResponseProps): import("react").JSX.Element;
22
+ declare function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ...rest }: ResponseProps): import("react").JSX.Element;
23
+ export declare const Response: typeof ResponseImpl & {
24
+ Root: typeof ResponseImpl;
25
+ };
23
26
  //#endregion
24
27
  export { Response as AiResponse };
@@ -1,2 +1,2 @@
1
- import { t as Response } from "../../ai-response-BfKTmtCt.mjs";
1
+ import { t as Response } from "../../ai-response-nhDOlELQ.mjs";
2
2
  export { Response as AiResponse, Response };
@@ -7,11 +7,17 @@ export interface SourceProps extends HTMLAttributes<HTMLAnchorElement> {
7
7
  href: string;
8
8
  children?: ReactNode;
9
9
  }
10
- export declare function Source({ href, children, ...rest }: SourceProps): import("react").JSX.Element;
10
+ declare function SourceImpl({ href, children, ...rest }: SourceProps): import("react").JSX.Element;
11
+ export declare const Source: typeof SourceImpl & {
12
+ Root: typeof SourceImpl;
13
+ };
11
14
  /** The reading list under a response: where this ink came from. */
12
15
  export interface SourcesProps extends HTMLAttributes<HTMLOListElement> {
13
16
  children?: ReactNode;
14
17
  }
15
- export declare function Sources({ children, ...rest }: SourcesProps): import("react").JSX.Element;
18
+ declare function SourcesImpl({ children, ...rest }: SourcesProps): import("react").JSX.Element;
19
+ export declare const Sources: typeof SourcesImpl & {
20
+ Root: typeof SourcesImpl;
21
+ };
16
22
  //#endregion
17
23
  export { Source as AiSource, Sources as AiSources };
@@ -1,7 +1,8 @@
1
- import { injectComponentStyle } from "@bysages/core";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { injectComponentStyle } from "@bysages/core/styling";
2
3
  import { jsx } from "react/jsx-runtime";
3
4
  //#region src/components/ai-source/index.tsx
4
- function Source({ href, children, ...rest }) {
5
+ function SourceImpl({ href, children, ...rest }) {
5
6
  injectComponentStyle("ai");
6
7
  return /* @__PURE__ */ jsx("li", {
7
8
  "data-scope": "ai",
@@ -15,7 +16,8 @@ function Source({ href, children, ...rest }) {
15
16
  })
16
17
  });
17
18
  }
18
- function Sources({ children, ...rest }) {
19
+ const Source = withSelfRoot(SourceImpl);
20
+ function SourcesImpl({ children, ...rest }) {
19
21
  return /* @__PURE__ */ jsx("ol", {
20
22
  ...rest,
21
23
  "data-scope": "ai",
@@ -23,5 +25,6 @@ function Sources({ children, ...rest }) {
23
25
  children
24
26
  });
25
27
  }
28
+ const Sources = withSelfRoot(SourcesImpl);
26
29
  //#endregion
27
30
  export { Source as AiSource, Source, Sources as AiSources, Sources };
@@ -8,6 +8,9 @@ export interface SuggestionProps extends Omit<HTMLAttributes<HTMLButtonElement>,
8
8
  prompt: string;
9
9
  onSelect?: (prompt: string) => void;
10
10
  }
11
- export declare function Suggestion({ prompt, onSelect, ...rest }: SuggestionProps): import("react").JSX.Element;
11
+ declare function SuggestionImpl({ prompt, onSelect, ...rest }: SuggestionProps): import("react").JSX.Element;
12
+ export declare const Suggestion: typeof SuggestionImpl & {
13
+ Root: typeof SuggestionImpl;
14
+ };
12
15
  //#endregion
13
16
  export { Suggestion as AiSuggestion };
@@ -1,8 +1,9 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { Button } from "../button/index.mjs";
2
- import { injectComponentStyle } from "@bysages/core";
3
+ import { injectComponentStyle } from "@bysages/core/styling";
3
4
  import { jsx } from "react/jsx-runtime";
4
5
  //#region src/components/ai-suggestion/index.tsx
5
- function Suggestion({ prompt, onSelect, ...rest }) {
6
+ function SuggestionImpl({ prompt, onSelect, ...rest }) {
6
7
  injectComponentStyle("ai");
7
8
  return /* @__PURE__ */ jsx(Button, {
8
9
  variant: "outline",
@@ -12,5 +13,6 @@ function Suggestion({ prompt, onSelect, ...rest }) {
12
13
  children: prompt
13
14
  });
14
15
  }
16
+ const Suggestion = withSelfRoot(SuggestionImpl);
15
17
  //#endregion
16
18
  export { Suggestion as AiSuggestion, Suggestion };
@@ -16,6 +16,9 @@ export interface ToolProps extends HTMLAttributes<HTMLDivElement> {
16
16
  input?: ReactNode;
17
17
  output?: ReactNode;
18
18
  }
19
- export declare function Tool({ name, label, status, input, output, ...rest }: ToolProps): import("react").JSX.Element;
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
+ };
20
23
  //#endregion
21
24
  export { Tool as AiTool };
@@ -1,9 +1,10 @@
1
- import { t as chevron } from "../../chevron-BeHvt46K.mjs";
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { t as chevron } from "../../chevron-a2nIZKN4.mjs";
2
3
  import { Collapsible } from "../collapsible/index.mjs";
3
- import { injectComponentStyle } from "@bysages/core";
4
+ import { injectComponentStyle } from "@bysages/core/styling";
4
5
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
5
6
  //#region src/components/ai-tool/index.tsx
6
- function Tool({ name, label, status, input, output, ...rest }) {
7
+ function ToolImpl({ name, label, status, input, output, ...rest }) {
7
8
  injectComponentStyle("ai");
8
9
  return /* @__PURE__ */ jsxs(Collapsible.Root, {
9
10
  ...rest,
@@ -32,5 +33,6 @@ function Tool({ name, label, status, input, output, ...rest }) {
32
33
  }) })]
33
34
  });
34
35
  }
36
+ const Tool = withSelfRoot(ToolImpl);
35
37
  //#endregion
36
38
  export { Tool as AiTool, Tool };
@@ -1,6 +1,8 @@
1
1
  import { HTMLAttributes, ReactNode } from "react";
2
2
  //#region src/components/alert/index.d.ts
3
3
  export type AlertStatus = "ink" | "info" | "success" | "warning" | "danger";
4
+ /** A notice
5
+
4
6
  /** A notice drawn on the page: a wash of the status pigment, one heavier
5
7
  * hairline on the leading edge, the serif for its title. Root, Icon,
6
8
  * Body, Title, Description — the icon reads the status from the Root. */