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

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 (199) hide show
  1. package/README.md +6 -6
  2. package/dist/components/Accordion.d.cts +4 -4
  3. package/dist/components/Accordion.d.cts.map +1 -1
  4. package/dist/components/Avatar.d.cts +3 -3
  5. package/dist/components/Avatar.d.cts.map +1 -1
  6. package/dist/components/Badge.d.cts +1 -1
  7. package/dist/components/Badge.d.cts.map +1 -1
  8. package/dist/components/Breadcrumb.d.cts +1 -1
  9. package/dist/components/Breadcrumb.d.cts.map +1 -1
  10. package/dist/components/Button.d.cts +1 -1
  11. package/dist/components/Button.d.cts.map +1 -1
  12. package/dist/components/Checkbox.d.cts +1 -1
  13. package/dist/components/Checkbox.d.cts.map +1 -1
  14. package/dist/components/CodeEditor.d.cts +1 -1
  15. package/dist/components/CodeEditor.d.cts.map +1 -1
  16. package/dist/components/Collapsible.d.cts +3 -3
  17. package/dist/components/Collapsible.d.cts.map +1 -1
  18. package/dist/components/Command.d.cts +10 -10
  19. package/dist/components/Command.d.cts.map +1 -1
  20. package/dist/components/Dialog.d.cts +9 -9
  21. package/dist/components/Dialog.d.cts.map +1 -1
  22. package/dist/components/Dot.d.cts +1 -1
  23. package/dist/components/Dot.d.cts.map +1 -1
  24. package/dist/components/DropdownMenu.d.cts +14 -14
  25. package/dist/components/DropdownMenu.d.cts.map +1 -1
  26. package/dist/components/EmptyState.d.cts +1 -1
  27. package/dist/components/EmptyState.d.cts.map +1 -1
  28. package/dist/components/HashlineLines.d.cts +17 -0
  29. package/dist/components/HashlineLines.d.cts.map +1 -0
  30. package/dist/components/Input.d.cts +1 -1
  31. package/dist/components/Input.d.cts.map +1 -1
  32. package/dist/components/Kbd.d.cts +1 -1
  33. package/dist/components/Kbd.d.cts.map +1 -1
  34. package/dist/components/Label.d.cts +1 -1
  35. package/dist/components/Label.d.cts.map +1 -1
  36. package/dist/components/Markdown.d.cts +13 -3
  37. package/dist/components/Markdown.d.cts.map +1 -1
  38. package/dist/components/MediaPreview.d.cts +1 -1
  39. package/dist/components/MediaPreview.d.cts.map +1 -1
  40. package/dist/components/MessageItem.d.cts +4 -4
  41. package/dist/components/MessageItem.d.cts.map +1 -1
  42. package/dist/components/MessageLines.d.cts +1 -1
  43. package/dist/components/MessageLines.d.cts.map +1 -1
  44. package/dist/components/OptionList.d.cts +3 -3
  45. package/dist/components/OptionList.d.cts.map +1 -1
  46. package/dist/components/Panel.d.cts +3 -3
  47. package/dist/components/Panel.d.cts.map +1 -1
  48. package/dist/components/Popover.d.cts +7 -7
  49. package/dist/components/Popover.d.cts.map +1 -1
  50. package/dist/components/Progress.d.cts +1 -1
  51. package/dist/components/Progress.d.cts.map +1 -1
  52. package/dist/components/RadioGroup.d.cts +3 -3
  53. package/dist/components/RadioGroup.d.cts.map +1 -1
  54. package/dist/components/ScrollArea.d.cts +2 -2
  55. package/dist/components/ScrollArea.d.cts.map +1 -1
  56. package/dist/components/SectionLabel.d.cts +1 -1
  57. package/dist/components/SectionLabel.d.cts.map +1 -1
  58. package/dist/components/Select.d.cts +8 -8
  59. package/dist/components/Select.d.cts.map +1 -1
  60. package/dist/components/Separator.d.cts +1 -1
  61. package/dist/components/Separator.d.cts.map +1 -1
  62. package/dist/components/Sheet.d.cts +36 -0
  63. package/dist/components/Sheet.d.cts.map +1 -0
  64. package/dist/components/Skeleton.d.cts +1 -1
  65. package/dist/components/Skeleton.d.cts.map +1 -1
  66. package/dist/components/Spinner.d.cts +1 -1
  67. package/dist/components/Spinner.d.cts.map +1 -1
  68. package/dist/components/StatusBadge.d.cts +1 -1
  69. package/dist/components/StatusBadge.d.cts.map +1 -1
  70. package/dist/components/StreamCursor.d.cts +1 -1
  71. package/dist/components/StreamCursor.d.cts.map +1 -1
  72. package/dist/components/Switch.d.cts +1 -1
  73. package/dist/components/Switch.d.cts.map +1 -1
  74. package/dist/components/Tabs.d.cts +6 -6
  75. package/dist/components/Tabs.d.cts.map +1 -1
  76. package/dist/components/Textarea.d.cts +1 -1
  77. package/dist/components/Textarea.d.cts.map +1 -1
  78. package/dist/components/Toast.d.cts +7 -7
  79. package/dist/components/Toast.d.cts.map +1 -1
  80. package/dist/components/Tooltip.d.cts +4 -4
  81. package/dist/components/Tooltip.d.cts.map +1 -1
  82. package/dist/index.cjs +1 -1
  83. package/dist/index.d.cts +4 -1
  84. package/dist/index.d.mts +4 -1
  85. package/dist/index.mjs +1 -1
  86. package/dist/lib/hashlineView.d.cts +61 -0
  87. package/dist/lib/hashlineView.d.cts.map +1 -0
  88. package/dist/src/components/Accordion.d.mts +4 -4
  89. package/dist/src/components/Accordion.d.mts.map +1 -1
  90. package/dist/src/components/Avatar.d.mts +3 -3
  91. package/dist/src/components/Avatar.d.mts.map +1 -1
  92. package/dist/src/components/Badge.d.mts +1 -1
  93. package/dist/src/components/Badge.d.mts.map +1 -1
  94. package/dist/src/components/Breadcrumb.d.mts +1 -1
  95. package/dist/src/components/Breadcrumb.d.mts.map +1 -1
  96. package/dist/src/components/Button.d.mts +1 -1
  97. package/dist/src/components/Button.d.mts.map +1 -1
  98. package/dist/src/components/Checkbox.d.mts +1 -1
  99. package/dist/src/components/Checkbox.d.mts.map +1 -1
  100. package/dist/src/components/CodeEditor.d.mts +1 -1
  101. package/dist/src/components/CodeEditor.d.mts.map +1 -1
  102. package/dist/src/components/CodeEditorView.cjs +1 -1
  103. package/dist/src/components/CodeEditorView.cjs.map +1 -1
  104. package/dist/src/components/CodeEditorView.mjs +1 -1
  105. package/dist/src/components/CodeEditorView.mjs.map +1 -1
  106. package/dist/src/components/Collapsible.d.mts +3 -3
  107. package/dist/src/components/Collapsible.d.mts.map +1 -1
  108. package/dist/src/components/Command.d.mts +10 -10
  109. package/dist/src/components/Command.d.mts.map +1 -1
  110. package/dist/src/components/Dialog.d.mts +9 -9
  111. package/dist/src/components/Dialog.d.mts.map +1 -1
  112. package/dist/src/components/Dot.d.mts +1 -1
  113. package/dist/src/components/Dot.d.mts.map +1 -1
  114. package/dist/src/components/DropdownMenu.d.mts +14 -14
  115. package/dist/src/components/DropdownMenu.d.mts.map +1 -1
  116. package/dist/src/components/EmptyState.d.mts +1 -1
  117. package/dist/src/components/EmptyState.d.mts.map +1 -1
  118. package/dist/src/components/HashlineLines.cjs +2 -0
  119. package/dist/src/components/HashlineLines.cjs.map +1 -0
  120. package/dist/src/components/HashlineLines.d.mts +17 -0
  121. package/dist/src/components/HashlineLines.d.mts.map +1 -0
  122. package/dist/src/components/HashlineLines.mjs +2 -0
  123. package/dist/src/components/HashlineLines.mjs.map +1 -0
  124. package/dist/src/components/Input.d.mts +1 -1
  125. package/dist/src/components/Input.d.mts.map +1 -1
  126. package/dist/src/components/Kbd.d.mts +1 -1
  127. package/dist/src/components/Kbd.d.mts.map +1 -1
  128. package/dist/src/components/Label.d.mts +1 -1
  129. package/dist/src/components/Label.d.mts.map +1 -1
  130. package/dist/src/components/Markdown.cjs +2 -1
  131. package/dist/src/components/Markdown.cjs.map +1 -1
  132. package/dist/src/components/Markdown.d.mts +13 -3
  133. package/dist/src/components/Markdown.d.mts.map +1 -1
  134. package/dist/src/components/Markdown.mjs +2 -1
  135. package/dist/src/components/Markdown.mjs.map +1 -1
  136. package/dist/src/components/MediaPreview.cjs +1 -1
  137. package/dist/src/components/MediaPreview.cjs.map +1 -1
  138. package/dist/src/components/MediaPreview.d.mts +1 -1
  139. package/dist/src/components/MediaPreview.d.mts.map +1 -1
  140. package/dist/src/components/MediaPreview.mjs +1 -1
  141. package/dist/src/components/MediaPreview.mjs.map +1 -1
  142. package/dist/src/components/MessageItem.d.mts +4 -4
  143. package/dist/src/components/MessageItem.d.mts.map +1 -1
  144. package/dist/src/components/MessageLines.d.mts +1 -1
  145. package/dist/src/components/MessageLines.d.mts.map +1 -1
  146. package/dist/src/components/OptionList.d.mts +3 -3
  147. package/dist/src/components/OptionList.d.mts.map +1 -1
  148. package/dist/src/components/Panel.d.mts +3 -3
  149. package/dist/src/components/Panel.d.mts.map +1 -1
  150. package/dist/src/components/Popover.d.mts +7 -7
  151. package/dist/src/components/Popover.d.mts.map +1 -1
  152. package/dist/src/components/Progress.d.mts +1 -1
  153. package/dist/src/components/Progress.d.mts.map +1 -1
  154. package/dist/src/components/RadioGroup.d.mts +3 -3
  155. package/dist/src/components/RadioGroup.d.mts.map +1 -1
  156. package/dist/src/components/ScrollArea.d.mts +2 -2
  157. package/dist/src/components/ScrollArea.d.mts.map +1 -1
  158. package/dist/src/components/SectionLabel.d.mts +1 -1
  159. package/dist/src/components/SectionLabel.d.mts.map +1 -1
  160. package/dist/src/components/Select.d.mts +8 -8
  161. package/dist/src/components/Select.d.mts.map +1 -1
  162. package/dist/src/components/Separator.d.mts +1 -1
  163. package/dist/src/components/Separator.d.mts.map +1 -1
  164. package/dist/src/components/Sheet.cjs +2 -0
  165. package/dist/src/components/Sheet.cjs.map +1 -0
  166. package/dist/src/components/Sheet.d.mts +36 -0
  167. package/dist/src/components/Sheet.d.mts.map +1 -0
  168. package/dist/src/components/Sheet.mjs +2 -0
  169. package/dist/src/components/Sheet.mjs.map +1 -0
  170. package/dist/src/components/Skeleton.d.mts +1 -1
  171. package/dist/src/components/Skeleton.d.mts.map +1 -1
  172. package/dist/src/components/Spinner.cjs +1 -1
  173. package/dist/src/components/Spinner.cjs.map +1 -1
  174. package/dist/src/components/Spinner.d.mts +1 -1
  175. package/dist/src/components/Spinner.d.mts.map +1 -1
  176. package/dist/src/components/Spinner.mjs +1 -1
  177. package/dist/src/components/Spinner.mjs.map +1 -1
  178. package/dist/src/components/StatusBadge.d.mts +1 -1
  179. package/dist/src/components/StatusBadge.d.mts.map +1 -1
  180. package/dist/src/components/StreamCursor.d.mts +1 -1
  181. package/dist/src/components/StreamCursor.d.mts.map +1 -1
  182. package/dist/src/components/Switch.d.mts +1 -1
  183. package/dist/src/components/Switch.d.mts.map +1 -1
  184. package/dist/src/components/Tabs.d.mts +6 -6
  185. package/dist/src/components/Tabs.d.mts.map +1 -1
  186. package/dist/src/components/Textarea.d.mts +1 -1
  187. package/dist/src/components/Textarea.d.mts.map +1 -1
  188. package/dist/src/components/Toast.d.mts +7 -7
  189. package/dist/src/components/Toast.d.mts.map +1 -1
  190. package/dist/src/components/Tooltip.d.mts +4 -4
  191. package/dist/src/components/Tooltip.d.mts.map +1 -1
  192. package/dist/src/lib/hashlineView.cjs +6 -0
  193. package/dist/src/lib/hashlineView.cjs.map +1 -0
  194. package/dist/src/lib/hashlineView.d.mts +61 -0
  195. package/dist/src/lib/hashlineView.d.mts.map +1 -0
  196. package/dist/src/lib/hashlineView.mjs +6 -0
  197. package/dist/src/lib/hashlineView.mjs.map +1 -0
  198. package/package.json +6 -6
  199. package/styles/tokens.css +22 -0
