@agimon-ai/doompi-web-components 0.0.1-alpha.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 (409) hide show
  1. package/LICENSE +22 -0
  2. package/README.md +106 -0
  3. package/dist/_virtual/_rolldown/runtime.cjs +1 -0
  4. package/dist/components/Accordion.d.cts +11 -0
  5. package/dist/components/Accordion.d.cts.map +1 -0
  6. package/dist/components/Avatar.d.cts +10 -0
  7. package/dist/components/Avatar.d.cts.map +1 -0
  8. package/dist/components/Badge.d.cts +18 -0
  9. package/dist/components/Badge.d.cts.map +1 -0
  10. package/dist/components/Button.d.cts +25 -0
  11. package/dist/components/Button.d.cts.map +1 -0
  12. package/dist/components/Checkbox.d.cts +8 -0
  13. package/dist/components/Checkbox.d.cts.map +1 -0
  14. package/dist/components/Collapsible.d.cts +10 -0
  15. package/dist/components/Collapsible.d.cts.map +1 -0
  16. package/dist/components/Command.d.cts +42 -0
  17. package/dist/components/Command.d.cts.map +1 -0
  18. package/dist/components/Dialog.d.cts +39 -0
  19. package/dist/components/Dialog.d.cts.map +1 -0
  20. package/dist/components/Dot.d.cts +16 -0
  21. package/dist/components/Dot.d.cts.map +1 -0
  22. package/dist/components/DropdownMenu.d.cts +34 -0
  23. package/dist/components/DropdownMenu.d.cts.map +1 -0
  24. package/dist/components/EmptyState.d.cts +18 -0
  25. package/dist/components/EmptyState.d.cts.map +1 -0
  26. package/dist/components/Input.d.cts +20 -0
  27. package/dist/components/Input.d.cts.map +1 -0
  28. package/dist/components/Kbd.d.cts +7 -0
  29. package/dist/components/Kbd.d.cts.map +1 -0
  30. package/dist/components/Label.d.cts +8 -0
  31. package/dist/components/Label.d.cts.map +1 -0
  32. package/dist/components/Markdown.d.cts +8 -0
  33. package/dist/components/Markdown.d.cts.map +1 -0
  34. package/dist/components/MessageItem.d.cts +71 -0
  35. package/dist/components/MessageItem.d.cts.map +1 -0
  36. package/dist/components/MessageLines.d.cts +24 -0
  37. package/dist/components/MessageLines.d.cts.map +1 -0
  38. package/dist/components/OptionList.d.cts +50 -0
  39. package/dist/components/OptionList.d.cts.map +1 -0
  40. package/dist/components/Panel.d.cts +15 -0
  41. package/dist/components/Panel.d.cts.map +1 -0
  42. package/dist/components/Popover.d.cts +19 -0
  43. package/dist/components/Popover.d.cts.map +1 -0
  44. package/dist/components/Progress.d.cts +8 -0
  45. package/dist/components/Progress.d.cts.map +1 -0
  46. package/dist/components/RadioGroup.d.cts +15 -0
  47. package/dist/components/RadioGroup.d.cts.map +1 -0
  48. package/dist/components/ScrollArea.d.cts +13 -0
  49. package/dist/components/ScrollArea.d.cts.map +1 -0
  50. package/dist/components/SectionLabel.d.cts +7 -0
  51. package/dist/components/SectionLabel.d.cts.map +1 -0
  52. package/dist/components/Select.d.cts +19 -0
  53. package/dist/components/Select.d.cts.map +1 -0
  54. package/dist/components/Separator.d.cts +13 -0
  55. package/dist/components/Separator.d.cts.map +1 -0
  56. package/dist/components/Skeleton.d.cts +11 -0
  57. package/dist/components/Skeleton.d.cts.map +1 -0
  58. package/dist/components/Spinner.d.cts +15 -0
  59. package/dist/components/Spinner.d.cts.map +1 -0
  60. package/dist/components/StatusBadge.d.cts +24 -0
  61. package/dist/components/StatusBadge.d.cts.map +1 -0
  62. package/dist/components/StreamCursor.d.cts +7 -0
  63. package/dist/components/StreamCursor.d.cts.map +1 -0
  64. package/dist/components/Switch.d.cts +8 -0
  65. package/dist/components/Switch.d.cts.map +1 -0
  66. package/dist/components/Tabs.d.cts +36 -0
  67. package/dist/components/Tabs.d.cts.map +1 -0
  68. package/dist/components/Textarea.d.cts +10 -0
  69. package/dist/components/Textarea.d.cts.map +1 -0
  70. package/dist/components/Toast.d.cts +24 -0
  71. package/dist/components/Toast.d.cts.map +1 -0
  72. package/dist/components/Tooltip.d.cts +11 -0
  73. package/dist/components/Tooltip.d.cts.map +1 -0
  74. package/dist/icons/icons.d.cts +2 -0
  75. package/dist/index.cjs +1 -0
  76. package/dist/index.d.cts +42 -0
  77. package/dist/index.d.mts +42 -0
  78. package/dist/index.mjs +1 -0
  79. package/dist/lib/cn.d.cts +7 -0
  80. package/dist/lib/cn.d.cts.map +1 -0
  81. package/dist/lib/collapse.d.cts +15 -0
  82. package/dist/lib/collapse.d.cts.map +1 -0
  83. package/dist/lib/optionList.d.cts +22 -0
  84. package/dist/lib/optionList.d.cts.map +1 -0
  85. package/dist/lib/tone.d.cts +26 -0
  86. package/dist/lib/tone.d.cts.map +1 -0
  87. package/dist/src/components/Accordion.cjs +2 -0
  88. package/dist/src/components/Accordion.cjs.map +1 -0
  89. package/dist/src/components/Accordion.d.mts +11 -0
  90. package/dist/src/components/Accordion.d.mts.map +1 -0
  91. package/dist/src/components/Accordion.mjs +2 -0
  92. package/dist/src/components/Accordion.mjs.map +1 -0
  93. package/dist/src/components/Avatar.cjs +2 -0
  94. package/dist/src/components/Avatar.cjs.map +1 -0
  95. package/dist/src/components/Avatar.d.mts +10 -0
  96. package/dist/src/components/Avatar.d.mts.map +1 -0
  97. package/dist/src/components/Avatar.mjs +2 -0
  98. package/dist/src/components/Avatar.mjs.map +1 -0
  99. package/dist/src/components/Badge.cjs +2 -0
  100. package/dist/src/components/Badge.cjs.map +1 -0
  101. package/dist/src/components/Badge.d.mts +18 -0
  102. package/dist/src/components/Badge.d.mts.map +1 -0
  103. package/dist/src/components/Badge.mjs +2 -0
  104. package/dist/src/components/Badge.mjs.map +1 -0
  105. package/dist/src/components/Button.cjs +2 -0
  106. package/dist/src/components/Button.cjs.map +1 -0
  107. package/dist/src/components/Button.d.mts +25 -0
  108. package/dist/src/components/Button.d.mts.map +1 -0
  109. package/dist/src/components/Button.mjs +2 -0
  110. package/dist/src/components/Button.mjs.map +1 -0
  111. package/dist/src/components/Checkbox.cjs +2 -0
  112. package/dist/src/components/Checkbox.cjs.map +1 -0
  113. package/dist/src/components/Checkbox.d.mts +8 -0
  114. package/dist/src/components/Checkbox.d.mts.map +1 -0
  115. package/dist/src/components/Checkbox.mjs +2 -0
  116. package/dist/src/components/Checkbox.mjs.map +1 -0
  117. package/dist/src/components/Collapsible.cjs +2 -0
  118. package/dist/src/components/Collapsible.cjs.map +1 -0
  119. package/dist/src/components/Collapsible.d.mts +10 -0
  120. package/dist/src/components/Collapsible.d.mts.map +1 -0
  121. package/dist/src/components/Collapsible.mjs +2 -0
  122. package/dist/src/components/Collapsible.mjs.map +1 -0
  123. package/dist/src/components/Command.cjs +2 -0
  124. package/dist/src/components/Command.cjs.map +1 -0
  125. package/dist/src/components/Command.d.mts +42 -0
  126. package/dist/src/components/Command.d.mts.map +1 -0
  127. package/dist/src/components/Command.mjs +2 -0
  128. package/dist/src/components/Command.mjs.map +1 -0
  129. package/dist/src/components/Dialog.cjs +2 -0
  130. package/dist/src/components/Dialog.cjs.map +1 -0
  131. package/dist/src/components/Dialog.d.mts +39 -0
  132. package/dist/src/components/Dialog.d.mts.map +1 -0
  133. package/dist/src/components/Dialog.mjs +2 -0
  134. package/dist/src/components/Dialog.mjs.map +1 -0
  135. package/dist/src/components/Dot.cjs +2 -0
  136. package/dist/src/components/Dot.cjs.map +1 -0
  137. package/dist/src/components/Dot.d.mts +16 -0
  138. package/dist/src/components/Dot.d.mts.map +1 -0
  139. package/dist/src/components/Dot.mjs +2 -0
  140. package/dist/src/components/Dot.mjs.map +1 -0
  141. package/dist/src/components/DropdownMenu.cjs +2 -0
  142. package/dist/src/components/DropdownMenu.cjs.map +1 -0
  143. package/dist/src/components/DropdownMenu.d.mts +34 -0
  144. package/dist/src/components/DropdownMenu.d.mts.map +1 -0
  145. package/dist/src/components/DropdownMenu.mjs +2 -0
  146. package/dist/src/components/DropdownMenu.mjs.map +1 -0
  147. package/dist/src/components/EmptyState.cjs +2 -0
  148. package/dist/src/components/EmptyState.cjs.map +1 -0
  149. package/dist/src/components/EmptyState.d.mts +18 -0
  150. package/dist/src/components/EmptyState.d.mts.map +1 -0
  151. package/dist/src/components/EmptyState.mjs +2 -0
  152. package/dist/src/components/EmptyState.mjs.map +1 -0
  153. package/dist/src/components/Input.cjs +2 -0
  154. package/dist/src/components/Input.cjs.map +1 -0
  155. package/dist/src/components/Input.d.mts +20 -0
  156. package/dist/src/components/Input.d.mts.map +1 -0
  157. package/dist/src/components/Input.mjs +2 -0
  158. package/dist/src/components/Input.mjs.map +1 -0
  159. package/dist/src/components/Kbd.cjs +2 -0
  160. package/dist/src/components/Kbd.cjs.map +1 -0
  161. package/dist/src/components/Kbd.d.mts +7 -0
  162. package/dist/src/components/Kbd.d.mts.map +1 -0
  163. package/dist/src/components/Kbd.mjs +2 -0
  164. package/dist/src/components/Kbd.mjs.map +1 -0
  165. package/dist/src/components/Label.cjs +2 -0
  166. package/dist/src/components/Label.cjs.map +1 -0
  167. package/dist/src/components/Label.d.mts +8 -0
  168. package/dist/src/components/Label.d.mts.map +1 -0
  169. package/dist/src/components/Label.mjs +2 -0
  170. package/dist/src/components/Label.mjs.map +1 -0
  171. package/dist/src/components/Markdown.cjs +2 -0
  172. package/dist/src/components/Markdown.cjs.map +1 -0
  173. package/dist/src/components/Markdown.d.mts +8 -0
  174. package/dist/src/components/Markdown.d.mts.map +1 -0
  175. package/dist/src/components/Markdown.mjs +2 -0
  176. package/dist/src/components/Markdown.mjs.map +1 -0
  177. package/dist/src/components/MessageItem.cjs +2 -0
  178. package/dist/src/components/MessageItem.cjs.map +1 -0
  179. package/dist/src/components/MessageItem.d.mts +71 -0
  180. package/dist/src/components/MessageItem.d.mts.map +1 -0
  181. package/dist/src/components/MessageItem.mjs +2 -0
  182. package/dist/src/components/MessageItem.mjs.map +1 -0
  183. package/dist/src/components/MessageLines.cjs +2 -0
  184. package/dist/src/components/MessageLines.cjs.map +1 -0
  185. package/dist/src/components/MessageLines.d.mts +24 -0
  186. package/dist/src/components/MessageLines.d.mts.map +1 -0
  187. package/dist/src/components/MessageLines.mjs +2 -0
  188. package/dist/src/components/MessageLines.mjs.map +1 -0
  189. package/dist/src/components/OptionList.cjs +2 -0
  190. package/dist/src/components/OptionList.cjs.map +1 -0
  191. package/dist/src/components/OptionList.d.mts +50 -0
  192. package/dist/src/components/OptionList.d.mts.map +1 -0
  193. package/dist/src/components/OptionList.mjs +2 -0
  194. package/dist/src/components/OptionList.mjs.map +1 -0
  195. package/dist/src/components/Panel.cjs +2 -0
  196. package/dist/src/components/Panel.cjs.map +1 -0
  197. package/dist/src/components/Panel.d.mts +15 -0
  198. package/dist/src/components/Panel.d.mts.map +1 -0
  199. package/dist/src/components/Panel.mjs +2 -0
  200. package/dist/src/components/Panel.mjs.map +1 -0
  201. package/dist/src/components/Popover.cjs +2 -0
  202. package/dist/src/components/Popover.cjs.map +1 -0
  203. package/dist/src/components/Popover.d.mts +19 -0
  204. package/dist/src/components/Popover.d.mts.map +1 -0
  205. package/dist/src/components/Popover.mjs +2 -0
  206. package/dist/src/components/Popover.mjs.map +1 -0
  207. package/dist/src/components/Progress.cjs +2 -0
  208. package/dist/src/components/Progress.cjs.map +1 -0
  209. package/dist/src/components/Progress.d.mts +8 -0
  210. package/dist/src/components/Progress.d.mts.map +1 -0
  211. package/dist/src/components/Progress.mjs +2 -0
  212. package/dist/src/components/Progress.mjs.map +1 -0
  213. package/dist/src/components/RadioGroup.cjs +2 -0
  214. package/dist/src/components/RadioGroup.cjs.map +1 -0
  215. package/dist/src/components/RadioGroup.d.mts +15 -0
  216. package/dist/src/components/RadioGroup.d.mts.map +1 -0
  217. package/dist/src/components/RadioGroup.mjs +2 -0
  218. package/dist/src/components/RadioGroup.mjs.map +1 -0
  219. package/dist/src/components/ScrollArea.cjs +2 -0
  220. package/dist/src/components/ScrollArea.cjs.map +1 -0
  221. package/dist/src/components/ScrollArea.d.mts +13 -0
  222. package/dist/src/components/ScrollArea.d.mts.map +1 -0
  223. package/dist/src/components/ScrollArea.mjs +2 -0
  224. package/dist/src/components/ScrollArea.mjs.map +1 -0
  225. package/dist/src/components/SectionLabel.cjs +2 -0
  226. package/dist/src/components/SectionLabel.cjs.map +1 -0
  227. package/dist/src/components/SectionLabel.d.mts +7 -0
  228. package/dist/src/components/SectionLabel.d.mts.map +1 -0
  229. package/dist/src/components/SectionLabel.mjs +2 -0
  230. package/dist/src/components/SectionLabel.mjs.map +1 -0
  231. package/dist/src/components/Select.cjs +2 -0
  232. package/dist/src/components/Select.cjs.map +1 -0
  233. package/dist/src/components/Select.d.mts +19 -0
  234. package/dist/src/components/Select.d.mts.map +1 -0
  235. package/dist/src/components/Select.mjs +2 -0
  236. package/dist/src/components/Select.mjs.map +1 -0
  237. package/dist/src/components/Separator.cjs +2 -0
  238. package/dist/src/components/Separator.cjs.map +1 -0
  239. package/dist/src/components/Separator.d.mts +13 -0
  240. package/dist/src/components/Separator.d.mts.map +1 -0
  241. package/dist/src/components/Separator.mjs +2 -0
  242. package/dist/src/components/Separator.mjs.map +1 -0
  243. package/dist/src/components/Skeleton.cjs +2 -0
  244. package/dist/src/components/Skeleton.cjs.map +1 -0
  245. package/dist/src/components/Skeleton.d.mts +11 -0
  246. package/dist/src/components/Skeleton.d.mts.map +1 -0
  247. package/dist/src/components/Skeleton.mjs +2 -0
  248. package/dist/src/components/Skeleton.mjs.map +1 -0
  249. package/dist/src/components/Spinner.cjs +2 -0
  250. package/dist/src/components/Spinner.cjs.map +1 -0
  251. package/dist/src/components/Spinner.d.mts +15 -0
  252. package/dist/src/components/Spinner.d.mts.map +1 -0
  253. package/dist/src/components/Spinner.mjs +2 -0
  254. package/dist/src/components/Spinner.mjs.map +1 -0
  255. package/dist/src/components/StatusBadge.cjs +2 -0
  256. package/dist/src/components/StatusBadge.cjs.map +1 -0
  257. package/dist/src/components/StatusBadge.d.mts +24 -0
  258. package/dist/src/components/StatusBadge.d.mts.map +1 -0
  259. package/dist/src/components/StatusBadge.mjs +2 -0
  260. package/dist/src/components/StatusBadge.mjs.map +1 -0
  261. package/dist/src/components/StreamCursor.cjs +2 -0
  262. package/dist/src/components/StreamCursor.cjs.map +1 -0
  263. package/dist/src/components/StreamCursor.d.mts +7 -0
  264. package/dist/src/components/StreamCursor.d.mts.map +1 -0
  265. package/dist/src/components/StreamCursor.mjs +2 -0
  266. package/dist/src/components/StreamCursor.mjs.map +1 -0
  267. package/dist/src/components/Switch.cjs +2 -0
  268. package/dist/src/components/Switch.cjs.map +1 -0
  269. package/dist/src/components/Switch.d.mts +8 -0
  270. package/dist/src/components/Switch.d.mts.map +1 -0
  271. package/dist/src/components/Switch.mjs +2 -0
  272. package/dist/src/components/Switch.mjs.map +1 -0
  273. package/dist/src/components/Tabs.cjs +2 -0
  274. package/dist/src/components/Tabs.cjs.map +1 -0
  275. package/dist/src/components/Tabs.d.mts +36 -0
  276. package/dist/src/components/Tabs.d.mts.map +1 -0
  277. package/dist/src/components/Tabs.mjs +2 -0
  278. package/dist/src/components/Tabs.mjs.map +1 -0
  279. package/dist/src/components/Textarea.cjs +2 -0
  280. package/dist/src/components/Textarea.cjs.map +1 -0
  281. package/dist/src/components/Textarea.d.mts +10 -0
  282. package/dist/src/components/Textarea.d.mts.map +1 -0
  283. package/dist/src/components/Textarea.mjs +2 -0
  284. package/dist/src/components/Textarea.mjs.map +1 -0
  285. package/dist/src/components/Toast.cjs +2 -0
  286. package/dist/src/components/Toast.cjs.map +1 -0
  287. package/dist/src/components/Toast.d.mts +24 -0
  288. package/dist/src/components/Toast.d.mts.map +1 -0
  289. package/dist/src/components/Toast.mjs +2 -0
  290. package/dist/src/components/Toast.mjs.map +1 -0
  291. package/dist/src/components/Tooltip.cjs +2 -0
  292. package/dist/src/components/Tooltip.cjs.map +1 -0
  293. package/dist/src/components/Tooltip.d.mts +11 -0
  294. package/dist/src/components/Tooltip.d.mts.map +1 -0
  295. package/dist/src/components/Tooltip.mjs +2 -0
  296. package/dist/src/components/Tooltip.mjs.map +1 -0
  297. package/dist/src/icons/icons.cjs +1 -0
  298. package/dist/src/icons/icons.d.mts +2 -0
  299. package/dist/src/icons/icons.mjs +1 -0
  300. package/dist/src/lib/cn.cjs +2 -0
  301. package/dist/src/lib/cn.cjs.map +1 -0
  302. package/dist/src/lib/cn.d.mts +7 -0
  303. package/dist/src/lib/cn.d.mts.map +1 -0
  304. package/dist/src/lib/cn.mjs +2 -0
  305. package/dist/src/lib/cn.mjs.map +1 -0
  306. package/dist/src/lib/collapse.cjs +2 -0
  307. package/dist/src/lib/collapse.cjs.map +1 -0
  308. package/dist/src/lib/collapse.d.mts +15 -0
  309. package/dist/src/lib/collapse.d.mts.map +1 -0
  310. package/dist/src/lib/collapse.mjs +2 -0
  311. package/dist/src/lib/collapse.mjs.map +1 -0
  312. package/dist/src/lib/optionList.cjs +2 -0
  313. package/dist/src/lib/optionList.cjs.map +1 -0
  314. package/dist/src/lib/optionList.d.mts +22 -0
  315. package/dist/src/lib/optionList.d.mts.map +1 -0
  316. package/dist/src/lib/optionList.mjs +2 -0
  317. package/dist/src/lib/optionList.mjs.map +1 -0
  318. package/dist/src/lib/tone.cjs +2 -0
  319. package/dist/src/lib/tone.cjs.map +1 -0
  320. package/dist/src/lib/tone.d.mts +26 -0
  321. package/dist/src/lib/tone.d.mts.map +1 -0
  322. package/dist/src/lib/tone.mjs +2 -0
  323. package/dist/src/lib/tone.mjs.map +1 -0
  324. package/dist/src/theme/apply.cjs +3 -0
  325. package/dist/src/theme/apply.cjs.map +1 -0
  326. package/dist/src/theme/apply.d.mts +26 -0
  327. package/dist/src/theme/apply.d.mts.map +1 -0
  328. package/dist/src/theme/apply.mjs +3 -0
  329. package/dist/src/theme/apply.mjs.map +1 -0
  330. package/dist/src/theme/builtinThemes.cjs +2 -0
  331. package/dist/src/theme/builtinThemes.cjs.map +1 -0
  332. package/dist/src/theme/builtinThemes.d.mts +12 -0
  333. package/dist/src/theme/builtinThemes.d.mts.map +1 -0
  334. package/dist/src/theme/builtinThemes.mjs +2 -0
  335. package/dist/src/theme/builtinThemes.mjs.map +1 -0
  336. package/dist/src/theme/derive.cjs +2 -0
  337. package/dist/src/theme/derive.cjs.map +1 -0
  338. package/dist/src/theme/derive.d.mts +15 -0
  339. package/dist/src/theme/derive.d.mts.map +1 -0
  340. package/dist/src/theme/derive.mjs +2 -0
  341. package/dist/src/theme/derive.mjs.map +1 -0
  342. package/dist/src/theme/parse.cjs +2 -0
  343. package/dist/src/theme/parse.cjs.map +1 -0
  344. package/dist/src/theme/parse.d.mts +11 -0
  345. package/dist/src/theme/parse.d.mts.map +1 -0
  346. package/dist/src/theme/parse.mjs +2 -0
  347. package/dist/src/theme/parse.mjs.map +1 -0
  348. package/dist/src/theme/piTheme.cjs +2 -0
  349. package/dist/src/theme/piTheme.cjs.map +1 -0
  350. package/dist/src/theme/piTheme.d.mts +20 -0
  351. package/dist/src/theme/piTheme.d.mts.map +1 -0
  352. package/dist/src/theme/piTheme.mjs +2 -0
  353. package/dist/src/theme/piTheme.mjs.map +1 -0
  354. package/dist/src/theme/preference.cjs +2 -0
  355. package/dist/src/theme/preference.cjs.map +1 -0
  356. package/dist/src/theme/preference.d.mts +16 -0
  357. package/dist/src/theme/preference.d.mts.map +1 -0
  358. package/dist/src/theme/preference.mjs +2 -0
  359. package/dist/src/theme/preference.mjs.map +1 -0
  360. package/dist/src/types/theme.cjs +2 -0
  361. package/dist/src/types/theme.cjs.map +1 -0
  362. package/dist/src/types/theme.d.mts +39 -0
  363. package/dist/src/types/theme.d.mts.map +1 -0
  364. package/dist/src/types/theme.mjs +2 -0
  365. package/dist/src/types/theme.mjs.map +1 -0
  366. package/dist/src/types/tone.cjs +2 -0
  367. package/dist/src/types/tone.cjs.map +1 -0
  368. package/dist/src/types/tone.d.mts +29 -0
  369. package/dist/src/types/tone.d.mts.map +1 -0
  370. package/dist/src/types/tone.mjs +2 -0
  371. package/dist/src/types/tone.mjs.map +1 -0
  372. package/dist/theme/apply.d.cts +26 -0
  373. package/dist/theme/apply.d.cts.map +1 -0
  374. package/dist/theme/builtinThemes.d.cts +12 -0
  375. package/dist/theme/builtinThemes.d.cts.map +1 -0
  376. package/dist/theme/derive.d.cts +15 -0
  377. package/dist/theme/derive.d.cts.map +1 -0
  378. package/dist/theme/parse.d.cts +11 -0
  379. package/dist/theme/parse.d.cts.map +1 -0
  380. package/dist/theme/piTheme.d.cts +20 -0
  381. package/dist/theme/piTheme.d.cts.map +1 -0
  382. package/dist/theme/preference.d.cts +16 -0
  383. package/dist/theme/preference.d.cts.map +1 -0
  384. package/dist/theme.cjs +1 -0
  385. package/dist/theme.d.cts +8 -0
  386. package/dist/theme.d.mts +8 -0
  387. package/dist/theme.mjs +1 -0
  388. package/dist/themes/doom-nord-dark.cjs +2 -0
  389. package/dist/themes/doom-nord-dark.cjs.map +1 -0
  390. package/dist/themes/doom-nord-dark.mjs +2 -0
  391. package/dist/themes/doom-nord-dark.mjs.map +1 -0
  392. package/dist/themes/doom-one-dark.cjs +2 -0
  393. package/dist/themes/doom-one-dark.cjs.map +1 -0
  394. package/dist/themes/doom-one-dark.mjs +2 -0
  395. package/dist/themes/doom-one-dark.mjs.map +1 -0
  396. package/dist/themes/doom-one-light.cjs +2 -0
  397. package/dist/themes/doom-one-light.cjs.map +1 -0
  398. package/dist/themes/doom-one-light.mjs +2 -0
  399. package/dist/themes/doom-one-light.mjs.map +1 -0
  400. package/dist/types/theme.d.cts +39 -0
  401. package/dist/types/theme.d.cts.map +1 -0
  402. package/dist/types/tone.d.cts +29 -0
  403. package/dist/types/tone.d.cts.map +1 -0
  404. package/llms.txt +8 -0
  405. package/package.json +95 -0
  406. package/styles/tokens.css +202 -0
  407. package/themes/doom-nord-dark.json +27 -0
  408. package/themes/doom-one-dark.json +39 -0
  409. package/themes/doom-one-light.json +27 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.cjs","names":["cva","cn"],"sources":["../../../src/components/Dot.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { DotTone as Tone } from '../types/tone.ts';\n\nexport const dotVariants = cva('inline-block shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-doom-faint',\n muted: 'bg-doom-faint/40',\n blue: 'bg-doom-blue',\n green: 'bg-doom-green',\n yellow: 'bg-doom-yellow',\n red: 'bg-doom-red',\n magenta: 'bg-doom-magenta',\n violet: 'bg-doom-violet',\n cyan: 'bg-doom-cyan',\n orange: 'bg-doom-orange',\n teal: 'bg-doom-teal',\n } satisfies Record<Tone, string>,\n size: {\n xs: 'h-1 w-1',\n sm: 'h-1.5 w-1.5',\n md: 'h-2 w-2',\n lg: 'h-2.5 w-2.5',\n },\n pulse: {\n true: 'animate-pulse',\n false: '',\n },\n },\n defaultVariants: { tone: 'neutral', size: 'sm', pulse: false },\n});\n\nexport type DotTone = Tone;\n\nexport interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}\n\n/** The status dot: a colour and, while something is live, a pulse. */\nexport function Dot({ className, tone, size, pulse, ...props }: DotProps) {\n return <span data-slot=\"dot\" aria-hidden className={cn(dotVariants({ tone, size, pulse }), className)} {...props} />;\n}\n"],"mappings":"oEAKA,MAAa,GAAA,oCAAcA,CAAAA,CAAAA,IAAAA,CAAI,qCAAsC,CACnE,SAAU,CACR,KAAM,CACJ,QAAS,gBACT,MAAO,mBACP,KAAM,eACN,MAAO,gBACP,OAAQ,iBACR,IAAK,cACL,QAAS,kBACT,OAAQ,iBACR,KAAM,eACN,OAAQ,iBACR,KAAM,cACR,EACA,KAAM,CACJ,GAAI,UACJ,GAAI,cACJ,GAAI,UACJ,GAAI,aACN,EACA,MAAO,CACL,KAAM,gBACN,MAAO,EACT,CACF,EACA,gBAAiB,CAAE,KAAM,UAAW,KAAM,KAAM,MAAO,EAAM,CAC/D,CAAC,EAOD,SAAgB,EAAI,CAAE,YAAW,OAAM,OAAM,QAAO,GAAG,GAAmB,CACxE,OAAO,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,YAAU,MAAM,cAAA,GAAY,UAAWC,EAAAA,GAAG,EAAY,CAAE,OAAM,OAAM,OAAM,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACrH"}
