@ngrok/mantle 0.66.17 → 0.67.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 (113) hide show
  1. package/README.md +32 -0
  2. package/dist/accordion.d.ts +1 -1
  3. package/dist/alert-dialog.d.ts +8 -8
  4. package/dist/alert.d.ts +3 -3
  5. package/dist/anchor.d.ts +1 -1
  6. package/dist/{as-child-XMVTepJu.d.ts → as-child-CRRsxi3Y.d.ts} +1 -1
  7. package/dist/badge.d.ts +2 -2
  8. package/dist/booleanish-CBGdPL3Q.js.map +1 -1
  9. package/dist/{button-ByK1wG1b.d.ts → button-B--2eT25.d.ts} +6 -6
  10. package/dist/button.d.ts +3 -3
  11. package/dist/card.d.ts +1 -1
  12. package/dist/checkbox.d.ts +2 -2
  13. package/dist/code-block.d.ts +176 -249
  14. package/dist/code-block.js +2 -8
  15. package/dist/code-block.js.map +1 -1
  16. package/dist/code-block_highlight-utils.d.ts +2 -0
  17. package/dist/code-block_highlight-utils.js +1 -0
  18. package/dist/color.d.ts +1 -1
  19. package/dist/combobox.d.ts +2 -2
  20. package/dist/combobox.js +1 -1
  21. package/dist/command.d.ts +8 -8
  22. package/dist/command.js +1 -1
  23. package/dist/data-table.d.ts +3 -3
  24. package/dist/data-table.js +1 -1
  25. package/dist/{deep-non-nullable-BLM3Gz0I.d.ts → deep-non-nullable-BBByg3-i.d.ts} +1 -1
  26. package/dist/description-list.d.ts +1 -1
  27. package/dist/{dialog-DUOIIhuN.js → dialog-PqWYibMO.js} +1 -1
  28. package/dist/{dialog-DUOIIhuN.js.map → dialog-PqWYibMO.js.map} +1 -1
  29. package/dist/dialog.d.ts +2 -2
  30. package/dist/dialog.js +1 -1
  31. package/dist/{direction-DYYpi-JC.d.ts → direction-C_bMxZXm.d.ts} +1 -1
  32. package/dist/{direction-DfrtFTny.js → direction-Ca88oQhP.js} +1 -1
  33. package/dist/{direction-DfrtFTny.js.map → direction-Ca88oQhP.js.map} +1 -1
  34. package/dist/{dropdown-menu-CUwyTKyu.js → dropdown-menu-9nO7ch0t.js} +2 -2
  35. package/dist/{dropdown-menu-CUwyTKyu.js.map → dropdown-menu-9nO7ch0t.js.map} +1 -1
  36. package/dist/{dropdown-menu-BEjpuGrT.d.ts → dropdown-menu-slQCdKvp.d.ts} +2 -2
  37. package/dist/dropdown-menu.d.ts +1 -1
  38. package/dist/dropdown-menu.js +1 -1
  39. package/dist/hooks.d.ts +6 -2
  40. package/dist/hooks.js +1 -1
  41. package/dist/{icon-B1XLv02t.d.ts → icon-BkSBkfH9.d.ts} +2 -2
  42. package/dist/{icon-button-2r6S3HVA.d.ts → icon-button-DMNdrMSf.d.ts} +3 -3
  43. package/dist/icon.d.ts +3 -3
  44. package/dist/icons.d.ts +3 -3
  45. package/dist/icons.js +1 -1
  46. package/dist/{in-view-ca-moloX.d.ts → in-view-DS0PgFGa.d.ts} +1 -1
  47. package/dist/{in-view-bPnaWEL4.js → in-view-DiFJ28EF.js} +1 -1
  48. package/dist/{in-view-bPnaWEL4.js.map → in-view-DiFJ28EF.js.map} +1 -1
  49. package/dist/{index-s8rMcilU.d.ts → index-BerTFFEC.d.ts} +1 -1
  50. package/dist/{index-BLCvtjLi.d.ts → index-C0yxjFyf.d.ts} +1 -1
  51. package/dist/{index-ViSCOUrU.d.ts → index-CI-RDnHZ.d.ts} +2 -2
  52. package/dist/{index-DWqhfw9n.d.ts → index-Cxmuw3UT.d.ts} +2 -2
  53. package/dist/input.d.ts +2 -2
  54. package/dist/input.js +1 -1
  55. package/dist/{is-input-BFR8yMM7.js → is-input-CC_n6EGM.js} +1 -1
  56. package/dist/{is-input-BFR8yMM7.js.map → is-input-CC_n6EGM.js.map} +1 -1
  57. package/dist/{kbd-CtTyMWXB.js → kbd-wgm9K9D5.js} +1 -1
  58. package/dist/{kbd-CtTyMWXB.js.map → kbd-wgm9K9D5.js.map} +1 -1
  59. package/dist/kbd.js +1 -1
  60. package/dist/mantle.css +56 -79
  61. package/dist/media-object.d.ts +1 -1
  62. package/dist/multi-select.d.ts +2 -2
  63. package/dist/multi-select.js +1 -1
  64. package/dist/multi-select.js.map +1 -1
  65. package/dist/pagination.d.ts +3 -3
  66. package/dist/pagination.js +1 -1
  67. package/dist/{primitive-tuHqhoRE.d.ts → primitive-BmWrmUz1.d.ts} +1 -1
  68. package/dist/radio-group.d.ts +1 -1
  69. package/dist/radio-group.js +1 -1
  70. package/dist/resolve-pre-rendered-props-51i50IL2.d.ts +165 -0
  71. package/dist/resolve-pre-rendered-props-Bu2cvS9A.js +11 -0
  72. package/dist/resolve-pre-rendered-props-Bu2cvS9A.js.map +1 -0
  73. package/dist/sandboxed-on-click.d.ts +1 -1
  74. package/dist/{select-BkvbNKQ7.d.ts → select-B3jxZhYg.d.ts} +3 -3
  75. package/dist/{select-BXBu1jP_.js → select-Z13w6WBS.js} +2 -2
  76. package/dist/{select-BXBu1jP_.js.map → select-Z13w6WBS.js.map} +1 -1
  77. package/dist/select.d.ts +1 -1
  78. package/dist/select.js +1 -1
  79. package/dist/{separator-fSV4z0Pq.js → separator-BuP5aENE.js} +1 -1
  80. package/dist/{separator-fSV4z0Pq.js.map → separator-BuP5aENE.js.map} +1 -1
  81. package/dist/separator.d.ts +1 -1
  82. package/dist/separator.js +1 -1
  83. package/dist/sheet.d.ts +2 -2
  84. package/dist/{sort-CfPsu1Gs.js → sort-mo52clyh.js} +2 -2
  85. package/dist/{sort-CfPsu1Gs.js.map → sort-mo52clyh.js.map} +1 -1
  86. package/dist/split-button.d.ts +3 -3
  87. package/dist/split-button.js +1 -1
  88. package/dist/{svg-only-Ct2mB46K.d.ts → svg-only-BH9PBSGl.d.ts} +2 -2
  89. package/dist/{table-Bs1D5Aj7.d.ts → table-CU7zx1pH.d.ts} +1 -1
  90. package/dist/{table-bSFWy29w.js → table-OYhLMxeE.js} +1 -1
  91. package/dist/{table-bSFWy29w.js.map → table-OYhLMxeE.js.map} +1 -1
  92. package/dist/table.d.ts +1 -1
  93. package/dist/table.js +1 -1
  94. package/dist/tabs.js +1 -1
  95. package/dist/tabs.js.map +1 -1
  96. package/dist/text-area.d.ts +1 -1
  97. package/dist/theme.d.ts +1 -1
  98. package/dist/{themes-Dk0VkyqX.d.ts → themes-D_v8H0nY.d.ts} +1 -1
  99. package/dist/toast.d.ts +3 -3
  100. package/dist/{types-DgXUgkpc.d.ts → types-Cq6RWU7Q.d.ts} +1 -1
  101. package/dist/{types-Dh4BVhXC.d.ts → types-yU-Byhue.d.ts} +1 -1
  102. package/dist/types.d.ts +5 -5
  103. package/dist/use-copy-to-clipboard-B6wH6hDd.js +2 -0
  104. package/dist/use-copy-to-clipboard-B6wH6hDd.js.map +1 -0
  105. package/dist/{use-prefers-reduced-motion-BiG6QGkf.js → use-prefers-reduced-motion-BcwST13S.js} +1 -1
  106. package/dist/{use-prefers-reduced-motion-BiG6QGkf.js.map → use-prefers-reduced-motion-BcwST13S.js.map} +1 -1
  107. package/dist/utils.d.ts +2 -2
  108. package/dist/utils.js +1 -1
  109. package/dist/{variant-props-UE-phTwh.d.ts → variant-props-Bm6Y-jfm.d.ts} +2 -2
  110. package/dist/{with-style-props-D1QFTzj6.d.ts → with-style-props-9-k1s4ov.d.ts} +1 -1
  111. package/package.json +6 -3
  112. package/dist/use-copy-to-clipboard-BCpEp-sO.js +0 -2
  113. package/dist/use-copy-to-clipboard-BCpEp-sO.js.map +0 -1
