@stackframe/stack 2.3.4 → 2.3.7

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.
Files changed (262) hide show
  1. package/README.md +2 -2
  2. package/dist/components/card-frame.d.mts +9 -0
  3. package/dist/components/card-frame.d.ts +8 -5
  4. package/dist/components/card-frame.js +58 -23
  5. package/dist/components/credential-sign-in.d.mts +5 -0
  6. package/dist/components/credential-sign-in.d.ts +5 -1
  7. package/dist/components/credential-sign-in.js +109 -41
  8. package/dist/components/credential-sign-up.d.mts +5 -0
  9. package/dist/components/credential-sign-up.d.ts +5 -1
  10. package/dist/components/credential-sign-up.js +140 -62
  11. package/dist/components/forgot-password.d.mts +7 -0
  12. package/dist/components/forgot-password.d.ts +6 -2
  13. package/dist/components/forgot-password.js +83 -26
  14. package/dist/components/form-warning.d.mts +7 -0
  15. package/dist/components/form-warning.d.ts +6 -2
  16. package/dist/components/form-warning.js +34 -8
  17. package/dist/components/magic-link-sign-in.d.mts +5 -0
  18. package/dist/components/magic-link-sign-in.d.ts +5 -1
  19. package/dist/components/magic-link-sign-in.js +89 -31
  20. package/dist/components/message-card.d.mts +10 -0
  21. package/dist/components/message-card.d.ts +8 -4
  22. package/dist/components/message-card.js +45 -6
  23. package/dist/components/oauth-button.d.mts +8 -0
  24. package/dist/components/oauth-button.d.ts +6 -2
  25. package/dist/components/oauth-button.js +142 -63
  26. package/dist/components/oauth-group.d.mts +7 -0
  27. package/dist/components/oauth-group.d.ts +6 -2
  28. package/dist/components/oauth-group.js +46 -8
  29. package/dist/components/password-field.d.mts +5 -0
  30. package/dist/components/password-field.d.ts +5 -3
  31. package/dist/components/password-field.js +111 -41
  32. package/dist/components/password-reset-inner.d.mts +8 -0
  33. package/dist/components/password-reset-inner.d.ts +6 -2
  34. package/dist/components/password-reset-inner.js +120 -58
  35. package/dist/components/redirect-message-card.d.mts +8 -0
  36. package/dist/components/redirect-message-card.d.ts +6 -2
  37. package/dist/components/redirect-message-card.js +110 -58
  38. package/dist/components/separator-with-text.d.mts +7 -0
  39. package/dist/components/separator-with-text.d.ts +6 -2
  40. package/dist/components/separator-with-text.js +35 -5
  41. package/dist/components/user-avatar.d.mts +13 -0
  42. package/dist/components/user-avatar.d.ts +12 -2
  43. package/dist/components/user-avatar.js +34 -8
  44. package/dist/components/user-button.d.mts +15 -0
  45. package/dist/components/user-button.d.ts +14 -3
  46. package/dist/components/user-button.js +160 -24
  47. package/dist/components-core/avatar.d.mts +8 -0
  48. package/dist/components-core/avatar.d.ts +7 -5
  49. package/dist/components-core/avatar.js +73 -18
  50. package/dist/components-core/button.d.mts +12 -0
  51. package/dist/components-core/button.d.ts +8 -6
  52. package/dist/components-core/button.js +177 -113
  53. package/dist/components-core/card.d.mts +8 -0
  54. package/dist/components-core/card.d.ts +4 -2
  55. package/dist/components-core/card.js +73 -22
  56. package/dist/components-core/collapsible.d.mts +8 -0
  57. package/dist/components-core/collapsible.d.ts +8 -6
  58. package/dist/components-core/collapsible.js +48 -5
  59. package/dist/components-core/container.d.mts +8 -0
  60. package/dist/components-core/container.d.ts +5 -3
  61. package/dist/components-core/container.js +61 -11
  62. package/dist/components-core/dropdown.d.mts +15 -0
  63. package/dist/components-core/dropdown.d.ts +10 -8
  64. package/dist/components-core/dropdown.js +108 -36
  65. package/dist/components-core/index.d.mts +59 -0
  66. package/dist/components-core/index.d.ts +52 -38
  67. package/dist/components-core/index.js +144 -45
  68. package/dist/components-core/input.d.mts +6 -0
  69. package/dist/components-core/input.d.ts +5 -3
  70. package/dist/components-core/input.js +97 -28
  71. package/dist/components-core/label.d.mts +6 -0
  72. package/dist/components-core/label.d.ts +5 -3
  73. package/dist/components-core/label.js +65 -15
  74. package/dist/components-core/link.d.mts +10 -0
  75. package/dist/components-core/link.d.ts +7 -6
  76. package/dist/components-core/link.js +72 -18
  77. package/dist/components-core/loading-indicator.d.mts +13 -0
  78. package/dist/components-core/loading-indicator.d.ts +11 -4
  79. package/dist/components-core/loading-indicator.js +46 -6
  80. package/dist/components-core/popover.d.mts +8 -0
  81. package/dist/components-core/popover.d.ts +8 -6
  82. package/dist/components-core/popover.js +72 -16
  83. package/dist/components-core/separator.d.mts +6 -0
  84. package/dist/components-core/separator.d.ts +5 -3
  85. package/dist/components-core/separator.js +66 -16
  86. package/dist/components-core/skeleton.d.mts +7 -0
  87. package/dist/components-core/skeleton.d.ts +7 -0
  88. package/dist/components-core/skeleton.js +86 -0
  89. package/dist/components-core/tabs.d.mts +9 -0
  90. package/dist/components-core/tabs.d.ts +8 -6
  91. package/dist/components-core/tabs.js +87 -20
  92. package/dist/components-core/text.d.mts +10 -0
  93. package/dist/components-core/text.d.ts +5 -3
  94. package/dist/components-core/text.js +95 -40
  95. package/dist/components-core-joy/button.d.mts +6 -0
  96. package/dist/components-core-joy/button.d.ts +6 -2
  97. package/dist/components-core-joy/button.js +86 -28
  98. package/dist/components-core-joy/input.d.mts +5 -0
  99. package/dist/components-core-joy/input.d.ts +5 -2
  100. package/dist/components-core-joy/input.js +51 -6
  101. package/dist/components-core-joy/separator.d.mts +6 -0
  102. package/dist/components-core-joy/separator.d.ts +6 -2
  103. package/dist/components-core-joy/separator.js +50 -6
  104. package/dist/components-core-joy/tabs.d.mts +9 -0
  105. package/dist/components-core-joy/tabs.d.ts +9 -5
  106. package/dist/components-core-joy/tabs.js +62 -16
  107. package/dist/components-core-joy/text.d.mts +9 -0
  108. package/dist/components-core-joy/text.d.ts +6 -3
  109. package/dist/components-core-joy/text.js +68 -28
  110. package/dist/components-page/account-settings.d.mts +7 -0
  111. package/dist/components-page/account-settings.d.ts +6 -2
  112. package/dist/components-page/account-settings.js +213 -81
  113. package/dist/components-page/auth-page.d.mts +8 -0
  114. package/dist/components-page/auth-page.d.ts +6 -2
  115. package/dist/components-page/auth-page.js +79 -19
  116. package/dist/components-page/email-verification.d.mts +8 -0
  117. package/dist/components-page/email-verification.d.ts +6 -2
  118. package/dist/components-page/email-verification.js +65 -28
  119. package/dist/components-page/forgot-password.d.mts +7 -0
  120. package/dist/components-page/forgot-password.d.ts +6 -2
  121. package/dist/components-page/forgot-password.js +64 -20
  122. package/dist/components-page/magic-link-callback.d.mts +8 -0
  123. package/dist/components-page/magic-link-callback.d.ts +6 -2
  124. package/dist/components-page/magic-link-callback.js +72 -34
  125. package/dist/components-page/oauth-callback.d.mts +5 -0
  126. package/dist/components-page/oauth-callback.d.ts +5 -1
  127. package/dist/components-page/oauth-callback.js +52 -16
  128. package/dist/components-page/password-reset.d.mts +8 -0
  129. package/dist/components-page/password-reset.d.ts +6 -2
  130. package/dist/components-page/password-reset.js +70 -34
  131. package/dist/components-page/sign-in.d.mts +7 -0
  132. package/dist/components-page/sign-in.d.ts +6 -2
  133. package/dist/components-page/sign-in.js +41 -5
  134. package/dist/components-page/sign-out.d.mts +5 -0
  135. package/dist/components-page/sign-out.d.ts +5 -1
  136. package/dist/components-page/sign-out.js +47 -11
  137. package/dist/components-page/sign-up.d.mts +7 -0
  138. package/dist/components-page/sign-up.d.ts +6 -2
  139. package/dist/components-page/sign-up.js +41 -5
  140. package/dist/components-page/stack-handler.d.mts +16 -0
  141. package/dist/components-page/stack-handler.d.ts +11 -3
  142. package/dist/components-page/stack-handler.js +102 -64
  143. package/dist/esm/components/card-frame.js +39 -0
  144. package/dist/esm/components/credential-sign-in.js +82 -0
  145. package/dist/esm/components/credential-sign-up.js +114 -0
  146. package/dist/esm/components/forgot-password.js +55 -0
  147. package/dist/esm/components/form-warning.js +15 -0
  148. package/dist/esm/components/magic-link-sign-in.js +61 -0
  149. package/dist/esm/components/message-card.js +16 -0
  150. package/dist/esm/components/oauth-button.js +124 -0
  151. package/dist/esm/components/oauth-group.js +17 -0
  152. package/dist/esm/components/password-field.js +82 -0
  153. package/dist/esm/components/password-reset-inner.js +93 -0
  154. package/dist/esm/components/redirect-message-card.js +83 -0
  155. package/dist/esm/components/separator-with-text.js +16 -0
  156. package/dist/esm/components/user-avatar.js +14 -0
  157. package/dist/esm/components/user-button.js +133 -0
  158. package/dist/esm/components-core/avatar.js +56 -0
  159. package/dist/esm/components-core/button.js +165 -0
  160. package/dist/esm/components-core/card.js +51 -0
  161. package/dist/esm/components-core/collapsible.js +13 -0
  162. package/dist/esm/components-core/container.js +35 -0
  163. package/dist/esm/components-core/dropdown.js +106 -0
  164. package/dist/esm/components-core/index.js +93 -0
  165. package/dist/esm/components-core/input.js +80 -0
  166. package/dist/esm/components-core/label.js +38 -0
  167. package/dist/esm/components-core/link.js +38 -0
  168. package/dist/esm/components-core/loading-indicator.js +27 -0
  169. package/dist/esm/components-core/popover.js +43 -0
  170. package/dist/esm/components-core/separator.js +36 -0
  171. package/dist/esm/components-core/skeleton.js +52 -0
  172. package/dist/esm/components-core/tabs.js +79 -0
  173. package/dist/esm/components-core/text.js +63 -0
  174. package/dist/esm/components-core-joy/button.js +53 -0
  175. package/dist/esm/components-core-joy/input.js +18 -0
  176. package/dist/esm/components-core-joy/separator.js +17 -0
  177. package/dist/esm/components-core-joy/tabs.js +29 -0
  178. package/dist/esm/components-core-joy/text.js +35 -0
  179. package/dist/esm/components-page/account-settings.js +197 -0
  180. package/dist/esm/components-page/auth-page.js +50 -0
  181. package/dist/esm/components-page/email-verification.js +36 -0
  182. package/dist/esm/components-page/forgot-password.js +35 -0
  183. package/dist/esm/components-page/magic-link-callback.js +43 -0
  184. package/dist/esm/components-page/oauth-callback.js +23 -0
  185. package/dist/esm/components-page/password-reset.js +42 -0
  186. package/dist/esm/components-page/sign-in.js +12 -0
  187. package/dist/esm/components-page/sign-out.js +18 -0
  188. package/dist/esm/components-page/sign-up.js +12 -0
  189. package/dist/esm/components-page/stack-handler.js +75 -0
  190. package/dist/esm/index.js +47 -0
  191. package/dist/esm/joy.js +5 -0
  192. package/dist/esm/lib/auth.js +62 -0
  193. package/dist/esm/lib/cookie.js +185 -0
  194. package/dist/esm/lib/hooks.js +29 -0
  195. package/dist/esm/lib/stack-app.js +940 -0
  196. package/dist/esm/providers/component-provider.js +76 -0
  197. package/dist/esm/providers/design-provider.js +36 -0
  198. package/dist/esm/providers/joy-provider.js +35 -0
  199. package/dist/esm/providers/stack-provider-client.js +31 -0
  200. package/dist/esm/providers/stack-provider.js +21 -0
  201. package/dist/esm/providers/styled-components-registry.js +24 -0
  202. package/dist/esm/providers/theme-provider.js +22 -0
  203. package/dist/esm/utils/browser-script.js +25 -0
  204. package/dist/esm/utils/constants.js +34 -0
  205. package/dist/esm/utils/email.js +10 -0
  206. package/dist/esm/utils/next.js +7 -0
  207. package/dist/esm/utils/url.js +21 -0
  208. package/dist/index.d.mts +37 -0
  209. package/dist/index.d.ts +37 -22
  210. package/dist/index.js +106 -21
  211. package/dist/joy.d.mts +16 -0
  212. package/dist/joy.d.ts +16 -1
  213. package/dist/joy.js +30 -1
  214. package/dist/lib/auth.d.mts +11 -0
  215. package/dist/lib/auth.d.ts +8 -4
  216. package/dist/lib/auth.js +83 -57
  217. package/dist/lib/cookie.d.mts +14 -0
  218. package/dist/lib/cookie.d.ts +8 -6
  219. package/dist/lib/cookie.js +217 -45
  220. package/dist/lib/hooks.d.mts +35 -0
  221. package/dist/lib/hooks.d.ts +14 -8
  222. package/dist/lib/hooks.js +53 -28
  223. package/dist/lib/stack-app.d.mts +227 -0
  224. package/dist/lib/stack-app.d.ts +45 -44
  225. package/dist/lib/stack-app.js +937 -861
  226. package/dist/providers/component-provider.d.mts +113 -0
  227. package/dist/providers/component-provider.d.ts +97 -73
  228. package/dist/providers/component-provider.js +92 -56
  229. package/dist/providers/design-provider.d.mts +34 -0
  230. package/dist/providers/design-provider.d.ts +16 -21
  231. package/dist/providers/design-provider.js +57 -64
  232. package/dist/providers/joy-provider.d.mts +36 -0
  233. package/dist/providers/joy-provider.d.ts +30 -14
  234. package/dist/providers/joy-provider.js +58 -30
  235. package/dist/providers/stack-provider-client.d.mts +20 -0
  236. package/dist/providers/stack-provider-client.d.ts +18 -7
  237. package/dist/providers/stack-provider-client.js +65 -12
  238. package/dist/providers/stack-provider.d.mts +14 -0
  239. package/dist/providers/stack-provider.d.ts +13 -5
  240. package/dist/providers/stack-provider.js +41 -5
  241. package/dist/providers/styled-components-registry.d.mts +8 -0
  242. package/dist/providers/styled-components-registry.d.ts +8 -4
  243. package/dist/providers/styled-components-registry.js +43 -17
  244. package/dist/providers/theme-provider.d.mts +22 -0
  245. package/dist/providers/theme-provider.d.ts +21 -9
  246. package/dist/providers/theme-provider.js +55 -19
  247. package/dist/utils/browser-script.d.mts +5 -0
  248. package/dist/utils/browser-script.d.ts +5 -0
  249. package/dist/utils/browser-script.js +50 -0
  250. package/dist/utils/constants.d.mts +48 -0
  251. package/dist/utils/constants.d.ts +11 -9
  252. package/dist/utils/constants.js +66 -21
  253. package/dist/utils/email.d.mts +3 -0
  254. package/dist/utils/email.d.ts +3 -1
  255. package/dist/utils/email.js +44 -6
  256. package/dist/utils/next.d.mts +3 -0
  257. package/dist/utils/next.d.ts +3 -1
  258. package/dist/utils/next.js +31 -3
  259. package/dist/utils/url.d.mts +4 -0
  260. package/dist/utils/url.d.ts +4 -2
  261. package/dist/utils/url.js +44 -13
  262. package/package.json +20 -11
