@tern-secure/nextjs 3.1.44 → 3.1.46
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/cjs/index.js +80 -124
- package/dist/cjs/index.js.map +4 -4
- package/dist/esm/app-router/client/{providers/tern-client-provider.d.ts → TernSecureProvider.d.ts} +1 -1
- package/dist/esm/app-router/client/TernSecureProvider.d.ts.map +1 -0
- package/dist/esm/app-router/server/TernSecureServerProvider.d.ts +7 -0
- package/dist/esm/app-router/server/TernSecureServerProvider.d.ts.map +1 -0
- package/dist/esm/app-router/{client → server}/auth.d.ts.map +1 -1
- package/dist/esm/{app-router/client/providers/tern-ctx.d.ts → boundary/TernSecureCtx.d.ts} +1 -1
- package/dist/esm/boundary/TernSecureCtx.d.ts.map +1 -0
- package/dist/esm/boundary/hooks/useAuth.d.ts.map +1 -0
- package/dist/esm/{errors/index.d.ts → errors.d.ts} +1 -1
- package/dist/esm/errors.d.ts.map +1 -0
- package/dist/esm/index.d.ts +7 -3
- package/dist/esm/index.d.ts.map +1 -1
- package/dist/esm/index.js +330 -27
- package/dist/esm/index.js.map +4 -4
- package/dist/esm/types.d.ts +47 -0
- package/dist/esm/types.d.ts.map +1 -0
- package/dist/esm/utils/client-init.d.ts.map +1 -0
- package/dist/esm/utils/config.d.ts +19 -0
- package/dist/esm/utils/config.d.ts.map +1 -0
- package/package.json +2 -12
- package/dist/cjs/app-router/client/client-init.js +0 -68
- package/dist/cjs/app-router/client/client-init.js.map +0 -7
- package/dist/cjs/app-router/client/config.js +0 -49
- package/dist/cjs/app-router/client/config.js.map +0 -7
- package/dist/cjs/app-router/client/index.js +0 -129
- package/dist/cjs/app-router/client/index.js.map +0 -7
- package/dist/cjs/app-router/server/index.js +0 -128
- package/dist/cjs/app-router/server/index.js.map +0 -7
- package/dist/cjs/components/index.js +0 -298
- package/dist/cjs/components/index.js.map +0 -7
- package/dist/esm/app-router/client/client-init.d.ts.map +0 -1
- package/dist/esm/app-router/client/client-init.js +0 -12
- package/dist/esm/app-router/client/client-init.js.map +0 -7
- package/dist/esm/app-router/client/config.d.ts +0 -4
- package/dist/esm/app-router/client/config.d.ts.map +0 -1
- package/dist/esm/app-router/client/config.js +0 -9
- package/dist/esm/app-router/client/config.js.map +0 -7
- package/dist/esm/app-router/client/index.d.ts +0 -7
- package/dist/esm/app-router/client/index.d.ts.map +0 -1
- package/dist/esm/app-router/client/index.js +0 -30
- package/dist/esm/app-router/client/index.js.map +0 -7
- package/dist/esm/app-router/client/providers/tern-client-provider.d.ts.map +0 -1
- package/dist/esm/app-router/client/providers/tern-ctx.d.ts.map +0 -1
- package/dist/esm/app-router/server/index.d.ts +0 -2
- package/dist/esm/app-router/server/index.d.ts.map +0 -1
- package/dist/esm/app-router/server/index.js +0 -7
- package/dist/esm/app-router/server/index.js.map +0 -7
- package/dist/esm/app-router/server/providers/TernSecureServerProvider.d.ts +0 -7
- package/dist/esm/app-router/server/providers/TernSecureServerProvider.d.ts.map +0 -1
- package/dist/esm/chunk-5DISHXED.js +0 -24
- package/dist/esm/chunk-5DISHXED.js.map +0 -7
- package/dist/esm/chunk-BFWVABDV.js +0 -34
- package/dist/esm/chunk-BFWVABDV.js.map +0 -7
- package/dist/esm/chunk-HV76XKAT.js +0 -53
- package/dist/esm/chunk-HV76XKAT.js.map +0 -7
- package/dist/esm/chunk-VEDAIBAS.js +0 -26
- package/dist/esm/chunk-VEDAIBAS.js.map +0 -7
- package/dist/esm/chunk-VXRNAJSQ.js +0 -18
- package/dist/esm/chunk-VXRNAJSQ.js.map +0 -7
- package/dist/esm/chunk-ZEHPVICV.js +0 -232
- package/dist/esm/chunk-ZEHPVICV.js.map +0 -7
- package/dist/esm/components/index.d.ts +0 -2
- package/dist/esm/components/index.d.ts.map +0 -1
- package/dist/esm/components/index.js +0 -11
- package/dist/esm/components/index.js.map +0 -7
- package/dist/esm/errors/index.d.ts.map +0 -1
- package/dist/esm/hooks/index.d.ts +0 -2
- package/dist/esm/hooks/index.d.ts.map +0 -1
- package/dist/esm/hooks/useAuth.d.ts.map +0 -1
- package/dist/esm/tern-client-provider-B6T4DVB3.js +0 -8
- package/dist/esm/tern-client-provider-B6T4DVB3.js.map +0 -7
- package/dist/esm/types/index.d.ts +0 -18
- package/dist/esm/types/index.d.ts.map +0 -1
- /package/dist/esm/app-router/{client → server}/auth.d.ts +0 -0
- /package/dist/esm/{hooks → boundary/hooks}/useAuth.d.ts +0 -0
- /package/dist/esm/{app-router/client → utils}/client-init.d.ts +0 -0
|
@@ -1,232 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
signInWithEmail
|
|
3
|
-
} from "./chunk-VXRNAJSQ.js";
|
|
4
|
-
|
|
5
|
-
// src/components/sign-in.tsx
|
|
6
|
-
import { useState } from "react";
|
|
7
|
-
|
|
8
|
-
// src/utils/create-styles.ts
|
|
9
|
-
var PREFIX = "tern";
|
|
10
|
-
var styleInjection = {
|
|
11
|
-
isInjected: false,
|
|
12
|
-
styleElement: null
|
|
13
|
-
};
|
|
14
|
-
var defaultClassNames = {
|
|
15
|
-
container: `${PREFIX}-container`,
|
|
16
|
-
header: `${PREFIX}-header`,
|
|
17
|
-
title: `${PREFIX}-title`,
|
|
18
|
-
formWrapper: `${PREFIX}-formWrapper`,
|
|
19
|
-
formContainer: `${PREFIX}-formContainer`,
|
|
20
|
-
form: `${PREFIX}-form`,
|
|
21
|
-
label: `${PREFIX}-label`,
|
|
22
|
-
input: `${PREFIX}-input`,
|
|
23
|
-
button: `${PREFIX}-button`,
|
|
24
|
-
error: `${PREFIX}-error`
|
|
25
|
-
};
|
|
26
|
-
function createStyleSheet(styles2) {
|
|
27
|
-
if (typeof window === "undefined") return defaultClassNames;
|
|
28
|
-
if (styleInjection.isInjected) {
|
|
29
|
-
return defaultClassNames;
|
|
30
|
-
}
|
|
31
|
-
let styleElement = document.querySelector("[data-tern-secure]");
|
|
32
|
-
if (!styleElement) {
|
|
33
|
-
styleElement = document.createElement("style");
|
|
34
|
-
styleElement.setAttribute("data-tern-secure", "");
|
|
35
|
-
document.head.appendChild(styleElement);
|
|
36
|
-
styleInjection.styleElement = styleElement;
|
|
37
|
-
}
|
|
38
|
-
const cssRules = Object.entries(styles2).map(([key, rules]) => {
|
|
39
|
-
const className = defaultClassNames[key];
|
|
40
|
-
const cssProperties = Object.entries(rules).map(([prop, value]) => {
|
|
41
|
-
const cssProperty = prop.replace(/([A-Z])/g, "-$1").toLowerCase();
|
|
42
|
-
return `${cssProperty}: ${value};`;
|
|
43
|
-
}).join(" ");
|
|
44
|
-
return `.${className} { ${cssProperties} }`;
|
|
45
|
-
}).join("\n");
|
|
46
|
-
styleElement.textContent = cssRules;
|
|
47
|
-
styleInjection.isInjected = true;
|
|
48
|
-
return defaultClassNames;
|
|
49
|
-
}
|
|
50
|
-
var styleConfig = {
|
|
51
|
-
container: {
|
|
52
|
-
display: "flex",
|
|
53
|
-
minHeight: "100%",
|
|
54
|
-
flex: "1",
|
|
55
|
-
flexDirection: "column",
|
|
56
|
-
justifyContent: "center",
|
|
57
|
-
padding: "3rem 1.5rem"
|
|
58
|
-
},
|
|
59
|
-
header: {
|
|
60
|
-
margin: "0 auto",
|
|
61
|
-
width: "100%",
|
|
62
|
-
maxWidth: "28rem"
|
|
63
|
-
},
|
|
64
|
-
title: {
|
|
65
|
-
marginTop: "1.5rem",
|
|
66
|
-
textAlign: "center",
|
|
67
|
-
fontSize: "1.875rem",
|
|
68
|
-
fontWeight: "700",
|
|
69
|
-
lineHeight: "2.25rem",
|
|
70
|
-
letterSpacing: "-0.025em",
|
|
71
|
-
color: "var(--tern-text-primary, #111827)"
|
|
72
|
-
},
|
|
73
|
-
formWrapper: {
|
|
74
|
-
marginTop: "2.5rem",
|
|
75
|
-
margin: "0 auto",
|
|
76
|
-
width: "100%",
|
|
77
|
-
maxWidth: "30rem"
|
|
78
|
-
},
|
|
79
|
-
formContainer: {
|
|
80
|
-
padding: "3rem 1.5rem",
|
|
81
|
-
boxShadow: "0 1px 3px 0 rgb(0 0 0 / 0.1)",
|
|
82
|
-
borderRadius: "0.5rem",
|
|
83
|
-
backgroundColor: "var(--tern-background, white)"
|
|
84
|
-
},
|
|
85
|
-
form: {
|
|
86
|
-
display: "flex",
|
|
87
|
-
flexDirection: "column",
|
|
88
|
-
gap: "1rem"
|
|
89
|
-
},
|
|
90
|
-
label: {
|
|
91
|
-
display: "block",
|
|
92
|
-
fontSize: "0.875rem",
|
|
93
|
-
fontWeight: "500",
|
|
94
|
-
color: "var(--tern-text-secondary, #374151)"
|
|
95
|
-
},
|
|
96
|
-
input: {
|
|
97
|
-
marginTop: "0.25rem",
|
|
98
|
-
display: "block",
|
|
99
|
-
width: "100%",
|
|
100
|
-
padding: "0.5rem 0.75rem",
|
|
101
|
-
borderRadius: "0.375rem",
|
|
102
|
-
border: "1px solid var(--tern-border, #D1D5DB)",
|
|
103
|
-
backgroundColor: "var(--tern-input-background, white)",
|
|
104
|
-
color: "var(--tern-text-primary, #111827)"
|
|
105
|
-
},
|
|
106
|
-
button: {
|
|
107
|
-
display: "flex",
|
|
108
|
-
width: "100%",
|
|
109
|
-
justifyContent: "center",
|
|
110
|
-
padding: "0.5rem 1rem",
|
|
111
|
-
fontSize: "0.875rem",
|
|
112
|
-
fontWeight: "500",
|
|
113
|
-
color: "white",
|
|
114
|
-
backgroundColor: "var(--tern-primary, #2563EB)",
|
|
115
|
-
border: "none",
|
|
116
|
-
borderRadius: "0.375rem",
|
|
117
|
-
cursor: "pointer"
|
|
118
|
-
},
|
|
119
|
-
error: {
|
|
120
|
-
color: "var(--tern-error, #DC2626)",
|
|
121
|
-
fontSize: "0.875rem"
|
|
122
|
-
}
|
|
123
|
-
};
|
|
124
|
-
var styles = createStyleSheet(styleConfig);
|
|
125
|
-
|
|
126
|
-
// src/components/sign-in.tsx
|
|
127
|
-
import { jsx, jsxs } from "react/jsx-runtime";
|
|
128
|
-
function SignIn({
|
|
129
|
-
onSuccess,
|
|
130
|
-
onError,
|
|
131
|
-
redirectUrl,
|
|
132
|
-
className = "",
|
|
133
|
-
style,
|
|
134
|
-
customStyles = {}
|
|
135
|
-
}) {
|
|
136
|
-
const [email, setEmail] = useState("");
|
|
137
|
-
const [password, setPassword] = useState("");
|
|
138
|
-
const [loading, setLoading] = useState(false);
|
|
139
|
-
const [error, setError] = useState("");
|
|
140
|
-
const handleSubmit = async (e) => {
|
|
141
|
-
e.preventDefault();
|
|
142
|
-
setLoading(true);
|
|
143
|
-
setError("");
|
|
144
|
-
try {
|
|
145
|
-
await signInWithEmail({ email, password });
|
|
146
|
-
onSuccess?.();
|
|
147
|
-
if (redirectUrl) {
|
|
148
|
-
window.location.href = redirectUrl;
|
|
149
|
-
}
|
|
150
|
-
} catch (err) {
|
|
151
|
-
const errorMessage = err instanceof Error ? err.message : "Failed to sign in";
|
|
152
|
-
setError(errorMessage);
|
|
153
|
-
onError?.(err instanceof Error ? err : new Error("Failed to sign in"));
|
|
154
|
-
} finally {
|
|
155
|
-
setLoading(false);
|
|
156
|
-
}
|
|
157
|
-
};
|
|
158
|
-
return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${customStyles.container || ""}`, style, children: [
|
|
159
|
-
/* @__PURE__ */ jsx("div", { className: `${styles.header} ${customStyles.header || ""}`, children: /* @__PURE__ */ jsx("h2", { className: `${styles.title} ${customStyles.title || ""}`, children: "Sign in to your account" }) }),
|
|
160
|
-
/* @__PURE__ */ jsx("div", { className: `${styles.formWrapper} ${customStyles.formWrapper || ""}`, children: /* @__PURE__ */ jsx("div", { className: `${styles.formContainer} ${customStyles.formContainer || ""}`, children: /* @__PURE__ */ jsxs(
|
|
161
|
-
"form",
|
|
162
|
-
{
|
|
163
|
-
onSubmit: handleSubmit,
|
|
164
|
-
className: `${styles.form} ${customStyles.form || ""} ${className}`,
|
|
165
|
-
role: "form",
|
|
166
|
-
"aria-label": "Sign in form",
|
|
167
|
-
children: [
|
|
168
|
-
error && /* @__PURE__ */ jsx(
|
|
169
|
-
"div",
|
|
170
|
-
{
|
|
171
|
-
className: `${styles.error} ${customStyles.errorText || ""}`,
|
|
172
|
-
role: "alert",
|
|
173
|
-
"aria-live": "polite",
|
|
174
|
-
children: error
|
|
175
|
-
}
|
|
176
|
-
),
|
|
177
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
178
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "email", className: `${styles.label} ${customStyles.label || ""}`, children: "Email" }),
|
|
179
|
-
/* @__PURE__ */ jsx(
|
|
180
|
-
"input",
|
|
181
|
-
{
|
|
182
|
-
id: "email",
|
|
183
|
-
type: "email",
|
|
184
|
-
value: email,
|
|
185
|
-
onChange: (e) => setEmail(e.target.value),
|
|
186
|
-
placeholder: "Enter your email",
|
|
187
|
-
required: true,
|
|
188
|
-
className: `${styles.input} ${customStyles.input || ""}`,
|
|
189
|
-
disabled: loading,
|
|
190
|
-
"aria-required": "true",
|
|
191
|
-
"aria-invalid": !!error
|
|
192
|
-
}
|
|
193
|
-
)
|
|
194
|
-
] }),
|
|
195
|
-
/* @__PURE__ */ jsxs("div", { children: [
|
|
196
|
-
/* @__PURE__ */ jsx("label", { htmlFor: "password", className: `${styles.label} ${customStyles.label || ""}`, children: "Password" }),
|
|
197
|
-
/* @__PURE__ */ jsx(
|
|
198
|
-
"input",
|
|
199
|
-
{
|
|
200
|
-
id: "password",
|
|
201
|
-
type: "password",
|
|
202
|
-
value: password,
|
|
203
|
-
onChange: (e) => setPassword(e.target.value),
|
|
204
|
-
placeholder: "Enter your password",
|
|
205
|
-
required: true,
|
|
206
|
-
className: `${styles.input} ${customStyles.input || ""}`,
|
|
207
|
-
disabled: loading,
|
|
208
|
-
"aria-required": "true",
|
|
209
|
-
"aria-invalid": !!error
|
|
210
|
-
}
|
|
211
|
-
)
|
|
212
|
-
] }),
|
|
213
|
-
/* @__PURE__ */ jsx(
|
|
214
|
-
"button",
|
|
215
|
-
{
|
|
216
|
-
type: "submit",
|
|
217
|
-
disabled: loading,
|
|
218
|
-
className: `${styles.button} ${customStyles.button || ""}`,
|
|
219
|
-
"data-testid": "sign-in-submit",
|
|
220
|
-
children: loading ? "Signing in..." : "Sign in"
|
|
221
|
-
}
|
|
222
|
-
)
|
|
223
|
-
]
|
|
224
|
-
}
|
|
225
|
-
) }) })
|
|
226
|
-
] });
|
|
227
|
-
}
|
|
228
|
-
|
|
229
|
-
export {
|
|
230
|
-
SignIn
|
|
231
|
-
};
|
|
232
|
-
//# sourceMappingURL=chunk-ZEHPVICV.js.map
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
{
|
|
2
|
-
"version": 3,
|
|
3
|
-
"sources": ["../../src/components/sign-in.tsx", "../../src/utils/create-styles.ts"],
|
|
4
|
-
"sourcesContent": ["import * as React from 'react'\r\nimport { useState } from 'react'\r\nimport { signInWithEmail } from '../app-router/client'\r\nimport { styles } from '../utils/create-styles'\r\n\r\nexport interface SignInProps {\r\n onSuccess?: () => void\r\n onError?: (error: Error) => void\r\n redirectUrl?: string\r\n className?: string\r\n style?: React.CSSProperties\r\n customStyles?: {\r\n container?: string\r\n header?: string\r\n title?: string\r\n formWrapper?: string\r\n formContainer?: string\r\n form?: string\r\n input?: string\r\n button?: string\r\n errorText?: string\r\n label?: string\r\n }\r\n}\r\n\r\nexport function SignIn({ \r\n onSuccess, \r\n onError, \r\n redirectUrl,\r\n className = '',\r\n style,\r\n customStyles = {}\r\n}: SignInProps) {\r\n const [email, setEmail] = useState('')\r\n const [password, setPassword] = useState('')\r\n const [loading, setLoading] = useState(false)\r\n const [error, setError] = useState('')\r\n\r\n const handleSubmit = async (e: React.FormEvent) => {\r\n e.preventDefault()\r\n setLoading(true)\r\n setError('')\r\n\r\n try {\r\n await signInWithEmail({ email, password })\r\n onSuccess?.()\r\n \r\n if (redirectUrl) {\r\n window.location.href = redirectUrl\r\n }\r\n } catch (err) {\r\n const errorMessage = err instanceof Error ? err.message : 'Failed to sign in'\r\n setError(errorMessage)\r\n onError?.(err instanceof Error ? err : new Error('Failed to sign in'))\r\n } finally {\r\n setLoading(false)\r\n }\r\n }\r\n\r\n return (\r\n <div className={`${styles.container} ${customStyles.container || ''}`} style={style}>\r\n <div className={`${styles.header} ${customStyles.header || ''}`}>\r\n <h2 className={`${styles.title} ${customStyles.title || ''}`}>\r\n Sign in to your account\r\n </h2>\r\n </div>\r\n \r\n <div className={`${styles.formWrapper} ${customStyles.formWrapper || ''}`}>\r\n <div className={`${styles.formContainer} ${customStyles.formContainer || ''}`}>\r\n <form \r\n onSubmit={handleSubmit} \r\n className={`${styles.form} ${customStyles.form || ''} ${className}`}\r\n role=\"form\"\r\n aria-label=\"Sign in form\"\r\n >\r\n {error && (\r\n <div \r\n className={`${styles.error} ${customStyles.errorText || ''}`}\r\n role=\"alert\"\r\n aria-live=\"polite\"\r\n >\r\n {error}\r\n </div>\r\n )}\r\n <div>\r\n <label htmlFor=\"email\" className={`${styles.label} ${customStyles.label || ''}`}>\r\n Email\r\n </label>\r\n <input\r\n id=\"email\"\r\n type=\"email\"\r\n value={email}\r\n onChange={(e) => setEmail(e.target.value)}\r\n placeholder=\"Enter your email\"\r\n required\r\n className={`${styles.input} ${customStyles.input || ''}`}\r\n disabled={loading}\r\n aria-required=\"true\"\r\n aria-invalid={!!error}\r\n />\r\n </div>\r\n <div>\r\n <label htmlFor=\"password\" className={`${styles.label} ${customStyles.label || ''}`}>\r\n Password\r\n </label>\r\n <input\r\n id=\"password\"\r\n type=\"password\"\r\n value={password}\r\n onChange={(e) => setPassword(e.target.value)}\r\n placeholder=\"Enter your password\"\r\n required\r\n className={`${styles.input} ${customStyles.input || ''}`}\r\n disabled={loading}\r\n aria-required=\"true\"\r\n aria-invalid={!!error}\r\n />\r\n </div>\r\n <button \r\n type=\"submit\" \r\n disabled={loading}\r\n className={`${styles.button} ${customStyles.button || ''}`}\r\n data-testid=\"sign-in-submit\"\r\n >\r\n {loading ? 'Signing in...' : 'Sign in'}\r\n </button>\r\n </form>\r\n </div>\r\n </div>\r\n </div>\r\n )\r\n}\r\n\r\n", "'use client'\r\n\r\nconst PREFIX = 'tern'\r\n\r\n// Singleton to track style injection\r\nconst styleInjection = {\r\n isInjected: false,\r\n styleElement: null as HTMLStyleElement | null\r\n}\r\n\r\nexport const defaultClassNames = {\r\n container: `${PREFIX}-container`,\r\n header: `${PREFIX}-header`,\r\n title: `${PREFIX}-title`,\r\n formWrapper: `${PREFIX}-formWrapper`,\r\n formContainer: `${PREFIX}-formContainer`,\r\n form: `${PREFIX}-form`,\r\n label: `${PREFIX}-label`,\r\n input: `${PREFIX}-input`,\r\n button: `${PREFIX}-button`,\r\n error: `${PREFIX}-error`\r\n} as const\r\n\r\n// Create styles once and cache them\r\nfunction createStyleSheet(styles: Record<string, React.CSSProperties>) {\r\n if (typeof window === 'undefined') return defaultClassNames\r\n\r\n // Return early if styles are already injected\r\n if (styleInjection.isInjected) {\r\n return defaultClassNames\r\n }\r\n\r\n // Find existing style element or create new one\r\n let styleElement = document.querySelector<HTMLStyleElement>('[data-tern-secure]')\r\n \r\n if (!styleElement) {\r\n styleElement = document.createElement('style')\r\n styleElement.setAttribute('data-tern-secure', '')\r\n document.head.appendChild(styleElement)\r\n styleInjection.styleElement = styleElement\r\n }\r\n\r\n // Create CSS rules\r\n const cssRules = Object.entries(styles).map(([key, rules]) => {\r\n const className = defaultClassNames[key as keyof typeof defaultClassNames]\r\n const cssProperties = Object.entries(rules).map(([prop, value]) => {\r\n const cssProperty = prop.replace(/([A-Z])/g, '-$1').toLowerCase()\r\n return `${cssProperty}: ${value};`\r\n }).join(' ')\r\n\r\n return `.${className} { ${cssProperties} }`\r\n }).join('\\n')\r\n\r\n // Insert styles only once\r\n styleElement.textContent = cssRules\r\n styleInjection.isInjected = true\r\n\r\n return defaultClassNames\r\n}\r\n\r\n// Style configuration\r\nexport const styleConfig = {\r\n container: {\r\n display: 'flex',\r\n minHeight: '100%',\r\n flex: '1',\r\n flexDirection: 'column',\r\n justifyContent: 'center',\r\n padding: '3rem 1.5rem'\r\n },\r\n header: {\r\n margin: '0 auto',\r\n width: '100%',\r\n maxWidth: '28rem'\r\n },\r\n title: {\r\n marginTop: '1.5rem',\r\n textAlign: 'center',\r\n fontSize: '1.875rem',\r\n fontWeight: '700',\r\n lineHeight: '2.25rem',\r\n letterSpacing: '-0.025em',\r\n color: 'var(--tern-text-primary, #111827)'\r\n },\r\n formWrapper: {\r\n marginTop: '2.5rem',\r\n margin: '0 auto',\r\n width: '100%',\r\n maxWidth: '30rem'\r\n },\r\n formContainer: {\r\n padding: '3rem 1.5rem',\r\n boxShadow: '0 1px 3px 0 rgb(0 0 0 / 0.1)',\r\n borderRadius: '0.5rem',\r\n backgroundColor: 'var(--tern-background, white)'\r\n },\r\n form: {\r\n display: 'flex',\r\n flexDirection: 'column',\r\n gap: '1rem'\r\n },\r\n label: {\r\n display: 'block',\r\n fontSize: '0.875rem',\r\n fontWeight: '500',\r\n color: 'var(--tern-text-secondary, #374151)'\r\n },\r\n input: {\r\n marginTop: '0.25rem',\r\n display: 'block',\r\n width: '100%',\r\n padding: '0.5rem 0.75rem',\r\n borderRadius: '0.375rem',\r\n border: '1px solid var(--tern-border, #D1D5DB)',\r\n backgroundColor: 'var(--tern-input-background, white)',\r\n color: 'var(--tern-text-primary, #111827)'\r\n },\r\n button: {\r\n display: 'flex',\r\n width: '100%',\r\n justifyContent: 'center',\r\n padding: '0.5rem 1rem',\r\n fontSize: '0.875rem',\r\n fontWeight: '500',\r\n color: 'white',\r\n backgroundColor: 'var(--tern-primary, #2563EB)',\r\n border: 'none',\r\n borderRadius: '0.375rem',\r\n cursor: 'pointer'\r\n },\r\n error: {\r\n color: 'var(--tern-error, #DC2626)',\r\n fontSize: '0.875rem'\r\n }\r\n} as const\r\n\r\n// Export pre-created styles\r\nexport const styles = createStyleSheet(styleConfig)\r\n\r\n"],
|
|
5
|
-
"mappings": ";;;;;AACA,SAAS,gBAAgB;;;ACCzB,IAAM,SAAS;AAGf,IAAM,iBAAiB;AAAA,EACrB,YAAY;AAAA,EACZ,cAAc;AAChB;AAEO,IAAM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
-
"names": ["styles"]
|
|
7
|
-
}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/errors/index.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/hooks/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,OAAO,EAAC,MAAM,WAAW,CAAA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useAuth.d.ts","sourceRoot":"","sources":["../../../src/hooks/useAuth.ts"],"names":[],"mappings":"AAOA,MAAM,WAAW,SAAS;IACxB,MAAM,EAAE,MAAM,GAAG,IAAI,CAAA;IACrB,OAAO,EAAE,OAAO,CAAC;IACjB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAED,wBAAgB,OAAO;;;;;EAuCtB"}
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
export interface TernSecureConfig {
|
|
2
|
-
apiKey: string;
|
|
3
|
-
authDomain: string;
|
|
4
|
-
projectId: string;
|
|
5
|
-
storageBucket: string;
|
|
6
|
-
messagingSenderId: string;
|
|
7
|
-
appId: string;
|
|
8
|
-
measurementId: string;
|
|
9
|
-
}
|
|
10
|
-
export interface TernSecureOptions {
|
|
11
|
-
environment?: 'development' | 'production';
|
|
12
|
-
region?: string;
|
|
13
|
-
}
|
|
14
|
-
export interface FirebaseState {
|
|
15
|
-
initialized: boolean;
|
|
16
|
-
error: Error | null;
|
|
17
|
-
}
|
|
18
|
-
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/types/index.ts"],"names":[],"mappings":"AAEA,MAAM,WAAW,gBAAgB;IAC/B,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,iBAAiB,EAAE,MAAM,CAAC;IAC1B,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;CACvB;AAGD,MAAM,WAAW,iBAAiB;IAChC,WAAW,CAAC,EAAE,aAAa,GAAG,YAAY,CAAC;IAC3C,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AACD,MAAM,WAAW,aAAa;IAC5B,WAAW,EAAE,OAAO,CAAC;IACrB,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;CACrB"}
|
|
File without changes
|
|
File without changes
|
|
File without changes
|