@ngrok/mantle 0.0.1-alpha.3 → 0.0.1-alpha.4

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.
@@ -0,0 +1,16 @@
1
+ export { Button } from "./button";
2
+ export { Card, CardBody, CardFooter, CardHeader, CardTitle } from "./card";
3
+ export { default as TailwindPreset } from "./core/tailwind.preset";
4
+ export { cx } from "./cx";
5
+ export { Input } from "./input";
6
+ export { MediaObject, MediaObjectMedia, MediaObjectContent } from "./media-object";
7
+ export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme } from "./theme-provider";
8
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./tooltip";
9
+ export type { ButtonProps } from "./button";
10
+ export type { CardProps, CardTitleProps } from "./card";
11
+ export type { InputProps } from "./input";
12
+ export type { AutoComplete, InputType } from "./input/types";
13
+ export type { Theme, ThemeProviderProps } from "./theme-provider";
14
+ export type { WithAsChild } from "./types/as-child";
15
+ export type { WithStyleProps } from "./types/with-style-props";
16
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../components/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,UAAU,CAAC;AAClC,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,MAAM,QAAQ,CAAC;AAC3E,OAAO,EAAE,OAAO,IAAI,cAAc,EAAE,MAAM,wBAAwB,CAAC;AACnE,OAAO,EAAE,EAAE,EAAE,MAAM,MAAM,CAAC;AAC1B,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAChC,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,MAAM,gBAAgB,CAAC;AACnF,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5F,OAAO,EAAE,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,eAAe,EAAE,MAAM,WAAW,CAAC;AAGrF,YAAY,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAC5C,YAAY,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,QAAQ,CAAC;AACxD,YAAY,EAAE,UAAU,EAAE,MAAM,SAAS,CAAC;AAC1C,YAAY,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,eAAe,CAAC;AAC7D,YAAY,EAAE,KAAK,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAC;AAClE,YAAY,EAAE,WAAW,EAAE,MAAM,kBAAkB,CAAC;AACpD,YAAY,EAAE,cAAc,EAAE,MAAM,0BAA0B,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,9 @@
1
+ // component exports
2
+ export { Button } from "./button";
3
+ export { Card, CardBody, CardFooter, CardHeader, CardTitle } from "./card";
4
+ export { default as TailwindPreset } from "./core/tailwind.preset";
5
+ export { cx } from "./cx";
6
+ export { Input } from "./input";
7
+ export { MediaObject, MediaObjectMedia, MediaObjectContent } from "./media-object";
8
+ export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme } from "./theme-provider";
9
+ export { Tooltip, TooltipTrigger, TooltipContent, TooltipProvider } from "./tooltip";
@@ -1,6 +1,6 @@
1
1
  import type { InputHTMLAttributes } from "react";
2
2
  import type { VariantProps } from "../types/variant-props";
3
- import type { AutoComplete, InputType } from "../types/input";
3
+ import type { AutoComplete, InputType } from "./types";
4
4
  declare const inputVariants: (props?: ({
5
5
  state?: "default" | "danger" | "success" | null | undefined;
6
6
  } & import("class-variance-authority/types").ClassProp) | undefined) => string;
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAC;AAE9D,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,KAAK,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,GACrC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,GAAG;IACtE,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,KAAK;;;;;oDAIV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/input/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,OAAO,CAAC;AAKjD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,KAAK,EAAE,YAAY,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,QAAA,MAAM,aAAa;;8EAiBlB,CAAC;AAEF,KAAK,aAAa,GAAG,YAAY,CAAC,OAAO,aAAa,CAAC,CAAC;AAExD;;GAEG;AACH,MAAM,MAAM,UAAU,GAAG,aAAa,GACrC,IAAI,CAAC,mBAAmB,CAAC,gBAAgB,CAAC,EAAE,cAAc,GAAG,MAAM,CAAC,GAAG;IACtE,YAAY,CAAC,EAAE,YAAY,CAAC;IAC5B,IAAI,CAAC,EAAE,SAAS,CAAC;CACjB,CAAC;AAEH;;GAEG;AACH,QAAA,MAAM,KAAK;;;;;oDAIV,CAAC;AAGF,OAAO,EAAE,KAAK,EAAE,CAAC"}
@@ -18,4 +18,4 @@ export type AutoComplete = "off" | "on" | "name" | "honorific-prefix" | "given-n
18
18
  * @see https://developer.mozilla.org/en-US/docs/Web/HTML/Element/input#input_types
