@tulipfarm/sprout 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 (349) hide show
  1. package/README.md +45 -40
  2. package/dist/components/accordion.d.ts +2 -2
  3. package/dist/components/accordion.js +9 -9
  4. package/dist/components/agent-fanout.d.ts +2 -2
  5. package/dist/components/agent-fanout.js +65 -87
  6. package/dist/components/alert-dialog.d.ts +6 -6
  7. package/dist/components/alert-dialog.js +20 -20
  8. package/dist/components/alert.d.ts +6 -6
  9. package/dist/components/alert.js +13 -13
  10. package/dist/components/aspect-ratio.d.ts +2 -2
  11. package/dist/components/aspect-ratio.js +2 -2
  12. package/dist/components/attachment.d.ts +17 -17
  13. package/dist/components/attachment.js +82 -115
  14. package/dist/components/avatar.d.ts +10 -10
  15. package/dist/components/avatar.js +14 -14
  16. package/dist/components/badge.d.ts +4 -4
  17. package/dist/components/badge.js +18 -18
  18. package/dist/components/board.d.ts +107 -0
  19. package/dist/components/board.js +640 -0
  20. package/dist/components/brand-icon.d.ts +6 -6
  21. package/dist/components/brand-icon.js +55 -63
  22. package/dist/components/breadcrumb.d.ts +11 -11
  23. package/dist/components/breadcrumb.js +16 -18
  24. package/dist/components/button-group.d.ts +6 -6
  25. package/dist/components/button-group.js +14 -14
  26. package/dist/components/button.d.ts +11 -11
  27. package/dist/components/button.js +46 -56
  28. package/dist/components/calendar.d.ts +5 -5
  29. package/dist/components/calendar.js +44 -53
  30. package/dist/components/canvas.d.ts +4 -4
  31. package/dist/components/canvas.js +39 -46
  32. package/dist/components/card.d.ts +6 -6
  33. package/dist/components/card.js +17 -17
  34. package/dist/components/carousel.d.ts +7 -7
  35. package/dist/components/carousel.js +57 -75
  36. package/dist/components/chart.d.ts +5 -112
  37. package/dist/components/chart.js +5 -172
  38. package/dist/components/chat-confirmation.d.ts +13 -11
  39. package/dist/components/chat-confirmation.js +32 -38
  40. package/dist/components/chat-input.d.ts +4 -4
  41. package/dist/components/chat-input.js +74 -81
  42. package/dist/components/chat-plan.d.ts +2 -2
  43. package/dist/components/chat-plan.js +15 -20
  44. package/dist/components/chat-sources.d.ts +8 -8
  45. package/dist/components/chat-sources.js +18 -27
  46. package/dist/components/checkbox.d.ts +1 -1
  47. package/dist/components/checkbox.js +9 -9
  48. package/dist/components/choice-list.d.ts +2 -2
  49. package/dist/components/choice-list.js +16 -18
  50. package/dist/components/code-block.d.ts +5 -5
  51. package/dist/components/code-block.js +26 -26
  52. package/dist/components/collapsible.d.ts +1 -1
  53. package/dist/components/collapsible.js +7 -11
  54. package/dist/components/combobox.d.ts +3 -3
  55. package/dist/components/combobox.js +24 -24
  56. package/dist/components/command.d.ts +13 -13
  57. package/dist/components/command.js +61 -73
  58. package/dist/components/context-menu.d.ts +5 -5
  59. package/dist/components/context-menu.js +22 -22
  60. package/dist/components/dialog.d.ts +6 -6
  61. package/dist/components/dialog.js +23 -28
  62. package/dist/components/direction.d.ts +1 -1
  63. package/dist/components/direction.js +1 -1
  64. package/dist/components/dropdown-menu.d.ts +5 -5
  65. package/dist/components/dropdown-menu.js +20 -20
  66. package/dist/components/field.d.ts +11 -11
  67. package/dist/components/field.js +41 -61
  68. package/dist/components/file-explorer.d.ts +2 -2
  69. package/dist/components/file-explorer.js +89 -105
  70. package/dist/components/file-viewer.d.ts +10 -10
  71. package/dist/components/file-viewer.js +112 -140
  72. package/dist/components/form.d.ts +7 -7
  73. package/dist/components/form.js +24 -28
  74. package/dist/components/glass-banner.d.ts +3 -3
  75. package/dist/components/glass-banner.js +21 -24
  76. package/dist/components/gradient-banner.d.ts +5 -5
  77. package/dist/components/gradient-banner.js +13 -22
  78. package/dist/components/hover-card.d.ts +4 -4
  79. package/dist/components/hover-card.js +6 -6
  80. package/dist/components/input-group.d.ts +11 -11
  81. package/dist/components/input-group.js +22 -36
  82. package/dist/components/input-otp.d.ts +10 -10
  83. package/dist/components/input-otp.js +13 -15
  84. package/dist/components/input.d.ts +1 -1
  85. package/dist/components/input.js +7 -7
  86. package/dist/components/kbd.d.ts +3 -3
  87. package/dist/components/kbd.js +5 -5
  88. package/dist/components/label.d.ts +2 -2
  89. package/dist/components/label.js +2 -2
  90. package/dist/components/mention-list.d.ts +3 -3
  91. package/dist/components/mention-list.js +10 -10
  92. package/dist/components/menubar.d.ts +6 -6
  93. package/dist/components/menubar.js +22 -22
  94. package/dist/components/message-actions.d.ts +2 -2
  95. package/dist/components/message-actions.js +29 -31
  96. package/dist/components/message-response.d.ts +3 -3
  97. package/dist/components/message-response.js +18 -18
  98. package/dist/components/message-scroller.d.ts +12 -12
  99. package/dist/components/message-scroller.js +44 -56
  100. package/dist/components/message.d.ts +11 -11
  101. package/dist/components/message.js +25 -25
  102. package/dist/components/navigation-menu.d.ts +2 -2
  103. package/dist/components/navigation-menu.js +15 -15
  104. package/dist/components/notice-banner.d.ts +2 -2
  105. package/dist/components/notice-banner.js +2 -2
  106. package/dist/components/page-content.d.ts +2 -2
  107. package/dist/components/page-content.js +2 -2
  108. package/dist/components/page-header.d.ts +1 -1
  109. package/dist/components/page-header.js +16 -16
  110. package/dist/components/pagination.d.ts +9 -9
  111. package/dist/components/pagination.js +17 -17
  112. package/dist/components/plan-outline.d.ts +2 -2
  113. package/dist/components/plan-outline.js +43 -60
  114. package/dist/components/popover.d.ts +6 -6
  115. package/dist/components/popover.js +15 -15
  116. package/dist/components/presence-cursor.d.ts +2 -2
  117. package/dist/components/presence-cursor.js +3 -3
  118. package/dist/components/progress.d.ts +1 -1
  119. package/dist/components/progress.js +8 -8
  120. package/dist/components/prompt-list.d.ts +3 -3
  121. package/dist/components/prompt-list.js +6 -6
  122. package/dist/components/questionnaire.d.ts +19 -19
  123. package/dist/components/questionnaire.js +183 -242
  124. package/dist/components/radio-group.d.ts +2 -2
  125. package/dist/components/radio-group.js +6 -6
  126. package/dist/components/reasoning-effort.d.ts +3 -3
  127. package/dist/components/reasoning-effort.js +9 -12
  128. package/dist/components/record-list.d.ts +66 -0
  129. package/dist/components/record-list.js +151 -0
  130. package/dist/components/resizable.d.ts +5 -5
  131. package/dist/components/resizable.js +76 -102
  132. package/dist/components/result-card.d.ts +10 -5
  133. package/dist/components/result-card.js +42 -53
  134. package/dist/components/result-notice.d.ts +18 -0
  135. package/dist/components/result-notice.js +29 -0
  136. package/dist/components/review-card.d.ts +6 -6
  137. package/dist/components/review-card.js +18 -18
  138. package/dist/components/rich-text-editor.d.ts +2 -2
  139. package/dist/components/rich-text-editor.js +56 -72
  140. package/dist/components/schema-diagram.d.ts +3 -3
  141. package/dist/components/schema-diagram.js +39 -53
  142. package/dist/components/scroll-area.d.ts +1 -1
  143. package/dist/components/scroll-area.js +10 -14
  144. package/dist/components/search-dialog.d.ts +6 -6
  145. package/dist/components/search-dialog.js +16 -16
  146. package/dist/components/search-field.d.ts +1 -1
  147. package/dist/components/search-field.js +11 -11
  148. package/dist/components/select.d.ts +3 -3
  149. package/dist/components/select.js +20 -20
  150. package/dist/components/selection-slot.d.ts +2 -2
  151. package/dist/components/selection-slot.js +6 -9
  152. package/dist/components/separator.d.ts +15 -15
  153. package/dist/components/separator.js +22 -27
  154. package/dist/components/settings-list.d.ts +3 -3
  155. package/dist/components/settings-list.js +5 -5
  156. package/dist/components/sheet.d.ts +6 -6
  157. package/dist/components/sheet.js +27 -27
  158. package/dist/components/sidebar.d.ts +22 -22
  159. package/dist/components/sidebar.js +57 -58
  160. package/dist/components/skeleton.d.ts +5 -5
  161. package/dist/components/skeleton.js +14 -21
  162. package/dist/components/slider.d.ts +2 -2
  163. package/dist/components/slider.js +6 -6
  164. package/dist/components/spinner.d.ts +5 -5
  165. package/dist/components/spinner.js +22 -26
  166. package/dist/components/sql-viewer.d.ts +14 -14
  167. package/dist/components/sql-viewer.js +99 -128
  168. package/dist/components/state-panel-samples.d.ts +2 -2
  169. package/dist/components/state-panel-samples.js +209 -245
  170. package/dist/components/state-panel.d.ts +2 -35
  171. package/dist/components/state-panel.js +2 -29
  172. package/dist/components/state-sample.d.ts +7 -7
  173. package/dist/components/state-sample.js +18 -31
  174. package/dist/components/switch.d.ts +1 -1
  175. package/dist/components/switch.js +7 -7
  176. package/dist/components/table-nuqs.d.ts +2 -2
  177. package/dist/components/table-nuqs.js +11 -12
  178. package/dist/components/table.d.ts +4 -4
  179. package/dist/components/table.js +166 -235
  180. package/dist/components/tabs.d.ts +2 -2
  181. package/dist/components/tabs.js +12 -12
  182. package/dist/components/textarea.d.ts +2 -2
  183. package/dist/components/textarea.js +6 -8
  184. package/dist/components/timeline.d.ts +3 -0
  185. package/dist/components/timeline.js +3 -0
  186. package/dist/components/toast.d.ts +2 -2
  187. package/dist/components/toast.js +19 -25
  188. package/dist/components/toggle-group.d.ts +2 -2
  189. package/dist/components/toggle-group.js +18 -20
  190. package/dist/components/toggle.d.ts +2 -2
  191. package/dist/components/toggle.js +8 -8
  192. package/dist/components/tool-activity.d.ts +1 -1
  193. package/dist/components/tool-activity.js +83 -110
  194. package/dist/components/toolbar-status.d.ts +2 -2
  195. package/dist/components/toolbar-status.js +7 -7
  196. package/dist/components/tooltip.d.ts +5 -5
  197. package/dist/components/tooltip.js +12 -11
  198. package/dist/components/typed-text.d.ts +2 -2
  199. package/dist/components/typed-text.js +10 -12
  200. package/dist/components/view-switcher.d.ts +51 -0
  201. package/dist/components/view-switcher.js +114 -0
  202. package/dist/index.d.ts +98 -93
  203. package/dist/index.js +98 -93
  204. package/dist/internal/chart-kit.d.ts +142 -0
  205. package/dist/internal/chart-kit.js +200 -0
  206. package/dist/internal/charts/bars.d.ts +61 -0
  207. package/dist/internal/charts/bars.js +86 -0
  208. package/dist/internal/charts/lines.d.ts +67 -0
  209. package/dist/internal/charts/lines.js +70 -0
  210. package/dist/internal/charts/more.d.ts +77 -0
  211. package/dist/internal/charts/more.js +68 -0
  212. package/dist/internal/charts/parts.d.ts +54 -0
  213. package/dist/internal/charts/parts.js +82 -0
  214. package/dist/internal/charts/timeline-dates.d.ts +38 -0
  215. package/dist/internal/charts/timeline-dates.js +113 -0
  216. package/dist/internal/charts/timeline-window.d.ts +31 -0
  217. package/dist/internal/charts/timeline-window.js +26 -0
  218. package/dist/internal/charts/timeline.d.ts +72 -0
  219. package/dist/internal/charts/timeline.js +287 -0
  220. package/dist/internal/classes.d.ts +1 -1
  221. package/dist/internal/classes.js +7 -9
  222. package/dist/internal/code-tokens.d.ts +2 -2
  223. package/dist/internal/code-tokens.js +12 -12
  224. package/dist/internal/fieldset.d.ts +1 -1
  225. package/dist/internal/fieldset.js +6 -6
  226. package/dist/internal/file-kind.d.ts +1 -1
  227. package/dist/internal/file-kind.js +43 -51
  228. package/dist/internal/flow.d.ts +4 -4
  229. package/dist/internal/flow.js +20 -23
  230. package/dist/internal/languages.js +999 -999
  231. package/dist/internal/message-scroller.d.ts +3 -3
  232. package/dist/internal/message-scroller.js +64 -112
  233. package/dist/internal/pressable.d.ts +1 -1
  234. package/dist/internal/pressable.js +7 -7
  235. package/dist/internal/state-panel.d.ts +35 -0
  236. package/dist/internal/state-panel.js +22 -0
  237. package/dist/internal/syntax.d.ts +2 -2
  238. package/dist/internal/syntax.js +36 -47
  239. package/dist/styles/accordion.css +3 -5
  240. package/dist/styles/agent-fanout.css +64 -60
  241. package/dist/styles/alert-dialog.css +12 -26
  242. package/dist/styles/alert.css +10 -15
  243. package/dist/styles/attachment.css +51 -93
  244. package/dist/styles/avatar.css +17 -24
  245. package/dist/styles/badge.css +11 -36
  246. package/dist/styles/board.css +571 -0
  247. package/dist/styles/brand-icon.css +7 -8
  248. package/dist/styles/breadcrumb.css +4 -7
  249. package/dist/styles/button-group.css +8 -14
  250. package/dist/styles/button.css +22 -27
  251. package/dist/styles/calendar.css +24 -36
  252. package/dist/styles/canvas.css +2 -3
  253. package/dist/styles/card.css +7 -23
  254. package/dist/styles/carousel.css +11 -12
  255. package/dist/styles/chart.css +215 -31
  256. package/dist/styles/chat-input.css +15 -39
  257. package/dist/styles/chat-plan.css +3 -4
  258. package/dist/styles/chat-sources.css +3 -6
  259. package/dist/styles/checkbox.css +11 -25
  260. package/dist/styles/choice-list.css +17 -31
  261. package/dist/styles/code-block.css +11 -25
  262. package/dist/styles/collapsible.css +10 -15
  263. package/dist/styles/combobox.css +11 -15
  264. package/dist/styles/command.css +5 -8
  265. package/dist/styles/context-menu.css +2 -2
  266. package/dist/styles/dialog.css +5 -16
  267. package/dist/styles/dropdown-menu.css +2 -2
  268. package/dist/styles/field.css +15 -21
  269. package/dist/styles/file-explorer.css +19 -33
  270. package/dist/styles/file-viewer.css +13 -17
  271. package/dist/styles/form.css +3 -3
  272. package/dist/styles/glass-banner.css +12 -47
  273. package/dist/styles/gradient-banner.css +17 -35
  274. package/dist/styles/hover-card.css +9 -15
  275. package/dist/styles/index.css +116 -108
  276. package/dist/styles/input-group.css +25 -41
  277. package/dist/styles/input-otp.css +5 -6
  278. package/dist/styles/input.css +5 -5
  279. package/dist/styles/kbd.css +1 -1
  280. package/dist/styles/label.css +9 -30
  281. package/dist/styles/mention-list.css +6 -8
  282. package/dist/styles/menubar.css +5 -6
  283. package/dist/styles/message-actions.css +1 -1
  284. package/dist/styles/message-response.css +3 -5
  285. package/dist/styles/message-scroller.css +14 -21
  286. package/dist/styles/message.css +23 -60
  287. package/dist/styles/navigation-menu.css +14 -29
  288. package/dist/styles/notice-banner.css +1 -2
  289. package/dist/styles/page-header.css +7 -10
  290. package/dist/styles/pagination.css +1 -4
  291. package/dist/styles/plan-outline.css +20 -37
  292. package/dist/styles/popover.css +10 -19
  293. package/dist/styles/presence-cursor.css +1 -2
  294. package/dist/styles/progress.css +2 -4
  295. package/dist/styles/prompt-list.css +6 -17
  296. package/dist/styles/questionnaire.css +16 -40
  297. package/dist/styles/radio-group.css +12 -23
  298. package/dist/styles/reasoning-effort.css +8 -15
  299. package/dist/styles/record-list.css +243 -0
  300. package/dist/styles/resizable.css +10 -11
  301. package/dist/styles/result-card.css +17 -3
  302. package/dist/styles/result-notice.css +80 -0
  303. package/dist/styles/review-card.css +2 -3
  304. package/dist/styles/rich-text-editor.css +1 -2
  305. package/dist/styles/schema-diagram.css +12 -17
  306. package/dist/styles/scroll-area.css +8 -10
  307. package/dist/styles/search-dialog.css +1 -5
  308. package/dist/styles/search-field.css +1 -2
  309. package/dist/styles/select.css +7 -7
  310. package/dist/styles/selection-slot.css +1 -2
  311. package/dist/styles/separator.css +7 -8
  312. package/dist/styles/settings-list.css +1 -2
  313. package/dist/styles/sheet.css +40 -73
  314. package/dist/styles/sidebar.css +17 -21
  315. package/dist/styles/skeleton.css +9 -11
  316. package/dist/styles/slider.css +11 -21
  317. package/dist/styles/spinner.css +2 -2
  318. package/dist/styles/sql-viewer.css +29 -29
  319. package/dist/styles/state-panel.css +8 -9
  320. package/dist/styles/state-sample.css +20 -33
  321. package/dist/styles/switch.css +11 -18
  322. package/dist/styles/table.css +51 -77
  323. package/dist/styles/tabs.css +12 -16
  324. package/dist/styles/textarea.css +3 -3
  325. package/dist/styles/themes/chatgpt.css +11 -23
  326. package/dist/styles/themes/claude.css +12 -24
  327. package/dist/styles/themes/cloudflare.css +11 -23
  328. package/dist/styles/themes/discord.css +11 -23
  329. package/dist/styles/themes/github.css +11 -23
  330. package/dist/styles/themes/grok.css +11 -23
  331. package/dist/styles/themes/linear.css +12 -25
  332. package/dist/styles/themes/neutral.css +11 -23
  333. package/dist/styles/themes/notion.css +11 -23
  334. package/dist/styles/themes/perplexity.css +11 -23
  335. package/dist/styles/themes/raycast.css +11 -23
  336. package/dist/styles/themes/spotify.css +11 -23
  337. package/dist/styles/themes/stripe.css +11 -23
  338. package/dist/styles/themes/supabase.css +11 -23
  339. package/dist/styles/themes/tulipfarm.css +9 -10
  340. package/dist/styles/themes/vercel.css +12 -25
  341. package/dist/styles/timeline.css +276 -0
  342. package/dist/styles/toast.css +13 -20
  343. package/dist/styles/toggle-group.css +17 -23
  344. package/dist/styles/toggle.css +8 -8
  345. package/dist/styles/tool-activity.css +7 -13
  346. package/dist/styles/toolbar-status.css +2 -7
  347. package/dist/styles/tooltip.css +15 -21
  348. package/dist/styles/view-switcher.css +279 -0
  349. package/package.json +21 -1
