@agimon-ai/doompi-web-components 0.0.1-alpha.3 → 0.0.1-alpha.30

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 (496) hide show
  1. package/README.md +7 -7
  2. package/dist/components/Accordion.d.cts +5 -5
  3. package/dist/components/Accordion.d.cts.map +1 -1
  4. package/dist/components/AnsiText.d.cts +16 -0
  5. package/dist/components/AnsiText.d.cts.map +1 -0
  6. package/dist/components/Avatar.d.cts +4 -4
  7. package/dist/components/Avatar.d.cts.map +1 -1
  8. package/dist/components/Badge.d.cts +4 -5
  9. package/dist/components/Badge.d.cts.map +1 -1
  10. package/dist/components/Breadcrumb.d.cts +4 -5
  11. package/dist/components/Breadcrumb.d.cts.map +1 -1
  12. package/dist/components/Button.d.cts +5 -6
  13. package/dist/components/Button.d.cts.map +1 -1
  14. package/dist/components/Checkbox.d.cts +1 -1
  15. package/dist/components/Checkbox.d.cts.map +1 -1
  16. package/dist/components/CodeEditor.d.cts +1 -2
  17. package/dist/components/CodeEditor.d.cts.map +1 -1
  18. package/dist/components/Collapsible.d.cts +4 -4
  19. package/dist/components/Collapsible.d.cts.map +1 -1
  20. package/dist/components/Command.d.cts +11 -12
  21. package/dist/components/Command.d.cts.map +1 -1
  22. package/dist/components/Dialog.d.cts +14 -14
  23. package/dist/components/Dialog.d.cts.map +1 -1
  24. package/dist/components/Dot.d.cts +4 -5
  25. package/dist/components/Dot.d.cts.map +1 -1
  26. package/dist/components/DropdownMenu.d.cts +19 -19
  27. package/dist/components/DropdownMenu.d.cts.map +1 -1
  28. package/dist/components/EmptyState.d.cts +2 -3
  29. package/dist/components/EmptyState.d.cts.map +1 -1
  30. package/dist/components/HashlineLines.d.cts +23 -0
  31. package/dist/components/HashlineLines.d.cts.map +1 -0
  32. package/dist/components/Input.d.cts +5 -6
  33. package/dist/components/Input.d.cts.map +1 -1
  34. package/dist/components/Kbd.d.cts +1 -2
  35. package/dist/components/Kbd.d.cts.map +1 -1
  36. package/dist/components/Label.d.cts +1 -1
  37. package/dist/components/Label.d.cts.map +1 -1
  38. package/dist/components/Markdown.d.cts +12 -3
  39. package/dist/components/Markdown.d.cts.map +1 -1
  40. package/dist/components/MediaPreview.d.cts +39 -3
  41. package/dist/components/MediaPreview.d.cts.map +1 -1
  42. package/dist/components/MessageItem.d.cts +47 -16
  43. package/dist/components/MessageItem.d.cts.map +1 -1
  44. package/dist/components/MessageLines.d.cts +5 -6
  45. package/dist/components/MessageLines.d.cts.map +1 -1
  46. package/dist/components/OptionList.d.cts +8 -9
  47. package/dist/components/OptionList.d.cts.map +1 -1
  48. package/dist/components/Panel.d.cts +4 -5
  49. package/dist/components/Panel.d.cts.map +1 -1
  50. package/dist/components/PdfPreview.d.cts +52 -0
  51. package/dist/components/PdfPreview.d.cts.map +1 -0
  52. package/dist/components/Popover.d.cts +8 -8
  53. package/dist/components/Popover.d.cts.map +1 -1
  54. package/dist/components/Progress.d.cts +1 -1
  55. package/dist/components/Progress.d.cts.map +1 -1
  56. package/dist/components/RadioGroup.d.cts +4 -4
  57. package/dist/components/RadioGroup.d.cts.map +1 -1
  58. package/dist/components/ScrollArea.d.cts +3 -3
  59. package/dist/components/ScrollArea.d.cts.map +1 -1
  60. package/dist/components/SectionLabel.d.cts +1 -2
  61. package/dist/components/SectionLabel.d.cts.map +1 -1
  62. package/dist/components/Select.d.cts +9 -9
  63. package/dist/components/Select.d.cts.map +1 -1
  64. package/dist/components/Separator.d.cts +1 -1
  65. package/dist/components/Separator.d.cts.map +1 -1
  66. package/dist/components/Sheet.d.cts +35 -0
  67. package/dist/components/Sheet.d.cts.map +1 -0
  68. package/dist/components/Skeleton.d.cts +1 -2
  69. package/dist/components/Skeleton.d.cts.map +1 -1
  70. package/dist/components/Spinner.d.cts +2 -3
  71. package/dist/components/Spinner.d.cts.map +1 -1
  72. package/dist/components/StatusBadge.d.cts +5 -6
  73. package/dist/components/StatusBadge.d.cts.map +1 -1
  74. package/dist/components/StreamCursor.d.cts +1 -2
  75. package/dist/components/StreamCursor.d.cts.map +1 -1
  76. package/dist/components/Switch.d.cts +1 -1
  77. package/dist/components/Switch.d.cts.map +1 -1
  78. package/dist/components/SyntaxText.d.cts +50 -0
  79. package/dist/components/SyntaxText.d.cts.map +1 -0
  80. package/dist/components/Tabs.d.cts +10 -10
  81. package/dist/components/Tabs.d.cts.map +1 -1
  82. package/dist/components/TerminalView.d.cts +31 -0
  83. package/dist/components/TerminalView.d.cts.map +1 -0
  84. package/dist/components/Textarea.d.cts +2 -3
  85. package/dist/components/Textarea.d.cts.map +1 -1
  86. package/dist/components/Toast.d.cts +10 -10
  87. package/dist/components/Toast.d.cts.map +1 -1
  88. package/dist/components/ToolPathLink.d.cts +22 -0
  89. package/dist/components/ToolPathLink.d.cts.map +1 -0
  90. package/dist/components/Tooltip.d.cts +5 -5
  91. package/dist/components/Tooltip.d.cts.map +1 -1
  92. package/dist/icons/icons.d.cts +2 -2
  93. package/dist/index.cjs +1 -1
  94. package/dist/index.d.cts +17 -6
  95. package/dist/index.d.mts +17 -6
  96. package/dist/index.mjs +1 -1
  97. package/dist/lib/ansiSpans.d.cts +42 -0
  98. package/dist/lib/ansiSpans.d.cts.map +1 -0
  99. package/dist/lib/cn.d.cts +1 -2
  100. package/dist/lib/cn.d.cts.map +1 -1
  101. package/dist/lib/collapse.d.cts +2 -3
  102. package/dist/lib/collapse.d.cts.map +1 -1
  103. package/dist/lib/editorLanguage.d.cts +2 -3
  104. package/dist/lib/editorLanguage.d.cts.map +1 -1
  105. package/dist/lib/editorTheme.d.cts +76 -0
  106. package/dist/lib/editorTheme.d.cts.map +1 -0
  107. package/dist/lib/hashlineHighlight.d.cts +30 -0
  108. package/dist/lib/hashlineHighlight.d.cts.map +1 -0
  109. package/dist/lib/hashlineView.d.cts +60 -0
  110. package/dist/lib/hashlineView.d.cts.map +1 -0
  111. package/dist/lib/media.d.cts +1 -2
  112. package/dist/lib/media.d.cts.map +1 -1
  113. package/dist/lib/optionList.d.cts +4 -5
  114. package/dist/lib/optionList.d.cts.map +1 -1
  115. package/dist/lib/syntaxHighlight.d.cts +54 -0
  116. package/dist/lib/syntaxHighlight.d.cts.map +1 -0
  117. package/dist/lib/tone.d.cts +4 -5
  118. package/dist/lib/tone.d.cts.map +1 -1
  119. package/dist/src/components/Accordion.cjs +1 -1
  120. package/dist/src/components/Accordion.cjs.map +1 -1
  121. package/dist/src/components/Accordion.d.mts +5 -5
  122. package/dist/src/components/Accordion.d.mts.map +1 -1
  123. package/dist/src/components/Accordion.mjs +1 -1
  124. package/dist/src/components/Accordion.mjs.map +1 -1
  125. package/dist/src/components/AnsiText.cjs +4 -0
  126. package/dist/src/components/AnsiText.cjs.map +1 -0
  127. package/dist/src/components/AnsiText.d.mts +16 -0
  128. package/dist/src/components/AnsiText.d.mts.map +1 -0
  129. package/dist/src/components/AnsiText.mjs +4 -0
  130. package/dist/src/components/AnsiText.mjs.map +1 -0
  131. package/dist/src/components/Avatar.cjs +1 -1
  132. package/dist/src/components/Avatar.cjs.map +1 -1
  133. package/dist/src/components/Avatar.d.mts +4 -4
  134. package/dist/src/components/Avatar.d.mts.map +1 -1
  135. package/dist/src/components/Avatar.mjs +1 -1
  136. package/dist/src/components/Avatar.mjs.map +1 -1
  137. package/dist/src/components/Badge.cjs +1 -1
  138. package/dist/src/components/Badge.cjs.map +1 -1
  139. package/dist/src/components/Badge.d.mts +5 -6
  140. package/dist/src/components/Badge.d.mts.map +1 -1
  141. package/dist/src/components/Badge.mjs +1 -1
  142. package/dist/src/components/Badge.mjs.map +1 -1
  143. package/dist/src/components/Breadcrumb.cjs +1 -1
  144. package/dist/src/components/Breadcrumb.cjs.map +1 -1
  145. package/dist/src/components/Breadcrumb.d.mts +4 -5
  146. package/dist/src/components/Breadcrumb.d.mts.map +1 -1
  147. package/dist/src/components/Breadcrumb.mjs +1 -1
  148. package/dist/src/components/Breadcrumb.mjs.map +1 -1
  149. package/dist/src/components/Button.cjs +1 -1
  150. package/dist/src/components/Button.cjs.map +1 -1
  151. package/dist/src/components/Button.d.mts +6 -7
  152. package/dist/src/components/Button.d.mts.map +1 -1
  153. package/dist/src/components/Button.mjs +1 -1
  154. package/dist/src/components/Button.mjs.map +1 -1
  155. package/dist/src/components/Checkbox.cjs +1 -1
  156. package/dist/src/components/Checkbox.cjs.map +1 -1
  157. package/dist/src/components/Checkbox.d.mts +1 -1
  158. package/dist/src/components/Checkbox.d.mts.map +1 -1
  159. package/dist/src/components/Checkbox.mjs +1 -1
  160. package/dist/src/components/Checkbox.mjs.map +1 -1
  161. package/dist/src/components/CodeBlock.cjs +2 -0
  162. package/dist/src/components/CodeBlock.cjs.map +1 -0
  163. package/dist/src/components/CodeBlock.mjs +2 -0
  164. package/dist/src/components/CodeBlock.mjs.map +1 -0
  165. package/dist/src/components/CodeEditor.cjs.map +1 -1
  166. package/dist/src/components/CodeEditor.d.mts +1 -2
  167. package/dist/src/components/CodeEditor.d.mts.map +1 -1
  168. package/dist/src/components/CodeEditor.mjs.map +1 -1
  169. package/dist/src/components/CodeEditorView.cjs +1 -1
  170. package/dist/src/components/CodeEditorView.cjs.map +1 -1
  171. package/dist/src/components/CodeEditorView.mjs +1 -1
  172. package/dist/src/components/CodeEditorView.mjs.map +1 -1
  173. package/dist/src/components/Collapsible.cjs.map +1 -1
  174. package/dist/src/components/Collapsible.d.mts +4 -4
  175. package/dist/src/components/Collapsible.d.mts.map +1 -1
  176. package/dist/src/components/Collapsible.mjs.map +1 -1
  177. package/dist/src/components/Command.cjs +1 -1
  178. package/dist/src/components/Command.cjs.map +1 -1
  179. package/dist/src/components/Command.d.mts +11 -12
  180. package/dist/src/components/Command.d.mts.map +1 -1
  181. package/dist/src/components/Command.mjs +1 -1
  182. package/dist/src/components/Command.mjs.map +1 -1
  183. package/dist/src/components/CopyButton.cjs +2 -0
  184. package/dist/src/components/CopyButton.cjs.map +1 -0
  185. package/dist/src/components/CopyButton.mjs +2 -0
  186. package/dist/src/components/CopyButton.mjs.map +1 -0
  187. package/dist/src/components/Dialog.cjs +1 -1
  188. package/dist/src/components/Dialog.cjs.map +1 -1
  189. package/dist/src/components/Dialog.d.mts +15 -15
  190. package/dist/src/components/Dialog.d.mts.map +1 -1
  191. package/dist/src/components/Dialog.mjs +1 -1
  192. package/dist/src/components/Dialog.mjs.map +1 -1
  193. package/dist/src/components/Dot.cjs.map +1 -1
  194. package/dist/src/components/Dot.d.mts +5 -6
  195. package/dist/src/components/Dot.d.mts.map +1 -1
  196. package/dist/src/components/Dot.mjs.map +1 -1
  197. package/dist/src/components/DropdownMenu.cjs +1 -1
  198. package/dist/src/components/DropdownMenu.cjs.map +1 -1
  199. package/dist/src/components/DropdownMenu.d.mts +20 -20
  200. package/dist/src/components/DropdownMenu.d.mts.map +1 -1
  201. package/dist/src/components/DropdownMenu.mjs +1 -1
  202. package/dist/src/components/DropdownMenu.mjs.map +1 -1
  203. package/dist/src/components/EmptyState.cjs +1 -1
  204. package/dist/src/components/EmptyState.cjs.map +1 -1
  205. package/dist/src/components/EmptyState.d.mts +2 -3
  206. package/dist/src/components/EmptyState.d.mts.map +1 -1
  207. package/dist/src/components/EmptyState.mjs +1 -1
  208. package/dist/src/components/EmptyState.mjs.map +1 -1
  209. package/dist/src/components/HashlineLines.cjs +2 -0
  210. package/dist/src/components/HashlineLines.cjs.map +1 -0
  211. package/dist/src/components/HashlineLines.d.mts +23 -0
  212. package/dist/src/components/HashlineLines.d.mts.map +1 -0
  213. package/dist/src/components/HashlineLines.mjs +2 -0
  214. package/dist/src/components/HashlineLines.mjs.map +1 -0
  215. package/dist/src/components/Input.cjs +1 -1
  216. package/dist/src/components/Input.cjs.map +1 -1
  217. package/dist/src/components/Input.d.mts +6 -7
  218. package/dist/src/components/Input.d.mts.map +1 -1
  219. package/dist/src/components/Input.mjs +1 -1
  220. package/dist/src/components/Input.mjs.map +1 -1
  221. package/dist/src/components/Kbd.cjs +1 -1
  222. package/dist/src/components/Kbd.cjs.map +1 -1
  223. package/dist/src/components/Kbd.d.mts +1 -2
  224. package/dist/src/components/Kbd.d.mts.map +1 -1
  225. package/dist/src/components/Kbd.mjs +1 -1
  226. package/dist/src/components/Kbd.mjs.map +1 -1
  227. package/dist/src/components/Label.cjs +1 -1
  228. package/dist/src/components/Label.cjs.map +1 -1
  229. package/dist/src/components/Label.d.mts +1 -1
  230. package/dist/src/components/Label.d.mts.map +1 -1
  231. package/dist/src/components/Label.mjs +1 -1
  232. package/dist/src/components/Label.mjs.map +1 -1
  233. package/dist/src/components/Markdown.cjs +2 -1
  234. package/dist/src/components/Markdown.cjs.map +1 -1
  235. package/dist/src/components/Markdown.d.mts +12 -3
  236. package/dist/src/components/Markdown.d.mts.map +1 -1
  237. package/dist/src/components/Markdown.mjs +2 -1
  238. package/dist/src/components/Markdown.mjs.map +1 -1
  239. package/dist/src/components/MediaPreview.cjs +1 -1
  240. package/dist/src/components/MediaPreview.cjs.map +1 -1
  241. package/dist/src/components/MediaPreview.d.mts +39 -3
  242. package/dist/src/components/MediaPreview.d.mts.map +1 -1
  243. package/dist/src/components/MediaPreview.mjs +1 -1
  244. package/dist/src/components/MediaPreview.mjs.map +1 -1
  245. package/dist/src/components/MermaidDiagram.cjs +2 -0
  246. package/dist/src/components/MermaidDiagram.cjs.map +1 -0
  247. package/dist/src/components/MermaidDiagram.mjs +2 -0
  248. package/dist/src/components/MermaidDiagram.mjs.map +1 -0
  249. package/dist/src/components/MessageItem.cjs +1 -1
  250. package/dist/src/components/MessageItem.cjs.map +1 -1
  251. package/dist/src/components/MessageItem.d.mts +48 -17
  252. package/dist/src/components/MessageItem.d.mts.map +1 -1
  253. package/dist/src/components/MessageItem.mjs +1 -1
  254. package/dist/src/components/MessageItem.mjs.map +1 -1
  255. package/dist/src/components/MessageLines.cjs.map +1 -1
  256. package/dist/src/components/MessageLines.d.mts +5 -6
  257. package/dist/src/components/MessageLines.d.mts.map +1 -1
  258. package/dist/src/components/MessageLines.mjs.map +1 -1
  259. package/dist/src/components/OptionList.cjs +1 -1
  260. package/dist/src/components/OptionList.cjs.map +1 -1
  261. package/dist/src/components/OptionList.d.mts +9 -10
  262. package/dist/src/components/OptionList.d.mts.map +1 -1
  263. package/dist/src/components/OptionList.mjs +1 -1
  264. package/dist/src/components/OptionList.mjs.map +1 -1
  265. package/dist/src/components/Panel.cjs +1 -1
  266. package/dist/src/components/Panel.cjs.map +1 -1
  267. package/dist/src/components/Panel.d.mts +4 -5
  268. package/dist/src/components/Panel.d.mts.map +1 -1
  269. package/dist/src/components/Panel.mjs +1 -1
  270. package/dist/src/components/Panel.mjs.map +1 -1
  271. package/dist/src/components/PdfPreview.cjs +2 -0
  272. package/dist/src/components/PdfPreview.cjs.map +1 -0
  273. package/dist/src/components/PdfPreview.d.mts +52 -0
  274. package/dist/src/components/PdfPreview.d.mts.map +1 -0
  275. package/dist/src/components/PdfPreview.mjs +2 -0
  276. package/dist/src/components/PdfPreview.mjs.map +1 -0
  277. package/dist/src/components/Popover.cjs +1 -1
  278. package/dist/src/components/Popover.cjs.map +1 -1
  279. package/dist/src/components/Popover.d.mts +8 -8
  280. package/dist/src/components/Popover.d.mts.map +1 -1
  281. package/dist/src/components/Popover.mjs +1 -1
  282. package/dist/src/components/Popover.mjs.map +1 -1
  283. package/dist/src/components/Progress.cjs.map +1 -1
  284. package/dist/src/components/Progress.d.mts +1 -1
  285. package/dist/src/components/Progress.d.mts.map +1 -1
  286. package/dist/src/components/Progress.mjs.map +1 -1
  287. package/dist/src/components/RadioGroup.cjs.map +1 -1
  288. package/dist/src/components/RadioGroup.d.mts +4 -4
  289. package/dist/src/components/RadioGroup.d.mts.map +1 -1
  290. package/dist/src/components/RadioGroup.mjs.map +1 -1
  291. package/dist/src/components/ScrollArea.cjs.map +1 -1
  292. package/dist/src/components/ScrollArea.d.mts +3 -3
  293. package/dist/src/components/ScrollArea.d.mts.map +1 -1
  294. package/dist/src/components/ScrollArea.mjs.map +1 -1
  295. package/dist/src/components/SectionLabel.cjs +1 -1
  296. package/dist/src/components/SectionLabel.cjs.map +1 -1
  297. package/dist/src/components/SectionLabel.d.mts +1 -2
  298. package/dist/src/components/SectionLabel.d.mts.map +1 -1
  299. package/dist/src/components/SectionLabel.mjs +1 -1
  300. package/dist/src/components/SectionLabel.mjs.map +1 -1
  301. package/dist/src/components/Select.cjs +1 -1
  302. package/dist/src/components/Select.cjs.map +1 -1
  303. package/dist/src/components/Select.d.mts +9 -9
  304. package/dist/src/components/Select.d.mts.map +1 -1
  305. package/dist/src/components/Select.mjs +1 -1
  306. package/dist/src/components/Select.mjs.map +1 -1
  307. package/dist/src/components/Separator.cjs.map +1 -1
  308. package/dist/src/components/Separator.d.mts +1 -1
  309. package/dist/src/components/Separator.d.mts.map +1 -1
  310. package/dist/src/components/Separator.mjs.map +1 -1
  311. package/dist/src/components/Sheet.cjs +2 -0
  312. package/dist/src/components/Sheet.cjs.map +1 -0
  313. package/dist/src/components/Sheet.d.mts +35 -0
  314. package/dist/src/components/Sheet.d.mts.map +1 -0
  315. package/dist/src/components/Sheet.mjs +2 -0
  316. package/dist/src/components/Sheet.mjs.map +1 -0
  317. package/dist/src/components/Skeleton.cjs.map +1 -1
  318. package/dist/src/components/Skeleton.d.mts +1 -2
  319. package/dist/src/components/Skeleton.d.mts.map +1 -1
  320. package/dist/src/components/Skeleton.mjs.map +1 -1
  321. package/dist/src/components/Spinner.cjs +1 -1
  322. package/dist/src/components/Spinner.cjs.map +1 -1
  323. package/dist/src/components/Spinner.d.mts +2 -3
  324. package/dist/src/components/Spinner.d.mts.map +1 -1
  325. package/dist/src/components/Spinner.mjs +1 -1
  326. package/dist/src/components/Spinner.mjs.map +1 -1
  327. package/dist/src/components/StatusBadge.cjs +1 -1
  328. package/dist/src/components/StatusBadge.cjs.map +1 -1
  329. package/dist/src/components/StatusBadge.d.mts +6 -7
  330. package/dist/src/components/StatusBadge.d.mts.map +1 -1
  331. package/dist/src/components/StatusBadge.mjs +1 -1
  332. package/dist/src/components/StatusBadge.mjs.map +1 -1
  333. package/dist/src/components/StreamCursor.cjs.map +1 -1
  334. package/dist/src/components/StreamCursor.d.mts +1 -2
  335. package/dist/src/components/StreamCursor.d.mts.map +1 -1
  336. package/dist/src/components/StreamCursor.mjs.map +1 -1
  337. package/dist/src/components/Switch.cjs.map +1 -1
  338. package/dist/src/components/Switch.d.mts +1 -1
  339. package/dist/src/components/Switch.d.mts.map +1 -1
  340. package/dist/src/components/Switch.mjs.map +1 -1
  341. package/dist/src/components/SyntaxText.cjs +4 -0
  342. package/dist/src/components/SyntaxText.cjs.map +1 -0
  343. package/dist/src/components/SyntaxText.d.mts +50 -0
  344. package/dist/src/components/SyntaxText.d.mts.map +1 -0
  345. package/dist/src/components/SyntaxText.mjs +4 -0
  346. package/dist/src/components/SyntaxText.mjs.map +1 -0
  347. package/dist/src/components/Tabs.cjs +1 -1
  348. package/dist/src/components/Tabs.cjs.map +1 -1
  349. package/dist/src/components/Tabs.d.mts +11 -11
  350. package/dist/src/components/Tabs.d.mts.map +1 -1
  351. package/dist/src/components/Tabs.mjs +1 -1
  352. package/dist/src/components/Tabs.mjs.map +1 -1
  353. package/dist/src/components/TerminalView.cjs +2 -0
  354. package/dist/src/components/TerminalView.cjs.map +1 -0
  355. package/dist/src/components/TerminalView.d.mts +31 -0
  356. package/dist/src/components/TerminalView.d.mts.map +1 -0
  357. package/dist/src/components/TerminalView.mjs +2 -0
  358. package/dist/src/components/TerminalView.mjs.map +1 -0
  359. package/dist/src/components/Textarea.cjs.map +1 -1
  360. package/dist/src/components/Textarea.d.mts +3 -4
  361. package/dist/src/components/Textarea.d.mts.map +1 -1
  362. package/dist/src/components/Textarea.mjs.map +1 -1
  363. package/dist/src/components/Toast.cjs +1 -1
  364. package/dist/src/components/Toast.cjs.map +1 -1
  365. package/dist/src/components/Toast.d.mts +11 -11
  366. package/dist/src/components/Toast.d.mts.map +1 -1
  367. package/dist/src/components/Toast.mjs +1 -1
  368. package/dist/src/components/Toast.mjs.map +1 -1
  369. package/dist/src/components/ToolPathLink.cjs +2 -0
  370. package/dist/src/components/ToolPathLink.cjs.map +1 -0
  371. package/dist/src/components/ToolPathLink.d.mts +22 -0
  372. package/dist/src/components/ToolPathLink.d.mts.map +1 -0
  373. package/dist/src/components/ToolPathLink.mjs +2 -0
  374. package/dist/src/components/ToolPathLink.mjs.map +1 -0
  375. package/dist/src/components/Tooltip.cjs +1 -1
  376. package/dist/src/components/Tooltip.cjs.map +1 -1
  377. package/dist/src/components/Tooltip.d.mts +5 -5
  378. package/dist/src/components/Tooltip.d.mts.map +1 -1
  379. package/dist/src/components/Tooltip.mjs +1 -1
  380. package/dist/src/components/Tooltip.mjs.map +1 -1
  381. package/dist/src/icons/icons.cjs +1 -1
  382. package/dist/src/icons/icons.d.mts +2 -2
  383. package/dist/src/icons/icons.mjs +1 -1
  384. package/dist/src/lib/ansiSpans.cjs +2 -0
  385. package/dist/src/lib/ansiSpans.cjs.map +1 -0
  386. package/dist/src/lib/ansiSpans.d.mts +42 -0
  387. package/dist/src/lib/ansiSpans.d.mts.map +1 -0
  388. package/dist/src/lib/ansiSpans.mjs +2 -0
  389. package/dist/src/lib/ansiSpans.mjs.map +1 -0
  390. package/dist/src/lib/cn.d.mts +1 -2
  391. package/dist/src/lib/cn.d.mts.map +1 -1
  392. package/dist/src/lib/collapse.d.mts +2 -3
  393. package/dist/src/lib/collapse.d.mts.map +1 -1
  394. package/dist/src/lib/editorController.cjs +2 -0
  395. package/dist/src/lib/editorController.cjs.map +1 -0
  396. package/dist/src/lib/editorController.mjs +2 -0
  397. package/dist/src/lib/editorController.mjs.map +1 -0
  398. package/dist/src/lib/editorLanguage.d.mts +2 -3
  399. package/dist/src/lib/editorLanguage.d.mts.map +1 -1
  400. package/dist/src/lib/editorTheme.cjs +1 -1
  401. package/dist/src/lib/editorTheme.cjs.map +1 -1
  402. package/dist/src/lib/editorTheme.d.mts +76 -0
  403. package/dist/src/lib/editorTheme.d.mts.map +1 -0
  404. package/dist/src/lib/editorTheme.mjs +1 -1
  405. package/dist/src/lib/editorTheme.mjs.map +1 -1
  406. package/dist/src/lib/fenceGrammar.cjs +2 -0
  407. package/dist/src/lib/fenceGrammar.cjs.map +1 -0
  408. package/dist/src/lib/fenceGrammar.mjs +2 -0
  409. package/dist/src/lib/fenceGrammar.mjs.map +1 -0
  410. package/dist/src/lib/hashlineHighlight.cjs +3 -0
  411. package/dist/src/lib/hashlineHighlight.cjs.map +1 -0
  412. package/dist/src/lib/hashlineHighlight.d.mts +30 -0
  413. package/dist/src/lib/hashlineHighlight.d.mts.map +1 -0
  414. package/dist/src/lib/hashlineHighlight.mjs +3 -0
  415. package/dist/src/lib/hashlineHighlight.mjs.map +1 -0
  416. package/dist/src/lib/hashlineView.cjs +6 -0
  417. package/dist/src/lib/hashlineView.cjs.map +1 -0
  418. package/dist/src/lib/hashlineView.d.mts +60 -0
  419. package/dist/src/lib/hashlineView.d.mts.map +1 -0
  420. package/dist/src/lib/hashlineView.mjs +6 -0
  421. package/dist/src/lib/hashlineView.mjs.map +1 -0
  422. package/dist/src/lib/media.cjs.map +1 -1
  423. package/dist/src/lib/media.d.mts +1 -2
  424. package/dist/src/lib/media.d.mts.map +1 -1
  425. package/dist/src/lib/media.mjs.map +1 -1
  426. package/dist/src/lib/mediaPlayback.cjs +2 -0
  427. package/dist/src/lib/mediaPlayback.cjs.map +1 -0
  428. package/dist/src/lib/mediaPlayback.mjs +2 -0
  429. package/dist/src/lib/mediaPlayback.mjs.map +1 -0
  430. package/dist/src/lib/mermaidDiagram.cjs +2 -0
  431. package/dist/src/lib/mermaidDiagram.cjs.map +1 -0
  432. package/dist/src/lib/mermaidDiagram.mjs +2 -0
  433. package/dist/src/lib/mermaidDiagram.mjs.map +1 -0
  434. package/dist/src/lib/optionList.d.mts +4 -5
  435. package/dist/src/lib/optionList.d.mts.map +1 -1
  436. package/dist/src/lib/syntaxHighlight.cjs +3 -0
  437. package/dist/src/lib/syntaxHighlight.cjs.map +1 -0
  438. package/dist/src/lib/syntaxHighlight.d.mts +54 -0
  439. package/dist/src/lib/syntaxHighlight.d.mts.map +1 -0
  440. package/dist/src/lib/syntaxHighlight.mjs +3 -0
  441. package/dist/src/lib/syntaxHighlight.mjs.map +1 -0
  442. package/dist/src/lib/tone.cjs.map +1 -1
  443. package/dist/src/lib/tone.d.mts +4 -5
  444. package/dist/src/lib/tone.d.mts.map +1 -1
  445. package/dist/src/lib/tone.mjs.map +1 -1
  446. package/dist/src/theme/apply.cjs.map +1 -1
  447. package/dist/src/theme/apply.d.mts +5 -6
  448. package/dist/src/theme/apply.d.mts.map +1 -1
  449. package/dist/src/theme/apply.mjs.map +1 -1
  450. package/dist/src/theme/builtinThemes.cjs.map +1 -1
  451. package/dist/src/theme/builtinThemes.d.mts +4 -5
  452. package/dist/src/theme/builtinThemes.d.mts.map +1 -1
  453. package/dist/src/theme/builtinThemes.mjs.map +1 -1
  454. package/dist/src/theme/derive.cjs.map +1 -1
  455. package/dist/src/theme/derive.d.mts +4 -5
  456. package/dist/src/theme/derive.d.mts.map +1 -1
  457. package/dist/src/theme/derive.mjs.map +1 -1
  458. package/dist/src/theme/parse.cjs.map +1 -1
  459. package/dist/src/theme/parse.d.mts +1 -2
  460. package/dist/src/theme/parse.d.mts.map +1 -1
  461. package/dist/src/theme/parse.mjs.map +1 -1
  462. package/dist/src/theme/piTheme.cjs.map +1 -1
  463. package/dist/src/theme/piTheme.d.mts +2 -3
  464. package/dist/src/theme/piTheme.d.mts.map +1 -1
  465. package/dist/src/theme/piTheme.mjs.map +1 -1
  466. package/dist/src/theme/preference.d.mts +4 -5
  467. package/dist/src/theme/preference.d.mts.map +1 -1
  468. package/dist/src/types/editor.cjs.map +1 -1
  469. package/dist/src/types/editor.d.mts +39 -5
  470. package/dist/src/types/editor.d.mts.map +1 -1
  471. package/dist/src/types/editor.mjs.map +1 -1
  472. package/dist/src/types/theme.d.mts +11 -12
  473. package/dist/src/types/theme.d.mts.map +1 -1
  474. package/dist/src/types/tone.d.mts +10 -11
  475. package/dist/src/types/tone.d.mts.map +1 -1
  476. package/dist/theme/apply.d.cts +5 -6
  477. package/dist/theme/apply.d.cts.map +1 -1
  478. package/dist/theme/builtinThemes.d.cts +4 -5
  479. package/dist/theme/builtinThemes.d.cts.map +1 -1
  480. package/dist/theme/derive.d.cts +4 -5
  481. package/dist/theme/derive.d.cts.map +1 -1
  482. package/dist/theme/parse.d.cts +1 -2
  483. package/dist/theme/parse.d.cts.map +1 -1
  484. package/dist/theme/piTheme.d.cts +2 -3
  485. package/dist/theme/piTheme.d.cts.map +1 -1
  486. package/dist/theme/preference.d.cts +4 -5
  487. package/dist/theme/preference.d.cts.map +1 -1
  488. package/dist/types/editor.d.cts +39 -5
  489. package/dist/types/editor.d.cts.map +1 -1
  490. package/dist/types/theme.d.cts +11 -12
  491. package/dist/types/theme.d.cts.map +1 -1
  492. package/dist/types/tone.d.cts +10 -11
  493. package/dist/types/tone.d.cts.map +1 -1
  494. package/package.json +19 -15
  495. package/styles/preview.css +17 -0
  496. package/styles/tokens.css +72 -0
