@bysages/react 0.3.0 → 0.4.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 (277) hide show
  1. package/dist/{ai-response-jZy-0Tvv.mjs → ai-response-B4DX7nmJ.mjs} +10 -4
  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 +31 -1
  5. package/dist/components/affix/index.d.mts +4 -1
  6. package/dist/components/affix/index.mjs +5 -3
  7. package/dist/components/ai/index.d.mts +2 -2
  8. package/dist/components/ai/index.mjs +29 -12
  9. package/dist/components/ai-action/index.d.mts +4 -1
  10. package/dist/components/ai-action/index.mjs +3 -1
  11. package/dist/components/ai-attachments/index.d.mts +10 -4
  12. package/dist/components/ai-attachments/index.mjs +19 -45
  13. package/dist/components/ai-message/index.d.mts +4 -1
  14. package/dist/components/ai-message/index.mjs +3 -1
  15. package/dist/components/ai-prompt-input/index.d.mts +5 -2
  16. package/dist/components/ai-prompt-input/index.mjs +17 -17
  17. package/dist/components/ai-reasoning/index.d.mts +4 -1
  18. package/dist/components/ai-reasoning/index.mjs +4 -2
  19. package/dist/components/ai-response/index.d.mts +8 -3
  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 +5 -2
  23. package/dist/components/ai-suggestion/index.d.mts +4 -1
  24. package/dist/components/ai-suggestion/index.mjs +3 -1
  25. package/dist/components/ai-tool/index.d.mts +4 -1
  26. package/dist/components/ai-tool/index.mjs +4 -2
  27. package/dist/components/alert/index.d.mts +2 -0
  28. package/dist/components/alert/index.mjs +11 -18
  29. package/dist/components/angle-slider/index.d.mts +19 -2
  30. package/dist/components/angle-slider/index.mjs +31 -8
  31. package/dist/components/aspect-ratio/index.d.mts +4 -1
  32. package/dist/components/aspect-ratio/index.mjs +3 -1
  33. package/dist/components/autocomplete/index.d.mts +3 -1
  34. package/dist/components/autocomplete/index.mjs +9 -2
  35. package/dist/components/avatar/index.d.mts +2 -2
  36. package/dist/components/avatar/index.mjs +9 -2
  37. package/dist/components/avatar-group/index.d.mts +4 -1
  38. package/dist/components/avatar-group/index.mjs +3 -1
  39. package/dist/components/back-top/index.d.mts +7 -1
  40. package/dist/components/back-top/index.mjs +12 -17
  41. package/dist/components/badge/index.d.mts +4 -1
  42. package/dist/components/badge/index.mjs +3 -1
  43. package/dist/components/banner/index.mjs +13 -18
  44. package/dist/components/block-ui/index.d.mts +4 -1
  45. package/dist/components/block-ui/index.mjs +3 -1
  46. package/dist/components/breadcrumb/index.d.mts +3 -8
  47. package/dist/components/breadcrumb/index.mjs +11 -1
  48. package/dist/components/button/index.d.mts +4 -1
  49. package/dist/components/button/index.mjs +3 -1
  50. package/dist/components/calendar/index.d.mts +3 -1
  51. package/dist/components/calendar/index.mjs +9 -10
  52. package/dist/components/carousel/index.d.mts +21 -1
  53. package/dist/components/carousel/index.mjs +43 -2
  54. package/dist/components/cascade-select/index.d.mts +6 -1
  55. package/dist/components/cascade-select/index.mjs +18 -37
  56. package/dist/components/checkbox/index.d.mts +20 -2
  57. package/dist/components/checkbox/index.mjs +28 -8
  58. package/dist/components/checkbox-group/index.d.mts +8 -6
  59. package/dist/components/checkbox-group/index.mjs +44 -48
  60. package/dist/components/chip/index.d.mts +4 -1
  61. package/dist/components/chip/index.mjs +3 -1
  62. package/dist/components/client-only/index.d.mts +7 -2
  63. package/dist/components/client-only/index.mjs +5 -1
  64. package/dist/components/clipboard/index.d.mts +17 -4
  65. package/dist/components/clipboard/index.mjs +33 -5
  66. package/dist/components/collapsible/index.d.mts +16 -4
  67. package/dist/components/collapsible/index.mjs +25 -1
  68. package/dist/components/color-picker/index.d.mts +20 -4
  69. package/dist/components/color-picker/index.mjs +56 -14
  70. package/dist/components/combobox/index.d.mts +27 -1
  71. package/dist/components/combobox/index.mjs +62 -5
  72. package/dist/components/command/index.d.mts +4 -1
  73. package/dist/components/command/index.mjs +15 -3
  74. package/dist/components/comment/index.d.mts +4 -1
  75. package/dist/components/comment/index.mjs +3 -1
  76. package/dist/components/config-provider/index.d.mts +8 -2
  77. package/dist/components/config-provider/index.mjs +5 -2
  78. package/dist/components/container/index.d.mts +4 -1
  79. package/dist/components/container/index.mjs +3 -1
  80. package/dist/components/data-view/index.d.mts +4 -1
  81. package/dist/components/data-view/index.mjs +7 -3
  82. package/dist/components/date-input/index.d.mts +19 -4
  83. package/dist/components/date-input/index.mjs +33 -9
  84. package/dist/components/date-picker/index.d.mts +21 -4
  85. package/dist/components/date-picker/index.mjs +58 -11
  86. package/dist/components/deferred-content/index.d.mts +4 -1
  87. package/dist/components/deferred-content/index.mjs +3 -1
  88. package/dist/components/descriptions/index.d.mts +10 -2
  89. package/dist/components/descriptions/index.mjs +13 -8
  90. package/dist/components/dialog/index.d.mts +18 -5
  91. package/dist/components/dialog/index.mjs +43 -1
  92. package/dist/components/download-trigger/index.d.mts +7 -2
  93. package/dist/components/download-trigger/index.mjs +5 -1
  94. package/dist/components/drawer/index.d.mts +18 -6
  95. package/dist/components/drawer/index.mjs +40 -1
  96. package/dist/components/dynamic-input/index.d.mts +4 -1
  97. package/dist/components/dynamic-input/index.mjs +13 -19
  98. package/dist/components/editable/index.d.mts +28 -7
  99. package/dist/components/editable/index.mjs +43 -4
  100. package/dist/components/ellipsis/index.d.mts +4 -1
  101. package/dist/components/ellipsis/index.mjs +3 -1
  102. package/dist/components/field/index.d.mts +30 -5
  103. package/dist/components/field/index.mjs +36 -3
  104. package/dist/components/fieldset/index.d.mts +19 -4
  105. package/dist/components/fieldset/index.mjs +28 -3
  106. package/dist/components/file-upload/index.d.mts +36 -9
  107. package/dist/components/file-upload/index.mjs +66 -11
  108. package/dist/components/float-button/index.mjs +3 -1
  109. package/dist/components/floating-panel/index.d.mts +18 -6
  110. package/dist/components/floating-panel/index.mjs +55 -1
  111. package/dist/components/focus-trap/index.d.mts +7 -2
  112. package/dist/components/focus-trap/index.mjs +5 -1
  113. package/dist/components/form/index.d.mts +1 -1
  114. package/dist/components/form/index.mjs +5 -2
  115. package/dist/components/frame/index.d.mts +4 -8
  116. package/dist/components/frame/index.mjs +13 -1
  117. package/dist/components/grid/index.d.mts +4 -1
  118. package/dist/components/grid/index.mjs +3 -1
  119. package/dist/components/highlight/index.d.mts +3 -5
  120. package/dist/components/highlight/index.mjs +6 -1
  121. package/dist/components/hover-card/index.d.mts +20 -4
  122. package/dist/components/hover-card/index.mjs +32 -1
  123. package/dist/components/icon/index.d.mts +10 -8
  124. package/dist/components/icon/index.mjs +5 -3
  125. package/dist/components/image/index.d.mts +11 -2
  126. package/dist/components/image/index.mjs +16 -29
  127. package/dist/components/image-cropper/index.d.mts +13 -2
  128. package/dist/components/image-cropper/index.mjs +34 -2
  129. package/dist/components/image-viewer/index.d.mts +2 -18
  130. package/dist/components/image-viewer/index.mjs +3 -109
  131. package/dist/components/input/index.d.mts +3 -1
  132. package/dist/components/input/index.mjs +1 -1
  133. package/dist/components/json-tree-view/index.d.mts +20 -4
  134. package/dist/components/json-tree-view/index.mjs +38 -4
  135. package/dist/components/kbd/index.d.mts +4 -1
  136. package/dist/components/kbd/index.mjs +3 -1
  137. package/dist/components/layout/index.d.mts +25 -7
  138. package/dist/components/layout/index.mjs +159 -63
  139. package/dist/components/link/index.d.mts +4 -1
  140. package/dist/components/link/index.mjs +3 -1
  141. package/dist/components/list/index.d.mts +5 -4
  142. package/dist/components/list/index.mjs +10 -1
  143. package/dist/components/listbox/index.d.mts +22 -1
  144. package/dist/components/listbox/index.mjs +36 -4
  145. package/dist/components/marquee/index.d.mts +18 -1
  146. package/dist/components/marquee/index.mjs +34 -2
  147. package/dist/components/masonry/index.d.mts +4 -1
  148. package/dist/components/masonry/index.mjs +3 -1
  149. package/dist/components/media-player/index.d.mts +2 -0
  150. package/dist/components/media-player/index.mjs +2 -0
  151. package/dist/components/mentions/index.d.mts +1 -1
  152. package/dist/components/mentions/index.mjs +1 -1
  153. package/dist/components/menu/index.d.mts +29 -11
  154. package/dist/components/menu/index.mjs +34 -12
  155. package/dist/components/menubar/index.d.mts +3 -1
  156. package/dist/components/menubar/index.mjs +7 -1
  157. package/dist/components/navigation-menu/index.d.mts +25 -1
  158. package/dist/components/navigation-menu/index.mjs +36 -1
  159. package/dist/components/number-input/index.d.mts +28 -6
  160. package/dist/components/number-input/index.mjs +33 -8
  161. package/dist/components/order-list/index.d.mts +4 -1
  162. package/dist/components/order-list/index.mjs +34 -33
  163. package/dist/components/pagination/index.d.mts +23 -3
  164. package/dist/components/pagination/index.mjs +57 -12
  165. package/dist/components/password-input/index.d.mts +24 -6
  166. package/dist/components/password-input/index.mjs +31 -8
  167. package/dist/components/pin-input/index.d.mts +23 -5
  168. package/dist/components/pin-input/index.mjs +29 -7
  169. package/dist/components/popconfirm/index.d.mts +9 -5
  170. package/dist/components/popconfirm/index.mjs +23 -18
  171. package/dist/components/popover/index.d.mts +2 -8
  172. package/dist/components/popover/index.mjs +44 -4
  173. package/dist/components/presence/index.d.mts +10 -2
  174. package/dist/components/presence/index.mjs +6 -1
  175. package/dist/components/progress/index.d.mts +18 -3
  176. package/dist/components/progress/index.mjs +34 -9
  177. package/dist/components/progress-group/index.d.mts +4 -1
  178. package/dist/components/progress-group/index.mjs +4 -2
  179. package/dist/components/qr-code/index.d.mts +14 -1
  180. package/dist/components/qr-code/index.mjs +26 -2
  181. package/dist/components/radio-group/index.d.mts +27 -2
  182. package/dist/components/radio-group/index.mjs +32 -8
  183. package/dist/components/rating-group/index.d.mts +20 -3
  184. package/dist/components/rating-group/index.mjs +26 -8
  185. package/dist/components/result/index.d.mts +1 -1
  186. package/dist/components/result/index.mjs +2 -2
  187. package/dist/components/scroll-area/index.d.mts +14 -1
  188. package/dist/components/scroll-area/index.mjs +32 -2
  189. package/dist/components/segment-group/index.d.mts +28 -2
  190. package/dist/components/segment-group/index.mjs +34 -7
  191. package/dist/components/select/index.d.mts +2 -2
  192. package/dist/components/select/index.mjs +1 -1
  193. package/dist/components/separator/index.d.mts +4 -1
  194. package/dist/components/separator/index.mjs +3 -1
  195. package/dist/components/signature-pad/index.d.mts +25 -5
  196. package/dist/components/signature-pad/index.mjs +37 -3
  197. package/dist/components/skeleton/index.d.mts +4 -1
  198. package/dist/components/skeleton/index.mjs +3 -1
  199. package/dist/components/slider/index.d.mts +21 -2
  200. package/dist/components/slider/index.mjs +31 -8
  201. package/dist/components/spinner/index.d.mts +4 -1
  202. package/dist/components/spinner/index.mjs +6 -2
  203. package/dist/components/split-button/index.d.mts +3 -1
  204. package/dist/components/split-button/index.mjs +15 -18
  205. package/dist/components/splitter/index.d.mts +17 -4
  206. package/dist/components/splitter/index.mjs +35 -1
  207. package/dist/components/spotlight/index.d.mts +4 -1
  208. package/dist/components/spotlight/index.mjs +3 -1
  209. package/dist/components/stack/index.d.mts +4 -1
  210. package/dist/components/stack/index.mjs +6 -4
  211. package/dist/components/steps/index.d.mts +27 -3
  212. package/dist/components/steps/index.mjs +36 -12
  213. package/dist/components/swap/index.d.mts +11 -5
  214. package/dist/components/swap/index.mjs +30 -3
  215. package/dist/components/switch/index.d.mts +20 -2
  216. package/dist/components/switch/index.mjs +27 -8
  217. package/dist/components/table/index.d.mts +4 -1
  218. package/dist/components/table/index.mjs +44 -70
  219. package/dist/components/tabs/index.d.mts +24 -2
  220. package/dist/components/tabs/index.mjs +25 -9
  221. package/dist/components/tags-input/index.d.mts +33 -8
  222. package/dist/components/tags-input/index.mjs +41 -9
  223. package/dist/components/terminal/index.d.mts +4 -1
  224. package/dist/components/terminal/index.mjs +8 -3
  225. package/dist/components/textarea/index.d.mts +4 -1
  226. package/dist/components/textarea/index.mjs +3 -1
  227. package/dist/components/timer/index.d.mts +18 -1
  228. package/dist/components/timer/index.mjs +51 -2
  229. package/dist/components/toast/index.d.mts +3 -6
  230. package/dist/components/toast/index.mjs +22 -2
  231. package/dist/components/toc/index.d.mts +24 -4
  232. package/dist/components/toc/index.mjs +41 -3
  233. package/dist/components/toggle/index.d.mts +11 -4
  234. package/dist/components/toggle/index.mjs +21 -1
  235. package/dist/components/toggle-group/index.d.mts +26 -2
  236. package/dist/components/toggle-group/index.mjs +31 -6
  237. package/dist/components/toolbar/index.d.mts +4 -1
  238. package/dist/components/toolbar/index.mjs +3 -1
  239. package/dist/components/tooltip/index.d.mts +17 -4
  240. package/dist/components/tooltip/index.mjs +28 -1
  241. package/dist/components/tour/index.d.mts +18 -9
  242. package/dist/components/tour/index.mjs +44 -2
  243. package/dist/components/transfer/index.d.mts +3 -1
  244. package/dist/components/transfer/index.mjs +20 -30
  245. package/dist/components/tree-select/index.d.mts +3 -1
  246. package/dist/components/tree-select/index.mjs +15 -24
  247. package/dist/components/tree-view/index.d.mts +30 -1
  248. package/dist/components/tree-view/index.mjs +69 -6
  249. package/dist/components/typography/index.d.mts +4 -0
  250. package/dist/components/typography/index.mjs +1 -0
  251. package/dist/components/user/index.d.mts +4 -1
  252. package/dist/components/user/index.mjs +3 -1
  253. package/dist/components/virtual-list/index.d.mts +4 -1
  254. package/dist/components/virtual-list/index.mjs +11 -12
  255. package/dist/components/watermark/index.d.mts +4 -1
  256. package/dist/components/watermark/index.mjs +4 -2
  257. package/dist/family-DE_GQeeM.mjs +9 -0
  258. package/dist/icon-BALgGtNK.mjs +18 -0
  259. package/dist/id-C37UYLwJ.mjs +13 -0
  260. package/dist/image-viewer-Cf6thHax.mjs +141 -0
  261. package/dist/{index-Uefyw7Im.d.mts → index-Bbg4heDO.d.mts} +12 -7
  262. package/dist/index-BcRdWGY-.d.mts +115 -0
  263. package/dist/{index-DFN9F5Zt.d.mts → index-D_iKc2Uw.d.mts} +32 -3
  264. package/dist/{index-CsfxYv6J.d.mts → index-DdNKngUQ.d.mts} +63 -39
  265. package/dist/index-Dj8S4eyJ.d.mts +41 -0
  266. package/dist/index-Eu-Bttta.d.mts +24 -0
  267. package/dist/{index-uPyYiWaL.d.mts → index-PsgGWW3m.d.mts} +8 -2
  268. package/dist/index.d.mts +36 -35
  269. package/dist/index.mjs +13 -12
  270. package/dist/{input-2oezH-dY.mjs → input-C21Zzuy6.mjs} +3 -1
  271. package/dist/media-player-gQrnxU52.mjs +554 -0
  272. package/dist/{mentions-DMIBCBOd.mjs → mentions-BuWibdci.mjs} +74 -42
  273. package/dist/messages-1jJWtaYU.mjs +16 -0
  274. package/dist/select-ozUFq0zd.mjs +121 -0
  275. package/package.json +3 -3
  276. package/dist/chevron-BeHvt46K.mjs +0 -17
  277. package/dist/select-D1xiT1oJ.mjs +0 -68
