@tern-secure/nextjs 3.3.2 → 3.3.5
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 +33 -33
- package/package.json +79 -79
- package/dist/cjs/app-router/client/TernSecureProvider.js +0 -33
- package/dist/cjs/app-router/client/TernSecureProvider.js.map +0 -1
- package/dist/cjs/app-router/client/actions.js +0 -97
- package/dist/cjs/app-router/client/actions.js.map +0 -1
- package/dist/cjs/app-router/server/auth.js +0 -71
- package/dist/cjs/app-router/server/auth.js.map +0 -1
- package/dist/cjs/app-router/server/index.js +0 -42
- package/dist/cjs/app-router/server/index.js.map +0 -1
- package/dist/cjs/app-router/server/sessionTernSecure.js +0 -159
- package/dist/cjs/app-router/server/sessionTernSecure.js.map +0 -1
- package/dist/cjs/app-router/server/ternSecureMiddleware.js +0 -50
- package/dist/cjs/app-router/server/ternSecureMiddleware.js.map +0 -1
- package/dist/cjs/boundary/TernSecureClientProvider.js +0 -94
- package/dist/cjs/boundary/TernSecureClientProvider.js.map +0 -1
- package/dist/cjs/boundary/TernSecureCtx.js +0 -49
- package/dist/cjs/boundary/TernSecureCtx.js.map +0 -1
- package/dist/cjs/boundary/hooks/useAuth.js +0 -51
- package/dist/cjs/boundary/hooks/useAuth.js.map +0 -1
- package/dist/cjs/boundary/hooks/useUser.js +0 -44
- package/dist/cjs/boundary/hooks/useUser.js.map +0 -1
- package/dist/cjs/components/background.js +0 -65
- package/dist/cjs/components/background.js.map +0 -1
- package/dist/cjs/components/sign-in.js +0 -243
- package/dist/cjs/components/sign-in.js.map +0 -1
- package/dist/cjs/components/sign-out.js +0 -69
- package/dist/cjs/components/sign-out.js.map +0 -1
- package/dist/cjs/components/ui/alert.js +0 -88
- package/dist/cjs/components/ui/alert.js.map +0 -1
- package/dist/cjs/components/ui/button.js +0 -84
- package/dist/cjs/components/ui/button.js.map +0 -1
- package/dist/cjs/components/ui/card.js +0 -101
- package/dist/cjs/components/ui/card.js.map +0 -1
- package/dist/cjs/components/ui/input.js +0 -58
- package/dist/cjs/components/ui/input.js.map +0 -1
- package/dist/cjs/components/ui/label.js +0 -55
- package/dist/cjs/components/ui/label.js.map +0 -1
- package/dist/cjs/components/ui/separator.js +0 -59
- package/dist/cjs/components/ui/separator.js.map +0 -1
- package/dist/cjs/errors.js +0 -41
- package/dist/cjs/errors.js.map +0 -1
- package/dist/cjs/index.js +0 -56
- package/dist/cjs/index.js.map +0 -1
- package/dist/cjs/lib/utils.d.js +0 -17
- package/dist/cjs/lib/utils.d.js.map +0 -1
- package/dist/cjs/lib/utils.js +0 -33
- package/dist/cjs/lib/utils.js.map +0 -1
- package/dist/cjs/types.js +0 -17
- package/dist/cjs/types.js.map +0 -1
- package/dist/cjs/utils/admin-init.js +0 -57
- package/dist/cjs/utils/admin-init.js.map +0 -1
- package/dist/cjs/utils/client-init.js +0 -49
- package/dist/cjs/utils/client-init.js.map +0 -1
- package/dist/cjs/utils/config.js +0 -113
- package/dist/cjs/utils/config.js.map +0 -1
- package/dist/cjs/utils/construct.js +0 -63
- package/dist/cjs/utils/construct.js.map +0 -1
- package/dist/cjs/utils/create-styles.js +0 -149
- package/dist/cjs/utils/create-styles.js.map +0 -1
- package/dist/esm/app-router/client/TernSecureProvider.js +0 -9
- package/dist/esm/app-router/client/TernSecureProvider.js.map +0 -1
- package/dist/esm/app-router/client/actions.js +0 -70
- package/dist/esm/app-router/client/actions.js.map +0 -1
- package/dist/esm/app-router/server/auth.js +0 -47
- package/dist/esm/app-router/server/auth.js.map +0 -1
- package/dist/esm/app-router/server/index.js +0 -13
- package/dist/esm/app-router/server/index.js.map +0 -1
- package/dist/esm/app-router/server/sessionTernSecure.js +0 -129
- package/dist/esm/app-router/server/sessionTernSecure.js.map +0 -1
- package/dist/esm/app-router/server/ternSecureMiddleware.js +0 -26
- package/dist/esm/app-router/server/ternSecureMiddleware.js.map +0 -1
- package/dist/esm/boundary/TernSecureClientProvider.js +0 -70
- package/dist/esm/boundary/TernSecureClientProvider.js.map +0 -1
- package/dist/esm/boundary/TernSecureCtx.js +0 -23
- package/dist/esm/boundary/TernSecureCtx.js.map +0 -1
- package/dist/esm/boundary/hooks/useAuth.js +0 -27
- package/dist/esm/boundary/hooks/useAuth.js.map +0 -1
- package/dist/esm/boundary/hooks/useUser.js +0 -20
- package/dist/esm/boundary/hooks/useUser.js.map +0 -1
- package/dist/esm/components/background.js +0 -41
- package/dist/esm/components/background.js.map +0 -1
- package/dist/esm/components/sign-in.js +0 -219
- package/dist/esm/components/sign-in.js.map +0 -1
- package/dist/esm/components/sign-out.js +0 -45
- package/dist/esm/components/sign-out.js.map +0 -1
- package/dist/esm/components/ui/alert.js +0 -52
- package/dist/esm/components/ui/alert.js.map +0 -1
- package/dist/esm/components/ui/button.js +0 -49
- package/dist/esm/components/ui/button.js.map +0 -1
- package/dist/esm/components/ui/card.js +0 -62
- package/dist/esm/components/ui/card.js.map +0 -1
- package/dist/esm/components/ui/input.js +0 -24
- package/dist/esm/components/ui/input.js.map +0 -1
- package/dist/esm/components/ui/label.js +0 -21
- package/dist/esm/components/ui/label.js.map +0 -1
- package/dist/esm/components/ui/separator.js +0 -25
- package/dist/esm/components/ui/separator.js.map +0 -1
- package/dist/esm/errors.js +0 -16
- package/dist/esm/errors.js.map +0 -1
- package/dist/esm/index.js +0 -22
- package/dist/esm/index.js.map +0 -1
- package/dist/esm/lib/utils.d.js +0 -1
- package/dist/esm/lib/utils.d.js.map +0 -1
- package/dist/esm/lib/utils.js +0 -9
- package/dist/esm/lib/utils.js.map +0 -1
- package/dist/esm/types.js +0 -1
- package/dist/esm/types.js.map +0 -1
- package/dist/esm/utils/admin-init.js +0 -22
- package/dist/esm/utils/admin-init.js.map +0 -1
- package/dist/esm/utils/client-init.js +0 -22
- package/dist/esm/utils/client-init.js.map +0 -1
- package/dist/esm/utils/config.js +0 -84
- package/dist/esm/utils/config.js.map +0 -1
- package/dist/esm/utils/construct.js +0 -37
- package/dist/esm/utils/construct.js.map +0 -1
- package/dist/esm/utils/create-styles.js +0 -123
- package/dist/esm/utils/create-styles.js.map +0 -1
- package/dist/types/app-router/client/TernSecureProvider.d.ts +0 -26
- package/dist/types/app-router/client/TernSecureProvider.d.ts.map +0 -1
- package/dist/types/app-router/client/actions.d.ts +0 -39
- package/dist/types/app-router/client/actions.d.ts.map +0 -1
- package/dist/types/app-router/server/auth.d.ts +0 -7
- package/dist/types/app-router/server/auth.d.ts.map +0 -1
- package/dist/types/app-router/server/index.d.ts +0 -5
- package/dist/types/app-router/server/index.d.ts.map +0 -1
- package/dist/types/app-router/server/sessionTernSecure.d.ts +0 -37
- package/dist/types/app-router/server/sessionTernSecure.d.ts.map +0 -1
- package/dist/types/app-router/server/ternSecureMiddleware.d.ts +0 -7
- package/dist/types/app-router/server/ternSecureMiddleware.d.ts.map +0 -1
- package/dist/types/boundary/TernSecureClientProvider.d.ts +0 -11
- package/dist/types/boundary/TernSecureClientProvider.d.ts.map +0 -1
- package/dist/types/boundary/TernSecureCtx.d.ts +0 -15
- package/dist/types/boundary/TernSecureCtx.d.ts.map +0 -1
- package/dist/types/boundary/hooks/useAuth.d.ts +0 -11
- package/dist/types/boundary/hooks/useAuth.d.ts.map +0 -1
- package/dist/types/boundary/hooks/useUser.d.ts +0 -7
- package/dist/types/boundary/hooks/useUser.d.ts.map +0 -1
- package/dist/types/components/background.d.ts +0 -2
- package/dist/types/components/background.d.ts.map +0 -1
- package/dist/types/components/sign-in.d.ts +0 -18
- package/dist/types/components/sign-in.d.ts.map +0 -1
- package/dist/types/components/sign-out.d.ts +0 -10
- package/dist/types/components/sign-out.d.ts.map +0 -1
- package/dist/types/components/ui/alert.d.ts +0 -9
- package/dist/types/components/ui/alert.d.ts.map +0 -1
- package/dist/types/components/ui/button.d.ts +0 -12
- package/dist/types/components/ui/button.d.ts.map +0 -1
- package/dist/types/components/ui/card.d.ts +0 -9
- package/dist/types/components/ui/card.d.ts.map +0 -1
- package/dist/types/components/ui/input.d.ts +0 -4
- package/dist/types/components/ui/input.d.ts.map +0 -1
- package/dist/types/components/ui/label.d.ts +0 -6
- package/dist/types/components/ui/label.d.ts.map +0 -1
- package/dist/types/components/ui/separator.d.ts +0 -5
- package/dist/types/components/ui/separator.d.ts.map +0 -1
- package/dist/types/errors.d.ts +0 -9
- package/dist/types/errors.d.ts.map +0 -1
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/lib/utils.d.ts +0 -3
- package/dist/types/lib/utils.d.ts.map +0 -1
- package/dist/types/types.d.ts +0 -63
- package/dist/types/types.d.ts.map +0 -1
- package/dist/types/utils/admin-init.d.ts +0 -4
- package/dist/types/utils/admin-init.d.ts.map +0 -1
- package/dist/types/utils/client-init.d.ts +0 -5
- package/dist/types/utils/client-init.d.ts.map +0 -1
- package/dist/types/utils/config.d.ts +0 -35
- package/dist/types/utils/config.d.ts.map +0 -1
- package/dist/types/utils/construct.d.ts +0 -22
- package/dist/types/utils/construct.d.ts.map +0 -1
- package/dist/types/utils/create-styles.d.ts +0 -99
- package/dist/types/utils/create-styles.d.ts.map +0 -1
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
export declare function signInWithEmail(email: string, password: string): Promise<{
|
|
2
|
-
success: boolean;
|
|
3
|
-
message: string;
|
|
4
|
-
}>;
|
|
5
|
-
export declare function signInWithRedirectGoogle(): Promise<{
|
|
6
|
-
success: boolean;
|
|
7
|
-
message: string;
|
|
8
|
-
error?: undefined;
|
|
9
|
-
} | {
|
|
10
|
-
success: boolean;
|
|
11
|
-
error: string;
|
|
12
|
-
message?: undefined;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function signInWithMicrosoft(): Promise<{
|
|
15
|
-
success: boolean;
|
|
16
|
-
message: string;
|
|
17
|
-
error?: undefined;
|
|
18
|
-
} | {
|
|
19
|
-
success: boolean;
|
|
20
|
-
error: string;
|
|
21
|
-
message?: undefined;
|
|
22
|
-
}>;
|
|
23
|
-
export declare function handleAuthRedirectResult(): Promise<{
|
|
24
|
-
success: boolean;
|
|
25
|
-
user: import("firebase/auth").User;
|
|
26
|
-
error?: undefined;
|
|
27
|
-
code?: undefined;
|
|
28
|
-
} | {
|
|
29
|
-
success: boolean;
|
|
30
|
-
error: string;
|
|
31
|
-
user?: undefined;
|
|
32
|
-
code?: undefined;
|
|
33
|
-
} | {
|
|
34
|
-
success: boolean;
|
|
35
|
-
error: any;
|
|
36
|
-
code: any;
|
|
37
|
-
user?: undefined;
|
|
38
|
-
}>;
|
|
39
|
-
//# sourceMappingURL=actions.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../../src/app-router/client/actions.ts"],"names":[],"mappings":"AAKA,wBAAsB,eAAe,CAAC,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM;;;GAiBpE;AAED,wBAAsB,wBAAwB;;;;;;;;GAe7C;AAGD,wBAAsB,mBAAmB;;;;;;;;GAcxC;AAGD,wBAAsB,wBAAwB;;;;;;;;;;;;;;;GAc7C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../../../src/app-router/server/auth.ts"],"names":[],"mappings":"AAKA,MAAM,WAAW,UAAU;IACzB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB;AAED,wBAAsB,IAAI,IAAI,OAAO,CAAC,UAAU,CAAC,CA0ChD"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export { adminTernSecureAuth, adminTernSecureDb } from '../../utils/admin-init';
|
|
2
|
-
export { ternSecureMiddleware } from './ternSecureMiddleware';
|
|
3
|
-
export { verifyTernSessionCookie, createSessionCookie } from './sessionTernSecure';
|
|
4
|
-
export { auth } from './auth';
|
|
5
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/app-router/server/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAA;AAC/E,OAAO,EAAE,oBAAoB,EAAE,MAAM,wBAAwB,CAAA;AAC7D,OAAO,EAAE,uBAAuB,EAAE,mBAAmB,EAAE,MAAM,qBAAqB,CAAA;AAClF,OAAO,EAAE,IAAI,EAAE,MAAM,QAAQ,CAAA"}
|
|
@@ -1,37 +0,0 @@
|
|
|
1
|
-
export interface User {
|
|
2
|
-
uid: string | null;
|
|
3
|
-
email: string | null;
|
|
4
|
-
}
|
|
5
|
-
export interface Session {
|
|
6
|
-
user: User | null;
|
|
7
|
-
token: string | null;
|
|
8
|
-
error: Error | null;
|
|
9
|
-
}
|
|
10
|
-
export declare function createSessionCookie(idToken: string): Promise<{
|
|
11
|
-
success: boolean;
|
|
12
|
-
message: string;
|
|
13
|
-
}>;
|
|
14
|
-
export declare function getServerSessionCookie(): Promise<{
|
|
15
|
-
token: string;
|
|
16
|
-
userId: string;
|
|
17
|
-
}>;
|
|
18
|
-
export declare function getIdToken(): Promise<{
|
|
19
|
-
token: string;
|
|
20
|
-
userId: string;
|
|
21
|
-
}>;
|
|
22
|
-
export declare function setServerSession(token: string): Promise<void>;
|
|
23
|
-
export declare function verifyTernIdToken(token: string): Promise<{
|
|
24
|
-
valid: boolean;
|
|
25
|
-
uid?: string;
|
|
26
|
-
error?: string;
|
|
27
|
-
}>;
|
|
28
|
-
export declare function verifyTernSessionCookie(session: string): Promise<{
|
|
29
|
-
valid: boolean;
|
|
30
|
-
uid?: any;
|
|
31
|
-
error?: any;
|
|
32
|
-
}>;
|
|
33
|
-
export declare function clearSessionCookie(): Promise<{
|
|
34
|
-
success: boolean;
|
|
35
|
-
message: string;
|
|
36
|
-
}>;
|
|
37
|
-
//# sourceMappingURL=sessionTernSecure.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sessionTernSecure.d.ts","sourceRoot":"","sources":["../../../../src/app-router/server/sessionTernSecure.ts"],"names":[],"mappings":"AASA,MAAM,WAAW,IAAI;IACjB,GAAG,EAAE,MAAM,GAAG,IAAI,CAAC;IACnB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAEH,MAAM,WAAW,OAAO;IACpB,IAAI,EAAE,IAAI,GAAG,IAAI,CAAC;IAClB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACvB;AAED,wBAAsB,mBAAmB,CAAC,OAAO,EAAE,MAAM;;;GAgBxD;AAID,wBAAsB,sBAAsB;;;GAkB3C;AAGD,wBAAsB,UAAU;;;GAkB/B;AAED,wBAAsB,gBAAgB,CAAC,KAAK,EAAE,MAAM,iBASjD;AAED,wBAAsB,iBAAiB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,CAAC,EAAE,MAAM,CAAA;CAAE,CAAC,CAuBhH;AAGD,wBAAsB,uBAAuB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC;IAAE,KAAK,EAAE,OAAO,CAAC;IAAC,GAAG,CAAC,EAAE,GAAG,CAAC;IAAC,KAAK,CAAC,EAAE,GAAG,CAAA;CAAE,CAAC,CAWlH;AAGD,wBAAsB,kBAAkB;;;GAwBvC"}
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { NextRequest, NextResponse } from 'next/server';
|
|
2
|
-
export interface TernSecureMiddlewareOptions {
|
|
3
|
-
publicPaths?: string[];
|
|
4
|
-
redirectTo?: string;
|
|
5
|
-
}
|
|
6
|
-
export declare function ternSecureMiddleware(options?: TernSecureMiddlewareOptions): (request: NextRequest) => Promise<NextResponse<unknown>>;
|
|
7
|
-
//# sourceMappingURL=ternSecureMiddleware.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ternSecureMiddleware.d.ts","sourceRoot":"","sources":["../../../../src/app-router/server/ternSecureMiddleware.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAGxD,MAAM,WAAW,2BAA2B;IAC1C,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;IACvB,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,2BAAgC,aAGlC,WAAW,oCA4BtD"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import React from 'react';
|
|
2
|
-
import { User } from "firebase/auth";
|
|
3
|
-
interface TernSecureClientProviderProps {
|
|
4
|
-
children: React.ReactNode;
|
|
5
|
-
onUserChanged?: (user: User | null) => Promise<void>;
|
|
6
|
-
loginPath?: string;
|
|
7
|
-
loadingComponent?: React.ReactNode;
|
|
8
|
-
}
|
|
9
|
-
export declare function TernSecureClientProvider({ children, loginPath, loadingComponent }: TernSecureClientProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
11
|
-
//# sourceMappingURL=TernSecureClientProvider.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TernSecureClientProvider.d.ts","sourceRoot":"","sources":["../../../src/boundary/TernSecureClientProvider.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAoD,MAAM,OAAO,CAAA;AAExE,OAAO,EAAsB,IAAI,EAAE,MAAM,eAAe,CAAA;AAIxD,UAAU,6BAA6B;IACrC,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,GAAG,IAAI,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACrD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;CACpC;AAED,wBAAgB,wBAAwB,CAAC,EACvC,QAAQ,EACR,SAAsB,EACtB,gBAAgB,EACjB,EAAE,6BAA6B,2CAwE/B"}
|
|
@@ -1,15 +0,0 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
export declare const TernSecureUser: () => User | null;
|
|
3
|
-
export interface TernSecureState {
|
|
4
|
-
userId: string | null;
|
|
5
|
-
isLoaded: boolean;
|
|
6
|
-
error: Error | null;
|
|
7
|
-
isValid: boolean;
|
|
8
|
-
token: any | null;
|
|
9
|
-
}
|
|
10
|
-
export interface TernSecureCtxValue extends TernSecureState {
|
|
11
|
-
signOut: () => Promise<void>;
|
|
12
|
-
}
|
|
13
|
-
export declare const TernSecureCtx: import("react").Context<TernSecureCtxValue | null>;
|
|
14
|
-
export declare const useTernSecure: (hookName: string) => TernSecureCtxValue;
|
|
15
|
-
//# sourceMappingURL=TernSecureCtx.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"TernSecureCtx.d.ts","sourceRoot":"","sources":["../../../src/boundary/TernSecureCtx.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AAErC,eAAO,MAAM,cAAc,QAAO,IAAI,GAAG,IAExC,CAAA;AAED,MAAM,WAAW,eAAe;IAC9B,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,QAAQ,EAAE,OAAO,CAAA;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,OAAO,EAAE,OAAO,CAAA;IAChB,KAAK,EAAE,GAAG,GAAG,IAAI,CAAA;CAClB;AAED,MAAM,WAAW,kBAAmB,SAAQ,eAAe;IAEzD,OAAO,EAAE,MAAM,OAAO,CAAC,IAAI,CAAC,CAAC;CAC9B;AAED,eAAO,MAAM,aAAa,oDAAiD,CAAA;AAI3E,eAAO,MAAM,aAAa,aAAc,MAAM,uBAU7C,CAAA"}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { User } from 'firebase/auth';
|
|
2
|
-
export declare function useAuth(): {
|
|
3
|
-
user: User | null;
|
|
4
|
-
userId: string | null;
|
|
5
|
-
isLoaded: boolean;
|
|
6
|
-
error: Error | null;
|
|
7
|
-
isAuthenticated: boolean;
|
|
8
|
-
token: any;
|
|
9
|
-
signOut: () => Promise<void>;
|
|
10
|
-
};
|
|
11
|
-
//# sourceMappingURL=useAuth.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../../src/boundary/hooks/useAuth.ts"],"names":[],"mappings":"AAGA,OAAO,EAAG,IAAI,EAAE,MAAM,eAAe,CAAA;AAGrC,wBAAgB,OAAO;;;;;;;;EAqBtB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useUser.d.ts","sourceRoot":"","sources":["../../../../src/boundary/hooks/useUser.ts"],"names":[],"mappings":"AAOA,UAAU,aAAa;IACnB,IAAI,EAAE,GAAG,GAAG,IAAI,CAAC;IACjB,OAAO,EAAE,OAAO,CAAC;CAClB;AAEH,wBAAgB,OAAO,IAAI,aAAa,CAevC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"background.d.ts","sourceRoot":"","sources":["../../../src/components/background.tsx"],"names":[],"mappings":"AAAA,wBAAgB,cAAc,4CAgC3B"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface SignInProps {
|
|
2
|
-
redirectUrl?: string;
|
|
3
|
-
onError?: (error: Error) => void;
|
|
4
|
-
onSuccess?: () => void;
|
|
5
|
-
className?: string;
|
|
6
|
-
customStyles?: {
|
|
7
|
-
card?: string;
|
|
8
|
-
input?: string;
|
|
9
|
-
button?: string;
|
|
10
|
-
label?: string;
|
|
11
|
-
separator?: string;
|
|
12
|
-
title?: string;
|
|
13
|
-
description?: string;
|
|
14
|
-
socialButton?: string;
|
|
15
|
-
};
|
|
16
|
-
}
|
|
17
|
-
export declare function SignIn({ redirectUrl, onError, onSuccess, className, customStyles }: SignInProps): import("react/jsx-runtime").JSX.Element;
|
|
18
|
-
//# sourceMappingURL=sign-in.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sign-in.d.ts","sourceRoot":"","sources":["../../../src/components/sign-in.tsx"],"names":[],"mappings":"AA0BA,MAAM,WAAW,WAAW;IAC1B,WAAW,CAAC,EAAE,MAAM,CAAA;IACpB,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,YAAY,CAAC,EAAE;QACb,IAAI,CAAC,EAAE,MAAM,CAAA;QACb,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE,MAAM,CAAA;QACf,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,SAAS,CAAC,EAAE,MAAM,CAAA;QAClB,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,WAAW,CAAC,EAAE,MAAM,CAAA;QACpB,YAAY,CAAC,EAAE,MAAM,CAAA;KACtB,CAAA;CACF;AAED,wBAAgB,MAAM,CAAC,EACrB,WAAW,EACX,OAAO,EACP,SAAS,EACT,SAAS,EACT,YAAiB,EAClB,EAAE,WAAW,2CAkOb"}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { type ButtonProps } from './ui/button';
|
|
2
|
-
type SignOutCustomProps = {
|
|
3
|
-
children?: React.ReactNode;
|
|
4
|
-
onError?: (error: Error) => void;
|
|
5
|
-
onSignOutSuccess?: () => void;
|
|
6
|
-
};
|
|
7
|
-
type SignOutProps = Omit<ButtonProps, 'onClick'> & SignOutCustomProps;
|
|
8
|
-
export declare function SignOut({ children, onError, onSignOutSuccess, ...buttonProps }: SignOutProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
10
|
-
//# sourceMappingURL=sign-out.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"sign-out.d.ts","sourceRoot":"","sources":["../../../src/components/sign-out.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAU,KAAK,WAAW,EAAE,MAAM,aAAa,CAAA;AAItD,KAAK,kBAAkB,GAAG;IACxB,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC1B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAA;CAC9B,CAAA;AAED,KAAK,YAAY,GAAG,IAAI,CAAC,WAAW,EAAE,SAAS,CAAC,GAAG,kBAAkB,CAAA;AAErE,wBAAgB,OAAO,CAAC,EACtB,QAAqB,EACrB,OAAO,EACP,gBAAgB,EAChB,GAAG,WAAW,EACf,EAAE,YAAY,2CAmCd"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const Alert: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & VariantProps<(props?: ({
|
|
4
|
-
variant?: "default" | "destructive" | null | undefined;
|
|
5
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const AlertTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLHeadingElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
7
|
-
declare const AlertDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLParagraphElement> & React.RefAttributes<HTMLParagraphElement>>;
|
|
8
|
-
export { Alert, AlertTitle, AlertDescription };
|
|
9
|
-
//# sourceMappingURL=alert.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"alert.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/alert.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAoBjE,QAAA,MAAM,KAAK;;2HAUT,CAAA;AAGF,QAAA,MAAM,UAAU,uHASd,CAAA;AAGF,QAAA,MAAM,gBAAgB,yHASpB,CAAA;AAGF,OAAO,EAAE,KAAK,EAAE,UAAU,EAAE,gBAAgB,EAAE,CAAA"}
|
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import { type VariantProps } from "class-variance-authority";
|
|
3
|
-
declare const buttonVariants: (props?: ({
|
|
4
|
-
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "sm" | "lg" | "icon" | null | undefined;
|
|
6
|
-
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
|
-
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
|
-
asChild?: boolean;
|
|
9
|
-
}
|
|
10
|
-
declare const Button: React.ForwardRefExoticComponent<ButtonProps & React.RefAttributes<HTMLButtonElement>>;
|
|
11
|
-
export { Button, buttonVariants };
|
|
12
|
-
//# sourceMappingURL=button.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"button.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/button.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAE9B,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAIjE,QAAA,MAAM,cAAc;;;mFA4BnB,CAAA;AAED,MAAM,WAAW,WACf,SAAQ,KAAK,CAAC,oBAAoB,CAAC,iBAAiB,CAAC,EACnD,YAAY,CAAC,OAAO,cAAc,CAAC;IACrC,OAAO,CAAC,EAAE,OAAO,CAAA;CAClB;AAED,QAAA,MAAM,MAAM,uFAWX,CAAA;AAGD,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,CAAA"}
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Card: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
3
|
-
declare const CardHeader: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
declare const CardTitle: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
5
|
-
declare const CardDescription: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
6
|
-
declare const CardContent: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
7
|
-
declare const CardFooter: React.ForwardRefExoticComponent<React.HTMLAttributes<HTMLDivElement> & React.RefAttributes<HTMLDivElement>>;
|
|
8
|
-
export { Card, CardHeader, CardFooter, CardTitle, CardDescription, CardContent };
|
|
9
|
-
//# sourceMappingURL=card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"card.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/card.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,IAAI,6GAYR,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,QAAA,MAAM,SAAS,6GASb,CAAA;AAGF,QAAA,MAAM,eAAe,6GASnB,CAAA;AAGF,QAAA,MAAM,WAAW,6GAKf,CAAA;AAGF,QAAA,MAAM,UAAU,6GASd,CAAA;AAGF,OAAO,EAAE,IAAI,EAAE,UAAU,EAAE,UAAU,EAAE,SAAS,EAAE,eAAe,EAAE,WAAW,EAAE,CAAA"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
declare const Input: React.ForwardRefExoticComponent<Omit<React.DetailedHTMLProps<React.InputHTMLAttributes<HTMLInputElement>, HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
3
|
-
export { Input };
|
|
4
|
-
//# sourceMappingURL=input.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"input.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/input.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAI9B,QAAA,MAAM,KAAK,8KAcV,CAAA;AAGD,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as LabelPrimitive from "@radix-ui/react-label";
|
|
3
|
-
import { type VariantProps } from "class-variance-authority";
|
|
4
|
-
declare const Label: React.ForwardRefExoticComponent<Omit<LabelPrimitive.LabelProps & React.RefAttributes<HTMLLabelElement>, "ref"> & VariantProps<(props?: import("class-variance-authority/dist/types").ClassProp | undefined) => string> & React.RefAttributes<HTMLLabelElement>>;
|
|
5
|
-
export { Label };
|
|
6
|
-
//# sourceMappingURL=label.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"label.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/label.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,cAAc,MAAM,uBAAuB,CAAA;AACvD,OAAO,EAAO,KAAK,YAAY,EAAE,MAAM,0BAA0B,CAAA;AAQjE,QAAA,MAAM,KAAK,iQAUT,CAAA;AAGF,OAAO,EAAE,KAAK,EAAE,CAAA"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import * as React from "react";
|
|
2
|
-
import * as SeparatorPrimitive from "@radix-ui/react-separator";
|
|
3
|
-
declare const Separator: React.ForwardRefExoticComponent<Omit<SeparatorPrimitive.SeparatorProps & React.RefAttributes<HTMLDivElement>, "ref"> & React.RefAttributes<HTMLDivElement>>;
|
|
4
|
-
export { Separator };
|
|
5
|
-
//# sourceMappingURL=separator.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"separator.d.ts","sourceRoot":"","sources":["../../../../src/components/ui/separator.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAC9B,OAAO,KAAK,kBAAkB,MAAM,2BAA2B,CAAA;AAI/D,QAAA,MAAM,SAAS,6JAoBd,CAAA;AAGD,OAAO,EAAE,SAAS,EAAE,CAAA"}
|
package/dist/types/errors.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
export declare const ERRORS: {
|
|
2
|
-
readonly SERVER_SIDE_INITIALIZATION: "TernSecure must be initialized on the client side";
|
|
3
|
-
readonly NOT_INITIALIZED: "TernSecure services are not initialized. Call initializeTernSecure() first";
|
|
4
|
-
readonly HOOK_CONTEXT: (hookName: string) => string;
|
|
5
|
-
};
|
|
6
|
-
export declare class TernSecureError extends Error {
|
|
7
|
-
constructor(message: string);
|
|
8
|
-
}
|
|
9
|
-
//# sourceMappingURL=errors.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../../src/errors.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,MAAM;;;sCAGU,MAAM;CACvB,CAAC;AAEX,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,cAAc,EAAE,mBAAmB,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAA;AACzF,OAAO,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAC/D,OAAO,EAAE,eAAe,EAAE,MAAM,6BAA6B,CAAA;AAG7D,OAAO,EAAE,kBAAkB,EAAE,MAAM,wCAAwC,CAAA;AAC3E,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,OAAO,EAAE,MAAM,0BAA0B,CAAA;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAA;AAC7C,OAAO,EAAE,OAAO,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/lib/utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,UAAU,EAAE,MAAM,MAAM,CAAA;AAG5C,wBAAgB,EAAE,CAAC,GAAG,MAAM,EAAE,UAAU,EAAE,UAEzC"}
|
package/dist/types/types.d.ts
DELETED
|
@@ -1,63 +0,0 @@
|
|
|
1
|
-
import { FirebaseOptions } from 'firebase/app';
|
|
2
|
-
/**
|
|
3
|
-
* TernSecure Firebase configuration interface
|
|
4
|
-
* Extends Firebase's base configuration options
|
|
5
|
-
*/
|
|
6
|
-
export interface TernSecureConfig extends FirebaseOptions {
|
|
7
|
-
apiKey: string;
|
|
8
|
-
authDomain: string;
|
|
9
|
-
projectId: string;
|
|
10
|
-
storageBucket: string;
|
|
11
|
-
messagingSenderId: string;
|
|
12
|
-
appId: string;
|
|
13
|
-
measurementId?: string;
|
|
14
|
-
}
|
|
15
|
-
/**
|
|
16
|
-
* TernSecure initialization options
|
|
17
|
-
*/
|
|
18
|
-
export interface TernSecureOptions {
|
|
19
|
-
/** Environment setting for different configurations */
|
|
20
|
-
environment?: 'development' | 'production';
|
|
21
|
-
/** Geographic region for data storage */
|
|
22
|
-
region?: string;
|
|
23
|
-
/** Custom error handler */
|
|
24
|
-
onError?: (error: Error) => void;
|
|
25
|
-
/** Debug mode flag */
|
|
26
|
-
debug?: boolean;
|
|
27
|
-
}
|
|
28
|
-
/**
|
|
29
|
-
* Firebase initialization state
|
|
30
|
-
*/
|
|
31
|
-
export interface FirebaseState {
|
|
32
|
-
/** Whether Firebase has been initialized */
|
|
33
|
-
initialized: boolean;
|
|
34
|
-
/** Any initialization errors */
|
|
35
|
-
error: Error | null;
|
|
36
|
-
/** Timestamp of last initialization attempt */
|
|
37
|
-
lastInitAttempt?: number;
|
|
38
|
-
}
|
|
39
|
-
/**
|
|
40
|
-
* Configuration validation result
|
|
41
|
-
*/
|
|
42
|
-
export interface ConfigValidationResult {
|
|
43
|
-
isValid: boolean;
|
|
44
|
-
errors: string[];
|
|
45
|
-
config: TernSecureConfig;
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Firebase Admin configuration interface
|
|
49
|
-
*/
|
|
50
|
-
export interface TernSecureAdminConfig {
|
|
51
|
-
projectId: string;
|
|
52
|
-
clientEmail: string;
|
|
53
|
-
privateKey: string;
|
|
54
|
-
}
|
|
55
|
-
/**
|
|
56
|
-
* Firebase Admin configuration validation result
|
|
57
|
-
*/
|
|
58
|
-
export interface AdminConfigValidationResult {
|
|
59
|
-
isValid: boolean;
|
|
60
|
-
errors: string[];
|
|
61
|
-
config: TernSecureAdminConfig;
|
|
62
|
-
}
|
|
63
|
-
//# sourceMappingURL=types.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,cAAc,CAAA;AAE9C;;;GAGG;AACH,MAAM,WAAW,gBAAiB,SAAQ,eAAe;IACvD,MAAM,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;IAClB,SAAS,EAAE,MAAM,CAAA;IACjB,aAAa,EAAE,MAAM,CAAA;IACrB,iBAAiB,EAAE,MAAM,CAAA;IACzB,KAAK,EAAE,MAAM,CAAA;IACb,aAAa,CAAC,EAAE,MAAM,CAAA;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uDAAuD;IACvD,WAAW,CAAC,EAAE,aAAa,GAAG,YAAY,CAAA;IAC1C,yCAAyC;IACzC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,2BAA2B;IAC3B,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAA;IAChC,sBAAsB;IACtB,KAAK,CAAC,EAAE,OAAO,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,4CAA4C;IAC5C,WAAW,EAAE,OAAO,CAAA;IACpB,gCAAgC;IAChC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;IACnB,+CAA+C;IAC/C,eAAe,CAAC,EAAE,MAAM,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,EAAE,gBAAgB,CAAA;CACzB;AAED;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,MAAM,CAAA;IACjB,WAAW,EAAE,MAAM,CAAA;IACnB,UAAU,EAAE,MAAM,CAAA;CACnB;AAED;;GAEG;AACH,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,OAAO,CAAA;IAChB,MAAM,EAAE,MAAM,EAAE,CAAA;IAChB,MAAM,EAAE,qBAAqB,CAAA;CAC9B"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"admin-init.d.ts","sourceRoot":"","sources":["../../../src/utils/admin-init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAiBnC,eAAO,MAAM,mBAAmB,6CAAe,CAAC;AAChD,eAAO,MAAM,iBAAiB,2BAAoB,CAAC"}
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare const ternSecureAuth: import("firebase/auth").Auth;
|
|
2
|
-
export declare const TernSecureAuth: () => import("firebase/auth").Auth;
|
|
3
|
-
export declare const TernSecureFirestore: () => import("@firebase/firestore").Firestore;
|
|
4
|
-
export declare const TernSecureStorage: () => import("@firebase/storage").FirebaseStorage;
|
|
5
|
-
//# sourceMappingURL=client-init.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"client-init.d.ts","sourceRoot":"","sources":["../../../src/utils/client-init.ts"],"names":[],"mappings":"AAWA,eAAO,MAAM,cAAc,8BAAqB,CAAC;AAOjD,eAAO,MAAM,cAAc,oCAAuB,CAAC;AACnD,eAAO,MAAM,mBAAmB,+CAAkB,CAAC;AACnD,eAAO,MAAM,iBAAiB,mDAAgB,CAAC"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import { TernSecureConfig, ConfigValidationResult, TernSecureAdminConfig, AdminConfigValidationResult } from '../types';
|
|
2
|
-
/**
|
|
3
|
-
* Loads Firebase configuration from environment variables
|
|
4
|
-
* @returns {TernSecureConfig} Firebase configuration object
|
|
5
|
-
*/
|
|
6
|
-
export declare const loadFireConfig: () => TernSecureConfig;
|
|
7
|
-
/**
|
|
8
|
-
* Validates Firebase configuration
|
|
9
|
-
* @param {TernSecureConfig} config - Firebase configuration object
|
|
10
|
-
* @throws {Error} If required configuration values are missing
|
|
11
|
-
* @returns {TernSecureConfig} Validated configuration object
|
|
12
|
-
*/
|
|
13
|
-
export declare const validateConfig: (config: TernSecureConfig) => ConfigValidationResult;
|
|
14
|
-
/**
|
|
15
|
-
* Initializes configuration with validation
|
|
16
|
-
* @throws {Error} If configuration is invalid
|
|
17
|
-
*/
|
|
18
|
-
export declare const initializeConfig: () => TernSecureConfig;
|
|
19
|
-
/**
|
|
20
|
-
* Loads Firebase Admin configuration from environment variables
|
|
21
|
-
* @returns {AdminConfig} Firebase Admin configuration object
|
|
22
|
-
*/
|
|
23
|
-
export declare const loadAdminConfig: () => TernSecureAdminConfig;
|
|
24
|
-
/**
|
|
25
|
-
* Validates Firebase Admin configuration
|
|
26
|
-
* @param {AdminConfig} config - Firebase Admin configuration object
|
|
27
|
-
* @returns {ConfigValidationResult} Validation result
|
|
28
|
-
*/
|
|
29
|
-
export declare const validateAdminConfig: (config: TernSecureAdminConfig) => AdminConfigValidationResult;
|
|
30
|
-
/**
|
|
31
|
-
* Initializes admin configuration with validation
|
|
32
|
-
* @throws {Error} If configuration is invalid
|
|
33
|
-
*/
|
|
34
|
-
export declare const initializeAdminConfig: () => TernSecureAdminConfig;
|
|
35
|
-
//# sourceMappingURL=config.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"config.d.ts","sourceRoot":"","sources":["../../../src/utils/config.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,2BAA2B,EAAE,MAAM,UAAU,CAAA;AAEvH;;;GAGG;AACH,eAAO,MAAM,cAAc,QAAO,gBAQhC,CAAA;AAEF;;;;;GAKG;AACH,eAAO,MAAM,cAAc,WAAY,gBAAgB,KAAG,sBAuBzD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,gBAAgB,QAAO,gBAWnC,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,qBAIjC,CAAA;AAEF;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,WAAY,qBAAqB,KAAG,2BAoBnE,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,qBAAqB,QAAO,qBAWxC,CAAA"}
|
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Constructs a full URL with the current origin
|
|
3
|
-
* @param path - The path to construct the URL for
|
|
4
|
-
* @returns The full URL with origin
|
|
5
|
-
*/
|
|
6
|
-
export declare const constructFullUrl: (path: string) => string;
|
|
7
|
-
/**
|
|
8
|
-
* Constructs a URL with redirect parameters
|
|
9
|
-
* @param path - The base path (usually login path)
|
|
10
|
-
* @param redirectUrl - The URL to redirect to after action completes
|
|
11
|
-
* @param loginPath - The login path to check against
|
|
12
|
-
* @returns The full URL with redirect parameters
|
|
13
|
-
*/
|
|
14
|
-
export declare const constructUrlWithRedirect: (path: string, redirectUrl: string, loginPath: string) => string;
|
|
15
|
-
/**
|
|
16
|
-
* Gets a validated redirect URL ensuring it's from the same origin
|
|
17
|
-
* @param redirectUrl - The URL to validate
|
|
18
|
-
* @param searchParams - The search parameters to check for redirect_url
|
|
19
|
-
* @returns A validated redirect URL
|
|
20
|
-
*/
|
|
21
|
-
export declare const getValidRedirectUrl: (redirectUrl: string | undefined, searchParams: URLSearchParams) => string;
|
|
22
|
-
//# sourceMappingURL=construct.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"construct.d.ts","sourceRoot":"","sources":["../../../src/utils/construct.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,gBAAgB,SAAU,MAAM,WAM1C,CAAA;AAED;;;;;;GAMG;AACH,eAAO,MAAM,wBAAwB,SAAU,MAAM,eAAe,MAAM,aAAa,MAAM,WAe5F,CAAA;AAED;;;;;GAKG;AACH,eAAO,MAAM,mBAAmB,gBACjB,MAAM,GAAG,SAAS,gBACjB,eAAe,KAC5B,MAgBF,CAAA"}
|
|
@@ -1,99 +0,0 @@
|
|
|
1
|
-
export declare const defaultClassNames: {
|
|
2
|
-
readonly container: "tern-container";
|
|
3
|
-
readonly header: "tern-header";
|
|
4
|
-
readonly title: "tern-title";
|
|
5
|
-
readonly formWrapper: "tern-formWrapper";
|
|
6
|
-
readonly formContainer: "tern-formContainer";
|
|
7
|
-
readonly form: "tern-form";
|
|
8
|
-
readonly label: "tern-label";
|
|
9
|
-
readonly input: "tern-input";
|
|
10
|
-
readonly button: "tern-button";
|
|
11
|
-
readonly error: "tern-error";
|
|
12
|
-
};
|
|
13
|
-
export declare const styleConfig: {
|
|
14
|
-
readonly container: {
|
|
15
|
-
readonly display: "flex";
|
|
16
|
-
readonly minHeight: "100%";
|
|
17
|
-
readonly flex: "1";
|
|
18
|
-
readonly flexDirection: "column";
|
|
19
|
-
readonly justifyContent: "center";
|
|
20
|
-
readonly padding: "3rem 1.5rem";
|
|
21
|
-
};
|
|
22
|
-
readonly header: {
|
|
23
|
-
readonly margin: "0 auto";
|
|
24
|
-
readonly width: "100%";
|
|
25
|
-
readonly maxWidth: "28rem";
|
|
26
|
-
};
|
|
27
|
-
readonly title: {
|
|
28
|
-
readonly marginTop: "1.5rem";
|
|
29
|
-
readonly textAlign: "center";
|
|
30
|
-
readonly fontSize: "1.875rem";
|
|
31
|
-
readonly fontWeight: "700";
|
|
32
|
-
readonly lineHeight: "2.25rem";
|
|
33
|
-
readonly letterSpacing: "-0.025em";
|
|
34
|
-
readonly color: "var(--tern-text-primary, #111827)";
|
|
35
|
-
};
|
|
36
|
-
readonly formWrapper: {
|
|
37
|
-
readonly marginTop: "2.5rem";
|
|
38
|
-
readonly margin: "0 auto";
|
|
39
|
-
readonly width: "100%";
|
|
40
|
-
readonly maxWidth: "30rem";
|
|
41
|
-
};
|
|
42
|
-
readonly formContainer: {
|
|
43
|
-
readonly padding: "3rem 1.5rem";
|
|
44
|
-
readonly boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1)";
|
|
45
|
-
readonly borderRadius: "0.5rem";
|
|
46
|
-
readonly backgroundColor: "var(--tern-background, white)";
|
|
47
|
-
};
|
|
48
|
-
readonly form: {
|
|
49
|
-
readonly display: "flex";
|
|
50
|
-
readonly flexDirection: "column";
|
|
51
|
-
readonly gap: "1rem";
|
|
52
|
-
};
|
|
53
|
-
readonly label: {
|
|
54
|
-
readonly display: "block";
|
|
55
|
-
readonly fontSize: "0.875rem";
|
|
56
|
-
readonly fontWeight: "500";
|
|
57
|
-
readonly color: "var(--tern-text-secondary, #374151)";
|
|
58
|
-
};
|
|
59
|
-
readonly input: {
|
|
60
|
-
readonly marginTop: "0.25rem";
|
|
61
|
-
readonly display: "block";
|
|
62
|
-
readonly width: "100%";
|
|
63
|
-
readonly padding: "0.5rem 0.75rem";
|
|
64
|
-
readonly borderRadius: "0.375rem";
|
|
65
|
-
readonly border: "1px solid var(--tern-border, #D1D5DB)";
|
|
66
|
-
readonly backgroundColor: "var(--tern-input-background, white)";
|
|
67
|
-
readonly color: "var(--tern-text-primary, #111827)";
|
|
68
|
-
};
|
|
69
|
-
readonly button: {
|
|
70
|
-
readonly display: "flex";
|
|
71
|
-
readonly width: "100%";
|
|
72
|
-
readonly justifyContent: "center";
|
|
73
|
-
readonly padding: "0.5rem 1rem";
|
|
74
|
-
readonly fontSize: "0.875rem";
|
|
75
|
-
readonly fontWeight: "500";
|
|
76
|
-
readonly color: "white";
|
|
77
|
-
readonly backgroundColor: "var(--tern-primary, #2563EB)";
|
|
78
|
-
readonly border: "none";
|
|
79
|
-
readonly borderRadius: "0.375rem";
|
|
80
|
-
readonly cursor: "pointer";
|
|
81
|
-
};
|
|
82
|
-
readonly error: {
|
|
83
|
-
readonly color: "var(--tern-error, #DC2626)";
|
|
84
|
-
readonly fontSize: "0.875rem";
|
|
85
|
-
};
|
|
86
|
-
};
|
|
87
|
-
export declare const styles: {
|
|
88
|
-
readonly container: "tern-container";
|
|
89
|
-
readonly header: "tern-header";
|
|
90
|
-
readonly title: "tern-title";
|
|
91
|
-
readonly formWrapper: "tern-formWrapper";
|
|
92
|
-
readonly formContainer: "tern-formContainer";
|
|
93
|
-
readonly form: "tern-form";
|
|
94
|
-
readonly label: "tern-label";
|
|
95
|
-
readonly input: "tern-input";
|
|
96
|
-
readonly button: "tern-button";
|
|
97
|
-
readonly error: "tern-error";
|
|
98
|
-
};
|
|
99
|
-
//# sourceMappingURL=create-styles.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"create-styles.d.ts","sourceRoot":"","sources":["../../../src/utils/create-styles.ts"],"names":[],"mappings":"AAUA,eAAO,MAAM,iBAAiB;;;;;;;;;;;CAWpB,CAAA;AAwCV,eAAO,MAAM,WAAW;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyEd,CAAA;AAGV,eAAO,MAAM,MAAM;;;;;;;;;;;CAAgC,CAAA"}
|