@@ -1,29 +1,69 @@
1
- 'use client';
2
- import { jsx as _jsx } from "react/jsx-runtime";
3
- import React from 'react';
4
- import { Typography as JoyText } from '@mui/joy';
5
- export const Text = React.forwardRef((props, ref) => {
6
- const { color, size, as, variant, ref: _, ...validProps } = props;
7
- const muiLevel = {
8
- h1: 'h1',
9
- h2: 'h2',
10
- h3: 'h3',
11
- h4: 'h4',
12
- h5: 'h4',
13
- h6: 'h4',
14
- p: {
15
- xl: 'body-lg',
16
- lg: 'body-lg',
17
- md: 'body-md',
18
- sm: 'body-sm',
19
- xs: 'body-xs'
20
- }[size || 'md']
21
- }[as || 'p'];
22
- const muiColor = {
23
- primary: undefined,
24
- secondary: 'neutral',
25
- success: 'success',
26
- warning: 'danger',
27
- }[variant || 'primary'];
28
- return _jsx(JoyText, { level: muiLevel, color: muiColor, ...validProps });
1
+ "use client";
2
+ "use strict";
3
+ "use client";
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
+
32
+ // src/components-core-joy/text.tsx
33
+ var text_exports = {};
34
+ __export(text_exports, {
35
+ Text: () => Text
36
+ });
37
+ module.exports = __toCommonJS(text_exports);
38
+ var import_react = __toESM(require("react"));
39
+ var import_joy = require("@mui/joy");
40
+ var import_jsx_runtime = require("react/jsx-runtime");
41
+ var Text = import_react.default.forwardRef((props, ref) => {
42
+ const { color, size, as, variant, ref: _, ...validProps } = props;
43
+ const muiLevel = {
44
+ h1: "h1",
45
+ h2: "h2",
46
+ h3: "h3",
47
+ h4: "h4",
48
+ h5: "h4",
49
+ h6: "h4",
50
+ p: {
51
+ xl: "body-lg",
52
+ lg: "body-lg",
53
+ md: "body-md",
54
+ sm: "body-sm",
55
+ xs: "body-xs"
56
+ }[size || "md"]
57
+ }[as || "p"];
58
+ const muiColor = {
59
+ primary: void 0,
60
+ secondary: "neutral",
61
+ success: "success",
62
+ warning: "danger"
63
+ }[variant || "primary"];
64
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_joy.Typography, { level: muiLevel, color: muiColor, ...validProps });
65
+ });
66
+ // Annotate the CommonJS export names for ESM import in node:
67
+ 0 && (module.exports = {
68
+ Text
29
69
  });
@@ -0,0 +1,7 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function AccountSettings({ fullPage }: {
4
+ fullPage?: boolean;
5
+ }): react_jsx_runtime.JSX.Element;
6
+
7
+ export { AccountSettings as default };
@@ -1,3 +1,7 @@
1
- export default function AccountSettings({ fullPage }: {
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function AccountSettings({ fullPage }: {
2
4
  fullPage?: boolean;
3
- }): import("react/jsx-runtime").JSX.Element;
5
+ }): react_jsx_runtime.JSX.Element;
6
+
7
+ export { AccountSettings as default };
@@ -1,95 +1,227 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import { PasswordField, useUser } from '..';
4
- import RedirectMessageCard from '../components/redirect-message-card';
5
- import { Text, Label, Input, Button, Card, CardHeader, CardContent, CardFooter, Container } from "../components-core";
6
- import UserAvatar from '../components/user-avatar';
7
- import { useState } from 'react';
8
- import FormWarningText from '../components/form-warning';
9
- import { getPasswordError } from '@stackframe/stack-shared/dist/helpers/password';
1
+ "use client";
2
+ "use strict";
3
+ "use client";
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
+
32
+ // src/components-page/account-settings.tsx
33
+ var account_settings_exports = {};
34
+ __export(account_settings_exports, {
35
+ default: () => AccountSettings
36
+ });
37
+ module.exports = __toCommonJS(account_settings_exports);
38
+ var import__ = require("..");
39
+ var import_redirect_message_card = __toESM(require("../components/redirect-message-card"));
40
+ var import_components_core = require("../components-core");
41
+ var import_user_avatar = __toESM(require("../components/user-avatar"));
42
+ var import_react = require("react");
43
+ var import_form_warning = __toESM(require("../components/form-warning"));
44
+ var import_password = require("@stackframe/stack-shared/dist/helpers/password");
45
+ var import_jsx_runtime = require("react/jsx-runtime");
10
46
  function SettingSection(props) {
11
- return (_jsxs(Card, { children: [_jsxs(CardHeader, { children: [_jsx(Text, { size: 'xl', as: 'h2', children: props.title }), _jsx(Text, { variant: 'secondary', children: props.desc })] }), props.children && _jsx(CardContent, { children: _jsx("div", { style: { display: 'flex', flexDirection: 'column', gap: '1.5rem' }, children: props.children }) }), props.buttonText && _jsx(CardFooter, { children: _jsx("div", { style: { display: 'flex', justifyContent: 'flex-end', width: '100%' }, children: _jsx(Button, { disabled: props.buttonDisabled, onClick: props.onButtonClick, variant: props.buttonVariant, children: props.buttonText }) }) })] }));
47
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.Card, { children: [
48
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.CardHeader, { children: [
49
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { size: "xl", as: "h2", children: props.title }),
50
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { variant: "secondary", children: props.desc })
51
+ ] }),
52
+ props.children && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.CardContent, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", flexDirection: "column", gap: "1.5rem" }, children: props.children }) }),
53
+ props.buttonText && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.CardFooter, { children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)("div", { style: { display: "flex", justifyContent: "flex-end", width: "100%" }, children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
54
+ import_components_core.Button,
55
+ {
56
+ disabled: props.buttonDisabled,
57
+ onClick: props.onButtonClick,
58
+ variant: props.buttonVariant,
59
+ children: props.buttonText
60
+ }
61
+ ) }) })
62
+ ] });
12
63
  }