@@ -1,3 +1,5 @@
1
+ import { t as withSelfRoot } from "./family-DE_GQeeM.mjs";
2
+ import { n as useComponentMessages } from "./messages-1jJWtaYU.mjs";
1
3
  import { injectComponentStyle } from "@bysages/core";
2
4
  import { jsx } from "react/jsx-runtime";
3
5
  import { useEffect, useRef } from "react";
@@ -99,20 +101,23 @@ function wrapResponseTables(root) {
99
101
  }
100
102
  //#endregion
101
103
  //#region src/components/ai-response/index.tsx
102
- function Response({ content, highlighter, copyLabel = "Copy code", copiedLabel = "Copied", ...rest }) {
104
+ function ResponseImpl({ content, highlighter, copyLabel, copiedLabel, ...rest }) {
103
105
  injectComponentStyle("ai");
106
+ const messages = useComponentMessages();
107
+ const resolvedCopyLabel = copyLabel ?? messages.ai.copyCode;
108
+ const resolvedCopiedLabel = copiedLabel ?? messages.ai.copied;
104
109
  const root = useRef(null);
105
110
  useEffect(() => {
106
111
  const host = root.current;
107
- if (host) decorateCodeCopy(host, copyLabel);
112
+ if (host) decorateCodeCopy(host, resolvedCopyLabel);
108
113
  if (host) wrapResponseTables(host);
109
114
  }, [
110
115
  content,
111
116
  highlighter,
112
- copyLabel
117
+ resolvedCopyLabel
113
118
  ]);
114
119
  const onClick = (event) => {
115
- clickCodeCopy(event.nativeEvent, copyLabel, copiedLabel);
120
+ clickCodeCopy(event.nativeEvent, resolvedCopyLabel, resolvedCopiedLabel);
116
121
  };
117
122
  return /* @__PURE__ */ jsx("div", {
118
123
  ...rest,
@@ -123,5 +128,6 @@ function Response({ content, highlighter, copyLabel = "Copy code", copiedLabel =
123
128
  dangerouslySetInnerHTML: { __html: renderHtml(content, highlighter ? { highlighter } : void 0) }
124
129
  });
125
130
  }
131
+ const Response = withSelfRoot(ResponseImpl);
126
132
  //#endregion
127
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 { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as useElementId } from "../../id-C37UYLwJ.mjs";
1
3
  import { injectComponentStyle } from "@bysages/core";
2
4
  import { Accordion as Accordion$1 } from "@ark-ui/react/accordion";
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 { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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 = "0px", offsetBottom = "0px", ...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 AiLoader, c as ReasoningUIPart, d as StepStartUIPart, f as TextUIPart, h as UIMessagePart, i as AiConversation, l as SourceDocumentUIPart, m as UIMessage, n as AiActions, o as DataUIPart, p as ToolUIPart, r as AiContent, s as FileUIPart, t as Ai, u as SourceUrlUIPart } from "../../index-CsfxYv6J.mjs";
2
- export { Ai, AiActions, AiContent, AiConversation, AiLoader, type DataUIPart, type FileUIPart, type ReasoningUIPart, type SourceDocumentUIPart, type SourceUrlUIPart, type StepStartUIPart, type TextUIPart, type ToolUIPart, type UIMessage, type UIMessagePart };
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-DdNKngUQ.mjs";
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,8 +1,10 @@
1
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
2
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
3
  import { Action } from "../ai-action/index.mjs";
2
4
  import { AiMessage as Message } from "../ai-message/index.mjs";
3
5
  import { AiPromptInput as PromptInput } from "../ai-prompt-input/index.mjs";
4
6
  import { AiReasoning as Reasoning } from "../ai-reasoning/index.mjs";
5
- import { t as Response } from "../../ai-response-jZy-0Tvv.mjs";
7
+ import { t as Response } from "../../ai-response-B4DX7nmJ.mjs";
6
8
  import { AiSource as Source, AiSources as Sources } from "../ai-source/index.mjs";
7
9
  import { AiSuggestion as Suggestion } from "../ai-suggestion/index.mjs";
8
10
  import { AiTool as Tool } from "../ai-tool/index.mjs";
@@ -29,23 +31,38 @@ function part(name, tag, extra = {}) {
29
31
  }
30
32
  /** The log itself: the column every stroke lands in, a landmark to
31
33
  * screen readers. */
32
- const AiConversation = part("Conversation", "div", {
33
- role: "log",
34
- "aria-label": "Conversation"
35
- });
34
+ function AiConversation({ children, ...rest }) {
35
+ const messages = useComponentMessages();
36
+ return /* @__PURE__ */ jsx("div", {
37
+ ...rest,
38
+ role: "log",
39
+ "aria-label": rest["aria-label"] ?? messages.ai.conversation,
40
+ "data-scope": "ai",
41
+ "data-part": "conversation",
42
+ children
43
+ });
44
+ }
36
45
  /** The bubble's inner measure — content that belongs to neither side
37
46
  * specifically. */
38
- const AiContent = part("Content", "div");
47
+ const AiContent = withSelfRoot(part("Content", "div"));
39
48
  /** The quiet row under a message — copy, retry, feedback. */
40
- const AiActions = part("Actions", "div");
49
+ const AiActions = withSelfRoot(part("Actions", "div"));
41
50
  /** The while-it-works whisper for the in-flight turns. */
42
- const AiLoader = part("Loader", "span", {
43
- role: "status",
44
- "aria-label": "Loading"
45
- });
51
+ function AiLoader({ children, ...rest }) {
52
+ const messages = useComponentMessages();
53
+ return /* @__PURE__ */ jsx("span", {
54
+ ...rest,
55
+ role: "status",
56
+ "aria-label": rest["aria-label"] ?? messages.ai.loading,
57
+ "data-scope": "ai",
58
+ "data-part": "loader",
59
+ children
60
+ });
61
+ }
46
62
  /** The whole family under one handle — `Ai.Conversation`,
47
63
  * `Ai.Message`, and the rest, exactly as before the split. */
48
64
  const Ai = Object.assign(AiConversation, {
65
+ Root: AiConversation,
49
66
  Conversation: AiConversation,
50
67
  MessageContent: AiContent,
51
68
  Actions: AiActions,
@@ -62,4 +79,4 @@ const Ai = Object.assign(AiConversation, {
62
79
  });
63
80
  injectComponentStyle("ai");
64
81
  //#endregion
65
- export { Ai, AiActions, AiContent, AiConversation, AiLoader };
82
+ export { Ai, AiActions, AiContent };
@@ -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
3
  import { injectComponentStyle } from "@bysages/core";
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,49 +1,20 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
3
+ import { n as useComponentMessages, t as formatMessage } from "../../messages-1jJWtaYU.mjs";
1
4
  import { injectComponentStyle } from "@bysages/core";
2
5
  import { jsx, jsxs } from "react/jsx-runtime";
3
6
  //#region src/components/ai-attachments/index.tsx
4
- const imageGlyph = /* @__PURE__ */ jsxs("svg", {
5
- viewBox: "0 0 16 16",
6
- "aria-hidden": "true",
7
- fill: "none",
8
- stroke: "currentColor",
9
- strokeWidth: 1.5,
10
- strokeLinecap: "square",
11
- children: [
12
- /* @__PURE__ */ jsx("rect", {
13
- x: 2.5,
14
- y: 3.5,
15
- width: 11,
16
- height: 9
17
- }),
18
- /* @__PURE__ */ jsx("path", { d: "M2.5 10.5 6 7l3 3 2-1.5 2.5 2" }),
19
- /* @__PURE__ */ jsx("circle", {
20
- cx: 6,
21
- cy: 6,
22
- r: .75,
23
- fill: "currentColor",
24
- stroke: "none"
25
- })
26
- ]
7
+ const imageIcon = iconNode("image", {
8
+ width: 16,
9
+ height: 16
27
10
  });
28
- const fileGlyph = /* @__PURE__ */ jsxs("svg", {
29
- viewBox: "0 0 16 16",
30
- "aria-hidden": "true",
31
- fill: "none",
32
- stroke: "currentColor",
33
- strokeWidth: 1.5,
34
- strokeLinecap: "square",
35
- 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
36
14
  });
37
- const removeGlyph = /* @__PURE__ */ jsx("svg", {
38
- viewBox: "0 0 16 16",
15
+ const removeIcon = iconNode("x", {
39
16
  width: 12,
40
- height: 12,
41
- "aria-hidden": "true",
42
- fill: "none",
43
- stroke: "currentColor",
44
- strokeWidth: 1.5,
45
- strokeLinecap: "square",
46
- children: /* @__PURE__ */ jsx("path", { d: "M4 4l8 8M12 4l-8 8" })
17
+ height: 12
47
18
  });
48
19
  const IMAGE_EXTS = [
49
20
  "png",
@@ -72,29 +43,31 @@ const humanSize = (bytes) => {
72
43
  } while (value >= 1024 && unit < units.length - 1);
73
44
  return `${value.toFixed(1)} ${units[unit]}`;
74
45
  };
75
- function Attachment({ name, size, status = "ready", onRemove, ...rest }) {
46
+ function AttachmentImpl({ name, size, status = "ready", onRemove, ...rest }) {
76
47
  injectComponentStyle("ai");
48
+ const messages = useComponentMessages();
77
49
  return /* @__PURE__ */ jsxs("span", {
78
50
  ...rest,
79
51
  "data-scope": "ai",
80
52
  "data-part": "attachment",
81
53
  "data-status": status,
82
54
  children: [
83
- isImage(name) ? imageGlyph : fileGlyph,
55
+ isImage(name) ? imageIcon : fileIcon,
84
56
  /* @__PURE__ */ jsx("span", { children: name }),
85
57
  size !== void 0 ? /* @__PURE__ */ jsx("span", { children: humanSize(size) }) : null,
86
58
  /* @__PURE__ */ jsx("button", {
87
59
  type: "button",
88
60
  "data-remove": "",
89
- "aria-label": `Remove ${name}`,
61
+ "aria-label": formatMessage(messages.ai.removeAttachment, { name }),
90
62
  onClick: () => onRemove?.(),
91
- children: removeGlyph
63
+ children: removeIcon
92
64
  })
93
65
  ]
94
66
  });
95
67
  }
68
+ const Attachment = withSelfRoot(AttachmentImpl);
96
69
  /** The row the files ride in — a wrapping line of chips. */
97
- function Attachments({ children, ...rest }) {
70
+ function AttachmentsImpl({ children, ...rest }) {
98
71
  return /* @__PURE__ */ jsx("span", {
99
72
  ...rest,
100
73
  "data-scope": "ai",
@@ -102,5 +75,6 @@ function Attachments({ children, ...rest }) {
102
75
  children
103
76
  });
104
77
  }
78
+ const Attachments = withSelfRoot(AttachmentsImpl);
105
79
  //#endregion
106
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 { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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, 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,22 +1,18 @@
1
+ import { t as iconNode } from "../../icon-BALgGtNK.mjs";
2
+ import { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
3
+ import { n as useComponentMessages } from "../../messages-1jJWtaYU.mjs";
1
4
  import { Button } from "../button/index.mjs";
2
5
  import { Field } from "../field/index.mjs";
3
- import { n as MentionsVessel, r as useMentions } from "../../mentions-DMIBCBOd.mjs";
6
+ import { n as MentionsVessel, r as useMentions } from "../../mentions-BuWibdci.mjs";
4
7
  import { injectComponentStyle } from "@bysages/core";
5
8
  import { Fragment, jsx, jsxs } from "react/jsx-runtime";
6
9
  import { useRef } from "react";
7
10
  //#region src/components/ai-prompt-input/index.tsx
8
- const arrowUpGlyph = /* @__PURE__ */ jsx("svg", {
9
- viewBox: "0 0 16 16",
11
+ const arrowUpIcon = iconNode("arrow-up", {
10
12
  width: 14,
11
- height: 14,
12
- "aria-hidden": "true",
13
- fill: "none",
14
- stroke: "currentColor",
15
- strokeWidth: 1.5,
16
- strokeLinecap: "square",
17
- children: /* @__PURE__ */ jsx("path", { d: "M8 13V3M3.5 7.5 8 3l4.5 4.5" })
13
+ height: 14
18
14
  });
19
- const stopGlyph = /* @__PURE__ */ jsx("svg", {
15
+ const stopIcon = /* @__PURE__ */ jsx("svg", {
20
16
  viewBox: "0 0 16 16",
21
17
  width: 14,
22
18
  height: 14,
@@ -39,9 +35,11 @@ function row(part, content) {
39
35
  children: content
40
36
  });
41
37
  }
42
- function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder = "Send a message", 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 }) {
43
39
  injectComponentStyle("ai");
44
40
  const fieldRef = useRef(null);
41
+ const messages = useComponentMessages();
42
+ const placeholderText = placeholder ?? messages.ai.conversation;
45
43
  const mentionState = useMentions(() => ({
46
44
  items: mentions?.items ?? [],
47
45
  trigger: mentions?.trigger
@@ -61,18 +59,18 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder = "Se
61
59
  size: "sm",
62
60
  square: true,
63
61
  type: "button",
64
- "aria-label": "Stop",
62
+ "aria-label": messages.ai.stop,
65
63
  disabled,
66
64
  onClick: () => onStop?.(),
67
- children: stopGlyph
65
+ children: stopIcon
68
66
  }) : /* @__PURE__ */ jsx(Button, {
69
67
  variant: "solid",
70
68
  size: "sm",
71
69
  square: true,
72
70
  type: "submit",
73
- "aria-label": "Send",
71
+ "aria-label": messages.ai.send,
74
72
  disabled: disabled || !value.trim(),
75
- children: arrowUpGlyph
73
+ children: arrowUpIcon
76
74
  });
77
75
  const hasFooter = footer != null && (!Array.isArray(footer) || footer.length > 0);
78
76
  return /* @__PURE__ */ jsxs("form", {
@@ -95,7 +93,8 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder = "Se
95
93
  autoresize: true,
96
94
  rows: 1,
97
95
  value,
98
- placeholder,
96
+ placeholder: placeholderText,
97
+ "aria-label": ariaLabel ?? messages.ai.conversation,
99
98
  disabled,
100
99
  onChange: (event) => {
101
100
  onValueChange?.(event.target.value);
@@ -131,5 +130,6 @@ function PromptInput({ value, onValueChange, onSubmit, onStop, placeholder = "Se
131
130
  ]
132
131
  });
133
132
  }
133
+ const PromptInput = withSelfRoot(PromptInputImpl);
134
134
  //#endregion
135
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
4
  import { injectComponentStyle } from "@bysages/core";
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 };
@@ -12,11 +12,16 @@ export interface ResponseProps extends HTMLAttributes<HTMLDivElement> {
12
12
  /** Optional code-highlighting function re-inking fenced blocks; the
13
13
  * component stays agnostic about which engine provides it. */
14
14
  highlighter?: (code: string, lang?: string) => string;
15
- /** The copy stamp's accessible name before the copy lands. */
15
+ /** The copy stamp's accessible name before the copy lands; leave
16
+ * unset for the resolved default. */
16
17
  copyLabel?: string;
17
- /** The copy stamp's accessible name once the text has landed. */
18
+ /** The copy stamp's accessible name once the text has landed; leave
19
+ * unset for the resolved default. */
18
20
  copiedLabel?: string;
19
21
  }
20
- 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
+ };
21
26
  //#endregion
22
27
  export { Response as AiResponse };
@@ -1,2 +1,2 @@
1
- import { t as Response } from "../../ai-response-jZy-0Tvv.mjs";
1
+ import { t as Response } from "../../ai-response-B4DX7nmJ.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 { t as withSelfRoot } from "../../family-DE_GQeeM.mjs";
1
2
  import { injectComponentStyle } from "@bysages/core";
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 };