@ngrok/mantle 0.66.0 → 0.66.2

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 (297) hide show
  1. package/dist/accordion.d.ts +158 -154
  2. package/dist/accordion.js +1 -1
  3. package/dist/accordion.js.map +1 -1
  4. package/dist/alert-dialog.d.ts +282 -277
  5. package/dist/alert-dialog.js +1 -1
  6. package/dist/alert-dialog.js.map +1 -1
  7. package/dist/alert.d.ts +145 -138
  8. package/dist/alert.js +1 -1
  9. package/dist/alert.js.map +1 -1
  10. package/dist/anchor.d.ts +25 -22
  11. package/dist/anchor.js +1 -1
  12. package/dist/anchor.js.map +1 -1
  13. package/dist/as-child-XMVTepJu.d.ts +31 -0
  14. package/dist/badge.d.ts +29 -19
  15. package/dist/badge.js +1 -1
  16. package/dist/badge.js.map +1 -1
  17. package/dist/booleanish-CBGdPL3Q.js +2 -0
  18. package/dist/booleanish-CBGdPL3Q.js.map +1 -0
  19. package/dist/browser-only-QPyyfLaB.js +2 -0
  20. package/dist/browser-only-QPyyfLaB.js.map +1 -0
  21. package/dist/browser-only.d.ts +20 -15
  22. package/dist/browser-only.js +1 -2
  23. package/dist/button-B6StZJsz.d.ts +175 -0
  24. package/dist/button-CRRPesae.js +2 -0
  25. package/dist/button-CRRPesae.js.map +1 -0
  26. package/dist/button-DA2p0_5F.js +2 -0
  27. package/dist/button-DA2p0_5F.js.map +1 -0
  28. package/dist/button.d.ts +4 -9
  29. package/dist/button.js +1 -2
  30. package/dist/calendar.d.ts +14 -8
  31. package/dist/calendar.js +1 -1
  32. package/dist/calendar.js.map +1 -1
  33. package/dist/card.d.ts +99 -97
  34. package/dist/card.js +1 -1
  35. package/dist/card.js.map +1 -1
  36. package/dist/checkbox.d.ts +14 -12
  37. package/dist/checkbox.js +1 -1
  38. package/dist/checkbox.js.map +1 -1
  39. package/dist/code-block.d.ts +254 -237
  40. package/dist/code-block.js +3 -3
  41. package/dist/code-block.js.map +1 -1
  42. package/dist/code.d.ts +5 -3
  43. package/dist/code.js +1 -1
  44. package/dist/code.js.map +1 -1
  45. package/dist/color.d.ts +2 -38
  46. package/dist/color.js +1 -1
  47. package/dist/color.js.map +1 -1
  48. package/dist/combobox.d.ts +172 -167
  49. package/dist/combobox.js +1 -1
  50. package/dist/combobox.js.map +1 -1
  51. package/dist/command.d.ts +234 -227
  52. package/dist/command.js +1 -1
  53. package/dist/command.js.map +1 -1
  54. package/dist/compose-refs-DeIsFv68.js +2 -0
  55. package/dist/compose-refs-DeIsFv68.js.map +1 -0
  56. package/dist/cx-bKromGBh.js +2 -0
  57. package/dist/cx-bKromGBh.js.map +1 -0
  58. package/dist/cx.d.ts +4 -2
  59. package/dist/cx.js +1 -2
  60. package/dist/data-table.d.ts +211 -184
  61. package/dist/data-table.js +1 -1
  62. package/dist/data-table.js.map +1 -1
  63. package/dist/deep-non-nullable-BLM3Gz0I.d.ts +8 -0
  64. package/dist/description-list.d.ts +61 -59
  65. package/dist/description-list.js +1 -1
  66. package/dist/description-list.js.map +1 -1
  67. package/dist/dialog-BuD_JQf_.d.ts +422 -0
  68. package/dist/dialog-Cr5u0Eai.js +2 -0
  69. package/dist/dialog-Cr5u0Eai.js.map +1 -0
  70. package/dist/dialog.d.ts +3 -410
  71. package/dist/dialog.js +1 -2
  72. package/dist/direction-DfrtFTny.js +2 -0
  73. package/dist/direction-DfrtFTny.js.map +1 -0
  74. package/dist/{direction-DHheuUag.d.ts → direction-deXpJFDZ.d.ts} +9 -7
  75. package/dist/dropdown-menu-CjOaj-Ap.js +2 -0
  76. package/dist/dropdown-menu-CjOaj-Ap.js.map +1 -0
  77. package/dist/dropdown-menu-D_ZoY1AH.d.ts +330 -0
  78. package/dist/dropdown-menu.d.ts +2 -325
  79. package/dist/dropdown-menu.js +1 -2
  80. package/dist/flag.d.ts +31 -22
  81. package/dist/flag.js +1 -1
  82. package/dist/flag.js.map +1 -1
  83. package/dist/hooks.d.ts +72 -59
  84. package/dist/hooks.js +1 -1
  85. package/dist/hooks.js.map +1 -1
  86. package/dist/hover-card.d.ts +97 -91
  87. package/dist/hover-card.js +1 -1
  88. package/dist/hover-card.js.map +1 -1
  89. package/dist/{icon-DXTMiV1L.d.ts → icon-B1XLv02t.d.ts} +11 -9
  90. package/dist/icon-B5oNYYrJ.js +2 -0
  91. package/dist/icon-B5oNYYrJ.js.map +1 -0
  92. package/dist/icon-button-2r6S3HVA.d.ts +98 -0
  93. package/dist/icon-button-D4e9-dq-.js +2 -0
  94. package/dist/icon-button-D4e9-dq-.js.map +1 -0
  95. package/dist/icon.d.ts +4 -4
  96. package/dist/icon.js +1 -2
  97. package/dist/icons.d.ts +54 -41
  98. package/dist/icons.js +1 -1
  99. package/dist/icons.js.map +1 -1
  100. package/dist/{in-view-aHeQHaUj.d.ts → in-view-CTQRT44m.d.ts} +29 -22
  101. package/dist/in-view-bPnaWEL4.js +2 -0
  102. package/dist/in-view-bPnaWEL4.js.map +1 -0
  103. package/dist/index-BLCvtjLi.d.ts +40 -0
  104. package/dist/index-DWqhfw9n.d.ts +103 -0
  105. package/dist/{button-group-BFnqgdtl.d.ts → index-ViSCOUrU.d.ts} +10 -8
  106. package/dist/index-s8rMcilU.d.ts +47 -0
  107. package/dist/input.d.ts +3 -100
  108. package/dist/input.js +1 -1
  109. package/dist/input.js.map +1 -1
  110. package/dist/is-input-BFR8yMM7.js +2 -0
  111. package/dist/is-input-BFR8yMM7.js.map +1 -0
  112. package/dist/kbd-pyj32aN4.js +2 -0
  113. package/dist/kbd-pyj32aN4.js.map +1 -0
  114. package/dist/kbd.d.ts +10 -4
  115. package/dist/kbd.js +1 -2
  116. package/dist/label.d.ts +8 -6
  117. package/dist/label.js +1 -1
  118. package/dist/label.js.map +1 -1
  119. package/dist/media-object.d.ts +70 -68
  120. package/dist/media-object.js +1 -1
  121. package/dist/media-object.js.map +1 -1
  122. package/dist/multi-select.d.ts +226 -218
  123. package/dist/multi-select.js +1 -1
  124. package/dist/multi-select.js.map +1 -1
  125. package/dist/pagination.d.ts +168 -164
  126. package/dist/pagination.js +1 -1
  127. package/dist/pagination.js.map +1 -1
  128. package/dist/popover.d.ts +119 -117
  129. package/dist/popover.js +1 -1
  130. package/dist/popover.js.map +1 -1
  131. package/dist/primitive-Cath9ASB.js +2 -0
  132. package/dist/primitive-Cath9ASB.js.map +1 -0
  133. package/dist/primitive-tuHqhoRE.d.ts +16 -0
  134. package/dist/progress.d.ts +175 -150
  135. package/dist/progress.js +1 -1
  136. package/dist/progress.js.map +1 -1
  137. package/dist/radio-group.d.ts +246 -230
  138. package/dist/radio-group.js +1 -1
  139. package/dist/radio-group.js.map +1 -1
  140. package/dist/sandboxed-on-click.d.ts +36 -31
  141. package/dist/sandboxed-on-click.js +1 -1
  142. package/dist/sandboxed-on-click.js.map +1 -1
  143. package/dist/select-39Jfc1Cb.d.ts +265 -0
  144. package/dist/select-DZ2ztBkI.js +2 -0
  145. package/dist/select-DZ2ztBkI.js.map +1 -0
  146. package/dist/select.d.ts +2 -263
  147. package/dist/select.js +1 -2
  148. package/dist/separator-BcCNbHBg.js +2 -0
  149. package/dist/separator-BcCNbHBg.js.map +1 -0
  150. package/dist/separator.d.ts +28 -21
  151. package/dist/separator.js +1 -2
  152. package/dist/sheet.d.ts +319 -305
  153. package/dist/sheet.js +1 -1
  154. package/dist/sheet.js.map +1 -1
  155. package/dist/skeleton.d.ts +8 -6
  156. package/dist/skeleton.js +1 -1
  157. package/dist/skeleton.js.map +1 -1
  158. package/dist/slider.d.ts +48 -35
  159. package/dist/slider.js +1 -1
  160. package/dist/slider.js.map +1 -1
  161. package/dist/slot-DdnjeV2n.js +2 -0
  162. package/dist/slot-DdnjeV2n.js.map +1 -0
  163. package/dist/slot.d.ts +6 -4
  164. package/dist/slot.js +1 -2
  165. package/dist/sort-CfPsu1Gs.js +2 -0
  166. package/dist/sort-CfPsu1Gs.js.map +1 -0
  167. package/dist/split-button.d.ts +158 -162
  168. package/dist/split-button.js +1 -1
  169. package/dist/split-button.js.map +1 -1
  170. package/dist/svg-only-BVLlbQ4e.js +2 -0
  171. package/dist/svg-only-BVLlbQ4e.js.map +1 -0
  172. package/dist/{svg-only-Cp8Mu_sh.d.ts → svg-only-Dti1FvNV.d.ts} +11 -9
  173. package/dist/switch.d.ts +10 -8
  174. package/dist/switch.js +1 -1
  175. package/dist/switch.js.map +1 -1
  176. package/dist/table-BWMp12sl.js +2 -0
  177. package/dist/table-BWMp12sl.js.map +1 -0
  178. package/dist/table-Dpt192qt.d.ts +398 -0
  179. package/dist/table.d.ts +2 -396
  180. package/dist/table.js +1 -2
  181. package/dist/tabs.d.ts +110 -104
  182. package/dist/tabs.js +1 -1
  183. package/dist/tabs.js.map +1 -1
  184. package/dist/text-area.d.ts +10 -8
  185. package/dist/text-area.js +1 -1
  186. package/dist/text-area.js.map +1 -1
  187. package/dist/theme-provider-C8F5nFrJ.js +2 -0
  188. package/dist/theme-provider-C8F5nFrJ.js.map +1 -0
  189. package/dist/theme.d.ts +66 -39
  190. package/dist/theme.js +1 -2
  191. package/dist/{themes-Bi46K9ZW.d.ts → themes-ClppRAGt.d.ts} +4 -2
  192. package/dist/toast-1AuBbrBS.js +2 -0
  193. package/dist/toast-1AuBbrBS.js.map +1 -0
  194. package/dist/toast.d.ts +95 -87
  195. package/dist/toast.js +1 -2
  196. package/dist/tooltip.d.ts +78 -73
  197. package/dist/tooltip.js +1 -1
  198. package/dist/tooltip.js.map +1 -1
  199. package/dist/{chunk-W2YQRWR5.js → traffic-policy-file-QnF-2YkY.js} +2 -2
  200. package/dist/traffic-policy-file-QnF-2YkY.js.map +1 -0
  201. package/dist/types-884RJJqm.js +2 -0
  202. package/dist/types-884RJJqm.js.map +1 -0
  203. package/dist/{types-DehRoXC5.d.ts → types-DgXUgkpc.d.ts} +38 -36
  204. package/dist/types-Dh4BVhXC.d.ts +9 -0
  205. package/dist/types.d.ts +6 -49
  206. package/dist/types.js +1 -2
  207. package/dist/use-copy-to-clipboard-BEbQOKHc.js +2 -0
  208. package/dist/use-copy-to-clipboard-BEbQOKHc.js.map +1 -0
  209. package/dist/use-matches-media-query-CojcYxlA.js +2 -0
  210. package/dist/use-matches-media-query-CojcYxlA.js.map +1 -0
  211. package/dist/use-prefers-reduced-motion-BiG6QGkf.js +2 -0
  212. package/dist/use-prefers-reduced-motion-BiG6QGkf.js.map +1 -0
  213. package/dist/utils.d.ts +6 -5
  214. package/dist/utils.js +1 -1
  215. package/dist/utils.js.map +1 -1
  216. package/dist/variant-props-UE-phTwh.d.ts +13 -0
  217. package/dist/with-style-props-D1QFTzj6.d.ts +29 -0
  218. package/package.json +6 -6
  219. package/dist/as-child-DJ7x3JFV.d.ts +0 -21
  220. package/dist/browser-only.js.map +0 -1
  221. package/dist/button-DLUUf_c-.d.ts +0 -173
  222. package/dist/button.js.map +0 -1
  223. package/dist/chunk-2FYR6IJV.js +0 -2
  224. package/dist/chunk-2FYR6IJV.js.map +0 -1
  225. package/dist/chunk-5VDCC3YW.js +0 -2
  226. package/dist/chunk-5VDCC3YW.js.map +0 -1
  227. package/dist/chunk-63ZAW25Z.js +0 -2
  228. package/dist/chunk-63ZAW25Z.js.map +0 -1
  229. package/dist/chunk-6J7D73WA.js +0 -2
  230. package/dist/chunk-6J7D73WA.js.map +0 -1
  231. package/dist/chunk-72TJUKMV.js +0 -1
  232. package/dist/chunk-72TJUKMV.js.map +0 -1
  233. package/dist/chunk-7MJQGBE4.js +0 -2
  234. package/dist/chunk-7MJQGBE4.js.map +0 -1
  235. package/dist/chunk-7YLII2US.js +0 -2
  236. package/dist/chunk-7YLII2US.js.map +0 -1
  237. package/dist/chunk-ADF5DAYG.js +0 -2
  238. package/dist/chunk-ADF5DAYG.js.map +0 -1
  239. package/dist/chunk-CBRSMQ26.js +0 -2
  240. package/dist/chunk-CBRSMQ26.js.map +0 -1
  241. package/dist/chunk-COQIVAQH.js +0 -2
  242. package/dist/chunk-COQIVAQH.js.map +0 -1
  243. package/dist/chunk-ELZLLG6G.js +0 -2
  244. package/dist/chunk-ELZLLG6G.js.map +0 -1
  245. package/dist/chunk-EVU5XGB4.js +0 -2
  246. package/dist/chunk-EVU5XGB4.js.map +0 -1
  247. package/dist/chunk-EYZYDUS2.js +0 -2
  248. package/dist/chunk-EYZYDUS2.js.map +0 -1
  249. package/dist/chunk-HKSO72E5.js +0 -2
  250. package/dist/chunk-HKSO72E5.js.map +0 -1
  251. package/dist/chunk-HL2HWYKP.js +0 -2
  252. package/dist/chunk-HL2HWYKP.js.map +0 -1
  253. package/dist/chunk-IVQ626TU.js +0 -2
  254. package/dist/chunk-IVQ626TU.js.map +0 -1
  255. package/dist/chunk-JQ5D5YZR.js +0 -2
  256. package/dist/chunk-JQ5D5YZR.js.map +0 -1
  257. package/dist/chunk-LBO5LEYM.js +0 -2
  258. package/dist/chunk-LBO5LEYM.js.map +0 -1
  259. package/dist/chunk-MLXONRJD.js +0 -2
  260. package/dist/chunk-MLXONRJD.js.map +0 -1
  261. package/dist/chunk-OHPGAB7U.js +0 -2
  262. package/dist/chunk-OHPGAB7U.js.map +0 -1
  263. package/dist/chunk-OP6JMBKJ.js +0 -2
  264. package/dist/chunk-OP6JMBKJ.js.map +0 -1
  265. package/dist/chunk-PFXFESEN.js +0 -2
  266. package/dist/chunk-PFXFESEN.js.map +0 -1
  267. package/dist/chunk-PNL7JOXI.js +0 -2
  268. package/dist/chunk-PNL7JOXI.js.map +0 -1
  269. package/dist/chunk-RED6SFAV.js +0 -2
  270. package/dist/chunk-RED6SFAV.js.map +0 -1
  271. package/dist/chunk-SBQHQ2SJ.js +0 -2
  272. package/dist/chunk-SBQHQ2SJ.js.map +0 -1
  273. package/dist/chunk-SGGOH2WW.js +0 -2
  274. package/dist/chunk-SGGOH2WW.js.map +0 -1
  275. package/dist/chunk-W2YQRWR5.js.map +0 -1
  276. package/dist/chunk-W5A5HSFE.js +0 -2
  277. package/dist/chunk-W5A5HSFE.js.map +0 -1
  278. package/dist/chunk-YPAUKPCE.js +0 -2
  279. package/dist/chunk-YPAUKPCE.js.map +0 -1
  280. package/dist/cx.js.map +0 -1
  281. package/dist/deep-non-nullable-SmpSvoSd.d.ts +0 -8
  282. package/dist/dialog.js.map +0 -1
  283. package/dist/dropdown-menu.js.map +0 -1
  284. package/dist/icon-button-CT71Ti9V.d.ts +0 -96
  285. package/dist/icon.js.map +0 -1
  286. package/dist/kbd.js.map +0 -1
  287. package/dist/primitive-CBR_XmVa.d.ts +0 -14
  288. package/dist/select.js.map +0 -1
  289. package/dist/separator.js.map +0 -1
  290. package/dist/slot.js.map +0 -1
  291. package/dist/table.js.map +0 -1
  292. package/dist/theme.js.map +0 -1
  293. package/dist/toast.js.map +0 -1
  294. package/dist/types-BuKAGhC-.d.ts +0 -7
  295. package/dist/types.js.map +0 -1
  296. package/dist/variant-props-oDo2u-We.d.ts +0 -11
  297. package/dist/with-style-props-VnLWm0Yd.d.ts +0 -27