@@ -1,2 +1,2 @@
1
- import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog 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":`dialog`,...e})}function c(e){return i(r.Trigger,{"data-slot":`dialog-trigger`,...e})}function l(e){return i(r.Portal,{"data-slot":`dialog-portal`,...e})}function u(e){return i(r.Close,{"data-slot":`dialog-close`,...e})}function d({className:e,...n}){return i(r.Overlay,{"data-slot":`dialog-overlay`,className:t(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,e),...n})}const f={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function p({className:e,children:n,width:o=`md`,...s}){return a(l,{children:[i(d,{}),i(r.Content,{"data-slot":`dialog-content`,className:t(`fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop`,f[o],e),...s,children:n})]})}function m({className:o,dismissible:s=!1,closeLabel:c=`close`,children:l,...u}){return a(`div`,{"data-slot":`dialog-header`,className:t(`flex min-w-0 items-center justify-between gap-3 border-b border-doom-border px-3 py-3 sm:px-4`,o),...u,children:[l,s?i(r.Close,{asChild:!0,children:i(n,{variant:`ghost`,size:`icon`,"aria-label":c,className:`text-doom-faint hover:text-doom-hi`,children:i(e,{className:`h-3 w-3`})})}):null]})}function h({className:e,...n}){return i(r.Title,{"data-slot":`dialog-title`,className:t(`text-[12px] font-bold tracking-wide text-doom-hi`,e),...n})}function g({className:e,...n}){return i(r.Description,{"data-slot":`dialog-description`,className:t(`text-[11px] leading-relaxed text-doom-dim`,e),...n})}function _({className:e,...n}){return i(`div`,{"data-slot":`dialog-body`,className:t(`flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4`,e),...n})}const v=o(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] flex-wrap justify-between border-t border-doom-border-soft bg-doom-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0`}},defaultVariants:{variant:`plain`}});function y({className:e,variant:n,...r}){return i(`div`,{"data-slot":`dialog-footer`,className:t(v({variant:n}),e),...r})}export{s as Dialog,_ as DialogBody,u as DialogClose,p as DialogContent,g as DialogDescription,y as DialogFooter,m as DialogHeader,d as DialogOverlay,l as DialogPortal,h as DialogTitle,c as DialogTrigger,v as dialogFooterVariants};
1
+ import{CloseIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Button as n}from"./Button.mjs";import{Dialog as r}from"radix-ui";import{jsx as i,jsxs as a}from"react/jsx-runtime";import{createContext as o,useContext as s}from"react";import{cva as c}from"class-variance-authority";const l=o(void 0);function u(e){let t=e.onOpenChange===void 0?void 0:t=>e.onOpenChange?.(t);return i(l.Provider,{value:t,children:i(r.Root,{"data-slot":`dialog`,...e,onOpenChange:t})})}function d(e){return i(r.Trigger,{"data-slot":`dialog-trigger`,...e})}function f(e){return i(r.Portal,{"data-slot":`dialog-portal`,...e})}function p(e){return i(r.Close,{"data-slot":`dialog-close`,...e})}function m({className:e,onPointerDownCapture:n,...a}){let o=s(l);return i(r.Overlay,{"data-slot":`dialog-overlay`,className:t(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,e),onPointerDownCapture:e=>{n?.(e),!(e.defaultPrevented||o===void 0)&&e.currentTarget.nextElementSibling?.querySelector(`[data-slot="select-trigger"][data-state="open"]`)!=null&&(e.stopPropagation(),o(!1))},...a})}const h={sm:`w-[360px]`,md:`w-[480px]`,lg:`w-[620px]`};function g({className:e,children:n,width:o=`md`,...s}){return a(f,{children:[i(m,{}),i(r.Content,{"data-slot":`dialog-content`,className:t(`fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop`,h[o],e),...s,children:n})]})}function _({className:o,dismissible:s=!1,closeLabel:c=`close`,children:l,...u}){return a(`div`,{"data-slot":`dialog-header`,className:t(`flex min-w-0 items-center justify-between gap-3 border-b border-doom-border px-3 py-3 sm:px-4`,o),...u,children:[l,s?i(r.Close,{asChild:!0,children:i(n,{variant:`ghost`,size:`icon`,"aria-label":c,className:`text-doom-faint hover:text-doom-hi`,children:i(e,{className:`h-3 w-3`})})}):null]})}function v({className:e,...n}){return i(r.Title,{"data-slot":`dialog-title`,className:t(`text-sm font-bold tracking-wide text-doom-hi`,e),...n})}function y({className:e,...n}){return i(r.Description,{"data-slot":`dialog-description`,className:t(`text-sm leading-relaxed text-doom-dim`,e),...n})}function b({className:e,...n}){return i(`div`,{"data-slot":`dialog-body`,className:t(`flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4`,e),...n})}const x=c(`flex shrink-0 items-center gap-2`,{variants:{variant:{plain:`justify-end`,bar:`min-h-[34px] flex-wrap justify-between border-t border-doom-border-soft bg-doom-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0`}},defaultVariants:{variant:`plain`}});function S({className:e,variant:n,...r}){return i(`div`,{"data-slot":`dialog-footer`,className:t(x({variant:n}),e),...r})}export{u as Dialog,b as DialogBody,p as DialogClose,g as DialogContent,y as DialogDescription,S as DialogFooter,_ as DialogHeader,m as DialogOverlay,f as DialogPortal,v as DialogTitle,d as DialogTrigger,x as dialogFooterVariants};
2
2
  //# sourceMappingURL=Dialog.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport type { ComponentProps } from 'react';\nimport { CloseIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { Button } from './Button.tsx';\n\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Doom panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n return <DialogPrimitive.Root data-slot=\"dialog\" {...props} />;\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({ className, ...props }: ComponentProps<typeof DialogPrimitive.Overlay>) {\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade', className)}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n 'flex min-w-0 items-center justify-between gap-3 border-b border-doom-border px-3 py-3 sm:px-4',\n className,\n )}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-doom-faint hover:text-doom-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-[12px] font-bold tracking-wide text-doom-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-[11px] leading-relaxed text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] flex-wrap justify-between border-t border-doom-border-soft bg-doom-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"2PAWA,SAAgBA,EAAO,EAAoD,CACzE,OAAO,EAACC,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,CAAQ,CAAA,CAC9D,CAEA,SAAgB,EAAc,EAAuD,CACnF,OAAO,EAACA,EAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAgB,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OACE,EAACA,EAAgB,YAAjB,CACE,YAAU,qBACV,UAAW,EAAG,4CAA6C,CAAS,EACpE,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAW,CAAE,YAAW,GAAG,GAAgC,CACzE,OACE,EAAC,MAAD,CACE,YAAU,cACV,UAAW,EAAG,wEAAyE,CAAS,EAChG,GAAI,CACL,CAAA,CAEL,CAEA,MAAa,EAAuB,EAAI,mCAAoC,CAC1E,SAAU,CACR,QAAS,CAEP,MAAO,cAMP,IAAK,iIACP,CACF,EACA,gBAAiB,CAAE,QAAS,OAAQ,CACtC,CAAC,EAID,SAAgB,EAAa,CAAE,YAAW,UAAS,GAAG,GAA4B,CAChF,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,EAAqB,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH"}