@@ -0,0 +1,17 @@
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
+ interface HashlineLinesProps extends ComponentProps<'div'> {
10
+ lines: readonly PresentedLine[];
11
+ /** Width of the line-number column, in characters, from `hashlineBody`. */
12
+ gutter: number;
13
+ }
14
+ declare function HashlineLines({ className, lines, gutter, ...props }: HashlineLinesProps): import("react").JSX.Element;
15
+ //#endregion
16
+ export { HashlineLines, HashlineLinesProps };
17
+ //# sourceMappingURL=HashlineLines.d.mts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"HashlineLines.d.mts","names":[],"sources":["../../../src/components/HashlineLines.tsx"],"mappings":";;;;;;;;UASiB,2BAA2B;EAC1C,gBAAgB;;EAEhB;;iBAGc,gBAAgB,WAAW,OAAO,WAAW,SAAS,qCAAkB,IAAA"}
@@ -0,0 +1,2 @@
1
+ import{cn as e}from"../lib/cn.mjs";import{jsx as t,jsxs as n}from"react/jsx-runtime";function r({className:r,lines:i,gutter:a,...o}){let s={width:`${a}ch`};return t(`div`,{"data-slot":`hashline-lines`,className:e(`flex flex-col font-mono`,r),...o,children:i.map((e,r)=>{if(e.type===`file`)return t(`span`,{className:`mt-1 truncate text-doom-faint first:mt-0`,children:e.path},r);if(e.type===`plain`)return t(`span`,{className:`whitespace-pre-wrap break-words text-doom-dim`,children:e.text},r);let{value:i}=e;return n(`span`,{className:`flex gap-2`,children:[i.marker===void 0?null:t(`span`,{className:`w-4 shrink-0 ${i.marker===`match`?`text-doom-blue`:`text-doom-faint`}`,children:i.marker===`match`?`>>`:``}),t(`span`,{className:`shrink-0 text-right text-doom-faint`,style:s,children:i.line}),t(`span`,{className:`min-w-0 whitespace-pre-wrap break-words ${i.marker===`match`?`text-doom-hi`:`text-doom-text`}`,children:i.content})]},r)})})}export{r 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 } from 'react';\nimport { cn } from '../lib/cn.ts';\nimport type { PresentedLine } from '../lib/hashlineView.ts';\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 */\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}\n\nexport function HashlineLines({ className, lines, gutter, ...props }: HashlineLinesProps) {\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 <span\n className={`min-w-0 whitespace-pre-wrap break-words ${value.marker === 'match' ? 'text-doom-hi' : 'text-doom-text'}`}\n >\n {value.content}\n </span>\n </span>\n );\n })}\n </div>\n );\n}\n"],"mappings":"qFAeA,SAAgB,EAAc,CAAE,YAAW,QAAO,SAAQ,GAAG,GAA6B,CAIxF,IAAM,EAAc,CAAE,MAAO,GAAG,EAAO,GAAI,EAC3C,OACE,EAAC,MAAD,CAAK,YAAU,iBAAiB,UAAW,EAAG,0BAA2B,CAAS,EAAG,GAAI,EACtF,SAAA,EAAM,KAAK,EAAM,IAAU,CAC1B,GAAI,EAAK,OAAS,OAChB,OACE,EAAC,OAAD,CAAkB,UAAU,2CACzB,SAAA,EAAK,IACF,EAFK,CAEL,EAGV,GAAI,EAAK,OAAS,QAChB,OACE,EAAC,OAAD,CAAkB,UAAU,gDACzB,SAAA,EAAK,IACF,EAFK,CAEL,EAGV,GAAM,CAAE,SAAU,EAClB,OACE,EAAC,OAAD,CAAkB,UAAU,aAA5B,SAAA,CACG,EAAM,SAAW,IAAA,GAId,KAHF,EAAC,OAAD,CAAM,UAAW,gBAAgB,EAAM,SAAW,QAAU,iBAAmB,oBAC5E,SAAA,EAAM,SAAW,QAAU,KAAO,EAC/B,CAAA,EAER,EAAC,OAAD,CAAM,UAAU,sCAAsC,MAAO,EAC1D,SAAA,EAAM,IACH,CAAA,EACN,EAAC,OAAD,CACE,UAAW,2CAA2C,EAAM,SAAW,QAAU,eAAiB,mBAEjG,SAAA,EAAM,OACH,CAAA,CACF,CAdK,EAAA,CAcL,CAEV,CAAC,CACE,CAAA,CAET"}
@@ -14,7 +14,7 @@ type FieldVariant = NonNullable<VariantProps<typeof fieldVariants>['variant']>;
14
14
  type FieldSize = NonNullable<VariantProps<typeof fieldVariants>['size']>;
15
15
  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
+ declare function Input({ className, type, variant, size, ...props }: InputProps): import("react").JSX.Element;
18
18
  //#endregion
19
19
  export { FieldSize, FieldVariant, Input, InputProps, fieldVariants };
20
20
  //# 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":";;;;;;;;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,6BAAU,IAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from "react";
2
2
  //#region src/components/Kbd.d.ts
3
3
  /** A key or key path, drawn as the leader hints draw them. */