13
64
  function ProfileSection() {
14
- const user = useUser();
15
- const [userInfo, setUserInfo] = useState({ displayName: user?.displayName || '' });
16
- const [changed, setChanged] = useState(false);
17
- return (_jsxs(SettingSection, { title: 'Profile', desc: 'Your profile information', buttonDisabled: !changed, buttonText: 'Save', onButtonClick: async () => {
18
- await user?.update(userInfo);
19
- setChanged(false);
20
- }, children: [_jsxs("div", { style: { display: 'flex', gap: '1rem', alignItems: 'center' }, children: [_jsx(UserAvatar, { size: 60 }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx(Text, { size: 'lg', children: user?.displayName }), _jsx(Text, { variant: 'secondary', size: 'sm', children: user?.primaryEmail })] })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx(Label, { htmlFor: 'display-name', children: "Display Name" }), _jsx(Input, { id: 'display-name', value: userInfo.displayName, onChange: (e) => {
21
- setUserInfo((i) => ({ ...i, displayName: e.target.value }));
22
- setChanged(true);
23
- } })] })] }));
65
+ const user = (0, import__.useUser)();
66
+ const [userInfo, setUserInfo] = (0, import_react.useState)({ displayName: user?.displayName || "" });
67
+ const [changed, setChanged] = (0, import_react.useState)(false);
68
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
69
+ SettingSection,
70
+ {
71
+ title: "Profile",
72
+ desc: "Your profile information",
73
+ buttonDisabled: !changed,
74
+ buttonText: "Save",
75
+ onButtonClick: async () => {
76
+ await user?.update(userInfo);
77
+ setChanged(false);
78
+ },
79
+ children: [
80
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", gap: "1rem", alignItems: "center" }, children: [
81
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_user_avatar.default, { user, size: 60 }),
82
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
83
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { size: "lg", children: user?.displayName }),
84
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { variant: "secondary", size: "sm", children: user?.primaryEmail })
85
+ ] })
86
+ ] }),
87
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
88
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Label, { htmlFor: "display-name", children: "Display Name" }),
89
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
90
+ import_components_core.Input,
91
+ {
92
+ id: "display-name",
93
+ value: userInfo.displayName,
94
+ onChange: (e) => {
95
+ setUserInfo((i) => ({ ...i, displayName: e.target.value }));
96
+ setChanged(true);
97
+ }
98
+ }
99
+ )
100
+ ] })
101
+ ]
102
+ }
103
+ );
24
104
  }