@@ -0,0 +1,18 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ export interface ResultNoticeProps extends Omit<ComponentProps<'div'>, 'children'> {
3
+ /** How many items the view shows, such as 100. */
4
+ shown: number;
5
+ /** How many items exist, as a number or a capped count such as "10000+". */
6
+ total: number | string;
7
+ /** The plural name of the items, such as "rows" or "groups". */
8
+ noun: string;
9
+ /** A control at the end, such as a button that opens the result in Table. */
10
+ action?: ReactNode;
11
+ }
12
+ /**
13
+ * A quiet strip inside a view that says the view shows only part of the
14
+ * result, such as "Showing the first 100 of 2,431 rows." Mount it whenever a
15
+ * chart or timeline cuts its result short. It renders nothing when `total` is
16
+ * an exact count that is not above `shown`, so it never claims more exist.
17
+ */
18
+ export declare function ResultNotice({ shown, total, noun, action, className, ...props }: ResultNoticeProps): import("react").JSX.Element | null;
@@ -0,0 +1,29 @@
1
+ import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { InfoCircle } from 'reicon-react/icons/InfoCircle';
3
+ import { cn } from '../internal/classes.js';
4
+ const countPattern = /^(\d+)(\+?)$/;
5
+ const formatCount = (value) => {
6
+ if (typeof value === 'number')
7
+ return value.toLocaleString('en-US');
8
+ const match = countPattern.exec(value.trim());
9
+ return match ? `${Number(match[1]).toLocaleString('en-US')}${match[2]}` : value;
10
+ };
11
+ /** The exact total, or undefined when it is capped ("10000+") or not a count. */
12
+ const exactCount = (value) => {
13
+ if (typeof value === 'number')
14
+ return value;
15
+ const match = countPattern.exec(value.trim());
16
+ return match && !match[2] ? Number(match[1]) : undefined;
17
+ };
18
+ /**
19
+ * A quiet strip inside a view that says the view shows only part of the
20
+ * result, such as "Showing the first 100 of 2,431 rows." Mount it whenever a
21
+ * chart or timeline cuts its result short. It renders nothing when `total` is
22
+ * an exact count that is not above `shown`, so it never claims more exist.
23
+ */
24
+ export function ResultNotice({ shown, total, noun, action, className, ...props }) {
25
+ const exact = exactCount(total);
26
+ if (exact !== undefined && exact <= shown)
27
+ return null;
28
+ return (_jsxs("div", { "data-slot": "result-notice", className: cn('sprout-result-notice', className), ...props, children: [_jsxs("div", { className: "sprout-result-notice-content", children: [_jsx(InfoCircle, { "aria-hidden": "true", className: "sprout-result-notice-icon" }), _jsxs("p", { role: "status", "data-slot": "result-notice-message", className: "sprout-result-notice-message", children: [shown === 1 ? ('Showing the first of ') : (_jsxs(_Fragment, { children: ["Showing the first ", _jsx("strong", { children: formatCount(shown) }), " of", ' '] })), _jsx("strong", { children: formatCount(total) }), " ", noun, "."] })] }), action != null && action !== false && (_jsx("div", { "data-slot": "result-notice-action", className: "sprout-result-notice-action", children: action }))] }));
29
+ }
@@ -1,11 +1,11 @@
1
- import { type ComponentProps, type ReactNode } from "react";
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
2
  export declare const reviewCardBadgeVariantNames: readonly ["default", "success", "warning", "info", "secondary", "destructive", "outline"];
