@greatapps/greatauth-ui 0.1.0 → 0.1.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.
package/dist/index.d.ts CHANGED
@@ -1,9 +1,15 @@
1
+ import * as React from 'react';
1
2
  import { ReactNode, ComponentType } from 'react';
2
3
  import * as nanostores from 'nanostores';
3
4
  import * as _better_fetch_fetch from '@better-fetch/fetch';
4
5
  import * as better_auth from 'better-auth';
5
- import { NextRequest, NextResponse } from 'next/server';
6
+ export { AuthMiddlewareConfig, authMiddlewareConfig, createAuthMiddleware } from './middleware.js';
7
+ import * as react_jsx_runtime from 'react/jsx-runtime';
8
+ import * as class_variance_authority_types from 'class-variance-authority/types';
9
+ import { VariantProps } from 'class-variance-authority';
10
+ import { Tooltip } from 'radix-ui';
6
11
  import { ClassValue } from 'clsx';
12
+ import 'next/server';
7
13
 
8
14
  interface AppShellConfig {
9
15
  appName: string;
@@ -1037,15 +1043,6 @@ declare const signOut: <FetchOptions extends better_auth.ClientFetchOption<never
1037
1043
  message?: string | undefined;
1038
1044
  }, FetchOptions["throw"] extends true ? true : false>>;
1039
1045
 
1040
- interface AuthMiddlewareConfig {
1041
- publicPaths: string[];
1042
- preserveSearchParams?: boolean;
1043
- }
1044
- declare function createAuthMiddleware(config: AuthMiddlewareConfig): (request: NextRequest) => NextResponse<unknown>;
1045
- declare const authMiddlewareConfig: {
1046
- matcher: string[];
1047
- };
1048
-
1049
1046
  interface JwtClaimsConfig {
1050
1047
  [jwtClaimName: string]: string;
1051
1048
  }
@@ -1056,6 +1053,58 @@ interface UseAuthConfig {
1056
1053
  }
1057
1054
  declare function createUseAuth(config?: UseAuthConfig): () => Record<string, unknown>;
1058
1055
 
1056
+ interface AppShellProps {
1057
+ config: AppShellConfig;
1058
+ children: ReactNode;
1059
+ renderAbove?: ReactNode;
1060
+ }
1061
+ declare function AppShell({ config, children, renderAbove }: AppShellProps): react_jsx_runtime.JSX.Element;
1062
+
1063
+ interface AppSidebarProps {
1064
+ config: AppShellConfig;
1065
+ }
1066
+ declare function AppSidebar({ config }: AppSidebarProps): react_jsx_runtime.JSX.Element;
1067
+
1068
+ interface AppHeaderProps {
1069
+ config: AppShellConfig;
1070
+ }
1071
+ declare function AppHeader({ config }: AppHeaderProps): react_jsx_runtime.JSX.Element;
1072
+
1073
+ interface LoginFormProps {
1074
+ config: LoginFormConfig;
1075
+ }
1076
+ declare function LoginForm({ config }: LoginFormProps): react_jsx_runtime.JSX.Element;
1077
+
1078
+ declare function ThemeToggle(): react_jsx_runtime.JSX.Element;
1079
+
1080
+ declare const buttonVariants: (props?: ({
1081
+ variant?: "destructive" | "outline" | "default" | "link" | "secondary" | "ghost" | null | undefined;
1082
+ size?: "default" | "xs" | "sm" | "lg" | "icon" | "icon-xs" | "icon-sm" | "icon-lg" | null | undefined;
1083
+ } & class_variance_authority_types.ClassProp) | undefined) => string;
1084
+ declare function Button({ className, variant, size, asChild, ...props }: React.ComponentProps<"button"> & VariantProps<typeof buttonVariants> & {
1085
+ asChild?: boolean;
1086
+ }): react_jsx_runtime.JSX.Element;
1087
+
1088
+ declare function TooltipProvider({ delayDuration, ...props }: React.ComponentProps<typeof Tooltip.Provider>): react_jsx_runtime.JSX.Element;
1089
+
1090
+ type SidebarContextProps = {
1091
+ state: "expanded" | "collapsed";
1092
+ open: boolean;
1093
+ setOpen: (open: boolean) => void;
1094
+ openMobile: boolean;
1095
+ setOpenMobile: (open: boolean) => void;
1096
+ isMobile: boolean;
1097
+ toggleSidebar: () => void;
1098
+ };
1099
+ declare function useSidebar(): SidebarContextProps;
1100
+ declare function SidebarProvider({ defaultOpen, open: openProp, onOpenChange: setOpenProp, className, style, children, ...props }: React.ComponentProps<"div"> & {
1101
+ defaultOpen?: boolean;
1102
+ open?: boolean;
1103
+ onOpenChange?: (open: boolean) => void;
1104
+ }): react_jsx_runtime.JSX.Element;
1105
+ declare function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<typeof Button>): react_jsx_runtime.JSX.Element;
1106
+ declare function SidebarInset({ className, ...props }: React.ComponentProps<"main">): react_jsx_runtime.JSX.Element;
1107
+
1059
1108
  declare function cn(...inputs: ClassValue[]): string;
1060
1109
 
1061
- export { type AppShellConfig, type AuthMiddlewareConfig, type HeaderConfig, type LoginFormConfig, type MenuGroup, type MenuItem, authClient, authMiddlewareConfig, cn, createAuthMiddleware, createUseAuth, signIn, signOut, signUp, useSession };
1110
+ export { AppHeader, AppShell, type AppShellConfig, AppSidebar, type HeaderConfig, LoginForm, type LoginFormConfig, type MenuGroup, type MenuItem, SidebarInset, SidebarProvider, SidebarTrigger, ThemeToggle, TooltipProvider, authClient, cn, createUseAuth, signIn, signOut, signUp, useSession, useSidebar };