@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,14 +1,14 @@
1
- import { codeLanguageAliases, codeLanguageFilenames, } from "./languages.js";
2
- const plain = new Set(["text", "txt", "plain", "plaintext"]);
1
+ import { codeLanguageAliases, codeLanguageFilenames } from './languages.js';
2
+ const plain = new Set(['text', 'txt', 'plain', 'plaintext']);
3
3
  /** The Shiki language for a file name, from its whole name or its extension. */
4
4
  export function languageForFilename(name) {
5
- const base = (name.split(/[\\/]/).at(-1) ?? "").toLowerCase();
5
+ const base = (name.split(/[\\/]/).at(-1) ?? '').toLowerCase();
6
6
  const whole = codeLanguageFilenames[base];
7
7
  if (whole)
8
8
  return whole;
9
- if (base.startsWith(".env."))
10
- return "dotenv";
11
- const dot = base.lastIndexOf(".");
9
+ if (base.startsWith('.env.'))
10
+ return 'dotenv';
11
+ const dot = base.lastIndexOf('.');
12
12
  return dot < 0 ? null : (codeLanguageAliases[base.slice(dot + 1)] ?? null);
13
13
  }
14
14
  /** Resolves a language name or alias, falling back to the file name. `null` means plain text. */
@@ -25,71 +25,60 @@ const role = (name) => `var(--sprout-syntax-token-${name})`;
25
25
  // Shiki's CSS-variables theme leaves prose markup in the foreground color, so Markdown and diffs read as plain text.
26
26
  const markupRules = [
27
27
  {
28
- scope: [
29
- "markup.heading",
30
- "entity.name.section",
31
- "punctuation.definition.heading",
32
- ],
33
- settings: { foreground: role("heading"), fontStyle: "bold" },
28
+ scope: ['markup.heading', 'entity.name.section', 'punctuation.definition.heading'],
29
+ settings: { foreground: role('heading'), fontStyle: 'bold' },
34
30
  },
35
31
  {
36
32
  scope: [
37
- "punctuation.definition.list.begin",
38
- "beginning.punctuation.definition.list",
39
- "punctuation.definition.list",
33
+ 'punctuation.definition.list.begin',
34
+ 'beginning.punctuation.definition.list',
35
+ 'punctuation.definition.list',
40
36
  ],
41
- settings: { foreground: role("constant") },
37
+ settings: { foreground: role('constant') },
42
38
  },
43
39
  {
44
40
  scope: [
45
- "punctuation.definition.bold",
46
- "punctuation.definition.italic",
47
- "punctuation.definition.strikethrough",
48
- "punctuation.definition.quote.begin",
49
- "meta.separator",
41
+ 'punctuation.definition.bold',
42
+ 'punctuation.definition.italic',
43
+ 'punctuation.definition.strikethrough',
44
+ 'punctuation.definition.quote.begin',
45
+ 'meta.separator',
50
46
  ],
51
- settings: { foreground: role("punctuation") },
47
+ settings: { foreground: role('punctuation') },
52
48
  },
53
49
  {
54
- scope: ["markup.quote"],
55
- settings: { foreground: role("comment"), fontStyle: "italic" },
50
+ scope: ['markup.quote'],
51
+ settings: { foreground: role('comment'), fontStyle: 'italic' },
56
52
  },
57
53
  {
58
- scope: ["markup.inline.raw", "markup.fenced_code", "markup.raw"],
59
- settings: { foreground: role("string") },
54
+ scope: ['markup.inline.raw', 'markup.fenced_code', 'markup.raw'],
55
+ settings: { foreground: role('string') },
60
56
  },
61
57
  {
62
- scope: ["fenced_code.block.language"],
63
- settings: { foreground: role("keyword") },
58
+ scope: ['fenced_code.block.language'],
59
+ settings: { foreground: role('keyword') },
64
60
  },
65
61
  {
66
- scope: ["markup.inserted", "punctuation.definition.inserted"],
67
- settings: { foreground: role("inserted") },
62
+ scope: ['markup.inserted', 'punctuation.definition.inserted'],
63
+ settings: { foreground: role('inserted') },
68
64
  },
69
65
  {
70
- scope: ["markup.deleted", "punctuation.definition.deleted"],
71
- settings: { foreground: role("deleted") },
66
+ scope: ['markup.deleted', 'punctuation.definition.deleted'],
67
+ settings: { foreground: role('deleted') },
72
68
  },
73
69
  {
74
- scope: [
75
- "meta.diff.range",
76
- "punctuation.definition.range.diff",
77
- "meta.diff.header",
78
- ],
79
- settings: { foreground: role("keyword") },
70
+ scope: ['meta.diff.range', 'punctuation.definition.range.diff', 'meta.diff.header'],
71
+ settings: { foreground: role('keyword') },
80
72
  },
81
73
  ];