@@ -0,0 +1,16 @@
1
+ import { DotTone as DotTone$1 } from "../types/tone.mjs";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ComponentProps } from "react";
4
+ //#region src/components/Dot.d.ts
5
+ declare const dotVariants: (props?: ({
6
+ tone?: "blue" | "cyan" | "green" | "magenta" | "muted" | "neutral" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
7
+ size?: "lg" | "md" | "sm" | "xs" | null | undefined;
8
+ pulse?: boolean | null | undefined;
9
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
+ type DotTone = DotTone$1;
11
+ interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}
12
+ /** The status dot: a colour and, while something is live, a pulse. */
13
+ declare function Dot({ className, tone, size, pulse, ...props }: DotProps): import("react/jsx-runtime").JSX.Element;
14
+ //#endregion
15
+ export { Dot, DotProps, DotTone, dotVariants };
16
+ //# sourceMappingURL=Dot.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.d.mts","names":[],"sources":["../../../src/components/Dot.tsx"],"mappings":";;;;cAKa,cAAW;;;;6CA2BtB;KAEU,UAAU;UAEL,iBAAiB,wBAAwB,oBAAoB;;iBAG9D,MAAM,WAAW,MAAM,MAAM,UAAU,SAAS,uCAAQ,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-doom-faint`,muted:`bg-doom-faint/40`,blue:`bg-doom-blue`,green:`bg-doom-green`,yellow:`bg-doom-yellow`,red:`bg-doom-red`,magenta:`bg-doom-magenta`,violet:`bg-doom-violet`,cyan:`bg-doom-cyan`,orange:`bg-doom-orange`,teal:`bg-doom-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function i({className:n,tone:i,size:a,pulse:o,...s}){return t(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:e(r({tone:i,size:a,pulse:o}),n),...s})}export{i as Dot,r as dotVariants};
2
+ //# sourceMappingURL=Dot.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Dot.mjs","names":[],"sources":["../../../src/components/Dot.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { DotTone as Tone } from '../types/tone.ts';\n\nexport const dotVariants = cva('inline-block shrink-0 rounded-full', {\n variants: {\n tone: {\n neutral: 'bg-doom-faint',\n muted: 'bg-doom-faint/40',\n blue: 'bg-doom-blue',\n green: 'bg-doom-green',\n yellow: 'bg-doom-yellow',\n red: 'bg-doom-red',\n magenta: 'bg-doom-magenta',\n violet: 'bg-doom-violet',\n cyan: 'bg-doom-cyan',\n orange: 'bg-doom-orange',\n teal: 'bg-doom-teal',\n } satisfies Record<Tone, string>,\n size: {\n xs: 'h-1 w-1',\n sm: 'h-1.5 w-1.5',\n md: 'h-2 w-2',\n lg: 'h-2.5 w-2.5',\n },\n pulse: {\n true: 'animate-pulse',\n false: '',\n },\n },\n defaultVariants: { tone: 'neutral', size: 'sm', pulse: false },\n});\n\nexport type DotTone = Tone;\n\nexport interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}\n\n/** The status dot: a colour and, while something is live, a pulse. */\nexport function Dot({ className, tone, size, pulse, ...props }: DotProps) {\n return <span data-slot=\"dot\" aria-hidden className={cn(dotVariants({ tone, size, pulse }), className)} {...props} />;\n}\n"],"mappings":"0HAKA,MAAa,EAAc,EAAI,qCAAsC,CACnE,SAAU,CACR,KAAM,CACJ,QAAS,gBACT,MAAO,mBACP,KAAM,eACN,MAAO,gBACP,OAAQ,iBACR,IAAK,cACL,QAAS,kBACT,OAAQ,iBACR,KAAM,eACN,OAAQ,iBACR,KAAM,cACR,EACA,KAAM,CACJ,GAAI,UACJ,GAAI,cACJ,GAAI,UACJ,GAAI,aACN,EACA,MAAO,CACL,KAAM,gBACN,MAAO,EACT,CACF,EACA,gBAAiB,CAAE,KAAM,UAAW,KAAM,KAAM,MAAO,EAAM,CAC/D,CAAC,EAOD,SAAgB,EAAI,CAAE,YAAW,OAAM,OAAM,QAAO,GAAG,GAAmB,CACxE,OAAO,EAAC,OAAD,CAAM,YAAU,MAAM,cAAA,GAAY,UAAW,EAAG,EAAY,CAAE,OAAM,OAAM,OAAM,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACrH"}
@@ -0,0 +1,2 @@
1
+ require("../icons/icons.cjs");const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime"),r=require("class-variance-authority"),i=require("lucide-react");function a(e){return(0,n.jsx)(t.DropdownMenu.Root,{"data-slot":`dropdown-menu`,...e})}function o(e){return(0,n.jsx)(t.DropdownMenu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function s(e){return(0,n.jsx)(t.DropdownMenu.Group,{"data-slot":`dropdown-menu-group`,...e})}const c=`z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 font-mono shadow-xl outline-none data-[state=open]:animate-doom-rise`;function l({className:r,align:i=`end`,sideOffset:a=4,...o}){return(0,n.jsx)(t.DropdownMenu.Portal,{children:(0,n.jsx)(t.DropdownMenu.Content,{"data-slot":`dropdown-menu-content`,align:i,sideOffset:a,className:e.cn(c,r),...o})})}const u=(0,r.cva)(`flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-[11px] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep`,{variants:{variant:{default:`text-doom-hi`,destructive:`text-doom-red`},indented:{true:`pl-7`,false:``}},defaultVariants:{variant:`default`,indented:!1}});function d({className:r,variant:i,indented:a,...o}){return(0,n.jsx)(t.DropdownMenu.Item,{"data-slot":`dropdown-menu-item`,"data-variant":i??`default`,className:e.cn(u({variant:i,indented:a}),r),...o})}function f({children:e}){return(0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center`,children:(0,n.jsx)(t.DropdownMenu.ItemIndicator,{children:e})})}function p({className:r,variant:a,children:o,...s}){return(0,n.jsxs)(t.DropdownMenu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e.cn(`relative`,u({variant:a,indented:!0}),r),...s,children:[(0,n.jsx)(f,{children:(0,n.jsx)(i.Check,{className:`h-3 w-3 text-doom-blue`})}),o]})}function m(e){return(0,n.jsx)(t.DropdownMenu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function h({className:r,variant:i,children:a,...o}){return(0,n.jsxs)(t.DropdownMenu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e.cn(`relative`,u({variant:i,indented:!0}),r),...o,children:[(0,n.jsx)(f,{children:(0,n.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-doom-blue`})}),a]})}function g(e){return(0,n.jsx)(t.DropdownMenu.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function _({className:r,children:a,...o}){return(0,n.jsxs)(t.DropdownMenu.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:e.cn(u(),`data-[state=open]:bg-doom-deep`,r),...o,children:[(0,n.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a}),(0,n.jsx)(i.ChevronRight,{className:`h-3 w-3 shrink-0 text-doom-faint`})]})}function v({className:r,sideOffset:i=2,...a}){return(0,n.jsx)(t.DropdownMenu.Portal,{children:(0,n.jsx)(t.DropdownMenu.SubContent,{"data-slot":`dropdown-menu-sub-content`,sideOffset:i,className:e.cn(c,r),...a})})}function y({className:r,...i}){return(0,n.jsx)(t.DropdownMenu.Label,{"data-slot":`dropdown-menu-label`,className:e.cn(`px-2.5 py-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase`,r),...i})}function b({className:t,...r}){return(0,n.jsx)(`span`,{"data-slot":`dropdown-menu-shortcut`,className:e.cn(`ml-auto shrink-0 text-[10px] tracking-[0.08em] text-doom-faint`,t),...r})}function x({className:r,...i}){return(0,n.jsx)(t.DropdownMenu.Separator,{"data-slot":`dropdown-menu-separator`,className:e.cn(`my-1 h-px bg-doom-border-soft`,r),...i})}exports.DropdownMenu=a,exports.DropdownMenuCheckboxItem=p,exports.DropdownMenuContent=l,exports.DropdownMenuGroup=s,exports.DropdownMenuItem=d,exports.DropdownMenuLabel=y,exports.DropdownMenuRadioGroup=m,exports.DropdownMenuRadioItem=h,exports.DropdownMenuSeparator=x,exports.DropdownMenuShortcut=b,exports.DropdownMenuSub=g,exports.DropdownMenuSubContent=v,exports.DropdownMenuSubTrigger=_,exports.DropdownMenuTrigger=o,exports.dropdownMenuItemVariants=u;
2
+ //# sourceMappingURL=DropdownMenu.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.cjs","names":["DropdownMenuPrimitive","cn","cva","CheckIcon","ChevronRightIcon"],"sources":["../../../src/components/DropdownMenu.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** shadcn's DropdownMenu on Radix: roving focus, typeahead, outside click, Escape. */\nexport function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/** A run of items under one label, so the separator between groups is structural. */\nexport function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/** The surface every menu and submenu wears. */\nconst CONTENT_CLASS =\n 'z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 font-mono shadow-xl outline-none data-[state=open]:animate-doom-rise';\n\nexport function DropdownMenuContent({\n className,\n align = 'end',\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport const dropdownMenuItemVariants = cva(\n 'flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-[11px] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep',\n {\n variants: {\n variant: {\n default: 'text-doom-hi',\n destructive: 'text-doom-red',\n },\n /** A row that carries a check or bullet keeps a gutter for it, so labels line up whether or not one is set. */\n indented: { true: 'pl-7', false: '' },\n },\n defaultVariants: { variant: 'default', indented: false },\n },\n);\n\nexport interface DropdownMenuItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.Item>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-variant={variant ?? 'default'}\n className={cn(dropdownMenuItemVariants({ variant, indented }), className)}\n {...props}\n />\n );\n}\n\n/** The check or bullet a selectable row shows when it is set; it sits in the row's gutter. */\nfunction ItemIndicator({ children }: { children: ReactNode }) {\n return (\n <span className=\"pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>{children}</DropdownMenuPrimitive.ItemIndicator>\n </span>\n );\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\n/** A row that toggles: the check lives in the gutter so the label never shifts. */\nexport function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <CheckIcon className=\"h-3 w-3 text-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/** The exclusive-choice group; pair it with DropdownMenuRadioItem. */\nexport function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <span className=\"h-1.5 w-1.5 rounded-full bg-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/** The row that opens a submenu; the chevron is part of the row, not the caller's job. */\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger>) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownMenuItemVariants(), 'data-[state=open]:bg-doom-deep', className)}\n {...props}\n >\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronRightIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nexport function DropdownMenuSubContent({\n className,\n sideOffset = 2,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n className={cn('px-2.5 py-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase', className)}\n {...props}\n />\n );\n}\n\n/** The keystroke printed at the right of a row; the row supplies the gap. */\nexport function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('ml-auto shrink-0 text-[10px] tracking-[0.08em] text-doom-faint', className)}\n {...props}\n />\n );\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('my-1 h-px bg-doom-border-soft', className)}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,34 @@
1
+ import { DropdownMenu } from "radix-ui";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ComponentProps } from "react";
4
+ //#region src/components/DropdownMenu.d.ts
5
+ /** shadcn's DropdownMenu on Radix: roving focus, typeahead, outside click, Escape. */
6
+ declare function DropdownMenu$1(props: ComponentProps<typeof DropdownMenu.Root>): import("react/jsx-runtime").JSX.Element;
7
+ declare function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenu.Trigger>): import("react/jsx-runtime").JSX.Element;
8
+ /** A run of items under one label, so the separator between groups is structural. */
9
+ declare function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenu.Group>): import("react/jsx-runtime").JSX.Element;
10
+ declare function DropdownMenuContent({ className, align, sideOffset, ...props }: ComponentProps<typeof DropdownMenu.Content>): import("react/jsx-runtime").JSX.Element;
11
+ declare const dropdownMenuItemVariants: (props?: ({
12
+ variant?: "default" | "destructive" | null | undefined;
13
+ indented?: boolean | null | undefined;
14
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
15
+ interface DropdownMenuItemProps extends ComponentProps<typeof DropdownMenu.Item>, VariantProps<typeof dropdownMenuItemVariants> {}
16
+ declare function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps): import("react/jsx-runtime").JSX.Element;
17
+ interface DropdownMenuCheckboxItemProps extends ComponentProps<typeof DropdownMenu.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}
18
+ /** A row that toggles: the check lives in the gutter so the label never shifts. */
19
+ declare function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps): import("react/jsx-runtime").JSX.Element;
20
+ /** The exclusive-choice group; pair it with DropdownMenuRadioItem. */
21
+ declare function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenu.RadioGroup>): import("react/jsx-runtime").JSX.Element;
22
+ interface DropdownMenuRadioItemProps extends ComponentProps<typeof DropdownMenu.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}
23
+ declare function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps): import("react/jsx-runtime").JSX.Element;
24
+ declare function DropdownMenuSub(props: ComponentProps<typeof DropdownMenu.Sub>): import("react/jsx-runtime").JSX.Element;
25
+ /** The row that opens a submenu; the chevron is part of the row, not the caller's job. */
26
+ declare function DropdownMenuSubTrigger({ className, children, ...props }: ComponentProps<typeof DropdownMenu.SubTrigger>): import("react/jsx-runtime").JSX.Element;
27
+ declare function DropdownMenuSubContent({ className, sideOffset, ...props }: ComponentProps<typeof DropdownMenu.SubContent>): import("react/jsx-runtime").JSX.Element;
28
+ declare function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenu.Label>): import("react/jsx-runtime").JSX.Element;
29
+ /** The keystroke printed at the right of a row; the row supplies the gap. */
30
+ declare function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
31
+ declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenu.Separator>): import("react/jsx-runtime").JSX.Element;
32
+ //#endregion
33
+ export { DropdownMenu$1 as DropdownMenu, DropdownMenuCheckboxItem, DropdownMenuCheckboxItemProps, DropdownMenuContent, DropdownMenuGroup, DropdownMenuItem, DropdownMenuItemProps, DropdownMenuLabel, DropdownMenuRadioGroup, DropdownMenuRadioItem, DropdownMenuRadioItemProps, DropdownMenuSeparator, DropdownMenuShortcut, DropdownMenuSub, DropdownMenuSubContent, DropdownMenuSubTrigger, DropdownMenuTrigger, dropdownMenuItemVariants };
34
+ //# sourceMappingURL=DropdownMenu.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.d.mts","names":[],"sources":["../../../src/components/DropdownMenu.tsx"],"mappings":";;;;;iBAOgB,eAAa,OAAO,sBAAsB,aAAsB,oCAAK,IAAA;iBAIrE,oBAAoB,OAAO,sBAAsB,aAAsB,uCAAQ,IAAA;;iBAK/E,kBAAkB,OAAO,sBAAsB,aAAsB,qCAAM,IAAA;iBAQ3E,sBACd,WACA,OACA,eACG,SACF,sBAAsB,aAAsB,uCAAQ,IAAA;cAc1C,2BAAwB;;;6CAapC;UAEgB,8BACP,sBAAsB,aAAsB,OAAO,oBAAoB;iBAEjE,mBAAmB,WAAW,SAAS,aAAa,SAAS,oDAAqB,IAAA;UAoBjF,sCACP,sBAAsB,aAAsB,eAAe,oBAAoB;;iBAGzE,2BAA2B,WAAW,SAAS,aAAa,SAAS,4DAA6B,IAAA;;iBAgBlG,uBAAuB,OAAO,sBAAsB,aAAsB,0CAAW,IAAA;UAIpF,mCACP,sBAAsB,aAAsB,YAAY,oBAAoB;iBAEtE,wBAAwB,WAAW,SAAS,aAAa,SAAS,yDAA0B,IAAA;iBAe5F,gBAAgB,OAAO,sBAAsB,aAAsB,mCAAI,IAAA;;iBAKvE,yBACd,WACA,aACG,SACF,sBAAsB,aAAsB,0CAAW,IAAA;iBAa1C,yBACd,WACA,eACG,SACF,sBAAsB,aAAsB,0CAAW,IAAA;iBAa1C,oBAAoB,cAAc,SAAS,sBAAsB,aAAsB,qCAAM,IAAA;;iBAW7F,uBAAuB,cAAc,SAAS,qDAAsB,IAAA;iBAUpE,wBAAwB,cAAc,SAAS,sBAAsB,aAAsB,yCAAU,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{CheckIcon as e,ChevronRightIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{DropdownMenu as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{cva as o}from"class-variance-authority";function s(e){return i(r.Root,{"data-slot":`dropdown-menu`,...e})}function c(e){return i(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function l(e){return i(r.Group,{"data-slot":`dropdown-menu-group`,...e})}const u=`z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 font-mono shadow-xl outline-none data-[state=open]:animate-doom-rise`;function d({className:e,align:t=`end`,sideOffset:a=4,...o}){return i(r.Portal,{children:i(r.Content,{"data-slot":`dropdown-menu-content`,align:t,sideOffset:a,className:n(u,e),...o})})}const f=o(`flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-[11px] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep`,{variants:{variant:{default:`text-doom-hi`,destructive:`text-doom-red`},indented:{true:`pl-7`,false:``}},defaultVariants:{variant:`default`,indented:!1}});function p({className:e,variant:t,indented:a,...o}){return i(r.Item,{"data-slot":`dropdown-menu-item`,"data-variant":t??`default`,className:n(f({variant:t,indented:a}),e),...o})}function m({children:e}){return i(`span`,{className:`pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center`,children:i(r.ItemIndicator,{children:e})})}function h({className:t,variant:o,children:s,...c}){return a(r.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:n(`relative`,f({variant:o,indented:!0}),t),...c,children:[i(m,{children:i(e,{className:`h-3 w-3 text-doom-blue`})}),s]})}function g(e){return i(r.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function _({className:e,variant:t,children:o,...s}){return a(r.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:n(`relative`,f({variant:t,indented:!0}),e),...s,children:[i(m,{children:i(`span`,{className:`h-1.5 w-1.5 rounded-full bg-doom-blue`})}),o]})}function v(e){return i(r.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function y({className:e,children:o,...s}){return a(r.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:n(f(),`data-[state=open]:bg-doom-deep`,e),...s,children:[i(`span`,{className:`min-w-0 flex-1 truncate`,children:o}),i(t,{className:`h-3 w-3 shrink-0 text-doom-faint`})]})}function b({className:e,sideOffset:t=2,...a}){return i(r.Portal,{children:i(r.SubContent,{"data-slot":`dropdown-menu-sub-content`,sideOffset:t,className:n(u,e),...a})})}function x({className:e,...t}){return i(r.Label,{"data-slot":`dropdown-menu-label`,className:n(`px-2.5 py-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase`,e),...t})}function S({className:e,...t}){return i(`span`,{"data-slot":`dropdown-menu-shortcut`,className:n(`ml-auto shrink-0 text-[10px] tracking-[0.08em] text-doom-faint`,e),...t})}function C({className:e,...t}){return i(r.Separator,{"data-slot":`dropdown-menu-separator`,className:n(`my-1 h-px bg-doom-border-soft`,e),...t})}export{s as DropdownMenu,h as DropdownMenuCheckboxItem,d as DropdownMenuContent,l as DropdownMenuGroup,p as DropdownMenuItem,x as DropdownMenuLabel,g as DropdownMenuRadioGroup,_ as DropdownMenuRadioItem,C as DropdownMenuSeparator,S as DropdownMenuShortcut,v as DropdownMenuSub,b as DropdownMenuSubContent,y as DropdownMenuSubTrigger,c as DropdownMenuTrigger,f as dropdownMenuItemVariants};
2
+ //# sourceMappingURL=DropdownMenu.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DropdownMenu.mjs","names":["DropdownMenu","DropdownMenuPrimitive"],"sources":["../../../src/components/DropdownMenu.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { DropdownMenu as DropdownMenuPrimitive } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\n\n/** shadcn's DropdownMenu on Radix: roving focus, typeahead, outside click, Escape. */\nexport function DropdownMenu(props: ComponentProps<typeof DropdownMenuPrimitive.Root>) {\n return <DropdownMenuPrimitive.Root data-slot=\"dropdown-menu\" {...props} />;\n}\n\nexport function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenuPrimitive.Trigger>) {\n return <DropdownMenuPrimitive.Trigger data-slot=\"dropdown-menu-trigger\" {...props} />;\n}\n\n/** A run of items under one label, so the separator between groups is structural. */\nexport function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenuPrimitive.Group>) {\n return <DropdownMenuPrimitive.Group data-slot=\"dropdown-menu-group\" {...props} />;\n}\n\n/** The surface every menu and submenu wears. */\nconst CONTENT_CLASS =\n 'z-50 flex min-w-[120px] flex-col overflow-hidden rounded border border-doom-border bg-doom-panel py-1 font-mono shadow-xl outline-none data-[state=open]:animate-doom-rise';\n\nexport function DropdownMenuContent({\n className,\n align = 'end',\n sideOffset = 4,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.Content>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.Content\n data-slot=\"dropdown-menu-content\"\n align={align}\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport const dropdownMenuItemVariants = cva(\n 'flex w-full cursor-pointer items-center gap-2 px-2.5 py-1.5 text-left text-[11px] outline-none select-none data-[disabled]:pointer-events-none data-[disabled]:opacity-40 data-[highlighted]:bg-doom-deep',\n {\n variants: {\n variant: {\n default: 'text-doom-hi',\n destructive: 'text-doom-red',\n },\n /** A row that carries a check or bullet keeps a gutter for it, so labels line up whether or not one is set. */\n indented: { true: 'pl-7', false: '' },\n },\n defaultVariants: { variant: 'default', indented: false },\n },\n);\n\nexport interface DropdownMenuItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.Item>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps) {\n return (\n <DropdownMenuPrimitive.Item\n data-slot=\"dropdown-menu-item\"\n data-variant={variant ?? 'default'}\n className={cn(dropdownMenuItemVariants({ variant, indented }), className)}\n {...props}\n />\n );\n}\n\n/** The check or bullet a selectable row shows when it is set; it sits in the row's gutter. */\nfunction ItemIndicator({ children }: { children: ReactNode }) {\n return (\n <span className=\"pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center\">\n <DropdownMenuPrimitive.ItemIndicator>{children}</DropdownMenuPrimitive.ItemIndicator>\n </span>\n );\n}\n\nexport interface DropdownMenuCheckboxItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\n/** A row that toggles: the check lives in the gutter so the label never shifts. */\nexport function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps) {\n return (\n <DropdownMenuPrimitive.CheckboxItem\n data-slot=\"dropdown-menu-checkbox-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <CheckIcon className=\"h-3 w-3 text-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.CheckboxItem>\n );\n}\n\n/** The exclusive-choice group; pair it with DropdownMenuRadioItem. */\nexport function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenuPrimitive.RadioGroup>) {\n return <DropdownMenuPrimitive.RadioGroup data-slot=\"dropdown-menu-radio-group\" {...props} />;\n}\n\nexport interface DropdownMenuRadioItemProps\n extends ComponentProps<typeof DropdownMenuPrimitive.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}\n\nexport function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps) {\n return (\n <DropdownMenuPrimitive.RadioItem\n data-slot=\"dropdown-menu-radio-item\"\n className={cn('relative', dropdownMenuItemVariants({ variant, indented: true }), className)}\n {...props}\n >\n <ItemIndicator>\n <span className=\"h-1.5 w-1.5 rounded-full bg-doom-blue\" />\n </ItemIndicator>\n {children}\n </DropdownMenuPrimitive.RadioItem>\n );\n}\n\nexport function DropdownMenuSub(props: ComponentProps<typeof DropdownMenuPrimitive.Sub>) {\n return <DropdownMenuPrimitive.Sub data-slot=\"dropdown-menu-sub\" {...props} />;\n}\n\n/** The row that opens a submenu; the chevron is part of the row, not the caller's job. */\nexport function DropdownMenuSubTrigger({\n className,\n children,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubTrigger>) {\n return (\n <DropdownMenuPrimitive.SubTrigger\n data-slot=\"dropdown-menu-sub-trigger\"\n className={cn(dropdownMenuItemVariants(), 'data-[state=open]:bg-doom-deep', className)}\n {...props}\n >\n <span className=\"min-w-0 flex-1 truncate\">{children}</span>\n <ChevronRightIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n </DropdownMenuPrimitive.SubTrigger>\n );\n}\n\nexport function DropdownMenuSubContent({\n className,\n sideOffset = 2,\n ...props\n}: ComponentProps<typeof DropdownMenuPrimitive.SubContent>) {\n return (\n <DropdownMenuPrimitive.Portal>\n <DropdownMenuPrimitive.SubContent\n data-slot=\"dropdown-menu-sub-content\"\n sideOffset={sideOffset}\n className={cn(CONTENT_CLASS, className)}\n {...props}\n />\n </DropdownMenuPrimitive.Portal>\n );\n}\n\nexport function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Label>) {\n return (\n <DropdownMenuPrimitive.Label\n data-slot=\"dropdown-menu-label\"\n className={cn('px-2.5 py-1 text-[8px] font-bold tracking-[0.14em] text-doom-faint uppercase', className)}\n {...props}\n />\n );\n}\n\n/** The keystroke printed at the right of a row; the row supplies the gap. */\nexport function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>) {\n return (\n <span\n data-slot=\"dropdown-menu-shortcut\"\n className={cn('ml-auto shrink-0 text-[10px] tracking-[0.08em] text-doom-faint', className)}\n {...props}\n />\n );\n}\n\nexport function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenuPrimitive.Separator>) {\n return (\n <DropdownMenuPrimitive.Separator\n data-slot=\"dropdown-menu-separator\"\n className={cn('my-1 h-px bg-doom-border-soft', className)}\n {...props}\n />\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({title:r,description:i,children:a,className:o,asChild:s=!1,...c}){let l=s?t.Slot.Root:`div`;return(0,n.jsx)(l,{"data-slot":`empty-state`,className:e.cn(`flex flex-1 items-center justify-center`,o),...c,children:(0,n.jsxs)(`div`,{className:`flex w-[520px] max-w-full flex-col items-center gap-3 text-center`,children:[(0,n.jsx)(`span`,{className:`text-[14px] font-bold text-doom-hi`,children:r}),i?(0,n.jsx)(`span`,{className:`text-[11px] leading-relaxed text-doom-dim`,children:i}):null,a]})})}exports.EmptyState=r;
2
+ //# sourceMappingURL=EmptyState.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.cjs","names":["Slot","cn"],"sources":["../../../src/components/EmptyState.tsx"],"sourcesContent":["import { Slot } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '../lib/cn.ts';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Optional calls to action under the copy. */\n children?: ReactNode;\n /**\n * Render the child element instead of a <div>, so an empty row inside a\n * list stays an <li> and the list keeps its semantics.\n */\n asChild?: boolean;\n}\n\n/** The centred \"nothing here yet\" card every empty panel shares. */\nexport function EmptyState({ title, description, children, className, asChild = false, ...props }: EmptyStateProps) {\n const Component = asChild ? Slot.Root : 'div';\n return (\n <Component data-slot=\"empty-state\" className={cn('flex flex-1 items-center justify-center', className)} {...props}>\n <div className=\"flex w-[520px] max-w-full flex-col items-center gap-3 text-center\">\n <span className=\"text-[14px] font-bold text-doom-hi\">{title}</span>\n {description ? <span className=\"text-[11px] leading-relaxed text-doom-dim\">{description}</span> : null}\n {children}\n </div>\n </Component>\n );\n}\n"],"mappings":"0FAiBA,SAAgB,EAAW,CAAE,QAAO,cAAa,WAAU,YAAW,UAAU,GAAO,GAAG,GAA0B,CAClH,IAAM,EAAY,EAAUA,EAAAA,KAAK,KAAO,MACxC,OACE,EAAA,EAAA,IAAA,CAAC,EAAD,CAAW,YAAU,cAAc,UAAWC,EAAAA,GAAG,0CAA2C,CAAS,EAAG,GAAI,EAC1G,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,qCAAsC,SAAA,CAAY,CAAA,EACjE,GAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,4CAA6C,SAAA,CAAkB,CAAA,EAAI,KACjG,CACE,GACI,CAAA,CAEf"}
@@ -0,0 +1,18 @@
1
+ import { ComponentProps, ReactNode } from "react";
2
+ //#region src/components/EmptyState.d.ts
3
+ interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
4
+ title: ReactNode;
5
+ description?: ReactNode;
6
+ /** Optional calls to action under the copy. */
7
+ children?: ReactNode;
8
+ /**
9
+ * Render the child element instead of a <div>, so an empty row inside a
10
+ * list stays an <li> and the list keeps its semantics.
11
+ */
12
+ asChild?: boolean;
13
+ }
14
+ /** The centred "nothing here yet" card every empty panel shares. */
15
+ declare function EmptyState({ title, description, children, className, asChild, ...props }: EmptyStateProps): import("react/jsx-runtime").JSX.Element;
16
+ //#endregion
17
+ export { EmptyState, EmptyStateProps };
18
+ //# sourceMappingURL=EmptyState.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.d.mts","names":[],"sources":["../../../src/components/EmptyState.tsx"],"mappings":";;UAIiB,wBAAwB,KAAK;EAC5C,OAAO;EACP,cAAc;;EAEd,WAAW;;;;;EAKX;;;iBAIc,aAAa,OAAO,aAAa,UAAU,WAAW,YAAoB,SAAS,8CAAe,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{Slot as t}from"radix-ui";import{jsx as n,jsxs as r}from"react/jsx-runtime";function i({title:i,description:a,children:o,className:s,asChild:c=!1,...l}){let u=c?t.Root:`div`;return n(u,{"data-slot":`empty-state`,className:e(`flex flex-1 items-center justify-center`,s),...l,children:r(`div`,{className:`flex w-[520px] max-w-full flex-col items-center gap-3 text-center`,children:[n(`span`,{className:`text-[14px] font-bold text-doom-hi`,children:i}),a?n(`span`,{className:`text-[11px] leading-relaxed text-doom-dim`,children:a}):null,o]})})}export{i as EmptyState};
2
+ //# sourceMappingURL=EmptyState.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"EmptyState.mjs","names":[],"sources":["../../../src/components/EmptyState.tsx"],"sourcesContent":["import { Slot } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\nimport { cn } from '../lib/cn.ts';\n\nexport interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {\n title: ReactNode;\n description?: ReactNode;\n /** Optional calls to action under the copy. */\n children?: ReactNode;\n /**\n * Render the child element instead of a <div>, so an empty row inside a\n * list stays an <li> and the list keeps its semantics.\n */\n asChild?: boolean;\n}\n\n/** The centred \"nothing here yet\" card every empty panel shares. */\nexport function EmptyState({ title, description, children, className, asChild = false, ...props }: EmptyStateProps) {\n const Component = asChild ? Slot.Root : 'div';\n return (\n <Component data-slot=\"empty-state\" className={cn('flex flex-1 items-center justify-center', className)} {...props}>\n <div className=\"flex w-[520px] max-w-full flex-col items-center gap-3 text-center\">\n <span className=\"text-[14px] font-bold text-doom-hi\">{title}</span>\n {description ? <span className=\"text-[11px] leading-relaxed text-doom-dim\">{description}</span> : null}\n {children}\n </div>\n </Component>\n );\n}\n"],"mappings":"qHAiBA,SAAgB,EAAW,CAAE,QAAO,cAAa,WAAU,YAAW,UAAU,GAAO,GAAG,GAA0B,CAClH,IAAM,EAAY,EAAU,EAAK,KAAO,MACxC,OACE,EAAC,EAAD,CAAW,YAAU,cAAc,UAAW,EAAG,0CAA2C,CAAS,EAAG,GAAI,EAC1G,SAAA,EAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,CACE,EAAC,OAAD,CAAM,UAAU,qCAAsC,SAAA,CAAY,CAAA,EACjE,EAAc,EAAC,OAAD,CAAM,UAAU,4CAA6C,SAAA,CAAkB,CAAA,EAAI,KACjG,CACE,GACI,CAAA,CAEf"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");const n=(0,require("class-variance-authority").cva)(`min-w-0 font-mono text-doom-hi outline-none placeholder:text-doom-faint disabled:opacity-50 aria-invalid:border-doom-edge-red aria-invalid:text-doom-red`,{variants:{variant:{default:`rounded border border-doom-border bg-doom-deep transition-colors focus:border-doom-blue/60`,bare:`border-0 bg-transparent`},size:{xs:`px-1.5 py-0.5 text-[10px]`,sm:`px-2 py-1 text-[11px]`,md:`px-2.5 py-1.5 text-[12px]`,lg:`px-3 py-2 text-[13px]`}},compoundVariants:[{variant:`bare`,class:`p-0`}],defaultVariants:{variant:`default`,size:`md`}});function r({className:r,type:i,variant:a,size:o,...s}){return(0,t.jsx)(`input`,{type:i??`text`,"data-slot":`input`,spellCheck:!1,className:e.cn(n({variant:a,size:o}),r),...s})}exports.Input=r,exports.fieldVariants=n;
2
+ //# sourceMappingURL=Input.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.cjs","names":["cva","cn"],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 font-mono text-doom-hi outline-none placeholder:text-doom-faint disabled:opacity-50 aria-invalid:border-doom-edge-red aria-invalid:text-doom-red',\n {\n variants: {\n variant: {\n default: 'rounded border border-doom-border bg-doom-deep transition-colors focus:border-doom-blue/60',\n /** No well: a composer or a palette search that draws its own surface. */\n bare: 'border-0 bg-transparent',\n },\n /** The same rungs Button names, so a field and the button beside it line up. */\n size: {\n xs: 'px-1.5 py-0.5 text-[10px]',\n sm: 'px-2 py-1 text-[11px]',\n md: 'px-2.5 py-1.5 text-[12px]',\n lg: 'px-3 py-2 text-[13px]',\n },\n },\n compoundVariants: [\n // A bare field sits inside a surface that already has its own padding,\n // so it keeps the size's type ramp and gives up the size's box.\n { variant: 'bare', class: 'p-0' },\n ],\n defaultVariants: { variant: 'default', size: 'md' },\n },\n);\n\nexport type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;\nexport type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;\n\nexport interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}\n\n/** The one text field: deep well, quiet border, accent border on focus, red edge when invalid. */\nexport function Input({ className, type, variant, size, ...props }: InputProps) {\n return (\n <input\n type={type ?? 'text'}\n data-slot=\"input\"\n spellCheck={false}\n className={cn(fieldVariants({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"oEASA,MAAa,GAAA,oCAAgBA,CAAAA,CAAAA,IAAAA,CAC3B,2JACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6FAET,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,4BACJ,GAAI,wBACJ,GAAI,4BACJ,GAAI,uBACN,CACF,EACA,iBAAkB,CAGhB,CAAE,QAAS,OAAQ,MAAO,KAAM,CAClC,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAQA,SAAgB,EAAM,CAAE,YAAW,OAAM,UAAS,OAAM,GAAG,GAAqB,CAC9E,OACE,EAAA,EAAA,IAAA,CAAC,QAAD,CACE,KAAM,GAAQ,OACd,YAAU,QACV,WAAY,GACZ,UAAWC,EAAAA,GAAG,EAAc,CAAE,UAAS,MAAK,CAAC,EAAG,CAAS,EACzD,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,20 @@
1
+ import { VariantProps } from "class-variance-authority";
2
+ import { ComponentProps } from "react";
3
+ //#region src/components/Input.d.ts
4
+ /**
5
+ * The shape both fields wear, so a single-line and a multi-line field in the
6
+ * same form agree on their well, their type ramp, and their invalid state.
7
+ * Textarea builds on it rather than restating it.
8
+ */
9
+ declare const fieldVariants: (props?: ({
10
+ variant?: "bare" | "default" | null | undefined;
11
+ size?: "lg" | "md" | "sm" | "xs" | null | undefined;
12
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
13
+ type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;
14
+ type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;
15
+ interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}
16
+ /** The one text field: deep well, quiet border, accent border on focus, red edge when invalid. */
17
+ declare function Input({ className, type, variant, size, ...props }: InputProps): import("react/jsx-runtime").JSX.Element;
18
+ //#endregion
19
+ export { FieldSize, FieldVariant, Input, InputProps, fieldVariants };
20
+ //# sourceMappingURL=Input.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.d.mts","names":[],"sources":["../../../src/components/Input.tsx"],"mappings":";;;;;;;;cASa,gBAAa;;;6CAwBzB;KAEW,eAAe,YAAY,oBAAoB;KAC/C,YAAY,YAAY,oBAAoB;UAEvC,mBAAmB,KAAK,kCAAkC,oBAAoB;;iBAG/E,QAAQ,WAAW,MAAM,SAAS,SAAS,SAAS,yCAAU,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`min-w-0 font-mono text-doom-hi outline-none placeholder:text-doom-faint disabled:opacity-50 aria-invalid:border-doom-edge-red aria-invalid:text-doom-red`,{variants:{variant:{default:`rounded border border-doom-border bg-doom-deep transition-colors focus:border-doom-blue/60`,bare:`border-0 bg-transparent`},size:{xs:`px-1.5 py-0.5 text-[10px]`,sm:`px-2 py-1 text-[11px]`,md:`px-2.5 py-1.5 text-[12px]`,lg:`px-3 py-2 text-[13px]`}},compoundVariants:[{variant:`bare`,class:`p-0`}],defaultVariants:{variant:`default`,size:`md`}});function i({className:n,type:i,variant:a,size:o,...s}){return t(`input`,{type:i??`text`,"data-slot":`input`,spellCheck:!1,className:e(r({variant:a,size:o}),n),...s})}export{i as Input,r as fieldVariants};
2
+ //# sourceMappingURL=Input.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Input.mjs","names":[],"sources":["../../../src/components/Input.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/**\n * The shape both fields wear, so a single-line and a multi-line field in the\n * same form agree on their well, their type ramp, and their invalid state.\n * Textarea builds on it rather than restating it.\n */\nexport const fieldVariants = cva(\n 'min-w-0 font-mono text-doom-hi outline-none placeholder:text-doom-faint disabled:opacity-50 aria-invalid:border-doom-edge-red aria-invalid:text-doom-red',\n {\n variants: {\n variant: {\n default: 'rounded border border-doom-border bg-doom-deep transition-colors focus:border-doom-blue/60',\n /** No well: a composer or a palette search that draws its own surface. */\n bare: 'border-0 bg-transparent',\n },\n /** The same rungs Button names, so a field and the button beside it line up. */\n size: {\n xs: 'px-1.5 py-0.5 text-[10px]',\n sm: 'px-2 py-1 text-[11px]',\n md: 'px-2.5 py-1.5 text-[12px]',\n lg: 'px-3 py-2 text-[13px]',\n },\n },\n compoundVariants: [\n // A bare field sits inside a surface that already has its own padding,\n // so it keeps the size's type ramp and gives up the size's box.\n { variant: 'bare', class: 'p-0' },\n ],\n defaultVariants: { variant: 'default', size: 'md' },\n },\n);\n\nexport type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;\nexport type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;\n\nexport interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}\n\n/** The one text field: deep well, quiet border, accent border on focus, red edge when invalid. */\nexport function Input({ className, type, variant, size, ...props }: InputProps) {\n return (\n <input\n type={type ?? 'text'}\n data-slot=\"input\"\n spellCheck={false}\n className={cn(fieldVariants({ variant, size }), className)}\n {...props}\n />\n );\n}\n"],"mappings":"0HASA,MAAa,EAAgB,EAC3B,2JACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6FAET,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,4BACJ,GAAI,wBACJ,GAAI,4BACJ,GAAI,uBACN,CACF,EACA,iBAAkB,CAGhB,CAAE,QAAS,OAAQ,MAAO,KAAM,CAClC,EACA,gBAAiB,CAAE,QAAS,UAAW,KAAM,IAAK,CACpD,CACF,EAQA,SAAgB,EAAM,CAAE,YAAW,OAAM,UAAS,OAAM,GAAG,GAAqB,CAC9E,OACE,EAAC,QAAD,CACE,KAAM,GAAQ,OACd,YAAU,QACV,WAAY,GACZ,UAAW,EAAG,EAAc,CAAE,UAAS,MAAK,CAAC,EAAG,CAAS,EACzD,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");function n({className:n,...r}){return(0,t.jsx)(`kbd`,{"data-slot":`kbd`,className:e.cn(`inline-flex items-center rounded bg-doom-deep px-1.5 py-0.5 font-mono text-[8px] font-bold text-doom-faint`,n),...r})}exports.Kbd=n;
2
+ //# sourceMappingURL=Kbd.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.cjs","names":["cn"],"sources":["../../../src/components/Kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A key or key path, drawn as the leader hints draw them. */\nexport function Kbd({ className, ...props }: ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex items-center rounded bg-doom-deep px-1.5 py-0.5 font-mono text-[8px] font-bold text-doom-faint',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"oEAIA,SAAgB,EAAI,CAAE,YAAW,GAAG,GAAgC,CAClE,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CACE,YAAU,MACV,UAAWA,EAAAA,GACT,6GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,7 @@
1
+ import { ComponentProps } from "react";
2
+ //#region src/components/Kbd.d.ts
3
+ /** A key or key path, drawn as the leader hints draw them. */
4
+ declare function Kbd({ className, ...props }: ComponentProps<'kbd'>): import("react/jsx-runtime").JSX.Element;
5
+ //#endregion
6
+ export { Kbd };
7
+ //# sourceMappingURL=Kbd.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.d.mts","names":[],"sources":["../../../src/components/Kbd.tsx"],"mappings":";;;iBAIgB,MAAM,cAAc,SAAS,oDAAqB,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";function n({className:n,...r}){return t(`kbd`,{"data-slot":`kbd`,className:e(`inline-flex items-center rounded bg-doom-deep px-1.5 py-0.5 font-mono text-[8px] font-bold text-doom-faint`,n),...r})}export{n as Kbd};
2
+ //# sourceMappingURL=Kbd.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Kbd.mjs","names":[],"sources":["../../../src/components/Kbd.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A key or key path, drawn as the leader hints draw them. */\nexport function Kbd({ className, ...props }: ComponentProps<'kbd'>) {\n return (\n <kbd\n data-slot=\"kbd\"\n className={cn(\n 'inline-flex items-center rounded bg-doom-deep px-1.5 py-0.5 font-mono text-[8px] font-bold text-doom-faint',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"2EAIA,SAAgB,EAAI,CAAE,YAAW,GAAG,GAAgC,CAClE,OACE,EAAC,MAAD,CACE,YAAU,MACV,UAAW,EACT,6GACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs");let t=require("radix-ui"),n=require("react/jsx-runtime");function r({className:r,...i}){return(0,n.jsx)(t.Label.Root,{"data-slot":`label`,className:e.cn(`flex items-center gap-1.5 text-[10px] text-doom-faint select-none has-[+:disabled]:opacity-50`,r),...i})}exports.Label=r;
2
+ //# sourceMappingURL=Label.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.cjs","names":["LabelPrimitive","cn"],"sources":["../../../src/components/Label.tsx"],"sourcesContent":["import { Label as LabelPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A field's name: clicking it focuses the control, which a bare span never does. */\nexport function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-1.5 text-[10px] text-doom-faint select-none has-[+:disabled]:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"0FAKA,SAAgB,EAAM,CAAE,YAAW,GAAG,GAAqD,CACzF,OACE,EAAA,EAAA,IAAA,CAACA,EAAAA,MAAe,KAAhB,CACE,YAAU,QACV,UAAWC,EAAAA,GACT,gGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,8 @@
1
+ import { Label } from "radix-ui";
2
+ import { ComponentProps } from "react";
3
+ //#region src/components/Label.d.ts
4
+ /** A field's name: clicking it focuses the control, which a bare span never does. */
5
+ declare function Label$1({ className, ...props }: ComponentProps<typeof Label.Root>): import("react/jsx-runtime").JSX.Element;
6
+ //#endregion
7
+ export { Label$1 as Label };
8
+ //# sourceMappingURL=Label.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.d.mts","names":[],"sources":["../../../src/components/Label.tsx"],"mappings":";;;;iBAKgB,UAAQ,cAAc,SAAS,sBAAsB,MAAe,oCAAK,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{Label as t}from"radix-ui";import{jsx as n}from"react/jsx-runtime";function r({className:r,...i}){return n(t.Root,{"data-slot":`label`,className:e(`flex items-center gap-1.5 text-[10px] text-doom-faint select-none has-[+:disabled]:opacity-50`,r),...i})}export{r as Label};
2
+ //# sourceMappingURL=Label.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Label.mjs","names":["Label","LabelPrimitive"],"sources":["../../../src/components/Label.tsx"],"sourcesContent":["import { Label as LabelPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\n\n/** A field's name: clicking it focuses the control, which a bare span never does. */\nexport function Label({ className, ...props }: ComponentProps<typeof LabelPrimitive.Root>) {\n return (\n <LabelPrimitive.Root\n data-slot=\"label\"\n className={cn(\n 'flex items-center gap-1.5 text-[10px] text-doom-faint select-none has-[+:disabled]:opacity-50',\n className,\n )}\n {...props}\n />\n );\n}\n"],"mappings":"4GAKA,SAAgBA,EAAM,CAAE,YAAW,GAAG,GAAqD,CACzF,OACE,EAACC,EAAe,KAAhB,CACE,YAAU,QACV,UAAW,EACT,gGACA,CACF,EACA,GAAI,CACL,CAAA,CAEL"}
@@ -0,0 +1,2 @@
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react/jsx-runtime"),n=require("react-markdown");n=e.__toESM(n,1);let r=require("remark-gfm");r=e.__toESM(r,1);const i=[r.default];function a({className:e,children:n,...r}){return(0,t.jsx)(`code`,{...r,className:`${e??``} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:n})}const o={p:({children:e})=>(0,t.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:e}),strong:({children:e})=>(0,t.jsx)(`strong`,{className:`font-bold text-doom-hi`,children:e}),em:({children:e})=>(0,t.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,t.jsx)(`del`,{className:`text-doom-dim line-through`,children:e}),a:({href:e,children:n})=>(0,t.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:a,pre:({children:e})=>(0,t.jsx)(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:e}),ul:({children:e})=>(0,t.jsx)(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>(0,t.jsx)(`ol`,{className:`list-decimal pl-5`,children:e}),li:({children:e})=>(0,t.jsx)(`li`,{className:`whitespace-pre-wrap break-words`,children:e}),h1:({children:e})=>(0,t.jsx)(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:e}),h2:({children:e})=>(0,t.jsx)(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:e}),h3:({children:e})=>(0,t.jsx)(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:e}),h4:({children:e})=>(0,t.jsx)(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:e}),blockquote:({children:e})=>(0,t.jsx)(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:e}),hr:()=>(0,t.jsx)(`hr`,{className:`border-doom-border-soft`}),table:({children:e})=>(0,t.jsx)(`div`,{className:`overflow-x-auto`,children:(0,t.jsx)(`table`,{className:`border-collapse text-[12px]`,children:e})}),th:({children:e})=>(0,t.jsx)(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:e}),td:({children:e})=>(0,t.jsx)(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:e}),img:({src:e,alt:n})=>(0,t.jsx)(`img`,{src:e,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function s({text:e}){return(0,t.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:(0,t.jsx)(n.default,{remarkPlugins:i,components:o,children:e})})}exports.Markdown=s;
2
+ //# sourceMappingURL=Markdown.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.cjs","names":["remarkGfm","ReactMarkdown"],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n return (\n <code\n {...rest}\n className={`${className ?? ''} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text }: { text: string }) {\n return (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n"],"mappings":"qLAIA,MAAM,EAAiB,CAACA,EAAAA,OAAS,EAEjC,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,OACE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,gIAE7B,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,eACV,EAAA,EAAA,IAAA,CAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,eACN,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,eACb,EAAA,EAAA,IAAA,CAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,QAAU,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,eACR,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACb,UAAA,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,eACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,UACX,EAAA,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,QAA0B,CACnD,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8BACb,UAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CAET"}
@@ -0,0 +1,8 @@
1
+ //#region src/components/Markdown.d.ts
2
+ /** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */
3
+ declare function Markdown({ text }: {
4
+ text: string;
5
+ }): import("react/jsx-runtime").JSX.Element;
6
+ //#endregion
7
+ export { Markdown };
8
+ //# sourceMappingURL=Markdown.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../src/components/Markdown.tsx"],"mappings":";;iBA2DgB,WAAW;EAAU;gCAAc,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{jsx as e}from"react/jsx-runtime";import t from"react-markdown";import n from"remark-gfm";const r=[n];function i({className:t,children:n,...r}){return e(`code`,{...r,className:`${t??``} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:n})}const a={p:({children:t})=>e(`p`,{className:`whitespace-pre-wrap break-words`,children:t}),strong:({children:t})=>e(`strong`,{className:`font-bold text-doom-hi`,children:t}),em:({children:t})=>e(`em`,{className:`italic`,children:t}),del:({children:t})=>e(`del`,{className:`text-doom-dim line-through`,children:t}),a:({href:t,children:n})=>e(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:i,pre:({children:t})=>e(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:t}),ul:({children:t})=>e(`ul`,{className:`list-disc pl-5`,children:t}),ol:({children:t})=>e(`ol`,{className:`list-decimal pl-5`,children:t}),li:({children:t})=>e(`li`,{className:`whitespace-pre-wrap break-words`,children:t}),h1:({children:t})=>e(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:t}),h2:({children:t})=>e(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:t}),h3:({children:t})=>e(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:t}),h4:({children:t})=>e(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:t}),blockquote:({children:t})=>e(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:t}),hr:()=>e(`hr`,{className:`border-doom-border-soft`}),table:({children:t})=>e(`div`,{className:`overflow-x-auto`,children:e(`table`,{className:`border-collapse text-[12px]`,children:t})}),th:({children:t})=>e(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:t}),td:({children:t})=>e(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:t}),img:({src:t,alt:n})=>e(`img`,{src:t,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function o({text:n}){return e(`div`,{className:`flex min-w-0 flex-col gap-2`,children:e(t,{remarkPlugins:r,components:a,children:n})})}export{o as Markdown};
2
+ //# sourceMappingURL=Markdown.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Markdown.mjs","names":[],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n return (\n <code\n {...rest}\n className={`${className ?? ''} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text }: { text: string }) {\n return (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n"],"mappings":"gGAIA,MAAM,EAAiB,CAAC,CAAS,EAEjC,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,OACE,EAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,gIAE7B,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,cAAe,EAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,cAAe,EAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,cAAe,EAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,cACV,EAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,cACN,EAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,cACb,EAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,OAAU,EAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,cACR,EAAC,MAAD,CAAK,UAAU,kBACb,SAAA,EAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,cACL,EAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,SACX,EAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,QAA0B,CACnD,OACE,EAAC,MAAD,CAAK,UAAU,8BACb,SAAA,EAAC,EAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CAET"}
@@ -0,0 +1,2 @@
1
+ require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Button.cjs"),n=require("./StatusBadge.cjs");let r=require("react/jsx-runtime"),i=require("class-variance-authority"),a=require("react"),o=require("lucide-react");const s=(0,a.createContext)({tone:`neutral`,expandable:!1,expanded:!1,toggle:()=>void 0});function c(){return(0,a.useContext)(s)}const l=(0,i.cva)(`overflow-hidden rounded-md border bg-doom-panel transition-colors`,{variants:{tone:n.STATUS_EDGE},defaultVariants:{tone:`neutral`}});function u({className:t,tone:n,expandable:i=!1,defaultExpanded:o=!1,expanded:c,onExpandedChange:u,children:d,...f}){let[p,m]=(0,a.useState)(o),h=c??p,g={tone:n??`neutral`,expandable:i,expanded:h,toggle:()=>{let e=!h;c===void 0&&m(e),u?.(e)}};return(0,r.jsx)(s.Provider,{value:g,children:(0,r.jsx)(`div`,{"data-slot":`message-item`,"data-expanded":h,className:e.cn(l({tone:n}),t),...f,children:typeof d==`function`?d(g):d})})}function d(e){return e.running?`running`:e.isError?`error`:`ok`}const f={neutral:``,running:`RUNNING`,ok:`OK`,error:`ERROR`,info:`INFO`,accent:`NOTE`};function p({className:i,title:a,badge:s,children:l,...u}){let{tone:d,expandable:p,expanded:m,toggle:h}=c(),g=s===void 0?f[d]:s;return(0,r.jsxs)(`div`,{"data-slot":`message-item-header`,className:e.cn(`flex min-h-8 items-center gap-2 px-[11px] text-[11px] text-doom-dim`,i),...u,children:[(0,r.jsx)(`span`,{className:`shrink-0 font-bold text-doom-hi`,children:a}),(0,r.jsx)(`div`,{"data-slot":`message-item-summary`,className:`flex min-w-0 flex-1 items-center gap-2`,children:l}),g!==null&&g!==``?(0,r.jsx)(n.StatusBadge,{tone:d,"data-testid":`tool-status`,children:g}):null,p?(0,r.jsx)(t.Button,{variant:`ghost`,size:`icon`,"data-testid":`tool-expand`,"aria-expanded":m,"aria-label":m?`collapse`:`expand`,onClick:h,className:`text-doom-faint hover:text-doom-blue`,children:m?(0,r.jsx)(o.ChevronUp,{className:`h-3 w-3`}):(0,r.jsx)(o.ChevronDown,{className:`h-3 w-3`})}):null]})}function m({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`message-item-body`,className:e.cn(`border-t border-doom-border-soft bg-doom-deep px-3 py-2 text-[11px] text-doom-dim`,t),...n})}const h={neutral:`…`,running:`◐`,ok:`✓`,error:`✗`,info:`●`,accent:`●`},g=(0,i.cva)(`shrink-0`,{variants:{tone:{neutral:`text-doom-faint`,running:`text-doom-yellow`,ok:`text-doom-green`,error:`text-doom-red`,info:`text-doom-blue`,accent:`text-doom-magenta`}},defaultVariants:{tone:`neutral`}});function _({className:t,tone:n,glyph:i,expands:a=!1,children:o,...s}){let{toggle:l}=c(),u=(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(`span`,{className:g({tone:n}),children:i??h[n??`neutral`]}),(0,r.jsx)(`span`,{children:o})]});return a?(0,r.jsx)(`button`,{type:`button`,"data-slot":`message-item-status`,"data-testid":`tool-more`,onClick:l,className:e.cn(`flex cursor-pointer items-center gap-1.5 text-doom-faint hover:text-doom-blue`,t),children:u}):(0,r.jsx)(`span`,{"data-slot":`message-item-status`,className:e.cn(`flex items-center gap-1.5 text-doom-faint`,t),...s,children:u})}exports.MessageItem=u,exports.MessageItemBody=m,exports.MessageItemHeader=p,exports.MessageItemStatus=_,exports.STATUS_GLYPH=h,exports.STATUS_LABEL=f,exports.messageItemStatusVariants=g,exports.messageItemVariants=l,exports.toolTone=d,exports.useMessageItem=c;
2
+ //# sourceMappingURL=MessageItem.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageItem.cjs","names":["createContext","useContext","cva","STATUS_EDGE","useState","cn","StatusBadge","Button","ChevronUpIcon","ChevronDownIcon"],"sources":["../../../src/components/MessageItem.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type ComponentProps, createContext, type ReactNode, useContext, useState } from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { Button } from './Button.tsx';\nimport { STATUS_EDGE, StatusBadge, type StatusTone } from './StatusBadge.tsx';\n\n/**\n * The message item: the timeline card a tool call, a run, or a notice sits\n * in. The item owns its outcome tone and its expand state; the header, body,\n * and status parts read both from it, so a card composes the parts and never\n * threads `expanded` by hand. A tool message in a web plugin is built from\n * this, and so is the cockpit's own fallback item, which is what keeps them\n * looking alike.\n */\n\nexport interface MessageItemState {\n tone: StatusTone;\n /** Whether the header offers the toggle; an item that hides nothing offers none. */\n expandable: boolean;\n expanded: boolean;\n toggle: () => void;\n}\n\nconst MessageItemContext = createContext<MessageItemState>({\n tone: 'neutral',\n expandable: false,\n expanded: false,\n toggle: () => undefined,\n});\n\n/** The enclosing item's state, for a part that lives deeper than the item's render prop. */\nexport function useMessageItem(): MessageItemState {\n return useContext(MessageItemContext);\n}\n\n/** The frame, wearing the edge STATUS_EDGE names for the tone, so the two never drift apart. */\nexport const messageItemVariants = cva('overflow-hidden rounded-md border bg-doom-panel transition-colors', {\n variants: { tone: STATUS_EDGE },\n defaultVariants: { tone: 'neutral' },\n});\n\nexport interface MessageItemProps\n extends Omit<ComponentProps<'div'>, 'children'>, VariantProps<typeof messageItemVariants> {\n /** Whether the header offers the expand toggle. A toggle that reveals nothing reads as broken, so the card decides. */\n expandable?: boolean;\n defaultExpanded?: boolean;\n /** Controlled mode; pair with onExpandedChange. Omit it and the item keeps its own state. */\n expanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n /** Plain content, or a function of the item's state for a card that picks its lines by `expanded`. */\n children?: ReactNode | ((state: MessageItemState) => ReactNode);\n}\n\nexport function MessageItem({\n className,\n tone,\n expandable = false,\n defaultExpanded = false,\n expanded,\n onExpandedChange,\n children,\n ...props\n}: MessageItemProps) {\n const [own, setOwn] = useState(defaultExpanded);\n const current = expanded ?? own;\n const state: MessageItemState = {\n tone: tone ?? 'neutral',\n expandable,\n expanded: current,\n toggle: () => {\n const next = !current;\n if (expanded === undefined) setOwn(next);\n onExpandedChange?.(next);\n },\n };\n return (\n <MessageItemContext.Provider value={state}>\n <div\n data-slot=\"message-item\"\n data-expanded={current}\n className={cn(messageItemVariants({ tone }), className)}\n {...props}\n >\n {typeof children === 'function' ? children(state) : children}\n </div>\n </MessageItemContext.Provider>\n );\n}\n\n/** The tone a tool call's item wears: running while the tool runs, then its outcome. */\nexport function toolTone(state: { running: boolean; isError: boolean }): StatusTone {\n return state.running ? 'running' : state.isError ? 'error' : 'ok';\n}\n\n/** The badge text a tone reads as when the header is not told otherwise; empty hides the badge. */\nexport const STATUS_LABEL: Readonly<Record<StatusTone, string>> = {\n neutral: '',\n running: 'RUNNING',\n ok: 'OK',\n error: 'ERROR',\n info: 'INFO',\n accent: 'NOTE',\n};\n\nexport interface MessageItemHeaderProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The bold label at the left: the tool name. */\n title: ReactNode;\n /** The badge text; defaults to the tone's label, null hides the badge. */\n badge?: ReactNode | null;\n /** The summary beside the title; it gets the remaining width. */\n children?: ReactNode;\n}\n\n/** The title row: label, summary, the tone's badge, and the expand toggle when the item is expandable. */\nexport function MessageItemHeader({ className, title, badge, children, ...props }: MessageItemHeaderProps) {\n const { tone, expandable, expanded, toggle } = useMessageItem();\n const label = badge === undefined ? STATUS_LABEL[tone] : badge;\n return (\n <div\n data-slot=\"message-item-header\"\n className={cn('flex min-h-8 items-center gap-2 px-[11px] text-[11px] text-doom-dim', className)}\n {...props}\n >\n <span className=\"shrink-0 font-bold text-doom-hi\">{title}</span>\n <div data-slot=\"message-item-summary\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n {children}\n </div>\n {label !== null && label !== '' ? (\n <StatusBadge tone={tone} data-testid=\"tool-status\">\n {label}\n </StatusBadge>\n ) : null}\n {expandable ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"tool-expand\"\n aria-expanded={expanded}\n aria-label={expanded ? 'collapse' : 'expand'}\n onClick={toggle}\n className=\"text-doom-faint hover:text-doom-blue\"\n >\n {expanded ? <ChevronUpIcon className=\"h-3 w-3\" /> : <ChevronDownIcon className=\"h-3 w-3\" />}\n </Button>\n ) : null}\n </div>\n );\n}\n\n/** The recessed body under the header. */\nexport function MessageItemBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-item-body\"\n className={cn('border-t border-doom-border-soft bg-doom-deep px-3 py-2 text-[11px] text-doom-dim', className)}\n {...props}\n />\n );\n}\n\n/** The glyph a tone reads as in a status line. */\nexport const STATUS_GLYPH: Readonly<Record<StatusTone, string>> = {\n neutral: '…',\n running: '◐',\n ok: '✓',\n error: '✗',\n info: '●',\n accent: '●',\n};\n\nexport const messageItemStatusVariants = cva('shrink-0', {\n variants: {\n tone: {\n neutral: 'text-doom-faint',\n running: 'text-doom-yellow',\n ok: 'text-doom-green',\n error: 'text-doom-red',\n info: 'text-doom-blue',\n accent: 'text-doom-magenta',\n } satisfies Record<StatusTone, string>,\n },\n defaultVariants: { tone: 'neutral' },\n});\n\nexport interface MessageItemStatusProps extends ComponentProps<'span'>, VariantProps<typeof messageItemStatusVariants> {\n /** Replaces the tone's glyph. */\n glyph?: string;\n /** Renders as a button that expands the item: the \"N more line(s)\" hint. Only className carries over. */\n expands?: boolean;\n}\n\n/** The one-line status under a body: `◐ running`, `✗ failed`, `✓ done`, or the hint that more is hidden. */\nexport function MessageItemStatus({\n className,\n tone,\n glyph,\n expands = false,\n children,\n ...props\n}: MessageItemStatusProps) {\n const { toggle } = useMessageItem();\n const content = (\n <>\n <span className={messageItemStatusVariants({ tone })}>{glyph ?? STATUS_GLYPH[tone ?? 'neutral']}</span>\n <span>{children}</span>\n </>\n );\n if (expands) {\n return (\n <button\n type=\"button\"\n data-slot=\"message-item-status\"\n data-testid=\"tool-more\"\n onClick={toggle}\n className={cn('flex cursor-pointer items-center gap-1.5 text-doom-faint hover:text-doom-blue', className)}\n >\n {content}\n </button>\n );\n }\n return (\n <span\n data-slot=\"message-item-status\"\n className={cn('flex items-center gap-1.5 text-doom-faint', className)}\n {...props}\n >\n {content}\n </span>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,71 @@
1
+ import { StatusTone } from "./StatusBadge.mjs";
2
+ import { VariantProps } from "class-variance-authority";
3
+ import { ComponentProps, ReactNode } from "react";
4
+ //#region src/components/MessageItem.d.ts
5
+ /**
6
+ * The message item: the timeline card a tool call, a run, or a notice sits
7
+ * in. The item owns its outcome tone and its expand state; the header, body,
8
+ * and status parts read both from it, so a card composes the parts and never
9
+ * threads `expanded` by hand. A tool message in a web plugin is built from
10
+ * this, and so is the cockpit's own fallback item, which is what keeps them
11
+ * looking alike.
12
+ */
13
+ interface MessageItemState {
14
+ tone: StatusTone;
15
+ /** Whether the header offers the toggle; an item that hides nothing offers none. */
16
+ expandable: boolean;
17
+ expanded: boolean;
18
+ toggle: () => void;
19
+ }
20
+ /** The enclosing item's state, for a part that lives deeper than the item's render prop. */
21
+ declare function useMessageItem(): MessageItemState;
22
+ /** The frame, wearing the edge STATUS_EDGE names for the tone, so the two never drift apart. */
23
+ declare const messageItemVariants: (props?: ({
24
+ tone?: "accent" | "error" | "info" | "neutral" | "ok" | "running" | null | undefined;
25
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
26
+ interface MessageItemProps extends Omit<ComponentProps<'div'>, 'children'>, VariantProps<typeof messageItemVariants> {
27
+ /** Whether the header offers the expand toggle. A toggle that reveals nothing reads as broken, so the card decides. */
28
+ expandable?: boolean;
29
+ defaultExpanded?: boolean;
30
+ /** Controlled mode; pair with onExpandedChange. Omit it and the item keeps its own state. */
31
+ expanded?: boolean;
32
+ onExpandedChange?: (expanded: boolean) => void;
33
+ /** Plain content, or a function of the item's state for a card that picks its lines by `expanded`. */
34
+ children?: ReactNode | ((state: MessageItemState) => ReactNode);
35
+ }
36
+ declare function MessageItem({ className, tone, expandable, defaultExpanded, expanded, onExpandedChange, children, ...props }: MessageItemProps): import("react/jsx-runtime").JSX.Element;
37
+ /** The tone a tool call's item wears: running while the tool runs, then its outcome. */
38
+ declare function toolTone(state: {
39
+ running: boolean;
40
+ isError: boolean;
41
+ }): StatusTone;
42
+ /** The badge text a tone reads as when the header is not told otherwise; empty hides the badge. */
43
+ declare const STATUS_LABEL: Readonly<Record<StatusTone, string>>;
44
+ interface MessageItemHeaderProps extends Omit<ComponentProps<'div'>, 'title'> {
45
+ /** The bold label at the left: the tool name. */
46
+ title: ReactNode;
47
+ /** The badge text; defaults to the tone's label, null hides the badge. */
48
+ badge?: ReactNode | null;
49
+ /** The summary beside the title; it gets the remaining width. */
50
+ children?: ReactNode;
51
+ }
52
+ /** The title row: label, summary, the tone's badge, and the expand toggle when the item is expandable. */
53
+ declare function MessageItemHeader({ className, title, badge, children, ...props }: MessageItemHeaderProps): import("react/jsx-runtime").JSX.Element;
54
+ /** The recessed body under the header. */
55
+ declare function MessageItemBody({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
56
+ /** The glyph a tone reads as in a status line. */
57
+ declare const STATUS_GLYPH: Readonly<Record<StatusTone, string>>;
58
+ declare const messageItemStatusVariants: (props?: ({
59
+ tone?: "accent" | "error" | "info" | "neutral" | "ok" | "running" | null | undefined;
60
+ } & import("class-variance-authority/types").ClassProp) | undefined) => string;
61
+ interface MessageItemStatusProps extends ComponentProps<'span'>, VariantProps<typeof messageItemStatusVariants> {
62
+ /** Replaces the tone's glyph. */
63
+ glyph?: string;
64
+ /** Renders as a button that expands the item: the "N more line(s)" hint. Only className carries over. */
65
+ expands?: boolean;
66
+ }
67
+ /** The one-line status under a body: `◐ running`, `✗ failed`, `✓ done`, or the hint that more is hidden. */
68
+ declare function MessageItemStatus({ className, tone, glyph, expands, children, ...props }: MessageItemStatusProps): import("react/jsx-runtime").JSX.Element;
69
+ //#endregion
70
+ export { MessageItem, MessageItemBody, MessageItemHeader, MessageItemHeaderProps, MessageItemProps, MessageItemState, MessageItemStatus, MessageItemStatusProps, STATUS_GLYPH, STATUS_LABEL, messageItemStatusVariants, messageItemVariants, toolTone, useMessageItem };
71
+ //# sourceMappingURL=MessageItem.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageItem.d.mts","names":[],"sources":["../../../src/components/MessageItem.tsx"],"mappings":";;;;;;;;;;;;UAgBiB;EACf,MAAM;;EAEN;EACA;EACA;;;iBAWc,kBAAkB;;cAKrB,sBAAmB;;6CAG9B;UAEe,yBACP,KAAK,oCAAoC,oBAAoB;;EAErE;EACA;;EAEA;EACA,oBAAoB;;EAEpB,WAAW,cAAc,OAAO,qBAAqB;;iBAGvC,cACd,WACA,MACA,YACA,iBACA,UACA,kBACA,aACG,SACF,+CAAgB,IAAA;;iBA4BH,SAAS;EAAS;EAAkB;IAAqB;;cAK5D,cAAc,SAAS,OAAO;UAS1B,+BAA+B,KAAK;;EAEnD,OAAO;;EAEP,QAAQ;;EAER,WAAW;;;iBAIG,oBAAoB,WAAW,OAAO,OAAO,aAAa,SAAS,qDAAsB,IAAA;;iBAoCzF,kBAAkB,cAAc,SAAS,oDAAqB,IAAA;;cAWjE,cAAc,SAAS,OAAO;cAS9B,4BAAyB;;6CAYpC;UAEe,+BAA+B,wBAAwB,oBAAoB;;EAE1F;;EAEA;;;iBAIc,oBACd,WACA,MACA,OACA,SACA,aACG,SACF,qDAAsB,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{ChevronDownIcon as e,ChevronUpIcon as t}from"../icons/icons.mjs";import{cn as n}from"../lib/cn.mjs";import{Button as r}from"./Button.mjs";import{STATUS_EDGE as i,StatusBadge as a}from"./StatusBadge.mjs";import{Fragment as o,jsx as s,jsxs as c}from"react/jsx-runtime";import{cva as l}from"class-variance-authority";import{createContext as u,useContext as d,useState as f}from"react";const p=u({tone:`neutral`,expandable:!1,expanded:!1,toggle:()=>void 0});function m(){return d(p)}const h=l(`overflow-hidden rounded-md border bg-doom-panel transition-colors`,{variants:{tone:i},defaultVariants:{tone:`neutral`}});function g({className:e,tone:t,expandable:r=!1,defaultExpanded:i=!1,expanded:a,onExpandedChange:o,children:c,...l}){let[u,d]=f(i),m=a??u,g={tone:t??`neutral`,expandable:r,expanded:m,toggle:()=>{let e=!m;a===void 0&&d(e),o?.(e)}};return s(p.Provider,{value:g,children:s(`div`,{"data-slot":`message-item`,"data-expanded":m,className:n(h({tone:t}),e),...l,children:typeof c==`function`?c(g):c})})}function _(e){return e.running?`running`:e.isError?`error`:`ok`}const v={neutral:``,running:`RUNNING`,ok:`OK`,error:`ERROR`,info:`INFO`,accent:`NOTE`};function y({className:i,title:o,badge:l,children:u,...d}){let{tone:f,expandable:p,expanded:h,toggle:g}=m(),_=l===void 0?v[f]:l;return c(`div`,{"data-slot":`message-item-header`,className:n(`flex min-h-8 items-center gap-2 px-[11px] text-[11px] text-doom-dim`,i),...d,children:[s(`span`,{className:`shrink-0 font-bold text-doom-hi`,children:o}),s(`div`,{"data-slot":`message-item-summary`,className:`flex min-w-0 flex-1 items-center gap-2`,children:u}),_!==null&&_!==``?s(a,{tone:f,"data-testid":`tool-status`,children:_}):null,p?s(r,{variant:`ghost`,size:`icon`,"data-testid":`tool-expand`,"aria-expanded":h,"aria-label":h?`collapse`:`expand`,onClick:g,className:`text-doom-faint hover:text-doom-blue`,children:s(h?t:e,{className:`h-3 w-3`})}):null]})}function b({className:e,...t}){return s(`div`,{"data-slot":`message-item-body`,className:n(`border-t border-doom-border-soft bg-doom-deep px-3 py-2 text-[11px] text-doom-dim`,e),...t})}const x={neutral:`…`,running:`◐`,ok:`✓`,error:`✗`,info:`●`,accent:`●`},S=l(`shrink-0`,{variants:{tone:{neutral:`text-doom-faint`,running:`text-doom-yellow`,ok:`text-doom-green`,error:`text-doom-red`,info:`text-doom-blue`,accent:`text-doom-magenta`}},defaultVariants:{tone:`neutral`}});function C({className:e,tone:t,glyph:r,expands:i=!1,children:a,...l}){let{toggle:u}=m(),d=c(o,{children:[s(`span`,{className:S({tone:t}),children:r??x[t??`neutral`]}),s(`span`,{children:a})]});return i?s(`button`,{type:`button`,"data-slot":`message-item-status`,"data-testid":`tool-more`,onClick:u,className:n(`flex cursor-pointer items-center gap-1.5 text-doom-faint hover:text-doom-blue`,e),children:d}):s(`span`,{"data-slot":`message-item-status`,className:n(`flex items-center gap-1.5 text-doom-faint`,e),...l,children:d})}export{g as MessageItem,b as MessageItemBody,y as MessageItemHeader,C as MessageItemStatus,x as STATUS_GLYPH,v as STATUS_LABEL,S as messageItemStatusVariants,h as messageItemVariants,_ as toolTone,m as useMessageItem};
2
+ //# sourceMappingURL=MessageItem.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageItem.mjs","names":[],"sources":["../../../src/components/MessageItem.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { type ComponentProps, createContext, type ReactNode, useContext, useState } from 'react';\nimport { ChevronDownIcon, ChevronUpIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { Button } from './Button.tsx';\nimport { STATUS_EDGE, StatusBadge, type StatusTone } from './StatusBadge.tsx';\n\n/**\n * The message item: the timeline card a tool call, a run, or a notice sits\n * in. The item owns its outcome tone and its expand state; the header, body,\n * and status parts read both from it, so a card composes the parts and never\n * threads `expanded` by hand. A tool message in a web plugin is built from\n * this, and so is the cockpit's own fallback item, which is what keeps them\n * looking alike.\n */\n\nexport interface MessageItemState {\n tone: StatusTone;\n /** Whether the header offers the toggle; an item that hides nothing offers none. */\n expandable: boolean;\n expanded: boolean;\n toggle: () => void;\n}\n\nconst MessageItemContext = createContext<MessageItemState>({\n tone: 'neutral',\n expandable: false,\n expanded: false,\n toggle: () => undefined,\n});\n\n/** The enclosing item's state, for a part that lives deeper than the item's render prop. */\nexport function useMessageItem(): MessageItemState {\n return useContext(MessageItemContext);\n}\n\n/** The frame, wearing the edge STATUS_EDGE names for the tone, so the two never drift apart. */\nexport const messageItemVariants = cva('overflow-hidden rounded-md border bg-doom-panel transition-colors', {\n variants: { tone: STATUS_EDGE },\n defaultVariants: { tone: 'neutral' },\n});\n\nexport interface MessageItemProps\n extends Omit<ComponentProps<'div'>, 'children'>, VariantProps<typeof messageItemVariants> {\n /** Whether the header offers the expand toggle. A toggle that reveals nothing reads as broken, so the card decides. */\n expandable?: boolean;\n defaultExpanded?: boolean;\n /** Controlled mode; pair with onExpandedChange. Omit it and the item keeps its own state. */\n expanded?: boolean;\n onExpandedChange?: (expanded: boolean) => void;\n /** Plain content, or a function of the item's state for a card that picks its lines by `expanded`. */\n children?: ReactNode | ((state: MessageItemState) => ReactNode);\n}\n\nexport function MessageItem({\n className,\n tone,\n expandable = false,\n defaultExpanded = false,\n expanded,\n onExpandedChange,\n children,\n ...props\n}: MessageItemProps) {\n const [own, setOwn] = useState(defaultExpanded);\n const current = expanded ?? own;\n const state: MessageItemState = {\n tone: tone ?? 'neutral',\n expandable,\n expanded: current,\n toggle: () => {\n const next = !current;\n if (expanded === undefined) setOwn(next);\n onExpandedChange?.(next);\n },\n };\n return (\n <MessageItemContext.Provider value={state}>\n <div\n data-slot=\"message-item\"\n data-expanded={current}\n className={cn(messageItemVariants({ tone }), className)}\n {...props}\n >\n {typeof children === 'function' ? children(state) : children}\n </div>\n </MessageItemContext.Provider>\n );\n}\n\n/** The tone a tool call's item wears: running while the tool runs, then its outcome. */\nexport function toolTone(state: { running: boolean; isError: boolean }): StatusTone {\n return state.running ? 'running' : state.isError ? 'error' : 'ok';\n}\n\n/** The badge text a tone reads as when the header is not told otherwise; empty hides the badge. */\nexport const STATUS_LABEL: Readonly<Record<StatusTone, string>> = {\n neutral: '',\n running: 'RUNNING',\n ok: 'OK',\n error: 'ERROR',\n info: 'INFO',\n accent: 'NOTE',\n};\n\nexport interface MessageItemHeaderProps extends Omit<ComponentProps<'div'>, 'title'> {\n /** The bold label at the left: the tool name. */\n title: ReactNode;\n /** The badge text; defaults to the tone's label, null hides the badge. */\n badge?: ReactNode | null;\n /** The summary beside the title; it gets the remaining width. */\n children?: ReactNode;\n}\n\n/** The title row: label, summary, the tone's badge, and the expand toggle when the item is expandable. */\nexport function MessageItemHeader({ className, title, badge, children, ...props }: MessageItemHeaderProps) {\n const { tone, expandable, expanded, toggle } = useMessageItem();\n const label = badge === undefined ? STATUS_LABEL[tone] : badge;\n return (\n <div\n data-slot=\"message-item-header\"\n className={cn('flex min-h-8 items-center gap-2 px-[11px] text-[11px] text-doom-dim', className)}\n {...props}\n >\n <span className=\"shrink-0 font-bold text-doom-hi\">{title}</span>\n <div data-slot=\"message-item-summary\" className=\"flex min-w-0 flex-1 items-center gap-2\">\n {children}\n </div>\n {label !== null && label !== '' ? (\n <StatusBadge tone={tone} data-testid=\"tool-status\">\n {label}\n </StatusBadge>\n ) : null}\n {expandable ? (\n <Button\n variant=\"ghost\"\n size=\"icon\"\n data-testid=\"tool-expand\"\n aria-expanded={expanded}\n aria-label={expanded ? 'collapse' : 'expand'}\n onClick={toggle}\n className=\"text-doom-faint hover:text-doom-blue\"\n >\n {expanded ? <ChevronUpIcon className=\"h-3 w-3\" /> : <ChevronDownIcon className=\"h-3 w-3\" />}\n </Button>\n ) : null}\n </div>\n );\n}\n\n/** The recessed body under the header. */\nexport function MessageItemBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"message-item-body\"\n className={cn('border-t border-doom-border-soft bg-doom-deep px-3 py-2 text-[11px] text-doom-dim', className)}\n {...props}\n />\n );\n}\n\n/** The glyph a tone reads as in a status line. */\nexport const STATUS_GLYPH: Readonly<Record<StatusTone, string>> = {\n neutral: '…',\n running: '◐',\n ok: '✓',\n error: '✗',\n info: '●',\n accent: '●',\n};\n\nexport const messageItemStatusVariants = cva('shrink-0', {\n variants: {\n tone: {\n neutral: 'text-doom-faint',\n running: 'text-doom-yellow',\n ok: 'text-doom-green',\n error: 'text-doom-red',\n info: 'text-doom-blue',\n accent: 'text-doom-magenta',\n } satisfies Record<StatusTone, string>,\n },\n defaultVariants: { tone: 'neutral' },\n});\n\nexport interface MessageItemStatusProps extends ComponentProps<'span'>, VariantProps<typeof messageItemStatusVariants> {\n /** Replaces the tone's glyph. */\n glyph?: string;\n /** Renders as a button that expands the item: the \"N more line(s)\" hint. Only className carries over. */\n expands?: boolean;\n}\n\n/** The one-line status under a body: `◐ running`, `✗ failed`, `✓ done`, or the hint that more is hidden. */\nexport function MessageItemStatus({\n className,\n tone,\n glyph,\n expands = false,\n children,\n ...props\n}: MessageItemStatusProps) {\n const { toggle } = useMessageItem();\n const content = (\n <>\n <span className={messageItemStatusVariants({ tone })}>{glyph ?? STATUS_GLYPH[tone ?? 'neutral']}</span>\n <span>{children}</span>\n </>\n );\n if (expands) {\n return (\n <button\n type=\"button\"\n data-slot=\"message-item-status\"\n data-testid=\"tool-more\"\n onClick={toggle}\n className={cn('flex cursor-pointer items-center gap-1.5 text-doom-faint hover:text-doom-blue', className)}\n >\n {content}\n </button>\n );\n }\n return (\n <span\n data-slot=\"message-item-status\"\n className={cn('flex items-center gap-1.5 text-doom-faint', className)}\n {...props}\n >\n {content}\n </span>\n );\n}\n"],"mappings":"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"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs");let t=require("react/jsx-runtime");const n=(0,require("class-variance-authority").cva)(`whitespace-pre-wrap break-words`,{variants:{tone:{hi:`text-doom-hi`,text:`text-doom-text`,dim:`text-doom-dim`,muted:`text-doom-faint`,success:`text-doom-green`,error:`text-doom-red`,warning:`text-doom-yellow`,accent:`text-doom-blue`},bold:{true:`font-bold`,false:``},indent:{true:`pl-4`,false:``}},defaultVariants:{tone:`dim`,bold:!1,indent:!1}});function r({className:r,lines:i,...a}){return(0,t.jsx)(`div`,{"data-slot":`message-lines`,className:e.cn(`flex flex-col gap-0.5`,r),...a,children:i.map((e,r)=>(0,t.jsx)(`div`,{className:n({tone:e.tone,bold:e.bold===!0,indent:e.indent===!0}),children:e.text},`${String(r)}-${e.text}`))})}exports.MessageLines=r,exports.messageLineVariants=n;
2
+ //# sourceMappingURL=MessageLines.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageLines.cjs","names":["cva","cn"],"sources":["../../../src/components/MessageLines.tsx"],"sourcesContent":["import { cva } from 'class-variance-authority';\nimport type { ComponentProps } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { MessageLineTone as Tone } from '../types/tone.ts';\n\n/** One line of a message body, with the tone the card's pure view logic chose for it. */\nexport type MessageLineTone = Tone;\n\nexport interface MessageLine {\n text: string;\n tone: MessageLineTone;\n bold?: boolean;\n indent?: boolean;\n}\n\nexport const messageLineVariants = cva('whitespace-pre-wrap break-words', {\n variants: {\n tone: {\n hi: 'text-doom-hi',\n text: 'text-doom-text',\n dim: 'text-doom-dim',\n muted: 'text-doom-faint',\n success: 'text-doom-green',\n error: 'text-doom-red',\n warning: 'text-doom-yellow',\n accent: 'text-doom-blue',\n } satisfies Record<Tone, string>,\n bold: { true: 'font-bold', false: '' },\n indent: { true: 'pl-4', false: '' },\n },\n defaultVariants: { tone: 'dim', bold: false, indent: false },\n});\n\nexport interface MessageLinesProps extends ComponentProps<'div'> {\n lines: readonly MessageLine[];\n}\n\n/** A body of toned lines: what a card's view helper computed, drawn one line per row. */\nexport function MessageLines({ className, lines, ...props }: MessageLinesProps) {\n return (\n <div data-slot=\"message-lines\" className={cn('flex flex-col gap-0.5', className)} {...props}>\n {lines.map((line, index) => (\n <div\n key={`${String(index)}-${line.text}`}\n className={messageLineVariants({ tone: line.tone, bold: line.bold === true, indent: line.indent === true })}\n >\n {line.text}\n </div>\n ))}\n </div>\n );\n}\n"],"mappings":"oEAeA,MAAa,GAAA,oCAAsBA,CAAAA,CAAAA,IAAAA,CAAI,kCAAmC,CACxE,SAAU,CACR,KAAM,CACJ,GAAI,eACJ,KAAM,iBACN,IAAK,gBACL,MAAO,kBACP,QAAS,kBACT,MAAO,gBACP,QAAS,mBACT,OAAQ,gBACV,EACA,KAAM,CAAE,KAAM,YAAa,MAAO,EAAG,EACrC,OAAQ,CAAE,KAAM,OAAQ,MAAO,EAAG,CACpC,EACA,gBAAiB,CAAE,KAAM,MAAO,KAAM,GAAO,OAAQ,EAAM,CAC7D,CAAC,EAOD,SAAgB,EAAa,CAAE,YAAW,QAAO,GAAG,GAA4B,CAC9E,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,YAAU,gBAAgB,UAAWC,EAAAA,GAAG,wBAAyB,CAAS,EAAG,GAAI,EACnF,SAAA,EAAM,KAAK,EAAM,KAChB,EAAA,EAAA,IAAA,CAAC,MAAD,CAEE,UAAW,EAAoB,CAAE,KAAM,EAAK,KAAM,KAAM,EAAK,OAAS,GAAM,OAAQ,EAAK,SAAW,EAAK,CAAC,EAEzG,SAAA,EAAK,IACH,EAJE,GAAG,OAAO,CAAK,EAAE,GAAG,EAAK,MAI3B,CACN,CACE,CAAA,CAET"}