@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
@@ -1,23 +1,23 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { createContext, useContext, useEffect, } from "react";
4
- import { createPortal } from "react-dom";
5
- import { useRender } from "@base-ui/react/use-render";
6
- import { ChevronLeft } from "reicon-react/icons/ChevronLeft";
7
- import { ChevronRight } from "reicon-react/icons/ChevronRight";
8
- import { cn } from "../internal/classes.js";
9
- import { Button } from "./button.js";
3
+ import { createContext, useContext, useEffect } from 'react';
4
+ import { createPortal } from 'react-dom';
5
+ import { useRender } from '@base-ui/react/use-render';
6
+ import { ChevronLeft } from 'reicon-react/icons/ChevronLeft';
7
+ import { ChevronRight } from 'reicon-react/icons/ChevronRight';
8
+ import { cn } from '../internal/classes.js';
9
+ import { Button } from './button.js';
10
10
  export const PageChromeContext = createContext({
11
11
  title: null,
12
12
  actions: null,
13
13
  });
14
14
  function ParentLink({ link, label }) {
15
15
  return useRender({
16
- defaultTagName: "a",
16
+ defaultTagName: 'a',
17
17
  render: link,
18
18
  props: {
19
- "data-slot": "page-breadcrumb-link",
20
- className: "sprout-page-header-breadcrumb-link",
19
+ 'data-slot': 'page-breadcrumb-link',
20
+ className: 'sprout-page-header-breadcrumb-link',
21
21
  children: label,
22
22
  },
23
23
  });
@@ -25,7 +25,7 @@ function ParentLink({ link, label }) {
25
25
  export function PageHeader({ title, description, actions, back, parent, titleId, titleRef, focusable, className, }) {
26
26
  const chrome = useContext(PageChromeContext);
27
27
  const format = chrome.documentTitle;
28
- const text = typeof title === "string" ? title : null;
28
+ const text = typeof title === 'string' ? title : null;
29
29
  useEffect(() => {
30
30
  if (!text || !format)
31
31
  return;
@@ -36,18 +36,18 @@ export function PageHeader({ title, description, actions, back, parent, titleId,
36
36
  };
37
37
  }, [text, format]);
38
38
  const inChrome = !!(chrome.title && chrome.actions);
39
- const placement = inChrome ? "chrome" : "page";
39
+ const placement = inChrome ? 'chrome' : 'page';
40
40
  const heading = (_jsx("h1", { id: titleId, ref: titleRef, tabIndex: focusable ? -1 : undefined, "data-slot": "page-title", "data-placement": placement, className: "sprout-page-header-title", children: title }));
41
41
  const trail = parent && (_jsx("nav", { "aria-label": "Breadcrumb", "data-slot": "page-breadcrumb", "data-placement": placement, className: "sprout-page-header-breadcrumb", children: _jsxs("ol", { className: "sprout-page-header-breadcrumb-list", children: [_jsx("li", { className: "sprout-page-header-breadcrumb-item", children: _jsx(ParentLink, { ...parent }) }), _jsx("li", { role: "presentation", "aria-hidden": "true", className: "sprout-page-header-breadcrumb-separator", children: _jsx(ChevronRight, { size: 14 }) }), _jsx("li", { "aria-current": "page", className: "sprout-page-header-breadcrumb-item sprout-page-header-breadcrumb-current", children: heading })] }) }));
42
42
  const backButton = back && (_jsxs(Button, { variant: "ghost", size: "back", nativeButton: false, render: back.link, "data-slot": "page-back", className: "sprout-page-header-back", children: [_jsx(ChevronLeft, { "data-icon": "inline-start", "aria-hidden": "true" }), _jsx("span", { className: "sprout-page-header-back-label", children: back.label })] }));
43
43
  if (inChrome) {
44
44
  return (_jsxs(_Fragment, { children: [createPortal(_jsxs(_Fragment, { children: [backButton, trail ?? heading] }), chrome.title), actions &&
45
- createPortal(_jsx("div", { "data-slot": "page-actions", "data-placement": "chrome", className: "sprout-page-header-actions", children: actions }), chrome.actions), description && (_jsx("p", { "data-slot": "page-description", className: cn("sprout-page-header-description", className), children: description }))] }));
45
+ createPortal(_jsx("div", { "data-slot": "page-actions", "data-placement": "chrome", className: "sprout-page-header-actions", children: actions }), chrome.actions), description && (_jsx("p", { "data-slot": "page-description", className: cn('sprout-page-header-description', className), children: description }))] }));
46
46
  }
47
- return (_jsxs("header", { "data-slot": "page-header", className: cn("sprout-page-header", className), children: [backButton, _jsxs("div", { className: "sprout-page-header-row", children: [_jsxs("div", { className: "sprout-page-header-text", children: [trail ?? heading, description && (_jsx("p", { "data-slot": "page-description", className: "sprout-page-header-description", children: description }))] }), actions && (_jsx("div", { "data-slot": "page-actions", "data-placement": "page", className: "sprout-page-header-actions", children: actions }))] })] }));
47
+ return (_jsxs("header", { "data-slot": "page-header", className: cn('sprout-page-header', className), children: [backButton, _jsxs("div", { className: "sprout-page-header-row", children: [_jsxs("div", { className: "sprout-page-header-text", children: [trail ?? heading, description && (_jsx("p", { "data-slot": "page-description", className: "sprout-page-header-description", children: description }))] }), actions && (_jsx("div", { "data-slot": "page-actions", "data-placement": "page", className: "sprout-page-header-actions", children: actions }))] })] }));
48
48
  }
49
49
  /** Page-level actions without a header: moved into the app header when one is provided. */