1
+ {"version":3,"file":"Dialog.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/Dialog.tsx"],"sourcesContent":["import { cva, type VariantProps } from 'class-variance-authority';\nimport { Dialog as DialogPrimitive } from 'radix-ui';\nimport { createContext, type ComponentProps, useContext } from 'react';\n\nimport { CloseIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\nimport { Button } from './Button';\n\nconst DialogOpenChangeContext = createContext<((open: boolean) => void) | undefined>(undefined);\n/**\n * shadcn's Dialog on Radix: focus trap, Escape, outside click, scroll lock,\n * and focus restored to the trigger on close. The frame is the Doom panel.\n */\nexport function Dialog(props: ComponentProps<typeof DialogPrimitive.Root>) {\n const onOpenChange = props.onOpenChange === undefined ? undefined : (open: boolean) => props.onOpenChange?.(open);\n return (\n <DialogOpenChangeContext.Provider value={onOpenChange}>\n <DialogPrimitive.Root data-slot=\"dialog\" {...props} onOpenChange={onOpenChange} />\n </DialogOpenChangeContext.Provider>\n );\n}\n\nexport function DialogTrigger(props: ComponentProps<typeof DialogPrimitive.Trigger>) {\n return <DialogPrimitive.Trigger data-slot=\"dialog-trigger\" {...props} />;\n}\n\nexport function DialogPortal(props: ComponentProps<typeof DialogPrimitive.Portal>) {\n return <DialogPrimitive.Portal data-slot=\"dialog-portal\" {...props} />;\n}\n\nexport function DialogClose(props: ComponentProps<typeof DialogPrimitive.Close>) {\n return <DialogPrimitive.Close data-slot=\"dialog-close\" {...props} />;\n}\n\nexport function DialogOverlay({\n className,\n onPointerDownCapture,\n ...props\n}: ComponentProps<typeof DialogPrimitive.Overlay>) {\n const onOpenChange = useContext(DialogOpenChangeContext);\n return (\n <DialogPrimitive.Overlay\n data-slot=\"dialog-overlay\"\n className={cn('fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade', className)}\n onPointerDownCapture={(event) => {\n onPointerDownCapture?.(event);\n if (event.defaultPrevented || onOpenChange === undefined) return;\n const dialogContent = event.currentTarget.nextElementSibling;\n const openSelectTrigger = dialogContent?.querySelector('[data-slot=\"select-trigger\"][data-state=\"open\"]');\n if (openSelectTrigger === null || openSelectTrigger === undefined) return;\n\n // Radix's parent outside listener can lag one render behind a nested\n // modal Select. Own this backdrop press so the complete stack closes.\n event.stopPropagation();\n onOpenChange(false);\n }}\n {...props}\n />\n );\n}\n\nexport interface DialogContentProps extends ComponentProps<typeof DialogPrimitive.Content> {\n /** Width preset; `className` may still override. */\n width?: 'sm' | 'md' | 'lg';\n}\n\nconst CONTENT_WIDTH = { sm: 'w-[360px]', md: 'w-[480px]', lg: 'w-[620px]' } as const;\n\nexport function DialogContent({ className, children, width = 'md', ...props }: DialogContentProps) {\n return (\n <DialogPortal>\n <DialogOverlay />\n <DialogPrimitive.Content\n data-slot=\"dialog-content\"\n className={cn(\n 'fixed top-1/2 left-1/2 z-50 flex max-h-[calc(100dvh-24px)] max-w-[calc(100vw-24px)] -translate-x-1/2 -translate-y-1/2 flex-col overflow-hidden rounded-lg border border-doom-border bg-doom-panel font-mono shadow-2xl outline-none data-[state=open]:animate-doom-pop',\n CONTENT_WIDTH[width],\n className,\n )}\n {...props}\n >\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n );\n}\n\nexport interface DialogHeaderProps extends ComponentProps<'div'> {\n /**\n * Show the close control at the right of the strip. Off by default: most\n * headers already put something there (a spinner, a method label) and every\n * dialog closes on Escape, so an X that fights the existing content is worse\n * than none. Turn it on for a dialog whose only way out is the mouse.\n */\n dismissible?: boolean;\n /** What the close control announces. */\n closeLabel?: string;\n}\n\nexport function DialogHeader({\n className,\n dismissible = false,\n closeLabel = 'close',\n children,\n ...props\n}: DialogHeaderProps) {\n return (\n <div\n data-slot=\"dialog-header\"\n className={cn(\n 'flex min-w-0 items-center justify-between gap-3 border-b border-doom-border px-3 py-3 sm:px-4',\n className,\n )}\n {...props}\n >\n {children}\n {dismissible ? (\n <DialogPrimitive.Close asChild>\n <Button variant=\"ghost\" size=\"icon\" aria-label={closeLabel} className=\"text-doom-faint hover:text-doom-hi\">\n <CloseIcon className=\"h-3 w-3\" />\n </Button>\n </DialogPrimitive.Close>\n ) : null}\n </div>\n );\n}\n\nexport function DialogTitle({ className, ...props }: ComponentProps<typeof DialogPrimitive.Title>) {\n return (\n <DialogPrimitive.Title\n data-slot=\"dialog-title\"\n className={cn('text-sm font-bold tracking-wide text-doom-hi', className)}\n {...props}\n />\n );\n}\n\nexport function DialogDescription({ className, ...props }: ComponentProps<typeof DialogPrimitive.Description>) {\n return (\n <DialogPrimitive.Description\n data-slot=\"dialog-description\"\n className={cn('text-sm leading-relaxed text-doom-dim', className)}\n {...props}\n />\n );\n}\n\nexport function DialogBody({ className, ...props }: ComponentProps<'div'>) {\n return (\n <div\n data-slot=\"dialog-body\"\n className={cn('flex min-h-0 flex-col gap-3 overflow-y-auto px-3 py-3 sm:px-4 sm:py-4', className)}\n {...props}\n />\n );\n}\n\nexport const dialogFooterVariants = cva('flex shrink-0 items-center gap-2', {\n variants: {\n variant: {\n /** Buttons alone, sitting inside the body's padding. */\n plain: 'justify-end',\n /**\n * The full-width strip: a hint on the left, the buttons on the right,\n * recessed and ruled off from the body. The same shape PopoverFooter\n * draws, because a dialog and a popover promise their keys the same way.\n */\n bar: 'min-h-[34px] flex-wrap justify-between border-t border-doom-border-soft bg-doom-deep px-3 py-1.5 sm:flex-nowrap sm:px-4 sm:py-0',\n },\n },\n defaultVariants: { variant: 'plain' },\n});\n\nexport interface DialogFooterProps extends ComponentProps<'div'>, VariantProps<typeof dialogFooterVariants> {}\n\nexport function DialogFooter({ className, variant, ...props }: DialogFooterProps) {\n return <div data-slot=\"dialog-footer\" className={cn(dialogFooterVariants({ variant }), className)} {...props} />;\n}\n"],"mappings":"iTAQA,MAAM,EAA0B,EAAqD,IAAA,EAAS,EAK9F,SAAgBA,EAAO,EAAoD,CACzE,IAAM,EAAe,EAAM,eAAiB,IAAA,GAAY,IAAA,GAAa,GAAkB,EAAM,eAAe,CAAI,EAChH,OACE,EAAC,EAAwB,SAAzB,CAAkC,MAAO,EACvC,SAAA,EAACC,EAAgB,KAAjB,CAAsB,YAAU,SAAS,GAAI,EAAqB,cAAe,CAAA,CACjD,CAAA,CAEtC,CAEA,SAAgB,EAAc,EAAuD,CACnF,OAAO,EAACA,EAAgB,QAAjB,CAAyB,YAAU,iBAAiB,GAAI,CAAQ,CAAA,CACzE,CAEA,SAAgB,EAAa,EAAsD,CACjF,OAAO,EAACA,EAAgB,OAAjB,CAAwB,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CACvE,CAEA,SAAgB,EAAY,EAAqD,CAC/E,OAAO,EAACA,EAAgB,MAAjB,CAAuB,YAAU,eAAe,GAAI,CAAQ,CAAA,CACrE,CAEA,SAAgB,EAAc,CAC5B,YACA,uBACA,GAAG,GAC8C,CACjD,IAAM,EAAe,EAAW,CAAuB,EACvD,OACE,EAACA,EAAgB,QAAjB,CACE,YAAU,iBACV,UAAW,EAAG,yEAA0E,CAAS,EACjG,qBAAuB,GAAU,CAC/B,IAAuB,CAAK,EACxB,IAAM,kBAAoB,IAAiB,IAAA,KACzB,EAAM,cAAc,oBACD,cAAc,i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I,mCAAoC,CAC1E,SAAU,CACR,QAAS,CAEP,MAAO,cAMP,IAAK,iIACP,CACF,EACA,gBAAiB,CAAE,QAAS,OAAQ,CACtC,CAAC,EAID,SAAgB,EAAa,CAAE,YAAW,UAAS,GAAG,GAA4B,CAChF,OAAO,EAAC,MAAD,CAAK,YAAU,gBAAgB,UAAW,EAAG,EAAqB,CAAE,SAAQ,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACjH"}
@@ -1 +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"}
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';\n\nimport { cn } from '../lib/cn';\nimport type { DotTone as Tone } from '../types/tone';\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":"oEAMA,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"}
@@ -1,16 +1,15 @@
1
1
  import { DotTone as DotTone$1 } from "../types/tone.mjs";