19
19
  */
20
20
  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";
21
- //# sourceMappingURL=input.d.ts.map
21
+ //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../components/types/input.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GACrB,KAAK,GACL,IAAI,GACJ,MAAM,GACN,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,UAAU,GACV,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,UAAU,GACV,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,KAAK,GACL,KAAK,GACL,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,WAAW,GACX,eAAe,GACf,MAAM,GACN,KAAK,GACL,OAAO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAClB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../components/input/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AACH,MAAM,MAAM,YAAY,GACrB,KAAK,GACL,IAAI,GACJ,MAAM,GACN,kBAAkB,GAClB,YAAY,GACZ,iBAAiB,GACjB,aAAa,GACb,kBAAkB,GAClB,UAAU,GACV,OAAO,GACP,UAAU,GACV,cAAc,GACd,kBAAkB,GAClB,eAAe,GACf,oBAAoB,GACpB,cAAc,GACd,gBAAgB,GAChB,eAAe,GACf,eAAe,GACf,eAAe,GACf,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,gBAAgB,GAChB,SAAS,GACT,cAAc,GACd,aAAa,GACb,SAAS,GACT,eAAe,GACf,oBAAoB,GACpB,gBAAgB,GAChB,WAAW,GACX,QAAQ,GACR,cAAc,GACd,aAAa,GACb,QAAQ,GACR,SAAS,GACT,sBAAsB,GACtB,oBAAoB,GACpB,UAAU,GACV,MAAM,GACN,UAAU,GACV,YAAY,GACZ,WAAW,GACX,KAAK,GACL,KAAK,GACL,kBAAkB,GAClB,cAAc,GACd,eAAe,GACf,WAAW,GACX,eAAe,GACf,MAAM,GACN,KAAK,GACL,OAAO,CAAC;AAEX;;;;;GAKG;AACH,MAAM,MAAM,SAAS,GAClB,QAAQ,GACR,UAAU,GACV,OAAO,GACP,MAAM,GACN,gBAAgB,GAChB,OAAO,GACP,MAAM,GACN,QAAQ,GACR,OAAO,GACP,OAAO,GACP,QAAQ,GACR,UAAU,GACV,OAAO,GACP,OAAO,GACP,OAAO,GACP,QAAQ,GACR,QAAQ,GACR,KAAK,GACL,MAAM,GACN,MAAM,GACN,KAAK,GACL,MAAM,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import type { HTMLAttributes } from "react";
2
- type Props = HTMLAttributes<HTMLDivElement>;
3
2
  /**
4
3
  * The media object is an image/icon (media) to the left, with descriptive
5
4
  * content (title and subtitle/description) to the right.
@@ -12,14 +11,14 @@ type Props = HTMLAttributes<HTMLDivElement>;
12
11
  * Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`
13
12
  * components as direct children.
14
13
  */
15
- export declare const MediaObject: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
14
+ declare const MediaObject: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
16
15
  /**
17
16
  * The container for an image or icon to display in the media slot of the media object.
18
17
  */
19
- export declare const MediaObjectMedia: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
18
+ declare const MediaObjectMedia: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
20
19
  /**
21
20
  * The container for the content slot of a media object.
22
21
  */