@@ -1,9 +1,10 @@
1
- import * as react from 'react';
2
- import { HTMLAttributes, ComponentProps, ReactNode } from 'react';
3
- import * as react_jsx_runtime from 'react/jsx-runtime';
4
- import { W as WithAsChild } from './as-child-DJ7x3JFV.js';
5
- import { S as SvgAttributes } from './types-BuKAGhC-.js';
1
+ import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
2
+ import { t as WithAsChild } from "./as-child-XMVTepJu.js";
3
+ import * as react from "react";
4
+ import { ComponentProps, HTMLAttributes, ReactNode } from "react";
5
+ import * as react_jsx_runtime0 from "react/jsx-runtime";
6
6
 
7
+ //#region src/components/code-block/supported-languages.d.ts
7
8
  /**
8
9
  * List of supported languages for syntax highlighting.
9
10
  * @private
@@ -26,38 +27,44 @@ declare const isSupportedLanguage: (value: unknown) => value is SupportedLanguag
26
27
  * Formats a language name into a class name that Prism.js can understand.
27
28
  * @default "language-sh"
28
29
  */
29
- declare function formatLanguageClassName(language?: SupportedLanguage | undefined): "language-html" | "language-ruby" | "language-py" | "language-text" | "language-plaintext" | "language-go" | "language-bash" | "language-cs" | "language-csharp" | "language-css" | "language-dotnet" | "language-java" | "language-javascript" | "language-js" | "language-json" | "language-jsx" | "language-markup" | "language-plain" | "language-python" | "language-rb" | "language-rust" | "language-sh" | "language-shell" | "language-ts" | "language-tsx" | "language-txt" | "language-typescript" | "language-xml" | "language-yaml" | "language-yml";
30
-
30
+ declare function formatLanguageClassName(language?: SupportedLanguage | undefined): "language-html" | "language-ruby" | "language-text" | "language-py" | "language-go" | "language-bash" | "language-cs" | "language-csharp" | "language-css" | "language-dotnet" | "language-java" | "language-javascript" | "language-js" | "language-json" | "language-jsx" | "language-markup" | "language-plain" | "language-plaintext" | "language-python" | "language-rb" | "language-rust" | "language-sh" | "language-shell" | "language-ts" | "language-tsx" | "language-txt" | "language-typescript" | "language-xml" | "language-yaml" | "language-yml";
31
+ //#endregion
32
+ //#region src/components/code-block/indentation.d.ts
31
33
  declare const indentations: readonly ["tabs", "spaces"];
