@agimon-ai/doompi-web-components 0.0.1-alpha.4 → 0.0.1-alpha.40

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 (503) hide show
  1. package/README.md +7 -7
  2. package/dist/index.cjs +1 -1
  3. package/dist/index.d.mts +18 -6
  4. package/dist/index.mjs +1 -1
  5. package/dist/src/components/Accordion.cjs +1 -1
  6. package/dist/src/components/Accordion.cjs.map +1 -1
  7. package/dist/src/components/Accordion.d.mts +5 -5
  8. package/dist/src/components/Accordion.d.mts.map +1 -1
  9. package/dist/src/components/Accordion.mjs +1 -1
  10. package/dist/src/components/Accordion.mjs.map +1 -1
  11. package/dist/src/components/AnsiText.cjs +4 -0
  12. package/dist/src/components/AnsiText.cjs.map +1 -0
  13. package/dist/src/components/AnsiText.d.mts +16 -0
  14. package/dist/src/components/AnsiText.d.mts.map +1 -0
  15. package/dist/src/components/AnsiText.mjs +4 -0
  16. package/dist/src/components/AnsiText.mjs.map +1 -0
  17. package/dist/src/components/Avatar.cjs +1 -1
  18. package/dist/src/components/Avatar.cjs.map +1 -1
  19. package/dist/src/components/Avatar.d.mts +4 -4
  20. package/dist/src/components/Avatar.d.mts.map +1 -1
  21. package/dist/src/components/Avatar.mjs +1 -1
  22. package/dist/src/components/Avatar.mjs.map +1 -1
  23. package/dist/src/components/Badge.cjs +1 -1
  24. package/dist/src/components/Badge.cjs.map +1 -1
  25. package/dist/src/components/Badge.d.mts +5 -6
  26. package/dist/src/components/Badge.d.mts.map +1 -1
  27. package/dist/src/components/Badge.mjs +1 -1
  28. package/dist/src/components/Badge.mjs.map +1 -1
  29. package/dist/src/components/Breadcrumb.cjs +1 -1
  30. package/dist/src/components/Breadcrumb.cjs.map +1 -1
  31. package/dist/src/components/Breadcrumb.d.mts +4 -5
  32. package/dist/src/components/Breadcrumb.d.mts.map +1 -1
  33. package/dist/src/components/Breadcrumb.mjs +1 -1
  34. package/dist/src/components/Breadcrumb.mjs.map +1 -1
  35. package/dist/src/components/Button.cjs +1 -1
  36. package/dist/src/components/Button.cjs.map +1 -1
  37. package/dist/src/components/Button.d.mts +6 -7
  38. package/dist/src/components/Button.d.mts.map +1 -1
  39. package/dist/src/components/Button.mjs +1 -1
  40. package/dist/src/components/Button.mjs.map +1 -1
  41. package/dist/src/components/Checkbox.cjs +1 -1
  42. package/dist/src/components/Checkbox.cjs.map +1 -1
  43. package/dist/src/components/Checkbox.d.mts +1 -1
  44. package/dist/src/components/Checkbox.d.mts.map +1 -1
  45. package/dist/src/components/Checkbox.mjs +1 -1
  46. package/dist/src/components/Checkbox.mjs.map +1 -1
  47. package/dist/src/components/CodeBlock.cjs +2 -0
  48. package/dist/src/components/CodeBlock.cjs.map +1 -0
  49. package/dist/src/components/CodeBlock.mjs +2 -0
  50. package/dist/src/components/CodeBlock.mjs.map +1 -0
  51. package/dist/src/components/CodeEditor.cjs +1 -1
  52. package/dist/src/components/CodeEditor.cjs.map +1 -1
  53. package/dist/src/components/CodeEditor.d.mts +1 -2
  54. package/dist/src/components/CodeEditor.d.mts.map +1 -1
  55. package/dist/src/components/CodeEditor.mjs +1 -1
  56. package/dist/src/components/CodeEditor.mjs.map +1 -1
  57. package/dist/src/components/CodeEditorView.cjs +1 -1
  58. package/dist/src/components/CodeEditorView.cjs.map +1 -1
  59. package/dist/src/components/CodeEditorView.mjs +1 -1
  60. package/dist/src/components/CodeEditorView.mjs.map +1 -1
  61. package/dist/src/components/Collapsible.cjs +1 -1
  62. package/dist/src/components/Collapsible.cjs.map +1 -1
  63. package/dist/src/components/Collapsible.d.mts +4 -4
  64. package/dist/src/components/Collapsible.d.mts.map +1 -1
  65. package/dist/src/components/Collapsible.mjs +1 -1
  66. package/dist/src/components/Collapsible.mjs.map +1 -1
  67. package/dist/src/components/Command.cjs +1 -1
  68. package/dist/src/components/Command.cjs.map +1 -1
  69. package/dist/src/components/Command.d.mts +11 -12
  70. package/dist/src/components/Command.d.mts.map +1 -1
  71. package/dist/src/components/Command.mjs +1 -1
  72. package/dist/src/components/Command.mjs.map +1 -1
  73. package/dist/src/components/CopyButton.cjs +2 -0
  74. package/dist/src/components/CopyButton.cjs.map +1 -0
  75. package/dist/src/components/CopyButton.mjs +2 -0
  76. package/dist/src/components/CopyButton.mjs.map +1 -0
  77. package/dist/src/components/Dialog.cjs +1 -1
  78. package/dist/src/components/Dialog.cjs.map +1 -1
  79. package/dist/src/components/Dialog.d.mts +15 -15
  80. package/dist/src/components/Dialog.d.mts.map +1 -1
  81. package/dist/src/components/Dialog.mjs +1 -1
  82. package/dist/src/components/Dialog.mjs.map +1 -1
  83. package/dist/src/components/Dot.cjs +1 -1
  84. package/dist/src/components/Dot.cjs.map +1 -1
  85. package/dist/src/components/Dot.d.mts +5 -6
  86. package/dist/src/components/Dot.d.mts.map +1 -1
  87. package/dist/src/components/Dot.mjs +1 -1
  88. package/dist/src/components/Dot.mjs.map +1 -1
  89. package/dist/src/components/Drawer.cjs +2 -0
  90. package/dist/src/components/Drawer.cjs.map +1 -0
  91. package/dist/src/components/Drawer.d.mts +17 -0
  92. package/dist/src/components/Drawer.d.mts.map +1 -0
  93. package/dist/src/components/Drawer.mjs +2 -0
  94. package/dist/src/components/Drawer.mjs.map +1 -0
  95. package/dist/src/components/DropdownMenu.cjs +1 -1
  96. package/dist/src/components/DropdownMenu.cjs.map +1 -1
  97. package/dist/src/components/DropdownMenu.d.mts +20 -20
  98. package/dist/src/components/DropdownMenu.d.mts.map +1 -1
  99. package/dist/src/components/DropdownMenu.mjs +1 -1
  100. package/dist/src/components/DropdownMenu.mjs.map +1 -1
  101. package/dist/src/components/EmptyState.cjs +1 -1
  102. package/dist/src/components/EmptyState.cjs.map +1 -1
  103. package/dist/src/components/EmptyState.d.mts +2 -3
  104. package/dist/src/components/EmptyState.d.mts.map +1 -1
  105. package/dist/src/components/EmptyState.mjs +1 -1
  106. package/dist/src/components/EmptyState.mjs.map +1 -1
  107. package/dist/src/components/HashlineLines.cjs +2 -0
  108. package/dist/src/components/HashlineLines.cjs.map +1 -0
  109. package/dist/src/components/HashlineLines.d.mts +23 -0
  110. package/dist/src/components/HashlineLines.d.mts.map +1 -0
  111. package/dist/src/components/HashlineLines.mjs +2 -0
  112. package/dist/src/components/HashlineLines.mjs.map +1 -0
  113. package/dist/src/components/Input.cjs +1 -1
  114. package/dist/src/components/Input.cjs.map +1 -1
  115. package/dist/src/components/Input.d.mts +6 -7
  116. package/dist/src/components/Input.d.mts.map +1 -1
  117. package/dist/src/components/Input.mjs +1 -1
  118. package/dist/src/components/Input.mjs.map +1 -1
  119. package/dist/src/components/Kbd.cjs +1 -1
  120. package/dist/src/components/Kbd.cjs.map +1 -1
  121. package/dist/src/components/Kbd.d.mts +1 -2
  122. package/dist/src/components/Kbd.d.mts.map +1 -1
  123. package/dist/src/components/Kbd.mjs +1 -1
  124. package/dist/src/components/Kbd.mjs.map +1 -1
  125. package/dist/src/components/Label.cjs +1 -1
  126. package/dist/src/components/Label.cjs.map +1 -1
  127. package/dist/src/components/Label.d.mts +1 -1
  128. package/dist/src/components/Label.d.mts.map +1 -1
  129. package/dist/src/components/Label.mjs +1 -1
  130. package/dist/src/components/Label.mjs.map +1 -1
  131. package/dist/src/components/Markdown.cjs +2 -1
  132. package/dist/src/components/Markdown.cjs.map +1 -1
  133. package/dist/src/components/Markdown.d.mts +12 -3
  134. package/dist/src/components/Markdown.d.mts.map +1 -1
  135. package/dist/src/components/Markdown.mjs +2 -1
  136. package/dist/src/components/Markdown.mjs.map +1 -1
  137. package/dist/src/components/MediaPreview.cjs +1 -1
  138. package/dist/src/components/MediaPreview.cjs.map +1 -1
  139. package/dist/src/components/MediaPreview.d.mts +39 -3
  140. package/dist/src/components/MediaPreview.d.mts.map +1 -1
  141. package/dist/src/components/MediaPreview.mjs +1 -1
  142. package/dist/src/components/MediaPreview.mjs.map +1 -1
  143. package/dist/src/components/MermaidDiagram.cjs +2 -0
  144. package/dist/src/components/MermaidDiagram.cjs.map +1 -0
  145. package/dist/src/components/MermaidDiagram.mjs +2 -0
  146. package/dist/src/components/MermaidDiagram.mjs.map +1 -0
  147. package/dist/src/components/MessageItem.cjs +1 -1
  148. package/dist/src/components/MessageItem.cjs.map +1 -1
  149. package/dist/src/components/MessageItem.d.mts +48 -17
  150. package/dist/src/components/MessageItem.d.mts.map +1 -1
  151. package/dist/src/components/MessageItem.mjs +1 -1
  152. package/dist/src/components/MessageItem.mjs.map +1 -1
  153. package/dist/src/components/MessageLines.cjs +1 -1
  154. package/dist/src/components/MessageLines.cjs.map +1 -1
  155. package/dist/src/components/MessageLines.d.mts +5 -6
  156. package/dist/src/components/MessageLines.d.mts.map +1 -1
  157. package/dist/src/components/MessageLines.mjs +1 -1
  158. package/dist/src/components/MessageLines.mjs.map +1 -1
  159. package/dist/src/components/OptionList.cjs +1 -1
  160. package/dist/src/components/OptionList.cjs.map +1 -1
  161. package/dist/src/components/OptionList.d.mts +9 -10
  162. package/dist/src/components/OptionList.d.mts.map +1 -1
  163. package/dist/src/components/OptionList.mjs +1 -1
  164. package/dist/src/components/OptionList.mjs.map +1 -1
  165. package/dist/src/components/Panel.cjs +1 -1
  166. package/dist/src/components/Panel.cjs.map +1 -1
  167. package/dist/src/components/Panel.d.mts +4 -5
  168. package/dist/src/components/Panel.d.mts.map +1 -1
  169. package/dist/src/components/Panel.mjs +1 -1
  170. package/dist/src/components/Panel.mjs.map +1 -1
  171. package/dist/src/components/PdfPreview.cjs +2 -0
  172. package/dist/src/components/PdfPreview.cjs.map +1 -0
  173. package/dist/src/components/PdfPreview.d.mts +52 -0
  174. package/dist/src/components/PdfPreview.d.mts.map +1 -0
  175. package/dist/src/components/PdfPreview.mjs +2 -0
  176. package/dist/src/components/PdfPreview.mjs.map +1 -0
  177. package/dist/src/components/Popover.cjs +1 -1
  178. package/dist/src/components/Popover.cjs.map +1 -1
  179. package/dist/src/components/Popover.d.mts +8 -8
  180. package/dist/src/components/Popover.d.mts.map +1 -1
  181. package/dist/src/components/Popover.mjs +1 -1
  182. package/dist/src/components/Popover.mjs.map +1 -1
  183. package/dist/src/components/Progress.cjs +1 -1
  184. package/dist/src/components/Progress.cjs.map +1 -1
  185. package/dist/src/components/Progress.d.mts +1 -1
  186. package/dist/src/components/Progress.d.mts.map +1 -1
  187. package/dist/src/components/Progress.mjs +1 -1
  188. package/dist/src/components/Progress.mjs.map +1 -1
  189. package/dist/src/components/RadioGroup.cjs +1 -1
  190. package/dist/src/components/RadioGroup.cjs.map +1 -1
  191. package/dist/src/components/RadioGroup.d.mts +4 -4
  192. package/dist/src/components/RadioGroup.d.mts.map +1 -1
  193. package/dist/src/components/RadioGroup.mjs +1 -1
  194. package/dist/src/components/RadioGroup.mjs.map +1 -1
  195. package/dist/src/components/ScrollArea.cjs +1 -1
  196. package/dist/src/components/ScrollArea.cjs.map +1 -1
  197. package/dist/src/components/ScrollArea.d.mts +3 -3
  198. package/dist/src/components/ScrollArea.d.mts.map +1 -1
  199. package/dist/src/components/ScrollArea.mjs +1 -1
  200. package/dist/src/components/ScrollArea.mjs.map +1 -1
  201. package/dist/src/components/SectionLabel.cjs +1 -1
  202. package/dist/src/components/SectionLabel.cjs.map +1 -1
  203. package/dist/src/components/SectionLabel.d.mts +1 -2
  204. package/dist/src/components/SectionLabel.d.mts.map +1 -1
  205. package/dist/src/components/SectionLabel.mjs +1 -1
  206. package/dist/src/components/SectionLabel.mjs.map +1 -1
  207. package/dist/src/components/Select.cjs +1 -1
  208. package/dist/src/components/Select.cjs.map +1 -1
  209. package/dist/src/components/Select.d.mts +9 -9
  210. package/dist/src/components/Select.d.mts.map +1 -1
  211. package/dist/src/components/Select.mjs +1 -1
  212. package/dist/src/components/Select.mjs.map +1 -1
  213. package/dist/src/components/Separator.cjs +1 -1
  214. package/dist/src/components/Separator.cjs.map +1 -1
  215. package/dist/src/components/Separator.d.mts +1 -1
  216. package/dist/src/components/Separator.d.mts.map +1 -1
  217. package/dist/src/components/Separator.mjs +1 -1
  218. package/dist/src/components/Separator.mjs.map +1 -1
  219. package/dist/src/components/Sheet.cjs +2 -0
  220. package/dist/src/components/Sheet.cjs.map +1 -0
  221. package/dist/src/components/Sheet.d.mts +35 -0
  222. package/dist/src/components/Sheet.d.mts.map +1 -0
  223. package/dist/src/components/Sheet.mjs +2 -0
  224. package/dist/src/components/Sheet.mjs.map +1 -0
  225. package/dist/src/components/Skeleton.cjs +1 -1
  226. package/dist/src/components/Skeleton.cjs.map +1 -1
  227. package/dist/src/components/Skeleton.d.mts +1 -2
  228. package/dist/src/components/Skeleton.d.mts.map +1 -1
  229. package/dist/src/components/Skeleton.mjs +1 -1
  230. package/dist/src/components/Skeleton.mjs.map +1 -1
  231. package/dist/src/components/Spinner.cjs +1 -1
  232. package/dist/src/components/Spinner.cjs.map +1 -1
  233. package/dist/src/components/Spinner.d.mts +2 -3
  234. package/dist/src/components/Spinner.d.mts.map +1 -1
  235. package/dist/src/components/Spinner.mjs +1 -1
  236. package/dist/src/components/Spinner.mjs.map +1 -1
  237. package/dist/src/components/StatusBadge.cjs +1 -1
  238. package/dist/src/components/StatusBadge.cjs.map +1 -1
  239. package/dist/src/components/StatusBadge.d.mts +6 -7
  240. package/dist/src/components/StatusBadge.d.mts.map +1 -1
  241. package/dist/src/components/StatusBadge.mjs +1 -1
  242. package/dist/src/components/StatusBadge.mjs.map +1 -1
  243. package/dist/src/components/StreamCursor.cjs +1 -1
  244. package/dist/src/components/StreamCursor.cjs.map +1 -1
  245. package/dist/src/components/StreamCursor.d.mts +1 -2
  246. package/dist/src/components/StreamCursor.d.mts.map +1 -1
  247. package/dist/src/components/StreamCursor.mjs +1 -1
  248. package/dist/src/components/StreamCursor.mjs.map +1 -1
  249. package/dist/src/components/Switch.cjs +1 -1
  250. package/dist/src/components/Switch.cjs.map +1 -1
  251. package/dist/src/components/Switch.d.mts +1 -1
  252. package/dist/src/components/Switch.d.mts.map +1 -1
  253. package/dist/src/components/Switch.mjs +1 -1
  254. package/dist/src/components/Switch.mjs.map +1 -1
  255. package/dist/src/components/SyntaxText.cjs +4 -0
  256. package/dist/src/components/SyntaxText.cjs.map +1 -0
  257. package/dist/src/components/SyntaxText.d.mts +50 -0
  258. package/dist/src/components/SyntaxText.d.mts.map +1 -0
  259. package/dist/src/components/SyntaxText.mjs +4 -0
  260. package/dist/src/components/SyntaxText.mjs.map +1 -0
  261. package/dist/src/components/Tabs.cjs +1 -1
  262. package/dist/src/components/Tabs.cjs.map +1 -1
  263. package/dist/src/components/Tabs.d.mts +11 -11
  264. package/dist/src/components/Tabs.d.mts.map +1 -1
  265. package/dist/src/components/Tabs.mjs +1 -1
  266. package/dist/src/components/Tabs.mjs.map +1 -1
  267. package/dist/src/components/TerminalView.cjs +2 -0
  268. package/dist/src/components/TerminalView.cjs.map +1 -0
  269. package/dist/src/components/TerminalView.d.mts +31 -0
  270. package/dist/src/components/TerminalView.d.mts.map +1 -0
  271. package/dist/src/components/TerminalView.mjs +2 -0
  272. package/dist/src/components/TerminalView.mjs.map +1 -0
  273. package/dist/src/components/Textarea.cjs +1 -1
  274. package/dist/src/components/Textarea.cjs.map +1 -1
  275. package/dist/src/components/Textarea.d.mts +3 -4
  276. package/dist/src/components/Textarea.d.mts.map +1 -1
  277. package/dist/src/components/Textarea.mjs +1 -1
  278. package/dist/src/components/Textarea.mjs.map +1 -1
  279. package/dist/src/components/Toast.cjs +1 -1
  280. package/dist/src/components/Toast.cjs.map +1 -1
  281. package/dist/src/components/Toast.d.mts +11 -11
  282. package/dist/src/components/Toast.d.mts.map +1 -1
  283. package/dist/src/components/Toast.mjs +1 -1
  284. package/dist/src/components/Toast.mjs.map +1 -1
  285. package/dist/src/components/ToolPathLink.cjs +2 -0
  286. package/dist/src/components/ToolPathLink.cjs.map +1 -0
  287. package/dist/src/components/ToolPathLink.d.mts +22 -0
  288. package/dist/src/components/ToolPathLink.d.mts.map +1 -0
  289. package/dist/src/components/ToolPathLink.mjs +2 -0
  290. package/dist/src/components/ToolPathLink.mjs.map +1 -0
  291. package/dist/src/components/Tooltip.cjs +1 -1
  292. package/dist/src/components/Tooltip.cjs.map +1 -1
  293. package/dist/src/components/Tooltip.d.mts +5 -5
  294. package/dist/src/components/Tooltip.d.mts.map +1 -1
  295. package/dist/src/components/Tooltip.mjs +1 -1
  296. package/dist/src/components/Tooltip.mjs.map +1 -1
  297. package/dist/src/icons/icons.cjs +1 -1
  298. package/dist/src/icons/icons.d.mts +2 -2
  299. package/dist/src/icons/icons.mjs +1 -1
  300. package/dist/src/lib/ansiSpans.cjs +2 -0
  301. package/dist/src/lib/ansiSpans.cjs.map +1 -0
  302. package/dist/src/lib/ansiSpans.d.mts +42 -0
  303. package/dist/src/lib/ansiSpans.d.mts.map +1 -0
  304. package/dist/src/lib/ansiSpans.mjs +2 -0
  305. package/dist/src/lib/ansiSpans.mjs.map +1 -0
  306. package/dist/src/lib/cn.d.mts +1 -2
  307. package/dist/src/lib/cn.d.mts.map +1 -1
  308. package/dist/src/lib/collapse.d.mts +2 -3
  309. package/dist/src/lib/collapse.d.mts.map +1 -1
  310. package/dist/src/lib/editorController.cjs +2 -0
  311. package/dist/src/lib/editorController.cjs.map +1 -0
  312. package/dist/src/lib/editorController.mjs +2 -0
  313. package/dist/src/lib/editorController.mjs.map +1 -0
  314. package/dist/src/lib/editorLanguage.d.mts +2 -3
  315. package/dist/src/lib/editorLanguage.d.mts.map +1 -1
  316. package/dist/src/lib/editorTheme.cjs +1 -1
  317. package/dist/src/lib/editorTheme.cjs.map +1 -1
  318. package/dist/src/lib/editorTheme.d.mts +76 -0
  319. package/dist/src/lib/editorTheme.d.mts.map +1 -0
  320. package/dist/src/lib/editorTheme.mjs +1 -1
  321. package/dist/src/lib/editorTheme.mjs.map +1 -1
  322. package/dist/src/lib/fenceGrammar.cjs +2 -0
  323. package/dist/src/lib/fenceGrammar.cjs.map +1 -0
  324. package/dist/src/lib/fenceGrammar.mjs +2 -0
  325. package/dist/src/lib/fenceGrammar.mjs.map +1 -0
  326. package/dist/src/lib/hashlineHighlight.cjs +3 -0
  327. package/dist/src/lib/hashlineHighlight.cjs.map +1 -0
  328. package/dist/src/lib/hashlineHighlight.d.mts +30 -0
  329. package/dist/src/lib/hashlineHighlight.d.mts.map +1 -0
  330. package/dist/src/lib/hashlineHighlight.mjs +3 -0
  331. package/dist/src/lib/hashlineHighlight.mjs.map +1 -0
  332. package/dist/src/lib/hashlineView.cjs +6 -0
  333. package/dist/src/lib/hashlineView.cjs.map +1 -0
  334. package/dist/src/lib/hashlineView.d.mts +60 -0
  335. package/dist/src/lib/hashlineView.d.mts.map +1 -0
  336. package/dist/src/lib/hashlineView.mjs +6 -0
  337. package/dist/src/lib/hashlineView.mjs.map +1 -0
  338. package/dist/src/lib/media.cjs.map +1 -1
  339. package/dist/src/lib/media.d.mts +1 -2
  340. package/dist/src/lib/media.d.mts.map +1 -1
  341. package/dist/src/lib/media.mjs.map +1 -1
  342. package/dist/src/lib/mediaPlayback.cjs +2 -0
  343. package/dist/src/lib/mediaPlayback.cjs.map +1 -0
  344. package/dist/src/lib/mediaPlayback.mjs +2 -0
  345. package/dist/src/lib/mediaPlayback.mjs.map +1 -0
  346. package/dist/src/lib/mermaidDiagram.cjs +2 -0
  347. package/dist/src/lib/mermaidDiagram.cjs.map +1 -0
  348. package/dist/src/lib/mermaidDiagram.mjs +2 -0
  349. package/dist/src/lib/mermaidDiagram.mjs.map +1 -0
  350. package/dist/src/lib/optionList.d.mts +4 -5
  351. package/dist/src/lib/optionList.d.mts.map +1 -1
  352. package/dist/src/lib/syntaxHighlight.cjs +3 -0
  353. package/dist/src/lib/syntaxHighlight.cjs.map +1 -0
  354. package/dist/src/lib/syntaxHighlight.d.mts +54 -0
  355. package/dist/src/lib/syntaxHighlight.d.mts.map +1 -0
  356. package/dist/src/lib/syntaxHighlight.mjs +3 -0
  357. package/dist/src/lib/syntaxHighlight.mjs.map +1 -0
  358. package/dist/src/lib/tone.cjs.map +1 -1
  359. package/dist/src/lib/tone.d.mts +4 -5
  360. package/dist/src/lib/tone.d.mts.map +1 -1
  361. package/dist/src/lib/tone.mjs.map +1 -1
  362. package/dist/src/theme/apply.cjs.map +1 -1
  363. package/dist/src/theme/apply.d.mts +5 -6
  364. package/dist/src/theme/apply.d.mts.map +1 -1
  365. package/dist/src/theme/apply.mjs.map +1 -1
  366. package/dist/src/theme/builtinThemes.cjs.map +1 -1
  367. package/dist/src/theme/builtinThemes.d.mts +4 -5
  368. package/dist/src/theme/builtinThemes.d.mts.map +1 -1
  369. package/dist/src/theme/builtinThemes.mjs.map +1 -1
  370. package/dist/src/theme/derive.cjs.map +1 -1
  371. package/dist/src/theme/derive.d.mts +4 -5
  372. package/dist/src/theme/derive.d.mts.map +1 -1
  373. package/dist/src/theme/derive.mjs.map +1 -1
  374. package/dist/src/theme/parse.cjs.map +1 -1
  375. package/dist/src/theme/parse.d.mts +1 -2
  376. package/dist/src/theme/parse.d.mts.map +1 -1
  377. package/dist/src/theme/parse.mjs.map +1 -1
  378. package/dist/src/theme/piTheme.cjs.map +1 -1
  379. package/dist/src/theme/piTheme.d.mts +2 -3
  380. package/dist/src/theme/piTheme.d.mts.map +1 -1
  381. package/dist/src/theme/piTheme.mjs.map +1 -1
  382. package/dist/src/theme/preference.d.mts +4 -5
  383. package/dist/src/theme/preference.d.mts.map +1 -1
  384. package/dist/src/types/editor.cjs.map +1 -1
  385. package/dist/src/types/editor.d.mts +39 -5
  386. package/dist/src/types/editor.d.mts.map +1 -1
  387. package/dist/src/types/editor.mjs.map +1 -1
  388. package/dist/src/types/theme.d.mts +11 -12
  389. package/dist/src/types/theme.d.mts.map +1 -1
  390. package/dist/src/types/tone.d.mts +10 -11
  391. package/dist/src/types/tone.d.mts.map +1 -1
  392. package/package.json +21 -17
  393. package/styles/preview.css +17 -0
  394. package/styles/tokens.css +72 -0
  395. package/dist/components/Accordion.d.cts +0 -11
  396. package/dist/components/Accordion.d.cts.map +0 -1
  397. package/dist/components/Avatar.d.cts +0 -10
  398. package/dist/components/Avatar.d.cts.map +0 -1
  399. package/dist/components/Badge.d.cts +0 -18
  400. package/dist/components/Badge.d.cts.map +0 -1
  401. package/dist/components/Breadcrumb.d.cts +0 -37
  402. package/dist/components/Breadcrumb.d.cts.map +0 -1
  403. package/dist/components/Button.d.cts +0 -25
  404. package/dist/components/Button.d.cts.map +0 -1
  405. package/dist/components/Checkbox.d.cts +0 -8
  406. package/dist/components/Checkbox.d.cts.map +0 -1
  407. package/dist/components/CodeEditor.d.cts +0 -6
  408. package/dist/components/CodeEditor.d.cts.map +0 -1
  409. package/dist/components/Collapsible.d.cts +0 -10
  410. package/dist/components/Collapsible.d.cts.map +0 -1
  411. package/dist/components/Command.d.cts +0 -42
  412. package/dist/components/Command.d.cts.map +0 -1
  413. package/dist/components/Dialog.d.cts +0 -39
  414. package/dist/components/Dialog.d.cts.map +0 -1
  415. package/dist/components/Dot.d.cts +0 -16
  416. package/dist/components/Dot.d.cts.map +0 -1
  417. package/dist/components/DropdownMenu.d.cts +0 -34
  418. package/dist/components/DropdownMenu.d.cts.map +0 -1
  419. package/dist/components/EmptyState.d.cts +0 -18
  420. package/dist/components/EmptyState.d.cts.map +0 -1
  421. package/dist/components/Input.d.cts +0 -20
  422. package/dist/components/Input.d.cts.map +0 -1
  423. package/dist/components/Kbd.d.cts +0 -7
  424. package/dist/components/Kbd.d.cts.map +0 -1
  425. package/dist/components/Label.d.cts +0 -8
  426. package/dist/components/Label.d.cts.map +0 -1
  427. package/dist/components/Markdown.d.cts +0 -8
  428. package/dist/components/Markdown.d.cts.map +0 -1
  429. package/dist/components/MediaPreview.d.cts +0 -25
  430. package/dist/components/MediaPreview.d.cts.map +0 -1
  431. package/dist/components/MessageItem.d.cts +0 -71
  432. package/dist/components/MessageItem.d.cts.map +0 -1
  433. package/dist/components/MessageLines.d.cts +0 -24
  434. package/dist/components/MessageLines.d.cts.map +0 -1
  435. package/dist/components/OptionList.d.cts +0 -50
  436. package/dist/components/OptionList.d.cts.map +0 -1
  437. package/dist/components/Panel.d.cts +0 -15
  438. package/dist/components/Panel.d.cts.map +0 -1
  439. package/dist/components/Popover.d.cts +0 -19
  440. package/dist/components/Popover.d.cts.map +0 -1
  441. package/dist/components/Progress.d.cts +0 -8
  442. package/dist/components/Progress.d.cts.map +0 -1
  443. package/dist/components/RadioGroup.d.cts +0 -15
  444. package/dist/components/RadioGroup.d.cts.map +0 -1
  445. package/dist/components/ScrollArea.d.cts +0 -13
  446. package/dist/components/ScrollArea.d.cts.map +0 -1
  447. package/dist/components/SectionLabel.d.cts +0 -7
  448. package/dist/components/SectionLabel.d.cts.map +0 -1
  449. package/dist/components/Select.d.cts +0 -19
  450. package/dist/components/Select.d.cts.map +0 -1
  451. package/dist/components/Separator.d.cts +0 -13
  452. package/dist/components/Separator.d.cts.map +0 -1
  453. package/dist/components/Skeleton.d.cts +0 -11
  454. package/dist/components/Skeleton.d.cts.map +0 -1
  455. package/dist/components/Spinner.d.cts +0 -15
  456. package/dist/components/Spinner.d.cts.map +0 -1
  457. package/dist/components/StatusBadge.d.cts +0 -24
  458. package/dist/components/StatusBadge.d.cts.map +0 -1
  459. package/dist/components/StreamCursor.d.cts +0 -7
  460. package/dist/components/StreamCursor.d.cts.map +0 -1
  461. package/dist/components/Switch.d.cts +0 -8
  462. package/dist/components/Switch.d.cts.map +0 -1
  463. package/dist/components/Tabs.d.cts +0 -36
  464. package/dist/components/Tabs.d.cts.map +0 -1
  465. package/dist/components/Textarea.d.cts +0 -10
  466. package/dist/components/Textarea.d.cts.map +0 -1
  467. package/dist/components/Toast.d.cts +0 -24
  468. package/dist/components/Toast.d.cts.map +0 -1
  469. package/dist/components/Tooltip.d.cts +0 -11
  470. package/dist/components/Tooltip.d.cts.map +0 -1
  471. package/dist/icons/icons.d.cts +0 -2
  472. package/dist/index.d.cts +0 -48
  473. package/dist/lib/cn.d.cts +0 -7
  474. package/dist/lib/cn.d.cts.map +0 -1
  475. package/dist/lib/collapse.d.cts +0 -15
  476. package/dist/lib/collapse.d.cts.map +0 -1
  477. package/dist/lib/editorLanguage.d.cts +0 -22
  478. package/dist/lib/editorLanguage.d.cts.map +0 -1
  479. package/dist/lib/media.d.cts +0 -12
  480. package/dist/lib/media.d.cts.map +0 -1
  481. package/dist/lib/optionList.d.cts +0 -22
  482. package/dist/lib/optionList.d.cts.map +0 -1
  483. package/dist/lib/tone.d.cts +0 -26
  484. package/dist/lib/tone.d.cts.map +0 -1
  485. package/dist/theme/apply.d.cts +0 -26
  486. package/dist/theme/apply.d.cts.map +0 -1
  487. package/dist/theme/builtinThemes.d.cts +0 -12
  488. package/dist/theme/builtinThemes.d.cts.map +0 -1
  489. package/dist/theme/derive.d.cts +0 -15
  490. package/dist/theme/derive.d.cts.map +0 -1
  491. package/dist/theme/parse.d.cts +0 -11
  492. package/dist/theme/parse.d.cts.map +0 -1
  493. package/dist/theme/piTheme.d.cts +0 -20
  494. package/dist/theme/piTheme.d.cts.map +0 -1
  495. package/dist/theme/preference.d.cts +0 -16
  496. package/dist/theme/preference.d.cts.map +0 -1
  497. package/dist/theme.d.cts +0 -8
  498. package/dist/types/editor.d.cts +0 -44
  499. package/dist/types/editor.d.cts.map +0 -1
  500. package/dist/types/theme.d.cts +0 -39
  501. package/dist/types/theme.d.cts.map +0 -1
  502. package/dist/types/tone.d.cts +0 -29
  503. package/dist/types/tone.d.cts.map +0 -1
