@ngrok/mantle 0.0.8 → 0.0.10
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/dist/index.d.ts +121 -68
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +834 -347
- package/dist/index.js.map +1 -1
- package/package.json +14 -14
package/dist/index.d.ts
CHANGED
|
@@ -1,16 +1,35 @@
|
|
|
1
|
-
import { ClassValue } from "clsx";
|
|
2
|
-
import { AnchorHTMLAttributes, ButtonHTMLAttributes, HTMLAttributes, CSSProperties, InputHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, PropsWithChildren } from "react";
|
|
3
1
|
import { VariantProps as _VariantProps1 } from "class-variance-authority";
|
|
4
|
-
import
|
|
2
|
+
import { ClassValue } from "clsx";
|
|
3
|
+
import { HTMLAttributes, AnchorHTMLAttributes, ButtonHTMLAttributes, CSSProperties, InputHTMLAttributes, ComponentPropsWithoutRef, SelectHTMLAttributes, TdHTMLAttributes, ThHTMLAttributes, TextareaHTMLAttributes, PropsWithChildren } from "react";
|
|
4
|
+
import { z } from "zod";
|
|
5
|
+
import * as DropdownMenuPrimitive from "@radix-ui/react-dropdown-menu";
|
|
5
6
|
import * as PopoverPrimitive from "@radix-ui/react-popover";
|
|
6
7
|
import * as SelectPrimitive from "@radix-ui/react-select";
|
|
7
|
-
import
|
|
8
|
+
import * as SheetPrimitive from "@radix-ui/react-dialog";
|
|
9
|
+
/**
|
|
10
|
+
* Makes all properties in an object non-nullable, recursively.
|
|
11
|
+
*/
|
|
12
|
+
type DeepNonNullable<Type> = {
|
|
13
|
+
[Property in keyof Type]-?: Type[Property] & {};
|
|
14
|
+
};
|
|
15
|
+
/**
|
|
16
|
+
* Variant props that are optional and cannot be `null`.
|
|
17
|
+
*
|
|
18
|
+
* Using VariantProps directly from CVA produces that can be `null`, which is not what we want.
|
|
19
|
+
*/
|
|
20
|
+
type VariantProps<Variants extends (props?: Record<PropertyKey, unknown> | undefined) => string> = Partial<DeepNonNullable<_VariantProps1<Variants>>>;
|
|
8
21
|
/**
|
|
9
22
|
* Conditionally add Tailwind (and other) CSS classes.
|
|
10
23
|
*
|
|
11
24
|
* Allows for tailwind overrides in LTR-specificity-like order of applied classes.
|
|
12
25
|
*/
|
|
13
26
|
export function cx(...inputs: ClassValue[]): string;
|
|
27
|
+
export const Alert: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & Partial<import("types/src/deep-non-nullable").DeepNonNullable<import("class-variance-authority").VariantProps<(props?: ({
|
|
28
|
+
priority?: "default" | "success" | "danger" | "info" | "warning" | null | undefined;
|
|
29
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>> & import("react").RefAttributes<HTMLDivElement>>;
|
|
30
|
+
export const AlertContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
31
|
+
export const AlertTitle: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLHeadingElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
32
|
+
export const AlertDescription: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLParagraphElement> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
14
33
|
/**
|
|
15
34
|
* Utility type for adding the `asChild` boolean prop to a component.
|
|
16
35
|
*/
|
|
@@ -42,18 +61,6 @@ export const anchorClassNames: (className: string | undefined) => string;
|
|
|
42
61
|
* [`@remix-run/react` `<Link>`](https://remix.run/docs/en/main/components/link).
|
|
43
62
|
*/
|
|
44
63
|
export const Anchor: import("react").ForwardRefExoticComponent<AnchorHTMLAttributes<HTMLAnchorElement> & WithAsChild & import("react").RefAttributes<HTMLAnchorElement>>;
|
|
45
|
-
/**
|
|
46
|
-
* Makes all properties in an object non-nullable, recursively.
|
|
47
|
-
*/
|
|
48
|
-
type DeepNonNullable<Type> = {
|
|
49
|
-
[Property in keyof Type]-?: Type[Property] & {};
|
|
50
|
-
};
|
|
51
|
-
/**
|
|
52
|
-
* Variant props that are optional and cannot be `null`.
|
|
53
|
-
*
|
|
54
|
-
* Using VariantProps directly from CVA produces that can be `null`, which is not what we want.
|
|
55
|
-
*/
|
|
56
|
-
type VariantProps<Variants extends (props?: Record<PropertyKey, unknown> | undefined) => string> = Partial<DeepNonNullable<_VariantProps1<Variants>>>;
|
|
57
64
|
declare const buttonVariants: (props?: ({
|
|
58
65
|
appearance?: "outline" | "solid" | "ghost" | null | undefined;
|
|
59
66
|
priority?: "default" | "muted" | "danger" | null | undefined;
|
|
@@ -71,7 +78,7 @@ export type ButtonProps = WithAsChild & ButtonHTMLAttributes<HTMLButtonElement>
|
|
|
71
78
|
*
|
|
72
79
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/button
|
|
73
80
|
*/
|
|
74
|
-
export const Button: import("react").ForwardRefExoticComponent<WithAsChild & ButtonHTMLAttributes<HTMLButtonElement> & Partial<import("types/deep-non-nullable").DeepNonNullable<import("class-variance-authority").VariantProps<(props?: ({
|
|
81
|
+
export const Button: import("react").ForwardRefExoticComponent<WithAsChild & ButtonHTMLAttributes<HTMLButtonElement> & Partial<import("types/src/deep-non-nullable").DeepNonNullable<import("class-variance-authority").VariantProps<(props?: ({
|
|
75
82
|
appearance?: "outline" | "solid" | "ghost" | null | undefined;
|
|
76
83
|
priority?: "default" | "muted" | "danger" | null | undefined;
|
|
77
84
|
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -157,19 +164,59 @@ export const CodeBlockCopyButton: import("react").ForwardRefExoticComponent<With
|
|
|
157
164
|
} & import("react").RefAttributes<HTMLButtonElement>>;
|
|
158
165
|
type CodeBlockExpanderButtonProps = Omit<HTMLAttributes<HTMLButtonElement>, "children" | "aria-controls" | "aria-expanded">;
|
|
159
166
|
export const CodeBlockExpanderButton: import("react").ForwardRefExoticComponent<CodeBlockExpanderButtonProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
export
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
167
|
+
type Primitive = string | number | boolean | undefined | null;
|
|
168
|
+
/**
|
|
169
|
+
* Tagged template literal to format code blocks and normalize leading indentation
|
|
170
|
+
*/
|
|
171
|
+
export function code(strings: TemplateStringsArray, ...values: Primitive[]): string;
|
|
172
|
+
declare const metaSchema: z.ZodObject<{
|
|
173
|
+
collapsible: z.ZodDefault<z.ZodBoolean>;
|
|
174
|
+
disableCopy: z.ZodDefault<z.ZodBoolean>;
|
|
175
|
+
mode: z.ZodOptional<z.ZodEnum<["file", "cli"]>>;
|
|
176
|
+
title: z.ZodOptional<z.ZodString>;
|
|
177
|
+
}, "strip", z.ZodTypeAny, {
|
|
178
|
+
collapsible: boolean;
|
|
179
|
+
disableCopy: boolean;
|
|
180
|
+
mode?: "file" | "cli" | undefined;
|
|
181
|
+
title?: string | undefined;
|
|
182
|
+
}, {
|
|
183
|
+
collapsible?: boolean | undefined;
|
|
184
|
+
disableCopy?: boolean | undefined;
|
|
185
|
+
mode?: "file" | "cli" | undefined;
|
|
186
|
+
title?: string | undefined;
|
|
187
|
+
}>;
|
|
188
|
+
type Meta = z.infer<typeof metaSchema>;
|
|
189
|
+
/**
|
|
190
|
+
* Parses a markdown code block (```) metastring into a meta object.
|
|
191
|
+
* Defaults to DefaultMeta if no metastring given or if metastring is invalid.
|
|
192
|
+
* Useful for parsing the metastring from a markdown code block to pass into the
|
|
193
|
+
* CodeBlock components as props.
|
|
194
|
+
*/
|
|
195
|
+
export function parseMetastring(value: string | undefined): Meta;
|
|
196
|
+
export const DropdownMenu: import("react").FC<DropdownMenuPrimitive.DropdownMenuProps>;
|
|
197
|
+
export const DropdownMenuTrigger: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
198
|
+
export const DropdownMenuGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
199
|
+
export const DropdownMenuPortal: import("react").FC<DropdownMenuPrimitive.DropdownMenuPortalProps>;
|
|
200
|
+
export const DropdownMenuSub: import("react").FC<DropdownMenuPrimitive.DropdownMenuSubProps>;
|
|
201
|
+
export const DropdownMenuRadioGroup: import("react").ForwardRefExoticComponent<DropdownMenuPrimitive.DropdownMenuRadioGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
202
|
+
export const DropdownMenuSubTrigger: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubTriggerProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
203
|
+
inset?: boolean | undefined;
|
|
204
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
205
|
+
export const DropdownMenuSubContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSubContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
206
|
+
export const DropdownMenuContent: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
207
|
+
export const DropdownMenuItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
208
|
+
inset?: boolean | undefined;
|
|
209
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
210
|
+
export const DropdownMenuCheckboxItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuCheckboxItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
211
|
+
export const DropdownMenuRadioItem: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuRadioItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
212
|
+
export const DropdownMenuLabel: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & {
|
|
213
|
+
inset?: boolean | undefined;
|
|
214
|
+
} & import("react").RefAttributes<HTMLDivElement>>;
|
|
215
|
+
export const DropdownMenuSeparator: import("react").ForwardRefExoticComponent<Omit<DropdownMenuPrimitive.DropdownMenuSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
216
|
+
export const DropdownMenuShortcut: {
|
|
217
|
+
({ className, ...props }: React.HTMLAttributes<HTMLSpanElement>): import("react/jsx-runtime").JSX.Element;
|
|
218
|
+
displayName: string;
|
|
219
|
+
};
|
|
173
220
|
/**
|
|
174
221
|
* A component to render inline code.
|
|
175
222
|
*/
|
|
@@ -194,23 +241,17 @@ export type AutoComplete = "off" | "on" | "name" | "honorific-prefix" | "given-n
|
|
|
194
241
|
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
|
|
195
242
|
*/
|
|
196
243
|
export type InputType = "button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week";
|
|
197
|
-
declare const inputVariants: (props?: ({
|
|
198
|
-
state?: "default" | "danger" | null | undefined;
|
|
199
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
200
|
-
type InputVariants = VariantProps<typeof inputVariants>;
|
|
201
244
|
/**
|
|
202
245
|
* The props for the `Input` component.
|
|
203
246
|
*/
|
|
204
|
-
export type InputProps =
|
|
247
|
+
export type InputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & {
|
|
205
248
|
autoComplete?: AutoComplete;
|
|
206
249
|
type?: InputType;
|
|
207
250
|
};
|
|
208
251
|
/**
|
|
209
252
|
* Used to create interactive controls for web-based forms in order to accept data from the user
|
|
210
253
|
*/
|
|
211
|
-
export const Input: import("react").ForwardRefExoticComponent<
|
|
212
|
-
state?: "default" | "danger" | null | undefined;
|
|
213
|
-
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>> & Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & {
|
|
254
|
+
export const Input: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & {
|
|
214
255
|
autoComplete?: AutoComplete | undefined;
|
|
215
256
|
type?: InputType | undefined;
|
|
216
257
|
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
@@ -235,10 +276,17 @@ export const MediaObjectMedia: import("react").ForwardRefExoticComponent<HTMLAtt
|
|
|
235
276
|
* The container for the content slot of a media object.
|
|
236
277
|
*/
|
|
237
278
|
export const MediaObjectContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
|
|
279
|
+
export type PasswordInputProps = Omit<InputHTMLAttributes<HTMLInputElement>, "autoComplete" | "type"> & {
|
|
280
|
+
autoComplete?: AutoComplete;
|
|
281
|
+
};
|
|
282
|
+
export const PasswordInput: import("react").ForwardRefExoticComponent<Omit<InputHTMLAttributes<HTMLInputElement>, "type" | "autoComplete"> & {
|
|
283
|
+
autoComplete?: AutoComplete | undefined;
|
|
284
|
+
} & import("react").RefAttributes<HTMLInputElement>>;
|
|
238
285
|
export const Popover: import("react").FC<PopoverPrimitive.PopoverProps>;
|
|
239
286
|
export const PopoverTrigger: import("react").ForwardRefExoticComponent<PopoverPrimitive.PopoverTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
240
287
|
export const PopoverContent: import("react").ForwardRefExoticComponent<Omit<PopoverPrimitive.PopoverContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
241
|
-
|
|
288
|
+
type SelectProps = ComponentPropsWithoutRef<typeof SelectPrimitive.Root> & Pick<SelectHTMLAttributes<HTMLSelectElement>, "aria-invalid">;
|
|
289
|
+
export const Select: ({ children, ...props }: SelectProps) => import("react/jsx-runtime").JSX.Element;
|
|
242
290
|
export const SelectGroup: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectGroupProps & import("react").RefAttributes<HTMLDivElement>>;
|
|
243
291
|
export const SelectValue: import("react").ForwardRefExoticComponent<SelectPrimitive.SelectValueProps & import("react").RefAttributes<HTMLSpanElement>>;
|
|
244
292
|
export const SelectTrigger: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectTriggerProps & import("react").RefAttributes<HTMLButtonElement>, "ref"> & import("react").RefAttributes<HTMLButtonElement>>;
|
|
@@ -246,7 +294,27 @@ export const SelectContent: import("react").ForwardRefExoticComponent<Omit<Selec
|
|
|
246
294
|
export const SelectLabel: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectLabelProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
247
295
|
export const SelectItem: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectItemProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
248
296
|
export const SelectSeparator: import("react").ForwardRefExoticComponent<Omit<SelectPrimitive.SelectSeparatorProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
297
|
+
export const Sheet: import("react").FC<SheetPrimitive.DialogProps>;
|
|
298
|
+
export const SheetTrigger: import("react").ForwardRefExoticComponent<SheetPrimitive.DialogTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
299
|
+
export const SheetClose: import("react").ForwardRefExoticComponent<SheetPrimitive.DialogCloseProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
300
|
+
export const SheetPortal: import("react").FC<SheetPrimitive.DialogPortalProps>;
|
|
301
|
+
export const SheetOverlay: import("react").ForwardRefExoticComponent<Omit<SheetPrimitive.DialogOverlayProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
302
|
+
export const SheetContent: import("react").ForwardRefExoticComponent<Omit<SheetPrimitive.DialogContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & _VariantProps1<(props?: ({
|
|
303
|
+
side?: "left" | "top" | "bottom" | "right" | null | undefined;
|
|
304
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string> & import("react").RefAttributes<HTMLDivElement>>;
|
|
305
|
+
export const SheetBody: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
306
|
+
export const SheetHeader: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
307
|
+
export const SheetFooter: ({ className, ...props }: HTMLAttributes<HTMLDivElement>) => import("react/jsx-runtime").JSX.Element;
|
|
308
|
+
export const SheetTitle: import("react").ForwardRefExoticComponent<Omit<SheetPrimitive.DialogTitleProps & import("react").RefAttributes<HTMLHeadingElement>, "ref"> & import("react").RefAttributes<HTMLHeadingElement>>;
|
|
309
|
+
export const SheetDescription: import("react").ForwardRefExoticComponent<Omit<SheetPrimitive.DialogDescriptionProps & import("react").RefAttributes<HTMLParagraphElement>, "ref"> & import("react").RefAttributes<HTMLParagraphElement>>;
|
|
249
310
|
type Props = Exclude<HTMLAttributes<HTMLDivElement>, "children">;
|
|
311
|
+
/**
|
|
312
|
+
* A skeleton is a placeholder for content that is loading.
|
|
313
|
+
* By using a skeleton, you can give the user an idea of what the content will
|
|
314
|
+
* look like and reduce the perceived loading time and CLS (Cumulative Layout Shift).
|
|
315
|
+
*
|
|
316
|
+
* @note Default height is 1rem.
|
|
317
|
+
*/
|
|
250
318
|
export function Skeleton({ className, ...props }: Props): import("react/jsx-runtime").JSX.Element;
|
|
251
319
|
export const Table: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableElement> & import("react").RefAttributes<HTMLTableElement>>;
|
|
252
320
|
export const TableHeader: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableSectionElement> & import("react").RefAttributes<HTMLTableSectionElement>>;
|
|
@@ -256,6 +324,16 @@ export const TableRow: import("react").ForwardRefExoticComponent<HTMLAttributes<
|
|
|
256
324
|
export const TableHead: import("react").ForwardRefExoticComponent<ThHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
257
325
|
export const TableCell: import("react").ForwardRefExoticComponent<TdHTMLAttributes<HTMLTableCellElement> & import("react").RefAttributes<HTMLTableCellElement>>;
|
|
258
326
|
export const TableCaption: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLTableCaptionElement> & import("react").RefAttributes<HTMLTableCaptionElement>>;
|
|
327
|
+
declare const textAreaVariants: (props?: ({
|
|
328
|
+
state?: "default" | "danger" | null | undefined;
|
|
329
|
+
appearance?: "monospaced" | null | undefined;
|
|
330
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string;
|
|
331
|
+
type TextAreaVariants = VariantProps<typeof textAreaVariants>;
|
|
332
|
+
export type TextAreaProps = TextareaHTMLAttributes<HTMLTextAreaElement> & Pick<TextAreaVariants, "appearance">;
|
|
333
|
+
export const TextArea: import("react").ForwardRefExoticComponent<TextareaHTMLAttributes<HTMLTextAreaElement> & Pick<Partial<import("types/src/deep-non-nullable").DeepNonNullable<import("class-variance-authority").VariantProps<(props?: ({
|
|
334
|
+
state?: "default" | "danger" | null | undefined;
|
|
335
|
+
appearance?: "monospaced" | null | undefined;
|
|
336
|
+
} & import("class-variance-authority/types").ClassProp) | undefined) => string>>>, "appearance"> & import("react").RefAttributes<HTMLTextAreaElement>>;
|
|
259
337
|
/**
|
|
260
338
|
* themes is a tuple of valid themes.
|
|
261
339
|
*/
|
|
@@ -290,6 +368,10 @@ export function ThemeProvider({ children, defaultTheme, storageKey }: ThemeProvi
|
|
|
290
368
|
* @note This function will throw an error if used outside of a ThemeProvider context tree.
|
|
291
369
|
*/
|
|
292
370
|
export function useTheme(): ThemeProviderState;
|
|
371
|
+
export function preventWrongThemeFlashScriptContent({ defaultTheme, storageKey, }: {
|
|
372
|
+
defaultTheme?: Theme;
|
|
373
|
+
storageKey?: string;
|
|
374
|
+
}): string;
|
|
293
375
|
/**
|
|
294
376
|
* PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
|
|
295
377
|
* Render as high as possible in the DOM, preferably in the <head> element.
|
|
@@ -302,34 +384,5 @@ export const TooltipProvider: import("react").FC<import("@radix-ui/react-tooltip
|
|
|
302
384
|
export const Tooltip: import("react").FC<import("@radix-ui/react-tooltip").TooltipProps>;
|
|
303
385
|
export const TooltipTrigger: import("react").ForwardRefExoticComponent<import("@radix-ui/react-tooltip").TooltipTriggerProps & import("react").RefAttributes<HTMLButtonElement>>;
|
|
304
386
|
export const TooltipContent: import("react").ForwardRefExoticComponent<Omit<import("@radix-ui/react-tooltip").TooltipContentProps & import("react").RefAttributes<HTMLDivElement>, "ref"> & import("react").RefAttributes<HTMLDivElement>>;
|
|
305
|
-
type Primitive = string | number | boolean | undefined | null;
|
|
306
|
-
/**
|
|
307
|
-
* Tagged template literal to format code blocks and normalize leading indentation
|
|
308
|
-
*/
|
|
309
|
-
export function code(strings: TemplateStringsArray, ...values: Primitive[]): string;
|
|
310
|
-
declare const metaSchema: z.ZodObject<{
|
|
311
|
-
collapsible: z.ZodDefault<z.ZodBoolean>;
|
|
312
|
-
disableCopy: z.ZodDefault<z.ZodBoolean>;
|
|
313
|
-
mode: z.ZodOptional<z.ZodEnum<["file", "cli"]>>;
|
|
314
|
-
title: z.ZodOptional<z.ZodString>;
|
|
315
|
-
}, "strip", z.ZodTypeAny, {
|
|
316
|
-
collapsible: boolean;
|
|
317
|
-
disableCopy: boolean;
|
|
318
|
-
mode?: "file" | "cli" | undefined;
|
|
319
|
-
title?: string | undefined;
|
|
320
|
-
}, {
|
|
321
|
-
collapsible?: boolean | undefined;
|
|
322
|
-
disableCopy?: boolean | undefined;
|
|
323
|
-
mode?: "file" | "cli" | undefined;
|
|
324
|
-
title?: string | undefined;
|
|
325
|
-
}>;
|
|
326
|
-
type Meta = z.infer<typeof metaSchema>;
|
|
327
|
-
/**
|
|
328
|
-
* Parses a markdown code block (```) metastring into a meta object.
|
|
329
|
-
* Defaults to DefaultMeta if no metastring given or if metastring is invalid.
|
|
330
|
-
* Useful for parsing the metastring from a markdown code block to pass into the
|
|
331
|
-
* CodeBlock components as props.
|
|
332
|
-
*/
|
|
333
|
-
export function parseMetastring(value: string | undefined): Meta;
|
|
334
387
|
|
|
335
388
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"mappings":"
|
|
1
|
+
{"mappings":";;;;;;;;AAAA;;GAEG;AACH,qBAA4B,IAAI,IAAI;KAClC,QAAQ,IAAI,MAAM,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,QAAQ,CAAC,GAAG,EAAE;CAC/C,CAAC;ACFF;;;;GAIG;AACH,kBAAyB,QAAQ,SAAS,CAAC,KAAK,CAAC,EAAE,MAAM,CAAC,WAAW,EAAE,OAAO,CAAC,GAAG,SAAS,KAAK,MAAM,IAAI,OAAO,CAChH,gBAAgB,eAAgB,QAAQ,CAAC,CAAC,CAC1C,CAAC;ACPF;;;;GAIG;AACH,mBAAmB,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC;AEaD,OAAA,MAAM;;kIAIL,CAAC;AAGF,OAAA,MAAM,uIAEJ,CAAC;AAGH,OAAA,MAAM,+IAIL,CAAC;AAGF,OAAA,MAAM,uJAIL,CAAC;AE9CF;;GAEG;AACH,0BAA0B;IACzB;;;;;;;;;;;;;OAaG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;CAClB,CAAC;ACd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CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,UA6BA;AAED;;;GAGG;AACH,OAAA,MAAM;;;6CAYL,CAAC;AEzQF,OAAA,MAAM,2FAA0B,CAAC;AAEjC,OAAA,MAAM,2EAAc,CAAC;AAErB,OAAA,MAAM,mKAAwB,CAAC;AAE/B,OAAA,MAAM,6NAYL,CAAC","sources":["components/components/types/src/deep-non-nullable.ts","components/components/types/src/variant-props.ts","components/components/core/src/cx.ts","components/components/core/index.ts","components/components/alert/src/alert.tsx","components/components/alert/index.tsx","components/components/types/src/as-child.ts","components/components/anchor/src/anchor.tsx","components/components/anchor/index.tsx","components/components/button/src/button.tsx","components/components/button/index.tsx","components/components/card/src/card.tsx","components/components/card/index.tsx","components/components/types/src/with-style-props.ts","components/components/code-block/src/line-numbers.ts","components/components/code-block/src/supported-languages.ts","components/components/code-block/src/code-block.tsx","components/components/code-block/src/code.ts","components/components/code-block/src/parse-metastring.ts","components/components/code-block/index.tsx","components/components/dropdown-menu/src/dropdown-menu.tsx","components/components/dropdown-menu/index.tsx","components/components/inline-code/src/inline-code.tsx","components/components/inline-code/index.tsx","components/components/input/src/types.ts","components/components/input/src/input.tsx","components/components/input/index.tsx","components/components/media-object/src/media-object.tsx","components/components/media-object/index.tsx","components/components/password-input/src/password-input.tsx","components/components/password-input/index.tsx","components/components/popover/src/popover.tsx","components/components/popover/index.tsx","components/components/select/src/select.tsx","components/components/select/index.tsx","components/components/sheet/src/sheet.tsx","components/components/sheet/index.tsx","components/components/skeleton/src/skeleton.tsx","components/components/skeleton/index.tsx","components/components/table/src/table.tsx","components/components/table/index.tsx","components/components/text-area/src/text-area.tsx","components/components/text-area/index.tsx","components/components/hooks/use-matches-media-query.tsx","components/components/theme-provider/src/theme-provider.tsx","components/components/theme-provider/index.tsx","components/components/tooltip/src/tooltip.tsx","components/components/tooltip/index.tsx","components/components/types/index.ts","components/components/index.tsx","components/index.tsx"],"sourcesContent":[null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,"export * from \"./alert\";\nexport * from \"./anchor\";\nexport * from \"./button\";\nexport * from \"./card\";\nexport * from \"./code-block\";\nexport * from \"./core\";\nexport * from \"./dropdown-menu\";\nexport * from \"./inline-code\";\nexport * from \"./input\";\nexport * from \"./media-object\";\nexport * from \"./password-input\";\nexport * from \"./popover\";\nexport * from \"./select\";\nexport * from \"./sheet\";\nexport * from \"./skeleton\";\nexport * from \"./table\";\nexport * from \"./text-area\";\nexport * from \"./theme-provider\";\nexport * from \"./tooltip\";\n\n// types exports\nexport * from \"./types\";\n"],"names":[],"version":3,"file":"index.d.ts.map"}
|