25
105
  function EmailVerificationSection() {
26
- const user = useUser();
27
- const [emailSent, setEmailSent] = useState(false);
28
- return (_jsx(SettingSection, { title: 'Email Verification', desc: 'We want to make sure that you own the email address.', buttonDisabled: emailSent, buttonText: !user?.primaryEmailVerified ?
29
- emailSent ?
30
- 'Email sent!' :
31
- 'Send Email'
32
- : undefined, onButtonClick: async () => {
33
- await user?.sendVerificationEmail();
34
- setEmailSent(true);
35
- }, children: user?.primaryEmailVerified ?
36
- _jsx(Text, { variant: 'success', children: "Your email has been verified" }) :
37
- _jsx(Text, { variant: 'warning', children: "Your email has not been verified" }) }));
106
+ const user = (0, import__.useUser)();
107
+ const [emailSent, setEmailSent] = (0, import_react.useState)(false);
108
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
109
+ SettingSection,
110
+ {
111
+ title: "Email Verification",
112
+ desc: "We want to make sure that you own the email address.",
113
+ buttonDisabled: emailSent,
114
+ buttonText: !user?.primaryEmailVerified ? emailSent ? "Email sent!" : "Send Email" : void 0,
115
+ onButtonClick: async () => {
116
+ await user?.sendVerificationEmail();
117
+ setEmailSent(true);
118
+ },
119
+ children: user?.primaryEmailVerified ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { variant: "success", children: "Your email has been verified" }) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { variant: "warning", children: "Your email has not been verified" })
120
+ }
121
+ );
38
122
  }