@@ -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,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(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-doom-faint`,muted:`bg-doom-faint/40`,blue:`bg-doom-blue`,green:`bg-doom-green`,yellow:`bg-doom-yellow`,red:`bg-doom-red`,magenta:`bg-doom-magenta`,violet:`bg-doom-violet`,cyan:`bg-doom-cyan`,orange:`bg-doom-orange`,teal:`bg-doom-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function i({className:n,tone:i,size:a,pulse:o,...s}){return t(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:e(r({tone:i,size:a,pulse:o}),n),...s})}export{i as Dot,r as dotVariants};
1
+ import{cn as e}from"../lib/cn.mjs";import{jsx as t}from"react/jsx-runtime";import{cva as n}from"class-variance-authority";const r=n(`inline-block shrink-0 rounded-full`,{variants:{tone:{neutral:`bg-doom-faint`,muted:`bg-doom-faint/40`,blue:`bg-doom-blue`,green:`bg-doom-green`,yellow:`bg-doom-yellow`,red:`bg-doom-red`,magenta:`bg-doom-magenta`,violet:`bg-doom-violet`,cyan:`bg-doom-cyan`,orange:`bg-doom-orange`,teal:`bg-doom-teal`},size:{xs:`h-1 w-1`,sm:`h-1.5 w-1.5`,md:`h-2 w-2`,lg:`h-2.5 w-2.5`},pulse:{true:`animate-pulse`,false:``}},defaultVariants:{tone:`neutral`,size:`sm`,pulse:!1}});function i({className:n,tone:i,size:a,pulse:o,...s}){return/* @__PURE__ */ t(`span`,{"data-slot":`dot`,"aria-hidden":!0,className:e(r({tone:i,size:a,pulse:o}),n),...s})}export{i as Dot,r as dotVariants};
2
2
  //# sourceMappingURL=Dot.mjs.map
