@tern-secure/nextjs 3.1.22 → 3.1.23

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,41 @@
1
+ // src/app-router/client/providers/ternSecureClientProvider.tsx
2
+ import { useState } from "react";
3
+
4
+ // src/app-router/client/providers/ternSecureContext.tsx
5
+ import React from "react";
6
+ var initialState = {
7
+ firebase: {
8
+ initialized: false,
9
+ error: null
10
+ },
11
+ auth: {
12
+ user: null,
13
+ loading: true,
14
+ error: null,
15
+ isSignedIn: false
16
+ }
17
+ };
18
+ var TernSecureContext = React.createContext([initialState, () => {
19
+ }]);
20
+ var useTernSecure = (hookname) => {
21
+ const context = React.useContext(TernSecureContext);
22
+ if (!context) {
23
+ throw new Error(
24
+ `${hookname} must be used within TernSecureProvider`
25
+ );
26
+ }
27
+ return context;
28
+ };
29
+
30
+ // src/app-router/client/providers/ternSecureClientProvider.tsx
31
+ import { jsx } from "react/jsx-runtime";
32
+ function TernSecureClientProvider({ children }) {
33
+ const stateAndUpdater = useState(initialState);
34
+ return /* @__PURE__ */ jsx(TernSecureContext.Provider, { value: stateAndUpdater, children });
35
+ }
36
+
37
+ export {
38
+ TernSecureContext,
39
+ useTernSecure,
40
+ TernSecureClientProvider
41
+ };
package/dist/index.cjs CHANGED
@@ -1,20 +1,111 @@
1
- 'use strict';
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __esm = (fn, res) => function __init() {
9
+ return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res;
10
+ };
11
+ var __export = (target, all) => {
12
+ for (var name in all)
13
+ __defProp(target, name, { get: all[name], enumerable: true });
14
+ };
15
+ var __copyProps = (to, from, except, desc) => {
16
+ if (from && typeof from === "object" || typeof from === "function") {
17
+ for (let key of __getOwnPropNames(from))
18
+ if (!__hasOwnProp.call(to, key) && key !== except)
19
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
20
+ }
21
+ return to;
22
+ };
23
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
24
+ // If the importer is in node compatibility mode or this is not an ESM
25
+ // file that has been converted to a CommonJS file using a Babel-
26
+ // compatible transform (i.e. "__esModule" has not been set), then set
27
+ // "default" to the CommonJS "module.exports" for node compatibility.
28
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
29
+ mod
30
+ ));
31
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
2
32
 
3
- var chunkWR6O4YMW_cjs = require('./chunk-WR6O4YMW.cjs');
4
- var app$1 = require('firebase/app');
5
- var auth$1 = require('firebase/auth');
6
- var firestore$1 = require('firebase/firestore');
7
- var storage$1 = require('firebase/storage');
8
- var React = require('react');
9
- var dynamic = require('next/dynamic');
10
- var jsxRuntime = require('react/jsx-runtime');
33
+ // src/app-router/client/providers/ternSecureContext.tsx
34
+ var import_react, initialState, TernSecureContext, useTernSecure;
35
+ var init_ternSecureContext = __esm({
36
+ "src/app-router/client/providers/ternSecureContext.tsx"() {
37
+ "use strict";
38
+ "use client";
39
+ import_react = __toESM(require("react"), 1);
40
+ initialState = {
41
+ firebase: {
42
+ initialized: false,
43
+ error: null
44
+ },
45
+ auth: {
46
+ user: null,
47
+ loading: true,
48
+ error: null,
49
+ isSignedIn: false
50
+ }
51
+ };
52
+ TernSecureContext = import_react.default.createContext([initialState, () => {
53
+ }]);
54
+ useTernSecure = (hookname) => {
55
+ const context = import_react.default.useContext(TernSecureContext);
56
+ if (!context) {
57
+ throw new Error(
58
+ `${hookname} must be used within TernSecureProvider`
59
+ );
60
+ }
61
+ return context;
62
+ };
63
+ }
64
+ });
11
65
 