32
34
  type Indentation = (typeof indentations)[number];
33
-
35
+ /**
36
+ * Type Predicate: checks if the given value is a valid indentation type.
37
+ */
38
+ //#endregion
39
+ //#region src/components/code-block/line-numbers.d.ts
34
40
  /**
35
41
  * A line range is a string in the format of `start-end` where `start` and `end` are line numbers.
36
42
  */
37
43
  type LineRange = `${number}-${number}`;
38
-
44
+ //#endregion
45
+ //#region src/components/code-block/parse-metastring.d.ts
39
46
  declare const modes: readonly ["cli", "file", "traffic-policy"];
40
47
  type Mode = (typeof modes)[number];
41
48
  type MetaInput = {
42
- collapsible?: boolean | undefined;
43
- disableCopy?: boolean | undefined;
44
- indentation?: Indentation | undefined;
45
- mode?: Mode | undefined;
46
- title?: string | undefined;
49
+ collapsible?: boolean | undefined;
50
+ disableCopy?: boolean | undefined;
51
+ indentation?: Indentation | undefined;
52
+ mode?: Mode | undefined;
53
+ title?: string | undefined;
47
54
  };
48
55
  type Meta = {
49
- collapsible: boolean;
50
- disableCopy: boolean;
51
- indentation?: Indentation | undefined;
52
- mode?: Mode | undefined;
53
- title?: string | undefined;
56
+ collapsible: boolean;
57
+ disableCopy: boolean;
58
+ indentation?: Indentation | undefined;
59
+ mode?: Mode | undefined;
60
+ title?: string | undefined;
54
61
  };