4
- declare function Kbd({ className, ...props }: ComponentProps<'kbd'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function Kbd({ className, ...props }: ComponentProps<'kbd'>): import("react").JSX.Element;
5
5
  //#endregion
6
6
  export { Kbd };
7
7
  //# sourceMappingURL=Kbd.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Kbd.d.mts","names":[],"sources":["../../../src/components/Kbd.tsx"],"mappings":";;;iBAIgB,MAAM,cAAc,SAAS,oDAAqB,IAAA"}
1
+ {"version":3,"file":"Kbd.d.mts","names":[],"sources":["../../../src/components/Kbd.tsx"],"mappings":";;;iBAIgB,MAAM,cAAc,SAAS,wCAAqB,IAAA"}
@@ -2,7 +2,7 @@ import { Label } from "radix-ui";
2
2
  import { ComponentProps } from "react";
3
3
  //#region src/components/Label.d.ts
4
4
  /** A field's name: clicking it focuses the control, which a bare span never does. */
5
- declare function Label$1({ className, ...props }: ComponentProps<typeof Label.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function Label$1({ className, ...props }: ComponentProps<typeof Label.Root>): import("react").JSX.Element;
6
6
  //#endregion
7
7
  export { Label$1 as Label };
8
8
  //# sourceMappingURL=Label.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Label.d.mts","names":[],"sources":["../../../src/components/Label.tsx"],"mappings":";;;;iBAKgB,UAAQ,cAAc,SAAS,sBAAsB,MAAe,oCAAK,IAAA"}
1
+ {"version":3,"file":"Label.d.mts","names":[],"sources":["../../../src/components/Label.tsx"],"mappings":";;;;iBAKgB,UAAQ,cAAc,SAAS,sBAAsB,MAAe,wBAAK,IAAA"}
@@ -1,2 +1,3 @@
1
- const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react/jsx-runtime"),n=require("react-markdown");n=e.__toESM(n,1);let r=require("remark-gfm");r=e.__toESM(r,1);const i=[r.default];function a({className:e,children:n,...r}){return(0,t.jsx)(`code`,{...r,className:`${e??``} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:n})}const o={p:({children:e})=>(0,t.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:e}),strong:({children:e})=>(0,t.jsx)(`strong`,{className:`font-bold text-doom-hi`,children:e}),em:({children:e})=>(0,t.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,t.jsx)(`del`,{className:`text-doom-dim line-through`,children:e}),a:({href:e,children:n})=>(0,t.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:a,pre:({children:e})=>(0,t.jsx)(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:e}),ul:({children:e})=>(0,t.jsx)(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>(0,t.jsx)(`ol`,{className:`list-decimal pl-5`,children:e}),li:({children:e})=>(0,t.jsx)(`li`,{className:`whitespace-pre-wrap break-words`,children:e}),h1:({children:e})=>(0,t.jsx)(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:e}),h2:({children:e})=>(0,t.jsx)(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:e}),h3:({children:e})=>(0,t.jsx)(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:e}),h4:({children:e})=>(0,t.jsx)(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:e}),blockquote:({children:e})=>(0,t.jsx)(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:e}),hr:()=>(0,t.jsx)(`hr`,{className:`border-doom-border-soft`}),table:({children:e})=>(0,t.jsx)(`div`,{className:`overflow-x-auto`,children:(0,t.jsx)(`table`,{className:`border-collapse text-[12px]`,children:e})}),th:({children:e})=>(0,t.jsx)(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:e}),td:({children:e})=>(0,t.jsx)(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:e}),img:({src:e,alt:n})=>(0,t.jsx)(`img`,{src:e,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function s({text:e}){return(0,t.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:(0,t.jsx)(n.default,{remarkPlugins:i,components:o,children:e})})}exports.Markdown=s;
1
+ const e=require("../../_virtual/_rolldown/runtime.cjs");let t=require("react/jsx-runtime"),n=require("react"),r=require("react-markdown");r=e.__toESM(r,1);let i=require("remark-gfm");i=e.__toESM(i,1);const a=[i.default],o=`rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green`,s=(0,n.createContext)(void 0);function c({className:e,children:r,...i}){let a=(0,n.useContext)(s),c=typeof r==`string`&&!r.includes(`
2
+ `)?r:void 0,l=c===void 0||e!==void 0?void 0:a?.(c);return l!==void 0&&c!==void 0?(0,t.jsx)(`button`,{type:`button`,"data-testid":`markdown-file-link`,title:`open ${c}`,onClick:l,className:`${o} cursor-pointer underline decoration-doom-green/40 underline-offset-2 hover:text-doom-hi hover:decoration-doom-hi`,children:c}):(0,t.jsx)(`code`,{...i,className:`${e??``} ${o} [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:r})}const l={p:({children:e})=>(0,t.jsx)(`p`,{className:`whitespace-pre-wrap break-words`,children:e}),strong:({children:e})=>(0,t.jsx)(`strong`,{className:`font-bold text-doom-hi`,children:e}),em:({children:e})=>(0,t.jsx)(`em`,{className:`italic`,children:e}),del:({children:e})=>(0,t.jsx)(`del`,{className:`text-doom-dim line-through`,children:e}),a:({href:e,children:n})=>(0,t.jsx)(`a`,{href:e,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:c,pre:({children:e})=>(0,t.jsx)(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:e}),ul:({children:e})=>(0,t.jsx)(`ul`,{className:`list-disc pl-5`,children:e}),ol:({children:e})=>(0,t.jsx)(`ol`,{className:`list-decimal pl-5`,children:e}),li:({children:e})=>(0,t.jsx)(`li`,{className:`whitespace-pre-wrap break-words`,children:e}),h1:({children:e})=>(0,t.jsx)(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:e}),h2:({children:e})=>(0,t.jsx)(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:e}),h3:({children:e})=>(0,t.jsx)(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:e}),h4:({children:e})=>(0,t.jsx)(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:e}),blockquote:({children:e})=>(0,t.jsx)(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:e}),hr:()=>(0,t.jsx)(`hr`,{className:`border-doom-border-soft`}),table:({children:e})=>(0,t.jsx)(`div`,{className:`overflow-x-auto`,children:(0,t.jsx)(`table`,{className:`border-collapse text-[12px]`,children:e})}),th:({children:e})=>(0,t.jsx)(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:e}),td:({children:e})=>(0,t.jsx)(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:e}),img:({src:e,alt:n})=>(0,t.jsx)(`img`,{src:e,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function u({text:e,onFileLink:n}){return(0,t.jsx)(s.Provider,{value:n,children:(0,t.jsx)(`div`,{className:`flex min-w-0 flex-col gap-2`,children:(0,t.jsx)(r.default,{remarkPlugins:a,components:l,children:e})})})}exports.Markdown=u;
2
3
  //# sourceMappingURL=Markdown.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.cjs","names":["remarkGfm","ReactMarkdown"],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n return (\n <code\n {...rest}\n className={`${className ?? ''} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text }: { text: string }) {\n return (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n"],"mappings":"qLAIA,MAAM,EAAiB,CAACA,EAAAA,OAAS,EAEjC,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,OACE,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,gIAE7B,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,eACV,EAAA,EAAA,IAAA,CAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,eACN,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,eACb,EAAA,EAAA,IAAA,CAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,QAAU,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,eACR,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACb,UAAA,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,eACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,UACX,EAAA,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,QAA0B,CACnD,OACE,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8BACb,UAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CAET"}
1
+ {"version":3,"file":"Markdown.cjs","names":["remarkGfm","createContext","useContext","ReactMarkdown"],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import { createContext, type ComponentProps, useContext } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nconst CODE_CLASS = 'rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green';\n\n/**\n * What a piece of inline code opens, when the host knows.\n *\n * Returning undefined leaves the span as plain code, which is the answer for\n * everything a message quotes that is not a file: a class name, a flag, a\n * command. The caller decides what counts, because only it knows which files\n * the session has.\n */\nexport type FileLinkHandler = (text: string) => (() => void) | undefined;\n\n/**\n * Passed by context rather than as a component prop so the component map stays\n * a module constant. Rebuilding that map per render gives react-markdown new\n * component identities, which remounts the whole rendered tree on every frame\n * of a streaming reply.\n */\nconst FileLinkContext = createContext<FileLinkHandler | undefined>(undefined);\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n const onFileLink = useContext(FileLinkContext);\n // Only a single-line span with no language class is a candidate: a fenced\n // block is content, not a reference, and its own renderer owns it.\n const label = typeof children === 'string' && !children.includes('\\n') ? children : undefined;\n const open = label === undefined || className !== undefined ? undefined : onFileLink?.(label);\n if (open !== undefined && label !== undefined) {\n return (\n <button\n type=\"button\"\n data-testid=\"markdown-file-link\"\n title={`open ${label}`}\n onClick={open}\n className={`${CODE_CLASS} cursor-pointer underline decoration-doom-green/40 underline-offset-2 hover:text-doom-hi hover:decoration-doom-hi`}\n >\n {label}\n </button>\n );\n }\n return (\n <code\n {...rest}\n className={`${className ?? ''} ${CODE_CLASS} [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text, onFileLink }: { text: string; onFileLink?: FileLinkHandler }) {\n return (\n <FileLinkContext.Provider value={onFileLink}>\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n </FileLinkContext.Provider>\n );\n}\n"],"mappings":"wMAIA,MAAM,EAAiB,CAACA,EAAAA,OAAS,EAE3B,EAAa,wEAkBb,GAAA,EAAkBC,EAAAA,cAAAA,CAA2C,IAAA,EAAS,EAE5E,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,IAAM,GAAA,EAAaC,EAAAA,WAAAA,CAAW,CAAe,EAGvC,EAAQ,OAAO,GAAa,UAAY,CAAC,EAAS,SAAS;CAAI,EAAI,EAAW,IAAA,GAC9E,EAAO,IAAU,IAAA,IAAa,IAAc,IAAA,GAAY,IAAA,GAAY,IAAa,CAAK,EAc5F,OAbI,IAAS,IAAA,IAAa,IAAU,IAAA,IAEhC,EAAA,EAAA,IAAA,CAAC,SAAD,CACE,KAAK,SACL,cAAY,qBACZ,MAAO,QAAQ,IACf,QAAS,EACT,UAAW,GAAG,EAAW,mHAExB,SAAA,CACK,CAAA,GAIV,EAAA,EAAA,IAAA,CAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,GAAG,EAAW,0DAE3C,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,eACV,EAAA,EAAA,IAAA,CAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,eACN,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,eACb,EAAA,EAAA,IAAA,CAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,QAAU,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,eACR,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,kBACb,UAAA,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,eACL,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,eAAe,EAAA,EAAA,IAAA,CAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,UACX,EAAA,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,OAAM,cAA8D,CAC7F,OACE,EAAA,EAAA,IAAA,CAAC,EAAgB,SAAjB,CAA0B,MAAO,EAC/B,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAK,UAAU,8BACb,UAAA,EAAA,EAAA,IAAA,CAACC,EAAAA,QAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CACmB,CAAA,CAE9B"}
@@ -1,8 +1,18 @@
1
1
  //#region src/components/Markdown.d.ts
2
+ /**
3
+ * What a piece of inline code opens, when the host knows.
4
+ *
5
+ * Returning undefined leaves the span as plain code, which is the answer for
6
+ * everything a message quotes that is not a file: a class name, a flag, a
7
+ * command. The caller decides what counts, because only it knows which files
8
+ * the session has.
9
+ */
10
+ type FileLinkHandler = (text: string) => (() => void) | undefined;
2
11
  /** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */
3
- declare function Markdown({ text }: {
12
+ declare function Markdown({ text, onFileLink }: {
4
13
  text: string;
5
- }): import("react/jsx-runtime").JSX.Element;
14
+ onFileLink?: FileLinkHandler;
15
+ }): import("react").JSX.Element;
6
16
  //#endregion
7
- export { Markdown };
17
+ export { FileLinkHandler, Markdown };
8
18
  //# sourceMappingURL=Markdown.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../src/components/Markdown.tsx"],"mappings":";;iBA2DgB,WAAW;EAAU;gCAAc,IAAA"}
1
+ {"version":3,"file":"Markdown.d.mts","names":[],"sources":["../../../src/components/Markdown.tsx"],"mappings":";;;;;;;;;KAgBY,mBAAmB;;iBAiFf,WAAW,MAAM;EAAgB;EAAc,aAAa;oBAAiB,IAAA"}
@@ -1,2 +1,3 @@
1
- import{jsx as e}from"react/jsx-runtime";import t from"react-markdown";import n from"remark-gfm";const r=[n];function i({className:t,children:n,...r}){return e(`code`,{...r,className:`${t??``} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:n})}const a={p:({children:t})=>e(`p`,{className:`whitespace-pre-wrap break-words`,children:t}),strong:({children:t})=>e(`strong`,{className:`font-bold text-doom-hi`,children:t}),em:({children:t})=>e(`em`,{className:`italic`,children:t}),del:({children:t})=>e(`del`,{className:`text-doom-dim line-through`,children:t}),a:({href:t,children:n})=>e(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:i,pre:({children:t})=>e(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:t}),ul:({children:t})=>e(`ul`,{className:`list-disc pl-5`,children:t}),ol:({children:t})=>e(`ol`,{className:`list-decimal pl-5`,children:t}),li:({children:t})=>e(`li`,{className:`whitespace-pre-wrap break-words`,children:t}),h1:({children:t})=>e(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:t}),h2:({children:t})=>e(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:t}),h3:({children:t})=>e(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:t}),h4:({children:t})=>e(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:t}),blockquote:({children:t})=>e(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:t}),hr:()=>e(`hr`,{className:`border-doom-border-soft`}),table:({children:t})=>e(`div`,{className:`overflow-x-auto`,children:e(`table`,{className:`border-collapse text-[12px]`,children:t})}),th:({children:t})=>e(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:t}),td:({children:t})=>e(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:t}),img:({src:t,alt:n})=>e(`img`,{src:t,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function o({text:n}){return e(`div`,{className:`flex min-w-0 flex-col gap-2`,children:e(t,{remarkPlugins:r,components:a,children:n})})}export{o as Markdown};
1
+ import{jsx as e}from"react/jsx-runtime";import{createContext as t,useContext as n}from"react";import r from"react-markdown";import i from"remark-gfm";const a=[i],o=`rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green`,s=t(void 0);function c({className:t,children:r,...i}){let a=n(s),c=typeof r==`string`&&!r.includes(`
2
+ `)?r:void 0,l=c===void 0||t!==void 0?void 0:a?.(c);return l!==void 0&&c!==void 0?e(`button`,{type:`button`,"data-testid":`markdown-file-link`,title:`open ${c}`,onClick:l,className:`${o} cursor-pointer underline decoration-doom-green/40 underline-offset-2 hover:text-doom-hi hover:decoration-doom-hi`,children:c}):e(`code`,{...i,className:`${t??``} ${o} [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`,children:r})}const l={p:({children:t})=>e(`p`,{className:`whitespace-pre-wrap break-words`,children:t}),strong:({children:t})=>e(`strong`,{className:`font-bold text-doom-hi`,children:t}),em:({children:t})=>e(`em`,{className:`italic`,children:t}),del:({children:t})=>e(`del`,{className:`text-doom-dim line-through`,children:t}),a:({href:t,children:n})=>e(`a`,{href:t,target:`_blank`,rel:`noreferrer`,className:`text-doom-blue underline decoration-doom-blue/50`,children:n}),code:c,pre:({children:t})=>e(`pre`,{className:`overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed`,children:t}),ul:({children:t})=>e(`ul`,{className:`list-disc pl-5`,children:t}),ol:({children:t})=>e(`ol`,{className:`list-decimal pl-5`,children:t}),li:({children:t})=>e(`li`,{className:`whitespace-pre-wrap break-words`,children:t}),h1:({children:t})=>e(`h1`,{className:`text-[15px] font-bold text-doom-hi`,children:t}),h2:({children:t})=>e(`h2`,{className:`text-[14px] font-bold text-doom-hi`,children:t}),h3:({children:t})=>e(`h3`,{className:`text-[13px] font-bold text-doom-hi`,children:t}),h4:({children:t})=>e(`h4`,{className:`text-[13px] font-bold text-doom-text`,children:t}),blockquote:({children:t})=>e(`blockquote`,{className:`border-l-2 border-doom-border pl-3 text-doom-dim`,children:t}),hr:()=>e(`hr`,{className:`border-doom-border-soft`}),table:({children:t})=>e(`div`,{className:`overflow-x-auto`,children:e(`table`,{className:`border-collapse text-[12px]`,children:t})}),th:({children:t})=>e(`th`,{className:`border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi`,children:t}),td:({children:t})=>e(`td`,{className:`border border-doom-border px-2 py-1 align-top`,children:t}),img:({src:t,alt:n})=>e(`img`,{src:t,alt:n??``,className:`max-h-[480px] max-w-full rounded border border-doom-border`})};function u({text:t,onFileLink:n}){return e(s.Provider,{value:n,children:e(`div`,{className:`flex min-w-0 flex-col gap-2`,children:e(r,{remarkPlugins:a,components:l,children:t})})})}export{u as Markdown};
2
3
  //# sourceMappingURL=Markdown.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"Markdown.mjs","names":[],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import type { ComponentProps } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n return (\n <code\n {...rest}\n className={`${className ?? ''} rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text }: { text: string }) {\n return (\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n );\n}\n"],"mappings":"gGAIA,MAAM,EAAiB,CAAC,CAAS,EAEjC,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,OACE,EAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,gIAE7B,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,cAAe,EAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,cAAe,EAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,cAAe,EAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,cACV,EAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,cACN,EAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,cACb,EAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,OAAU,EAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,cACR,EAAC,MAAD,CAAK,UAAU,kBACb,SAAA,EAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,cACL,EAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,SACX,EAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,QAA0B,CACnD,OACE,EAAC,MAAD,CAAK,UAAU,8BACb,SAAA,EAAC,EAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CAET"}
1
+ {"version":3,"file":"Markdown.mjs","names":[],"sources":["../../../src/components/Markdown.tsx"],"sourcesContent":["import { createContext, type ComponentProps, useContext } from 'react';\nimport ReactMarkdown, { type Components } from 'react-markdown';\nimport remarkGfm from 'remark-gfm';\n\nconst REMARK_PLUGINS = [remarkGfm];\n\nconst CODE_CLASS = 'rounded bg-doom-deep px-1 py-px font-mono text-[12px] text-doom-green';\n\n/**\n * What a piece of inline code opens, when the host knows.\n *\n * Returning undefined leaves the span as plain code, which is the answer for\n * everything a message quotes that is not a file: a class name, a flag, a\n * command. The caller decides what counts, because only it knows which files\n * the session has.\n */\nexport type FileLinkHandler = (text: string) => (() => void) | undefined;\n\n/**\n * Passed by context rather than as a component prop so the component map stays\n * a module constant. Rebuilding that map per render gives react-markdown new\n * component identities, which remounts the whole rendered tree on every frame\n * of a streaming reply.\n */\nconst FileLinkContext = createContext<FileLinkHandler | undefined>(undefined);\n\nfunction Code({ className, children, ...rest }: ComponentProps<'code'>) {\n const onFileLink = useContext(FileLinkContext);\n // Only a single-line span with no language class is a candidate: a fenced\n // block is content, not a reference, and its own renderer owns it.\n const label = typeof children === 'string' && !children.includes('\\n') ? children : undefined;\n const open = label === undefined || className !== undefined ? undefined : onFileLink?.(label);\n if (open !== undefined && label !== undefined) {\n return (\n <button\n type=\"button\"\n data-testid=\"markdown-file-link\"\n title={`open ${label}`}\n onClick={open}\n className={`${CODE_CLASS} cursor-pointer underline decoration-doom-green/40 underline-offset-2 hover:text-doom-hi hover:decoration-doom-hi`}\n >\n {label}\n </button>\n );\n }\n return (\n <code\n {...rest}\n className={`${className ?? ''} ${CODE_CLASS} [pre_&]:bg-transparent [pre_&]:p-0 [pre_&]:text-doom-hi`}\n >\n {children}\n </code>\n );\n}\n\nconst COMPONENTS: Components = {\n p: ({ children }) => <p className=\"whitespace-pre-wrap break-words\">{children}</p>,\n strong: ({ children }) => <strong className=\"font-bold text-doom-hi\">{children}</strong>,\n em: ({ children }) => <em className=\"italic\">{children}</em>,\n del: ({ children }) => <del className=\"text-doom-dim line-through\">{children}</del>,\n a: ({ href, children }) => (\n <a href={href} target=\"_blank\" rel=\"noreferrer\" className=\"text-doom-blue underline decoration-doom-blue/50\">\n {children}\n </a>\n ),\n code: Code,\n pre: ({ children }) => (\n <pre className=\"overflow-x-auto rounded border border-doom-border bg-doom-deep p-2.5 text-[12px] leading-relaxed\">\n {children}\n </pre>\n ),\n ul: ({ children }) => <ul className=\"list-disc pl-5\">{children}</ul>,\n ol: ({ children }) => <ol className=\"list-decimal pl-5\">{children}</ol>,\n li: ({ children }) => <li className=\"whitespace-pre-wrap break-words\">{children}</li>,\n h1: ({ children }) => <h1 className=\"text-[15px] font-bold text-doom-hi\">{children}</h1>,\n h2: ({ children }) => <h2 className=\"text-[14px] font-bold text-doom-hi\">{children}</h2>,\n h3: ({ children }) => <h3 className=\"text-[13px] font-bold text-doom-hi\">{children}</h3>,\n h4: ({ children }) => <h4 className=\"text-[13px] font-bold text-doom-text\">{children}</h4>,\n blockquote: ({ children }) => (\n <blockquote className=\"border-l-2 border-doom-border pl-3 text-doom-dim\">{children}</blockquote>\n ),\n hr: () => <hr className=\"border-doom-border-soft\" />,\n table: ({ children }) => (\n <div className=\"overflow-x-auto\">\n <table className=\"border-collapse text-[12px]\">{children}</table>\n </div>\n ),\n th: ({ children }) => (\n <th className=\"border border-doom-border bg-doom-deep px-2 py-1 text-left font-bold text-doom-hi\">{children}</th>\n ),\n td: ({ children }) => <td className=\"border border-doom-border px-2 py-1 align-top\">{children}</td>,\n img: ({ src, alt }) => (\n <img src={src} alt={alt ?? ''} className=\"max-h-[480px] max-w-full rounded border border-doom-border\" />\n ),\n};\n\n/** GitHub-flavored Markdown using the cockpit's safe, shared presentation. */\nexport function Markdown({ text, onFileLink }: { text: string; onFileLink?: FileLinkHandler }) {\n return (\n <FileLinkContext.Provider value={onFileLink}>\n <div className=\"flex min-w-0 flex-col gap-2\">\n <ReactMarkdown remarkPlugins={REMARK_PLUGINS} components={COMPONENTS}>\n {text}\n </ReactMarkdown>\n </div>\n </FileLinkContext.Provider>\n );\n}\n"],"mappings":"sJAIA,MAAM,EAAiB,CAAC,CAAS,EAE3B,EAAa,wEAkBb,EAAkB,EAA2C,IAAA,EAAS,EAE5E,SAAS,EAAK,CAAE,YAAW,WAAU,GAAG,GAAgC,CACtE,IAAM,EAAa,EAAW,CAAe,EAGvC,EAAQ,OAAO,GAAa,UAAY,CAAC,EAAS,SAAS;CAAI,EAAI,EAAW,IAAA,GAC9E,EAAO,IAAU,IAAA,IAAa,IAAc,IAAA,GAAY,IAAA,GAAY,IAAa,CAAK,EAc5F,OAbI,IAAS,IAAA,IAAa,IAAU,IAAA,GAEhC,EAAC,SAAD,CACE,KAAK,SACL,cAAY,qBACZ,MAAO,QAAQ,IACf,QAAS,EACT,UAAW,GAAG,EAAW,mHAExB,SAAA,CACK,CAAA,EAIV,EAAC,OAAD,CACE,GAAI,EACJ,UAAW,GAAG,GAAa,GAAG,GAAG,EAAW,0DAE3C,UACG,CAAA,CAEV,CAEA,MAAM,EAAyB,CAC7B,GAAI,CAAE,cAAe,EAAC,IAAD,CAAG,UAAU,kCAAmC,UAAY,CAAA,EACjF,QAAS,CAAE,cAAe,EAAC,SAAD,CAAQ,UAAU,yBAA0B,UAAiB,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,SAAU,UAAa,CAAA,EAC3D,KAAM,CAAE,cAAe,EAAC,MAAD,CAAK,UAAU,6BAA8B,UAAc,CAAA,EAClF,GAAI,CAAE,OAAM,cACV,EAAC,IAAD,CAAS,OAAM,OAAO,SAAS,IAAI,aAAa,UAAU,mDACvD,UACA,CAAA,EAEL,KAAM,EACN,KAAM,CAAE,cACN,EAAC,MAAD,CAAK,UAAU,mGACZ,UACE,CAAA,EAEP,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,iBAAkB,UAAa,CAAA,EACnE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,oBAAqB,UAAa,CAAA,EACtE,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,kCAAmC,UAAa,CAAA,EACpF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,qCAAsC,UAAa,CAAA,EACvF,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,uCAAwC,UAAa,CAAA,EACzF,YAAa,CAAE,cACb,EAAC,aAAD,CAAY,UAAU,mDAAoD,UAAqB,CAAA,EAEjG,OAAU,EAAC,KAAD,CAAI,UAAU,yBAA2B,CAAA,EACnD,OAAQ,CAAE,cACR,EAAC,MAAD,CAAK,UAAU,kBACb,SAAA,EAAC,QAAD,CAAO,UAAU,8BAA+B,UAAgB,CAAA,CAC7D,CAAA,EAEP,IAAK,CAAE,cACL,EAAC,KAAD,CAAI,UAAU,oFAAqF,UAAa,CAAA,EAElH,IAAK,CAAE,cAAe,EAAC,KAAD,CAAI,UAAU,gDAAiD,UAAa,CAAA,EAClG,KAAM,CAAE,MAAK,SACX,EAAC,MAAD,CAAU,MAAK,IAAK,GAAO,GAAI,UAAU,4DAA8D,CAAA,CAE3G,EAGA,SAAgB,EAAS,CAAE,OAAM,cAA8D,CAC7F,OACE,EAAC,EAAgB,SAAjB,CAA0B,MAAO,EAC/B,SAAA,EAAC,MAAD,CAAK,UAAU,8BACb,SAAA,EAAC,EAAD,CAAe,cAAe,EAAgB,WAAY,EACvD,SAAA,CACY,CAAA,CACZ,CAAA,CACmB,CAAA,CAE9B"}
@@ -1,2 +1,2 @@
1
- require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Badge.cjs"),n=require("../lib/media.cjs");let r=require("react/jsx-runtime"),i=require("lucide-react");const a=`max-w-full rounded border border-doom-border bg-doom-deep`;function o({src:o,path:s,kind:c,className:l,"data-testid":u}){let d=c??n.mediaKindOf(s),f=s.split(`/`).at(-1)??s;return d===`image`?(0,r.jsx)(`a`,{href:o,target:`_blank`,rel:`noreferrer`,"data-testid":u,"data-kind":d,children:(0,r.jsx)(`img`,{src:o,alt:s,className:e.cn(a,`max-h-[36rem]`,l)})}):d===`video`?(0,r.jsx)(`video`,{src:o,controls:!0,preload:`metadata`,"data-testid":u,"data-kind":d,className:e.cn(a,`max-h-[36rem]`,l)}):d===`pdf`?(0,r.jsx)(`iframe`,{src:o,title:s,"data-testid":u,"data-kind":d,className:e.cn(a,`h-[36rem] w-full`,l)}):(0,r.jsx)(t.Badge,{asChild:!0,size:`md`,"data-testid":u,"data-kind":d,className:e.cn(`self-start bg-doom-panel text-doom-text hover:border-doom-blue/50`,l),children:(0,r.jsxs)(`a`,{href:o,download:f,children:[(0,r.jsx)(i.FileText,{className:`h-3 w-3 shrink-0 text-doom-faint`}),`download `,f]})})}exports.MediaPreview=o;
1
+ require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Badge.cjs"),n=require("../lib/media.cjs");let r=require("react/jsx-runtime"),i=require("lucide-react");const a=`max-w-full rounded border border-doom-border bg-doom-deep`;function o({src:o,path:s,kind:c,className:l,"data-testid":u}){let d=c??n.mediaKindOf(s),f=s.split(`/`).at(-1)??s;return d===`image`?(0,r.jsx)(`a`,{href:o,target:`_blank`,rel:`noreferrer`,"data-testid":u,"data-kind":d,children:(0,r.jsx)(`img`,{src:o,alt:s,className:e.cn(a,`max-h-[36rem]`,l)})}):d===`video`?(0,r.jsx)(`video`,{src:o,controls:!0,preload:`metadata`,"data-testid":u,"data-kind":d,className:e.cn(a,`max-h-[36rem]`,l),children:(0,r.jsx)(`track`,{kind:`captions`})}):d===`pdf`?(0,r.jsx)(`iframe`,{src:o,title:s,"data-testid":u,"data-kind":d,className:e.cn(a,`h-[36rem] w-full`,l)}):(0,r.jsx)(t.Badge,{asChild:!0,size:`md`,"data-testid":u,"data-kind":d,className:e.cn(`self-start bg-doom-panel text-doom-text hover:border-doom-blue/50`,l),children:(0,r.jsxs)(`a`,{href:o,download:f,children:[(0,r.jsx)(i.FileText,{className:`h-3 w-3 shrink-0 text-doom-faint`}),`download `,f]})})}exports.MediaPreview=o;
2
2
  //# sourceMappingURL=MediaPreview.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaPreview.cjs","names":["mediaKindOf","cn","Badge","FileIcon"],"sources":["../../../src/components/MediaPreview.tsx"],"sourcesContent":["import { FileIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { mediaKindOf } from '../lib/media.ts';\nimport type { MediaKind } from '../types/editor.ts';\nimport { Badge } from './Badge.tsx';\n\n/**\n * A file the browser can show but not edit.\n *\n * It renders bytes a server is already serving, so the caller supplies the\n * URL and this decides only which element reads it. Everything the browser\n * cannot render is a download rather than a converted approximation: a `.docx`\n * turned into HTML is a different document, and offering to edit that one\n * would be offering to overwrite the real one with it.\n */\n\nexport interface MediaPreviewProps {\n /** Where the bytes are served from. */\n src: string;\n /** The file's path, used for the accessible name and the download name. */\n path: string;\n /** Overrides the kind inferred from the path, for a server that knows better. */\n kind?: MediaKind;\n className?: string;\n 'data-testid'?: string;\n}\n\nconst FRAME = 'max-w-full rounded border border-doom-border bg-doom-deep';\n\nexport function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps) {\n const resolved = kind ?? mediaKindOf(path);\n const name = path.split('/').at(-1) ?? path;\n\n if (resolved === 'image') {\n return (\n <a href={src} target=\"_blank\" rel=\"noreferrer\" data-testid={testId} data-kind={resolved}>\n <img src={src} alt={path} className={cn(FRAME, 'max-h-[36rem]', className)} />\n </a>\n );\n }\n if (resolved === 'video') {\n return (\n <video\n src={src}\n controls\n preload=\"metadata\"\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'max-h-[36rem]', className)}\n />\n );\n }\n if (resolved === 'pdf') {\n return (\n <iframe\n src={src}\n title={path}\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'h-[36rem] w-full', className)}\n />\n );\n }\n return (\n <Badge\n asChild\n size=\"md\"\n data-testid={testId}\n data-kind={resolved}\n className={cn('self-start bg-doom-panel text-doom-text hover:border-doom-blue/50', className)}\n >\n <a href={src} download={name}>\n <FileIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n download {name}\n </a>\n </Badge>\n );\n}\n"],"mappings":"mLA2BA,MAAM,EAAQ,4DAEd,SAAgB,EAAa,CAAE,MAAK,OAAM,OAAM,YAAW,cAAe,GAA6B,CACrG,IAAM,EAAW,GAAQA,EAAAA,YAAY,CAAI,EACnC,EAAO,EAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAK,EAgCvC,OA9BI,IAAa,SAEb,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,KAAM,EAAK,OAAO,SAAS,IAAI,aAAa,cAAa,EAAQ,YAAW,EAC7E,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,IAAK,EAAM,UAAWC,EAAAA,GAAG,EAAO,gBAAiB,CAAS,CAAI,CAAA,CAC5E,CAAA,EAGH,IAAa,SAEb,EAAA,EAAA,IAAA,CAAC,QAAD,CACO,MACL,SAAA,GACA,QAAQ,WACR,cAAa,EACb,YAAW,EACX,UAAWA,EAAAA,GAAG,EAAO,gBAAiB,CAAS,CAChD,CAAA,EAGD,IAAa,OAEb,EAAA,EAAA,IAAA,CAAC,SAAD,CACO,MACL,MAAO,EACP,cAAa,EACb,YAAW,EACX,UAAWA,EAAAA,GAAG,EAAO,mBAAoB,CAAS,CACnD,CAAA,GAIH,EAAA,EAAA,IAAA,CAACC,EAAAA,MAAD,CACE,QAAA,GACA,KAAK,KACL,cAAa,EACb,YAAW,EACX,UAAWD,EAAAA,GAAG,oEAAqE,CAAS,EAE5F,UAAA,EAAA,EAAA,KAAA,CAAC,IAAD,CAAG,KAAM,EAAK,SAAU,EAAxB,SAAA,EACE,EAAA,EAAA,IAAA,CAACE,EAAAA,SAAD,CAAU,UAAU,kCAAoC,CAAA,EAAC,YAC/C,CACT,GACE,CAAA,CAEX"}
1
+ {"version":3,"file":"MediaPreview.cjs","names":["mediaKindOf","cn","Badge","FileIcon"],"sources":["../../../src/components/MediaPreview.tsx"],"sourcesContent":["import { FileIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { mediaKindOf } from '../lib/media.ts';\nimport type { MediaKind } from '../types/editor.ts';\nimport { Badge } from './Badge.tsx';\n\n/**\n * A file the browser can show but not edit.\n *\n * It renders bytes a server is already serving, so the caller supplies the\n * URL and this decides only which element reads it. Everything the browser\n * cannot render is a download rather than a converted approximation: a `.docx`\n * turned into HTML is a different document, and offering to edit that one\n * would be offering to overwrite the real one with it.\n */\n\nexport interface MediaPreviewProps {\n /** Where the bytes are served from. */\n src: string;\n /** The file's path, used for the accessible name and the download name. */\n path: string;\n /** Overrides the kind inferred from the path, for a server that knows better. */\n kind?: MediaKind;\n className?: string;\n 'data-testid'?: string;\n}\n\nconst FRAME = 'max-w-full rounded border border-doom-border bg-doom-deep';\n\nexport function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps) {\n const resolved = kind ?? mediaKindOf(path);\n const name = path.split('/').at(-1) ?? path;\n\n if (resolved === 'image') {\n return (\n <a href={src} target=\"_blank\" rel=\"noreferrer\" data-testid={testId} data-kind={resolved}>\n <img src={src} alt={path} className={cn(FRAME, 'max-h-[36rem]', className)} />\n </a>\n );\n }\n if (resolved === 'video') {\n return (\n <video\n src={src}\n controls\n preload=\"metadata\"\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'max-h-[36rem]', className)}\n >\n <track kind=\"captions\" />\n </video>\n );\n }\n if (resolved === 'pdf') {\n return (\n <iframe\n src={src}\n title={path}\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'h-[36rem] w-full', className)}\n />\n );\n }\n return (\n <Badge\n asChild\n size=\"md\"\n data-testid={testId}\n data-kind={resolved}\n className={cn('self-start bg-doom-panel text-doom-text hover:border-doom-blue/50', className)}\n >\n <a href={src} download={name}>\n <FileIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n download {name}\n </a>\n </Badge>\n );\n}\n"],"mappings":"mLA2BA,MAAM,EAAQ,4DAEd,SAAgB,EAAa,CAAE,MAAK,OAAM,OAAM,YAAW,cAAe,GAA6B,CACrG,IAAM,EAAW,GAAQA,EAAAA,YAAY,CAAI,EACnC,EAAO,EAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAK,EAkCvC,OAhCI,IAAa,SAEb,EAAA,EAAA,IAAA,CAAC,IAAD,CAAG,KAAM,EAAK,OAAO,SAAS,IAAI,aAAa,cAAa,EAAQ,YAAW,EAC7E,UAAA,EAAA,EAAA,IAAA,CAAC,MAAD,CAAU,MAAK,IAAK,EAAM,UAAWC,EAAAA,GAAG,EAAO,gBAAiB,CAAS,CAAI,CAAA,CAC5E,CAAA,EAGH,IAAa,SAEb,EAAA,EAAA,IAAA,CAAC,QAAD,CACO,MACL,SAAA,GACA,QAAQ,WACR,cAAa,EACb,YAAW,EACX,UAAWA,EAAAA,GAAG,EAAO,gBAAiB,CAAS,EAE/C,UAAA,EAAA,EAAA,IAAA,CAAC,QAAD,CAAO,KAAK,UAAY,CAAA,CACnB,CAAA,EAGP,IAAa,OAEb,EAAA,EAAA,IAAA,CAAC,SAAD,CACO,MACL,MAAO,EACP,cAAa,EACb,YAAW,EACX,UAAWA,EAAAA,GAAG,EAAO,mBAAoB,CAAS,CACnD,CAAA,GAIH,EAAA,EAAA,IAAA,CAACC,EAAAA,MAAD,CACE,QAAA,GACA,KAAK,KACL,cAAa,EACb,YAAW,EACX,UAAWD,EAAAA,GAAG,oEAAqE,CAAS,EAE5F,UAAA,EAAA,EAAA,KAAA,CAAC,IAAD,CAAG,KAAM,EAAK,SAAU,EAAxB,SAAA,EACE,EAAA,EAAA,IAAA,CAACE,EAAAA,SAAD,CAAU,UAAU,kCAAoC,CAAA,EAAC,YAC/C,CACT,GACE,CAAA,CAEX"}
@@ -19,7 +19,7 @@ interface MediaPreviewProps {
19
19
  className?: string;
20
20
  'data-testid'?: string;
21
21
  }
22
- declare function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps): import("react/jsx-runtime").JSX.Element;
22
+ declare function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps): import("react").JSX.Element;
23
23
  //#endregion
24
24
  export { MediaPreview, MediaPreviewProps };
25
25
  //# sourceMappingURL=MediaPreview.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaPreview.d.mts","names":[],"sources":["../../../src/components/MediaPreview.tsx"],"mappings":";;;;;;;;;;;UAgBiB;;EAEf;;EAEA;;EAEA,OAAO;EACP;EACA;;iBAKc,eAAe,KAAK,MAAM,MAAM,0BAA0B,UAAU,gDAAiB,IAAA"}
1
+ {"version":3,"file":"MediaPreview.d.mts","names":[],"sources":["../../../src/components/MediaPreview.tsx"],"mappings":";;;;;;;;;;;UAgBiB;;EAEf;;EAEA;;EAEA,OAAO;EACP;EACA;;iBAKc,eAAe,KAAK,MAAM,MAAM,0BAA0B,UAAU,oCAAiB,IAAA"}
@@ -1,2 +1,2 @@
1
- import{FileIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Badge as n}from"./Badge.mjs";import{mediaKindOf as r}from"../lib/media.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=`max-w-full rounded border border-doom-border bg-doom-deep`;function s({src:s,path:c,kind:l,className:u,"data-testid":d}){let f=l??r(c),p=c.split(`/`).at(-1)??c;return f===`image`?i(`a`,{href:s,target:`_blank`,rel:`noreferrer`,"data-testid":d,"data-kind":f,children:i(`img`,{src:s,alt:c,className:t(o,`max-h-[36rem]`,u)})}):f===`video`?i(`video`,{src:s,controls:!0,preload:`metadata`,"data-testid":d,"data-kind":f,className:t(o,`max-h-[36rem]`,u)}):f===`pdf`?i(`iframe`,{src:s,title:c,"data-testid":d,"data-kind":f,className:t(o,`h-[36rem] w-full`,u)}):i(n,{asChild:!0,size:`md`,"data-testid":d,"data-kind":f,className:t(`self-start bg-doom-panel text-doom-text hover:border-doom-blue/50`,u),children:a(`a`,{href:s,download:p,children:[i(e,{className:`h-3 w-3 shrink-0 text-doom-faint`}),`download `,p]})})}export{s as MediaPreview};
1
+ import{FileIcon as e}from"../icons/icons.mjs";import{cn as t}from"../lib/cn.mjs";import{Badge as n}from"./Badge.mjs";import{mediaKindOf as r}from"../lib/media.mjs";import{jsx as i,jsxs as a}from"react/jsx-runtime";const o=`max-w-full rounded border border-doom-border bg-doom-deep`;function s({src:s,path:c,kind:l,className:u,"data-testid":d}){let f=l??r(c),p=c.split(`/`).at(-1)??c;return f===`image`?i(`a`,{href:s,target:`_blank`,rel:`noreferrer`,"data-testid":d,"data-kind":f,children:i(`img`,{src:s,alt:c,className:t(o,`max-h-[36rem]`,u)})}):f===`video`?i(`video`,{src:s,controls:!0,preload:`metadata`,"data-testid":d,"data-kind":f,className:t(o,`max-h-[36rem]`,u),children:i(`track`,{kind:`captions`})}):f===`pdf`?i(`iframe`,{src:s,title:c,"data-testid":d,"data-kind":f,className:t(o,`h-[36rem] w-full`,u)}):i(n,{asChild:!0,size:`md`,"data-testid":d,"data-kind":f,className:t(`self-start bg-doom-panel text-doom-text hover:border-doom-blue/50`,u),children:a(`a`,{href:s,download:p,children:[i(e,{className:`h-3 w-3 shrink-0 text-doom-faint`}),`download `,p]})})}export{s as MediaPreview};
2
2
  //# sourceMappingURL=MediaPreview.mjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"MediaPreview.mjs","names":[],"sources":["../../../src/components/MediaPreview.tsx"],"sourcesContent":["import { FileIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { mediaKindOf } from '../lib/media.ts';\nimport type { MediaKind } from '../types/editor.ts';\nimport { Badge } from './Badge.tsx';\n\n/**\n * A file the browser can show but not edit.\n *\n * It renders bytes a server is already serving, so the caller supplies the\n * URL and this decides only which element reads it. Everything the browser\n * cannot render is a download rather than a converted approximation: a `.docx`\n * turned into HTML is a different document, and offering to edit that one\n * would be offering to overwrite the real one with it.\n */\n\nexport interface MediaPreviewProps {\n /** Where the bytes are served from. */\n src: string;\n /** The file's path, used for the accessible name and the download name. */\n path: string;\n /** Overrides the kind inferred from the path, for a server that knows better. */\n kind?: MediaKind;\n className?: string;\n 'data-testid'?: string;\n}\n\nconst FRAME = 'max-w-full rounded border border-doom-border bg-doom-deep';\n\nexport function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps) {\n const resolved = kind ?? mediaKindOf(path);\n const name = path.split('/').at(-1) ?? path;\n\n if (resolved === 'image') {\n return (\n <a href={src} target=\"_blank\" rel=\"noreferrer\" data-testid={testId} data-kind={resolved}>\n <img src={src} alt={path} className={cn(FRAME, 'max-h-[36rem]', className)} />\n </a>\n );\n }\n if (resolved === 'video') {\n return (\n <video\n src={src}\n controls\n preload=\"metadata\"\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'max-h-[36rem]', className)}\n />\n );\n }\n if (resolved === 'pdf') {\n return (\n <iframe\n src={src}\n title={path}\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'h-[36rem] w-full', className)}\n />\n );\n }\n return (\n <Badge\n asChild\n size=\"md\"\n data-testid={testId}\n data-kind={resolved}\n className={cn('self-start bg-doom-panel text-doom-text hover:border-doom-blue/50', className)}\n >\n <a href={src} download={name}>\n <FileIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n download {name}\n </a>\n </Badge>\n );\n}\n"],"mappings":"sNA2BA,MAAM,EAAQ,4DAEd,SAAgB,EAAa,CAAE,MAAK,OAAM,OAAM,YAAW,cAAe,GAA6B,CACrG,IAAM,EAAW,GAAQ,EAAY,CAAI,EACnC,EAAO,EAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAK,EAgCvC,OA9BI,IAAa,QAEb,EAAC,IAAD,CAAG,KAAM,EAAK,OAAO,SAAS,IAAI,aAAa,cAAa,EAAQ,YAAW,EAC7E,SAAA,EAAC,MAAD,CAAU,MAAK,IAAK,EAAM,UAAW,EAAG,EAAO,gBAAiB,CAAS,CAAI,CAAA,CAC5E,CAAA,EAGH,IAAa,QAEb,EAAC,QAAD,CACO,MACL,SAAA,GACA,QAAQ,WACR,cAAa,EACb,YAAW,EACX,UAAW,EAAG,EAAO,gBAAiB,CAAS,CAChD,CAAA,EAGD,IAAa,MAEb,EAAC,SAAD,CACO,MACL,MAAO,EACP,cAAa,EACb,YAAW,EACX,UAAW,EAAG,EAAO,mBAAoB,CAAS,CACnD,CAAA,EAIH,EAAC,EAAD,CACE,QAAA,GACA,KAAK,KACL,cAAa,EACb,YAAW,EACX,UAAW,EAAG,oEAAqE,CAAS,EAE5F,SAAA,EAAC,IAAD,CAAG,KAAM,EAAK,SAAU,EAAxB,SAAA,CACE,EAAC,EAAD,CAAU,UAAU,kCAAoC,CAAA,EAAC,YAC/C,CACT,GACE,CAAA,CAEX"}
1
+ {"version":3,"file":"MediaPreview.mjs","names":[],"sources":["../../../src/components/MediaPreview.tsx"],"sourcesContent":["import { FileIcon } from '../icons/icons.ts';\nimport { cn } from '../lib/cn.ts';\nimport { mediaKindOf } from '../lib/media.ts';\nimport type { MediaKind } from '../types/editor.ts';\nimport { Badge } from './Badge.tsx';\n\n/**\n * A file the browser can show but not edit.\n *\n * It renders bytes a server is already serving, so the caller supplies the\n * URL and this decides only which element reads it. Everything the browser\n * cannot render is a download rather than a converted approximation: a `.docx`\n * turned into HTML is a different document, and offering to edit that one\n * would be offering to overwrite the real one with it.\n */\n\nexport interface MediaPreviewProps {\n /** Where the bytes are served from. */\n src: string;\n /** The file's path, used for the accessible name and the download name. */\n path: string;\n /** Overrides the kind inferred from the path, for a server that knows better. */\n kind?: MediaKind;\n className?: string;\n 'data-testid'?: string;\n}\n\nconst FRAME = 'max-w-full rounded border border-doom-border bg-doom-deep';\n\nexport function MediaPreview({ src, path, kind, className, 'data-testid': testId }: MediaPreviewProps) {\n const resolved = kind ?? mediaKindOf(path);\n const name = path.split('/').at(-1) ?? path;\n\n if (resolved === 'image') {\n return (\n <a href={src} target=\"_blank\" rel=\"noreferrer\" data-testid={testId} data-kind={resolved}>\n <img src={src} alt={path} className={cn(FRAME, 'max-h-[36rem]', className)} />\n </a>\n );\n }\n if (resolved === 'video') {\n return (\n <video\n src={src}\n controls\n preload=\"metadata\"\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'max-h-[36rem]', className)}\n >\n <track kind=\"captions\" />\n </video>\n );\n }\n if (resolved === 'pdf') {\n return (\n <iframe\n src={src}\n title={path}\n data-testid={testId}\n data-kind={resolved}\n className={cn(FRAME, 'h-[36rem] w-full', className)}\n />\n );\n }\n return (\n <Badge\n asChild\n size=\"md\"\n data-testid={testId}\n data-kind={resolved}\n className={cn('self-start bg-doom-panel text-doom-text hover:border-doom-blue/50', className)}\n >\n <a href={src} download={name}>\n <FileIcon className=\"h-3 w-3 shrink-0 text-doom-faint\" />\n download {name}\n </a>\n </Badge>\n );\n}\n"],"mappings":"sNA2BA,MAAM,EAAQ,4DAEd,SAAgB,EAAa,CAAE,MAAK,OAAM,OAAM,YAAW,cAAe,GAA6B,CACrG,IAAM,EAAW,GAAQ,EAAY,CAAI,EACnC,EAAO,EAAK,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE,GAAK,EAkCvC,OAhCI,IAAa,QAEb,EAAC,IAAD,CAAG,KAAM,EAAK,OAAO,SAAS,IAAI,aAAa,cAAa,EAAQ,YAAW,EAC7E,SAAA,EAAC,MAAD,CAAU,MAAK,IAAK,EAAM,UAAW,EAAG,EAAO,gBAAiB,CAAS,CAAI,CAAA,CAC5E,CAAA,EAGH,IAAa,QAEb,EAAC,QAAD,CACO,MACL,SAAA,GACA,QAAQ,WACR,cAAa,EACb,YAAW,EACX,UAAW,EAAG,EAAO,gBAAiB,CAAS,EAE/C,SAAA,EAAC,QAAD,CAAO,KAAK,UAAY,CAAA,CACnB,CAAA,EAGP,IAAa,MAEb,EAAC,SAAD,CACO,MACL,MAAO,EACP,cAAa,EACb,YAAW,EACX,UAAW,EAAG,EAAO,mBAAoB,CAAS,CACnD,CAAA,EAIH,EAAC,EAAD,CACE,QAAA,GACA,KAAK,KACL,cAAa,EACb,YAAW,EACX,UAAW,EAAG,oEAAqE,CAAS,EAE5F,SAAA,EAAC,IAAD,CAAG,KAAM,EAAK,SAAU,EAAxB,SAAA,CACE,EAAC,EAAD,CAAU,UAAU,kCAAoC,CAAA,EAAC,YAC/C,CACT,GACE,CAAA,CAEX"}
@@ -33,7 +33,7 @@ interface MessageItemProps extends Omit<ComponentProps<'div'>, 'children'>, Vari
33
33
  /** Plain content, or a function of the item's state for a card that picks its lines by `expanded`. */
34
34
  children?: ReactNode | ((state: MessageItemState) => ReactNode);
35
35
  }
36
- declare function MessageItem({ className, tone, expandable, defaultExpanded, expanded, onExpandedChange, children, ...props }: MessageItemProps): import("react/jsx-runtime").JSX.Element;
36
+ declare function MessageItem({ className, tone, expandable, defaultExpanded, expanded, onExpandedChange, children, ...props }: MessageItemProps): import("react").JSX.Element;
37
37
  /** The tone a tool call's item wears: running while the tool runs, then its outcome. */
38
38
  declare function toolTone(state: {
39
39
  running: boolean;
@@ -50,9 +50,9 @@ interface MessageItemHeaderProps extends Omit<ComponentProps<'div'>, 'title'> {
50
50
  children?: ReactNode;
51
51
  }
52
52
  /** The title row: label, summary, the tone's badge, and the expand toggle when the item is expandable. */
53
- declare function MessageItemHeader({ className, title, badge, children, ...props }: MessageItemHeaderProps): import("react/jsx-runtime").JSX.Element;
53
+ declare function MessageItemHeader({ className, title, badge, children, ...props }: MessageItemHeaderProps): import("react").JSX.Element;
54
54
  /** The recessed body under the header. */
55
- declare function MessageItemBody({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
55
+ declare function MessageItemBody({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
56
56
  /** The glyph a tone reads as in a status line. */
57
57
  declare const STATUS_GLYPH: Readonly<Record<StatusTone, string>>;
58
58
  declare const messageItemStatusVariants: (props?: ({
@@ -65,7 +65,7 @@ interface MessageItemStatusProps extends ComponentProps<'span'>, VariantProps<ty
65
65
  expands?: boolean;
66
66
  }
67
67
  /** The one-line status under a body: `◐ running`, `✗ failed`, `✓ done`, or the hint that more is hidden. */
68
- declare function MessageItemStatus({ className, tone, glyph, expands, children, ...props }: MessageItemStatusProps): import("react/jsx-runtime").JSX.Element;
68
+ declare function MessageItemStatus({ className, tone, glyph, expands, children, ...props }: MessageItemStatusProps): import("react").JSX.Element;
69
69
  //#endregion
70
70
  export { MessageItem, MessageItemBody, MessageItemHeader, MessageItemHeaderProps, MessageItemProps, MessageItemState, MessageItemStatus, MessageItemStatusProps, STATUS_GLYPH, STATUS_LABEL, messageItemStatusVariants, messageItemVariants, toolTone, useMessageItem };
71
71
  //# sourceMappingURL=MessageItem.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageItem.d.mts","names":[],"sources":["../../../src/components/MessageItem.tsx"],"mappings":";;;;;;;;;;;;UAgBiB;EACf,MAAM;;EAEN;EACA;EACA;;;iBAWc,kBAAkB;;cAKrB,sBAAmB;;6CAG9B;UAEe,yBACP,KAAK,oCAAoC,oBAAoB;;EAErE;EACA;;EAEA;EACA,oBAAoB;;EAEpB,WAAW,cAAc,OAAO,qBAAqB;;iBAGvC,cACd,WACA,MACA,YACA,iBACA,UACA,kBACA,aACG,SACF,+CAAgB,IAAA;;iBA4BH,SAAS;EAAS;EAAkB;IAAqB;;cAK5D,cAAc,SAAS,OAAO;UAS1B,+BAA+B,KAAK;;EAEnD,OAAO;;EAEP,QAAQ;;EAER,WAAW;;;iBAIG,oBAAoB,WAAW,OAAO,OAAO,aAAa,SAAS,qDAAsB,IAAA;;iBAoCzF,kBAAkB,cAAc,SAAS,oDAAqB,IAAA;;cAWjE,cAAc,SAAS,OAAO;cAS9B,4BAAyB;;6CAYpC;UAEe,+BAA+B,wBAAwB,oBAAoB;;EAE1F;;EAEA;;;iBAIc,oBACd,WACA,MACA,OACA,SACA,aACG,SACF,qDAAsB,IAAA"}
1
+ {"version":3,"file":"MessageItem.d.mts","names":[],"sources":["../../../src/components/MessageItem.tsx"],"mappings":";;;;;;;;;;;;UAgBiB;EACf,MAAM;;EAEN;EACA;EACA;;;iBAWc,kBAAkB;;cAKrB,sBAAmB;;6CAG9B;UAEe,yBACP,KAAK,oCAAoC,oBAAoB;;EAErE;EACA;;EAEA;EACA,oBAAoB;;EAEpB,WAAW,cAAc,OAAO,qBAAqB;;iBAGvC,cACd,WACA,MACA,YACA,iBACA,UACA,kBACA,aACG,SACF,mCAAgB,IAAA;;iBA4BH,SAAS;EAAS;EAAkB;IAAqB;;cAK5D,cAAc,SAAS,OAAO;UAS1B,+BAA+B,KAAK;;EAEnD,OAAO;;EAEP,QAAQ;;EAER,WAAW;;;iBAIG,oBAAoB,WAAW,OAAO,OAAO,aAAa,SAAS,yCAAsB,IAAA;;iBAoCzF,kBAAkB,cAAc,SAAS,wCAAqB,IAAA;;cAWjE,cAAc,SAAS,OAAO;cAS9B,4BAAyB;;6CAYpC;UAEe,+BAA+B,wBAAwB,oBAAoB;;EAE1F;;EAEA;;;iBAIc,oBACd,WACA,MACA,OACA,SACA,aACG,SACF,yCAAsB,IAAA"}
@@ -18,7 +18,7 @@ interface MessageLinesProps extends ComponentProps<'div'> {
18
18
  lines: readonly MessageLine[];
19
19
  }
20
20
  /** A body of toned lines: what a card's view helper computed, drawn one line per row. */
21
- declare function MessageLines({ className, lines, ...props }: MessageLinesProps): import("react/jsx-runtime").JSX.Element;
21
+ declare function MessageLines({ className, lines, ...props }: MessageLinesProps): import("react").JSX.Element;
22
22
  //#endregion
23
23
  export { MessageLine, MessageLineTone, MessageLines, MessageLinesProps, messageLineVariants };
24
24
  //# sourceMappingURL=MessageLines.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"MessageLines.d.mts","names":[],"sources":["../../../src/components/MessageLines.tsx"],"mappings":";;;;KAMY,kBAAkB;UAEb;EACf;EACA,MAAM;EACN;EACA;;cAGW,sBAAmB;;;;6CAgB9B;UAEe,0BAA0B;EACzC,gBAAgB;;;iBAIF,eAAe,WAAW,UAAU,SAAS,gDAAiB,IAAA"}
1
+ {"version":3,"file":"MessageLines.d.mts","names":[],"sources":["../../../src/components/MessageLines.tsx"],"mappings":";;;;KAMY,kBAAkB;UAEb;EACf;EACA,MAAM;EACN;EACA;;cAGW,sBAAmB;;;;6CAgB9B;UAEe,0BAA0B;EACzC,gBAAgB;;;iBAIF,eAAe,WAAW,UAAU,SAAS,oCAAiB,IAAA"}
@@ -22,9 +22,9 @@ interface OptionRowProps extends ComponentProps<'button'>, VariantProps<typeof o
22
22
  * and a description side by side; OptionLabel is the single-string case.
23
23
  * `role="option"` means a row belongs inside a `listbox`.
24
24
  */
25
- declare function OptionRow({ className, density, active, marker, children, ...props }: OptionRowProps): import("react/jsx-runtime").JSX.Element;
25
+ declare function OptionRow({ className, density, active, marker, children, ...props }: OptionRowProps): import("react").JSX.Element;
26
26
  /** A row's single-string label: it takes the remaining width and clips or wraps by density. */
27
- declare function OptionLabel({ className, density, ...props }: ComponentProps<'span'> & VariantProps<typeof optionListVariants>): import("react/jsx-runtime").JSX.Element;
27
+ declare function OptionLabel({ className, density, ...props }: ComponentProps<'span'> & VariantProps<typeof optionListVariants>): import("react").JSX.Element;
28
28
  interface OptionListProps extends Omit<ComponentProps<'div'>, 'onSelect'>, VariantProps<typeof optionListVariants> {
29
29
  options: readonly string[];
30
30
  /** The highlighted row, owned by the surface so its own focused element can drive it. */
@@ -44,7 +44,7 @@ interface OptionListProps extends Omit<ComponentProps<'div'>, 'onSelect'>, Varia
44
44
  * a list would fight the library for it and break the escape and outside-click
45
45
  * behaviour that focus carries. Pair it with handleOptionListKey.
46
46
  */
47
- declare function OptionList({ className, options, cursor, onCursorChange, onSelect, testIdPrefix, density, ...props }: OptionListProps): import("react/jsx-runtime").JSX.Element;
47
+ declare function OptionList({ className, options, cursor, onCursorChange, onSelect, testIdPrefix, density, ...props }: OptionListProps): import("react").JSX.Element;
48
48
  //#endregion
49
49
  export { OptionLabel, OptionList, OptionListProps, OptionRow, OptionRowProps, optionListVariants, optionMarkerVariants, optionRowVariants };
50
50
  //# sourceMappingURL=OptionList.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"OptionList.d.mts","names":[],"sources":["../../../src/components/OptionList.tsx"],"mappings":";;;cAKa,qBAAkB;;6CAM7B;cAEW,oBAAiB;;;6CAc5B;cAEW,uBAAoB;;6CAQ/B;UAEe,uBAAuB,0BAA0B,oBAAoB;;EAEpF,SAAS;;;;;;;;;iBAUK,YAAY,WAAW,SAAS,QAAQ,QAAQ,aAAa,SAAS,6CAAc,IAAA;;iBAkBpF,cACd,WACA,YACG,SACF,yBAAyB,oBAAoB,kDAAmB,IAAA;UAclD,wBACP,KAAK,oCAAoC,oBAAoB;EACrE;;EAEA;EACA,iBAAiB;EACjB,WAAW;;EAEX;;;;;;;;;;;;iBAac,aACd,WACA,SACA,QACA,gBACA,UACA,cACA,YACG,SACF,8CAAe,IAAA"}
1
+ {"version":3,"file":"OptionList.d.mts","names":[],"sources":["../../../src/components/OptionList.tsx"],"mappings":";;;cAKa,qBAAkB;;6CAM7B;cAEW,oBAAiB;;;6CAc5B;cAEW,uBAAoB;;6CAQ/B;UAEe,uBAAuB,0BAA0B,oBAAoB;;EAEpF,SAAS;;;;;;;;;iBAUK,YAAY,WAAW,SAAS,QAAQ,QAAQ,aAAa,SAAS,iCAAc,IAAA;;iBAkBpF,cACd,WACA,YACG,SACF,yBAAyB,oBAAoB,sCAAmB,IAAA;UAclD,wBACP,KAAK,oCAAoC,oBAAoB;EACrE;;EAEA;EACA,iBAAiB;EACjB,WAAW;;EAEX;;;;;;;;;;;;iBAac,aACd,WACA,SACA,QACA,gBACA,UACA,cACA,YACG,SACF,kCAAe,IAAA"}
@@ -5,11 +5,11 @@ interface PanelProps extends ComponentProps<'div'> {
5
5
  asChild?: boolean;
6
6
  }
7
7
  /** The bordered card surface: a tool card, a run card, a provider row. */
8
- declare function Panel({ className, asChild, ...props }: PanelProps): import("react/jsx-runtime").JSX.Element;
8
+ declare function Panel({ className, asChild, ...props }: PanelProps): import("react").JSX.Element;
9
9
  /** A panel's title row. */
10
- declare function PanelHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
10
+ declare function PanelHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
11
11
  /** A panel's recessed body: the deep well the header sits above. */
12
- declare function PanelBody({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
12
+ declare function PanelBody({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
13
13
  //#endregion
14
14
  export { Panel, PanelBody, PanelHeader, PanelProps };
15
15
  //# sourceMappingURL=Panel.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Panel.d.mts","names":[],"sources":["../../../src/components/Panel.tsx"],"mappings":";;UAIiB,mBAAmB;;EAElC;;;iBAIc,QAAQ,WAAW,YAAoB,SAAS,yCAAU,IAAA;;iBAY1D,cAAc,cAAc,SAAS,oDAAqB,IAAA;;iBAO1D,YAAY,cAAc,SAAS,oDAAqB,IAAA"}
1
+ {"version":3,"file":"Panel.d.mts","names":[],"sources":["../../../src/components/Panel.tsx"],"mappings":";;UAIiB,mBAAmB;;EAElC;;;iBAIc,QAAQ,WAAW,YAAoB,SAAS,6BAAU,IAAA;;iBAY1D,cAAc,cAAc,SAAS,wCAAqB,IAAA;;iBAO1D,YAAY,cAAc,SAAS,wCAAqB,IAAA"}
@@ -5,15 +5,15 @@ import { ComponentProps } from "react";
5
5
  * shadcn's Popover on Radix: anchored to its trigger, closes on outside
6
6
  * click and Escape, and the trigger toggles it rather than reopening it.
7
7
  */
8
- declare function Popover$1(props: ComponentProps<typeof Popover.Root>): import("react/jsx-runtime").JSX.Element;
9
- declare function PopoverTrigger(props: ComponentProps<typeof Popover.Trigger>): import("react/jsx-runtime").JSX.Element;
10
- declare function PopoverAnchor(props: ComponentProps<typeof Popover.Anchor>): import("react/jsx-runtime").JSX.Element;
8
+ declare function Popover$1(props: ComponentProps<typeof Popover.Root>): import("react").JSX.Element;
9
+ declare function PopoverTrigger(props: ComponentProps<typeof Popover.Trigger>): import("react").JSX.Element;
10
+ declare function PopoverAnchor(props: ComponentProps<typeof Popover.Anchor>): import("react").JSX.Element;
11
11
  /** Dismisses the popover from inside it: the row that acts and closes in one click. */
12
- declare function PopoverClose(props: ComponentProps<typeof Popover.Close>): import("react/jsx-runtime").JSX.Element;
13
- declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof Popover.Content>): import("react/jsx-runtime").JSX.Element;
12
+ declare function PopoverClose(props: ComponentProps<typeof Popover.Close>): import("react").JSX.Element;
13
+ declare function PopoverContent({ className, align, sideOffset, ...props }: ComponentProps<typeof Popover.Content>): import("react").JSX.Element;
14
14
  /** The strip a popover's title sits in; tone colours the title. */
15
- declare function PopoverHeader({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
16
- declare function PopoverFooter({ className, ...props }: ComponentProps<'div'>): import("react/jsx-runtime").JSX.Element;
15
+ declare function PopoverHeader({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
16
+ declare function PopoverFooter({ className, ...props }: ComponentProps<'div'>): import("react").JSX.Element;
17
17
  //#endregion
18
18
  export { Popover$1 as Popover, PopoverAnchor, PopoverClose, PopoverContent, PopoverFooter, PopoverHeader, PopoverTrigger };
19
19
  //# sourceMappingURL=Popover.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Popover.d.mts","names":[],"sources":["../../../src/components/Popover.tsx"],"mappings":";;;;;;;iBAQgB,UAAQ,OAAO,sBAAsB,QAAiB,oCAAK,IAAA;iBAI3D,eAAe,OAAO,sBAAsB,QAAiB,uCAAQ,IAAA;iBAIrE,cAAc,OAAO,sBAAsB,QAAiB,sCAAO,IAAA;;iBAKnE,aAAa,OAAO,sBAAsB,QAAiB,qCAAM,IAAA;iBAIjE,iBACd,WACA,OACA,eACG,SACF,sBAAsB,QAAiB,uCAAQ,IAAA;;iBAkBlC,gBAAgB,cAAc,SAAS,oDAAqB,IAAA;iBAa5D,gBAAgB,cAAc,SAAS,oDAAqB,IAAA"}
1
+ {"version":3,"file":"Popover.d.mts","names":[],"sources":["../../../src/components/Popover.tsx"],"mappings":";;;;;;;iBAQgB,UAAQ,OAAO,sBAAsB,QAAiB,wBAAK,IAAA;iBAI3D,eAAe,OAAO,sBAAsB,QAAiB,2BAAQ,IAAA;iBAIrE,cAAc,OAAO,sBAAsB,QAAiB,0BAAO,IAAA;;iBAKnE,aAAa,OAAO,sBAAsB,QAAiB,yBAAM,IAAA;iBAIjE,iBACd,WACA,OACA,eACG,SACF,sBAAsB,QAAiB,2BAAQ,IAAA;;iBAkBlC,gBAAgB,cAAc,SAAS,wCAAqB,IAAA;iBAa5D,gBAAgB,cAAc,SAAS,wCAAqB,IAAA"}
@@ -2,7 +2,7 @@ import { Progress } from "radix-ui";
2
2
  import { ComponentProps } from "react";
3
3
  //#region src/components/Progress.d.ts
4
4
  /** A determinate bar; leave `value` undefined and Radix reports it as indeterminate. */
5
- declare function Progress$1({ className, value, ...props }: ComponentProps<typeof Progress.Root>): import("react/jsx-runtime").JSX.Element;
5
+ declare function Progress$1({ className, value, ...props }: ComponentProps<typeof Progress.Root>): import("react").JSX.Element;
6
6
  //#endregion
7
7
  export { Progress$1 as Progress };
8
8
  //# sourceMappingURL=Progress.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Progress.d.mts","names":[],"sources":["../../../src/components/Progress.tsx"],"mappings":";;;;iBAKgB,aAAW,WAAW,UAAU,SAAS,sBAAsB,SAAkB,oCAAK,IAAA"}
1
+ {"version":3,"file":"Progress.d.mts","names":[],"sources":["../../../src/components/Progress.tsx"],"mappings":";;;;iBAKgB,aAAW,WAAW,UAAU,SAAS,sBAAsB,SAAkB,wBAAK,IAAA"}
@@ -2,14 +2,14 @@ import { RadioGroup } from "radix-ui";
2
2
  import { ComponentProps } from "react";
3
3
  //#region src/components/RadioGroup.d.ts
4
4
  /** One choice out of several; Radix owns the arrow-key roving focus a native group has. */
5
- declare function RadioGroup$1({ className, ...props }: ComponentProps<typeof RadioGroup.Root>): import("react/jsx-runtime").JSX.Element;
6
- declare function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroup.Item>): import("react/jsx-runtime").JSX.Element;
5
+ declare function RadioGroup$1({ className, ...props }: ComponentProps<typeof RadioGroup.Root>): import("react").JSX.Element;
6
+ declare function RadioGroupItem({ className, ...props }: ComponentProps<typeof RadioGroup.Item>): import("react").JSX.Element;
7
7
  /**
8
8
  * A whole card that is one radio choice: the theme picker, where the target is
9
9
  * the preview rather than a dot. Radix keeps the roving focus and the checked
10
10
  * state; the card supplies the frame.
11
11
  */
12
- declare function RadioGroupCard({ className, ...props }: ComponentProps<typeof RadioGroup.Item>): import("react/jsx-runtime").JSX.Element;
12
+ declare function RadioGroupCard({ className, ...props }: ComponentProps<typeof RadioGroup.Item>): import("react").JSX.Element;
13
13
  //#endregion
14
14
  export { RadioGroup$1 as RadioGroup, RadioGroupCard, RadioGroupItem };
15
15
  //# sourceMappingURL=RadioGroup.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"RadioGroup.d.mts","names":[],"sources":["../../../src/components/RadioGroup.tsx"],"mappings":";;;;iBAKgB,eAAa,cAAc,SAAS,sBAAsB,WAAoB,oCAAK,IAAA;iBAMnF,iBAAiB,cAAc,SAAS,sBAAsB,WAAoB,oCAAK,IAAA;;;;;;iBAuBvF,iBAAiB,cAAc,SAAS,sBAAsB,WAAoB,oCAAK,IAAA"}
1
+ {"version":3,"file":"RadioGroup.d.mts","names":[],"sources":["../../../src/components/RadioGroup.tsx"],"mappings":";;;;iBAKgB,eAAa,cAAc,SAAS,sBAAsB,WAAoB,wBAAK,IAAA;iBAMnF,iBAAiB,cAAc,SAAS,sBAAsB,WAAoB,wBAAK,IAAA;;;;;;iBAuBvF,iBAAiB,cAAc,SAAS,sBAAsB,WAAoB,wBAAK,IAAA"}
@@ -6,8 +6,8 @@ import { ComponentProps } from "react";
6
6
  * the native scrollbar, so reach for this only where the bar must overlay the
7
7
  * content or sit inside a rounded surface that clips it.
8
8
  */
9
- declare function ScrollArea$1({ className, children, ...props }: ComponentProps<typeof ScrollArea.Root>): import("react/jsx-runtime").JSX.Element;
10
- declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollArea.ScrollAreaScrollbar>): import("react/jsx-runtime").JSX.Element;
9
+ declare function ScrollArea$1({ className, children, ...props }: ComponentProps<typeof ScrollArea.Root>): import("react").JSX.Element;
10
+ declare function ScrollBar({ className, orientation, ...props }: ComponentProps<typeof ScrollArea.ScrollAreaScrollbar>): import("react").JSX.Element;
11
11
  //#endregion
12
12
  export { ScrollArea$1 as ScrollArea, ScrollBar };
13
13
  //# sourceMappingURL=ScrollArea.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ScrollArea.d.mts","names":[],"sources":["../../../src/components/ScrollArea.tsx"],"mappings":";;;;;;;;iBASgB,eAAa,WAAW,aAAa,SAAS,sBAAsB,WAAoB,oCAAK,IAAA;iBAY7F,YACd,WACA,gBACG,SACF,sBAAsB,WAAoB,mDAAoB,IAAA"}
1
+ {"version":3,"file":"ScrollArea.d.mts","names":[],"sources":["../../../src/components/ScrollArea.tsx"],"mappings":";;;;;;;;iBASgB,eAAa,WAAW,aAAa,SAAS,sBAAsB,WAAoB,wBAAK,IAAA;iBAY7F,YACd,WACA,gBACG,SACF,sBAAsB,WAAoB,uCAAoB,IAAA"}
@@ -1,7 +1,7 @@
1
1
  import { ComponentProps } from "react";
2
2
  //#region src/components/SectionLabel.d.ts
3
3
  /** The tiny tracked-out caps that head every cockpit section (SESSIONS, ACTIVITY, MINOR MODES). */
4
- declare function SectionLabel({ className, ...props }: ComponentProps<'span'>): import("react/jsx-runtime").JSX.Element;
4
+ declare function SectionLabel({ className, ...props }: ComponentProps<'span'>): import("react").JSX.Element;
5
5
  //#endregion
6
6
  export { SectionLabel };
7
7
  //# sourceMappingURL=SectionLabel.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"SectionLabel.d.mts","names":[],"sources":["../../../src/components/SectionLabel.tsx"],"mappings":";;;iBAIgB,eAAe,cAAc,SAAS,qDAAsB,IAAA"}
1
+ {"version":3,"file":"SectionLabel.d.mts","names":[],"sources":["../../../src/components/SectionLabel.tsx"],"mappings":";;;iBAIgB,eAAe,cAAc,SAAS,yCAAsB,IAAA"}
@@ -6,14 +6,14 @@ import { ComponentProps } from "react";
6
6
  * native one cannot be styled to the palette on every platform, and the
7
7
  * cockpit's model and mode pickers need the same surface a popover has.
8
8
  */
9
- declare function Select$1(props: ComponentProps<typeof Select.Root>): import("react/jsx-runtime").JSX.Element;
10
- declare function SelectGroup(props: ComponentProps<typeof Select.Group>): import("react/jsx-runtime").JSX.Element;
11
- declare function SelectValue(props: ComponentProps<typeof Select.Value>): import("react/jsx-runtime").JSX.Element;
12
- declare function SelectTrigger({ className, children, ...props }: ComponentProps<typeof Select.Trigger>): import("react/jsx-runtime").JSX.Element;
13
- declare function SelectContent({ className, position, sideOffset, children, ...props }: ComponentProps<typeof Select.Content>): import("react/jsx-runtime").JSX.Element;
14
- declare function SelectLabel({ className, ...props }: ComponentProps<typeof Select.Label>): import("react/jsx-runtime").JSX.Element;
15
- declare function SelectItem({ className, children, ...props }: ComponentProps<typeof Select.Item>): import("react/jsx-runtime").JSX.Element;
16
- declare function SelectSeparator({ className, ...props }: ComponentProps<typeof Select.Separator>): import("react/jsx-runtime").JSX.Element;
9
+ declare function Select$1(props: ComponentProps<typeof Select.Root>): import("react").JSX.Element;
10
+ declare function SelectGroup(props: ComponentProps<typeof Select.Group>): import("react").JSX.Element;
11
+ declare function SelectValue(props: ComponentProps<typeof Select.Value>): import("react").JSX.Element;
12
+ declare function SelectTrigger({ className, children, ...props }: ComponentProps<typeof Select.Trigger>): import("react").JSX.Element;
13
+ declare function SelectContent({ className, position, sideOffset, children, ...props }: ComponentProps<typeof Select.Content>): import("react").JSX.Element;
14
+ declare function SelectLabel({ className, ...props }: ComponentProps<typeof Select.Label>): import("react").JSX.Element;
15
+ declare function SelectItem({ className, children, ...props }: ComponentProps<typeof Select.Item>): import("react").JSX.Element;
16
+ declare function SelectSeparator({ className, ...props }: ComponentProps<typeof Select.Separator>): import("react").JSX.Element;
17
17
  //#endregion
18
18
  export { Select$1 as Select, SelectContent, SelectGroup, SelectItem, SelectLabel, SelectSeparator, SelectTrigger, SelectValue };
19
19
  //# sourceMappingURL=Select.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Select.d.mts","names":[],"sources":["../../../src/components/Select.tsx"],"mappings":";;;;;;;;iBAUgB,SAAO,OAAO,sBAAsB,OAAgB,oCAAK,IAAA;iBAIzD,YAAY,OAAO,sBAAsB,OAAgB,qCAAM,IAAA;iBAI/D,YAAY,OAAO,sBAAsB,OAAgB,qCAAM,IAAA;iBAI/D,gBAAgB,WAAW,aAAa,SAAS,sBAAsB,OAAgB,uCAAQ,IAAA;iBAkB/F,gBACd,WACA,UACA,YACA,aACG,SACF,sBAAsB,OAAgB,uCAAQ,IAAA;iBAmBjC,cAAc,cAAc,SAAS,sBAAsB,OAAgB,qCAAM,IAAA;iBAUjF,aAAa,WAAW,aAAa,SAAS,sBAAsB,OAAgB,oCAAK,IAAA;iBAoBzF,kBAAkB,cAAc,SAAS,sBAAsB,OAAgB,yCAAU,IAAA"}
1
+ {"version":3,"file":"Select.d.mts","names":[],"sources":["../../../src/components/Select.tsx"],"mappings":";;;;;;;;iBAUgB,SAAO,OAAO,sBAAsB,OAAgB,wBAAK,IAAA;iBAIzD,YAAY,OAAO,sBAAsB,OAAgB,yBAAM,IAAA;iBAI/D,YAAY,OAAO,sBAAsB,OAAgB,yBAAM,IAAA;iBAI/D,gBAAgB,WAAW,aAAa,SAAS,sBAAsB,OAAgB,2BAAQ,IAAA;iBAkB/F,gBACd,WACA,UACA,YACA,aACG,SACF,sBAAsB,OAAgB,2BAAQ,IAAA;iBAmBjC,cAAc,cAAc,SAAS,sBAAsB,OAAgB,yBAAM,IAAA;iBAUjF,aAAa,WAAW,aAAa,SAAS,sBAAsB,OAAgB,wBAAK,IAAA;iBAoBzF,kBAAkB,cAAc,SAAS,sBAAsB,OAAgB,6BAAU,IAAA"}
@@ -7,7 +7,7 @@ import { ComponentProps } from "react";
7
7
  * separator role, and either way the element carries `data-orientation` so a
8
8
  * consumer can style around it the way it does every other primitive.
9
9
  */
10
- declare function Separator$1({ className, orientation, decorative, ...props }: ComponentProps<typeof Separator.Root>): import("react/jsx-runtime").JSX.Element;
10
+ declare function Separator$1({ className, orientation, decorative, ...props }: ComponentProps<typeof Separator.Root>): import("react").JSX.Element;
11
11
  //#endregion
12
12
  export { Separator$1 as Separator };
13
13
  //# sourceMappingURL=Separator.d.mts.map
@@ -1 +1 @@
1
- {"version":3,"file":"Separator.d.mts","names":[],"sources":["../../../src/components/Separator.tsx"],"mappings":";;;;;;;;;iBAUgB,cACd,WACA,aACA,eACG,SACF,sBAAsB,UAAmB,oCAAK,IAAA"}
1
+ {"version":3,"file":"Separator.d.mts","names":[],"sources":["../../../src/components/Separator.tsx"],"mappings":";;;;;;;;;iBAUgB,cACd,WACA,aACA,eACG,SACF,sBAAsB,UAAmB,wBAAK,IAAA"}
@@ -0,0 +1,2 @@
1
+ require("../icons/icons.cjs");const e=require("../lib/cn.cjs"),t=require("./Button.cjs");let n=require("radix-ui"),r=require("react/jsx-runtime"),i=require("lucide-react");function a(e){return(0,r.jsx)(n.Dialog.Root,{"data-slot":`sheet`,...e})}function o(e){return(0,r.jsx)(n.Dialog.Trigger,{"data-slot":`sheet-trigger`,...e})}function s(e){return(0,r.jsx)(n.Dialog.Close,{"data-slot":`sheet-close`,...e})}function c({className:t,...i}){return(0,r.jsx)(n.Dialog.Overlay,{"data-slot":`sheet-overlay`,className:e.cn(`fixed inset-0 z-40 bg-doom-deep/70 data-[state=open]:animate-doom-fade`,t),...i})}const l={right:`inset-y-0 right-0 border-l data-[state=open]:animate-doom-slide-right`,left:`inset-y-0 left-0 border-r data-[state=open]:animate-doom-slide-left`},u={sm:`w-[360px]`,md:`w-[440px]`,lg:`w-[560px]`};function d({className:t,children:i,side:a=`right`,width:o=`md`,...s}){return(0,r.jsxs)(n.Dialog.Portal,{children:[(0,r.jsx)(c,{}),(0,r.jsx)(n.Dialog.Content,{"data-slot":`sheet-content`,"data-side":a,className:e.cn(`fixed z-50 flex max-w-[calc(100vw-24px)] flex-col overflow-hidden border-doom-border bg-doom-rail font-mono shadow-2xl outline-none`,l[a],u[o],t),...s,children:i})]})}function f({className:a,dismissible:o=!0,closeLabel:s=`close`,children:c,...l}){return(0,r.jsxs)(`div`,{"data-slot":`sheet-header`,className:e.cn(`flex h-11 min-w-0 shrink-0 items-center gap-2.5 border-b border-doom-border px-4`,a),...l,children:[c,o?(0,r.jsx)(n.Dialog.Close,{asChild:!0,children:(0,r.jsx)(t.Button,{variant:`ghost`,size:`icon`,"aria-label":s,className:`text-doom-faint hover:text-doom-hi`,children:(0,r.jsx)(i.X,{className:`h-3 w-3`})})}):null]})}function p({className:t,...i}){return(0,r.jsx)(n.Dialog.Title,{"data-slot":`sheet-title`,className:e.cn(`truncate text-[13px] font-bold text-doom-hi`,t),...i})}function m({className:t,...i}){return(0,r.jsx)(n.Dialog.Description,{"data-slot":`sheet-description`,className:e.cn(`text-[11px] leading-relaxed text-doom-dim`,t),...i})}function h({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`sheet-body`,className:e.cn(`flex min-h-0 flex-1 flex-col gap-3 overflow-y-auto px-4 py-3`,t),...n})}function g({className:t,...n}){return(0,r.jsx)(`div`,{"data-slot":`sheet-footer`,className:e.cn(`flex min-h-[34px] shrink-0 flex-wrap items-center justify-between gap-2 border-t border-doom-border-soft bg-doom-deep px-4 py-1.5`,t),...n})}exports.Sheet=a,exports.SheetBody=h,exports.SheetClose=s,exports.SheetContent=d,exports.SheetDescription=m,exports.SheetFooter=g,exports.SheetHeader=f,exports.SheetOverlay=c,exports.SheetTitle=p,exports.SheetTrigger=o;
2
+ //# sourceMappingURL=Sheet.cjs.map