39
123
  function PasswordSection() {
40
- const user = useUser();
41
- const [oldPassword, setOldPassword] = useState('');
42
- const [oldPasswordError, setOldPasswordError] = useState('');
43
- const [newPassword, setNewPassword] = useState('');
44
- const [newPasswordError, setNewPasswordError] = useState('');
45
- if (!user?.hasPassword) {
46
- return null;
47
- }
48
- return (_jsxs(SettingSection, { title: 'Password', desc: 'Change your password here.', buttonDisabled: !oldPassword || !newPassword, buttonText: 'Save', onButtonClick: async () => {
49
- if (oldPassword && newPassword) {
50
- const errorMessage = getPasswordError(newPassword);
51
- if (errorMessage) {
52
- setNewPasswordError(errorMessage.message);
53
- }
54
- else {
55
- const errorCode = await user?.updatePassword({ oldPassword, newPassword });
56
- if (errorCode) {
57
- setOldPasswordError('Incorrect password');
58
- }
59
- else {
60
- setOldPassword('');
61
- setNewPassword('');
62
- }
63
- }
124
+ const user = (0, import__.useUser)();
125
+ const [oldPassword, setOldPassword] = (0, import_react.useState)("");
126
+ const [oldPasswordError, setOldPasswordError] = (0, import_react.useState)("");
127
+ const [newPassword, setNewPassword] = (0, import_react.useState)("");
128
+ const [newPasswordError, setNewPasswordError] = (0, import_react.useState)("");
129
+ if (!user?.hasPassword) {
130
+ return null;
131
+ }
132
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(
133
+ SettingSection,
134
+ {
135
+ title: "Password",
136
+ desc: "Change your password here.",
137
+ buttonDisabled: !oldPassword || !newPassword,
138
+ buttonText: "Save",
139
+ onButtonClick: async () => {
140
+ if (oldPassword && newPassword) {
141
+ const errorMessage = (0, import_password.getPasswordError)(newPassword);
142
+ if (errorMessage) {
143
+ setNewPasswordError(errorMessage.message);
144
+ } else {
145
+ const errorCode = await user?.updatePassword({ oldPassword, newPassword });
146
+ if (errorCode) {
147
+ setOldPasswordError("Incorrect password");
148
+ } else {
149
+ setOldPassword("");
150
+ setNewPassword("");
64
151
  }
65
- else if (oldPassword && !newPassword) {
66
- setNewPasswordError('Please enter a new password');
152
+ }
153
+ } else if (oldPassword && !newPassword) {
154
+ setNewPasswordError("Please enter a new password");
155
+ } else if (newPassword && !oldPassword) {
156
+ setOldPasswordError("Please enter your old password");
157
+ }
158
+ },
159
+ children: [
160
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
161
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Label, { htmlFor: "old-password", children: "Old Password" }),
162
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
163
+ import__.PasswordField,
164
+ {
165
+ id: "old-password",
166
+ value: oldPassword,
167
+ onChange: (e) => {
168
+ setOldPassword(e.target.value);
169
+ setOldPasswordError("");
170
+ }
67
171
  }
68
- else if (newPassword && !oldPassword) {
69
- setOldPasswordError('Please enter your old password');
172
+ ),
173
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_warning.default, { text: oldPasswordError })
174
+ ] }),
175
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { display: "flex", flexDirection: "column" }, children: [
176
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Label, { htmlFor: "new-password", children: "New Password" }),
177
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
178
+ import__.PasswordField,
179
+ {
180
+ id: "new-password",
181
+ value: newPassword,
182
+ onChange: (e) => {
183
+ setNewPassword(e.target.value);
184
+ setNewPasswordError("");
185
+ }
70
186
  }
71
- }, children: [_jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx(Label, { htmlFor: 'old-password', children: "Old Password" }), _jsx(PasswordField, { id: 'old-password', value: oldPassword, onChange: (e) => {
72
- setOldPassword(e.target.value);
73
- setOldPasswordError('');
74
- } }), _jsx(FormWarningText, { text: oldPasswordError })] }), _jsxs("div", { style: { display: 'flex', flexDirection: 'column' }, children: [_jsx(Label, { htmlFor: 'new-password', children: "New Password" }), _jsx(PasswordField, { id: 'new-password', value: newPassword, onChange: (e) => {
75
- setNewPassword(e.target.value);
76
- setNewPasswordError('');
77
- } }), _jsx(FormWarningText, { text: newPasswordError })] })] }));
187
+ ),
188
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_form_warning.default, { text: newPasswordError })
189
+ ] })
190
+ ]
191
+ }
192
+ );
78
193
  }