55
62
  declare const defaultMeta: {
56
- readonly collapsible: false;
57
- readonly disableCopy: false;
58
- readonly indentation: undefined;
59
- readonly mode: undefined;
60
- readonly title: undefined;
63
+ readonly collapsible: false;
64
+ readonly disableCopy: false;
65
+ readonly indentation: undefined;
66
+ readonly mode: undefined;
67
+ readonly title: undefined;
61
68
  };
62
69
  type DefaultMeta = typeof defaultMeta;
63
70
  /**
@@ -67,64 +74,65 @@ type DefaultMeta = typeof defaultMeta;
67
74
  * CodeBlock components as props.
68
75
  */
69
76
  declare function parseMetastring(input: string | undefined): Meta;
70
-
77
+ //#endregion
78
+ //#region src/components/code-block/code-block.d.ts
71
79
  type CodeBlockCodeProps = Omit<ComponentProps<"pre">, "children"> & {
72
- /**
73
- * The code to display in the code block. Should be code formatted as a string. This code will be passed to our syntax highlighter.
74
- */
75
- value: string;
76
- /**
77
- * @todo not implemented yet
78
- */
79
- highlightLines?: (LineRange | number)[];
80
- /**
81
- * The type of indentation to use. Can be either "tabs" or "spaces".
82
- * @default inferred from the given language, fallback to `spaces`
83
- */
84
- indentation?: Indentation;
85
- /**
86
- * The language of the code block. This will be used to determine how to syntax highlight the code.
87
- * @default `"text"`.
88
- */
89
- language?: SupportedLanguage;
90
- /**
91
- * @todo not implemented yet
92
- */
93
- showLineNumbers?: boolean;
80
+ /**
81
+ * The code to display in the code block. Should be code formatted as a string. This code will be passed to our syntax highlighter.
82
+ */
83
+ value: string;
84
+ /**
85
+ * @todo not implemented yet
86
+ */
87
+ highlightLines?: (LineRange | number)[];
88
+ /**
89
+ * The type of indentation to use. Can be either "tabs" or "spaces".
90
+ * @default inferred from the given language, fallback to `spaces`
91
+ */
92
+ indentation?: Indentation;
93
+ /**
94
+ * The language of the code block. This will be used to determine how to syntax highlight the code.
95
+ * @default `"text"`.
96
+ */
97
+ language?: SupportedLanguage;
98
+ /**
99
+ * @todo not implemented yet
100
+ */
101
+ showLineNumbers?: boolean;
94
102
  };
