@nibapp/ui 0.0.0-stage → 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (292) hide show
  1. package/CHANGELOG.md +35 -0
  2. package/LICENSE +21 -0
  3. package/README.md +124 -2
  4. package/TRADEMARKS.md +22 -0
  5. package/dist/_bundled/money/index.d.ts +98 -0
  6. package/dist/_bundled/money/index.js +152 -0
  7. package/dist/_bundled/tokens/index.d.ts +2 -0
  8. package/dist/_bundled/tokens/index.js +2 -0
  9. package/dist/_bundled/tokens/palette.gen.d.ts +51 -0
  10. package/dist/_bundled/tokens/palette.gen.js +206 -0
  11. package/dist/_bundled/tokens/spec.d.ts +291 -0
  12. package/dist/_bundled/tokens/spec.js +221 -0
  13. package/dist/components/accordion.d.ts +27 -0
  14. package/dist/components/accordion.js +66 -0
  15. package/dist/components/alert-dialog.d.ts +59 -0
  16. package/dist/components/alert-dialog.js +82 -0
  17. package/dist/components/alert.d.ts +141 -0
  18. package/dist/components/alert.js +55 -0
  19. package/dist/components/appear.d.ts +21 -0
  20. package/dist/components/appear.js +42 -0
  21. package/dist/components/avatar.d.ts +196 -0
  22. package/dist/components/avatar.js +135 -0
  23. package/dist/components/badge.d.ts +183 -0
  24. package/dist/components/badge.js +68 -0
  25. package/dist/components/block-stack.d.ts +33 -0
  26. package/dist/components/block-stack.js +197 -0
  27. package/dist/components/button.d.ts +327 -0
  28. package/dist/components/button.js +101 -0
  29. package/dist/components/card.d.ts +131 -0
  30. package/dist/components/card.js +100 -0
  31. package/dist/components/checkbox.d.ts +34 -0
  32. package/dist/components/checkbox.js +37 -0
  33. package/dist/components/choice-row.d.ts +104 -0
  34. package/dist/components/choice-row.js +56 -0
  35. package/dist/components/clamped-text.d.ts +17 -0
  36. package/dist/components/clamped-text.js +47 -0
  37. package/dist/components/code-block.d.ts +48 -0
  38. package/dist/components/code-block.js +124 -0
  39. package/dist/components/code-input.d.ts +49 -0
  40. package/dist/components/code-input.js +59 -0
  41. package/dist/components/combobox.d.ts +194 -0
  42. package/dist/components/combobox.js +176 -0
  43. package/dist/components/command-palette.d.ts +57 -0
  44. package/dist/components/command-palette.js +83 -0
  45. package/dist/components/context-menu.d.ts +24 -0
  46. package/dist/components/context-menu.js +30 -0
  47. package/dist/components/copy-button.d.ts +9 -0
  48. package/dist/components/copy-button.js +20 -0
  49. package/dist/components/copy-command.d.ts +18 -0
  50. package/dist/components/copy-command.js +19 -0
  51. package/dist/components/data-table.d.ts +240 -0
  52. package/dist/components/data-table.js +63 -0
  53. package/dist/components/dialog.d.ts +80 -0
  54. package/dist/components/dialog.js +85 -0
  55. package/dist/components/diff-lines.d.ts +20 -0
  56. package/dist/components/diff-lines.js +10 -0
  57. package/dist/components/diff-view.d.ts +128 -0
  58. package/dist/components/diff-view.js +675 -0
  59. package/dist/components/disclosure.d.ts +33 -0
  60. package/dist/components/disclosure.js +51 -0
  61. package/dist/components/drawn-check.d.ts +8 -0
  62. package/dist/components/drawn-check.js +16 -0
  63. package/dist/components/edge-resizer.d.ts +26 -0
  64. package/dist/components/edge-resizer.js +53 -0
  65. package/dist/components/empty-state.d.ts +112 -0
  66. package/dist/components/empty-state.js +56 -0
  67. package/dist/components/expand-toggle.d.ts +19 -0
  68. package/dist/components/expand-toggle.js +10 -0
  69. package/dist/components/field.d.ts +48 -0
  70. package/dist/components/field.js +60 -0
  71. package/dist/components/filter-chip.d.ts +47 -0
  72. package/dist/components/filter-chip.js +33 -0
  73. package/dist/components/group.d.ts +10 -0
  74. package/dist/components/group.js +9 -0
  75. package/dist/components/icon-text.d.ts +11 -0
  76. package/dist/components/icon-text.js +10 -0
  77. package/dist/components/image-sources.d.ts +57 -0
  78. package/dist/components/image-sources.js +58 -0
  79. package/dist/components/image-thumbnail.d.ts +34 -0
  80. package/dist/components/image-thumbnail.js +58 -0
  81. package/dist/components/image-viewer.d.ts +60 -0
  82. package/dist/components/image-viewer.js +411 -0
  83. package/dist/components/inline-edit.d.ts +22 -0
  84. package/dist/components/inline-edit.js +51 -0
  85. package/dist/components/input.d.ts +155 -0
  86. package/dist/components/input.js +109 -0
  87. package/dist/components/item-label.d.ts +11 -0
  88. package/dist/components/item-label.js +5 -0
  89. package/dist/components/item-row.d.ts +23 -0
  90. package/dist/components/item-row.js +19 -0
  91. package/dist/components/kbd.d.ts +55 -0
  92. package/dist/components/kbd.js +86 -0
  93. package/dist/components/link-policy.d.ts +24 -0
  94. package/dist/components/link-policy.js +32 -0
  95. package/dist/components/linked-text.d.ts +15 -0
  96. package/dist/components/linked-text.js +48 -0
  97. package/dist/components/loading-region.d.ts +18 -0
  98. package/dist/components/loading-region.js +17 -0
  99. package/dist/components/markdown.d.ts +34 -0
  100. package/dist/components/markdown.js +307 -0
  101. package/dist/components/menu.d.ts +132 -0
  102. package/dist/components/menu.js +102 -0
  103. package/dist/components/message-bubble.d.ts +57 -0
  104. package/dist/components/message-bubble.js +28 -0
  105. package/dist/components/meta-line.d.ts +28 -0
  106. package/dist/components/meta-line.js +36 -0
  107. package/dist/components/money-input.d.ts +23 -0
  108. package/dist/components/money-input.js +34 -0
  109. package/dist/components/native-select.d.ts +120 -0
  110. package/dist/components/native-select.js +85 -0
  111. package/dist/components/page-trail.d.ts +30 -0
  112. package/dist/components/page-trail.js +43 -0
  113. package/dist/components/page.d.ts +80 -0
  114. package/dist/components/page.js +60 -0
  115. package/dist/components/path-text.d.ts +8 -0
  116. package/dist/components/path-text.js +11 -0
  117. package/dist/components/percent-input.d.ts +20 -0
  118. package/dist/components/percent-input.js +32 -0
  119. package/dist/components/popover.d.ts +52 -0
  120. package/dist/components/popover.js +36 -0
  121. package/dist/components/progress.d.ts +389 -0
  122. package/dist/components/progress.js +142 -0
  123. package/dist/components/radio.d.ts +65 -0
  124. package/dist/components/radio.js +54 -0
  125. package/dist/components/remote-image-gate.d.ts +34 -0
  126. package/dist/components/remote-image-gate.js +60 -0
  127. package/dist/components/resizable.d.ts +23 -0
  128. package/dist/components/resizable.js +30 -0
  129. package/dist/components/rolling-number.d.ts +13 -0
  130. package/dist/components/rolling-number.js +69 -0
  131. package/dist/components/scroll-area.d.ts +17 -0
  132. package/dist/components/scroll-area.js +25 -0
  133. package/dist/components/section-label.d.ts +10 -0
  134. package/dist/components/section-label.js +21 -0
  135. package/dist/components/section-nav.d.ts +22 -0
  136. package/dist/components/section-nav.js +80 -0
  137. package/dist/components/segmented-control.d.ts +125 -0
  138. package/dist/components/segmented-control.js +101 -0
  139. package/dist/components/select.d.ts +120 -0
  140. package/dist/components/select.js +89 -0
  141. package/dist/components/separator.d.ts +10 -0
  142. package/dist/components/separator.js +12 -0
  143. package/dist/components/sheet.d.ts +101 -0
  144. package/dist/components/sheet.js +129 -0
  145. package/dist/components/shortcut-recorder.d.ts +31 -0
  146. package/dist/components/shortcut-recorder.js +67 -0
  147. package/dist/components/skeleton.d.ts +31 -0
  148. package/dist/components/skeleton.js +33 -0
  149. package/dist/components/slider.d.ts +138 -0
  150. package/dist/components/slider.js +98 -0
  151. package/dist/components/spinner.d.ts +37 -0
  152. package/dist/components/spinner.js +16 -0
  153. package/dist/components/switch.d.ts +59 -0
  154. package/dist/components/switch.js +56 -0
  155. package/dist/components/tab-strip.d.ts +29 -0
  156. package/dist/components/tab-strip.js +42 -0
  157. package/dist/components/tabs.d.ts +13 -0
  158. package/dist/components/tabs.js +68 -0
  159. package/dist/components/text-link.d.ts +54 -0
  160. package/dist/components/text-link.js +38 -0
  161. package/dist/components/textarea.d.ts +75 -0
  162. package/dist/components/textarea.js +90 -0
  163. package/dist/components/toast.d.ts +74 -0
  164. package/dist/components/toast.js +128 -0
  165. package/dist/components/tooltip.d.ts +50 -0
  166. package/dist/components/tooltip.js +46 -0
  167. package/dist/components/truncated-text.d.ts +15 -0
  168. package/dist/components/truncated-text.js +19 -0
  169. package/dist/i18n/defaults.d.ts +7 -0
  170. package/dist/i18n/defaults.js +7 -0
  171. package/dist/i18n/format.d.ts +84 -0
  172. package/dist/i18n/format.js +169 -0
  173. package/dist/i18n/index.d.ts +6 -0
  174. package/dist/i18n/index.js +8 -0
  175. package/dist/i18n/locales/ru-formatters.d.ts +3 -0
  176. package/dist/i18n/locales/ru-formatters.js +22 -0
  177. package/dist/i18n/locales/ru.d.ts +5 -0
  178. package/dist/i18n/locales/ru.js +185 -0
  179. package/dist/i18n/plural.d.ts +20 -0
  180. package/dist/i18n/plural.js +26 -0
  181. package/dist/i18n/provider.d.ts +36 -0
  182. package/dist/i18n/provider.js +39 -0
  183. package/dist/i18n/rich.d.ts +14 -0
  184. package/dist/i18n/rich.js +44 -0
  185. package/dist/i18n/ru-plural.d.ts +3 -0
  186. package/dist/i18n/ru-plural.js +4 -0
  187. package/dist/i18n/strings/alert-dialog.d.ts +5 -0
  188. package/dist/i18n/strings/alert-dialog.js +5 -0
  189. package/dist/i18n/strings/block-stack.d.ts +17 -0
  190. package/dist/i18n/strings/block-stack.js +11 -0
  191. package/dist/i18n/strings/code-block.d.ts +18 -0
  192. package/dist/i18n/strings/code-block.js +13 -0
  193. package/dist/i18n/strings/combobox.d.ts +12 -0
  194. package/dist/i18n/strings/combobox.js +10 -0
  195. package/dist/i18n/strings/command-palette.d.ts +17 -0
  196. package/dist/i18n/strings/command-palette.js +11 -0
  197. package/dist/i18n/strings/diff-view.d.ts +92 -0
  198. package/dist/i18n/strings/diff-view.js +68 -0
  199. package/dist/i18n/strings/image-viewer.d.ts +43 -0
  200. package/dist/i18n/strings/image-viewer.js +32 -0
  201. package/dist/i18n/strings/index.d.ts +314 -0
  202. package/dist/i18n/strings/index.js +43 -0
  203. package/dist/i18n/strings/kbd.d.ts +42 -0
  204. package/dist/i18n/strings/kbd.js +39 -0
  205. package/dist/i18n/strings/markdown.d.ts +23 -0
  206. package/dist/i18n/strings/markdown.js +18 -0
  207. package/dist/i18n/strings/money.d.ts +7 -0
  208. package/dist/i18n/strings/money.js +5 -0
  209. package/dist/i18n/strings/primitives.d.ts +25 -0
  210. package/dist/i18n/strings/primitives.js +18 -0
  211. package/dist/i18n/strings/progress.d.ts +4 -0
  212. package/dist/i18n/strings/progress.js +4 -0
  213. package/dist/i18n/strings/shortcut-recorder.d.ts +15 -0
  214. package/dist/i18n/strings/shortcut-recorder.js +11 -0
  215. package/dist/i18n/strings/time.d.ts +41 -0
  216. package/dist/i18n/strings/time.js +20 -0
  217. package/dist/i18n/strings/toast.d.ts +6 -0
  218. package/dist/i18n/strings/toast.js +6 -0
  219. package/dist/i18n/time-zones.d.ts +20 -0
  220. package/dist/i18n/time-zones.js +64 -0
  221. package/dist/index.d.ts +84 -0
  222. package/dist/index.js +88 -0
  223. package/dist/lib/ansi.d.ts +55 -0
  224. package/dist/lib/ansi.js +438 -0
  225. package/dist/lib/clock.d.ts +32 -0
  226. package/dist/lib/clock.js +106 -0
  227. package/dist/lib/cn.d.ts +12 -0
  228. package/dist/lib/cn.js +28 -0
  229. package/dist/lib/control-props.d.ts +21 -0
  230. package/dist/lib/control-props.js +14 -0
  231. package/dist/lib/direction.d.ts +13 -0
  232. package/dist/lib/direction.js +25 -0
  233. package/dist/lib/image-size.d.ts +12 -0
  234. package/dist/lib/image-size.js +66 -0
  235. package/dist/lib/keycaps.d.ts +21 -0
  236. package/dist/lib/keycaps.js +62 -0
  237. package/dist/lib/keyed.d.ts +9 -0
  238. package/dist/lib/keyed.js +14 -0
  239. package/dist/lib/keys.d.ts +49 -0
  240. package/dist/lib/keys.js +159 -0
  241. package/dist/lib/kit-motion.d.ts +9 -0
  242. package/dist/lib/kit-motion.js +12 -0
  243. package/dist/lib/link-check-dialog.d.ts +11 -0
  244. package/dist/lib/link-check-dialog.js +18 -0
  245. package/dist/lib/motion-features.d.ts +1 -0
  246. package/dist/lib/motion-features.js +4 -0
  247. package/dist/lib/motion-provider.d.ts +5 -0
  248. package/dist/lib/motion-provider.js +8 -0
  249. package/dist/lib/motion.d.ts +39 -0
  250. package/dist/lib/motion.js +49 -0
  251. package/dist/lib/number-format.d.ts +114 -0
  252. package/dist/lib/number-format.js +313 -0
  253. package/dist/lib/patch.d.ts +72 -0
  254. package/dist/lib/patch.js +344 -0
  255. package/dist/lib/path.d.ts +34 -0
  256. package/dist/lib/path.js +85 -0
  257. package/dist/lib/search.d.ts +10 -0
  258. package/dist/lib/search.js +20 -0
  259. package/dist/lib/shiki-themes.d.ts +7 -0
  260. package/dist/lib/shiki-themes.js +115 -0
  261. package/dist/lib/shiki.d.ts +101 -0
  262. package/dist/lib/shiki.js +353 -0
  263. package/dist/lib/shortcut-context.d.ts +23 -0
  264. package/dist/lib/shortcut-context.js +29 -0
  265. package/dist/lib/text.d.ts +56 -0
  266. package/dist/lib/text.js +149 -0
  267. package/dist/lib/theme-scope.d.ts +18 -0
  268. package/dist/lib/theme-scope.js +24 -0
  269. package/dist/lib/theme.d.ts +40 -0
  270. package/dist/lib/theme.js +96 -0
  271. package/dist/lib/tree-keys.d.ts +72 -0
  272. package/dist/lib/tree-keys.js +126 -0
  273. package/dist/lib/url.d.ts +17 -0
  274. package/dist/lib/url.js +38 -0
  275. package/dist/lib/use-copy-to-clipboard.d.ts +13 -0
  276. package/dist/lib/use-copy-to-clipboard.js +40 -0
  277. package/dist/lib/use-delayed-loading.d.ts +11 -0
  278. package/dist/lib/use-delayed-loading.js +31 -0
  279. package/dist/lib/use-file-picker.d.ts +26 -0
  280. package/dist/lib/use-file-picker.js +43 -0
  281. package/dist/lib/use-hydrated.d.ts +6 -0
  282. package/dist/lib/use-hydrated.js +11 -0
  283. package/dist/lib/use-latest.d.ts +12 -0
  284. package/dist/lib/use-latest.js +22 -0
  285. package/dist/lib/use-resolved-theme.d.ts +12 -0
  286. package/dist/lib/use-resolved-theme.js +25 -0
  287. package/dist/styles/base.css +393 -0
  288. package/dist/styles/code.css +35 -0
  289. package/dist/styles/fonts.css +12 -0
  290. package/dist/styles/index.css +13 -0
  291. package/dist/styles/tokens.gen.css +494 -0
  292. package/package.json +208 -4