82
74
  let highlighter;
83
75
  let starting;
84
76
  const loading = new Map();
85
77
  function start() {
86
- starting ??= Promise.all([
87
- import("shiki/core"),
88
- import("shiki/engine/javascript"),
89
- ]).then(async ([{ createHighlighterCore, createCssVariablesTheme }, { createJavaScriptRegexEngine },]) => {
78
+ starting ??= Promise.all([import('shiki/core'), import('shiki/engine/javascript')]).then(async ([{ createHighlighterCore, createCssVariablesTheme }, { createJavaScriptRegexEngine }]) => {
90
79
  const theme = createCssVariablesTheme({
91
- name: "sprout",
92
- variablePrefix: "--sprout-syntax-",
80
+ name: 'sprout',
81
+ variablePrefix: '--sprout-syntax-',
93
82
  fontStyle: true,
94
83
  });
95
84
  theme.tokenColors = [...(theme.tokenColors ?? []), ...markupRules];
@@ -105,7 +94,7 @@ function start() {
105
94
  export function loadCodeLanguage(language) {
106
95
  let loaded = loading.get(language);
107
96
  if (!loaded) {
108
- loaded = Promise.all([start(), import("shiki/langs")]).then(([core, { bundledLanguages }]) => core.loadLanguage(bundledLanguages[language]));
97
+ loaded = Promise.all([start(), import('shiki/langs')]).then(([core, { bundledLanguages }]) => core.loadLanguage(bundledLanguages[language]));
109
98
  loading.set(language, loaded);
110
99
  loaded.catch(() => loading.delete(language));
111
100
  }
@@ -113,7 +102,7 @@ export function loadCodeLanguage(language) {
113
102
  }
114
103
  /** Languages a file needs beyond its own, such as the fences inside Markdown. */
115
104
  export function embeddedLanguages(code, language) {
116
- if (language !== "markdown" && language !== "mdx")
105
+ if (language !== 'markdown' && language !== 'mdx')
117
106
  return [];
118
107
  const found = new Set();
119
108
  for (const [, name] of code.matchAll(/^\s*(?:```|~~~)\s*([\w#+.-]+)/gm)) {
@@ -132,6 +121,6 @@ export function codeTokens(code, language) {
132
121
  return null;
133
122
  return highlighter.codeToTokensBase(code, {
134
123
  lang: language,
135
- theme: "sprout",
124
+ theme: 'sprout',
136
125
  });
137
126
  }
@@ -68,7 +68,7 @@
68
68
  font-size: var(--sprout-text-sm);
69
69
  line-height: 1.25rem;
70
70
  }
71
- .sprout-accordion-content[hidden]:not([hidden="until-found"]) {
71
+ .sprout-accordion-content[hidden]:not([hidden='until-found']) {
72
72
  display: none;
73
73
  }
74
74
  .sprout-accordion-content[data-starting-style],
@@ -91,12 +91,10 @@
91
91
 
92
92
  @media (prefers-reduced-motion: no-preference) {
93
93
  .sprout-accordion-trigger-icon {
94
- transition: transform var(--sprout-motion-fast, 120ms)
95
- var(--sprout-motion-ease, ease-out);
94
+ transition: transform var(--sprout-motion-fast, 120ms) var(--sprout-motion-ease, ease-out);
96
95
  }
97
96
  .sprout-accordion-content {
98
- transition: height var(--sprout-motion-normal, 180ms)
99
- var(--sprout-motion-ease, ease-out);
97
+ transition: height var(--sprout-motion-normal, 180ms) var(--sprout-motion-ease, ease-out);
100
98
  }
101
99
  }
102
100
  }
@@ -13,11 +13,43 @@
13
13
  --sprout-on-primary: inherit;
14
14
  --sprout-danger: inherit;
15
15
  --sprout-danger-subtle: inherit;
16
+ --sprout-indigo: inherit;
17
+ --sprout-green: inherit;
18
+ --sprout-orange: inherit;
19
+ --sprout-red: inherit;
20
+ --sprout-sky: inherit;
21
+ --sprout-purple: inherit;
22
+ --sprout-yellow: inherit;
23
+ --sprout-teal: inherit;
24
+ --sprout-blue: inherit;
25
+ --sprout-tan: inherit;
16
26
  --sprout-chart-1: inherit;
17
27
  --sprout-chart-2: inherit;
18
28
  --sprout-chart-3: inherit;
19
29
  --sprout-chart-4: inherit;
20
30
  --sprout-chart-5: inherit;
31
+ --sprout-chart-6: inherit;
32
+ --sprout-chart-7: inherit;
33
+ --sprout-chart-8: inherit;
34
+ --sprout-chart-9: inherit;
35
+ --sprout-chart-10: inherit;
36
+ --sprout-agent-fanout-check: inherit;
37
+ }
38
+
39
+ :root,
40
+ .light {
41
+ --sprout-agent-fanout-check: var(--sprout-surface);
42
+ }
43
+
44
+ /* The dark surface reads faint on the bright dark-mode fills. */
45
+ .dark {
46
+ --sprout-agent-fanout-check: #000;
47
+ }
48
+
49
+ @media (prefers-color-scheme: dark) {
50
+ :root:not(.light):not(.dark) {
51
+ --sprout-agent-fanout-check: #000;
52
+ }
21
53
  }
22
54
  }
23
55
 
@@ -139,7 +171,7 @@
139
171
  background: var(--sprout-primary);
140
172
  color: var(--sprout-on-primary);
141
173
  }
142
- .sprout-agent-fanout-root[data-state="stopped"] {
174
+ .sprout-agent-fanout-root[data-state='stopped'] {
143
175
  background: var(--sprout-hover);
144
176
  color: var(--sprout-muted);
145
177
  box-shadow: inset 0 0 0 1px var(--sprout-line);
@@ -173,48 +205,35 @@
173
205
  z-index: -1;
174
206
  inset: calc(var(--sprout-agent-fanout-dot) * -0.27);
175
207
  border-radius: 50%;
176
- background: color-mix(
177
- in oklab,
178
- var(--sprout-agent-fanout-color) 14%,
179
- transparent
180
- );
181
- content: "";
208
+ background: color-mix(in oklab, var(--sprout-agent-fanout-color) 14%, transparent);
209
+ content: '';
182
210
  opacity: 0;
183
211
  }
184
212
  .sprout-agent-fanout-node {
185
213
  isolation: isolate;
186
214
  }
187
- .sprout-agent-fanout-node[data-status="queued"] .sprout-agent-fanout-dot {
215
+ .sprout-agent-fanout-node[data-status='queued'] .sprout-agent-fanout-dot {
188
216
  color: color-mix(in oklab, var(--sprout-muted) 70%, var(--sprout-surface));
189
217
  }
190
- .sprout-agent-fanout-node[data-status="working"] .sprout-agent-fanout-dot {
218
+ .sprout-agent-fanout-node[data-status='working'] .sprout-agent-fanout-dot {
191
219
  border-color: var(--sprout-agent-fanout-color);
192
- background: color-mix(
193
- in oklab,
194
- var(--sprout-agent-fanout-color) 6%,
195
- var(--sprout-surface)
196
- );
197
- color: color-mix(
198
- in oklab,
199
- var(--sprout-agent-fanout-color) 78%,
200
- var(--sprout-text)
201
- );
202
- }
203
- .sprout-agent-fanout-node[data-status="working"]
204
- .sprout-agent-fanout-dot::before {
220
+ background: color-mix(in oklab, var(--sprout-agent-fanout-color) 6%, var(--sprout-surface));
221
+ color: color-mix(in oklab, var(--sprout-agent-fanout-color) 78%, var(--sprout-text));
222
+ }
223
+ .sprout-agent-fanout-node[data-status='working'] .sprout-agent-fanout-dot::before {
205
224
  opacity: 1;
206
225
  }
207
- .sprout-agent-fanout-node[data-status="done"] .sprout-agent-fanout-dot {
226
+ .sprout-agent-fanout-node[data-status='done'] .sprout-agent-fanout-dot {
208
227
  border-color: var(--sprout-agent-fanout-color);
209
228
  background: var(--sprout-agent-fanout-color);
210
- color: var(--sprout-surface);
229
+ color: var(--sprout-agent-fanout-check);
211
230
  }
212
- .sprout-agent-fanout-node[data-status="failed"] .sprout-agent-fanout-dot {
231
+ .sprout-agent-fanout-node[data-status='failed'] .sprout-agent-fanout-dot {
213
232
  border-color: var(--sprout-danger);
214
233
  background: var(--sprout-danger-subtle);
215
234
  color: var(--sprout-danger);
216
235
  }
217
- .sprout-agent-fanout-node[data-status="stopped"] .sprout-agent-fanout-dot {
236
+ .sprout-agent-fanout-node[data-status='stopped'] .sprout-agent-fanout-dot {
218
237
  border-color: var(--sprout-border);
219
238
  opacity: 0.6;
220
239
  }
@@ -301,19 +320,13 @@
301
320
  font-variant-numeric: tabular-nums;
302
321
  white-space: nowrap;
303
322
  }
304
- .sprout-agent-fanout-row[data-status="working"]
305
- .sprout-agent-fanout-row-status {
306
- color: color-mix(
307
- in oklab,
308
- var(--sprout-agent-fanout-color) 72%,
309
- var(--sprout-text)
310
- );
323
+ .sprout-agent-fanout-row[data-status='working'] .sprout-agent-fanout-row-status {
324
+ color: color-mix(in oklab, var(--sprout-agent-fanout-color) 72%, var(--sprout-text));
311
325
  }
312
- .sprout-agent-fanout-row[data-status="done"] .sprout-agent-fanout-row-status {
326
+ .sprout-agent-fanout-row[data-status='done'] .sprout-agent-fanout-row-status {
313
327
  color: var(--sprout-text);
314
328
  }
315
- .sprout-agent-fanout-row[data-status="failed"]
316
- .sprout-agent-fanout-row-status {
329
+ .sprout-agent-fanout-row[data-status='failed'] .sprout-agent-fanout-row-status {
317
330
  color: var(--sprout-danger);
318
331
  }
319
332
  .sprout-agent-fanout-pulse {
@@ -363,21 +376,18 @@
363
376
  }
364
377
 
365
378
  @media (prefers-reduced-motion: no-preference) {
366
- .sprout-agent-fanout-trail[data-trip="out"] {
367
- animation: sprout-agent-fanout-out var(--sprout-agent-fanout-trip)
368
- var(--sprout-agent-fanout-trip-ease) both;
379
+ .sprout-agent-fanout-trail[data-trip='out'] {
380
+ animation: sprout-agent-fanout-out var(--sprout-agent-fanout-trip) var(--sprout-agent-fanout-trip-ease) both;
369
381
  }
370
- .sprout-agent-fanout-trail[data-trip="back"] {
371
- animation: sprout-agent-fanout-back var(--sprout-agent-fanout-trip)
372
- var(--sprout-agent-fanout-trip-ease) both;
382
+ .sprout-agent-fanout-trail[data-trip='back'] {
383
+ animation: sprout-agent-fanout-back var(--sprout-agent-fanout-trip) var(--sprout-agent-fanout-trip-ease) both;
373
384
  }
374
- .sprout-agent-fanout-comet[data-trip="out"] {
375
- animation: sprout-agent-fanout-comet-out var(--sprout-agent-fanout-trip)
376
- var(--sprout-agent-fanout-trip-ease) both;
385
+ .sprout-agent-fanout-comet[data-trip='out'] {
386
+ animation: sprout-agent-fanout-comet-out var(--sprout-agent-fanout-trip) var(--sprout-agent-fanout-trip-ease) both;
377
387
  }
378
- .sprout-agent-fanout-comet[data-trip="back"] {
379
- animation: sprout-agent-fanout-comet-back var(--sprout-agent-fanout-trip)
380
- var(--sprout-agent-fanout-trip-ease) both;
388
+ .sprout-agent-fanout-comet[data-trip='back'] {
389
+ animation: sprout-agent-fanout-comet-back var(--sprout-agent-fanout-trip) var(--sprout-agent-fanout-trip-ease)
390
+ both;
381
391
  }
382
392
 
383
393
  .sprout-agent-fanout-dot,
@@ -389,19 +399,15 @@
389
399
  opacity 240ms var(--sprout-motion-ease);
390
400
  }
391
401
  /* The node lights up when the pulse lands, not when it leaves. */
392
- .sprout-agent-fanout-node[data-status="working"][data-changed]
393
- .sprout-agent-fanout-dot,
394
- .sprout-agent-fanout-node[data-status="working"][data-changed]
395
- .sprout-agent-fanout-dot::before {
402
+ .sprout-agent-fanout-node[data-status='working'][data-changed] .sprout-agent-fanout-dot,
403
+ .sprout-agent-fanout-node[data-status='working'][data-changed] .sprout-agent-fanout-dot::before {
396
404
  transition-delay: calc(var(--sprout-agent-fanout-trip) * 0.85);
397
405
  }
398
- .sprout-agent-fanout-node[data-status="working"]
399
- .sprout-agent-fanout-dot::before {
406
+ .sprout-agent-fanout-node[data-status='working'] .sprout-agent-fanout-dot::before {
400
407
  animation: sprout-agent-fanout-breathe 1.6s ease-in-out infinite alternate;
401
408
  animation-delay: calc(var(--sprout-agent-fanout-index) * -0.55s);
402
409
  }
403
- .sprout-agent-fanout-node[data-status="done"][data-changed]
404
- .sprout-agent-fanout-dot {
410
+ .sprout-agent-fanout-node[data-status='done'][data-changed] .sprout-agent-fanout-dot {
405
411
  animation: sprout-agent-fanout-pop 420ms var(--sprout-motion-ease);
406
412
  }
407
413
  .sprout-agent-fanout-root[data-changed] {
@@ -504,8 +510,7 @@
504
510
  }
505
511
  @keyframes sprout-agent-fanout-ring {
506
512
  from {
507
- box-shadow: 0 0 0 0
508
- color-mix(in oklab, var(--sprout-primary) 28%, transparent);
513
+ box-shadow: 0 0 0 0 color-mix(in oklab, var(--sprout-primary) 28%, transparent);
509
514
  }
510
515
  to {
511
516
  box-shadow: 0 0 0 14px transparent;
@@ -513,8 +518,7 @@
513
518
  }
514
519
  @keyframes sprout-agent-fanout-pulse {
515
520
  0% {
516
- box-shadow: 0 0 0 0
517
- color-mix(in oklab, var(--sprout-agent-fanout-color) 45%, transparent);
521
+ box-shadow: 0 0 0 0 color-mix(in oklab, var(--sprout-agent-fanout-color) 45%, transparent);
518
522
  }
519
523
  100% {
520
524
  box-shadow: 0 0 0 5px transparent;
@@ -62,7 +62,7 @@
62
62
  background: var(--sprout-secondary);
63
63
  color: var(--sprout-text);
64
64
  }
65
- .sprout-alert-dialog-media > svg:not([class*="size-"]) {
65
+ .sprout-alert-dialog-media > svg:not([class*='size-']) {
66
66
  width: 24px;
67
67
  height: 24px;
68
68
  }
@@ -86,9 +86,7 @@
86
86
  text-wrap: pretty;
87
87
  }
88
88
  /* Title and description placed straight in the content read as one header. */
89
- .sprout-alert-dialog-content
90
- > .sprout-alert-dialog-title
91
- + .sprout-alert-dialog-description {
89
+ .sprout-alert-dialog-content > .sprout-alert-dialog-title + .sprout-alert-dialog-description {
92
90
  margin-top: -10px;
93
91
  }
94
92
  .sprout-alert-dialog-description a:not([data-slot]) {
@@ -106,57 +104,45 @@
106
104
  display: flex;
107
105
  flex-direction: column-reverse;
108
106
  gap: 8px;
109
- margin: 0 calc(var(--sprout-alert-dialog-padding) * -1)
110
- calc(var(--sprout-alert-dialog-padding) * -1);
107
+ margin: 0 calc(var(--sprout-alert-dialog-padding) * -1) calc(var(--sprout-alert-dialog-padding) * -1);
111
108
  padding: 12px 16px;
112
109
  border-top: 1px solid var(--sprout-line);
113
110
  border-end-start-radius: inherit;
114
111
  border-end-end-radius: inherit;
115
- background: color-mix(
116
- in oklab,
117
- var(--sprout-canvas) 70%,
118
- var(--sprout-surface)
119
- );
112
+ background: color-mix(in oklab, var(--sprout-canvas) 70%, var(--sprout-surface));
120
113
  }
121
- .sprout-alert-dialog-content[data-size="sm"] > .sprout-alert-dialog-footer {
114
+ .sprout-alert-dialog-content[data-size='sm'] > .sprout-alert-dialog-footer {
122
115
  display: grid;
123
116
  grid-auto-columns: minmax(0, 1fr);
124
117
  grid-auto-flow: column;
125
118
  }
126
- .sprout-alert-dialog-content[data-size="sm"]
127
- > .sprout-alert-dialog-footer
128
- > .sprout-button {
119
+ .sprout-alert-dialog-content[data-size='sm'] > .sprout-alert-dialog-footer > .sprout-button {
129
120
  min-width: 0;
130
121
  }
131
122
 
132
123
  @media (min-width: 40rem) {
133
- .sprout-alert-dialog-content[data-size="default"] {
124
+ .sprout-alert-dialog-content[data-size='default'] {
134
125
  max-width: 24rem;
135
126
  }
136
- .sprout-alert-dialog-content[data-size="default"]
137
- > .sprout-alert-dialog-header {
127
+ .sprout-alert-dialog-content[data-size='default'] > .sprout-alert-dialog-header {
138
128
  justify-items: start;
139
129
  text-align: start;
140
130
  }
141
- .sprout-alert-dialog-content[data-size="default"]
142
- > .sprout-alert-dialog-header:has(> .sprout-alert-dialog-media) {
131
+ .sprout-alert-dialog-content[data-size='default'] > .sprout-alert-dialog-header:has(> .sprout-alert-dialog-media) {
143
132
  grid-template-columns: auto minmax(0, 1fr);
144
133
  grid-template-rows: auto 1fr;
145
134
  column-gap: 16px;
146
135
  }
147
- .sprout-alert-dialog-content[data-size="default"]
148
- > .sprout-alert-dialog-header
149
- > .sprout-alert-dialog-media {
136
+ .sprout-alert-dialog-content[data-size='default'] > .sprout-alert-dialog-header > .sprout-alert-dialog-media {
150
137
  grid-row: span 2;
151
138
  margin-bottom: 0;
152
139
  }
153
- .sprout-alert-dialog-content[data-size="default"]
140
+ .sprout-alert-dialog-content[data-size='default']
154
141
  > .sprout-alert-dialog-header:has(> .sprout-alert-dialog-media)
155
142
  > :not(.sprout-alert-dialog-media) {
156
143
  grid-column-start: 2;
157
144
  }
158
- .sprout-alert-dialog-content[data-size="default"]
159
- > .sprout-alert-dialog-footer {
145
+ .sprout-alert-dialog-content[data-size='default'] > .sprout-alert-dialog-footer {
160
146
  flex-direction: row;
161
147
  flex-wrap: wrap;
162
148
  justify-content: flex-end;
@@ -20,7 +20,7 @@
20
20
  text-align: start;
21
21
  overflow-wrap: break-word;
22
22
  }
23
- .sprout-alert:has(> [data-slot="alert-action"]) {
23
+ .sprout-alert:has(> [data-slot='alert-action']) {
24
24
  padding-inline-end: 4.5rem;
25
25
  }
26
26
 
@@ -35,18 +35,18 @@
35
35
  flex-shrink: 0;
36
36
  pointer-events: none;
37
37
  }
38
- .sprout-alert > svg:not([class*="size-"]) {
38
+ .sprout-alert > svg:not([class*='size-']) {
39
39
  width: 16px;
40
40
  height: 16px;
41
41
  }
42
- .sprout-alert:has(> svg) > :not(svg, [data-slot="alert-action"]) {
42
+ .sprout-alert:has(> svg) > :not(svg, [data-slot='alert-action']) {
43
43
  grid-column-start: 2;
44
44
  }
45
45
 
46
46
  .sprout-alert > :is(p, pre) {
47
47
  margin: 0;
48
48
  }
49
- .sprout-alert > [data-slot="button"] {
49
+ .sprout-alert > [data-slot='button'] {
50
50
  justify-self: start;
51
51
  margin-top: 6px;
52
52
  }
@@ -68,12 +68,12 @@
68
68
  .sprout-alert-description p:not(:last-child) {
69
69
  margin-bottom: 1rem;
70
70
  }
71
- .sprout-alert-description > [data-slot="button"]:not([data-variant="link"]) {
71
+ .sprout-alert-description > [data-slot='button']:not([data-variant='link']) {
72
72
  display: flex;
73
73
  width: fit-content;
74
74
  margin-top: 8px;
75
75
  }
76
- .sprout-alert-description > [data-slot="button"][data-variant="link"] {
76
+ .sprout-alert-description > [data-slot='button'][data-variant='link'] {
77
77
  height: auto;
78
78
  margin-inline-start: 4px;
79
79
  padding: 0;
@@ -86,8 +86,7 @@
86
86
  text-decoration: underline;
87
87
  text-underline-offset: 3px;
88
88
  }
89
- :is(.sprout-alert-title, .sprout-alert-description)
90
- a:not([data-slot]):focus-visible {
89
+ :is(.sprout-alert-title, .sprout-alert-description) a:not([data-slot]):focus-visible {
91
90
  outline: var(--sprout-focus-width) solid var(--sprout-focus-ring);
92
91
  outline-offset: 0;
93
92
  }
@@ -110,13 +109,10 @@
110
109
  }
111
110
 
112
111
  @media (hover: hover) {
113
- :is(.sprout-alert-title, .sprout-alert-description)
114
- a:not([data-slot]):hover {
112
+ :is(.sprout-alert-title, .sprout-alert-description) a:not([data-slot]):hover {
115
113
  color: var(--sprout-text);
116
114
  }
117
- .sprout-alert-destructive
118
- :is(.sprout-alert-title, .sprout-alert-description)
119
- a:not([data-slot]):hover {
115
+ .sprout-alert-destructive :is(.sprout-alert-title, .sprout-alert-description) a:not([data-slot]):hover {
120
116
  color: var(--sprout-danger-hover);
121
117
  }
122
118
  }
@@ -129,8 +125,7 @@
129
125
 
130
126
  @media (prefers-reduced-motion: no-preference) {
131
127
  .sprout-alert {
132
- animation: sprout-alert-in var(--sprout-motion-normal, 180ms)
133
- var(--sprout-motion-ease, ease) both;
128
+ animation: sprout-alert-in var(--sprout-motion-normal, 180ms) var(--sprout-motion-ease, ease) both;
134
129
  transition:
135
130
  color var(--sprout-motion-fast) ease-out,
136
131
  border-color var(--sprout-motion-fast) ease-out;