95
103
  type CodeBlockCopyButtonProps = Omit<ComponentProps<"button">, "children" | "type"> & WithAsChild & {
96
- /**
97
- * Callback fired when the copy button is clicked, passes the copied text as an argument.
98
- */
99
- onCopy?: (value: string) => void;
100
- /**
101
- * Callback fired when an error occurs during copying.
102
- */
103
- onCopyError?: (error: unknown) => void;
104
+ /**
105
+ * Callback fired when the copy button is clicked, passes the copied text as an argument.
106
+ */
107
+ onCopy?: (value: string) => void;
108
+ /**
109
+ * Callback fired when an error occurs during copying.
110
+ */
111
+ onCopyError?: (error: unknown) => void;
104
112
  };
105
113
  type CodeBlockExpanderButtonProps = Omit<ComponentProps<"button">, "children" | "aria-controls" | "aria-expanded"> & WithAsChild;
106
114
  type CodeBlockIconProps = Omit<SvgAttributes, "children"> & ({
107
- /**
108
- * A custom icon to display in the code block header.
109
- * (Pass only one of `svg` or `preset`.)
110
- */
111
- svg: ReactNode;
112
- /**
113
- * A preset icon to display in the code block header.
114
- * (Pass only one of `svg` or `preset`.)
115
- */
116
- preset?: undefined | never;
115
+ /**
116
+ * A custom icon to display in the code block header.
117
+ * (Pass only one of `svg` or `preset`.)
118
+ */
119
+ svg: ReactNode;
120
+ /**
121
+ * A preset icon to display in the code block header.
122
+ * (Pass only one of `svg` or `preset`.)
123
+ */
124
+ preset?: undefined | never;
117
125
  } | {
118
- /**
119
- * A custom icon to display in the code block header.
120
- * (Pass only one of `svg` or `preset`.)
121
- */
122
- svg?: undefined | never;
123
- /**
124
- * A preset icon to display in the code block header.
125
- * (Pass only one of `svg` or `preset`.)
126
- */
127
- preset: Mode;
126
+ /**
127
+ * A custom icon to display in the code block header.
128
+ * (Pass only one of `svg` or `preset`.)
129
+ */
130
+ svg?: undefined | never;
131
+ /**
132
+ * A preset icon to display in the code block header.
133
+ * (Pass only one of `svg` or `preset`.)
134
+ */
135
+ preset: Mode;
128
136
  });