@@ -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,MAAO,kBAAC,OAAD,CAAM,YAAU,MAAM,cAAA,GAAY,UAAW,EAAG,EAAY,CAAE,OAAM,OAAM,OAAM,CAAC,EAAG,CAAS,EAAG,GAAI,CAAQ,CAAA,CACrH"}
@@ -0,0 +1,2 @@
1
+ const e=require("../lib/cn.cjs"),t=require("./Dialog.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime"),i=require("react");function a({open:a,onOpenChange:o,side:s,title:c,children:l,className:u,showHeader:d=!0,"data-testid":f,backdropTestId:p}){let m=(0,i.useRef)(null);return/* @__PURE__ */ (0,r.jsx)(t.Dialog,{open:a,onOpenChange:o,children:/* @__PURE__ */ (0,r.jsxs)(t.DialogPortal,{children:[/* @__PURE__ */ (0,r.jsx)(t.DialogOverlay,{"data-testid":p}),/* @__PURE__ */ (0,r.jsxs)(n.Dialog.Content,{"aria-describedby":void 0,"data-testid":f,className:e.cn(`fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-doom-border bg-doom-rail outline-none`,s===`left`?`left-0 border-r`:`right-0 border-l`,u),onOpenAutoFocus:()=>{m.current=document.activeElement instanceof HTMLElement?document.activeElement:null},onCloseAutoFocus:e=>{e.preventDefault(),m.current?.isConnected&&m.current.focus()},children:[d?/* @__PURE__ */ (0,r.jsx)(t.DialogHeader,{dismissible:!0,closeLabel:`hide ${c.toLowerCase()}`,children:/* @__PURE__ */ (0,r.jsx)(t.DialogTitle,{children:c})}):/* @__PURE__ */ (0,r.jsx)(t.DialogTitle,{className:`sr-only`,children:c}),l]})]})})}exports.Drawer=a;
2
+ //# sourceMappingURL=Drawer.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.cjs","names":["useRef","Dialog","DialogPortal","DialogOverlay","DialogPrimitive","cn","DialogHeader","DialogTitle"],"sources":["../../../src/components/Drawer.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from 'radix-ui';\nimport { type ReactNode, useRef } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogHeader, DialogOverlay, DialogPortal, DialogTitle } from './Dialog';\n\nexport interface DrawerProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side: 'left' | 'right';\n title: string;\n children: ReactNode;\n className?: string;\n showHeader?: boolean;\n 'data-testid'?: string;\n backdropTestId?: string;\n}\n\n/** A controlled side panel with a focus trap and restoration for external header buttons. */\nexport function Drawer({\n open,\n onOpenChange,\n side,\n title,\n children,\n className,\n showHeader = true,\n 'data-testid': testId,\n backdropTestId,\n}: DrawerProps) {\n const opener = useRef<HTMLElement | null>(null);\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogPortal>\n <DialogOverlay data-testid={backdropTestId} />\n <DialogPrimitive.Content\n aria-describedby={undefined}\n data-testid={testId}\n className={cn(\n 'fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-doom-border bg-doom-rail outline-none',\n side === 'left' ? 'left-0 border-r' : 'right-0 border-l',\n className,\n )}\n onOpenAutoFocus={() => {\n opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n }}\n onCloseAutoFocus={(event) => {\n event.preventDefault();\n if (opener.current?.isConnected) opener.current.focus();\n }}\n >\n {showHeader ? (\n <DialogHeader dismissible closeLabel={`hide ${title.toLowerCase()}`}>\n <DialogTitle>{title}</DialogTitle>\n </DialogHeader>\n ) : (\n <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n )}\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n </Dialog>\n );\n}\n"],"mappings":"uIAmBA,SAAgB,EAAO,CACrB,OACA,eACA,OACA,QACA,WACA,YACA,aAAa,GACb,cAAe,EACf,kBACc,CACd,IAAM,GAAA,EAASA,EAAAA,OAAAA,CAA2B,IAAI,EAC9C,MACE,iBAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,OAAD,CAAc,OAAoB,eAChC,SAAA,iBAAA,EAAA,EAAA,KAAA,CAACC,EAAAA,aAAD,CAAA,SAAA,CACE,iBAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,cAAD,CAAe,cAAa,CAAiB,CAAA,EAC7C,iBAAA,EAAA,EAAA,KAAA,CAACC,EAAAA,OAAgB,QAAjB,CACE,mBAAkB,IAAA,GAClB,cAAa,EACb,UAAWC,EAAAA,GACT,kIACA,IAAS,OAAS,kBAAoB,mBACtC,CACF,EACA,oBAAuB,CACrB,EAAO,QAAU,SAAS,yBAAyB,YAAc,SAAS,cAAgB,IAC5F,EACA,iBAAmB,GAAU,CAC3B,EAAM,eAAe,EACjB,EAAO,SAAS,aAAa,EAAO,QAAQ,MAAM,CACxD,EAdF,SAAA,CAgBG,EACC,iBAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,aAAD,CAAc,YAAA,GAAY,WAAY,QAAQ,EAAM,YAAY,IAC9D,SAAA,iBAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,YAAD,CAAA,SAAc,CAAmB,CAAA,CACrB,CAAA,EAEd,iBAAA,EAAA,EAAA,IAAA,CAACA,EAAAA,YAAD,CAAa,UAAU,UAAW,SAAA,CAAmB,CAAA,EAEtD,CACsB,CACb,CAAA,CAAA,CAAA,CAAA,CACR,CAAA,CAEZ"}
@@ -0,0 +1,17 @@
1
+ import { ReactNode } from "react";
2
+ //#region src/components/Drawer.d.ts
3
+ export interface DrawerProps {
4
+ open: boolean;
5
+ onOpenChange: (open: boolean) => void;
6
+ side: 'left' | 'right';
7
+ title: string;
8
+ children: ReactNode;
9
+ className?: string;
10
+ showHeader?: boolean;
11
+ 'data-testid'?: string;
12
+ backdropTestId?: string;
13
+ }
14
+ /** A controlled side panel with a focus trap and restoration for external header buttons. */
15
+ export declare function Drawer({ open, onOpenChange, side, title, children, className, showHeader, 'data-testid': testId, backdropTestId }: DrawerProps): import("react").JSX.Element;
16
+ //#endregion
17
+ //# sourceMappingURL=Drawer.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.d.mts","names":[],"sources":["../../../src/components/Drawer.tsx"],"mappings":";;iBAMiB;EACf;EACA,eAAe;EACf;EACA;EACA,UAAU;EACV;EACA;EACA;EACA;;;wBAIc,SACd,MACA,cACA,MACA,OACA,UACA,WACA,2BACe,QACf,kBACC,8BAAW,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{Dialog as t,DialogHeader as n,DialogOverlay as r,DialogPortal as i,DialogTitle as a}from"./Dialog.mjs";import{Dialog as o}from"radix-ui";import{jsx as s,jsxs as c}from"react/jsx-runtime";import{useRef as l}from"react";function u({open:u,onOpenChange:d,side:f,title:p,children:m,className:h,showHeader:g=!0,"data-testid":_,backdropTestId:v}){let y=l(null);return/* @__PURE__ */ s(t,{open:u,onOpenChange:d,children:/* @__PURE__ */ c(i,{children:[/* @__PURE__ */ s(r,{"data-testid":v}),/* @__PURE__ */ c(o.Content,{"aria-describedby":void 0,"data-testid":_,className:e(`fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-doom-border bg-doom-rail outline-none`,f===`left`?`left-0 border-r`:`right-0 border-l`,h),onOpenAutoFocus:()=>{y.current=document.activeElement instanceof HTMLElement?document.activeElement:null},onCloseAutoFocus:e=>{e.preventDefault(),y.current?.isConnected&&y.current.focus()},children:[g?/* @__PURE__ */ s(n,{dismissible:!0,closeLabel:`hide ${p.toLowerCase()}`,children:/* @__PURE__ */ s(a,{children:p})}):/* @__PURE__ */ s(a,{className:`sr-only`,children:p}),m]})]})})}export{u as Drawer};
2
+ //# sourceMappingURL=Drawer.mjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Drawer.mjs","names":["Dialog","DialogPrimitive"],"sources":["../../../src/components/Drawer.tsx"],"sourcesContent":["import { Dialog as DialogPrimitive } from 'radix-ui';\nimport { type ReactNode, useRef } from 'react';\n\nimport { cn } from '../lib/cn';\nimport { Dialog, DialogHeader, DialogOverlay, DialogPortal, DialogTitle } from './Dialog';\n\nexport interface DrawerProps {\n open: boolean;\n onOpenChange: (open: boolean) => void;\n side: 'left' | 'right';\n title: string;\n children: ReactNode;\n className?: string;\n showHeader?: boolean;\n 'data-testid'?: string;\n backdropTestId?: string;\n}\n\n/** A controlled side panel with a focus trap and restoration for external header buttons. */\nexport function Drawer({\n open,\n onOpenChange,\n side,\n title,\n children,\n className,\n showHeader = true,\n 'data-testid': testId,\n backdropTestId,\n}: DrawerProps) {\n const opener = useRef<HTMLElement | null>(null);\n return (\n <Dialog open={open} onOpenChange={onOpenChange}>\n <DialogPortal>\n <DialogOverlay data-testid={backdropTestId} />\n <DialogPrimitive.Content\n aria-describedby={undefined}\n data-testid={testId}\n className={cn(\n 'fixed inset-y-0 z-50 flex w-[min(300px,calc(100vw-48px))] flex-col overflow-y-auto border-doom-border bg-doom-rail outline-none',\n side === 'left' ? 'left-0 border-r' : 'right-0 border-l',\n className,\n )}\n onOpenAutoFocus={() => {\n opener.current = document.activeElement instanceof HTMLElement ? document.activeElement : null;\n }}\n onCloseAutoFocus={(event) => {\n event.preventDefault();\n if (opener.current?.isConnected) opener.current.focus();\n }}\n >\n {showHeader ? (\n <DialogHeader dismissible closeLabel={`hide ${title.toLowerCase()}`}>\n <DialogTitle>{title}</DialogTitle>\n </DialogHeader>\n ) : (\n <DialogTitle className=\"sr-only\">{title}</DialogTitle>\n )}\n {children}\n </DialogPrimitive.Content>\n </DialogPortal>\n </Dialog>\n );\n}\n"],"mappings":"oQAmBA,SAAgB,EAAO,CACrB,OACA,eACA,OACA,QACA,WACA,YACA,aAAa,GACb,cAAe,EACf,kBACc,CACd,IAAM,EAAS,EAA2B,IAAI,EAC9C,MACE,kBAACA,EAAD,CAAc,OAAoB,eAChC,SAAA,kBAAC,EAAD,CAAA,SAAA,CACE,kBAAC,EAAD,CAAe,cAAa,CAAiB,CAAA,EAC7C,kBAACC,EAAgB,QAAjB,CACE,mBAAkB,IAAA,GAClB,cAAa,EACb,UAAW,EACT,kIACA,IAAS,OAAS,kBAAoB,mBACtC,CACF,EACA,oBAAuB,CACrB,EAAO,QAAU,SAAS,yBAAyB,YAAc,SAAS,cAAgB,IAC5F,EACA,iBAAmB,GAAU,CAC3B,EAAM,eAAe,EACjB,EAAO,SAAS,aAAa,EAAO,QAAQ,MAAM,CACxD,EAdF,SAAA,CAgBG,EACC,kBAAC,EAAD,CAAc,YAAA,GAAY,WAAY,QAAQ,EAAM,YAAY,IAC9D,SAAA,kBAAC,EAAD,CAAA,SAAc,CAAmB,CAAA,CACrB,CAAA,EAEd,kBAAC,EAAD,CAAa,UAAU,UAAW,SAAA,CAAmB,CAAA,EAEtD,CACsB,CACb,CAAA,CAAA,CAAA,CAAA,CACR,CAAA,CAEZ"}
@@ -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/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.Root,{"data-slot":`dropdown-menu`,...e})}function o(e){return/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function s(e){return/* @__PURE__ */ (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/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.Portal,{children:/* @__PURE__ */ (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/* @__PURE__ */ (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/* @__PURE__ */ (0,n.jsx)(`span`,{className:`pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center`,children:/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.ItemIndicator,{children:e})})}function p({className:r,variant:a,children:o,...s}){return/* @__PURE__ */ (0,n.jsxs)(t.DropdownMenu.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:e.cn(`relative`,u({variant:a,indented:!0}),r),...s,children:[/* @__PURE__ */ (0,n.jsx)(f,{children:/* @__PURE__ */ (0,n.jsx)(i.Check,{className:`h-3 w-3 text-doom-blue`})}),o]})}function m(e){return/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function h({className:r,variant:i,children:a,...o}){return/* @__PURE__ */ (0,n.jsxs)(t.DropdownMenu.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:e.cn(`relative`,u({variant:i,indented:!0}),r),...o,children:[/* @__PURE__ */ (0,n.jsx)(f,{children:/* @__PURE__ */ (0,n.jsx)(`span`,{className:`h-1.5 w-1.5 rounded-full bg-doom-blue`})}),a]})}function g(e){return/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function _({className:r,children:a,...o}){return/* @__PURE__ */ (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:[/* @__PURE__ */ (0,n.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:a}),/* @__PURE__ */ (0,n.jsx)(i.ChevronRight,{className:`h-3 w-3 shrink-0 text-doom-faint`})]})}function v({className:r,sideOffset:i=2,...a}){return/* @__PURE__ */ (0,n.jsx)(t.DropdownMenu.Portal,{children:/* @__PURE__ */ (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/* @__PURE__ */ (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/* @__PURE__ */ (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/* @__PURE__ */ (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,SAAg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AG,EAAyB,EAAG,iCAAkC,CAAS,EACrF,GAAI,EAHN,SAAA,EAKE,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,GAC1D,EAAA,EAAA,IAAA,CAACG,EAAAA,aAAD,CAAkB,UAAU,kCAAoC,CAAA,CAChC,GAEtC,CAEA,SAAgB,EAAuB,CACrC,YACA,aAAa,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,+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,MAAO,iBAAA,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,MAAO,iBAAA,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,CAAA,CACtF,CAGA,SAAgB,EAAkB,EAA2D,CAC3F,MAAO,iBAAA,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,MACE,iBAAA,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,OAAvB,CAAA,SACE,iBAAA,EAAA,EAAA,IAAA,CAACA,EAAAA,aAAsB,QAAvB,CACE,YAAU,wBACH,QACK,aACZ,UAAWC,EAAAA,GAAG,EAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAC2B,CAAA,CAElC,CAEA,MAAa,GAAA,EAA2BC,EAAAA,IAAAA,CACtC,wMACA,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,M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AEA,SAAgB,EAAsB,CAAE,YAAW,GAAG,GAAiE,CACrH,MACE,iBAAA,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,sBAAsB,aAAsB,0CAAW,IAAA;UAIpF,mCACP,sBAAsB,aAAsB,YAAY,oBAAoB;iBAEtE,wBAAwB,WAAW,SAAS,aAAa,SAAS,yDAA0B,IAAA;iBAe5F,gBAAgB,OAAO,sBAAsB,aAAsB,mCAAI,IAAA;;iBAKvE,yBACd,WACA,aACG,SACF,sBAAsB,aAAsB,0CAAW,IAAA;iBAa1C,yBACd,WACA,eACG,SACF,sBAAsB,aAAsB,0CAAW,IAAA;iBAa1C,oBAAoB,cAAc,SAAS,sBAAsB,aAAsB,qCAAM,IAAA;;iBAW7F,uBAAuB,cAAc,SAAS,qDAAsB,IAAA;iBAUpE,wBAAwB,cAAc,SAAS,sBAAsB,aAAsB,yCAAU,IAAA"}
1
+ {"version":3,"file":"DropdownMenu.d.mts","names":[],"sources":["../../../src/components/DropdownMenu.tsx"],"mappings":";;;;;iBAQgB,eAAa,OAAO,sBAAsB,aAAsB,wBAAK,IAAA;wBAIrE,oBAAoB,OAAO,sBAAsB,aAAsB,2BAAQ,IAAA;;wBAK/E,kBAAkB,OAAO,sBAAsB,aAAsB,yBAAM,IAAA;wBAQ3E,sBACd,WACA,OACA,eACG,SACF,sBAAsB,aAAsB,2BAAQ,IAAA;qBAc1C,2BAAwB;;;6CAapC;iBAEgB,8BACP,sBAAsB,aAAsB,OAAO,oBAAoB;wBAEjE,mBAAmB,WAAW,SAAS,aAAa,SAAS,wCAAqB,IAAA;iBAoBjF,sCACP,sBAAsB,aAAsB,eAAe,oBAAoB;;wBAGzE,2BAA2B,WAAW,SAAS,aAAa,SAAS,gDAA6B,IAAA;;wBAgBlG,uBAAuB,OAAO,sBAAsB,aAAsB,8BAAW,IAAA;iBAIpF,mCACP,sBAAsB,aAAsB,YAAY,oBAAoB;wBAEtE,wBAAwB,WAAW,SAAS,aAAa,SAAS,6CAA0B,IAAA;wBAe5F,gBAAgB,OAAO,sBAAsB,aAAsB,uBAAI,IAAA;;wBAKvE,yBACd,WACA,aACG,SACF,sBAAsB,aAAsB,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/* @__PURE__ */ i(r.Root,{"data-slot":`dropdown-menu`,...e})}function c(e){return/* @__PURE__ */ i(r.Trigger,{"data-slot":`dropdown-menu-trigger`,...e})}function l(e){return/* @__PURE__ */ 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/* @__PURE__ */ i(r.Portal,{children:/* @__PURE__ */ 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/* @__PURE__ */ 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/* @__PURE__ */ i(`span`,{className:`pointer-events-none absolute left-2.5 flex h-3 w-3 items-center justify-center`,children:/* @__PURE__ */ i(r.ItemIndicator,{children:e})})}function h({className:t,variant:o,children:s,...c}){return/* @__PURE__ */ a(r.CheckboxItem,{"data-slot":`dropdown-menu-checkbox-item`,className:n(`relative`,f({variant:o,indented:!0}),t),...c,children:[/* @__PURE__ */ i(m,{children:/* @__PURE__ */ i(e,{className:`h-3 w-3 text-doom-blue`})}),s]})}function g(e){return/* @__PURE__ */ i(r.RadioGroup,{"data-slot":`dropdown-menu-radio-group`,...e})}function _({className:e,variant:t,children:o,...s}){return/* @__PURE__ */ a(r.RadioItem,{"data-slot":`dropdown-menu-radio-item`,className:n(`relative`,f({variant:t,indented:!0}),e),...s,children:[/* @__PURE__ */ i(m,{children:/* @__PURE__ */ i(`span`,{className:`h-1.5 w-1.5 rounded-full bg-doom-blue`})}),o]})}function v(e){return/* @__PURE__ */ i(r.Sub,{"data-slot":`dropdown-menu-sub`,...e})}function y({className:e,children:o,...s}){return/* @__PURE__ */ a(r.SubTrigger,{"data-slot":`dropdown-menu-sub-trigger`,className:n(f(),`data-[state=open]:bg-doom-deep`,e),...s,children:[/* @__PURE__ */ i(`span`,{className:`min-w-0 flex-1 truncate`,children:o}),/* @__PURE__ */ i(t,{className:`h-3 w-3 shrink-0 text-doom-faint`})]})}function b({className:e,sideOffset:t=2,...a}){return/* @__PURE__ */ i(r.Portal,{children:/* @__PURE__ */ i(r.SubContent,{"data-slot":`dropdown-menu-sub-content`,sideOffset:t,className:n(u,e),...a})})}function x({className:e,...t}){return/* @__PURE__ */ 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/* @__PURE__ */ 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/* @__PURE__ */ 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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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,MAAO,kBAACC,EAAsB,KAAvB,CAA4B,YAAU,gBAAgB,GAAI,CAAQ,CAAA,CAC3E,CAEA,SAAgB,EAAoB,EAA6D,CAC/F,MAAO,kBAACA,EAAsB,QAAvB,CAA+B,YAAU,wBAAwB,GAAI,CAAQ,CAAA,CACtF,CAGA,SAAgB,EAAkB,EAA2D,CAC3F,MAAO,kBAACA,EAAsB,MAAvB,CAA6B,YAAU,sBAAsB,GAAI,CAAQ,CAAA,CAClF,CAGA,MAAM,EACJ,6KAEF,SAAgB,EAAoB,CAClC,YACA,QAAQ,MACR,aAAa,EACb,GAAG,GACoD,CACvD,MACE,kBAACA,EAAsB,OAAvB,CAAA,SACE,kBAACA,EAAsB,QAAvB,CACE,YAAU,wBACH,QACK,aACZ,UAAW,EAAG,EAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAC2B,CAAA,CAElC,CAEA,MAAa,EAA2B,EACtC,wMACA,CACE,S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,CACvF,MAAO,kBAACA,EAAsB,IAAvB,CAA2B,YAAU,oBAAoB,GAAI,CAAQ,CAAA,CAC9E,CAGA,SAAgB,EAAuB,CACrC,YACA,WACA,GAAG,GACuD,CAC1D,MACE,kBAACA,EAAsB,WAAvB,CACE,YAAU,4BACV,UAAW,EAAG,EAAyB,EAAG,iCAAkC,CAAS,EACrF,GAAI,EAHN,SAAA,CAKE,kBAAC,OAAD,CAAM,UAAU,0BAA2B,UAAe,CAAA,EAC1D,kBAAC,EAAD,CAAkB,UAAU,kCAAoC,CAAA,CAChC,GAEtC,CAEA,SAAgB,EAAuB,CACrC,YACA,aAAa,EACb,GAAG,GACuD,CAC1D,MACE,kBAACA,EAAsB,OAAvB,CAAA,SACE,kBAACA,EAAsB,WAAvB,CACE,YAAU,4BACE,aACZ,UAAW,EAAG,EAAe,CAAS,EACtC,GAAI,CACL,CAAA,CAC2B,CAAA,CAElC,CAEA,SAAgB,EAAkB,CAAE,YAAW,GAAG,GAA6D,CAC7G,MACE,kBAACA,EAAsB,MAAvB,CACE,YAAU,sBACV,UAAW,EAAG,0EAA2E,CAAS,EAClG,GAAI,CACL,CAAA,CAEL,CAGA,SAAgB,EAAqB,CAAE,YAAW,GAAG,GAAiC,CACpF,MACE,kBAAC,OAAD,CACE,YAAU,yBACV,UAAW,EAAG,yDAA0D,CAAS,EACjF,GAAI,CACL,CAAA,CAEL,CAEA,SAAgB,EAAsB,CAAE,YAAW,GAAG,GAAiE,CACrH,MACE,kBAACA,EAAsB,UAAvB,CACE,YAAU,0BACV,UAAW,EAAG,gCAAiC,CAAS,EACxD,GAAI,CACL,CAAA,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/* @__PURE__ */ (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:/* @__PURE__ */ (0,n.jsxs)(`div`,{className:`flex w-[520px] max-w-full flex-col items-center gap-3 text-center`,children:[/* @__PURE__ */ (0,n.jsx)(`span`,{className:`text-base font-bold text-doom-hi`,children:r}),i?/* @__PURE__ */ (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,MACE,iBAAA,EAAA,EAAA,IAAA,CAAC,EAAD,CACE,YAAU,cACV,UAAWC,EAAAA,GAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,SAAA,iBAAA,EAAA,EAAA,KAAA,CAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,CACE,iBAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,mCAAoC,SAAA,CAAY,CAAA,EAC/D,EAAc,iBAAA,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/* @__PURE__ */ 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:/* @__PURE__ */ r(`div`,{className:`flex w-[520px] max-w-full flex-col items-center gap-3 text-center`,children:[/* @__PURE__ */ n(`span`,{className:`text-base font-bold text-doom-hi`,children:i}),a?/* @__PURE__ */ 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,MACE,kBAAC,EAAD,CACE,YAAU,cACV,UAAW,EAAG,4DAA6D,CAAS,EACpF,GAAI,EAEJ,SAAA,kBAAC,MAAD,CAAK,UAAU,oEAAf,SAAA,CACE,kBAAC,OAAD,CAAM,UAAU,mCAAoC,SAAA,CAAY,CAAA,EAC/D,EAAc,kBAAC,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=/* @__PURE__ */ 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=/* @__PURE__ */ 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/* @__PURE__ */ (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/* @__PURE__ */ (0,i.jsx)(`span`,{className:`mt-1 truncate text-doom-faint first:mt-0`,children:e.path},t);if(e.type===`plain`)return/* @__PURE__ */ (0,i.jsx)(`span`,{className:`whitespace-pre-wrap break-words text-doom-dim`,children:e.text},t);let{value:n}=e;return/* @__PURE__ */ (0,i.jsxs)(`span`,{className:`flex gap-2`,children:[n.marker===void 0?null:/* @__PURE__ */ (0,i.jsx)(`span`,{className:`w-4 shrink-0 ${n.marker===`match`?`text-doom-blue`:`text-doom-faint`}`,children:n.marker===`match`?`>>`:``}),/* @__PURE__ */ (0,i.jsx)(`span`,{className:`shrink-0 text-right text-doom-faint`,style:f,children:n.line}),/* @__PURE__ */ (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,kBAAuD,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,kBAAO,IAAI,IACX,EAAO,EAAO,IAAI,KAAO,IAAU,CACvC,IAAM,EAAUC,E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C,OAAD,CAAkB,UAAU,aAA5B,SAAA,CACG,EAAM,SAAW,IAAA,GAId,KAHF,iBAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAW,gBAAgB,EAAM,SAAW,QAAU,iBAAmB,oBAC5E,SAAA,EAAM,SAAW,QAAU,KAAO,EAC/B,CAAA,EAER,iBAAA,EAAA,EAAA,IAAA,CAAC,OAAD,CAAM,UAAU,sCAAsC,MAAO,EAC1D,SAAA,EAAM,IACH,CAAA,EACN,iBAAA,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=/* @__PURE__ */ new Map;function f(e){let t=n(e),[a,o]=u(void 0);return c(()=>{let n=!0,a=/* @__PURE__ */ 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/* @__PURE__ */ 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/* @__PURE__ */ o(`span`,{className:`mt-1 truncate text-doom-faint first:mt-0`,children:e.path},t);if(e.type===`plain`)return/* @__PURE__ */ o(`span`,{className:`whitespace-pre-wrap break-words text-doom-dim`,children:e.text},t);let{value:n}=e;return/* @__PURE__ */ s(`span`,{className:`flex gap-2`,children:[n.marker===void 0?null:/* @__PURE__ */ o(`span`,{className:`w-4 shrink-0 ${n.marker===`match`?`text-doom-blue`:`text-doom-faint`}`,children:n.marker===`match`?`>>`:``}),/* @__PURE__ */ o(`span`,{className:`shrink-0 text-right text-doom-faint`,style:p,children:n.line}),/* @__PURE__ */ 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,kBAAuD,IA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,EAAK,IACF,EAFK,CAEL,EAGV,GAAM,CAAE,SAAU,EAClB,MACE,kBAAC,OAAD,CAAkB,UAAU,aAA5B,SAAA,CACG,EAAM,SAAW,IAAA,GAId,KAHF,kBAAC,OAAD,CAAM,UAAW,gBAAgB,EAAM,SAAW,QAAU,iBAAmB,oBAC5E,SAAA,EAAM,SAAW,QAAU,KAAO,EAC/B,CAAA,EAER,kBAAC,OAAD,CAAM,UAAU,sCAAsC,MAAO,EAC1D,SAAA,EAAM,IACH,CAAA,EACN,kBAAC,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/* @__PURE__ */ (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,MACE,iBAAA,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/* @__PURE__ */ 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