12
- function _interopDefault (e) { return e && e.__esModule ? e : { default: e }; }
66
+ // src/app-router/client/providers/ternSecureClientProvider.tsx
67
+ var ternSecureClientProvider_exports = {};
68
+ __export(ternSecureClientProvider_exports, {
69
+ TernSecureClientProvider: () => TernSecureClientProvider
70
+ });
71
+ function TernSecureClientProvider({ children }) {
72
+ const stateAndUpdater = (0, import_react2.useState)(initialState);
73
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(TernSecureContext.Provider, { value: stateAndUpdater, children });
74
+ }
75
+ var import_react2, import_jsx_runtime;
76
+ var init_ternSecureClientProvider = __esm({
77
+ "src/app-router/client/providers/ternSecureClientProvider.tsx"() {
78
+ "use strict";
79
+ "use client";
80
+ import_react2 = require("react");
81
+ init_ternSecureContext();
82
+ import_jsx_runtime = require("react/jsx-runtime");
83
+ }
84
+ });
13
85
 
14
- var React__default = /*#__PURE__*/_interopDefault(React);
15
- var dynamic__default = /*#__PURE__*/_interopDefault(dynamic);
86
+ // src/index.ts
87
+ var src_exports = {};
88
+ __export(src_exports, {
89
+ SignIn: () => SignIn,
90
+ TernSecureAuth: () => TernSecureAuth,
91
+ TernSecureClientProvider: () => TernSecureClientProvider,
92
+ TernSecureContext: () => TernSecureContext,
93
+ TernSecureFirestore: () => TernSecureFirestore,
94
+ TernSecureProvider: () => TernSecureProvider,
95
+ TernSecureStorage: () => TernSecureStorage,
96
+ loadFireConfig: () => loadFireConfig,
97
+ signInWithEmail: () => signInWithEmail,
98
+ useAuth: () => useAuth,
99
+ useTernSecure: () => useTernSecure,
100
+ validateConfig: () => validateConfig
101
+ });
102
+ module.exports = __toCommonJS(src_exports);
16
103
 
17
- /* eslint-disable */
104
+ // src/app-router/client/client-init.ts
105
+ var import_app = require("firebase/app");
106
+ var import_auth = require("firebase/auth");
107
+ var import_firestore = require("firebase/firestore");
108
+ var import_storage = require("firebase/storage");
18
109
 
19
110
  // src/app-router/client/config.ts