129
137
  /**
130
138
  * A small icon that represents the type of code block being displayed,
@@ -150,9 +158,14 @@ type CodeBlockIconProps = Omit<SvgAttributes, "children"> & ({
150
158
  * </CodeBlock.Root>
151
159
  * ```
152
160
  */
153
- declare function CodeBlockIconComponent({ className, preset, svg: _svgProp, ...props }: CodeBlockIconProps): react_jsx_runtime.JSX.Element;
161
+ declare function CodeBlockIconComponent({
162
+ className,
163
+ preset,
164
+ svg: _svgProp,
165
+ ...props
166
+ }: CodeBlockIconProps): react_jsx_runtime0.JSX.Element;
154
167
  declare namespace CodeBlockIconComponent {
155
- var displayName: string;
168
+ var displayName: string;
156
169
  }
157
170
  /**
158
171
  * Code blocks render and apply syntax highlighting to blocks of code.
@@ -175,159 +188,160 @@ declare namespace CodeBlockIconComponent {
175
188
  * ```
176
189
  */
177
190
  declare const CodeBlock: {
178
- /**
179
- * Code blocks render and apply syntax highlighting to blocks of code.
180
- * This is the root component for all code block components.
181
- *
182
- * @see https://mantle.ngrok.com/components/code-block#codeblockroot
183
- *
184
- * @example
185
- * ```tsx
186
- * <CodeBlock.Root>
187
- * <CodeBlock.Header>
188
- * <CodeBlock.Icon preset="file" />
189
- * <CodeBlock.Title>…</CodeBlock.Title>
190
- * </CodeBlock.Header>
191
- * <CodeBlock.Body>
192
- * <CodeBlock.CopyButton />
193
- * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
194
- * </CodeBlock.Body>
195
- * <CodeBlock.ExpanderButton />
196
- * </CodeBlock.Root>
197
- * ```
198
- */
199
- readonly Root: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "align"> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
200
- /**
201
- * The body of the `CodeBlock`. This is where the `CodeBlock.Code` and optional
202
- * `CodeBlock.CopyButton` is rendered.
203
- *
204
- * @see https://mantle.ngrok.com/components/code-block#codeblockbody
205
- *
206
- * @example
207
- * ```tsx
208
- * <CodeBlock.Root>
209
- * <CodeBlock.Body>
210
- * <CodeBlock.CopyButton />
211
- * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
212
- * </CodeBlock.Body>
213
- * </CodeBlock.Root>
214
- * ```
215
- */
216
- readonly Body: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
217
- /**
218
- * The `CodeBlock` content. This is where the code is rendered and syntax highlighted.
219
- *
220
- * @see https://mantle.ngrok.com/components/code-block#codeblockcode
221
- *
222
- * @example
223
- * ```tsx
224
- * <CodeBlock.Root>
225
- * <CodeBlock.Body>
226
- * <CodeBlock.Code
227
- * language="sh"
228
- * value={fmtCode`ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0`}
229
- * />
230
- * </CodeBlock.Body>
231
- * </CodeBlock.Root>
232
- * ```
233
- */
234
- readonly Code: react.ForwardRefExoticComponent<Omit<CodeBlockCodeProps, "ref"> & react.RefAttributes<HTMLPreElement>>;
235
- /**
236
- * The (optional) copy button of the `CodeBlock`. Render this as a child of the
237
- * `CodeBlock.Body` to allow users to copy the code block contents to their
238
- * clipboard.
239
- *
240
- * @see https://mantle.ngrok.com/components/code-block#codeblockcopybutton
241
- *
242
- * @example
243
- * ```tsx
244
- * <CodeBlock.Root>
245
- * <CodeBlock.Body>
246
- * <CodeBlock.CopyButton />
247
- * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
248
- * </CodeBlock.Body>
249
- * </CodeBlock.Root>
250
- * ```
251
- */
252
- readonly CopyButton: react.ForwardRefExoticComponent<Omit<CodeBlockCopyButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
253
- /**
254
- * The (optional) expander button of the `CodeBlock`. Render this as a child of the
255
- * `CodeBlock.Body` to allow users to expand/collapse the code block contents.
256
- *
257
- * @see https://mantle.ngrok.com/components/code-block#codeblockexpanderbutton
258
- *
259
- * @example
260
- * ```tsx
261
- * <CodeBlock.Root>
262
- * <CodeBlock.Body>
263
- * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
264
- * </CodeBlock.Body>
265
- * <CodeBlock.ExpanderButton />
266
- * </CodeBlock.Root>
267
- * ```
268
- */
269
- readonly ExpanderButton: react.ForwardRefExoticComponent<Omit<CodeBlockExpanderButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
270
- /**
271
- * The (optional) header slot of the `CodeBlock`. This is where things like the
272
- * `CodeBlock.Icon` and `CodeBlock.Title` are rendered.
273
- *
274
- * @see https://mantle.ngrok.com/components/code-block#codeblockheader
275
- *
276
- * @example
277
- * ```tsx
278
- * <CodeBlock.Root>
279
- * <CodeBlock.Header>
280
- * <CodeBlock.Icon preset="file" />
281
- * <CodeBlock.Title>…</CodeBlock.Title>
282
- * </CodeBlock.Header>
283
- * <CodeBlock.Body>
284
- * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
285
- * </CodeBlock.Body>
286
- * </CodeBlock.Root>
287
- * ```
288
- */
289
- readonly Header: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
290
- /**
291
- * A small icon that represents the type of code block being displayed,
292
- * rendered as an SVG next to the code block title in the code block header.
293
- *
294
- * You can pass in a custom SVG component or use one of the presets
295
- * (pass only one of `svg` or `preset`).
296
- *
297
- * @see https://mantle.ngrok.com/components/code-block#codeblockicon
298
- *
299
- * @example
300
- * ```tsx
301
- * <CodeBlock.Root>
302
- * <CodeBlock.Header>
303
- * <CodeBlock.Icon preset="file" />
304
- * <CodeBlock.Title>…</CodeBlock.Title>
305
- * </CodeBlock.Header>
306
- * </CodeBlock.Root>
307
- * ```
308
- */
309
- readonly Icon: typeof CodeBlockIconComponent;
310
- /**
311
- * The (optional) title of the `CodeBlock`. Default renders as an h3 element,
312
- * use asChild to render something else.
313
- *
314
- * @see https://mantle.ngrok.com/components/code-block#codeblocktitle
315
- *
316
- * @example
317
- * ```tsx
318
- * <CodeBlock.Root>
319
- * <CodeBlock.Header>
320
- * <CodeBlock.Icon preset="file" />
321
- * <CodeBlock.Title>example.js</CodeBlock.Title>
322
- * </CodeBlock.Header>
323
- * </CodeBlock.Root>
324
- * ```
325
- */
326
- readonly Title: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
327
- asChild?: boolean;
328
- } & react.RefAttributes<HTMLHeadingElement>>;
191
+ /**
192
+ * Code blocks render and apply syntax highlighting to blocks of code.
193
+ * This is the root component for all code block components.
194
+ *
195
+ * @see https://mantle.ngrok.com/components/code-block#codeblockroot
196
+ *
197
+ * @example
198
+ * ```tsx
199
+ * <CodeBlock.Root>
200
+ * <CodeBlock.Header>
201
+ * <CodeBlock.Icon preset="file" />
202
+ * <CodeBlock.Title>…</CodeBlock.Title>
203
+ * </CodeBlock.Header>
204
+ * <CodeBlock.Body>
205
+ * <CodeBlock.CopyButton />
206
+ * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
207
+ * </CodeBlock.Body>
208
+ * <CodeBlock.ExpanderButton />
209
+ * </CodeBlock.Root>
210
+ * ```
211
+ */
212
+ readonly Root: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<HTMLAttributes<HTMLDivElement>, HTMLDivElement>, "align"> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
213
+ /**
214
+ * The body of the `CodeBlock`. This is where the `CodeBlock.Code` and optional
215
+ * `CodeBlock.CopyButton` is rendered.
216
+ *
217
+ * @see https://mantle.ngrok.com/components/code-block#codeblockbody
218
+ *
219
+ * @example
220
+ * ```tsx
221
+ * <CodeBlock.Root>
222
+ * <CodeBlock.Body>
223
+ * <CodeBlock.CopyButton />
224
+ * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
225
+ * </CodeBlock.Body>
226
+ * </CodeBlock.Root>
227
+ * ```
228
+ */
229
+ readonly Body: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
230
+ /**
231
+ * The `CodeBlock` content. This is where the code is rendered and syntax highlighted.
232
+ *
233
+ * @see https://mantle.ngrok.com/components/code-block#codeblockcode
234
+ *
235
+ * @example
236
+ * ```tsx
237
+ * <CodeBlock.Root>
238
+ * <CodeBlock.Body>
239
+ * <CodeBlock.Code
240
+ * language="sh"
241
+ * value={fmtCode`ffmpeg -i multichannel.mxf -map 0:v:0 -map 0:a:0`}
242
+ * />
243
+ * </CodeBlock.Body>
244
+ * </CodeBlock.Root>
245
+ * ```
246
+ */
247
+ readonly Code: react.ForwardRefExoticComponent<Omit<CodeBlockCodeProps, "ref"> & react.RefAttributes<HTMLPreElement>>;
248
+ /**
249
+ * The (optional) copy button of the `CodeBlock`. Render this as a child of the
250
+ * `CodeBlock.Body` to allow users to copy the code block contents to their
251
+ * clipboard.
252
+ *
253
+ * @see https://mantle.ngrok.com/components/code-block#codeblockcopybutton
254
+ *
255
+ * @example
256
+ * ```tsx
257
+ * <CodeBlock.Root>
258
+ * <CodeBlock.Body>
259
+ * <CodeBlock.CopyButton />
260
+ * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
261
+ * </CodeBlock.Body>
262
+ * </CodeBlock.Root>
263
+ * ```
264
+ */
265
+ readonly CopyButton: react.ForwardRefExoticComponent<Omit<CodeBlockCopyButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
266
+ /**
267
+ * The (optional) expander button of the `CodeBlock`. Render this as a child of the
268
+ * `CodeBlock.Body` to allow users to expand/collapse the code block contents.
269
+ *
270
+ * @see https://mantle.ngrok.com/components/code-block#codeblockexpanderbutton
271
+ *
272
+ * @example
273
+ * ```tsx
274
+ * <CodeBlock.Root>
275
+ * <CodeBlock.Body>
276
+ * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
277
+ * </CodeBlock.Body>
278
+ * <CodeBlock.ExpanderButton />
279
+ * </CodeBlock.Root>
280
+ * ```
281
+ */
282
+ readonly ExpanderButton: react.ForwardRefExoticComponent<Omit<CodeBlockExpanderButtonProps, "ref"> & react.RefAttributes<HTMLButtonElement>>;
283
+ /**
284
+ * The (optional) header slot of the `CodeBlock`. This is where things like the
285
+ * `CodeBlock.Icon` and `CodeBlock.Title` are rendered.
286
+ *
287
+ * @see https://mantle.ngrok.com/components/code-block#codeblockheader
288
+ *
289
+ * @example
290
+ * ```tsx
291
+ * <CodeBlock.Root>
292
+ * <CodeBlock.Header>
293
+ * <CodeBlock.Icon preset="file" />
294
+ * <CodeBlock.Title>…</CodeBlock.Title>
295
+ * </CodeBlock.Header>
296
+ * <CodeBlock.Body>
297
+ * <CodeBlock.Code language="…" value={fmtCode\`…\`} />
298
+ * </CodeBlock.Body>
299
+ * </CodeBlock.Root>
300
+ * ```
301
+ */
302
+ readonly Header: react.ForwardRefExoticComponent<Omit<react.ClassAttributes<HTMLDivElement> & HTMLAttributes<HTMLDivElement> & WithAsChild, "ref"> & react.RefAttributes<HTMLDivElement>>;
303
+ /**
304
+ * A small icon that represents the type of code block being displayed,
305
+ * rendered as an SVG next to the code block title in the code block header.
306
+ *
307
+ * You can pass in a custom SVG component or use one of the presets
308
+ * (pass only one of `svg` or `preset`).
309
+ *
310
+ * @see https://mantle.ngrok.com/components/code-block#codeblockicon
311
+ *
312
+ * @example
313
+ * ```tsx
314
+ * <CodeBlock.Root>
315
+ * <CodeBlock.Header>
316
+ * <CodeBlock.Icon preset="file" />
317
+ * <CodeBlock.Title>…</CodeBlock.Title>
318
+ * </CodeBlock.Header>
319
+ * </CodeBlock.Root>
320
+ * ```
321
+ */
322
+ readonly Icon: typeof CodeBlockIconComponent;
323
+ /**
324
+ * The (optional) title of the `CodeBlock`. Default renders as an h3 element,
325
+ * use asChild to render something else.
326
+ *
327
+ * @see https://mantle.ngrok.com/components/code-block#codeblocktitle
328
+ *
329
+ * @example
330
+ * ```tsx
331
+ * <CodeBlock.Root>
332
+ * <CodeBlock.Header>
333
+ * <CodeBlock.Icon preset="file" />
334
+ * <CodeBlock.Title>example.js</CodeBlock.Title>
335
+ * </CodeBlock.Header>
336
+ * </CodeBlock.Root>
337
+ * ```
338
+ */
339
+ readonly Title: react.ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & {
340
+ asChild?: boolean;
341
+ } & react.RefAttributes<HTMLHeadingElement>>;
329
342
  };