3
3
  export type ReviewCardBadgeVariant = (typeof reviewCardBadgeVariantNames)[number];
4
4
  export type ReviewCardBadge = {
5
5
  label: string;
6
6
  variant: ReviewCardBadgeVariant;
7
7
  };
8
- export interface ReviewCardProps extends Omit<ComponentProps<"section">, "title" | "children"> {
8
+ export interface ReviewCardProps extends Omit<ComponentProps<'section'>, 'title' | 'children'> {
9
9
  /** A 14–16px icon shown in a tile before the title. */
10
10
  icon: ReactNode;
11
11
  title: string;
@@ -30,10 +30,10 @@ export interface ReviewCardProps extends Omit<ComponentProps<"section">, "title"
30
30
  * details; the footer holds the outcome and the decision buttons.
31
31
  */
32
32
  export declare function ReviewCard({ icon, title, badge, settled, status, actions, children, label, className, ...props }: ReviewCardProps): import("react").JSX.Element;
33
- export type ReviewRowsProps = ComponentProps<"dl">;
33
+ export type ReviewRowsProps = ComponentProps<'dl'>;
34
34
  /** A bordered list of labeled facts, such as Change, Table, and Trigger. */
35
35
  export declare function ReviewRows({ className, ...props }: ReviewRowsProps): import("react").JSX.Element;
36
- export interface ReviewRowProps extends Omit<ComponentProps<"div">, "children"> {
36
+ export interface ReviewRowProps extends Omit<ComponentProps<'div'>, 'children'> {
37
37
  label: string;
38
38
  /** The value: text, badges, or a stacked new and current value. */
39
39
  children: ReactNode;
@@ -44,7 +44,7 @@ export type ReviewStep = {
44
44
  summary: ReactNode;
45
45
  detail?: ReactNode;
46
46
  };
47
- export interface ReviewStepsProps extends Omit<ComponentProps<"div">, "title" | "children"> {
47
+ export interface ReviewStepsProps extends Omit<ComponentProps<'div'>, 'title' | 'children'> {
48
48
  /** Short heading, such as “3 steps”. */
49
49
  title: string;
50
50
  steps: readonly ReviewStep[];
@@ -55,7 +55,7 @@ export type ReviewValue = {
55
55
  name: string;
56
56
  value: string;
57
57
  };
58
- export interface ReviewValuesProps extends Omit<ComponentProps<"dl">, "children"> {
58
+ export interface ReviewValuesProps extends Omit<ComponentProps<'dl'>, 'children'> {
59
59
  values: readonly ReviewValue[];
60
60
  }
61
61
  /** Exact names and values in monospace, such as headers or written fields. */
@@ -1,18 +1,18 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useId, useState } from "react";
4
- import { ChevronDown } from "reicon-react/icons/ChevronDown";
5
- import { cn } from "../internal/classes.js";
6
- import { Badge } from "./badge.js";
7
- import { Collapsible, CollapsibleContent, CollapsibleTrigger, } from "./collapsible.js";
3
+ import { useId, useState } from 'react';
4
+ import { ChevronDown } from 'reicon-react/icons/ChevronDown';
5
+ import { cn } from '../internal/classes.js';
6
+ import { Badge } from './badge.js';
7
+ import { Collapsible, CollapsibleContent, CollapsibleTrigger } from './collapsible.js';
8
8
  export const reviewCardBadgeVariantNames = [
9
- "default",
10
- "success",
11
- "warning",
12
- "info",
13
- "secondary",
14
- "destructive",
15
- "outline",
9
+ 'default',
10
+ 'success',
11
+ 'warning',
12
+ 'info',
13
+ 'secondary',
14
+ 'destructive',
15
+ 'outline',
16
16
  ];
17
17
  /**
18
18
  * A card that asks someone to review a proposed change before it happens:
@@ -29,21 +29,21 @@ export function ReviewCard({ icon, title, badge, settled = false, status, action
29
29
  }
30
30
  const showActions = open && actions != null && actions !== false;
31
31
  const showStatus = status != null && status !== false;
32
- return (_jsxs("section", { "data-slot": "review-card", "data-settled": settled || undefined, "data-open": open || undefined, "aria-label": label, "aria-labelledby": label ? undefined : titleId, ...props, className: cn("sprout-review-card", className), children: [_jsxs(Collapsible, { open: open, onOpenChange: setOpen, children: [_jsxs("div", { className: "sprout-review-card-header", children: [_jsx("span", { "aria-hidden": "true", className: "sprout-review-card-icon", children: icon }), _jsx("h4", { id: titleId, className: "sprout-review-card-title", children: _jsx(CollapsibleTrigger, { className: "sprout-review-card-trigger", children: title }) }), _jsx(Badge, { variant: badge.variant, className: "sprout-review-card-badge", children: badge.label }), _jsx(ChevronDown, { size: 16, "aria-hidden": "true", "data-slot": "collapsible-indicator", className: "sprout-review-card-chevron" })] }), _jsx(CollapsibleContent, { variant: "card", children: _jsx("div", { className: "sprout-review-card-body", children: children }) })] }), (showStatus || showActions) && (_jsxs("div", { className: "sprout-review-card-footer", children: [status, showActions && (_jsx("div", { className: "sprout-review-card-actions", children: actions }))] }))] }));
32
+ return (_jsxs("section", { "data-slot": "review-card", "data-settled": settled || undefined, "data-open": open || undefined, "aria-label": label, "aria-labelledby": label ? undefined : titleId, ...props, className: cn('sprout-review-card', className), children: [_jsxs(Collapsible, { open: open, onOpenChange: setOpen, children: [_jsxs("div", { className: "sprout-review-card-header", children: [_jsx("span", { "aria-hidden": "true", className: "sprout-review-card-icon", children: icon }), _jsx("h4", { id: titleId, className: "sprout-review-card-title", children: _jsx(CollapsibleTrigger, { className: "sprout-review-card-trigger", children: title }) }), _jsx(Badge, { variant: badge.variant, className: "sprout-review-card-badge", children: badge.label }), _jsx(ChevronDown, { size: 16, "aria-hidden": "true", "data-slot": "collapsible-indicator", className: "sprout-review-card-chevron" })] }), _jsx(CollapsibleContent, { variant: "card", children: _jsx("div", { className: "sprout-review-card-body", children: children }) })] }), (showStatus || showActions) && (_jsxs("div", { className: "sprout-review-card-footer", children: [status, showActions && _jsx("div", { className: "sprout-review-card-actions", children: actions })] }))] }));
33
33
  }
34
34
  /** A bordered list of labeled facts, such as Change, Table, and Trigger. */
35
35
  export function ReviewRows({ className, ...props }) {
36
- return (_jsx("dl", { "data-slot": "review-rows", ...props, className: cn("sprout-review-rows", className) }));
36
+ return _jsx("dl", { "data-slot": "review-rows", ...props, className: cn('sprout-review-rows', className) });
37
37
  }
38
38
  /** One fact: the label on the left and its value on the right. */
39
39
  export function ReviewRow({ label, children, className, ...props }) {
40
- return (_jsxs("div", { "data-slot": "review-row", ...props, className: cn("sprout-review-row", className), children: [_jsx("dt", { className: "sprout-review-row-label", children: label }), _jsx("dd", { className: "sprout-review-row-value", children: children })] }));
40
+ return (_jsxs("div", { "data-slot": "review-row", ...props, className: cn('sprout-review-row', className), children: [_jsx("dt", { className: "sprout-review-row-label", children: label }), _jsx("dd", { className: "sprout-review-row-value", children: children })] }));
41
41
  }
42
42
  /** A numbered list of what will happen, each with optional detail below. */
43
43
  export function ReviewSteps({ title, steps, className, ...props }) {
44
- return (_jsxs("div", { "data-slot": "review-steps", ...props, className: cn("sprout-review-steps", className), children: [_jsx("h5", { className: "sprout-review-steps-title", children: title }), _jsx("ol", { className: "sprout-review-steps-list", children: steps.map((step, index) => (_jsxs("li", { className: "sprout-review-step", children: [_jsx("span", { "aria-hidden": "true", className: "sprout-review-step-number", children: index + 1 }), _jsxs("div", { className: "sprout-review-step-content", children: [_jsx("p", { className: "sprout-review-step-summary", children: step.summary }), step.detail] })] }, index))) })] }));
44
+ return (_jsxs("div", { "data-slot": "review-steps", ...props, className: cn('sprout-review-steps', className), children: [_jsx("h5", { className: "sprout-review-steps-title", children: title }), _jsx("ol", { className: "sprout-review-steps-list", children: steps.map((step, index) => (_jsxs("li", { className: "sprout-review-step", children: [_jsx("span", { "aria-hidden": "true", className: "sprout-review-step-number", children: index + 1 }), _jsxs("div", { className: "sprout-review-step-content", children: [_jsx("p", { className: "sprout-review-step-summary", children: step.summary }), step.detail] })] }, index))) })] }));
45
45
  }
46
46
  /** Exact names and values in monospace, such as headers or written fields. */
47
47
  export function ReviewValues({ values, className, ...props }) {
48
- return (_jsx("dl", { "data-slot": "review-values", ...props, className: cn("sprout-review-values", className), children: values.map(({ name, value }) => (_jsxs("div", { className: "sprout-review-value", children: [_jsx("dt", { className: "sprout-review-value-name", children: name }), _jsx("dd", { className: "sprout-review-value-text", children: value })] }, name))) }));
48
+ return (_jsx("dl", { "data-slot": "review-values", ...props, className: cn('sprout-review-values', className), children: values.map(({ name, value }) => (_jsxs("div", { className: "sprout-review-value", children: [_jsx("dt", { className: "sprout-review-value-name", children: name }), _jsx("dd", { className: "sprout-review-value-text", children: value })] }, name))) }));
49
49
  }
@@ -1,5 +1,5 @@
1
- import { type ReactNode, type Ref } from "react";
2
- import { type Editor, type Extensions, type JSONContent } from "@tiptap/core";
1
+ import { type ReactNode, type Ref } from 'react';
2
+ import { type Editor, type Extensions, type JSONContent } from '@tiptap/core';
3
3
  export declare const richTextEditorSizeNames: readonly ["default", "compact"];
4
4
  export type RichTextEditorSize = (typeof richTextEditorSizeNames)[number];
5
5
  /** A Tiptap JSON document, such as `{ type: "doc", content: [{ type: "paragraph" }] }`. */
@@ -1,33 +1,28 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useEffect, useImperativeHandle, useMemo, useRef, } from "react";
4
- import { EditorContent, useEditor } from "@tiptap/react";
5
- import { Extension, InputRule, } from "@tiptap/core";
6
- import { Fragment, Slice, } from "@tiptap/pm/model";
7
- import { Plugin, PluginKey, TextSelection, } from "@tiptap/pm/state";
8
- import { canSplit } from "@tiptap/pm/transform";
9
- import StarterKit from "@tiptap/starter-kit";
10
- import Placeholder from "@tiptap/extension-placeholder";
11
- import { cn } from "../internal/classes.js";
12
- export const richTextEditorSizeNames = ["default", "compact"];
3
+ import { useEffect, useImperativeHandle, useMemo, useRef } from 'react';
4
+ import { EditorContent, useEditor } from '@tiptap/react';
5
+ import { Extension, InputRule } from '@tiptap/core';
6
+ import { Fragment, Slice } from '@tiptap/pm/model';
7
+ import { Plugin, PluginKey, TextSelection } from '@tiptap/pm/state';
8
+ import { canSplit } from '@tiptap/pm/transform';
9
+ import StarterKit from '@tiptap/starter-kit';
10
+ import Placeholder from '@tiptap/extension-placeholder';
11
+ import { cn } from '../internal/classes.js';
12
+ export const richTextEditorSizeNames = ['default', 'compact'];
13
13
  const fenceLanguage = /^[\w+#.-]{1,32}$/;
14
14
  const typedFence = /```([\w+#.-]{1,32})?\s$/;
15
15
  const fenceOnly = /^```([\w+#.-]{1,32})?$/;
16
16
  const openingFence = /^ {0,3}(?:(`{3,})([^`]*)|(~{3,})(.*))$/;
17
17
  function isFenceLine(state) {
18
18
  const { $from, empty } = state.selection;
19
- if (!empty ||
20
- $from.parent.type.name !== "paragraph" ||
21
- $from.parentOffset !== $from.parent.content.size)
19
+ if (!empty || $from.parent.type.name !== 'paragraph' || $from.parentOffset !== $from.parent.content.size)
22
20
  return false;
23
- return fenceOnly.test($from.parent
24
- .textBetween(0, $from.parentOffset, undefined, "\n")
25
- .split("\n")
26
- .at(-1) ?? "");
21
+ return fenceOnly.test($from.parent.textBetween(0, $from.parentOffset, undefined, '\n').split('\n').at(-1) ?? '');
27
22
  }
28
23
  function markdownBlocks(schema, text) {
29
24
  const blocks = [];
30
- const lines = text.replace(/\r\n?/g, "\n").split("\n");
25
+ const lines = text.replace(/\r\n?/g, '\n').split('\n');
31
26
  while (lines.length) {
32
27
  const line = lines.shift();
33
28
  const open = openingFence.exec(line);
@@ -39,15 +34,15 @@ function markdownBlocks(schema, text) {
39
34
  const fence = open[1] ?? open[3];
40
35
  const info = (open[2] ?? open[4]).trim().split(/\s/)[0];
41
36
  const closing = new RegExp(`^ {0,3}${fence[0]}{${fence.length},}\\s*$`);
42
- const end = lines.findIndex((candidate) => closing.test(candidate));
43
- const code = (end === -1 ? lines.splice(0) : lines.splice(0, end + 1).slice(0, -1)).join("\n");
37
+ const end = lines.findIndex(candidate => closing.test(candidate));
38
+ const code = (end === -1 ? lines.splice(0) : lines.splice(0, end + 1).slice(0, -1)).join('\n');
44
39
  blocks.push(schema.nodes.codeBlock.create({ language: fenceLanguage.test(info) ? info : null }, code ? schema.text(code) : null));
45
40
  }
46
41
  return blocks;
47
42
  }
48
43
  // StarterKit's fence rule only fires at the start of a paragraph, but Shift+Enter leaves the fence after a hard break.
49
44
  const MarkdownCodeFence = Extension.create({
50
- name: "markdownCodeFence",
45
+ name: 'markdownCodeFence',
51
46
  priority: 1000,
52
47
  addInputRules() {
53
48
  return [
@@ -57,20 +52,17 @@ const MarkdownCodeFence = Extension.create({
57
52
  const { tr, schema } = state;
58
53
  const codeBlock = schema.nodes.codeBlock;
59
54
  const $from = tr.doc.resolve(range.from);
60
- if ($from.parent.type.name !== "paragraph" ||
61
- range.to !== $from.end())
55
+ if ($from.parent.type.name !== 'paragraph' || range.to !== $from.end())
62
56
  return null;
63
57
  const before = $from.nodeBefore;
64
58
  const attrs = { language: match[1] ?? null };
65
59
  if (!before) {
66
- if (!$from
67
- .node(-1)
68
- .canReplaceWith($from.index(-1), $from.indexAfter(-1), codeBlock))
60
+ if (!$from.node(-1).canReplaceWith($from.index(-1), $from.indexAfter(-1), codeBlock))
69
61
  return null;
70
62
  tr.delete(range.from, range.to).setBlockType(range.from, range.from, codeBlock, attrs);
71
63
  return;
72
64
  }
73
- if (before.type.name !== "hardBreak")
65
+ if (before.type.name !== 'hardBreak')
74
66
  return null;
75
67
  const splitAt = range.from - before.nodeSize;
76
68
  tr.delete(splitAt, range.to);
@@ -85,19 +77,16 @@ const MarkdownCodeFence = Extension.create({
85
77
  addProseMirrorPlugins() {
86
78
  return [
87
79
  new Plugin({
88
- key: new PluginKey("markdownCodeFencePaste"),
80
+ key: new PluginKey('markdownCodeFencePaste'),
89
81
  props: {
90
82
  handlePaste: (view, event) => {
91
- const text = event.clipboardData?.getData("text/plain") ?? "";
83
+ const text = event.clipboardData?.getData('text/plain') ?? '';
92
84
  if (view.state.selection.$from.parent.type.spec.code ||
93
- !text.split(/\r\n?|\n/).some((line) => openingFence.test(line)))
85
+ !text.split(/\r\n?|\n/).some(line => openingFence.test(line)))
94
86
  return false;
95
87
  const blocks = markdownBlocks(view.state.schema, text);
96
- const slice = new Slice(Fragment.from(blocks), blocks[0]?.type.name === "paragraph" ? 1 : 0, blocks.at(-1)?.type.name === "paragraph" ? 1 : 0);
97
- view.dispatch(view.state.tr
98
- .replaceSelection(slice)
99
- .scrollIntoView()
100
- .setMeta("paste", true));
88
+ const slice = new Slice(Fragment.from(blocks), blocks[0]?.type.name === 'paragraph' ? 1 : 0, blocks.at(-1)?.type.name === 'paragraph' ? 1 : 0);
89
+ view.dispatch(view.state.tr.replaceSelection(slice).scrollIntoView().setMeta('paste', true));
101
90
  return true;
102
91
  },
103
92
  },
@@ -106,26 +95,26 @@ const MarkdownCodeFence = Extension.create({
106
95
  },
107
96
  });
108
97
  const MessageFormatting = Extension.create({
109
- name: "messageFormatting",
98
+ name: 'messageFormatting',
110
99
  extendMarkSchema(extension) {
111
- if (extension.name === "link")
100
+ if (extension.name === 'link')
112
101
  return { inclusive: false };
113
102
  return {};
114
103
  },
115
104
  addProseMirrorPlugins() {
116
105
  return [
117
106
  new Plugin({
118
- key: new PluginKey("clearDeletedLink"),
107
+ key: new PluginKey('clearDeletedLink'),
119
108
  appendTransaction(transactions, oldState, state) {
120
109
  const link = state.schema.marks.link;
121
110
  if (!link ||
122
- !transactions.some((transaction) => transaction.docChanged) ||
111
+ !transactions.some(transaction => transaction.docChanged) ||
123
112
  state.doc.content.size >= oldState.doc.content.size ||
124
113
  !state.selection.empty ||
125
- !state.storedMarks?.some((mark) => mark.type === link))
114
+ !state.storedMarks?.some(mark => mark.type === link))
126
115
  return null;
127
116
  if (state.selection.$from.parent.content.size &&
128
- state.selection.$from.marks().some((mark) => mark.type === link))
117
+ state.selection.$from.marks().some(mark => mark.type === link))
129
118
  return null;
130
119
  return state.tr.removeStoredMark(link);
131
120
  },
@@ -140,7 +129,7 @@ function within(state, name) {
140
129
  return true;
141
130
  return false;
142
131
  }
143
- const allowedProtocols = ["http:", "https:", "mailto:"];
132
+ const allowedProtocols = ['http:', 'https:', 'mailto:'];
144
133
  const baseExtensions = [
145
134
  StarterKit.configure({
146
135
  heading: { levels: [1, 2, 3] },
@@ -150,8 +139,7 @@ const baseExtensions = [
150
139
  openOnClick: false,
151
140
  isAllowedUri: (url, context) => {
152
141
  const protocol = /^[a-z][a-z\d+.-]*:/i.exec(url)?.[0].toLowerCase();
153
- return (context.defaultValidate(url) &&
154
- (!protocol || allowedProtocols.includes(protocol)));
142
+ return context.defaultValidate(url) && (!protocol || allowedProtocols.includes(protocol));
155
143
  },
156
144
  },
157
145
  }),
@@ -164,9 +152,9 @@ const baseExtensions = [
164
152
  * itself `data-slot="input-group-control"`, so an `InputGroup` around it draws
165
153
  * the border, focus, and invalid states.
166
154
  */
167
- export function RichTextEditor({ ref, size, condensed = false, value, onChange, onSend, extensions = [], placeholder = "Ask anything…", disabled = false, ariaLabel = "Message", ariaInvalid = false, ariaDescribedBy, ariaExpanded, ariaControls, ariaActiveDescendant, toolbarAddon, className, }) {
168
- const scale = size ?? "default";
169
- const inline = condensed || scale === "compact";
155
+ export function RichTextEditor({ ref, size, condensed = false, value, onChange, onSend, extensions = [], placeholder = 'Ask anything…', disabled = false, ariaLabel = 'Message', ariaInvalid = false, ariaDescribedBy, ariaExpanded, ariaControls, ariaActiveDescendant, toolbarAddon, className, }) {
156
+ const scale = size ?? 'default';
157
+ const inline = condensed || scale === 'compact';
170
158
  const onSendRef = useRef(onSend);
171
159
  const onChangeRef = useRef(onChange);
172
160
  const placeholderRef = useRef(placeholder);
@@ -175,11 +163,7 @@ export function RichTextEditor({ ref, size, condensed = false, value, onChange,
175
163
  onChangeRef.current = onChange;
176
164
  placeholderRef.current = placeholder;
177
165
  suggestionOpenRef.current = ariaExpanded ?? false;
178
- const configured = useMemo(() => [
179
- ...baseExtensions,
180
- Placeholder.configure({ placeholder: () => placeholderRef.current }),
181
- ...extensions,
182
- ], [extensions]);
166
+ const configured = useMemo(() => [...baseExtensions, Placeholder.configure({ placeholder: () => placeholderRef.current }), ...extensions], [extensions]);
183
167
  const editor = useEditor({
184
168
  immediatelyRender: false,
185
169
  extensions: configured,
@@ -188,37 +172,37 @@ export function RichTextEditor({ ref, size, condensed = false, value, onChange,
188
172
  editorProps: {
189
173
  // useEditor re-applies editorProps on every render, so these stay current.
190
174
  attributes: {
191
- "data-slot": "input-group-control",
192
- role: "textbox",
193
- "aria-label": ariaLabel,
194
- "aria-disabled": String(disabled),
195
- "aria-multiline": "true",
196
- "aria-autocomplete": "list",
197
- "aria-invalid": ariaInvalid ? "true" : "false",
175
+ 'data-slot': 'input-group-control',
176
+ role: 'textbox',
177
+ 'aria-label': ariaLabel,
178
+ 'aria-disabled': String(disabled),
179
+ 'aria-multiline': 'true',
180
+ 'aria-autocomplete': 'list',
181
+ 'aria-invalid': ariaInvalid ? 'true' : 'false',
198
182
  // ARIA forbids aria-expanded on a textbox; aria-controls and aria-activedescendant carry the open list.
199
- ...(ariaDescribedBy && { "aria-describedby": ariaDescribedBy }),
200
- ...(ariaControls && { "aria-controls": ariaControls }),
183
+ ...(ariaDescribedBy && { 'aria-describedby': ariaDescribedBy }),
184
+ ...(ariaControls && { 'aria-controls': ariaControls }),
201
185
  ...(ariaActiveDescendant && {
202
- "aria-activedescendant": ariaActiveDescendant,
186
+ 'aria-activedescendant': ariaActiveDescendant,
203
187
  }),
204
- class: "sprout-rich-text-editor-content",
188
+ class: 'sprout-rich-text-editor-content',
205
189
  },
206
190
  handleKeyDown: (view, event) => {
207
191
  if (event.isComposing)
208
192
  return false;
209
- if ((event.metaKey || event.ctrlKey) && event.key === "Enter") {
193
+ if ((event.metaKey || event.ctrlKey) && event.key === 'Enter') {
210
194
  event.preventDefault();
211
195
  onSendRef.current();
212
196
  return true;
213
197
  }
214
- if (event.key === "Enter" && suggestionOpenRef.current)
198
+ if (event.key === 'Enter' && suggestionOpenRef.current)
215
199
  return false;
216
- if (event.key === "Enter" && isFenceLine(view.state))
200
+ if (event.key === 'Enter' && isFenceLine(view.state))
217
201
  return false;
218
- if (event.key === "Enter" &&
202
+ if (event.key === 'Enter' &&
219
203
  !event.shiftKey &&
220
- !within(view.state, "listItem") &&
221
- !within(view.state, "codeBlock")) {
204
+ !within(view.state, 'listItem') &&
205
+ !within(view.state, 'codeBlock')) {
222
206
  event.preventDefault();
223
207
  onSendRef.current();
224
208
  return true;
@@ -231,7 +215,7 @@ export function RichTextEditor({ ref, size, condensed = false, value, onChange,
231
215
  useImperativeHandle(ref, () => ({
232
216
  focus: () => editor?.commands.focus(),
233
217
  editor: () => editor,
234
- setContent: (content) => editor?.commands.setContent(content, { emitUpdate: true }),
218
+ setContent: content => editor?.commands.setContent(content, { emitUpdate: true }),
235
219
  }), [editor]);
236
220
  useEffect(() => {
237
221
  editor?.setEditable(!disabled, false);
@@ -244,5 +228,5 @@ export function RichTextEditor({ ref, size, condensed = false, value, onChange,
244
228
  if (editor && !editor.state.doc.eq(editor.schema.nodeFromJSON(value)))
245
229
  editor.commands.setContent(value, { emitUpdate: false });
246
230
  }, [editor, value]);
247
- return (_jsxs("div", { "data-slot": "rich-text-editor", "data-size": scale, "data-condensed": condensed || undefined, "data-disabled": disabled || undefined, className: cn("sprout-rich-text-editor", `sprout-rich-text-editor-size-${scale}`, condensed && "sprout-rich-text-editor-condensed", className), children: [_jsx("div", { className: "sprout-rich-text-editor-body", children: _jsx(EditorContent, { editor: editor }) }), toolbarAddon && (_jsx("div", { "data-slot": "rich-text-editor-toolbar", className: cn("sprout-rich-text-editor-toolbar", inline && "sprout-rich-text-editor-toolbar-inline"), children: toolbarAddon }))] }));
231
+ return (_jsxs("div", { "data-slot": "rich-text-editor", "data-size": scale, "data-condensed": condensed || undefined, "data-disabled": disabled || undefined, className: cn('sprout-rich-text-editor', `sprout-rich-text-editor-size-${scale}`, condensed && 'sprout-rich-text-editor-condensed', className), children: [_jsx("div", { className: "sprout-rich-text-editor-body", children: _jsx(EditorContent, { editor: editor }) }), toolbarAddon && (_jsx("div", { "data-slot": "rich-text-editor-toolbar", className: cn('sprout-rich-text-editor-toolbar', inline && 'sprout-rich-text-editor-toolbar-inline'), children: toolbarAddon }))] }));
248
232
  }
@@ -1,4 +1,4 @@
1
- import { type HTMLAttributes } from "react";
1
+ import { type HTMLAttributes } from 'react';
2
2
  export declare const schemaTableStateNames: readonly ["new", "changed", "unchanged", "linked"];
3
3
  export declare const schemaChangeNames: readonly ["added", "changed", "removed"];
4
4
  export declare const schemaDiagramLayoutNames: readonly ["auto", "horizontal", "vertical"];
@@ -30,7 +30,7 @@ export interface SchemaLink {
30
30
  target: string;
31
31
  label: string;
32
32
  }
33
- export interface SchemaDiagramProps extends Omit<HTMLAttributes<HTMLDivElement>, "role" | "children"> {
33
+ export interface SchemaDiagramProps extends Omit<HTMLAttributes<HTMLDivElement>, 'role' | 'children'> {
34
34
  tables: readonly SchemaTable[];
35
35
  links: readonly SchemaLink[];
36
36
  /** Names the diagram for assistive tech, such as “Schema diagram for Launch tracker”. */
@@ -46,7 +46,7 @@ export interface SchemaDiagramProps extends Omit<HTMLAttributes<HTMLDivElement>,
46
46
  * with proposed changes marked on each table and field.
47
47
  */
48
48
  export declare function SchemaDiagram({ tables, links, label, layout: layoutName, className, ...props }: SchemaDiagramProps): import("react").JSX.Element;
49
- export interface SchemaLegendProps extends Omit<HTMLAttributes<HTMLUListElement>, "children"> {
49
+ export interface SchemaLegendProps extends Omit<HTMLAttributes<HTMLUListElement>, 'children'> {
50
50
  }
51
51
  /** Explains the change colors, the unique key, and the required mark. */
52
52
  export declare function SchemaLegend({ className, ...props }: SchemaLegendProps): import("react").JSX.Element;