79
194
  function SignOutSection() {
80
- const user = useUser();
81
- return (_jsx(SettingSection, { title: 'Sign out', desc: 'Sign out of your account on this device.', buttonVariant: 'secondary', buttonText: 'Sign Out', onButtonClick: () => user?.signOut() }));
82
- }
83
- export default function AccountSettings({ fullPage = false }) {
84
- const user = useUser();
85
- if (!user) {
86
- return _jsx(RedirectMessageCard, { type: 'signedOut', fullPage: fullPage });
87
- }
88
- const inner = (_jsxs("div", { style: { padding: fullPage ? '1rem' : 0, display: 'flex', flexDirection: 'column', gap: '1.5rem' }, children: [_jsxs("div", { children: [_jsx(Text, { size: "xl", as: 'h2', style: { marginBottom: '0.5rem', fontWeight: '700' }, children: "Account Settings" }), _jsx(Text, { variant: 'secondary', children: "Manage your account" })] }), _jsx(ProfileSection, {}), _jsx(EmailVerificationSection, {}), _jsx(PasswordSection, {}), _jsx(SignOutSection, {})] }));
89
- if (fullPage) {
90
- return (_jsx(Container, { size: 'sm', children: inner }));
91
- }
92
- else {
93
- return inner;
195
+ const user = (0, import__.useUser)();
196
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(
197
+ SettingSection,
198
+ {
199
+ title: "Sign out",
200
+ desc: "Sign out of your account on this device.",
201
+ buttonVariant: "secondary",
202
+ buttonText: "Sign Out",
203
+ onButtonClick: () => user?.signOut()
94
204
  }
205
+ );
206
+ }
207
+ function AccountSettings({ fullPage = false }) {
208
+ const user = (0, import__.useUser)();
209
+ if (!user) {
210
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_redirect_message_card.default, { type: "signedOut", fullPage });
211
+ }
212
+ const inner = /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { padding: fullPage ? "1rem" : 0, display: "flex", flexDirection: "column", gap: "1.5rem" }, children: [
213
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { children: [
214
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { size: "xl", as: "h2", style: { marginBottom: "0.5rem", fontWeight: "700" }, children: "Account Settings" }),
215
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { variant: "secondary", children: "Manage your account" })
216
+ ] }),
217
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(ProfileSection, {}),
218
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(EmailVerificationSection, {}),
219
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(PasswordSection, {}),
220
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(SignOutSection, {})
221
+ ] });
222
+ if (fullPage) {
223
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Container, { size: "sm", children: inner });
224
+ } else {
225
+ return inner;
226
+ }
95
227
  }
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function AuthPage({ fullPage, type }: {
4
+ fullPage?: boolean;
5
+ type: 'sign-in' | 'sign-up';
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { AuthPage as default };
@@ -1,4 +1,8 @@
1
- export default function AuthPage({ fullPage, type }: {
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function AuthPage({ fullPage, type }: {
2
4
  fullPage?: boolean;
3
5
  type: 'sign-in' | 'sign-up';
4
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { AuthPage as default };
@@ -1,20 +1,80 @@
1
- 'use client';
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
- import CredentialSignIn from '../components/credential-sign-in';
4
- import SeparatorWithText from '../components/separator-with-text';
5
- import OAuthGroup from '../components/oauth-group';
6
- import CardFrame from '../components/card-frame';
7
- import { useUser, useStackApp, CredentialSignUp } from '..';
8
- import RedirectMessageCard from '../components/redirect-message-card';
9
- import { Link, Tabs, TabsContent, TabsList, TabsTrigger, Text } from "../components-core";
10
- import MagicLinkSignIn from '../components/magic-link-sign-in';
11
- export default function AuthPage({ fullPage = false, type }) {
12
- const stackApp = useStackApp();
13
- const user = useUser();
14
- const project = stackApp.useProject();
15
- if (user) {
16
- return _jsx(RedirectMessageCard, { type: 'signedIn', fullPage: fullPage });
17
- }
18
- const enableSeparator = (project.credentialEnabled || project.magicLinkEnabled) && project.oauthProviders.filter(p => p.enabled).length > 0;
19
- return (_jsxs(CardFrame, { fullPage: fullPage, children: [_jsxs("div", { style: { textAlign: 'center', marginBottom: '1.5rem' }, children: [_jsx(Text, { size: "xl", as: 'h2', children: type === 'sign-in' ? 'Sign in to your account' : 'Create a new account' }), type === 'sign-in' ? (_jsxs(Text, { children: ["Don't have an account? ", _jsx(Link, { href: stackApp.urls.signUp, children: "Sign up" })] })) : (_jsxs(Text, { children: ["Already have an account? ", _jsx(Link, { href: stackApp.urls.signIn, children: "Sign in" })] }))] }), _jsx(OAuthGroup, { type: 'signin' }), enableSeparator && _jsx(SeparatorWithText, { text: 'Or continue with' }), project.credentialEnabled && project.magicLinkEnabled ? (_jsxs(Tabs, { defaultValue: 'magic-link', children: [_jsxs(TabsList, { children: [_jsx(TabsTrigger, { value: 'magic-link', children: "Magic Link" }), _jsx(TabsTrigger, { value: 'password', children: "Password" })] }), _jsx(TabsContent, { value: 'magic-link', children: _jsx(MagicLinkSignIn, {}) }), _jsx(TabsContent, { value: 'password', children: type === 'sign-up' ? _jsx(CredentialSignUp, {}) : _jsx(CredentialSignIn, {}) })] })) : project.credentialEnabled ? (type === 'sign-up' ? _jsx(CredentialSignUp, {}) : _jsx(CredentialSignIn, {})) : project.magicLinkEnabled ? (_jsx(MagicLinkSignIn, {})) : null] }));
1
+ "use client";
2
+ "use strict";
3
+ "use client";
4
+ var __create = Object.create;
5
+ var __defProp = Object.defineProperty;
6
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
7
+ var __getOwnPropNames = Object.getOwnPropertyNames;
8
+ var __getProtoOf = Object.getPrototypeOf;
9
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
10
+ var __export = (target, all) => {
11
+ for (var name in all)
12
+ __defProp(target, name, { get: all[name], enumerable: true });
13
+ };
14
+ var __copyProps = (to, from, except, desc) => {
15
+ if (from && typeof from === "object" || typeof from === "function") {
16
+ for (let key of __getOwnPropNames(from))
17
+ if (!__hasOwnProp.call(to, key) && key !== except)
18
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
19
+ }
20
+ return to;
21
+ };
22
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
23
+ // If the importer is in node compatibility mode or this is not an ESM
24
+ // file that has been converted to a CommonJS file using a Babel-
25
+ // compatible transform (i.e. "__esModule" has not been set), then set
26
+ // "default" to the CommonJS "module.exports" for node compatibility.
27
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
28
+ mod
29
+ ));
30
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
31
+
32
+ // src/components-page/auth-page.tsx
33
+ var auth_page_exports = {};
34
+ __export(auth_page_exports, {
35
+ default: () => AuthPage
36
+ });
37
+ module.exports = __toCommonJS(auth_page_exports);
38
+ var import_credential_sign_in = __toESM(require("../components/credential-sign-in"));
39
+ var import_separator_with_text = __toESM(require("../components/separator-with-text"));
40
+ var import_oauth_group = __toESM(require("../components/oauth-group"));
41
+ var import_card_frame = __toESM(require("../components/card-frame"));
42
+ var import__ = require("..");
43
+ var import_redirect_message_card = __toESM(require("../components/redirect-message-card"));
44
+ var import_components_core = require("../components-core");
45
+ var import_magic_link_sign_in = __toESM(require("../components/magic-link-sign-in"));
46
+ var import_jsx_runtime = require("react/jsx-runtime");
47
+ function AuthPage({
48
+ fullPage = false,
49
+ type
50
+ }) {
51
+ const stackApp = (0, import__.useStackApp)();
52
+ const user = (0, import__.useUser)();
53
+ const project = stackApp.useProject();
54
+ if (user) {
55
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_redirect_message_card.default, { type: "signedIn", fullPage });
56
+ }
57
+ const enableSeparator = (project.credentialEnabled || project.magicLinkEnabled) && project.oauthProviders.filter((p) => p.enabled).length > 0;
58
+ return /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_card_frame.default, { fullPage, children: [
59
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)("div", { style: { textAlign: "center", marginBottom: "1.5rem" }, children: [
60
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Text, { size: "xl", as: "h2", children: type === "sign-in" ? "Sign in to your account" : "Create a new account" }),
61
+ type === "sign-in" ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.Text, { children: [
62
+ "Don't have an account? ",
63
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Link, { href: stackApp.urls.signUp, children: "Sign up" })
64
+ ] }) : /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.Text, { children: [
65
+ "Already have an account? ",
66
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.Link, { href: stackApp.urls.signIn, children: "Sign in" })
67
+ ] })
68
+ ] }),
69
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_oauth_group.default, { type: "signin" }),
70
+ enableSeparator && /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_separator_with_text.default, { text: "Or continue with" }),
71
+ project.credentialEnabled && project.magicLinkEnabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.Tabs, { defaultValue: "magic-link", children: [
72
+ /* @__PURE__ */ (0, import_jsx_runtime.jsxs)(import_components_core.TabsList, { children: [
73
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.TabsTrigger, { value: "magic-link", children: "Magic Link" }),
74
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.TabsTrigger, { value: "password", children: "Password" })
75
+ ] }),
76
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.TabsContent, { value: "magic-link", children: /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_magic_link_sign_in.default, {}) }),
77
+ /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_components_core.TabsContent, { value: "password", children: type === "sign-up" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.CredentialSignUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_credential_sign_in.default, {}) })
78
+ ] }) : project.credentialEnabled ? type === "sign-up" ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import__.CredentialSignUp, {}) : /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_credential_sign_in.default, {}) : project.magicLinkEnabled ? /* @__PURE__ */ (0, import_jsx_runtime.jsx)(import_magic_link_sign_in.default, {}) : null
79
+ ] });
20
80
  }
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function EmailVerification({ searchParams: { code, }, fullPage, }: {
4
+ searchParams?: Record<string, string>;
5
+ fullPage?: boolean;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { EmailVerification as default };
@@ -1,4 +1,8 @@
1
- export default function EmailVerification({ searchParams: { code, }, fullPage, }: {
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function EmailVerification({ searchParams: { code, }, fullPage, }: {
2
4
  searchParams?: Record<string, string>;
3
5
  fullPage?: boolean;
4
- }): import("react/jsx-runtime").JSX.Element;
6
+ }): react_jsx_runtime.JSX.Element;
7
+
8
+ export { EmailVerification as default };