50
50
  export function PageActions({ children, className }) {
51
51
  const { actions } = useContext(PageChromeContext);
52
- return actions ? (createPortal(_jsx("div", { "data-slot": "page-actions", "data-placement": "chrome", className: cn("sprout-page-header-actions", className), children: children }), actions)) : (_jsx("div", { "data-slot": "page-actions", "data-placement": "inline", className: cn("sprout-page-header-actions", className), children: children }));
52
+ return actions ? (createPortal(_jsx("div", { "data-slot": "page-actions", "data-placement": "chrome", className: cn('sprout-page-header-actions', className), children: children }), actions)) : (_jsx("div", { "data-slot": "page-actions", "data-placement": "inline", className: cn('sprout-page-header-actions', className), children: children }));
53
53
  }
@@ -1,12 +1,12 @@
1
- import type { ComponentProps } from "react";
2
- import { type ButtonProps, type ButtonSize } from "./button.js";
3
- export type PaginationProps = ComponentProps<"nav">;
4
- export declare function Pagination({ className, "aria-label": label, ...props }: PaginationProps): import("react").JSX.Element;
5
- export type PaginationContentProps = ComponentProps<"ul">;
1
+ import type { ComponentProps } from 'react';
2
+ import { type ButtonProps, type ButtonSize } from './button.js';
3
+ export type PaginationProps = ComponentProps<'nav'>;
4
+ export declare function Pagination({ className, 'aria-label': label, ...props }: PaginationProps): import("react").JSX.Element;
5
+ export type PaginationContentProps = ComponentProps<'ul'>;
6
6
  export declare function PaginationContent({ className, ...props }: PaginationContentProps): import("react").JSX.Element;
7
- export type PaginationItemProps = ComponentProps<"li">;
7
+ export type PaginationItemProps = ComponentProps<'li'>;
8
8
  export declare function PaginationItem({ className, ...props }: PaginationItemProps): import("react").JSX.Element;
9
- export interface PaginationLinkProps extends Omit<ComponentProps<"a">, "className"> {
9
+ export interface PaginationLinkProps extends Omit<ComponentProps<'a'>, 'className'> {
10
10
  className?: string;
11
11
  /** Marks the current page: outline style and `aria-current="page"`. */
12
12
  isActive?: boolean;
@@ -15,7 +15,7 @@ export interface PaginationLinkProps extends Omit<ComponentProps<"a">, "classNam
15
15
  /** Sets `aria-disabled`, removes the link from the tab order, and blocks clicks. */
16
16
  disabled?: boolean;
17
17
  /** Swap the `a` for a router link, as with Base UI `render`. */
18
- render?: ButtonProps["render"];
18
+ render?: ButtonProps['render'];
19
19
  }
20
20
  export declare function PaginationLink({ className, isActive, size, render, ...props }: PaginationLinkProps): import("react").JSX.Element;
21
21
  export interface PaginationDirectionProps extends PaginationLinkProps {
@@ -24,6 +24,6 @@ export interface PaginationDirectionProps extends PaginationLinkProps {
24
24
  }
25
25
  export declare function PaginationPrevious({ className, text, ...props }: PaginationDirectionProps): import("react").JSX.Element;
26
26
  export declare function PaginationNext({ className, text, ...props }: PaginationDirectionProps): import("react").JSX.Element;
27
- export type PaginationEllipsisProps = ComponentProps<"span">;
27
+ export type PaginationEllipsisProps = ComponentProps<'span'>;
28
28
  /** Marks skipped pages. It is hidden from screen readers. */
29
29
  export declare function PaginationEllipsis({ className, ...props }: PaginationEllipsisProps): import("react").JSX.Element;
@@ -1,29 +1,29 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { ChevronLeft } from "reicon-react/icons/ChevronLeft";
4
- import { ChevronRight } from "reicon-react/icons/ChevronRight";
5
- import { MoreH } from "reicon-react/icons/MoreH";
6
- import { cn } from "../internal/classes.js";
7
- import { Button } from "./button.js";
8
- export function Pagination({ className, "aria-label": label = "pagination", ...props }) {
9
- return (_jsx("nav", { role: "navigation", "aria-label": label, "data-slot": "pagination", className: cn("sprout-pagination", className), ...props }));
3
+ import { ChevronLeft } from 'reicon-react/icons/ChevronLeft';
4
+ import { ChevronRight } from 'reicon-react/icons/ChevronRight';
5
+ import { MoreH } from 'reicon-react/icons/MoreH';
6
+ import { cn } from '../internal/classes.js';
7
+ import { Button } from './button.js';
8
+ export function Pagination({ className, 'aria-label': label = 'pagination', ...props }) {
9
+ return (_jsx("nav", { role: "navigation", "aria-label": label, "data-slot": "pagination", className: cn('sprout-pagination', className), ...props }));
10
10
  }
11
11
  export function PaginationContent({ className, ...props }) {
12
- return (_jsx("ul", { "data-slot": "pagination-content", className: cn("sprout-pagination-content", className), ...props }));
12
+ return _jsx("ul", { "data-slot": "pagination-content", className: cn('sprout-pagination-content', className), ...props });
13
13
  }
14
14
  export function PaginationItem({ className, ...props }) {
15
- return (_jsx("li", { "data-slot": "pagination-item", className: cn("sprout-pagination-item", className), ...props }));
15
+ return _jsx("li", { "data-slot": "pagination-item", className: cn('sprout-pagination-item', className), ...props });
16
16
  }
17
- export function PaginationLink({ className, isActive, size = "icon", render, ...props }) {
18
- return (_jsx(Button, { variant: isActive ? "outline" : "ghost", size: size, nativeButton: false, render: render, ...props, "aria-current": isActive ? "page" : undefined, "data-slot": "pagination-link", "data-active": isActive ? "true" : undefined, className: cn("sprout-pagination-link", className) }));
17
+ export function PaginationLink({ className, isActive, size = 'icon', render, ...props }) {
18
+ return (_jsx(Button, { variant: isActive ? 'outline' : 'ghost', size: size, nativeButton: false, render: render, ...props, "aria-current": isActive ? 'page' : undefined, "data-slot": "pagination-link", "data-active": isActive ? 'true' : undefined, className: cn('sprout-pagination-link', className) }));
19
19
  }
20
- export function PaginationPrevious({ className, text = "Previous", ...props }) {
21
- return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn("sprout-pagination-previous", className), ...props, children: [_jsx(ChevronLeft, { "data-icon": "inline-start", "aria-hidden": "true" }), _jsx("span", { className: "sprout-pagination-label", children: text })] }));
20
+ export function PaginationPrevious({ className, text = 'Previous', ...props }) {
21
+ return (_jsxs(PaginationLink, { "aria-label": "Go to previous page", size: "default", className: cn('sprout-pagination-previous', className), ...props, children: [_jsx(ChevronLeft, { "data-icon": "inline-start", "aria-hidden": "true" }), _jsx("span", { className: "sprout-pagination-label", children: text })] }));
22
22
  }
23
- export function PaginationNext({ className, text = "Next", ...props }) {
24
- return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn("sprout-pagination-next", className), ...props, children: [_jsx("span", { className: "sprout-pagination-label", children: text }), _jsx(ChevronRight, { "data-icon": "inline-end", "aria-hidden": "true" })] }));
23
+ export function PaginationNext({ className, text = 'Next', ...props }) {
24
+ return (_jsxs(PaginationLink, { "aria-label": "Go to next page", size: "default", className: cn('sprout-pagination-next', className), ...props, children: [_jsx("span", { className: "sprout-pagination-label", children: text }), _jsx(ChevronRight, { "data-icon": "inline-end", "aria-hidden": "true" })] }));
25
25
  }
