@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.
- package/README.md +32 -0
- package/dist/accordion.d.ts +1 -1
- package/dist/alert-dialog.d.ts +8 -8
- package/dist/alert.d.ts +3 -3
- package/dist/anchor.d.ts +1 -1
- package/dist/{as-child-XMVTepJu.d.ts → as-child-CRRsxi3Y.d.ts} +1 -1
- package/dist/badge.d.ts +2 -2
- package/dist/booleanish-CBGdPL3Q.js.map +1 -1
- package/dist/{button-ByK1wG1b.d.ts → button-B--2eT25.d.ts} +6 -6
- package/dist/button.d.ts +3 -3
- package/dist/card.d.ts +1 -1
- package/dist/checkbox.d.ts +2 -2
- package/dist/code-block.d.ts +176 -249
- package/dist/code-block.js +2 -8
- package/dist/code-block.js.map +1 -1
- package/dist/code-block_highlight-utils.d.ts +2 -0
- package/dist/code-block_highlight-utils.js +1 -0
- package/dist/color.d.ts +1 -1
- package/dist/combobox.d.ts +2 -2
- package/dist/combobox.js +1 -1
- package/dist/command.d.ts +8 -8
- package/dist/command.js +1 -1
- package/dist/data-table.d.ts +3 -3
- package/dist/data-table.js +1 -1
- package/dist/{deep-non-nullable-BLM3Gz0I.d.ts → deep-non-nullable-BBByg3-i.d.ts} +1 -1
- package/dist/description-list.d.ts +1 -1
- package/dist/{dialog-DUOIIhuN.js → dialog-PqWYibMO.js} +1 -1
- package/dist/{dialog-DUOIIhuN.js.map → dialog-PqWYibMO.js.map} +1 -1
- package/dist/dialog.d.ts +2 -2
- package/dist/dialog.js +1 -1
- package/dist/{direction-DYYpi-JC.d.ts → direction-C_bMxZXm.d.ts} +1 -1
- package/dist/{direction-DfrtFTny.js → direction-Ca88oQhP.js} +1 -1
- package/dist/{direction-DfrtFTny.js.map → direction-Ca88oQhP.js.map} +1 -1
- package/dist/{dropdown-menu-CUwyTKyu.js → dropdown-menu-9nO7ch0t.js} +2 -2
- package/dist/{dropdown-menu-CUwyTKyu.js.map → dropdown-menu-9nO7ch0t.js.map} +1 -1
- package/dist/{dropdown-menu-BEjpuGrT.d.ts → dropdown-menu-slQCdKvp.d.ts} +2 -2
- package/dist/dropdown-menu.d.ts +1 -1
- package/dist/dropdown-menu.js +1 -1
- package/dist/hooks.d.ts +6 -2
- package/dist/hooks.js +1 -1
- package/dist/{icon-B1XLv02t.d.ts → icon-BkSBkfH9.d.ts} +2 -2
- package/dist/{icon-button-2r6S3HVA.d.ts → icon-button-DMNdrMSf.d.ts} +3 -3
- package/dist/icon.d.ts +3 -3
- package/dist/icons.d.ts +3 -3
- package/dist/icons.js +1 -1
- package/dist/{in-view-ca-moloX.d.ts → in-view-DS0PgFGa.d.ts} +1 -1
- package/dist/{in-view-bPnaWEL4.js → in-view-DiFJ28EF.js} +1 -1
- package/dist/{in-view-bPnaWEL4.js.map → in-view-DiFJ28EF.js.map} +1 -1
- package/dist/{index-s8rMcilU.d.ts → index-BerTFFEC.d.ts} +1 -1
- package/dist/{index-BLCvtjLi.d.ts → index-C0yxjFyf.d.ts} +1 -1
- package/dist/{index-ViSCOUrU.d.ts → index-CI-RDnHZ.d.ts} +2 -2
- package/dist/{index-DWqhfw9n.d.ts → index-Cxmuw3UT.d.ts} +2 -2
- package/dist/input.d.ts +2 -2
- package/dist/input.js +1 -1
- package/dist/{is-input-BFR8yMM7.js → is-input-CC_n6EGM.js} +1 -1
- package/dist/{is-input-BFR8yMM7.js.map → is-input-CC_n6EGM.js.map} +1 -1
- package/dist/{kbd-CtTyMWXB.js → kbd-wgm9K9D5.js} +1 -1
- package/dist/{kbd-CtTyMWXB.js.map → kbd-wgm9K9D5.js.map} +1 -1
- package/dist/kbd.js +1 -1
- package/dist/mantle.css +56 -79
- package/dist/media-object.d.ts +1 -1
- package/dist/multi-select.d.ts +2 -2
- package/dist/multi-select.js +1 -1
- package/dist/multi-select.js.map +1 -1
- package/dist/pagination.d.ts +3 -3
- package/dist/pagination.js +1 -1
- package/dist/{primitive-tuHqhoRE.d.ts → primitive-BmWrmUz1.d.ts} +1 -1
- package/dist/radio-group.d.ts +1 -1
- package/dist/radio-group.js +1 -1
- package/dist/resolve-pre-rendered-props-51i50IL2.d.ts +165 -0
- package/dist/resolve-pre-rendered-props-Bu2cvS9A.js +11 -0
- package/dist/resolve-pre-rendered-props-Bu2cvS9A.js.map +1 -0
- package/dist/sandboxed-on-click.d.ts +1 -1
- package/dist/{select-BkvbNKQ7.d.ts → select-B3jxZhYg.d.ts} +3 -3
- package/dist/{select-BXBu1jP_.js → select-Z13w6WBS.js} +2 -2
- package/dist/{select-BXBu1jP_.js.map → select-Z13w6WBS.js.map} +1 -1
- package/dist/select.d.ts +1 -1
- package/dist/select.js +1 -1
- package/dist/{separator-fSV4z0Pq.js → separator-BuP5aENE.js} +1 -1
- package/dist/{separator-fSV4z0Pq.js.map → separator-BuP5aENE.js.map} +1 -1
- package/dist/separator.d.ts +1 -1
- package/dist/separator.js +1 -1
- package/dist/sheet.d.ts +2 -2
- package/dist/{sort-CfPsu1Gs.js → sort-mo52clyh.js} +2 -2
- package/dist/{sort-CfPsu1Gs.js.map → sort-mo52clyh.js.map} +1 -1
- package/dist/split-button.d.ts +3 -3
- package/dist/split-button.js +1 -1
- package/dist/{svg-only-Ct2mB46K.d.ts → svg-only-BH9PBSGl.d.ts} +2 -2
- package/dist/{table-Bs1D5Aj7.d.ts → table-CU7zx1pH.d.ts} +1 -1
- package/dist/{table-bSFWy29w.js → table-OYhLMxeE.js} +1 -1
- package/dist/{table-bSFWy29w.js.map → table-OYhLMxeE.js.map} +1 -1
- package/dist/table.d.ts +1 -1
- package/dist/table.js +1 -1
- package/dist/tabs.js +1 -1
- package/dist/tabs.js.map +1 -1
- package/dist/text-area.d.ts +1 -1
- package/dist/theme.d.ts +1 -1
- package/dist/{themes-Dk0VkyqX.d.ts → themes-D_v8H0nY.d.ts} +1 -1
- package/dist/toast.d.ts +3 -3
- package/dist/{types-DgXUgkpc.d.ts → types-Cq6RWU7Q.d.ts} +1 -1
- package/dist/{types-Dh4BVhXC.d.ts → types-yU-Byhue.d.ts} +1 -1
- package/dist/types.d.ts +5 -5
- package/dist/use-copy-to-clipboard-B6wH6hDd.js +2 -0
- package/dist/use-copy-to-clipboard-B6wH6hDd.js.map +1 -0
- package/dist/{use-prefers-reduced-motion-BiG6QGkf.js → use-prefers-reduced-motion-BcwST13S.js} +1 -1
- package/dist/{use-prefers-reduced-motion-BiG6QGkf.js.map → use-prefers-reduced-motion-BcwST13S.js.map} +1 -1
- package/dist/utils.d.ts +2 -2
- package/dist/utils.js +1 -1
- package/dist/{variant-props-UE-phTwh.d.ts → variant-props-Bm6Y-jfm.d.ts} +2 -2
- package/dist/{with-style-props-D1QFTzj6.d.ts → with-style-props-9-k1s4ov.d.ts} +1 -1
- package/package.json +6 -3
- package/dist/use-copy-to-clipboard-BCpEp-sO.js +0 -2
- 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.
|
package/dist/accordion.d.ts
CHANGED
package/dist/alert-dialog.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import { t as SvgAttributes } from "./types-
|
|
2
|
-
import { t as DeepNonNullable } from "./deep-non-nullable-
|
|
3
|
-
import { t as WithAsChild } from "./as-child-
|
|
4
|
-
import { t as Root$1 } from "./primitive-
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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-
|
|
2
|
-
import { t as WithAsChild } from "./as-child-
|
|
3
|
-
import { n as IconButtonProps } from "./icon-button-
|
|
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
package/dist/badge.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { t as WithAsChild } from "./as-child-
|
|
2
|
-
import { t as Color } from "./index-
|
|
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.
|
|
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-
|
|
2
|
-
import { t as VariantProps$1 } from "./variant-props-
|
|
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?: "
|
|
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?: "
|
|
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?: "
|
|
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-
|
|
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-
|
|
2
|
-
import { n as ButtonProps, t as Button } from "./button-
|
|
3
|
-
import { n as ButtonGroupProps, t as ButtonGroup } from "./index-
|
|
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
package/dist/checkbox.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { o as WithValidation } from "./types-
|
|
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">, "
|
|
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
|
*/
|