2
- import { VariantProps } from "class-variance-authority";
3
2
  import { ComponentProps } from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
4
  //#region src/components/Dot.d.ts
5
- declare const dotVariants: (props?: ({
5
+ export declare const dotVariants: (props?: ({
6
6
  tone?: "blue" | "cyan" | "green" | "magenta" | "muted" | "neutral" | "orange" | "red" | "teal" | "violet" | "yellow" | null | undefined;
7
7
  size?: "lg" | "md" | "sm" | "xs" | null | undefined;
8
8
  pulse?: boolean | null | undefined;
9
9
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
10
- type DotTone = DotTone$1;
11
- interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}
10
+ export type DotTone = DotTone$1;
11
+ export interface DotProps extends ComponentProps<'span'>, VariantProps<typeof dotVariants> {}
12
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;
13
+ export declare function Dot({ className, tone, size, pulse, ...props }: DotProps): import("react").JSX.Element;
14
14
  //#endregion
15
- export { Dot, DotProps, DotTone, dotVariants };
16
15
  //# sourceMappingURL=Dot.d.mts.map
@@ -1 +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"}
1
+ {"version":3,"file":"Dot.d.mts","names":[],"sources":["../../../src/components/Dot.tsx"],"mappings":";;;;qBAMa,cAAW;;;;6CA2BtB;YAEU,UAAU;iBAEL,iBAAiB,wBAAwB,oBAAoB;;wBAG9D,MAAM,WAAW,MAAM,MAAM,UAAU,SAAS,2BAAQ,IAAA"}
@@ -1 +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"}
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';\n\nimport { cn } from '../lib/cn';\nimport type { DotTone as Tone } from '../types/tone';\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":"0HAMA,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"}
@@ -1,2 +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;
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-sm 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-2xs font-bold tracking-wider 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-xs tracking-wide 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
2
  //# sourceMappingURL=DropdownMenu.cjs.map
@@ -1 +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":"wLAOA,SAAgB,EAAa,EAA0D,CACrF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,CAAA,CACtF,CAGA,SAAgB,EAAkB,EAA2D,CAC3F,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,MAAvB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,MAAM,EACJ,6KAEF,SAAgB,EAAoB,CAClC,YACA,QAAQ,MACR,aAAa,EACb,GAAG,GACoD,CACvD,O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,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,aAAsB,MAAvB,CACE,YAAU,sBACV,UAAWC,EAAAA,GAAG,+EAAgF,CAAS,EACvG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAqB,CAAE,YAAW,GAAG,GAAiC,CACpF,OACE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,YAAU,yBACV,UAAWA,EAAAA,GAAG,iEAAkE,CAAS,EACzF,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAsB,CAAE,YAAW,GAAG,GAAiE,CACrH,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,aAAsB,UAAvB,CACE,YAAU,0BACV,UAAWC,EAAAA,GAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,CAEL"}
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';\n\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\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-sm 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-2xs font-bold tracking-wider 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-xs tracking-wide 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":"wLAQA,SAAgB,EAAa,EAA0D,CACrF,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,OAAO,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,C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a,EACb,GAAG,GACuD,CAC1D,OACE,EAAA,EAAA,IAAA,CAACJ,EAAAA,aAAsB,OAAvB,CAAA,UACE,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,WAAvB,CACE,YAAU,4BACE,aACZ,UAAWC,EAAAA,GAAG,EAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAC2B,CAAA,CAElC,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,aAAsB,MAAvB,CACE,YAAU,sBACV,UAAWC,EAAAA,GAAG,0EAA2E,CAAS,EAClG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAqB,CAAE,YAAW,GAAG,GAAiC,CACpF,OACE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,YAAU,yBACV,UAAWA,EAAAA,GAAG,yDAA0D,CAAS,EACjF,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAsB,CAAE,YAAW,GAAG,GAAiE,CACrH,OACE,EAAA,EAAA,IAAA,CAACD,EAAAA,aAAsB,UAAvB,CACE,YAAU,0BACV,UAAWC,EAAAA,GAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,CAEL"}
@@ -1,34 +1,34 @@
1
1
  import { DropdownMenu } from "radix-ui";
2
- import { VariantProps } from "class-variance-authority";
3
2
  import { ComponentProps } from "react";
3
+ import { VariantProps } from "class-variance-authority";
4
4
  //#region src/components/DropdownMenu.d.ts
5
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;
6
+ declare function DropdownMenu$1(props: ComponentProps<typeof DropdownMenu.Root>): import("react").JSX.Element;
7
+ export declare function DropdownMenuTrigger(props: ComponentProps<typeof DropdownMenu.Trigger>): import("react").JSX.Element;
8
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?: ({
9
+ export declare function DropdownMenuGroup(props: ComponentProps<typeof DropdownMenu.Group>): import("react").JSX.Element;
10
+ export declare function DropdownMenuContent({ className, align, sideOffset, ...props }: ComponentProps<typeof DropdownMenu.Content>): import("react").JSX.Element;
11
+ export declare const dropdownMenuItemVariants: (props?: ({
12
12
  variant?: "default" | "destructive" | null | undefined;
13
13
  indented?: boolean | null | undefined;
14
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> {}
15
+ export interface DropdownMenuItemProps extends ComponentProps<typeof DropdownMenu.Item>, VariantProps<typeof dropdownMenuItemVariants> {}
16
+ export declare function DropdownMenuItem({ className, variant, indented, ...props }: DropdownMenuItemProps): import("react").JSX.Element;
17
+ export interface DropdownMenuCheckboxItemProps extends ComponentProps<typeof DropdownMenu.CheckboxItem>, VariantProps<typeof dropdownMenuItemVariants> {}
18
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;
19
+ export declare function DropdownMenuCheckboxItem({ className, variant, children, ...props }: DropdownMenuCheckboxItemProps): import("react").JSX.Element;
20
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;
21
+ export declare function DropdownMenuRadioGroup(props: ComponentProps<typeof DropdownMenu.RadioGroup>): import("react").JSX.Element;
22
+ export interface DropdownMenuRadioItemProps extends ComponentProps<typeof DropdownMenu.RadioItem>, VariantProps<typeof dropdownMenuItemVariants> {}
23
+ export declare function DropdownMenuRadioItem({ className, variant, children, ...props }: DropdownMenuRadioItemProps): import("react").JSX.Element;
24
+ export declare function DropdownMenuSub(props: ComponentProps<typeof DropdownMenu.Sub>): import("react").JSX.Element;
25
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;
26
+ export declare function DropdownMenuSubTrigger({ className, children, ...props }: ComponentProps<typeof DropdownMenu.SubTrigger>): import("react").JSX.Element;
27
+ export declare function DropdownMenuSubContent({ className, sideOffset, ...props }: ComponentProps<typeof DropdownMenu.SubContent>): import("react").JSX.Element;
28
+ export declare function DropdownMenuLabel({ className, ...props }: ComponentProps<typeof DropdownMenu.Label>): import("react").JSX.Element;
29
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;
30
+ export declare function DropdownMenuShortcut({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
31
+ export declare function DropdownMenuSeparator({ className, ...props }: ComponentProps<typeof DropdownMenu.Separator>): import("react").JSX.Element;
32
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 };
33
+ export { DropdownMenu$1 as DropdownMenu };
34
34
  //# sourceMappingURL=DropdownMenu.d.mts.map
@@ -1 +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,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AAsB,8BAAW,IAAA;wBAa1C,yBACd,WACA,eACG,SACF,sBAAsB,aAAsB,8BAAW,IAAA;wBAa1C,oBAAoB,cAAc,SAAS,sBAAsB,aAAsB,yBAAM,IAAA;;wBAW7F,uBAAuB,cAAc,SAAS,yCAAsB,IAAA;wBAUpE,wBAAwB,cAAc,SAAS,sBAAsB,aAAsB,6BAAU,IAAA"}
@@ -1,2 +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};
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-sm 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-2xs font-bold tracking-wider 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-xs tracking-wide 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
2
  //# sourceMappingURL=DropdownMenu.mjs.map
@@ -1 +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":"iPAOA,SAAgBA,EAAa,EAA0D,CACrF,OAAO,EAACC,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,OAAO,EAACA,EAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,CAAA,CACtF,CAGA,SAAgB,EAAkB,EAA2D,CAC3F,OAAO,EAACA,EAAsB,MAAvB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,MAAM,EACJ,6KAEF,SAAgB,EAAoB,CAClC,YACA,QAAQ,MACR,aAAa,EACb,GAAG,GACoD,CACvD,OACE,EAACA,EAAsB,OAAvB,CAAA,SACE,EAACA,EAAsB,QAAvB,CACE,YAAU,wBACH,QACK,aACZ,UAAW,EAAG,EAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAC2B,CAAA,CAElC,CAEA,MAAa,EAA2B,EACtC,4MACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,eACT,YAAa,eACf,EAEA,SAAU,CAAE,KAAM,OAAQ,MAAO,EAAG,CACtC,EACA,gBAAiB,CAAE,QAAS,UAAW,SAAU,EAAM,CACzD,CACF,EAKA,SAAgB,EAAiB,CAAE,YAAW,UAAS,WAAU,GAAG,GAAgC,CAClG,OACE,EAACA,EAAsB,KAAvB,CACE,YAAU,qBACV,eAAc,GAAW,UACzB,UAAW,EAAG,EAAyB,CAAE,UAAS,UAAS,CAAC,EAAG,CAAS,EACxE,GAAI,CACL,CAAA,CAEL,CAGA,SAAS,EAAc,CAAE,YAAqC,CAC5D,OACE,EAAC,OAAD,CAAM,UAAU,iFACd,SAAA,EAACA,EAAsB,cAAvB,CAAsC,UAA8C,CAAA,CAChF,CAAA,CAEV,CAMA,SAAgB,EAAyB,CAAE,YAAW,UAAS,WAAU,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CAAA,CAElC,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,OACE,EAACA,EAAsB,MAAvB,CACE,YAAU,sBACV,UAAW,EAAG,+EAAgF,CAAS,EACvG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAqB,CAAE,YAAW,GAAG,GAAiC,CACpF,OACE,EAAC,OAAD,CACE,YAAU,yBACV,UAAW,EAAG,iEAAkE,CAAS,EACzF,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAsB,CAAE,YAAW,GAAG,GAAiE,CACrH,OACE,EAACA,EAAsB,UAAvB,CACE,YAAU,0BACV,UAAW,EAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,CAEL"}
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';\n\nimport { CheckIcon, ChevronRightIcon } from '../icons/icons';\nimport { cn } from '../lib/cn';\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-sm 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-2xs font-bold tracking-wider 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-xs tracking-wide 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":"iPAQA,SAAgBA,EAAa,EAA0D,CACrF,OAAO,EAACC,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,OAAO,EAACA,EAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,CAAA,CACtF,CAGA,SAAgB,EAAkB,EAA2D,CAC3F,OAAO,EAACA,EAAsB,MAAvB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,MAAM,EACJ,6KAEF,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AAA,CAEL"}
@@ -1,2 +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 px-3 py-4 sm:px-4`,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;
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 px-3 py-4 sm:px-4`,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-base font-bold text-doom-hi`,children:r}),i?(0,n.jsx)(`span`,{className:`text-sm leading-relaxed text-doom-dim`,children:i}):null,a]})})}exports.EmptyState=r;
2
2
  //# sourceMappingURL=EmptyState.cjs.map
@@ -1 +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\n data-slot=\"empty-state\"\n className={cn('flex flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\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,CACE,YAAU,cACV,UAAWC,EAAAA,GAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,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"}
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';\n\nimport { cn } from '../lib/cn';\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\n data-slot=\"empty-state\"\n className={cn('flex flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\n <div className=\"flex w-[520px] max-w-full flex-col items-center gap-3 text-center\">\n <span className=\"text-base font-bold text-doom-hi\">{title}</span>\n {description ? <span className=\"text-sm leading-relaxed text-doom-dim\">{description}</span> : null}\n {children}\n </div>\n </Component>\n );\n}\n"],"mappings":"0FAkBA,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,CACE,YAAU,cACV,UAAWC,EAAAA,GAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,UAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,EACE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mCAAoC,SAAA,CAAY,CAAA,EAC/D,GAAc,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,wCAAyC,SAAA,CAAkB,CAAA,EAAI,KAC7F,CACE,GACI,CAAA,CAEf"}
@@ -1,6 +1,6 @@
1
1
  import { ComponentProps, ReactNode } from "react";
2
2
  //#region src/components/EmptyState.d.ts
3
- interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
3
+ export interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
4
4
  title: ReactNode;
5
5
  description?: ReactNode;
6
6
  /** Optional calls to action under the copy. */
@@ -12,7 +12,6 @@ interface EmptyStateProps extends Omit<ComponentProps<'div'>, 'title'> {
12
12
  asChild?: boolean;
13
13
  }
14
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;
15
+ export declare function EmptyState({ title, description, children, className, asChild, ...props }: EmptyStateProps): import("react").JSX.Element;
16
16
  //#endregion
17
- export { EmptyState, EmptyStateProps };
18
17
  //# sourceMappingURL=EmptyState.d.mts.map
@@ -1 +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"}
1
+ {"version":3,"file":"EmptyState.d.mts","names":[],"sources":["../../../src/components/EmptyState.tsx"],"mappings":";;iBAKiB,wBAAwB,KAAK;EAC5C,OAAO;EACP,cAAc;;EAEd,WAAW;;;;;EAKX;;;wBAIc,aAAa,OAAO,aAAa,UAAU,WAAW,YAAoB,SAAS,kCAAe,IAAA"}
@@ -1,2 +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 px-3 py-4 sm:px-4`,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};
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 px-3 py-4 sm:px-4`,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-base font-bold text-doom-hi`,children:i}),a?n(`span`,{className:`text-sm leading-relaxed text-doom-dim`,children:a}):null,o]})})}export{i as EmptyState};
2
2
  //# sourceMappingURL=EmptyState.mjs.map
@@ -1 +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\n data-slot=\"empty-state\"\n className={cn('flex flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\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,CACE,YAAU,cACV,UAAW,EAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,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"}
1
+ {"version":3,"file":"EmptyState.mjs","names":[],"sources":["../../../src/components/EmptyState.tsx"],"sourcesContent":["import { Slot } from 'radix-ui';\nimport type { ComponentProps, ReactNode } from 'react';\n\nimport { cn } from '../lib/cn';\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\n data-slot=\"empty-state\"\n className={cn('flex flex-1 items-center justify-center px-3 py-4 sm:px-4', className)}\n {...props}\n >\n <div className=\"flex w-[520px] max-w-full flex-col items-center gap-3 text-center\">\n <span className=\"text-base font-bold text-doom-hi\">{title}</span>\n {description ? <span className=\"text-sm leading-relaxed text-doom-dim\">{description}</span> : null}\n {children}\n </div>\n </Component>\n );\n}\n"],"mappings":"qHAkBA,SAAgB,EAAW,CAAE,QAAO,cAAa,WAAU,YAAW,UAAU,GAAO,GAAG,GAA0B,CAClH,IAAM,EAAY,EAAU,EAAK,KAAO,MACxC,OACE,EAAC,EAAD,CACE,YAAU,cACV,UAAW,EAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,SAAA,EAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,CACE,EAAC,OAAD,CAAM,UAAU,mCAAoC,SAAA,CAAY,CAAA,EAC/D,EAAc,EAAC,OAAD,CAAM,UAAU,wCAAyC,SAAA,CAAkB,CAAA,EAAI,KAC7F,CACE,GACI,CAAA,CAEf"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs"),t=require("../lib/hashlineHighlight.cjs"),n=require("../lib/syntaxHighlight.cjs"),r=require("./SyntaxText.cjs");let i=require("react/jsx-runtime"),a=require("react");const o=new Map;function s(e){let r=t.hashlineGroupsKey(e),[i,s]=(0,a.useState)(void 0);return(0,a.useEffect)(()=>{let t=!0,i=new Map,a=e.map(async e=>{let t=n.detectGrammar({path:e.path,text:e.text});if(t===void 0)return;let r=await n.highlightToLines(e.text,t);if(r!==void 0)for(let[t,n]of e.indices.entries()){let e=r[t];e!==void 0&&i.set(n,e)}});return Promise.allSettled(a).then(()=>{t&&i.size>0&&s({key:r,spans:i})}),()=>{t=!1}},[r]),i?.key===r?i.spans:o}function c({className:n,lines:o,gutter:c,path:l,...u}){let d=s((0,a.useMemo)(()=>t.hashlineGroups(o,l),[o,l])),f={width:`${c}ch`};return(0,i.jsx)(`div`,{"data-slot":`hashline-lines`,className:e.cn(`flex flex-col font-mono`,n),...u,children:o.map((e,t)=>{if(e.type===`file`)return(0,i.jsx)(`span`,{className:`mt-1 truncate text-doom-faint first:mt-0`,children:e.path},t);if(e.type===`plain`)return(0,i.jsx)(`span`,{className:`whitespace-pre-wrap break-words text-doom-dim`,children:e.text},t);let{value:n}=e;return(0,i.jsxs)(`span`,{className:`flex gap-2`,children:[n.marker===void 0?null:(0,i.jsx)(`span`,{className:`w-4 shrink-0 ${n.marker===`match`?`text-doom-blue`:`text-doom-faint`}`,children:n.marker===`match`?`>>`:``}),(0,i.jsx)(`span`,{className:`shrink-0 text-right text-doom-faint`,style:f,children:n.line}),(0,i.jsx)(r.SyntaxLine,{spans:d.get(t),text:n.content,className:`min-w-0 whitespace-pre-wrap break-words ${n.marker===`match`?`text-doom-hi`:`text-doom-text`}`})]},t)})})}exports.HashlineLines=c;
2
+ //# sourceMappingURL=HashlineLines.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HashlineLines.cjs","names":["hashlineGroupsKey","useState","detectGrammar","highlightToLines","useMemo","hashlineGroups","cn","SyntaxLine"],"sources":["../../../src/components/HashlineLines.tsx"],"sourcesContent":["import { type ComponentProps, useEffect, useMemo, useState } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { type HashlineGroup, hashlineGroups, hashlineGroupsKey } from '../lib/hashlineHighlight';\nimport type { PresentedLine } from '../lib/hashlineView';\nimport { detectGrammar, highlightToLines, type SyntaxSpan } from '../lib/syntaxHighlight';\nimport { SyntaxLine } from './SyntaxText';\n\n/**\n * The anchored body shared by hashline results: a file heading per group, a\n * right-aligned line-number gutter, and a `>>` marker on grep matches. The\n * gutter width is a style, not a class, because it follows the widest number.\n *\n * The anchored lines are coloured with the editor's grammars when the body\n * names a file, or when `path` names one for a result that does not. Colour\n * arrives a frame or two late and never blocks the text: an unhighlighted body\n * is the same body without the colours.\n */\nexport interface HashlineLinesProps extends ComponentProps<'div'> {\n lines: readonly PresentedLine[];\n /** Width of the line-number column, in characters, from `hashlineBody`. */\n gutter: number;\n /** The file a body of bare anchored lines came from, for highlighting. */\n path?: string | undefined;\n}\n\nconst NO_SPANS: ReadonlyMap<number, readonly SyntaxSpan[]> = new Map();\n\n/**\n * Spans per presented-line index, once every file's run has parsed. The result\n * is stored with the body it belongs to, so a body that has changed since\n * reads as plain rather than wearing the previous body's colours.\n */\nfunction useHashlineSpans(groups: readonly HashlineGroup[]): ReadonlyMap<number, readonly SyntaxSpan[]> {\n const key = hashlineGroupsKey(groups);\n const [done, setDone] = useState<{ key: string; spans: ReadonlyMap<number, readonly SyntaxSpan[]> } | undefined>(\n undefined,\n );\n\n useEffect(() => {\n let live = true;\n const next = new Map<number, readonly SyntaxSpan[]>();\n const work = groups.map(async (group) => {\n const grammar = detectGrammar({ path: group.path, text: group.text });\n if (grammar === undefined) return;\n const highlighted = await highlightToLines(group.text, grammar);\n if (highlighted === undefined) return;\n for (const [offset, index] of group.indices.entries()) {\n const line = highlighted[offset];\n if (line !== undefined) next.set(index, line);\n }\n });\n // One state write for the whole body, so a many-file grep result does not\n // repaint once per file. A grammar that fails to load leaves its run plain.\n void Promise.allSettled(work).then(() => {\n if (live && next.size > 0) setDone({ key, spans: next });\n });\n return () => {\n live = false;\n };\n // The groups are rebuilt every render; their key is what actually changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return done?.key === key ? done.spans : NO_SPANS;\n}\n\nexport function HashlineLines({ className, lines, gutter, path, ...props }: HashlineLinesProps) {\n const groups = useMemo(() => hashlineGroups(lines, path), [lines, path]);\n const spans = useHashlineSpans(groups);\n // Bound to a name rather than written inline: this file ships as a scaffold\n // template too, and an inline style object opens with the same two braces\n // Liquid reads as an output tag, which fails to render.\n const gutterStyle = { width: `${gutter}ch` };\n return (\n <div data-slot=\"hashline-lines\" className={cn('flex flex-col font-mono', className)} {...props}>\n {lines.map((line, index) => {\n if (line.type === 'file') {\n return (\n <span key={index} className=\"mt-1 truncate text-doom-faint first:mt-0\">\n {line.path}\n </span>\n );\n }\n if (line.type === 'plain') {\n return (\n <span key={index} className=\"whitespace-pre-wrap break-words text-doom-dim\">\n {line.text}\n </span>\n );\n }\n const { value } = line;\n return (\n <span key={index} className=\"flex gap-2\">\n {value.marker !== undefined ? (\n <span className={`w-4 shrink-0 ${value.marker === 'match' ? 'text-doom-blue' : 'text-doom-faint'}`}>\n {value.marker === 'match' ? '>>' : ''}\n </span>\n ) : null}\n <span className=\"shrink-0 text-right text-doom-faint\" style={gutterStyle}>\n {value.line}\n </span>\n <SyntaxLine\n spans={spans.get(index)}\n text={value.content}\n className={`min-w-0 whitespace-pre-wrap break-words ${value.marker === 'match' ? 'text-doom-hi' : 'text-doom-text'}`}\n />\n </span>\n );\n })}\n </div>\n );\n}\n"],"mappings":"uMA0BA,MAAM,EAAuD,IAAI,IAOjE,SAAS,EAAiB,EAA8E,CACtG,IAAM,EAAMA,EAAAA,kBAAkB,CAAM,EAC9B,CAAC,EAAM,IAAA,EAAWC,EAAAA,SAAAA,CACtB,IAAA,EACF,EA2BA,OAzBA,EAAA,EAAA,UAAA,KAAgB,CACd,IAAI,EAAO,GACL,EAAO,IAAI,IACX,EAAO,EAAO,IAAI,KAAO,IAAU,CACvC,IAAM,EAAUC,EAAAA,cAAc,CAAE,KAAM,EAAM,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AId,MAHF,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,gBAAgB,EAAM,SAAW,QAAU,iBAAmB,oBAC5E,SAAA,EAAM,SAAW,QAAU,KAAO,EAC/B,CAAA,GAER,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sCAAsC,MAAO,EAC1D,SAAA,EAAM,IACH,CAAA,GACN,EAAA,EAAA,IAAA,CAACC,EAAAA,WAAD,CACE,MAAO,EAAM,IAAI,CAAK,EACtB,KAAM,EAAM,QACZ,UAAW,2CAA2C,EAAM,SAAW,QAAU,eAAiB,kBACnG,CAAA,CACG,CAdK,EAAA,CAcL,CAEV,CAAC,CACE,CAAA,CAET"}
@@ -0,0 +1,23 @@
1
+ import { PresentedLine } from "../lib/hashlineView.mjs";
2
+ import { ComponentProps } from "react";
3
+ //#region src/components/HashlineLines.d.ts
4
+ /**
5
+ * The anchored body shared by hashline results: a file heading per group, a
6
+ * right-aligned line-number gutter, and a `>>` marker on grep matches. The
7
+ * gutter width is a style, not a class, because it follows the widest number.
8
+ *
9
+ * The anchored lines are coloured with the editor's grammars when the body
10
+ * names a file, or when `path` names one for a result that does not. Colour
11
+ * arrives a frame or two late and never blocks the text: an unhighlighted body
12
+ * is the same body without the colours.
13
+ */
14
+ export interface HashlineLinesProps extends ComponentProps<'div'> {
15
+ lines: readonly PresentedLine[];
16
+ /** Width of the line-number column, in characters, from `hashlineBody`. */
17
+ gutter: number;
18
+ /** The file a body of bare anchored lines came from, for highlighting. */
19
+ path?: string | undefined;
20
+ }
21
+ export declare function HashlineLines({ className, lines, gutter, path, ...props }: HashlineLinesProps): import("react").JSX.Element;
22
+ //#endregion
23
+ //# sourceMappingURL=HashlineLines.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HashlineLines.d.mts","names":[],"sources":["../../../src/components/HashlineLines.tsx"],"mappings":";;;;;;;;;;;;;iBAkBiB,2BAA2B;EAC1C,gBAAgB;;EAEhB;;EAEA;;wBA4Cc,gBAAgB,WAAW,OAAO,QAAQ,SAAS,SAAS,qCAAkB,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{hashlineGroups as t,hashlineGroupsKey as n}from"../lib/hashlineHighlight.mjs";import{detectGrammar as r,highlightToLines as i}from"../lib/syntaxHighlight.mjs";import{SyntaxLine as a}from"./SyntaxText.mjs";import{jsx as o,jsxs as s}from"react/jsx-runtime";import{useEffect as c,useMemo as l,useState as u}from"react";const d=new Map;function f(e){let t=n(e),[a,o]=u(void 0);return c(()=>{let n=!0,a=new Map,s=e.map(async e=>{let t=r({path:e.path,text:e.text});if(t===void 0)return;let n=await i(e.text,t);if(n!==void 0)for(let[t,r]of e.indices.entries()){let e=n[t];e!==void 0&&a.set(r,e)}});return Promise.allSettled(s).then(()=>{n&&a.size>0&&o({key:t,spans:a})}),()=>{n=!1}},[t]),a?.key===t?a.spans:d}function p({className:n,lines:r,gutter:i,path:c,...u}){let d=f(l(()=>t(r,c),[r,c])),p={width:`${i}ch`};return o(`div`,{"data-slot":`hashline-lines`,className:e(`flex flex-col font-mono`,n),...u,children:r.map((e,t)=>{if(e.type===`file`)return o(`span`,{className:`mt-1 truncate text-doom-faint first:mt-0`,children:e.path},t);if(e.type===`plain`)return o(`span`,{className:`whitespace-pre-wrap break-words text-doom-dim`,children:e.text},t);let{value:n}=e;return s(`span`,{className:`flex gap-2`,children:[n.marker===void 0?null:o(`span`,{className:`w-4 shrink-0 ${n.marker===`match`?`text-doom-blue`:`text-doom-faint`}`,children:n.marker===`match`?`>>`:``}),o(`span`,{className:`shrink-0 text-right text-doom-faint`,style:p,children:n.line}),o(a,{spans:d.get(t),text:n.content,className:`min-w-0 whitespace-pre-wrap break-words ${n.marker===`match`?`text-doom-hi`:`text-doom-text`}`})]},t)})})}export{p as HashlineLines};
2
+ //# sourceMappingURL=HashlineLines.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HashlineLines.mjs","names":[],"sources":["../../../src/components/HashlineLines.tsx"],"sourcesContent":["import { type ComponentProps, useEffect, useMemo, useState } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { type HashlineGroup, hashlineGroups, hashlineGroupsKey } from '../lib/hashlineHighlight';\nimport type { PresentedLine } from '../lib/hashlineView';\nimport { detectGrammar, highlightToLines, type SyntaxSpan } from '../lib/syntaxHighlight';\nimport { SyntaxLine } from './SyntaxText';\n\n/**\n * The anchored body shared by hashline results: a file heading per group, a\n * right-aligned line-number gutter, and a `>>` marker on grep matches. The\n * gutter width is a style, not a class, because it follows the widest number.\n *\n * The anchored lines are coloured with the editor's grammars when the body\n * names a file, or when `path` names one for a result that does not. Colour\n * arrives a frame or two late and never blocks the text: an unhighlighted body\n * is the same body without the colours.\n */\nexport interface HashlineLinesProps extends ComponentProps<'div'> {\n lines: readonly PresentedLine[];\n /** Width of the line-number column, in characters, from `hashlineBody`. */\n gutter: number;\n /** The file a body of bare anchored lines came from, for highlighting. */\n path?: string | undefined;\n}\n\nconst NO_SPANS: ReadonlyMap<number, readonly SyntaxSpan[]> = new Map();\n\n/**\n * Spans per presented-line index, once every file's run has parsed. The result\n * is stored with the body it belongs to, so a body that has changed since\n * reads as plain rather than wearing the previous body's colours.\n */\nfunction useHashlineSpans(groups: readonly HashlineGroup[]): ReadonlyMap<number, readonly SyntaxSpan[]> {\n const key = hashlineGroupsKey(groups);\n const [done, setDone] = useState<{ key: string; spans: ReadonlyMap<number, readonly SyntaxSpan[]> } | undefined>(\n undefined,\n );\n\n useEffect(() => {\n let live = true;\n const next = new Map<number, readonly SyntaxSpan[]>();\n const work = groups.map(async (group) => {\n const grammar = detectGrammar({ path: group.path, text: group.text });\n if (grammar === undefined) return;\n const highlighted = await highlightToLines(group.text, grammar);\n if (highlighted === undefined) return;\n for (const [offset, index] of group.indices.entries()) {\n const line = highlighted[offset];\n if (line !== undefined) next.set(index, line);\n }\n });\n // One state write for the whole body, so a many-file grep result does not\n // repaint once per file. A grammar that fails to load leaves its run plain.\n void Promise.allSettled(work).then(() => {\n if (live && next.size > 0) setDone({ key, spans: next });\n });\n return () => {\n live = false;\n };\n // The groups are rebuilt every render; their key is what actually changes.\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [key]);\n\n return done?.key === key ? done.spans : NO_SPANS;\n}\n\nexport function HashlineLines({ className, lines, gutter, path, ...props }: HashlineLinesProps) {\n const groups = useMemo(() => hashlineGroups(lines, path), [lines, path]);\n const spans = useHashlineSpans(groups);\n // Bound to a name rather than written inline: this file ships as a scaffold\n // template too, and an inline style object opens with the same two braces\n // Liquid reads as an output tag, which fails to render.\n const gutterStyle = { width: `${gutter}ch` };\n return (\n <div data-slot=\"hashline-lines\" className={cn('flex flex-col font-mono', className)} {...props}>\n {lines.map((line, index) => {\n if (line.type === 'file') {\n return (\n <span key={index} className=\"mt-1 truncate text-doom-faint first:mt-0\">\n {line.path}\n </span>\n );\n }\n if (line.type === 'plain') {\n return (\n <span key={index} className=\"whitespace-pre-wrap break-words text-doom-dim\">\n {line.text}\n </span>\n );\n }\n const { value } = line;\n return (\n <span key={index} className=\"flex gap-2\">\n {value.marker !== undefined ? (\n <span className={`w-4 shrink-0 ${value.marker === 'match' ? 'text-doom-blue' : 'text-doom-faint'}`}>\n {value.marker === 'match' ? '>>' : ''}\n </span>\n ) : null}\n <span className=\"shrink-0 text-right text-doom-faint\" style={gutterStyle}>\n {value.line}\n </span>\n <SyntaxLine\n spans={spans.get(index)}\n text={value.content}\n className={`min-w-0 whitespace-pre-wrap break-words ${value.marker === 'match' ? 'text-doom-hi' : 'text-doom-text'}`}\n />\n </span>\n );\n })}\n </div>\n );\n}\n"],"mappings":"sWA0BA,MAAM,EAAuD,IAAI,IAOjE,SAAS,EAAiB,EAA8E,CACtG,IAAM,EAAM,EAAkB,CAAM,EAC9B,CAAC,EAAM,GAAW,EACtB,IAAA,EACF,EA2BA,OAzBA,MAAgB,CACd,IAAI,EAAO,GACL,EAAO,IAAI,IACX,EAAO,EAAO,IAAI,KAAO,IAAU,CACvC,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AAM,SAAW,QAAU,KAAO,EAC/B,CAAA,EAER,EAAC,OAAD,CAAM,UAAU,sCAAsC,MAAO,EAC1D,SAAA,EAAM,IACH,CAAA,EACN,EAAC,EAAD,CACE,MAAO,EAAM,IAAI,CAAK,EACtB,KAAM,EAAM,QACZ,UAAW,2CAA2C,EAAM,SAAW,QAAU,eAAiB,kBACnG,CAAA,CACG,CAdK,EAAA,CAcL,CAEV,CAAC,CACE,CAAA,CAET"}
@@ -1,2 +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;
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-2xs`,sm:`px-2 py-1 text-xs`,md:`px-2.5 py-1.5 text-sm`,lg:`px-3 py-2 text-base`}},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
2
  //# sourceMappingURL=Input.cjs.map
@@ -1 +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"}
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';\n\nimport { cn } from '../lib/cn';\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-2xs',\n sm: 'px-2 py-1 text-xs',\n md: 'px-2.5 py-1.5 text-sm',\n lg: 'px-3 py-2 text-base',\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":"oEAUA,MAAa,GAAA,oCAAgBA,CAAAA,CAAAA,IAAAA,CAC3B,2JACA,CACE,SAAU,CACR,QAAS,CACP,QAAS,6FAET,KAAM,yBACR,EAEA,KAAM,CACJ,GAAI,yBACJ,GAAI,oBACJ,GAAI,wBACJ,GAAI,qBACN,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"}
@@ -1,20 +1,19 @@
1
- import { VariantProps } from "class-variance-authority";
2
1
  import { ComponentProps } from "react";
2
+ import { VariantProps } from "class-variance-authority";
3
3
  //#region src/components/Input.d.ts
4
4
  /**
5
5
  * The shape both fields wear, so a single-line and a multi-line field in the
6
6
  * same form agree on their well, their type ramp, and their invalid state.
7
7
  * Textarea builds on it rather than restating it.
8
8
  */
9
- declare const fieldVariants: (props?: ({
9
+ export declare const fieldVariants: (props?: ({
10
10
  variant?: "bare" | "default" | null | undefined;
11
11
  size?: "lg" | "md" | "sm" | "xs" | null | undefined;
12
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> {}
13
+ export type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;
14
+ export type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;
15
+ export interface InputProps extends Omit<ComponentProps<'input'>, 'size'>, VariantProps<typeof fieldVariants> {}
16
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;
17
+ export declare function Input({ className, type, variant, size, ...props }: InputProps): import("react").JSX.Element;
18
18
  //#endregion
19
- export { FieldSize, FieldVariant, Input, InputProps, fieldVariants };
20
19
  //# sourceMappingURL=Input.d.mts.map
@@ -1 +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"}
1
+ {"version":3,"file":"Input.d.mts","names":[],"sources":["../../../src/components/Input.tsx"],"mappings":";;;;;;;;qBAUa,gBAAa;;;6CAwBzB;YAEW,eAAe,YAAY,oBAAoB;YAC/C,YAAY,YAAY,oBAAoB;iBAEvC,mBAAmB,KAAK,kCAAkC,oBAAoB;;wBAG/E,QAAQ,WAAW,MAAM,SAAS,SAAS,SAAS,6BAAU,IAAA"}
@@ -1,2 +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};
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-2xs`,sm:`px-2 py-1 text-xs`,md:`px-2.5 py-1.5 text-sm`,lg:`px-3 py-2 text-base`}},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
2
  //# sourceMappingURL=Input.mjs.map