23
- export declare const MediaObjectContent: import("react").ForwardRefExoticComponent<Props & import("react").RefAttributes<HTMLDivElement>>;
24
- export {};
22
+ declare const MediaObjectContent: import("react").ForwardRefExoticComponent<HTMLAttributes<HTMLDivElement> & import("react").RefAttributes<HTMLDivElement>>;
23
+ export { MediaObject, MediaObjectMedia, MediaObjectContent };
25
24
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/media-object/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C,KAAK,KAAK,GAAG,cAAc,CAAC,cAAc,CAAC,CAAC;AAE5C;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,kGAItB,CAAC;AAGH;;GAEG;AACH,eAAO,MAAM,gBAAgB,kGAI3B,CAAC;AAGH;;GAEG;AACH,eAAO,MAAM,kBAAkB,kGAI7B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/media-object/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,OAAO,CAAC;AAI5C;;;;;;;;;;;GAWG;AACH,QAAA,MAAM,WAAW,2HAMhB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,gBAAgB,2HAMrB,CAAC;AAGF;;GAEG;AACH,QAAA,MAAM,kBAAkB,2HAMvB,CAAC;AAGF,OAAO,EAAE,WAAW,EAAE,gBAAgB,EAAE,kBAAkB,EAAE,CAAC"}
@@ -13,15 +13,16 @@ import { cx } from "../cx";
13
13
  * Compose the media object with the `MediaObjectMedia` and `MediaObjectContent`
14
14
  * components as direct children.
15
15
  */
16
- export const MediaObject = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("flex gap-4", className), style: style, children: children })));
16
+ const MediaObject = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("flex gap-4", className), style: style, children: children })));
17
17
  MediaObject.displayName = "MediaObject";
18
18
  /**
19
19
  * The container for an image or icon to display in the media slot of the media object.
20
20
  */
21
- export const MediaObjectMedia = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("shrink-0 leading-none", className), style: style, children: children })));
21
+ const MediaObjectMedia = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("shrink-0 leading-none", className), style: style, children: children })));
22
22
  MediaObjectMedia.displayName = "MediaObjectMedia";
23
23
  /**
24
24
  * The container for the content slot of a media object.
25
25
  */
26
- export const MediaObjectContent = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("min-w-0 flex-1", className), style: style, children: children })));
26
+ const MediaObjectContent = forwardRef(({ className, children, style }, ref) => (_jsx("div", { ref: ref, className: cx("min-w-0 flex-1", className), style: style, children: children })));
27
27
  MediaObjectContent.displayName = "MediaObjectContent";