26
26
  /** Marks skipped pages. It is hidden from screen readers. */
27
27
  export function PaginationEllipsis({ className, ...props }) {
28
- return (_jsxs("span", { "aria-hidden": "true", "data-slot": "pagination-ellipsis", className: cn("sprout-pagination-ellipsis", className), ...props, children: [_jsx(MoreH, {}), _jsx("span", { className: "sprout-pagination-sr-only", children: "More pages" })] }));
28
+ return (_jsxs("span", { "aria-hidden": "true", "data-slot": "pagination-ellipsis", className: cn('sprout-pagination-ellipsis', className), ...props, children: [_jsx(MoreH, {}), _jsx("span", { className: "sprout-pagination-sr-only", children: "More pages" })] }));
29
29
  }
@@ -1,4 +1,4 @@
1
- import { type ComponentProps, type ReactNode } from "react";
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
2
  export declare const planOutlineMarkNames: readonly ["pending", "running", "attention", "blocked", "done", "failed", "cancelled"];
3
3
  /** How a task row is marked. Every mark is paired with a text label; color is never the only signal. */
4
4
  export type PlanOutlineMark = (typeof planOutlineMarkNames)[number];
@@ -33,7 +33,7 @@ export type PlanOutlineTask = {
33
33
  /** Makes the row a group. Groups start open and list these tasks. */
34
34
  children?: readonly PlanOutlineTask[] | undefined;
35
35
  };