@@ -0,0 +1,131 @@
1
+ import { useRender } from "@base-ui/react/use-render";
2
+ import type { ComponentProps } from "react";
3
+ import { type VariantProps } from "../lib/cn.js";
4
+ export declare const cardStyles: import("tailwind-variants").TVReturnType<{
5
+ variant: {
6
+ /** Default container: surface + hairline + whisper of shadow. */
7
+ surface: "border border-border bg-surface shadow-xs";
8
+ /**
9
+ * Quieter: a fainter hairline and no shadow, for lists and notes set into a page (a settings
10
+ * list, a usage summary, a notice). Usually `size="flush"`, `divided` for rows.
11
+ */
12
+ subtle: "border border-border-subtle bg-surface";
13
+ /** Structure without chrome — groups content on an existing surface. */
14
+ ghost: "border border-transparent [--avatar-ring:var(--bg)]";
15
+ /**
16
+ * Sunken into the surface it sits on: a quoted message, a preview, a plan's step or a field's
17
+ * note inside a card or a drawer. Usually `size="sm"` or `flush` with the content's padding.
18
+ */
19
+ inset: "border border-border-subtle bg-bg-subtle [--avatar-ring:var(--bg-subtle)]";
20
+ /** Clickable tile: lifts on hover. Render as <a>/<button> via `render`. */
21
+ interactive: string[];
22
+ };
23
+ size: {
24
+ sm: "gap-2.5 py-3";
25
+ md: "gap-4 py-4";
26
+ /**
27
+ * No padding or gap of its own: the card frames full-width rows (with `divided`), or one
28
+ * block the caller lays out and pads (a form, a stat, a checkbox).
29
+ */
30
+ flush: "";
31
+ };
32
+ /** A hairline between the card's children: a list of rows (settings, accounts, devices). */
33
+ divided: {
34
+ true: "divide-y divide-border-subtle";
35
+ };
36
+ }, undefined, "group/card relative flex flex-col rounded-xl text-fg [--avatar-ring:var(--surface)]", {
37
+ variant: {
38
+ /** Default container: surface + hairline + whisper of shadow. */
39
+ surface: "border border-border bg-surface shadow-xs";
40
+ /**
41
+ * Quieter: a fainter hairline and no shadow, for lists and notes set into a page (a settings
42
+ * list, a usage summary, a notice). Usually `size="flush"`, `divided` for rows.
43
+ */
44
+ subtle: "border border-border-subtle bg-surface";
45
+ /** Structure without chrome — groups content on an existing surface. */
46
+ ghost: "border border-transparent [--avatar-ring:var(--bg)]";
47
+ /**
48
+ * Sunken into the surface it sits on: a quoted message, a preview, a plan's step or a field's
49
+ * note inside a card or a drawer. Usually `size="sm"` or `flush` with the content's padding.
50
+ */
51
+ inset: "border border-border-subtle bg-bg-subtle [--avatar-ring:var(--bg-subtle)]";
52
+ /** Clickable tile: lifts on hover. Render as <a>/<button> via `render`. */
53
+ interactive: string[];
54
+ };
55
+ size: {
56
+ sm: "gap-2.5 py-3";
57
+ md: "gap-4 py-4";
58
+ /**
59
+ * No padding or gap of its own: the card frames full-width rows (with `divided`), or one
60
+ * block the caller lays out and pads (a form, a stat, a checkbox).
61
+ */
62
+ flush: "";
63
+ };
64
+ /** A hairline between the card's children: a list of rows (settings, accounts, devices). */
65
+ divided: {
66
+ true: "divide-y divide-border-subtle";
67
+ };
68
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
69
+ variant: {
70
+ /** Default container: surface + hairline + whisper of shadow. */
71
+ surface: "border border-border bg-surface shadow-xs";
72
+ /**
73
+ * Quieter: a fainter hairline and no shadow, for lists and notes set into a page (a settings
74
+ * list, a usage summary, a notice). Usually `size="flush"`, `divided` for rows.
75
+ */
76
+ subtle: "border border-border-subtle bg-surface";
77
+ /** Structure without chrome — groups content on an existing surface. */
78
+ ghost: "border border-transparent [--avatar-ring:var(--bg)]";
79
+ /**
80
+ * Sunken into the surface it sits on: a quoted message, a preview, a plan's step or a field's
81
+ * note inside a card or a drawer. Usually `size="sm"` or `flush` with the content's padding.
82
+ */
83
+ inset: "border border-border-subtle bg-bg-subtle [--avatar-ring:var(--bg-subtle)]";
84
+ /** Clickable tile: lifts on hover. Render as <a>/<button> via `render`. */
85
+ interactive: string[];
86
+ };
87
+ size: {
88
+ sm: "gap-2.5 py-3";
89
+ md: "gap-4 py-4";
90
+ /**
91
+ * No padding or gap of its own: the card frames full-width rows (with `divided`), or one
92
+ * block the caller lays out and pads (a form, a stat, a checkbox).
93
+ */
94
+ flush: "";
95
+ };
96
+ /** A hairline between the card's children: a list of rows (settings, accounts, devices). */
97
+ divided: {
98
+ true: "divide-y divide-border-subtle";
99
+ };
100
+ }, undefined>>;
101
+ export type CardVariants = VariantProps<typeof cardStyles>;
102
+ export interface CardProps extends useRender.ComponentProps<"div">, CardVariants {
103
+ }
104
+ /**
105
+ * Container for grouped content. Compose with CardHeader / CardContent / CardFooter, or use
106
+ * `size="flush"` (with `divided` for rows) when the content brings its own padding. A kit part that
107
+ * draws a card on an element it already renders takes `cardStyles` instead.
108
+ */
109
+ export declare function Card({ variant, size, divided, className, render, ref, ...props }: CardProps): import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>>;
110
+ export declare function CardHeader({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
111
+ export declare function CardTitle({ className, ...props }: ComponentProps<"h3">): import("react").JSX.Element;
112
+ export declare function CardDescription({ className, ...props }: ComponentProps<"p">): import("react").JSX.Element;
113
+ /** Trailing slot in the header (a menu button, badge, …). Spans the title + description rows. */
114
+ export declare function CardAction({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
115
+ /**
116
+ * A button that covers its card beneath the card's own controls: the whole surface opens the item,
117
+ * while a menu or link drawn after it (positioned, above it) stays reachable. Its parent is positioned
118
+ * (`Card` is), and its `aria-label` names what it opens.
119
+ */
120
+ export declare function CardCoverButton({ className, ...props }: Omit<ComponentProps<"button">, "type">): import("react").JSX.Element;
121
+ export declare function CardContent({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
122
+ /**
123
+ * One padded row of a flush card (`size="flush"`, `divided` between rows): a setting, a field, a
124
+ * "Load more". The setting row's inset, 16 · 14; the row lays out its own content. An item with an icon, a name and a detail is an `ItemRow` (item-row.tsx).
125
+ */
126
+ export declare function CardRow({ className, ...props }: ComponentProps<"div">): import("react").JSX.Element;
127
+ export interface CardFooterProps extends ComponentProps<"div"> {
128
+ /** Hairline above the footer, for cards with a distinct action bar. */
129
+ divided?: boolean;
130
+ }
131
+ export declare function CardFooter({ divided, className, ...props }: CardFooterProps): import("react").JSX.Element;
@@ -0,0 +1,100 @@
1
+ "use client";
2
+ import { jsx as _jsx } from "react/jsx-runtime";
3
+ import { useRender } from "@base-ui/react/use-render";
4
+ import { cn, tv } from "../lib/cn.js";
5
+ export const cardStyles = tv({
6
+ base: "group/card relative flex flex-col rounded-xl text-fg [--avatar-ring:var(--surface)]",
7
+ variants: {
8
+ variant: {
9
+ /** Default container: surface + hairline + whisper of shadow. */
10
+ surface: "border border-border bg-surface shadow-xs",
11
+ /**
12
+ * Quieter: a fainter hairline and no shadow, for lists and notes set into a page (a settings
13
+ * list, a usage summary, a notice). Usually `size="flush"`, `divided` for rows.
14
+ */
15
+ subtle: "border border-border-subtle bg-surface",
16
+ /** Structure without chrome — groups content on an existing surface. */
17
+ ghost: "border border-transparent [--avatar-ring:var(--bg)]",
18
+ /**
19
+ * Sunken into the surface it sits on: a quoted message, a preview, a plan's step or a field's
20
+ * note inside a card or a drawer. Usually `size="sm"` or `flush` with the content's padding.
21
+ */
22
+ inset: "border border-border-subtle bg-bg-subtle [--avatar-ring:var(--bg-subtle)]",
23
+ /** Clickable tile: lifts on hover. Render as <a>/<button> via `render`. */
24
+ interactive: [
25
+ "border border-border bg-surface text-start shadow-xs outline-none",
26
+ "transition-[border-color,box-shadow,translate] duration-(--duration-fast) ease-(--ease-standard)",
27
+ "hover:-translate-y-px hover:border-border-strong hover:shadow-md",
28
+ "active:translate-y-0 active:shadow-xs",
29
+ "focus-visible:ring-focus",
30
+ "motion-reduce:transition-[border-color,box-shadow] motion-reduce:hover:translate-y-0",
31
+ "data-disabled:pointer-events-none data-disabled:opacity-45",
32
+ ],
33
+ },
34
+ size: {
35
+ sm: "gap-2.5 py-3",
36
+ md: "gap-4 py-4",
37
+ /**
38
+ * No padding or gap of its own: the card frames full-width rows (with `divided`), or one
39
+ * block the caller lays out and pads (a form, a stat, a checkbox).
40
+ */
41
+ flush: "",
42
+ },
43
+ /** A hairline between the card's children: a list of rows (settings, accounts, devices). */
44
+ divided: { true: "divide-y divide-border-subtle" },
45
+ },
46
+ defaultVariants: { variant: "surface", size: "md" },
47
+ });
48
+ /**
49
+ * Container for grouped content. Compose with CardHeader / CardContent / CardFooter, or use
50
+ * `size="flush"` (with `divided` for rows) when the content brings its own padding. A kit part that
51
+ * draws a card on an element it already renders takes `cardStyles` instead.
52
+ */
53
+ export function Card({ variant, size, divided, className, render, ref, ...props }) {
54
+ return useRender({
55
+ defaultTagName: "div",
56
+ render,
57
+ ref,
58
+ props: {
59
+ "data-slot": "card",
60
+ "data-size": size ?? "md",
61
+ className: cn(cardStyles({ variant, size, divided }), className),
62
+ ...props,
63
+ },
64
+ });
65
+ }
66
+ const sectionX = "px-4 group-data-[size=sm]/card:px-3";
67
+ export function CardHeader({ className, ...props }) {
68
+ return (_jsx("div", { "data-slot": "card-header", className: cn("grid auto-rows-min grid-cols-1 items-start gap-1", "has-data-[slot=card-action]:grid-cols-[1fr_auto]", sectionX, className), ...props }));
69
+ }
70
+ export function CardTitle({ className, ...props }) {
71
+ return (_jsx("h3", { "data-slot": "card-title", className: cn("text-md font-semibold leading-snug tracking-tight text-fg", className), ...props }));
72
+ }
73
+ export function CardDescription({ className, ...props }) {
74
+ return _jsx("p", { "data-slot": "card-description", className: cn("text-sm text-fg-muted", className), ...props });
75
+ }
76
+ /** Trailing slot in the header (a menu button, badge, …). Spans the title + description rows. */
77
+ export function CardAction({ className, ...props }) {
78
+ return (_jsx("div", { "data-slot": "card-action", className: cn("col-start-2 row-span-2 row-start-1 self-start justify-self-end", className), ...props }));
79
+ }
80
+ /**
81
+ * A button that covers its card beneath the card's own controls: the whole surface opens the item,
82
+ * while a menu or link drawn after it (positioned, above it) stays reachable. Its parent is positioned
83
+ * (`Card` is), and its `aria-label` names what it opens.
84
+ */
85
+ export function CardCoverButton({ className, ...props }) {
86
+ return (_jsx("button", { type: "button", "data-slot": "card-cover-button", className: cn("absolute inset-0 cursor-pointer rounded-xl outline-none focus-visible:ring-focus", className), ...props }));
87
+ }
88
+ export function CardContent({ className, ...props }) {
89
+ return _jsx("div", { "data-slot": "card-content", className: cn("text-base text-fg", sectionX, className), ...props });
90
+ }
91
+ /**
92
+ * One padded row of a flush card (`size="flush"`, `divided` between rows): a setting, a field, a
93
+ * "Load more". The setting row's inset, 16 · 14; the row lays out its own content. An item with an icon, a name and a detail is an `ItemRow` (item-row.tsx).
94
+ */
95
+ export function CardRow({ className, ...props }) {
96
+ return _jsx("div", { "data-slot": "card-row", className: cn("px-4 py-3.5", className), ...props });
97
+ }
98
+ export function CardFooter({ divided = false, className, ...props }) {
99
+ return (_jsx("div", { "data-slot": "card-footer", className: cn("flex items-center gap-2", sectionX, divided && "border-t border-border-subtle pt-3 group-data-[size=sm]/card:pt-2.5", className), ...props }));
100
+ }
@@ -0,0 +1,34 @@
1
+ import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
2
+ import { CheckboxGroup as BaseCheckboxGroup } from "@base-ui/react/checkbox-group";
3
+ import type { ComponentProps, ReactNode } from "react";
4
+ import { type VariantProps } from "../lib/cn.js";
5
+ declare const checkboxStyles: import("tailwind-variants").TVReturnType<{
6
+ size: {
7
+ sm: "size-3.5 rounded-xs";
8
+ md: "size-4 rounded-xs";
9
+ };
10
+ }, undefined, string[], {
11
+ size: {
12
+ sm: "size-3.5 rounded-xs";
13
+ md: "size-4 rounded-xs";
14
+ };
15
+ }, undefined, import("tailwind-variants").TVReturnTypeLike<{
16
+ size: {
17
+ sm: "size-3.5 rounded-xs";
18
+ md: "size-4 rounded-xs";
19
+ };
20
+ }, undefined>>;
21
+ export interface CheckboxProps extends Omit<ComponentProps<typeof BaseCheckbox.Root>, "children">, VariantProps<typeof checkboxStyles> {
22
+ /** Visible label rendered to the right; clicking it toggles the box. */
23
+ label?: ReactNode;
24
+ /** Secondary line under the label. */
25
+ description?: ReactNode;
26
+ }
27
+ /** Ink checkbox with a drawn-on check. Pass `label` for the common box + text composition. */
28
+ export declare function Checkbox({ size, label, description, className, ...props }: CheckboxProps): import("react").JSX.Element;
29
+ export interface CheckboxGroupProps extends ComponentProps<typeof BaseCheckboxGroup> {
30
+ orientation?: "vertical" | "horizontal";
31
+ }
32
+ /** Shares a `string[]` value across child checkboxes (each needs a `value`). */
33
+ export declare function CheckboxGroup({ orientation, className, ...props }: CheckboxGroupProps): import("react").JSX.Element;
34
+ export {};
@@ -0,0 +1,37 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { Checkbox as BaseCheckbox } from "@base-ui/react/checkbox";
4
+ import { CheckboxGroup as BaseCheckboxGroup } from "@base-ui/react/checkbox-group";
5
+ import { cn, resolveClassName, tv } from "../lib/cn.js";
6
+ const checkboxStyles = tv({
7
+ base: [
8
+ "group/checkbox relative inline-flex shrink-0 items-center justify-center outline-none hit-target touch-target",
9
+ "border border-border-strong bg-surface text-primary-fg shadow-xs",
10
+ "transition-[background-color,border-color,box-shadow,scale] duration-(--duration-fast) ease-(--ease-standard)",
11
+ "hover:border-fg-subtle active:scale-90 motion-reduce:active:scale-100",
12
+ "focus-visible:ring-focus",
13
+ "data-checked:border-primary data-checked:bg-primary data-indeterminate:border-primary data-indeterminate:bg-primary",
14
+ "data-checked:hover:border-primary-hover data-checked:hover:bg-primary-hover",
15
+ "data-invalid:data-unchecked:border-danger-border",
16
+ "data-disabled:pointer-events-none data-disabled:opacity-45 data-readonly:pointer-events-none",
17
+ ],
18
+ variants: {
19
+ size: {
20
+ sm: "size-3.5 rounded-xs",
21
+ md: "size-4 rounded-xs",
22
+ },
23
+ },
24
+ defaultVariants: { size: "md" },
25
+ });
26
+ const drawClass = cn("[stroke-dasharray:1] [stroke-dashoffset:1]", "transition-[stroke-dashoffset] duration-(--duration-moderate) ease-(--ease-out) motion-reduce:transition-none");
27
+ /** Ink checkbox with a drawn-on check. Pass `label` for the common box + text composition. */
28
+ export function Checkbox({ size, label, description, className, ...props }) {
29
+ const box = (_jsx(BaseCheckbox.Root, { "data-slot": "checkbox", className: (state) => cn(checkboxStyles({ size }), (label !== undefined || description !== undefined) && "mt-[3px]", resolveClassName(className, state)), ...props, children: _jsx(BaseCheckbox.Indicator, { keepMounted: true, className: "pointer-events-none absolute inset-0 flex", children: _jsxs("svg", { viewBox: "0 0 16 16", fill: "none", "aria-hidden": true, className: "size-full", children: [_jsx("path", { d: "M4.25 8.25 6.9 10.75 11.75 5.5", pathLength: 1, stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", strokeLinejoin: "round", className: cn(drawClass, "group-data-checked/checkbox:[stroke-dashoffset:0]") }), _jsx("path", { d: "M4.75 8h6.5", pathLength: 1, stroke: "currentColor", strokeWidth: 1.75, strokeLinecap: "round", className: cn(drawClass, "group-data-indeterminate/checkbox:[stroke-dashoffset:0]") })] }) }) }));
30
+ if (label === undefined && description === undefined)
31
+ return box;
32
+ return (_jsxs("label", { "data-slot": "checkbox-label", className: "group/checkbox-label inline-flex max-w-full cursor-default select-none items-start gap-2 has-data-disabled:opacity-45", children: [box, _jsxs("span", { className: "flex min-w-0 flex-col", children: [label !== undefined && _jsx("span", { className: "text-base text-fg", children: label }), description !== undefined && _jsx("span", { className: "text-sm text-fg-subtle", children: description })] })] }));
33
+ }
34
+ /** Shares a `string[]` value across child checkboxes (each needs a `value`). */
35
+ export function CheckboxGroup({ orientation = "vertical", className, ...props }) {
36
+ return (_jsx(BaseCheckboxGroup, { "data-slot": "checkbox-group", className: (state) => cn("flex", orientation === "vertical" ? "flex-col gap-2.5" : "flex-row flex-wrap gap-x-5 gap-y-2.5", resolveClassName(className, state)), ...props }));
37
+ }
@@ -0,0 +1,104 @@
1
+ import type { ComponentProps, ReactNode } from "react";
2
+ import { type VariantProps } from "../lib/cn.js";
3
+ declare const choiceRow: import("tailwind-variants").TVReturnType<{
4
+ variant: {
5
+ /** A row in a list on a surface (a dialog's, a pane's): a hover wash, the selected fill. */
6
+ plain: {
7
+ root: string;
8
+ title: string;
9
+ };
10
+ /** A tile with its own hairline, for the few weighty choices a sheet leads with. */
11
+ card: {
12
+ root: string[];
13
+ body: string;
14
+ title: string;
15
+ };
16
+ };
17
+ /** A plain row with a detail line under its title is taller. */
18
+ twoLine: {
19
+ true: {};
20
+ false: {};
21
+ };
22
+ }, {
23
+ root: string[];
24
+ leading: string;
25
+ body: string;
26
+ title: string;
27
+ detail: string;
28
+ more: string;
29
+ trailing: string;
30
+ }, undefined, {
31
+ variant: {
32
+ /** A row in a list on a surface (a dialog's, a pane's): a hover wash, the selected fill. */
33
+ plain: {
34
+ root: string;
35
+ title: string;
36
+ };
37
+ /** A tile with its own hairline, for the few weighty choices a sheet leads with. */
38
+ card: {
39
+ root: string[];
40
+ body: string;
41
+ title: string;
42
+ };
43
+ };
44
+ /** A plain row with a detail line under its title is taller. */
45
+ twoLine: {
46
+ true: {};
47
+ false: {};
48
+ };
49
+ }, {
50
+ root: string[];
51
+ leading: string;
52
+ body: string;
53
+ title: string;
54
+ detail: string;
55
+ more: string;
56
+ trailing: string;
57
+ }, import("tailwind-variants").TVReturnTypeLike<{
58
+ variant: {
59
+ /** A row in a list on a surface (a dialog's, a pane's): a hover wash, the selected fill. */
60
+ plain: {
61
+ root: string;
62
+ title: string;
63
+ };
64
+ /** A tile with its own hairline, for the few weighty choices a sheet leads with. */
65
+ card: {
66
+ root: string[];
67
+ body: string;
68
+ title: string;
69
+ };
70
+ };
71
+ /** A plain row with a detail line under its title is taller. */
72
+ twoLine: {
73
+ true: {};
74
+ false: {};
75
+ };
76
+ }, {
77
+ root: string[];
78
+ leading: string;
79
+ body: string;
80
+ title: string;
81
+ detail: string;
82
+ more: string;
83
+ trailing: string;
84
+ }>>;
85
+ export interface ChoiceRowProps extends Omit<ComponentProps<"button">, "title" | "children">, Omit<VariantProps<typeof choiceRow>, "twoLine"> {
86
+ /** An icon (sized and muted for you) or a logo. */
87
+ leading?: ReactNode;
88
+ /** What the row picks, with any badge after it. Wrap a long name in a `truncate` span. */
89
+ title: ReactNode;
90
+ /** One muted line under the title, cut with an ellipsis when it doesn't fit. */
91
+ detail?: ReactNode;
92
+ /** More under the detail, wrapping: a warning, a note. */
93
+ children?: ReactNode;
94
+ /** At the end: a price, a shortcut, a check. */
95
+ trailing?: ReactNode;
96
+ }
97
+ /**
98
+ * One choice in a list, as a button: an icon or logo, a title and a muted detail, something at the
99
+ * end. Picking a project, a file to show, a model. Say which row is chosen the accessible way,
100
+ * `aria-pressed` for a choice that stays (a model), `aria-current` for the item on show (a file),
101
+ * and the row takes the selected fill.
102
+ */
103
+ export declare function ChoiceRow({ variant, leading, title, detail, children, trailing, className, type, ...props }: ChoiceRowProps): import("react").JSX.Element;
104
+ export {};
@@ -0,0 +1,56 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { tv } from "../lib/cn.js";
3
+ const choiceRow = tv({
4
+ slots: {
5
+ root: [
6
+ "flex w-full min-w-0 cursor-default items-center text-start outline-none select-none",
7
+ "transition-[background-color,border-color] duration-(--duration-fast) ease-(--ease-standard)",
8
+ "focus-visible:ring-focus disabled:pointer-events-none disabled:opacity-45",
9
+ ],
10
+ leading: "flex shrink-0 items-center justify-center text-fg-subtle [&>svg]:size-4",
11
+ body: "flex min-w-0 flex-1 flex-col",
12
+ title: "flex min-w-0 items-center gap-1.5 text-fg",
13
+ detail: "truncate text-xs text-fg-subtle",
14
+ more: "text-xs text-fg-subtle",
15
+ trailing: "flex shrink-0 items-center gap-2",
16
+ },
17
+ variants: {
18
+ variant: {
19
+ /** A row in a list on a surface (a dialog's, a pane's): a hover wash, the selected fill. */
20
+ plain: { root: "gap-2.5 rounded-lg px-2.5 hover:bg-hover data-selected:bg-selected", title: "text-sm" },
21
+ /** A tile with its own hairline, for the few weighty choices a sheet leads with. */
22
+ card: {
23
+ root: [
24
+ "gap-3 rounded-xl border border-border-subtle bg-surface px-3 py-2.5",
25
+ "hover:border-border hover:bg-bg-subtle",
26
+ "data-selected:border-border-strong data-selected:bg-selected",
27
+ ],
28
+ body: "gap-0.5",
29
+ title: "text-base font-medium",
30
+ },
31
+ },
32
+ /** A plain row with a detail line under its title is taller. */
33
+ twoLine: { true: {}, false: {} },
34
+ },
35
+ compoundVariants: [
36
+ { variant: "plain", twoLine: false, class: { root: "min-h-8 py-1.5" } },
37
+ { variant: "plain", twoLine: true, class: { root: "py-2" } },
38
+ ],
39
+ defaultVariants: { variant: "plain", twoLine: false },
40
+ });
41
+ /** `aria-pressed` or `aria-current` say a row is the chosen one; the row looks it. */
42
+ function isChosen(pressed, current) {
43
+ return (pressed === true ||
44
+ pressed === "true" ||
45
+ (current !== undefined && current !== false && current !== "false"));
46
+ }
47
+ /**
48
+ * One choice in a list, as a button: an icon or logo, a title and a muted detail, something at the
49
+ * end. Picking a project, a file to show, a model. Say which row is chosen the accessible way,
50
+ * `aria-pressed` for a choice that stays (a model), `aria-current` for the item on show (a file),
51
+ * and the row takes the selected fill.
52
+ */
53
+ export function ChoiceRow({ variant, leading, title, detail, children, trailing, className, type = "button", ...props }) {
54
+ const styles = choiceRow({ variant, twoLine: detail !== undefined || children !== undefined });
55
+ return (_jsxs("button", { "data-slot": "choice-row", "data-selected": isChosen(props["aria-pressed"], props["aria-current"]) || undefined, type: type, className: styles.root({ className }), ...props, children: [leading !== undefined && (_jsx("span", { "aria-hidden": true, className: styles.leading(), children: leading })), _jsxs("span", { className: styles.body(), children: [_jsx("span", { className: styles.title(), children: title }), detail !== undefined && _jsx("span", { className: styles.detail(), children: detail }), children !== undefined && _jsx("span", { className: styles.more(), children: children })] }), trailing !== undefined && _jsx("span", { className: styles.trailing(), children: trailing })] }));
56
+ }
@@ -0,0 +1,17 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ export interface ClampedTextProps extends Omit<ComponentProps<"div">, "children"> {
3
+ /** Rows shown before "Show more", at the content's own line height. */
4
+ lines: number;
5
+ children: ReactNode;
6
+ /** Classes of the clamped box itself (its type sets the line height the clamp counts in). */
7
+ contentClassName?: string | undefined;
8
+ /** Controlled expansion, for a host that owns it (a long list that keeps every row's state). */
9
+ expanded?: boolean | undefined;
10
+ onExpandedChange?: ((expanded: boolean) => void) | undefined;
11
+ }
12
+ /**
13
+ * Text cut to `lines` rendered rows with a "Show more" toggle — prose of any script and length,
14
+ * Markdown included. Whether it overflows is measured from the layout (and again when the width
15
+ * changes), never guessed from the string; content that fits gets no toggle.
16
+ */
17
+ export declare function ClampedText({ lines, children, className, contentClassName, expanded: controlled, onExpandedChange, ...props }: ClampedTextProps): import("react").JSX.Element;
@@ -0,0 +1,47 @@
1
+ "use client";
2
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
+ import { useId, useLayoutEffect, useRef, useState } from "react";
4
+ import { useUiStrings } from "../i18n/provider.js";
5
+ import { cn } from "../lib/cn.js";
6
+ import { ExpandToggle } from "./expand-toggle.js";
7
+ /**
8
+ * Text cut to `lines` rendered rows with a "Show more" toggle — prose of any script and length,
9
+ * Markdown included. Whether it overflows is measured from the layout (and again when the width
10
+ * changes), never guessed from the string; content that fits gets no toggle.
11
+ */
12
+ export function ClampedText({ lines, children, className, contentClassName, expanded: controlled, onExpandedChange, ...props }) {
13
+ const t = useUiStrings().primitives;
14
+ const contentId = useId();
15
+ const content = useRef(null);
16
+ const [own, setOwn] = useState(false);
17
+ const expanded = controlled ?? own;
18
+ const toggle = () => {
19
+ if (onExpandedChange === undefined)
20
+ setOwn(!expanded);
21
+ else
22
+ onExpandedChange(!expanded);
23
+ };
24
+ const [maxHeight, setMaxHeight] = useState(undefined);
25
+ const [overflows, setOverflows] = useState(false);
26
+ useLayoutEffect(() => {
27
+ const element = content.current;
28
+ if (element === null)
29
+ return undefined;
30
+ const measure = () => {
31
+ const style = getComputedStyle(element);
32
+ const lineHeight = Number.parseFloat(style.lineHeight);
33
+ // `normal` has no number (the font's own leading): about 1.2 em. The kit's type sets one.
34
+ const row = Number.isFinite(lineHeight) ? lineHeight : Number.parseFloat(style.fontSize) * 1.2;
35
+ const limit = Math.ceil(row * lines);
36
+ setMaxHeight(limit);
37
+ setOverflows(element.scrollHeight > limit + 1);
38
+ };
39
+ measure();
40
+ const observer = new ResizeObserver(measure);
41
+ observer.observe(element);
42
+ return () => observer.disconnect();
43
+ }, [lines]);
44
+ const clamped = overflows && !expanded;
45
+ return (_jsxs("div", { "data-slot": "clamped-text", className: className, ...props, children: [_jsx("div", { ref: content, id: contentId, style: clamped ? { maxHeight } : undefined, className: cn(clamped &&
46
+ "overflow-hidden [mask-image:linear-gradient(to_bottom,black_calc(100%-1.25em),transparent)]", contentClassName), children: children }), overflows && (_jsx(ExpandToggle, { expanded: expanded, onToggle: toggle, controls: contentId, className: "mt-1", children: expanded ? t.showLess : t.showMore }))] }));
47
+ }
@@ -0,0 +1,48 @@
1
+ import { type ComponentProps, type ReactNode } from "react";
2
+ import { type CodeLine, type ResolvedLanguage } from "../lib/shiki.js";
3
+ import { useCopyToClipboard } from "../lib/use-copy-to-clipboard.js";
4
+ /** Its own module so a page can copy text without loading the highlighter. */
5
+ export { useCopyToClipboard };
6
+ export interface HighlightedLines {
7
+ lines: readonly CodeLine[];
8
+ /** False while `lines` are the plain fallback (grammar loading, or tokenization still pending). */
9
+ highlighted: boolean;
10
+ }
11
+ /**
12
+ * Tokenized lines for `code`, without ever making a commit wait on Shiki:
13
+ *
14
+ * - **Instant** (rendered on the first pass): a {@link tokenCache} hit — e.g. a virtualized row
15
+ * scrolling back into view — or a stream that only grew (`streaming`: just the newly completed
16
+ * lines are tokenized; a finished stream seeds the cache with its result).
17
+ * - **Miss**: plain lines first, then a deferred (`useDeferredValue`, transition-priority and
18
+ * interruptible) re-render tokenizes and caches. Plain and highlighted output share the same line
19
+ * structure, so swapping them never changes layout or a virtualizer's measured height.
20
+ * - **Grammar not loaded yet**: plain lines until it is.
21
+ */
22
+ export declare function useHighlightedLines(code: string, lang: ResolvedLanguage, streaming?: boolean): HighlightedLines;
23
+ export interface CodeBlockProps extends Omit<ComponentProps<"div">, "children"> {
24
+ /** Source text. A single trailing newline is ignored. */
25
+ code: string;
26
+ /** Language id or fence info (`ts`, `tsx`, `python`, `sh`, …). Unknown → plain text. */
27
+ lang?: string | undefined;
28
+ /** Shown in the header instead of the language. */
29
+ filename?: string | undefined;
30
+ showLineNumbers?: boolean;
31
+ /** Number of the first line (e.g. a Read from offset 120). Default 1. */
32
+ startLine?: number;
33
+ /** 1-based line numbers to emphasize (in the same numbering as `startLine`). */
34
+ highlightLines?: readonly number[];
35
+ /** Soft-wrap long lines instead of scrolling horizontally. */
36
+ wrap?: boolean;
37
+ /** Scroll vertically beyond this height (e.g. `320` or `"40vh"`). */
38
+ maxHeight?: number | string;
39
+ /** The code is still arriving: incremental highlighting, line fade-in, stick-to-bottom. */
40
+ streaming?: boolean;
41
+ /** Render the header bar (label + copy). Without it, copy floats in on hover. */
42
+ header?: boolean;
43
+ /** Extra controls rendered in the header, before the copy button; text among them wraps, and the header grows. */
44
+ actions?: ReactNode;
45
+ }
46
+ export declare function CodeBlock({ code, lang, filename, showLineNumbers, startLine, highlightLines, wrap, maxHeight, streaming, header, actions, className, ...props }: CodeBlockProps): import("react").JSX.Element;
47
+ /** Inline code span for prose: hairline chip, mono, slightly smaller than surrounding text. */
48
+ export declare function Code({ className, ...props }: ComponentProps<"code">): import("react").JSX.Element;