330
-
343
+ //#endregion
344
+ //#region src/components/code-block/escape-html.d.ts
331
345
  /**
332
346
  * Escapes special HTML characters in a string to their corresponding
333
347
  * HTML entities, preventing issues like unintended HTML rendering or
@@ -348,24 +362,27 @@ declare const CodeBlock: {
348
362
  * // Returns: '&lt;div&gt;Hello &amp; &quot;world&quot;&lt;/div&gt;'
349
363
  */
350
364
  declare function escapeHtml(value: string): string;
351
-
365
+ //#endregion
366
+ //#region src/components/code-block/fmt-code.d.ts
352
367
  type Primitive = string | number | boolean | undefined | null;
353
368
  /**
354
369
  * Tagged template literal to format code blocks and normalize leading indentation
355
370
  */
356
371
  declare function fmtCode(strings: TemplateStringsArray, ...values: Primitive[]): string;
357
-
372
+ //#endregion
373
+ //#region src/components/code-block/normalize.d.ts
358
374
  type Options = {
359
- /**
360
- * The indentation type to use. Can be either "tabs" or "spaces".
361
- * @default "spaces"
362
- */
363
- indentation?: Indentation;
375
+ /**
376
+ * The indentation type to use. Can be either "tabs" or "spaces".
377
+ * @default "spaces"
378
+ */
379
+ indentation?: Indentation;
364
380
  };
365
381
  /**
366
382
  * Trim any leading and trailing whitespace/empty lines, convert leading
367
383
  * indentation to the given options.indentation
368
384
  */
369
385
  declare function normalizeIndentation(value: string, options?: Options): string;
370
-
386
+ //#endregion
371
387
  export { CodeBlock, type DefaultMeta, type Meta, type MetaInput, type Mode, type SupportedLanguage, defaultMeta, escapeHtml, fmtCode, formatLanguageClassName, isSupportedLanguage, normalizeIndentation, parseLanguage, parseMetastring, supportedLanguages };
388
+ //# sourceMappingURL=code-block.d.ts.map