36
- export interface PlanOutlineProps extends Omit<ComponentProps<"section">, "title" | "children"> {
36
+ export interface PlanOutlineProps extends Omit<ComponentProps<'section'>, 'title' | 'children'> {
37
37
  /** The plan name. It names the section and shows as an `h3`. */
38
38
  title: string;
39
39
  /** One paragraph under the title. */
@@ -1,34 +1,28 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
- import { Collapsible } from "@base-ui/react/collapsible";
4
- import { createContext, useContext, useId, } from "react";
5
- import { Ban } from "reicon-react/icons/Ban";
6
- import { Check } from "reicon-react/icons/Check";
7
- import { ChevronRight } from "reicon-react/icons/ChevronRight";
8
- import { Clock } from "reicon-react/icons/Clock";
9
- import { HelpCircle } from "reicon-react/icons/HelpCircle";
10
- import { Lock } from "reicon-react/icons/Lock";
11
- import { User } from "reicon-react/icons/User";
12
- import { Warning } from "reicon-react/icons/Warning";
13
- import { cn } from "../internal/classes.js";
14
- import { Badge } from "./badge.js";
15
- import { Spinner } from "./spinner.js";
3
+ import { Collapsible } from '@base-ui/react/collapsible';
4
+ import { createContext, useContext, useId } from 'react';
5
+ import { Ban } from 'reicon-react/icons/Ban';
6
+ import { Check } from 'reicon-react/icons/Check';
7
+ import { ChevronRight } from 'reicon-react/icons/ChevronRight';
8
+ import { Clock } from 'reicon-react/icons/Clock';
9
+ import { HelpCircle } from 'reicon-react/icons/HelpCircle';
10
+ import { Lock } from 'reicon-react/icons/Lock';
11
+ import { User } from 'reicon-react/icons/User';
12
+ import { Warning } from 'reicon-react/icons/Warning';
13
+ import { cn } from '../internal/classes.js';
14
+ import { Badge } from './badge.js';
15
+ import { Spinner } from './spinner.js';
16
16
  export const planOutlineMarkNames = [
17
- "pending",
18
- "running",
19
- "attention",
20
- "blocked",
21
- "done",
22
- "failed",
23
- "cancelled",
24
- ];
25
- export const planOutlineToneNames = [
26
- "active",
27
- "attention",
28
- "done",
29
- "failed",
30
- "neutral",
17
+ 'pending',
18
+ 'running',
19
+ 'attention',
20
+ 'blocked',
21
+ 'done',
22
+ 'failed',
23
+ 'cancelled',
31
24
  ];
25
+ export const planOutlineToneNames = ['active', 'attention', 'done', 'failed', 'neutral'];
32
26
  const markIcons = {
33
27
  pending: _jsx(Clock, { size: 14 }),
34
28
  attention: _jsx(HelpCircle, { size: 14 }),
@@ -38,20 +32,16 @@ const markIcons = {
38
32
  cancelled: _jsx(Ban, { size: 14 }),
39
33
  };
40
34
  const toneBadges = {
41
- active: "info",
42
- attention: "warning",
43
- done: "success",
44
- failed: "destructive",
45
- neutral: "secondary",
35
+ active: 'info',
36
+ attention: 'warning',
37
+ done: 'success',
38
+ failed: 'destructive',
39
+ neutral: 'secondary',
46
40
  };
47
41
  function leaves(tasks) {
48
- return tasks.flatMap((task) => task.children
49
- ? leaves(task.children)
50
- : task.mark === "cancelled"
51
- ? []
52
- : [task]);
42
+ return tasks.flatMap(task => (task.children ? leaves(task.children) : task.mark === 'cancelled' ? [] : [task]));
53
43
  }
54
- const Scope = createContext("plan");
44
+ const Scope = createContext('plan');
55
45
  function useTaskId() {
56
46
  const scope = useContext(Scope);
57
47
  return (id) => `${scope}-task-${id}`;
@@ -63,40 +53,33 @@ function useTaskId() {
63
53
  * dependencies, reason, and actions on demand.
64
54
  */
65
55
  export function PlanOutline({ title, brief, status, tone, progress, notice, tasks, stale, className, ...props }) {
66
- const scope = `plan-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
56
+ const scope = `plan-${useId().replace(/[^a-zA-Z0-9_-]/g, '')}`;
67
57
  const work = leaves(tasks);
68
- return (_jsx(Scope, { value: scope, children: _jsxs("section", { "data-slot": "plan-outline", "aria-label": title, ...props, className: cn("sprout-plan-outline", className), children: [_jsxs("header", { className: "sprout-plan-outline-header", children: [_jsxs("div", { className: "sprout-plan-outline-heading", children: [_jsx("h3", { className: "sprout-plan-outline-title", children: title }), _jsx(Badge, { variant: toneBadges[tone], "data-tone": tone, className: "sprout-plan-outline-status", children: status })] }), brief && _jsx("p", { className: "sprout-plan-outline-brief", children: brief }), _jsxs("div", { className: "sprout-plan-outline-progress", children: [work.length > 0 && (_jsx("div", { "aria-hidden": "true", "data-slot": "plan-outline-rail", className: "sprout-plan-outline-rail", children: work.map((task) => (_jsx("span", { "data-mark": task.mark, className: "sprout-plan-outline-segment" }, task.id))) })), _jsx("p", { className: "sprout-plan-outline-progress-text", children: progress })] }), notice, stale] }), tasks.length === 0 ? (_jsx("p", { className: "sprout-plan-outline-empty", children: "No tasks have been added yet." })) : (_jsx(TaskList, { tasks: tasks, label: "Tasks", level: 0 }))] }) }));
58
+ return (_jsx(Scope, { value: scope, children: _jsxs("section", { "data-slot": "plan-outline", "aria-label": title, ...props, className: cn('sprout-plan-outline', className), children: [_jsxs("header", { className: "sprout-plan-outline-header", children: [_jsxs("div", { className: "sprout-plan-outline-heading", children: [_jsx("h3", { className: "sprout-plan-outline-title", children: title }), _jsx(Badge, { variant: toneBadges[tone], "data-tone": tone, className: "sprout-plan-outline-status", children: status })] }), brief && _jsx("p", { className: "sprout-plan-outline-brief", children: brief }), _jsxs("div", { className: "sprout-plan-outline-progress", children: [work.length > 0 && (_jsx("div", { "aria-hidden": "true", "data-slot": "plan-outline-rail", className: "sprout-plan-outline-rail", children: work.map(task => (_jsx("span", { "data-mark": task.mark, className: "sprout-plan-outline-segment" }, task.id))) })), _jsx("p", { className: "sprout-plan-outline-progress-text", children: progress })] }), notice, stale] }), tasks.length === 0 ? (_jsx("p", { className: "sprout-plan-outline-empty", children: "No tasks have been added yet." })) : (_jsx(TaskList, { tasks: tasks, label: "Tasks", level: 0 }))] }) }));
69
59
  }
70
- function TaskList({ tasks, label, level, }) {
71
- return (_jsx("ol", { "aria-label": label, "data-level": level, className: level === 0
72
- ? "sprout-plan-outline-list"
73
- : "sprout-plan-outline-list sprout-plan-outline-sublist", children: tasks.map((task) => (_jsx(TaskRow, { task: task, level: level }, task.id))) }));
60
+ function TaskList({ tasks, label, level }) {
61
+ return (_jsx("ol", { "aria-label": label, "data-level": level, className: level === 0 ? 'sprout-plan-outline-list' : 'sprout-plan-outline-list sprout-plan-outline-sublist', children: tasks.map(task => (_jsx(TaskRow, { task: task, level: level }, task.id))) }));
74
62
  }
75
63
  function Mark({ mark }) {
76
- return (_jsx("span", { "aria-hidden": "true", className: "sprout-plan-outline-mark", children: mark === "running" ? _jsx(Spinner, { "aria-hidden": "true" }) : markIcons[mark] }));
64
+ return (_jsx("span", { "aria-hidden": "true", className: "sprout-plan-outline-mark", children: mark === 'running' ? _jsx(Spinner, { "aria-hidden": "true" }) : markIcons[mark] }));
77
65
  }
78
66
  function TaskRow({ task, level }) {
79
67
  const taskId = useTaskId();
80
68
  const group = !!task.children;
81
- const hasDetail = group ||
82
- !!(task.brief ||
83
- task.criteria?.length ||
84
- task.dependencies?.length ||
85
- task.reason ||
86
- task.action);
87
- const head = (_jsxs(_Fragment, { children: [_jsx(Mark, { mark: task.mark }), _jsxs("span", { className: "sprout-plan-outline-text", children: [_jsx("span", { className: "sprout-plan-outline-task-title", children: task.title }), task.assignee && (_jsxs("span", { className: "sprout-plan-outline-assignee", children: [_jsx(User, { size: 12, "aria-hidden": "true" }), _jsx("span", { children: task.assignee })] }))] }), _jsx("span", { className: "sprout-plan-outline-label", children: task.label }), hasDetail && (_jsx(ChevronRight, { size: 14, "aria-hidden": "true", className: "sprout-plan-outline-chevron" }))] }));
69
+ const hasDetail = group || !!(task.brief || task.criteria?.length || task.dependencies?.length || task.reason || task.action);
70
+ const head = (_jsxs(_Fragment, { children: [_jsx(Mark, { mark: task.mark }), _jsxs("span", { className: "sprout-plan-outline-text", children: [_jsx("span", { className: "sprout-plan-outline-task-title", children: task.title }), task.assignee && (_jsxs("span", { className: "sprout-plan-outline-assignee", children: [_jsx(User, { size: 12, "aria-hidden": "true" }), _jsx("span", { children: task.assignee })] }))] }), _jsx("span", { className: "sprout-plan-outline-label", children: task.label }), hasDetail && _jsx(ChevronRight, { size: 14, "aria-hidden": "true", className: "sprout-plan-outline-chevron" })] }));
88
71
  const rowProps = {
89
72
  id: taskId(task.id),
90
73
  tabIndex: -1,
91
- "data-slot": "plan-outline-task",
92
- "data-kind": group ? "group" : "task",
93
- "data-mark": task.mark,
94
- "data-level": level,
95
- className: "sprout-plan-outline-task",
74
+ 'data-slot': 'plan-outline-task',
75
+ 'data-kind': group ? 'group' : 'task',
76
+ 'data-mark': task.mark,
77
+ 'data-level': level,
78
+ className: 'sprout-plan-outline-task',
96
79
  };
97
80
  if (!hasDetail)
98
81
  return (_jsx("li", { ...rowProps, children: _jsx("div", { className: "sprout-plan-outline-row", children: head }) }));
99
- return (_jsxs(Collapsible.Root, { defaultOpen: group, render: _jsx("li", { ...rowProps }), children: [_jsx(Collapsible.Trigger, { className: "sprout-plan-outline-row sprout-plan-outline-trigger", children: head }), _jsx(Collapsible.Panel, { hiddenUntilFound: group, "data-slot": "plan-outline-panel", className: "sprout-plan-outline-panel", children: group ? (_jsxs(_Fragment, { children: [task.brief && (_jsx("p", { className: "sprout-plan-outline-group-brief", children: task.brief })), task.children.length ? (_jsx(TaskList, { tasks: task.children, label: `${task.title} tasks`, level: level + 1 })) : (_jsx("p", { className: "sprout-plan-outline-group-empty", children: "This group has no tasks yet." }))] })) : (_jsx(TaskDetail, { task: task })) })] }));
82
+ return (_jsxs(Collapsible.Root, { defaultOpen: group, render: _jsx("li", { ...rowProps }), children: [_jsx(Collapsible.Trigger, { className: "sprout-plan-outline-row sprout-plan-outline-trigger", children: head }), _jsx(Collapsible.Panel, { hiddenUntilFound: group, "data-slot": "plan-outline-panel", className: "sprout-plan-outline-panel", children: group ? (_jsxs(_Fragment, { children: [task.brief && _jsx("p", { className: "sprout-plan-outline-group-brief", children: task.brief }), task.children.length ? (_jsx(TaskList, { tasks: task.children, label: `${task.title} tasks`, level: level + 1 })) : (_jsx("p", { className: "sprout-plan-outline-group-empty", children: "This group has no tasks yet." }))] })) : (_jsx(TaskDetail, { task: task })) })] }));
100
83
  }
101
84
  // The browser follows the link, which also opens a closed group; then focus moves to the row.
102
85
  function followDependency(target) {
@@ -104,5 +87,5 @@ function followDependency(target) {
104
87
  }
105
88
  function TaskDetail({ task }) {
106
89
  const taskId = useTaskId();
107
- return (_jsxs("div", { "data-slot": "plan-outline-detail", className: "sprout-plan-outline-detail", children: [task.reason && (_jsx("p", { className: "sprout-plan-outline-reason", children: task.reason })), task.brief && (_jsx("p", { className: "sprout-plan-outline-task-brief", children: task.brief })), !!task.criteria?.length && (_jsxs("div", { className: "sprout-plan-outline-field", children: [_jsx("p", { className: "sprout-plan-outline-field-title", children: "Done when" }), _jsx("ul", { className: "sprout-plan-outline-criteria", children: task.criteria.map((item, index) => (_jsx("li", { children: item }, index))) })] })), !!task.dependencies?.length && (_jsxs("div", { className: "sprout-plan-outline-field", children: [_jsx("p", { className: "sprout-plan-outline-field-title", children: "Starts after" }), _jsx("ul", { className: "sprout-plan-outline-dependencies", children: task.dependencies.map((dependency) => (_jsxs("li", { children: [_jsx("a", { href: `#${taskId(dependency.id)}`, onClick: () => followDependency(taskId(dependency.id)), className: "sprout-plan-outline-link", children: dependency.title }), _jsx("span", { className: "sprout-plan-outline-dependency-label", children: dependency.label })] }, dependency.id))) })] })), task.action && (_jsx("div", { className: "sprout-plan-outline-action", children: task.action }))] }));
90
+ return (_jsxs("div", { "data-slot": "plan-outline-detail", className: "sprout-plan-outline-detail", children: [task.reason && _jsx("p", { className: "sprout-plan-outline-reason", children: task.reason }), task.brief && _jsx("p", { className: "sprout-plan-outline-task-brief", children: task.brief }), !!task.criteria?.length && (_jsxs("div", { className: "sprout-plan-outline-field", children: [_jsx("p", { className: "sprout-plan-outline-field-title", children: "Done when" }), _jsx("ul", { className: "sprout-plan-outline-criteria", children: task.criteria.map((item, index) => (_jsx("li", { children: item }, index))) })] })), !!task.dependencies?.length && (_jsxs("div", { className: "sprout-plan-outline-field", children: [_jsx("p", { className: "sprout-plan-outline-field-title", children: "Starts after" }), _jsx("ul", { className: "sprout-plan-outline-dependencies", children: task.dependencies.map(dependency => (_jsxs("li", { children: [_jsx("a", { href: `#${taskId(dependency.id)}`, onClick: () => followDependency(taskId(dependency.id)), className: "sprout-plan-outline-link", children: dependency.title }), _jsx("span", { className: "sprout-plan-outline-dependency-label", children: dependency.label })] }, dependency.id))) })] })), task.action && _jsx("div", { className: "sprout-plan-outline-action", children: task.action })] }));
108
91
  }
@@ -1,12 +1,12 @@
1
- import type { ComponentProps } from "react";
2
- import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
1
+ import type { ComponentProps } from 'react';
2
+ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
3
3
  export declare const popoverContentSizeNames: readonly ["default", "menu", "picker", "panel", "work-list", "app-actions", "bud"];
4
4
  export type PopoverContentSize = (typeof popoverContentSizeNames)[number];
5
5
  export type PopoverProps = PopoverPrimitive.Root.Props;
6
6
  export declare function Popover(props: PopoverProps): import("react").JSX.Element;
7
7
  export type PopoverTriggerProps = PopoverPrimitive.Trigger.Props;
8
8
  export declare function PopoverTrigger(props: PopoverTriggerProps): import("react").JSX.Element;
9
- type PositionerProps = Pick<PopoverPrimitive.Positioner.Props, "align" | "alignOffset" | "side" | "sideOffset" | "anchor" | "collisionPadding" | "collisionAvoidance" | "sticky" | "positionMethod">;
9
+ type PositionerProps = Pick<PopoverPrimitive.Positioner.Props, 'align' | 'alignOffset' | 'side' | 'sideOffset' | 'anchor' | 'collisionPadding' | 'collisionAvoidance' | 'sticky' | 'positionMethod'>;
10
10
  export interface PopoverContentProps extends PopoverPrimitive.Popup.Props, PositionerProps {
11
11
  /**
12
12
  * `default` is an 18rem padded panel for text. `menu`, `picker`, and `panel`
@@ -16,16 +16,16 @@ export interface PopoverContentProps extends PopoverPrimitive.Popup.Props, Posit
16
16
  */
17
17
  size?: PopoverContentSize;
18
18
  /** Keep the content in the DOM while closed, for example to preserve chat state. */
19
- keepMounted?: PopoverPrimitive.Portal.Props["keepMounted"];
19
+ keepMounted?: PopoverPrimitive.Portal.Props['keepMounted'];
20
20
  /** Where the portal renders. Defaults to `document.body`. */
21
- container?: PopoverPrimitive.Portal.Props["container"];
21
+ container?: PopoverPrimitive.Portal.Props['container'];
22
22
  }
23
23
  /**
24
24
  * The floating panel. It renders its own portal and positioner, so place it
25
25
  * directly inside `Popover`.
26
26
  */
27
27
  export declare function PopoverContent({ align, alignOffset, side, sideOffset, collisionPadding, collisionAvoidance, sticky, positionMethod, anchor, size, keepMounted, container, className, ...props }: PopoverContentProps): import("react").JSX.Element;
28
- export type PopoverHeaderProps = ComponentProps<"div">;
28
+ export type PopoverHeaderProps = ComponentProps<'div'>;
29
29
  export declare function PopoverHeader({ className, ...props }: PopoverHeaderProps): import("react").JSX.Element;
30
30
  export type PopoverTitleProps = PopoverPrimitive.Title.Props;
31
31
  export declare function PopoverTitle({ className, ...props }: PopoverTitleProps): import("react").JSX.Element;
@@ -1,15 +1,15 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx } from "react/jsx-runtime";
3
- import { Popover as PopoverPrimitive } from "@base-ui/react/popover";
4
- import { cn, stateClassName } from "../internal/classes.js";
3
+ import { Popover as PopoverPrimitive } from '@base-ui/react/popover';
4
+ import { cn, stateClassName } from '../internal/classes.js';
5
5
  export const popoverContentSizeNames = [
6
- "default",
7
- "menu",
8
- "picker",
9
- "panel",
10
- "work-list",
11
- "app-actions",
12
- "bud",
6
+ 'default',
7
+ 'menu',
8
+ 'picker',
9
+ 'panel',
10
+ 'work-list',
11
+ 'app-actions',
12
+ 'bud',
13
13
  ];
14
14
  export function Popover(props) {
15
15
  return _jsx(PopoverPrimitive.Root, { "data-slot": "popover", ...props });
@@ -21,15 +21,15 @@ export function PopoverTrigger(props) {
21
21
  * The floating panel. It renders its own portal and positioner, so place it
22
22
  * directly inside `Popover`.
23
23
  */
24
- export function PopoverContent({ align = "center", alignOffset = 0, side = "bottom", sideOffset = 4, collisionPadding = 8, collisionAvoidance, sticky, positionMethod, anchor, size = "default", keepMounted = false, container, className, ...props }) {
25
- return (_jsx(PopoverPrimitive.Portal, { keepMounted: keepMounted, container: container, children: _jsx(PopoverPrimitive.Positioner, { className: "sprout-popover-positioner", anchor: anchor, align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: collisionPadding, collisionAvoidance: collisionAvoidance, sticky: sticky, positionMethod: positionMethod, children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", "data-size": size, ...props, className: stateClassName(cn("sprout-popover-content", `sprout-popover-${size}`), className) }) }) }));
24
+ export function PopoverContent({ align = 'center', alignOffset = 0, side = 'bottom', sideOffset = 4, collisionPadding = 8, collisionAvoidance, sticky, positionMethod, anchor, size = 'default', keepMounted = false, container, className, ...props }) {
25
+ return (_jsx(PopoverPrimitive.Portal, { keepMounted: keepMounted, container: container, children: _jsx(PopoverPrimitive.Positioner, { className: "sprout-popover-positioner", anchor: anchor, align: align, alignOffset: alignOffset, side: side, sideOffset: sideOffset, collisionPadding: collisionPadding, collisionAvoidance: collisionAvoidance, sticky: sticky, positionMethod: positionMethod, children: _jsx(PopoverPrimitive.Popup, { "data-slot": "popover-content", "data-size": size, ...props, className: stateClassName(cn('sprout-popover-content', `sprout-popover-${size}`), className) }) }) }));
26
26
  }
27
27
  export function PopoverHeader({ className, ...props }) {
28
- return (_jsx("div", { "data-slot": "popover-header", ...props, className: cn("sprout-popover-header", className) }));
28
+ return _jsx("div", { "data-slot": "popover-header", ...props, className: cn('sprout-popover-header', className) });
29
29
  }
30
30
  export function PopoverTitle({ className, ...props }) {
31
- return (_jsx(PopoverPrimitive.Title, { "data-slot": "popover-title", ...props, className: stateClassName("sprout-popover-title", className) }));
31
+ return (_jsx(PopoverPrimitive.Title, { "data-slot": "popover-title", ...props, className: stateClassName('sprout-popover-title', className) }));
32
32
  }
33
33
  export function PopoverDescription({ className, ...props }) {
34
- return (_jsx(PopoverPrimitive.Description, { "data-slot": "popover-description", ...props, className: stateClassName("sprout-popover-description", className) }));
34
+ return (_jsx(PopoverPrimitive.Description, { "data-slot": "popover-description", ...props, className: stateClassName('sprout-popover-description', className) }));
35
35
  }
@@ -1,5 +1,5 @@
1
- import type { ComponentProps, ReactNode } from "react";
2
- export interface PresenceCursorProps extends Omit<ComponentProps<"div">, "children" | "color"> {
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ export interface PresenceCursorProps extends Omit<ComponentProps<'div'>, 'children' | 'color'> {
3
3
  /** The person's name or email. Shown in the tag, or read out with an avatar. */
4
4
  name: string;
5
5
  /** Left offset of the arrow tip in px, from the positioned parent. */
@@ -1,13 +1,13 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
- import { cn } from "../internal/classes.js";
2
+ import { cn } from '../internal/classes.js';
3
3
  /**
4
4
  * Another person's pointer on a shared surface, with a name tag or an avatar.
5
5
  * Put it in a parent with `position: relative`. It ignores pointer events and
6
6
  * glides between positions unless reduced motion is requested.
7
7
  */
8
8
  export function PresenceCursor({ name, x, y, color, avatar, className, style, ...props }) {
9
- return (_jsxs("div", { "data-slot": "presence-cursor", role: "img", "aria-label": name, className: cn("sprout-presence-cursor", className), style: {
10
- "--sprout-presence-color": color,
9
+ return (_jsxs("div", { "data-slot": "presence-cursor", role: "img", "aria-label": name, className: cn('sprout-presence-cursor', className), style: {
10
+ '--sprout-presence-color': color,
11
11
  transform: `translate(${x}px, ${y}px)`,
12
12
  ...style,
13
13
  }, ...props, children: [_jsx("svg", { className: "sprout-presence-cursor-arrow", viewBox: "0 0 16 16", "aria-hidden": "true", children: _jsx("path", { d: "M1.5 1.5 14.5 6.6 8.4 8.4 6.6 14.5Z" }) }), avatar != null ? (_jsx("span", { "data-slot": "presence-cursor-avatar", className: "sprout-presence-cursor-avatar", "aria-hidden": "true", children: avatar })) : (_jsx("span", { "data-slot": "presence-cursor-label", className: "sprout-presence-cursor-label", "aria-hidden": "true", children: name }))] }));
@@ -1,4 +1,4 @@
1
- import { Progress as BaseProgress } from "@base-ui/react/progress";
1
+ import { Progress as BaseProgress } from '@base-ui/react/progress';
2
2
  export type ProgressProps = BaseProgress.Root.Props;
3
3
  /**
4
4
  * A bar that shows how far a task has come. Pass a number to `value`, or
@@ -1,7 +1,7 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { Progress as BaseProgress } from "@base-ui/react/progress";
4
- import { stateClassName } from "../internal/classes.js";
3
+ import { Progress as BaseProgress } from '@base-ui/react/progress';
4
+ import { stateClassName } from '../internal/classes.js';
5
5
  /**
6
6
  * A bar that shows how far a task has come. Pass a number to `value`, or
7
7
  * `null` while the amount is unknown. Children, such as `ProgressLabel` and
@@ -9,27 +9,27 @@ import { stateClassName } from "../internal/classes.js";
9
9
  * `ProgressLabel` or `aria-label`.
10
10
  */
11
11
  export function Progress({ className, children, ...props }) {
12
- return (_jsxs(BaseProgress.Root, { "data-slot": "progress", ...props, className: stateClassName("sprout-progress", className), children: [children, _jsx(ProgressTrack, { children: _jsx(ProgressIndicator, {}) })] }));
12
+ return (_jsxs(BaseProgress.Root, { "data-slot": "progress", ...props, className: stateClassName('sprout-progress', className), children: [children, _jsx(ProgressTrack, { children: _jsx(ProgressIndicator, {}) })] }));
13
13
  }
14
14
  /** The 4px rail behind the indicator. `Progress` renders one for you. */
15
15
  export function ProgressTrack({ className, ...props }) {
16
- return (_jsx(BaseProgress.Track, { "data-slot": "progress-track", ...props, className: stateClassName("sprout-progress-track", className) }));
16
+ return (_jsx(BaseProgress.Track, { "data-slot": "progress-track", ...props, className: stateClassName('sprout-progress-track', className) }));
17
17
  }
18
18
  /**
19
19
  * The filled part of the track. Its width follows the value; with a `null`
20
20
  * value it slides across the track instead.
21
21
  */
22
22
  export function ProgressIndicator({ className, ...props }) {
23
- return (_jsx(BaseProgress.Indicator, { "data-slot": "progress-indicator", ...props, className: stateClassName("sprout-progress-indicator", className) }));
23
+ return (_jsx(BaseProgress.Indicator, { "data-slot": "progress-indicator", ...props, className: stateClassName('sprout-progress-indicator', className) }));
24
24
  }
25
25
  /** A visible name for the bar. It labels the `progressbar` for you. */
26
26
  export function ProgressLabel({ className, ...props }) {
27
- return (_jsx(BaseProgress.Label, { "data-slot": "progress-label", ...props, className: stateClassName("sprout-progress-label", className) }));
27
+ return (_jsx(BaseProgress.Label, { "data-slot": "progress-label", ...props, className: stateClassName('sprout-progress-label', className) }));
28
28
  }
29
29
  /**
30
30
  * The formatted value, such as “40%”, at the end of the label row. It is
31
31
  * empty while the value is `null`. Pass a function child to show other text.
32
32
  */
33
33
  export function ProgressValue({ className, ...props }) {
34
- return (_jsx(BaseProgress.Value, { "data-slot": "progress-value", ...props, className: stateClassName("sprout-progress-value", className) }));
34
+ return (_jsx(BaseProgress.Value, { "data-slot": "progress-value", ...props, className: stateClassName('sprout-progress-value', className) }));
35
35
  }
@@ -1,5 +1,5 @@
1
- import { type ComponentProps, type ReactNode } from "react";
2
- import { type BrandStackItem } from "./brand-icon.js";
1
+ import { type ComponentProps, type ReactNode } from 'react';
2
+ import { type BrandStackItem } from './brand-icon.js';
3
3
  export interface PromptListItem {
4
4
  id: string;
5
5
  /** One line. Long labels are cut with an ellipsis and shown in full on hover. */
@@ -9,7 +9,7 @@ export interface PromptListItem {
9
9
  /** Apps the prompt uses, shown as overlapping tiles with tooltips. */
10
10
  brands?: readonly BrandStackItem[] | undefined;
11
11
  }
12
- export interface PromptListProps extends Omit<ComponentProps<"section">, "title" | "children" | "onSelect"> {
12
+ export interface PromptListProps extends Omit<ComponentProps<'section'>, 'title' | 'children' | 'onSelect'> {
13
13
  /** Names the list. Shown as a small heading unless `showTitle` is false. */
14
14
  title: string;
15
15
  /** Hide the heading but keep `title` as the list's accessible name. */
@@ -1,11 +1,11 @@
1
- "use client";
1
+ 'use client';
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { useId, } from "react";
4
- import { ArrowRight } from "reicon-react/icons/ArrowRight";
5
- import { cn } from "../internal/classes.js";
6
- import { BrandStack } from "./brand-icon.js";
3
+ import { useId } from 'react';
4
+ import { ArrowRight } from 'reicon-react/icons/ArrowRight';
5
+ import { cn } from '../internal/classes.js';
6
+ import { BrandStack } from './brand-icon.js';
7
7
  /** A titled list of one-line prompts. Choosing a row calls `onSelect` with its id. */
8
8
  export function PromptList({ title, showTitle = true, items, onSelect, disabled = false, className, ...props }) {
9
9
  const heading = useId();
10
- return (_jsxs("section", { "data-slot": "prompt-list", "data-disabled": disabled || undefined, ...props, "aria-labelledby": showTitle ? heading : undefined, "aria-label": showTitle ? undefined : title, className: cn("sprout-prompt-list", className), children: [showTitle && (_jsx("h3", { id: heading, className: "sprout-prompt-list-title", children: title })), _jsx("ul", { className: "sprout-prompt-list-items", children: items.map((item, index) => (_jsxs("li", { "data-slot": "prompt-list-item", className: "sprout-prompt-list-item", style: { "--sprout-prompt-index": index }, children: [_jsx("span", { "aria-hidden": "true", className: "sprout-prompt-list-icon", children: item.icon }), _jsx("button", { type: "button", disabled: disabled, title: item.label, onClick: () => onSelect(item.id), className: "sprout-prompt-list-button", children: item.label }), !!item.brands?.length && (_jsx(BrandStack, { brands: item.brands, className: "sprout-prompt-list-brands" })), _jsx(ArrowRight, { "aria-hidden": "true", className: "sprout-prompt-list-arrow" })] }, item.id))) })] }));
10
+ return (_jsxs("section", { "data-slot": "prompt-list", "data-disabled": disabled || undefined, ...props, "aria-labelledby": showTitle ? heading : undefined, "aria-label": showTitle ? undefined : title, className: cn('sprout-prompt-list', className), children: [showTitle && (_jsx("h3", { id: heading, className: "sprout-prompt-list-title", children: title })), _jsx("ul", { className: "sprout-prompt-list-items", children: items.map((item, index) => (_jsxs("li", { "data-slot": "prompt-list-item", className: "sprout-prompt-list-item", style: { '--sprout-prompt-index': index }, children: [_jsx("span", { "aria-hidden": "true", className: "sprout-prompt-list-icon", children: item.icon }), _jsx("button", { type: "button", disabled: disabled, title: item.label, onClick: () => onSelect(item.id), className: "sprout-prompt-list-button", children: item.label }), !!item.brands?.length && _jsx(BrandStack, { brands: item.brands, className: "sprout-prompt-list-brands" }), _jsx(ArrowRight, { "aria-hidden": "true", className: "sprout-prompt-list-arrow" })] }, item.id))) })] }));
11
11
  }