package/README.md CHANGED
@@ -38,6 +38,38 @@ Also install the required `devDependencies`:
38
38
 
39
39
  Next, check out the [Overview & Setup](https://mantle.ngrok.com/) docs and start using mantle components in your application!
40
40
 
41
+ ## Code Block Tooling
42
+
43
+ Mantle ships runtime components from `@ngrok/mantle`, while build-time and server-side tooling lives in `@ngrok/mantle-vite-plugins`:
44
+
45
+ - `@ngrok/mantle/code-block`: runtime React components and `mantleCode` template tag
46
+ - `@ngrok/mantle-vite-plugins`: Vite + rehype integration via `mantleCodeBlockPlugins()`
47
+ - `@ngrok/mantle-server-syntax-highlighter`: server-side highlighting engine for API routes/actions
48
+
49
+ This keeps Vite/Shiki/parser dependencies out of frontend installs that only need Mantle's runtime UI package.
50
+
51
+ For a concrete service implementation, see [`apps/highlight-server`](../../apps/highlight-server/README.md), a Bun + Hono syntax-highlighting API that preloads Shiki and serves highlighted HTML for server-side use cases.
52
+
53
+ ### Vite + MDX
54
+
55
+ ```ts
56
+ import { mantleCodeBlockPlugins } from "@ngrok/mantle-vite-plugins";
57
+
58
+ const codeBlockPlugins = mantleCodeBlockPlugins();
59
+ ```
60
+
61
+ ### Server Highlighter
62
+
63
+ ```ts
64
+ import { createMantleServerSyntaxHighlighter } from "@ngrok/mantle-server-syntax-highlighter";
65
+
66
+ const highlighter = createMantleServerSyntaxHighlighter();
67
+ const result = await highlighter.highlight({
68
+ code: "const x = 1",
69
+ language: "typescript",
70
+ });
71
+ ```
72
+
41
73
  ## Git Hooks
42
74
 
43
75
  Pre-commit hooks run automatically via [husky](https://typicode.github.io/husky/) and [lint-staged](https://github.com/lint-staged/lint-staged). On every commit, staged files are formatted with oxfmt and linted with oxlint.
@@ -1,4 +1,4 @@
1
- import { n as IconProps } from "./icon-B1XLv02t.js";
1
+ import { n as IconProps } from "./icon-BkSBkfH9.js";
2
2
  import * as AccordionPrimitive from "@radix-ui/react-accordion";
3
3
  import * as react from "react";
4
4
  import { ComponentPropsWithoutRef } from "react";
@@ -1,7 +1,7 @@
1
- import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
2
- import { t as DeepNonNullable } from "./deep-non-nullable-BLM3Gz0I.js";
3
- import { t as WithAsChild } from "./as-child-XMVTepJu.js";
4
- import { t as Root$1 } from "./primitive-tuHqhoRE.js";
1
+ import { t as SvgAttributes } from "./types-yU-Byhue.js";
2
+ import { t as DeepNonNullable } from "./deep-non-nullable-BBByg3-i.js";
3
+ import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
4
+ import { t as Root$1 } from "./primitive-BmWrmUz1.js";
5
5
  import * as react from "react";
6
6
  import { ComponentProps, ReactNode } from "react";
7
7
  import * as react_jsx_runtime0 from "react/jsx-runtime";
@@ -147,7 +147,7 @@ declare const AlertDialog: {
147
147
  * ```
148
148
  */
149
149
  readonly Action: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
150
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
150
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
151
151
  isLoading?: boolean | null | undefined;
152
152
  priority?: "default" | "danger" | "neutral" | null | undefined;
153
153
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
@@ -157,7 +157,7 @@ declare const AlertDialog: {
157
157
  asChild: true;
158
158
  type?: ComponentProps<"button">["type"];
159
159
  }, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
160
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
160
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
161
161
  isLoading?: boolean | null | undefined;
162
162
  priority?: "default" | "danger" | "neutral" | null | undefined;
163
163
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
@@ -204,7 +204,7 @@ declare const AlertDialog: {
204
204
  * ```
205
205
  */
206
206
  readonly Cancel: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
207
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
207
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
208
208
  isLoading?: boolean | null | undefined;
209
209
  priority?: "default" | "danger" | "neutral" | null | undefined;
210
210
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
@@ -214,7 +214,7 @@ declare const AlertDialog: {
214
214
  asChild: true;
215
215
  type?: ComponentProps<"button">["type"];
216
216
  }, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
217
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
217
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
218
218
  isLoading?: boolean | null | undefined;
219
219
  priority?: "default" | "danger" | "neutral" | null | undefined;
220
220
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
package/dist/alert.d.ts CHANGED
@@ -1,6 +1,6 @@
1
- import { t as SvgAttributes } from "./types-Dh4BVhXC.js";
2
- import { t as WithAsChild } from "./as-child-XMVTepJu.js";
3
- import { n as IconButtonProps } from "./icon-button-2r6S3HVA.js";
1
+ import { t as SvgAttributes } from "./types-yU-Byhue.js";
2
+ import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
3
+ import { n as IconButtonProps } from "./icon-button-DMNdrMSf.js";
4
4
  import * as react from "react";
5
5
  import { ComponentProps, HTMLAttributes, ReactNode } from "react";
6
6
  import * as react_jsx_runtime0 from "react/jsx-runtime";
package/dist/anchor.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as WithAsChild } from "./as-child-XMVTepJu.js";
1
+ import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
2
2
  import * as react from "react";
3
3
  import { ComponentProps, ReactNode } from "react";
4
4
 
@@ -28,4 +28,4 @@ type WithAsChild = {
28
28
  */
29
29
  //#endregion
30
30
  export { WithAsChild as t };
31
- //# sourceMappingURL=as-child-XMVTepJu.d.ts.map
31
+ //# sourceMappingURL=as-child-CRRsxi3Y.d.ts.map
package/dist/badge.d.ts CHANGED
@@ -1,5 +1,5 @@
1
- import { t as WithAsChild } from "./as-child-XMVTepJu.js";
2
- import { t as Color } from "./index-BLCvtjLi.js";
1
+ import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
2
+ import { t as Color } from "./index-C0yxjFyf.js";
3
3
  import { ComponentProps, ReactNode } from "react";
4
4
  import * as react_jsx_runtime0 from "react/jsx-runtime";
5
5
 
@@ -1 +1 @@
1
- {"version":3,"file":"booleanish-CBGdPL3Q.js","names":[],"sources":["../src/types/booleanish.tsx"],"sourcesContent":["export type Booleanish = boolean | \"true\" | \"false\";\n\n/**\n * Parse/coerce a booleanish value (boolean | \"true\" | \"false\") into a boolean.\n * @default false if the value is not a boolean or \"true\"\n */\nexport function parseBooleanish(value: Booleanish | (string & {}) | undefined | null): boolean {\n\treturn typeof value === \"boolean\" ? value : value === \"true\";\n}\n"],"mappings":"AAMA,SAAgB,EAAgB,EAA+D,CAC9F,OAAO,OAAO,GAAU,UAAY,EAAQ,IAAU"}
1
+ {"version":3,"file":"booleanish-CBGdPL3Q.js","names":[],"sources":["../src/types/booleanish.ts"],"sourcesContent":["export type Booleanish = boolean | \"true\" | \"false\";\n\n/**\n * Parse/coerce a booleanish value (boolean | \"true\" | \"false\") into a boolean.\n * @default false if the value is not a boolean or \"true\"\n */\nexport function parseBooleanish(value: Booleanish | (string & {}) | undefined | null): boolean {\n\treturn typeof value === \"boolean\" ? value : value === \"true\";\n}\n"],"mappings":"AAMA,SAAgB,EAAgB,EAA+D,CAC9F,OAAO,OAAO,GAAU,UAAY,EAAQ,IAAU"}
@@ -1,5 +1,5 @@
1
- import { t as DeepNonNullable } from "./deep-non-nullable-BLM3Gz0I.js";
2
- import { t as VariantProps$1 } from "./variant-props-UE-phTwh.js";
1
+ import { t as DeepNonNullable } from "./deep-non-nullable-BBByg3-i.js";
2
+ import { t as VariantProps$1 } from "./variant-props-Bm6Y-jfm.js";
3
3
  import * as react from "react";
4
4
  import { ComponentProps, ReactNode } from "react";
5
5
  import * as class_variance_authority0 from "class-variance-authority";
@@ -7,7 +7,7 @@ import * as class_variance_authority_types0 from "class-variance-authority/types
7
7
 
8
8
  //#region src/components/button/button.d.ts
9
9
  declare const buttonVariants: (props?: ({
10
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
10
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
11
11
  isLoading?: boolean | null | undefined;
12
12
  priority?: "default" | "danger" | "neutral" | null | undefined;
13
13
  } & class_variance_authority_types0.ClassProp) | undefined) => string;
@@ -91,7 +91,7 @@ type ButtonProps = ComponentProps<"button"> & ButtonVariants & {
91
91
  * ```
92
92
  */
93
93
  declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
94
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
94
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
95
95
  isLoading?: boolean | null | undefined;
96
96
  priority?: "default" | "danger" | "neutral" | null | undefined;
97
97
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
@@ -137,7 +137,7 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttribute
137
137
  */
138
138
  type?: ComponentProps<"button">["type"];
139
139
  }, "ref"> | Omit<react.ClassAttributes<HTMLButtonElement> & react.ButtonHTMLAttributes<HTMLButtonElement> & Partial<DeepNonNullable<class_variance_authority0.VariantProps<(props?: ({
140
- appearance?: "filled" | "link" | "ghost" | "outlined" | null | undefined;
140
+ appearance?: "link" | "filled" | "ghost" | "outlined" | null | undefined;
141
141
  isLoading?: boolean | null | undefined;
142
142
  priority?: "default" | "danger" | "neutral" | null | undefined;
143
143
  } & class_variance_authority_types0.ClassProp) | undefined) => string>>> & {
@@ -172,4 +172,4 @@ declare const Button: react.ForwardRefExoticComponent<(Omit<react.ClassAttribute
172
172
  }, "ref">) & react.RefAttributes<HTMLButtonElement>>;
173
173
  //#endregion
174
174
  export { ButtonProps as n, Button as t };
175
- //# sourceMappingURL=button-ByK1wG1b.d.ts.map
175
+ //# sourceMappingURL=button-B--2eT25.d.ts.map
package/dist/button.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { n as IconButtonProps, t as IconButton } from "./icon-button-2r6S3HVA.js";
2
- import { n as ButtonProps, t as Button } from "./button-ByK1wG1b.js";
3
- import { n as ButtonGroupProps, t as ButtonGroup } from "./index-ViSCOUrU.js";
1
+ import { n as IconButtonProps, t as IconButton } from "./icon-button-DMNdrMSf.js";
2
+ import { n as ButtonProps, t as Button } from "./button-B--2eT25.js";
3
+ import { n as ButtonGroupProps, t as ButtonGroup } from "./index-CI-RDnHZ.js";
4
4
  export { Button, ButtonGroup, ButtonGroupProps, ButtonProps, IconButton, IconButtonProps };
package/dist/card.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { t as WithAsChild } from "./as-child-XMVTepJu.js";
1
+ import { t as WithAsChild } from "./as-child-CRRsxi3Y.js";
2
2
  import * as react from "react";
3
3
  import { ComponentProps, HTMLAttributes } from "react";
4
4
 
@@ -1,4 +1,4 @@
1
- import { o as WithValidation } from "./types-DgXUgkpc.js";
1
+ import { o as WithValidation } from "./types-Cq6RWU7Q.js";
2
2
  import * as react from "react";
3
3
 
4
4
  //#region src/components/checkbox/checkbox.d.ts
@@ -19,7 +19,7 @@ type CheckedState = boolean | "indeterminate";
19
19
  * </form>
20
20
  * ```
21
21
  */
22
- declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "type" | "defaultChecked" | "checked"> & WithValidation & {
22
+ declare const Checkbox: react.ForwardRefExoticComponent<Omit<Omit<react.DetailedHTMLProps<react.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref">, "defaultChecked" | "type" | "checked"> & WithValidation & {
23
23
  /**
24
24
  * The controlled checked state of the checkbox. Must be used in conjunction with onChange.
25
25
  */