28
+ export { MediaObject, MediaObjectMedia, MediaObjectContent };
@@ -6,7 +6,7 @@ declare const themes: readonly ["system", "light", "dark", "light-high-contrast"
6
6
  /**
7
7
  * Theme is a string literal type that represents a valid theme.
8
8
  */
9
- export type Theme = (typeof themes)[number];
9
+ type Theme = (typeof themes)[number];
10
10
  /**
11
11
  * theme is a helper which translates the Theme type into a string literal type.
12
12
  */
@@ -14,25 +14,25 @@ export declare const theme: (value: Theme) => "light" | "system" | "dark" | "lig
14
14
  /**
15
15
  * Type predicate that checks if a value is a valid theme.
16
16
  */
17
- export declare function isTheme(value: unknown): value is Theme;
17
+ declare function isTheme(value: unknown): value is Theme;
18
18
  /**
19
19
  * ThemeProviderState is the shape of the state returned by the ThemeProviderContext.
20
20
  */
21
21
  type ThemeProviderState = [theme: Theme, setTheme: (theme: Theme) => void];
22
- type Props = PropsWithChildren & {
22
+ type ThemeProviderProps = PropsWithChildren & {
23
23
  defaultTheme?: Theme;
24
24
  storageKey?: string;
25
25
  };
26
26
  /**
27
27
  * ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.
28
28
  */
29
- export declare function ThemeProvider({ children, defaultTheme, storageKey }: Props): import("react/jsx-runtime").JSX.Element;
29
+ declare function ThemeProvider({ children, defaultTheme, storageKey }: ThemeProviderProps): import("react/jsx-runtime").JSX.Element;
30
30
  /**
31
31
  * useTheme returns the current theme and a function to set the theme.
32
32
  *
33
33
  * @note This function will throw an error if used outside of a ThemeProvider context tree.
34
34
  */
35
- export declare function useTheme(): ThemeProviderState;
35
+ declare function useTheme(): ThemeProviderState;
36
36
  /**
37
37
  * determineThemeFromMediaQuery returns the theme that should be used based on the user's media query preferences.
38
38
  */
@@ -44,9 +44,10 @@ export declare function determineThemeFromMediaQuery({ prefersDarkMode, prefersC
44
44
  * PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
45
45
  * Render as high as possible in the DOM, preferably in the <head> element.
46
46
  */
47
- export declare const PreventWrongThemeFlash: ({ defaultTheme, storageKey, }: {
47
+ declare const PreventWrongThemeFlash: ({ defaultTheme, storageKey, }: {
48
48
  defaultTheme?: "light" | "system" | "dark" | "light-high-contrast" | "dark-high-contrast" | undefined;
49
49
  storageKey?: string | undefined;
50
50
  }) => import("react/jsx-runtime").JSX.Element;
51
- export {};
51
+ export type { Theme, ThemeProviderProps };
52
+ export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme };
52
53
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/theme-provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAc/C;;GAEG;AACH,QAAA,MAAM,MAAM,mFAAoF,CAAC;AAEjG;;GAEG;AACH,MAAM,MAAM,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,KAAK,+EAAU,CAAC;AAE7C;;GAEG;AACH,wBAAgB,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAMtD;AAOD;;GAEG;AACH,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC;AAY3E,KAAK,KAAK,GAAG,iBAAiB,GAAG;IAChC,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAkBF;;GAEG;AACH,wBAAgB,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAuB,EAAE,UAAgC,EAAE,EAAE,KAAK,2CA4B3G;AAED;;;;GAIG;AACH,wBAAgB,QAAQ,uBAMvB;AAmBD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,EAC5C,eAAe,EACf,mBAAmB,GACnB,EAAE;IACF,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC7B,mEAMA;AAED;;;GAGG;AACH,eAAO,MAAM,sBAAsB;;;6CAkClC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../components/theme-provider/index.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAc/C;;GAEG;AACH,QAAA,MAAM,MAAM,mFAAoF,CAAC;AAEjG;;GAEG;AACH,KAAK,KAAK,GAAG,CAAC,OAAO,MAAM,CAAC,CAAC,MAAM,CAAC,CAAC;AAErC;;GAEG;AACH,eAAO,MAAM,KAAK,UAAW,KAAK,+EAAU,CAAC;AAE7C;;GAEG;AACH,iBAAS,OAAO,CAAC,KAAK,EAAE,OAAO,GAAG,KAAK,IAAI,KAAK,CAM/C;AAOD;;GAEG;AACH,KAAK,kBAAkB,GAAG,CAAC,KAAK,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC,CAAC;AA4B3E,KAAK,kBAAkB,GAAG,iBAAiB,GAAG;IAC7C,YAAY,CAAC,EAAE,KAAK,CAAC;IACrB,UAAU,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAEF;;GAEG;AACH,iBAAS,aAAa,CAAC,EAAE,QAAQ,EAAE,YAAuB,EAAE,UAAgC,EAAE,EAAE,kBAAkB,2CA4BjH;AAED;;;;GAIG;AACH,iBAAS,QAAQ,uBAMhB;AAmBD;;GAEG;AACH,wBAAgB,4BAA4B,CAAC,EAC5C,eAAe,EACf,mBAAmB,GACnB,EAAE;IACF,eAAe,EAAE,OAAO,CAAC;IACzB,mBAAmB,EAAE,OAAO,CAAC;CAC7B,mEAMA;AAED;;;GAGG;AACH,QAAA,MAAM,sBAAsB;;;6CAkC3B,CAAC;AAEF,YAAY,EAAE,KAAK,EAAE,kBAAkB,EAAE,CAAC;AAC1C,OAAO,EAAE,aAAa,EAAE,sBAAsB,EAAE,OAAO,EAAE,QAAQ,EAAE,CAAC"}
@@ -20,7 +20,7 @@ export const theme = (value) => value;
20
20
  /**
21
21
  * Type predicate that checks if a value is a valid theme.
22
22
  */
23
- export function isTheme(value) {
23
+ function isTheme(value) {
24
24
  if (typeof value !== "string") {
25
25
  return false;
26
26
  }
@@ -55,7 +55,7 @@ function determineInitialTheme(defaultTheme, storageKey) {
55
55
  /**
56
56
  * ThemeProvider is a React Context Provider that provides the current theme and a function to set the theme.
57
57
  */
58
- export function ThemeProvider({ children, defaultTheme = "system", storageKey = DEFAULT_STORAGE_KEY }) {
58
+ function ThemeProvider({ children, defaultTheme = "system", storageKey = DEFAULT_STORAGE_KEY }) {
59
59
  const [theme, setTheme] = useState(() => {
60
60
  const initialTheme = determineInitialTheme(defaultTheme, storageKey);
61
61
  applyTheme(initialTheme);
@@ -83,7 +83,7 @@ export function ThemeProvider({ children, defaultTheme = "system", storageKey =
83
83
  *
84
84
  * @note This function will throw an error if used outside of a ThemeProvider context tree.
85
85
  */
86
- export function useTheme() {
86
+ function useTheme() {
87
87
  const context = useContext(ThemeProviderContext);
88
88
  invariant(context, "useTheme must be used within a ThemeProvider");
89
89
  return context;
@@ -116,7 +116,7 @@ export function determineThemeFromMediaQuery({ prefersDarkMode, prefersContrastM
116
116
  * PreventWrongThemeFlash is a React component that prevents the wrong theme from flashing on initial page load.
117
117
  * Render as high as possible in the DOM, preferably in the <head> element.
118
118
  */
119
- export const PreventWrongThemeFlash = ({ defaultTheme = "system", storageKey = DEFAULT_STORAGE_KEY, }) => (_jsx("script", { dangerouslySetInnerHTML: {
119
+ const PreventWrongThemeFlash = ({ defaultTheme = "system", storageKey = DEFAULT_STORAGE_KEY, }) => (_jsx("script", { dangerouslySetInnerHTML: {
120
120
  __html: `
121
121
  (function() {
122
122
  const themes = ${JSON.stringify(themes)};
@@ -141,3 +141,4 @@ export const PreventWrongThemeFlash = ({ defaultTheme = "system", storageKey = D
141
141
  })();
142
142
  `.trim(),
143
143
  } }));
144
+ export { ThemeProvider, PreventWrongThemeFlash, isTheme, useTheme };
package/package.json CHANGED
@@ -1,17 +1,15 @@
1
1
  {
2
2
  "name": "@ngrok/mantle",
3
- "version": "0.0.1-alpha.3",
3
+ "version": "0.0.1-alpha.4",
4
4
  "sideEffects": false,
5
5
  "type": "module",
6
6
  "browserslist": [
7
7
  "last 2 years, not dead, > 0.2%"
8
8
  ],
9
- "exports": {
10
- "./*": {
11
- "import": "./dist/*",
12
- "types": "./dist/*/*.d.ts"
13
- }
14
- },
9
+ "main": "dist/index.js",
10
+ "module": "dist/index.js",
11
+ "exports": "./dist/index.js",
12
+ "types": "./dist/index.d.ts",
15
13
  "files": [
16
14
  "dist"
17
15
  ],
File without changes