20
111
  var loadFireConfig = () => ({
@@ -38,46 +129,58 @@ var validateConfig = (config) => {
38
129
  // src/app-router/client/client-init.ts
39
130
  var app = (() => {
40
131
  const config = validateConfig(loadFireConfig());
41
- return app$1.getApps().length ? app$1.getApps()[0] : app$1.initializeApp(config);
132
+ return (0, import_app.getApps)().length ? (0, import_app.getApps)()[0] : (0, import_app.initializeApp)(config);
42
133
  })();
43
- var auth = auth$1.getAuth(app);
44
- auth$1.setPersistence(auth, auth$1.browserSessionPersistence);
45
- var firestore = firestore$1.getFirestore(app);
46
- var storage = storage$1.getStorage(app);
134
+ var auth = (0, import_auth.getAuth)(app);
135
+ (0, import_auth.setPersistence)(auth, import_auth.browserSessionPersistence);
136
+ var firestore = (0, import_firestore.getFirestore)(app);
137
+ var storage = (0, import_storage.getStorage)(app);
47
138
  var TernSecureAuth = () => auth;
48
139
  var TernSecureFirestore = () => firestore;
49
140
  var TernSecureStorage = () => storage;
141
+
142
+ // src/app-router/client/auth.ts
143
+ var import_auth2 = require("firebase/auth");
50
144
  async function signInWithEmail({
51
145
  email,
52
146
  password
53
147
  }) {
54
148
  const auth2 = TernSecureAuth();
55
- return auth$1.signInWithEmailAndPassword(auth2, email, password);
149
+ return (0, import_auth2.signInWithEmailAndPassword)(auth2, email, password);
56
150
  }
57
- var TernSecureClientProvider2 = dynamic__default.default(
58
- () => import('./ternSecureClientProvider-DXLMGG2U.cjs').then((mod) => mod.TernSecureClientProvider),
151
+
152
+ // src/app-router/client/index.ts
153
+ init_ternSecureContext();
154
+ init_ternSecureClientProvider();
155
+
156
+ // src/app-router/server/providers/TernSecureServerProvider.tsx
157
+ var import_react3 = __toESM(require("react"), 1);
158
+ var import_dynamic = __toESM(require("next/dynamic"), 1);
159
+ var import_jsx_runtime2 = require("react/jsx-runtime");
160
+ var TernSecureClientProvider2 = (0, import_dynamic.default)(
161
+ () => Promise.resolve().then(() => (init_ternSecureClientProvider(), ternSecureClientProvider_exports)).then((mod) => mod.TernSecureClientProvider),
59
162
  {
60
163
  ssr: false
61
164
  //loading: () => null // Return null or a loading indicator
62
165
  }
63
166
  );
64
167
  function TernSecureProvider({ children }) {
65
- const isRootLayout = React__default.default.Children.toArray(children).some(
66
- (child) => React__default.default.isValidElement(child) && child.type === "html"
168
+ const isRootLayout = import_react3.default.Children.toArray(children).some(
169
+ (child) => import_react3.default.isValidElement(child) && child.type === "html"
67
170
  );
68
171
  if (isRootLayout) {
69
- return React__default.default.Children.map(children, (child) => {
70
- if (React__default.default.isValidElement(child) && child.type === "html") {
71
- return React__default.default.cloneElement(
172
+ return import_react3.default.Children.map(children, (child) => {
173
+ if (import_react3.default.isValidElement(child) && child.type === "html") {
174
+ return import_react3.default.cloneElement(
72
175
  child,
73
176
  {},
74
- React__default.default.Children.map(child.props.children, (bodyChild) => {
75
- if (React__default.default.isValidElement(bodyChild) && bodyChild.type === "body") {
177
+ import_react3.default.Children.map(child.props.children, (bodyChild) => {
178
+ if (import_react3.default.isValidElement(bodyChild) && bodyChild.type === "body") {
76
179
  const bodyProps = bodyChild.props;
77
- return React__default.default.cloneElement(
180
+ return import_react3.default.cloneElement(
78
181
  bodyChild,
79
182
  {},
80
- /* @__PURE__ */ jsxRuntime.jsx(TernSecureClientProvider2, { children: bodyProps.children })
183
+ /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TernSecureClientProvider2, { children: bodyProps.children })
81
184
  );
82
185
  }
83
186
  return bodyChild;
@@ -87,11 +190,14 @@ function TernSecureProvider({ children }) {
87
190
  return child;
88
191
  });
89
192
  }
90
- return /* @__PURE__ */ jsxRuntime.jsx(TernSecureClientProvider2, { children });
193
+ return /* @__PURE__ */ (0, import_jsx_runtime2.jsx)(TernSecureClientProvider2, { children });
91
194
  }
195
+
196
+ // src/hooks/useAuth.ts
197
+ var import_react4 = require("react");
92
198
  function useAuth() {
93
- const [state, setState] = chunkWR6O4YMW_cjs.useTernSecure("useAuth");
94
- React.useEffect(() => {
199
+ const [state, setState] = useTernSecure("useAuth");
200
+ (0, import_react4.useEffect)(() => {
95
201
  try {
96
202
  const auth2 = TernSecureAuth();
97
203
  setState((prev) => ({
@@ -145,6 +251,9 @@ function useAuth() {
145
251
  return state.auth;
146
252
  }
147
253
 
254
+ // src/components/sign-in.tsx
255
+ var import_react5 = require("react");
256
+
148
257
  // src/utils/create-styles.ts
149
258
  var PREFIX = "tern";
150
259
  var styleInjection = {
@@ -262,6 +371,9 @@ var styleConfig = {
262
371
  }
263
372
  };
264
373
  var styles = createStyleSheet(styleConfig);
374
+
375
+ // src/components/sign-in.tsx
376
+ var import_jsx_runtime3 = require("react/jsx-runtime");
265
377
  function SignIn({
266
378
  onSuccess,
267
379
  onError,
@@ -270,10 +382,10 @@ function SignIn({
270
382
  style,
271
383
  customStyles = {}
272
384
  }) {
273
- const [email, setEmail] = React.useState("");
274
- const [password, setPassword] = React.useState("");
275
- const [loading, setLoading] = React.useState(false);
276
- const [error, setError] = React.useState("");
385
+ const [email, setEmail] = (0, import_react5.useState)("");
386
+ const [password, setPassword] = (0, import_react5.useState)("");
387
+ const [loading, setLoading] = (0, import_react5.useState)(false);
388
+ const [error, setError] = (0, import_react5.useState)("");
277
389
  const handleSubmit = async (e) => {
278
390
  e.preventDefault();
279
391
  setLoading(true);
@@ -292,9 +404,9 @@ function SignIn({
292
404
  setLoading(false);
293
405
  }
294
406
  };
295
- return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: `${styles.container} ${customStyles.container || ""}`, style, children: [
296
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.header} ${customStyles.header || ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("h2", { className: `${styles.title} ${customStyles.title || ""}`, children: "Sign in to your account" }) }),
297
- /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.formWrapper} ${customStyles.formWrapper || ""}`, children: /* @__PURE__ */ jsxRuntime.jsx("div", { className: `${styles.formContainer} ${customStyles.formContainer || ""}`, children: /* @__PURE__ */ jsxRuntime.jsxs(
407
+ return /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { className: `${styles.container} ${customStyles.container || ""}`, style, children: [
408
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `${styles.header} ${customStyles.header || ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("h2", { className: `${styles.title} ${customStyles.title || ""}`, children: "Sign in to your account" }) }),
409
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `${styles.formWrapper} ${customStyles.formWrapper || ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("div", { className: `${styles.formContainer} ${customStyles.formContainer || ""}`, children: /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)(
298
410
  "form",
299
411
  {
300
412
  onSubmit: handleSubmit,
@@ -302,7 +414,7 @@ function SignIn({
302
414
  role: "form",
303
415
  "aria-label": "Sign in form",
304
416
  children: [
305
- error && /* @__PURE__ */ jsxRuntime.jsx(
417
+ error && /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
306
418
  "div",
307
419
  {
308
420
  className: `${styles.error} ${customStyles.errorText || ""}`,
@@ -311,9 +423,9 @@ function SignIn({
311
423
  children: error
312
424
  }
313
425
  ),
314
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
315
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "email", className: `${styles.label} ${customStyles.label || ""}`, children: "Email" }),
316
- /* @__PURE__ */ jsxRuntime.jsx(
426
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
427
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: "email", className: `${styles.label} ${customStyles.label || ""}`, children: "Email" }),
428
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
317
429
  "input",
318
430
  {
319
431
  id: "email",
@@ -329,9 +441,9 @@ function SignIn({
329
441
  }
330
442
  )
331
443
  ] }),
332
- /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
333
- /* @__PURE__ */ jsxRuntime.jsx("label", { htmlFor: "password", className: `${styles.label} ${customStyles.label || ""}`, children: "Password" }),
334
- /* @__PURE__ */ jsxRuntime.jsx(
444
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsxs)("div", { children: [
445
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)("label", { htmlFor: "password", className: `${styles.label} ${customStyles.label || ""}`, children: "Password" }),
446
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
335
447
  "input",
336
448
  {
337
449
  id: "password",
@@ -347,7 +459,7 @@ function SignIn({
347
459
  }
348
460
  )
349
461
  ] }),
350
- /* @__PURE__ */ jsxRuntime.jsx(
462
+ /* @__PURE__ */ (0, import_jsx_runtime3.jsx)(
351
463
  "button",
352
464
  {
353
465
  type: "submit",
@@ -362,27 +474,18 @@ function SignIn({
362
474
  ) }) })
363
475
  ] });
364
476
  }
365
-
366
- Object.defineProperty(exports, "TernSecureClientProvider", {
367
- enumerable: true,
368
- get: function () { return chunkWR6O4YMW_cjs.TernSecureClientProvider; }
369
- });
370
- Object.defineProperty(exports, "TernSecureContext", {
371
- enumerable: true,
372
- get: function () { return chunkWR6O4YMW_cjs.TernSecureContext; }
373
- });
374
- Object.defineProperty(exports, "useTernSecure", {
375
- enumerable: true,
376
- get: function () { return chunkWR6O4YMW_cjs.useTernSecure; }
477
+ // Annotate the CommonJS export names for ESM import in node:
478
+ 0 && (module.exports = {
479
+ SignIn,
480
+ TernSecureAuth,
481
+ TernSecureClientProvider,
482
+ TernSecureContext,
483
+ TernSecureFirestore,
484
+ TernSecureProvider,
485
+ TernSecureStorage,
486
+ loadFireConfig,
487
+ signInWithEmail,
488
+ useAuth,
489
+ useTernSecure,
490
+ validateConfig
377
491
  });
378
- exports.SignIn = SignIn;
379
- exports.TernSecureAuth = TernSecureAuth;
380
- exports.TernSecureFirestore = TernSecureFirestore;
381
- exports.TernSecureProvider = TernSecureProvider;
382
- exports.TernSecureStorage = TernSecureStorage;
383
- exports.loadFireConfig = loadFireConfig;
384
- exports.signInWithEmail = signInWithEmail;
385
- exports.useAuth = useAuth;
386
- exports.validateConfig = validateConfig;
387
- //# sourceMappingURL=index.cjs.map
388
- //# sourceMappingURL=index.cjs.map
package/dist/index.js CHANGED
@@ -1,14 +1,14 @@
1
- import { useTernSecure } from './chunk-2RTGO3FB.js';
2
- export { TernSecureClientProvider, TernSecureContext, useTernSecure } from './chunk-2RTGO3FB.js';
3
- import { getApps, initializeApp } from 'firebase/app';
4
- import { getAuth, setPersistence, browserSessionPersistence, signInWithEmailAndPassword } from 'firebase/auth';
5
- import { getFirestore } from 'firebase/firestore';
6
- import { getStorage } from 'firebase/storage';
7
- import React, { useEffect, useState } from 'react';
8
- import dynamic from 'next/dynamic';
9
- import { jsx, jsxs } from 'react/jsx-runtime';
1
+ import {
2
+ TernSecureClientProvider,
3
+ TernSecureContext,
4
+ useTernSecure
5
+ } from "./chunk-AHVNPKXU.js";
10
6
 
11
- /* eslint-disable */
7
+ // src/app-router/client/client-init.ts
8
+ import { getApps, initializeApp } from "firebase/app";
9
+ import { getAuth, setPersistence, browserSessionPersistence } from "firebase/auth";
10
+ import { getFirestore } from "firebase/firestore";
11
+ import { getStorage } from "firebase/storage";
12
12
 
13
13
  // src/app-router/client/config.ts
14
14
  var loadFireConfig = () => ({
@@ -41,6 +41,9 @@ var storage = getStorage(app);
41
41
  var TernSecureAuth = () => auth;
42
42
  var TernSecureFirestore = () => firestore;
43
43
  var TernSecureStorage = () => storage;
44
+
45
+ // src/app-router/client/auth.ts
46
+ import { signInWithEmailAndPassword } from "firebase/auth";
44
47
  async function signInWithEmail({
45
48
  email,
46
49
  password
@@ -48,8 +51,13 @@ async function signInWithEmail({
48
51
  const auth2 = TernSecureAuth();
49
52
  return signInWithEmailAndPassword(auth2, email, password);
50
53
  }
54
+
55
+ // src/app-router/server/providers/TernSecureServerProvider.tsx
56
+ import React from "react";
57
+ import dynamic from "next/dynamic";
58
+ import { jsx } from "react/jsx-runtime";
51
59
  var TernSecureClientProvider2 = dynamic(
52
- () => import('./ternSecureClientProvider-OJMAWZZ2.js').then((mod) => mod.TernSecureClientProvider),
60
+ () => import("./ternSecureClientProvider-P663N3F7.js").then((mod) => mod.TernSecureClientProvider),
53
61
  {
54
62
  ssr: false
55
63
  //loading: () => null // Return null or a loading indicator
@@ -83,6 +91,9 @@ function TernSecureProvider({ children }) {
83
91
  }
84
92
  return /* @__PURE__ */ jsx(TernSecureClientProvider2, { children });
85
93
  }
94
+
95
+ // src/hooks/useAuth.ts
96
+ import { useEffect } from "react";
86
97
  function useAuth() {
87
98
  const [state, setState] = useTernSecure("useAuth");
88
99
  useEffect(() => {
@@ -139,6 +150,9 @@ function useAuth() {
139
150
  return state.auth;
140
151
  }
141
152
 
153
+ // src/components/sign-in.tsx
154
+ import { useState } from "react";
155
+
142
156
  // src/utils/create-styles.ts
143
157
  var PREFIX = "tern";
144
158
  var styleInjection = {
@@ -256,6 +270,9 @@ var styleConfig = {
256
270
  }
257
271
  };
258
272
  var styles = createStyleSheet(styleConfig);
273
+
274
+ // src/components/sign-in.tsx
275
+ import { jsx as jsx2, jsxs } from "react/jsx-runtime";
259
276
  function SignIn({
260
277
  onSuccess,
261
278
  onError,
@@ -287,8 +304,8 @@ function SignIn({
287
304
  }
288
305
  };
289
306
  return /* @__PURE__ */ jsxs("div", { className: `${styles.container} ${customStyles.container || ""}`, style, children: [
290
- /* @__PURE__ */ jsx("div", { className: `${styles.header} ${customStyles.header || ""}`, children: /* @__PURE__ */ jsx("h2", { className: `${styles.title} ${customStyles.title || ""}`, children: "Sign in to your account" }) }),
291
- /* @__PURE__ */ jsx("div", { className: `${styles.formWrapper} ${customStyles.formWrapper || ""}`, children: /* @__PURE__ */ jsx("div", { className: `${styles.formContainer} ${customStyles.formContainer || ""}`, children: /* @__PURE__ */ jsxs(
307
+ /* @__PURE__ */ jsx2("div", { className: `${styles.header} ${customStyles.header || ""}`, children: /* @__PURE__ */ jsx2("h2", { className: `${styles.title} ${customStyles.title || ""}`, children: "Sign in to your account" }) }),
308
+ /* @__PURE__ */ jsx2("div", { className: `${styles.formWrapper} ${customStyles.formWrapper || ""}`, children: /* @__PURE__ */ jsx2("div", { className: `${styles.formContainer} ${customStyles.formContainer || ""}`, children: /* @__PURE__ */ jsxs(
292
309
  "form",
293
310
  {
294
311
  onSubmit: handleSubmit,
@@ -296,7 +313,7 @@ function SignIn({
296
313
  role: "form",
297
314
  "aria-label": "Sign in form",
298
315
  children: [
299
- error && /* @__PURE__ */ jsx(
316
+ error && /* @__PURE__ */ jsx2(
300
317
  "div",
301
318
  {
302
319
  className: `${styles.error} ${customStyles.errorText || ""}`,
@@ -306,8 +323,8 @@ function SignIn({
306
323
  }
307
324
  ),
308
325
  /* @__PURE__ */ jsxs("div", { children: [
309
- /* @__PURE__ */ jsx("label", { htmlFor: "email", className: `${styles.label} ${customStyles.label || ""}`, children: "Email" }),
310
- /* @__PURE__ */ jsx(
326
+ /* @__PURE__ */ jsx2("label", { htmlFor: "email", className: `${styles.label} ${customStyles.label || ""}`, children: "Email" }),
327
+ /* @__PURE__ */ jsx2(
311
328
  "input",
312
329
  {
313
330
  id: "email",
@@ -324,8 +341,8 @@ function SignIn({
324
341
  )
325
342
  ] }),
326
343
  /* @__PURE__ */ jsxs("div", { children: [
327
- /* @__PURE__ */ jsx("label", { htmlFor: "password", className: `${styles.label} ${customStyles.label || ""}`, children: "Password" }),
328
- /* @__PURE__ */ jsx(
344
+ /* @__PURE__ */ jsx2("label", { htmlFor: "password", className: `${styles.label} ${customStyles.label || ""}`, children: "Password" }),
345
+ /* @__PURE__ */ jsx2(
329
346
  "input",
330
347
  {
331
348
  id: "password",
@@ -341,7 +358,7 @@ function SignIn({
341
358
  }
342
359
  )
343
360
  ] }),
344
- /* @__PURE__ */ jsx(
361
+ /* @__PURE__ */ jsx2(
345
362
  "button",
346
363
  {
347
364
  type: "submit",
@@ -356,7 +373,17 @@ function SignIn({
356
373
  ) }) })
357
374
  ] });
358
375
  }
359
-
360
- export { SignIn, TernSecureAuth, TernSecureFirestore, TernSecureProvider, TernSecureStorage, loadFireConfig, signInWithEmail, useAuth, validateConfig };
361
- //# sourceMappingURL=index.js.map
362
- //# sourceMappingURL=index.js.map
376
+ export {
377
+ SignIn,
378
+ TernSecureAuth,
379
+ TernSecureClientProvider,
380
+ TernSecureContext,
381
+ TernSecureFirestore,
382
+ TernSecureProvider,
383
+ TernSecureStorage,
384
+ loadFireConfig,
385
+ signInWithEmail,
386
+ useAuth,
387
+ useTernSecure,
388
+ validateConfig
389
+ };
@@ -0,0 +1,7 @@
1
+ "use client";
2
+ import {
3
+ TernSecureClientProvider
4
+ } from "./chunk-AHVNPKXU.js";
5
+ export {
6
+ TernSecureClientProvider
7
+ };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tern-secure/nextjs",
3
- "version": "3.1.22",
3
+ "version": "3.1.23",
4
4
  "packageManager": "npm@10.9.0",
5
5
  "type": "module",
6
6
  "publishConfig": {