@cabin-id/nextjs 2.0.1 → 2.2.0

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 (34) hide show
  1. package/dist/cjs/components/AuthButton.js +75 -0
  2. package/dist/cjs/components/AuthButton.js.map +1 -0
  3. package/dist/cjs/components/SignInButton.js +11 -6
  4. package/dist/cjs/components/SignInButton.js.map +1 -1
  5. package/dist/cjs/components/SignOutButton.js +6 -2
  6. package/dist/cjs/components/SignOutButton.js.map +1 -1
  7. package/dist/cjs/components/index.js +3 -0
  8. package/dist/cjs/components/index.js.map +1 -1
  9. package/dist/cjs/server/createRedirect.js +12 -8
  10. package/dist/cjs/server/createRedirect.js.map +1 -1
  11. package/dist/cjs/styles/global.css +21 -0
  12. package/dist/cjs/styles/global.css.map +1 -1
  13. package/dist/esm/components/AuthButton.js +41 -0
  14. package/dist/esm/components/AuthButton.js.map +1 -0
  15. package/dist/esm/components/SignInButton.js +11 -6
  16. package/dist/esm/components/SignInButton.js.map +1 -1
  17. package/dist/esm/components/SignOutButton.js +6 -2
  18. package/dist/esm/components/SignOutButton.js.map +1 -1
  19. package/dist/esm/components/index.js +2 -0
  20. package/dist/esm/components/index.js.map +1 -1
  21. package/dist/esm/server/createRedirect.js +12 -8
  22. package/dist/esm/server/createRedirect.js.map +1 -1
  23. package/dist/esm/styles/global.css +21 -0
  24. package/dist/esm/styles/global.css.map +1 -1
  25. package/dist/types/components/AuthButton.d.ts +33 -0
  26. package/dist/types/components/AuthButton.d.ts.map +1 -0
  27. package/dist/types/components/SignInButton.d.ts +10 -0
  28. package/dist/types/components/SignInButton.d.ts.map +1 -1
  29. package/dist/types/components/SignOutButton.d.ts +5 -0
  30. package/dist/types/components/SignOutButton.d.ts.map +1 -1
  31. package/dist/types/components/index.d.ts +1 -0
  32. package/dist/types/components/index.d.ts.map +1 -1
  33. package/dist/types/server/createRedirect.d.ts.map +1 -1
  34. package/package.json +9 -9
@@ -0,0 +1,75 @@
1
+ "use strict";
2
+ "use client";
3
+ var __create = Object.create;
4
+ var __defProp = Object.defineProperty;
5
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
6
+ var __getOwnPropNames = Object.getOwnPropertyNames;
7
+ var __getProtoOf = Object.getPrototypeOf;
8
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __export = (target, all) => {
10
+ for (var name in all)
11
+ __defProp(target, name, { get: all[name], enumerable: true });
12
+ };
13
+ var __copyProps = (to, from, except, desc) => {
14
+ if (from && typeof from === "object" || typeof from === "function") {
15
+ for (let key of __getOwnPropNames(from))
16
+ if (!__hasOwnProp.call(to, key) && key !== except)
17
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
18
+ }
19
+ return to;
20
+ };
21
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
22
+ // If the importer is in node compatibility mode or this is not an ESM
23
+ // file that has been converted to a CommonJS file using a Babel-
24
+ // compatible transform (i.e. "__esModule" has not been set), then set
25
+ // "default" to the CommonJS "module.exports" for node compatibility.
26
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
27
+ mod
28
+ ));
29
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
30
+ var AuthButton_exports = {};
31
+ __export(AuthButton_exports, {
32
+ AuthButton: () => AuthButton
33
+ });
34
+ module.exports = __toCommonJS(AuthButton_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_useUser = require("../hooks/useUser");
37
+ var import_SignInButton = require("./SignInButton");
38
+ var import_SignOutButton = require("./SignOutButton");
39
+ const AuthButton = ({
40
+ signInLabel = "Sign In",
41
+ signOutLabel = "Sign Out",
42
+ className,
43
+ afterSignInUrl,
44
+ afterSignOutUrl,
45
+ showLogo = true
46
+ }) => {
47
+ const { isSignedIn, isLoaded } = (0, import_useUser.useUser)();
48
+ if (!isLoaded) {
49
+ return /* @__PURE__ */ import_react.default.createElement("div", { className: `animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}` });
50
+ }
51
+ if (isSignedIn) {
52
+ return /* @__PURE__ */ import_react.default.createElement(
53
+ import_SignOutButton.SignOutButton,
54
+ {
55
+ afterSignOutUrl,
56
+ className
57
+ },
58
+ signOutLabel
59
+ );
60
+ }
61
+ return /* @__PURE__ */ import_react.default.createElement(
62
+ import_SignInButton.SignInButton,
63
+ {
64
+ afterSignInUrl,
65
+ className,
66
+ showLogo
67
+ },
68
+ signInLabel
69
+ );
70
+ };
71
+ // Annotate the CommonJS export names for ESM import in node:
72
+ 0 && (module.exports = {
73
+ AuthButton
74
+ });
75
+ //# sourceMappingURL=AuthButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/AuthButton.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { SignInButton } from './SignInButton';\nimport { SignOutButton } from './SignOutButton';\n\nexport interface AuthButtonProps {\n /**\n * Custom text for sign in button\n */\n signInLabel?: React.ReactNode;\n /**\n * Custom text for sign out button\n */\n signOutLabel?: React.ReactNode;\n /**\n * Custom CSS class name for the button\n */\n className?: string;\n /**\n * URL to redirect after sign in\n */\n afterSignInUrl?: string;\n /**\n * URL to redirect after sign out\n */\n afterSignOutUrl?: string;\n /**\n * Whether to show the CabinID logo (only applies if using default children)\n */\n showLogo?: boolean;\n}\n\n/**\n * AuthButton automatically toggles between SignIn and Out buttons \n * based on the user's authentication state.\n */\nexport const AuthButton: React.FC<AuthButtonProps> = ({\n signInLabel = 'Sign In',\n signOutLabel = 'Sign Out',\n className,\n afterSignInUrl,\n afterSignOutUrl,\n showLogo = true,\n}) => {\n const { isSignedIn, isLoaded } = useUser();\n\n if (!isLoaded) {\n return (\n <div className={`animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}`} />\n );\n }\n\n if (isSignedIn) {\n return (\n <SignOutButton\n afterSignOutUrl={afterSignOutUrl}\n className={className}\n >\n {signOutLabel}\n </SignOutButton>\n );\n }\n\n return (\n <SignInButton\n afterSignInUrl={afterSignInUrl}\n className={className}\n showLogo={showLogo}\n >\n {signInLabel}\n </SignInButton>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAClB,qBAAwB;AACxB,0BAA6B;AAC7B,2BAA8B;AAiCvB,MAAM,aAAwC,CAAC;AAAA,EAClD,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACf,MAAM;AACF,QAAM,EAAE,YAAY,SAAS,QAAI,wBAAQ;AAEzC,MAAI,CAAC,UAAU;AACX,WACI,6BAAAA,QAAA,cAAC,SAAI,WAAW,oDAAoD,SAAS,IAAI;AAAA,EAEzF;AAEA,MAAI,YAAY;AACZ,WACI,6BAAAA,QAAA;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA;AAAA;AAAA,MAEC;AAAA,IACL;AAAA,EAER;AAEA,SACI,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC;AAAA,EACL;AAER;","names":["React"]}
@@ -37,17 +37,22 @@ var import_logo = require("../icons/logo");
37
37
  var import_constants = require("../constants");
38
38
  const SignInButton = ({
39
39
  children = "Continue to CabinID",
40
- className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700"
40
+ className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700",
41
+ afterSignInUrl,
42
+ showLogo = true
41
43
  }) => {
42
44
  const [signInUrl, setSignInUrl] = (0, import_react.useState)("#");
43
45
  (0, import_react.useEffect)(() => {
44
46
  if (typeof window !== "undefined") {
45
- const origin = typeof window === "undefined" ? null : window.origin;
47
+ const origin = window.origin;
46
48
  if (!origin) {
47
49
  return;
48
50
  }
51
+ const redirectPath = afterSignInUrl || import_constants.AFTER_SIGN_IN_URL || "/";
52
+ const formattedPath = redirectPath.startsWith("/") || redirectPath.startsWith("http") ? redirectPath : `/${redirectPath}`;
53
+ const absoluteRedirectUrl = formattedPath.startsWith("http") ? formattedPath : `${origin}${formattedPath}`;
49
54
  const params = new URLSearchParams({
50
- redirect_url: `${origin}${import_constants.AFTER_SIGN_IN_URL}` || "/"
55
+ redirect_url: absoluteRedirectUrl
51
56
  });
52
57
  let signInUrlTemp = "#";
53
58
  if (import_constants.SIGN_IN_URL) {
@@ -58,15 +63,15 @@ const SignInButton = ({
58
63
  }
59
64
  setSignInUrl(signInUrlTemp);
60
65
  }
61
- }, []);
66
+ }, [afterSignInUrl]);
62
67
  return /* @__PURE__ */ import_react.default.createElement(
63
68
  "a",
64
69
  {
65
70
  href: signInUrl,
66
71
  className
67
72
  },
68
- /* @__PURE__ */ import_react.default.createElement(import_logo.CabinLogo, null),
69
- /* @__PURE__ */ import_react.default.createElement("span", { className: "text-white text-sm" }, children)
73
+ showLogo && /* @__PURE__ */ import_react.default.createElement(import_logo.CabinLogo, null),
74
+ typeof children === "string" ? /* @__PURE__ */ import_react.default.createElement("span", { className: "text-white text-sm" }, children) : children
70
75
  );
71
76
  };
72
77
  // Annotate the CommonJS export names for ESM import in node:
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = typeof window === 'undefined' ? null : window.origin;\n if (!origin) {\n return;\n }\n const params = new URLSearchParams({\n redirect_url: `${origin}${AFTER_SIGN_IN_URL}` || '/',\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, []);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n <CabinLogo />\n <span className=\"text-white text-sm\">{children}</span>\n </a>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA2C;AAC3C,kBAA0B;AAC1B,uBAA4D;AAiBrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AACd,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,GAAG;AAE9C,8BAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO,WAAW,cAAc,OAAO,OAAO;AAC7D,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AACA,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc,GAAG,MAAM,GAAG,kCAAiB,MAAM;AAAA,MACnD,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,8BAAa;AACf,wBAAgB,6BAAY,SAAS,GAAG,IACpC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,8BAAa;AACtB,cAAM,WAAW,6BAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,4BAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEA,6BAAAA,QAAA,cAAC,2BAAU;AAAA,IACX,6BAAAA,QAAA,cAAC,UAAK,WAAU,wBAAsB,QAAS;AAAA,EACjD;AAEJ;","names":["React"]}
1
+ {"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n /**\n * Whether to show the CabinID logo\n * @default true\n */\n showLogo?: boolean;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n showLogo = true,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n {showLogo && <CabinLogo />}\n {typeof children === 'string' ? (\n <span className=\"text-white text-sm\">{children}</span>\n ) : (\n children\n )}\n </a>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAA2C;AAC3C,kBAA0B;AAC1B,uBAA4D;AA2BrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,GAAG;AAE9C,8BAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO;AACtB,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AAEA,YAAM,eAAe,kBAAkB,sCAAqB;AAE5D,YAAM,gBAAiB,aAAa,WAAW,GAAG,KAAK,aAAa,WAAW,MAAM,IACjF,eACA,IAAI,YAAY;AAEpB,YAAM,sBAAsB,cAAc,WAAW,MAAM,IACvD,gBACA,GAAG,MAAM,GAAG,aAAa;AAE7B,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc;AAAA,MAChB,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,8BAAa;AACf,wBAAgB,6BAAY,SAAS,GAAG,IACpC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,4BAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,8BAAa;AACtB,cAAM,WAAW,6BAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,4BAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEC,YAAY,6BAAAA,QAAA,cAAC,2BAAU;AAAA,IACvB,OAAO,aAAa,WACnB,6BAAAA,QAAA,cAAC,UAAK,WAAU,wBAAsB,QAAS,IAE/C;AAAA,EAEJ;AAEJ;","names":["React"]}
@@ -43,7 +43,8 @@ const SignOutButton = ({
43
43
  onSignOutSuccess,
44
44
  onSignOutError,
45
45
  showLoading = true,
46
- loadingText = "Signing out..."
46
+ loadingText = "Signing out...",
47
+ afterSignOutUrl
47
48
  }) => {
48
49
  const { signOut, isSignedIn, user } = (0, import_useUser.useUser)();
49
50
  const [isLoading, setIsLoading] = (0, import_react.useState)(false);
@@ -72,8 +73,11 @@ const SignOutButton = ({
72
73
  await signOut(() => {
73
74
  });
74
75
  const origin = typeof window !== "undefined" ? window.location.origin : "";
76
+ const redirectPath = afterSignOutUrl || import_constants2.AFTER_SIGN_IN_URL || "/";
77
+ const formattedPath = redirectPath.startsWith("/") || redirectPath.startsWith("http") ? redirectPath : `/${redirectPath}`;
78
+ const absoluteRedirectUrl = formattedPath.startsWith("http") ? formattedPath : `${origin}${formattedPath}`;
75
79
  const params = new URLSearchParams({
76
- redirect_url: `${origin}${import_constants2.AFTER_SIGN_IN_URL}`
80
+ redirect_url: absoluteRedirectUrl
77
81
  });
78
82
  const logoutUrl = `https://${import_constants2.frontendApi}/logout?${params.toString()}`;
79
83
  onSignOutSuccess == null ? void 0 : onSignOutSuccess();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { baseApiUrlV2 } from '../constants';\nimport { AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport interface SignOutButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Sign Out\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Callback function called before sign out\n */\n onSignOutStart?: () => void;\n /**\n * Callback function called after successful sign out\n */\n onSignOutSuccess?: () => void;\n /**\n * Callback function called when sign out fails\n */\n onSignOutError?: (error: Error) => void;\n /**\n * Whether to show loading state\n * @default true\n */\n showLoading?: boolean;\n /**\n * Custom loading text\n * @default \"Signing out...\"\n */\n loadingText?: string;\n}\n\n/**\n * SignOutButton component that handles user logout with CabinID backend integration\n */\nexport const SignOutButton: React.FC<SignOutButtonProps> = ({\n children = 'Sign Out',\n className = 'px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50',\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n}) => {\n const { signOut, isSignedIn, user } = useUser();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignOut = async () => {\n if (isLoading || !isSignedIn) return;\n\n try {\n setIsLoading(true);\n onSignOutStart?.();\n\n // 1. Call backend sign-out endpoint first\n if (user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrlV2}/auth/sign-out`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`,\n 'Origin': typeof window !== 'undefined' ? window.location.origin : '',\n },\n });\n }\n } catch (backendError) {\n console.warn('Backend sign-out failed, proceeding with logout:', backendError);\n }\n }\n\n // 2. Clear local cookies and storage\n await signOut(() => {\n // Prevent automatic redirect, we'll handle it manually\n });\n\n // 3. Redirect to CabinID logout page with redirect_url\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n const params = new URLSearchParams({\n redirect_url: `${origin}${AFTER_SIGN_IN_URL}`,\n });\n const logoutUrl = `https://${frontendApi}/logout?${params.toString()}`;\n\n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n setIsLoading(false);\n }\n };\n\n // Helper function to get cookie value\n const getCookieValue = (name: string): string | null => {\n if (typeof window === 'undefined') return null;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) {\n return parts.pop()?.split(';').shift() || null;\n }\n return null;\n };\n\n // Don't render if user is not signed in\n if (!isSignedIn) {\n return null;\n }\n\n return (\n <button\n onClick={handleSignOut}\n disabled={isLoading}\n className={className}\n type=\"button\"\n >\n {isLoading && showLoading ? loadingText : children}\n </button>\n );\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAgC;AAChC,qBAAwB;AACxB,uBAA6B;AAC7B,IAAAA,oBAA+C;AAuCxC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAChB,MAAM;AACJ,QAAM,EAAE,SAAS,YAAY,KAAK,QAAI,wBAAQ;AAC9C,QAAM,CAAC,WAAW,YAAY,QAAI,uBAAS,KAAK;AAEhD,QAAM,gBAAgB,YAAY;AAChC,QAAI,aAAa,CAAC,WAAY;AAE9B,QAAI;AAC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AA,MACV;AAAA,MACA,MAAK;AAAA;AAAA,IAEJ,aAAa,cAAc,cAAc;AAAA,EAC5C;AAEJ;","names":["import_constants","React"]}
1
+ {"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { baseApiUrlV2 } from '../constants';\nimport { AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport interface SignOutButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Sign Out\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Callback function called before sign out\n */\n onSignOutStart?: () => void;\n /**\n * Callback function called after successful sign out\n */\n onSignOutSuccess?: () => void;\n /**\n * Callback function called when sign out fails\n */\n onSignOutError?: (error: Error) => void;\n /**\n * Whether to show loading state\n * @default true\n */\n showLoading?: boolean;\n /**\n * Custom loading text\n * @default \"Signing out...\"\n */\n loadingText?: string;\n /**\n * Custom URL to redirect after successful sign out.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignOutUrl?: string;\n}\n\n/**\n * SignOutButton component that handles user logout with CabinID backend integration\n */\nexport const SignOutButton: React.FC<SignOutButtonProps> = ({\n children = 'Sign Out',\n className = 'px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50',\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n afterSignOutUrl,\n}) => {\n const { signOut, isSignedIn, user } = useUser();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignOut = async () => {\n if (isLoading || !isSignedIn) return;\n\n try {\n setIsLoading(true);\n onSignOutStart?.();\n\n // 1. Call backend sign-out endpoint first\n if (user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrlV2}/auth/sign-out`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`,\n 'Origin': typeof window !== 'undefined' ? window.location.origin : '',\n },\n });\n }\n } catch (backendError) {\n console.warn('Backend sign-out failed, proceeding with logout:', backendError);\n }\n }\n\n // 2. Clear local cookies and storage\n await signOut(() => {\n // Prevent automatic redirect, we'll handle it manually\n });\n\n // 3. Redirect to CabinID logout page with redirect_url\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n\n const redirectPath = afterSignOutUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n const logoutUrl = `https://${frontendApi}/logout?${params.toString()}`;\n\n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n setIsLoading(false);\n }\n };\n\n // Helper function to get cookie value\n const getCookieValue = (name: string): string | null => {\n if (typeof window === 'undefined') return null;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) {\n return parts.pop()?.split(';').shift() || null;\n }\n return null;\n };\n\n // Don't render if user is not signed in\n if (!isSignedIn) {\n return null;\n }\n\n return (\n <button\n onClick={handleSignOut}\n disabled={isLoading}\n className={className}\n type=\"button\"\n >\n {isLoading && showLoading ? loadingText : children}\n </button>\n );\n};"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAgC;AAChC,qBAAwB;AACxB,uBAA6B;AAC7B,IAAAA,oBAA+C;AA4CxC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,c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C,SAAgC;AAzH1D;AA0HI,QAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,UAAM,QAAQ,KAAK,SAAS,MAAM;AAClC,UAAM,QAAQ,MAAM,MAAM,KAAK,IAAI,GAAG;AACtC,QAAI,MAAM,WAAW,GAAG;AACtB,eAAO,WAAM,IAAI,MAAV,mBAAa,MAAM,KAAK,YAAW;AAAA,IAC5C;AACA,WAAO;AAAA,EACT;AAGA,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,SACE,6BAAAC,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,UAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA;AAAA,IAEJ,aAAa,cAAc,cAAc;AAAA,EAC5C;AAEJ;","names":["import_constants","React"]}
@@ -18,14 +18,17 @@ var __copyProps = (to, from, except, desc) => {
18
18
  var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
19
19
  var components_exports = {};
20
20
  __export(components_exports, {
21
+ AuthButton: () => import_AuthButton.AuthButton,
21
22
  SignInButton: () => import_SignInButton.SignInButton,
22
23
  SignOutButton: () => import_SignOutButton.SignOutButton
23
24
  });
24
25
  module.exports = __toCommonJS(components_exports);
25
26
  var import_SignInButton = require("./SignInButton");
26
27
  var import_SignOutButton = require("./SignOutButton");
28
+ var import_AuthButton = require("./AuthButton");
27
29
  // Annotate the CommonJS export names for ESM import in node:
28
30
  0 && (module.exports = {
31
+ AuthButton,
29
32
  SignInButton,
30
33
  SignOutButton
31
34
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,2BAA8B;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\nexport { AuthButton } from './AuthButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;AAC7B,2BAA8B;AAC9B,wBAA2B;","names":[]}
@@ -51,6 +51,10 @@ const createRedirect = (params) => {
51
51
  const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } = params;
52
52
  const frontendApi = (0, import_key.parsePublishableKey)(publishableKey);
53
53
  const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);
54
+ const addClientId = (url) => {
55
+ url.searchParams.set("client_id", publishableKey);
56
+ return url;
57
+ };
54
58
  const redirectToSignUp = ({ returnBackUrl } = {}) => {
55
59
  if (!signUpUrl && !accountsBaseUrl) {
56
60
  throw new Error("Publish Key is not exist");
@@ -58,11 +62,11 @@ const createRedirect = (params) => {
58
62
  const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;
59
63
  let redirect = null;
60
64
  if (signUpUrl) {
61
- redirect = redirectAdapter(buildUrl(baseUrl, signUpUrl));
65
+ const url = new URL(buildUrl(baseUrl, signUpUrl));
66
+ redirect = redirectAdapter(addClientId(url).toString());
62
67
  } else {
63
- redirect = redirectAdapter(
64
- buildUrl(null, accountsSignUpUrl, returnBackUrl)
65
- );
68
+ const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));
69
+ redirect = redirectAdapter(addClientId(url).toString());
66
70
  }
67
71
  return redirect;
68
72
  };
@@ -73,11 +77,11 @@ const createRedirect = (params) => {
73
77
  const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;
74
78
  let redirect = null;
75
79
  if (signInUrl) {
76
- redirect = redirectAdapter(buildUrl(baseUrl, signInUrl));
80
+ const url = new URL(buildUrl(baseUrl, signInUrl));
81
+ redirect = redirectAdapter(addClientId(url).toString());
77
82
  } else {
78
- redirect = redirectAdapter(
79
- buildUrl(null, accountsSignInUrl, returnBackUrl)
80
- );
83
+ const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));
84
+ redirect = redirectAdapter(addClientId(url).toString());
81
85
  }
82
86
  return redirect;
83
87
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n redirect = redirectAdapter(buildUrl(baseUrl, signUpUrl));\n } else {\n redirect = redirectAdapter(\n buildUrl(null, accountsSignUpUrl, returnBackUrl)\n );\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n redirect = redirectAdapter(buildUrl(baseUrl, signInUrl));\n } else {\n redirect = redirectAdapter(\n buildUrl(null, accountsSignInUrl, returnBackUrl)\n );\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoC;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AACd,UAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,UAAM,gBAAgB,iBAClB,IAAI,IAAI,gBAAgB,OAAO,IAC/B;AACJ,UAAM,MAAM,IAAI,IAAI,YAAY,OAAO;AAEvC,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB,OAAO;AACL,UAAM,gBAAgB,iBAAiB,IAAI,IAAI,cAAc,IAAI;AACjE,UAAM,MAAM,IAAI,IAAI,UAAU;AAE9B,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB;AACF;AAEA,MAAM,uBAAuB,CAAC,gBAA+B;AAC3D,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,kBAAkB;AACxB,SAAO,WAAW,eAAe;AACnC;AAgBO,MAAM,iBAAiC,CAAC,WAAW;AACxD,QAAM,EAAE,gBAAgB,iBAAiB,WAAW,WAAW,QAAQ,IACrE;AACF,QAAM,kBAAc,gCAAoB,cAAc;AACtD,QAAM,kBAAkB,qBAAqB,WAAW;AAExD,QAAM,mBAAmB,CAAC,EAAE,cAAc,IAAsB,CAAC,MAAM;AACrE,QAAI,CAAC,aAAa,CAAC,iBAAiB;AAClC,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,UAAM,oBAAoB,GAAG,eAAe;AAC5C,QAAI,WAAW;AAEf,QAAI,WAAW;AACb,iBAAW,gBAAgB,SAAS,SAAS,SAAS,CAAC;AAAA,IACzD,OAAO;AACL,iBAAW;AAAA,QACT,SAAS,MAAM,mBAAmB,aAAa;AAAA,MACjD;AAAA,IACF;AACA,WAAO;AAAA,EACT;AAEA,QAAM,mBAAmB,CAAC,EAAE,cAAc,IAAsB,CAAC,MAAM;AACrE,QAAI,CAAC,aAAa,CAAC,iBAAiB;AAClC,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,UAAM,oBAAoB,GAAG,eAAe;AAE5C,QAAI,WAAW;AACf,QAAI,WAAW;AACb,iBAAW,gBAAgB,SAAS,SAAS,SAAS,CAAC;AAAA,IACzD,OAAO;AACL,iBAAW;AAAA,QACT,SAAS,MAAM,mBAAmB,aAAa;AAAA,MACjD;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,kBAAkB,iBAAiB;AAC9C;","names":[]}
1
+ {"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const addClientId = (url: URL) => {\n url.searchParams.set('client_id', publishableKey);\n return url;\n };\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n const url = new URL(buildUrl(baseUrl, signUpUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n const url = new URL(buildUrl(baseUrl, signInUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoC;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AACd,UAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,UAAM,gBAAgB,iBAClB,IAAI,IAAI,gBAAgB,OAAO,IAC/B;AACJ,UAAM,MAAM,IAAI,IAAI,YAAY,OAAO;AAEvC,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB,OAAO;AACL,UAAM,gBAAgB,iBAAiB,IAAI,IAAI,cAAc,IAAI;AACjE,UAAM,MAAM,IAAI,IAAI,UAAU;AAE9B,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,gBAAgB,cAAc,SAAS,CAAC;AAAA,IAC/D;AACA,WAAO,IAAI,SAAS;AAAA,EACtB;AACF;AAEA,MAAM,uBAAuB,CAAC,gBAA+B;AAC3D,MAAI,CAAC,aAAa;AAChB,WAAO;AAAA,EACT;AAGA,QAAM,kBAAkB;AACxB,SAAO,WAAW,eAAe;AACnC;AAgBO,MAAM,iBAA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C;","names":[]}
@@ -365,12 +365,29 @@ video {
365
365
  .absolute {
366
366
  position: absolute;
367
367
  }
368
+ .relative {
369
+ position: relative;
370
+ }
368
371
  .flex {
369
372
  display: flex;
370
373
  }
374
+ .h-10 {
375
+ height: 2.5rem;
376
+ }
377
+ .w-24 {
378
+ width: 6rem;
379
+ }
371
380
  .max-w-48 {
372
381
  max-width: 12rem;
373
382
  }
383
+ @keyframes pulse {
384
+ 50% {
385
+ opacity: .5;
386
+ }
387
+ }
388
+ .animate-pulse {
389
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
390
+ }
374
391
  .flex-row {
375
392
  flex-direction: row;
376
393
  }
@@ -392,6 +409,10 @@ video {
392
409
  --tw-bg-opacity: 1;
393
410
  background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
394
411
  }
412
+ .bg-gray-200 {
413
+ --tw-bg-opacity: 1;
414
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
415
+ }
395
416
  .bg-red-600 {
396
417
  --tw-bg-opacity: 1;
397
418
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;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e,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
1
+ {"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.h-10 {\n height: 2.5rem;\n}\n.w-24 {\n width: 6rem;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n@keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;AAChB;AAEA;AACA;AACE,gBAAc;AAChB;AAYA;AACA;AACE,eAAa;AACb,4BAA0B;AAC1B,iBAAe;AACf,eAAa;AACV,YAAU;AACb;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,UAAU;AAAA,IAAE,mBAAmB;AAAA,IAAE,gBAAgB;AAAA,IAAE,iBAAiB;AAAA,IAAE;AAC7G,yBAAuB;AACvB,2BAAyB;AACzB,+BAA6B;AAC/B;AAOA;AACE,UAAQ;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
3
+ import { useUser } from "../hooks/useUser";
4
+ import { SignInButton } from "./SignInButton";
5
+ import { SignOutButton } from "./SignOutButton";
6
+ const AuthButton = ({
7
+ signInLabel = "Sign In",
8
+ signOutLabel = "Sign Out",
9
+ className,
10
+ afterSignInUrl,
11
+ afterSignOutUrl,
12
+ showLogo = true
13
+ }) => {
14
+ const { isSignedIn, isLoaded } = useUser();
15
+ if (!isLoaded) {
16
+ return /* @__PURE__ */ React.createElement("div", { className: `animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}` });
17
+ }
18
+ if (isSignedIn) {
19
+ return /* @__PURE__ */ React.createElement(
20
+ SignOutButton,
21
+ {
22
+ afterSignOutUrl,
23
+ className
24
+ },
25
+ signOutLabel
26
+ );
27
+ }
28
+ return /* @__PURE__ */ React.createElement(
29
+ SignInButton,
30
+ {
31
+ afterSignInUrl,
32
+ className,
33
+ showLogo
34
+ },
35
+ signInLabel
36
+ );
37
+ };
38
+ export {
39
+ AuthButton
40
+ };
41
+ //# sourceMappingURL=AuthButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/AuthButton.tsx"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { SignInButton } from './SignInButton';\nimport { SignOutButton } from './SignOutButton';\n\nexport interface AuthButtonProps {\n /**\n * Custom text for sign in button\n */\n signInLabel?: React.ReactNode;\n /**\n * Custom text for sign out button\n */\n signOutLabel?: React.ReactNode;\n /**\n * Custom CSS class name for the button\n */\n className?: string;\n /**\n * URL to redirect after sign in\n */\n afterSignInUrl?: string;\n /**\n * URL to redirect after sign out\n */\n afterSignOutUrl?: string;\n /**\n * Whether to show the CabinID logo (only applies if using default children)\n */\n showLogo?: boolean;\n}\n\n/**\n * AuthButton automatically toggles between SignIn and Out buttons \n * based on the user's authentication state.\n */\nexport const AuthButton: React.FC<AuthButtonProps> = ({\n signInLabel = 'Sign In',\n signOutLabel = 'Sign Out',\n className,\n afterSignInUrl,\n afterSignOutUrl,\n showLogo = true,\n}) => {\n const { isSignedIn, isLoaded } = useUser();\n\n if (!isLoaded) {\n return (\n <div className={`animate-pulse bg-gray-200 h-10 w-24 rounded-full ${className}`} />\n );\n }\n\n if (isSignedIn) {\n return (\n <SignOutButton\n afterSignOutUrl={afterSignOutUrl}\n className={className}\n >\n {signOutLabel}\n </SignOutButton>\n );\n }\n\n return (\n <SignInButton\n afterSignInUrl={afterSignInUrl}\n className={className}\n showLogo={showLogo}\n >\n {signInLabel}\n </SignInButton>\n );\n};\n"],"mappings":";AAEA,OAAO,WAAW;AAClB,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAiCvB,MAAM,aAAwC,CAAC;AAAA,EAClD,cAAc;AAAA,EACd,eAAe;AAAA,EACf;AAAA,EACA;AAAA,EACA;AAAA,EACA,WAAW;AACf,MAAM;AACF,QAAM,EAAE,YAAY,SAAS,IAAI,QAAQ;AAEzC,MAAI,CAAC,UAAU;AACX,WACI,oCAAC,SAAI,WAAW,oDAAoD,SAAS,IAAI;AAAA,EAEzF;AAEA,MAAI,YAAY;AACZ,WACI;AAAA,MAAC;AAAA;AAAA,QACG;AAAA,QACA;AAAA;AAAA,MAEC;AAAA,IACL;AAAA,EAER;AAEA,SACI;AAAA,IAAC;AAAA;AAAA,MACG;AAAA,MACA;AAAA,MACA;AAAA;AAAA,IAEC;AAAA,EACL;AAER;","names":[]}
@@ -4,17 +4,22 @@ import { CabinLogo } from "../icons/logo";
4
4
  import { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from "../constants";
5
5
  const SignInButton = ({
6
6
  children = "Continue to CabinID",
7
- className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700"
7
+ className = "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700",
8
+ afterSignInUrl,
9
+ showLogo = true
8
10
  }) => {
9
11
  const [signInUrl, setSignInUrl] = useState("#");
10
12
  useEffect(() => {
11
13
  if (typeof window !== "undefined") {
12
- const origin = typeof window === "undefined" ? null : window.origin;
14
+ const origin = window.origin;
13
15
  if (!origin) {
14
16
  return;
15
17
  }
18
+ const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || "/";
19
+ const formattedPath = redirectPath.startsWith("/") || redirectPath.startsWith("http") ? redirectPath : `/${redirectPath}`;
20
+ const absoluteRedirectUrl = formattedPath.startsWith("http") ? formattedPath : `${origin}${formattedPath}`;
16
21
  const params = new URLSearchParams({
17
- redirect_url: `${origin}${AFTER_SIGN_IN_URL}` || "/"
22
+ redirect_url: absoluteRedirectUrl
18
23
  });
19
24
  let signInUrlTemp = "#";
20
25
  if (SIGN_IN_URL) {
@@ -25,15 +30,15 @@ const SignInButton = ({
25
30
  }
26
31
  setSignInUrl(signInUrlTemp);
27
32
  }
28
- }, []);
33
+ }, [afterSignInUrl]);
29
34
  return /* @__PURE__ */ React.createElement(
30
35
  "a",
31
36
  {
32
37
  href: signInUrl,
33
38
  className
34
39
  },
35
- /* @__PURE__ */ React.createElement(CabinLogo, null),
36
- /* @__PURE__ */ React.createElement("span", { className: "text-white text-sm" }, children)
40
+ showLogo && /* @__PURE__ */ React.createElement(CabinLogo, null),
41
+ typeof children === "string" ? /* @__PURE__ */ React.createElement("span", { className: "text-white text-sm" }, children) : children
37
42
  );
38
43
  };
39
44
  export {
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = typeof window === 'undefined' ? null : window.origin;\n if (!origin) {\n return;\n }\n const params = new URLSearchParams({\n redirect_url: `${origin}${AFTER_SIGN_IN_URL}` || '/',\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, []);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n <CabinLogo />\n <span className=\"text-white text-sm\">{children}</span>\n </a>\n );\n};\n"],"mappings":";AAEA,OAAO,SAAS,WAAW,gBAAgB;AAC3C,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,aAAa,mBAAmB;AAiBrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AACd,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,GAAG;AAE9C,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO,WAAW,cAAc,OAAO,OAAO;AAC7D,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AACA,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc,GAAG,MAAM,GAAG,iBAAiB,MAAM;AAAA,MACnD,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,aAAa;AACf,wBAAgB,YAAY,SAAS,GAAG,IACpC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,aAAa;AACtB,cAAM,WAAW,YAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,WAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,CAAC;AAEL,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEA,oCAAC,eAAU;AAAA,IACX,oCAAC,UAAK,WAAU,wBAAsB,QAAS;AAAA,EACjD;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useEffect, useState } from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { AFTER_SIGN_IN_URL, frontendApi, SIGN_IN_URL } from '../constants';\n\nexport interface SignInButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Continue to CabinID\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Custom URL to redirect after successful sign in.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignInUrl?: string;\n /**\n * Whether to show the CabinID logo\n * @default true\n */\n showLogo?: boolean;\n}\n\n/**\n * SignInButton component that handles user authentication redirect to CabinID\n */\nexport const SignInButton: React.FC<SignInButtonProps> = ({\n children = 'Continue to CabinID',\n className = 'max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700',\n afterSignInUrl,\n showLogo = true,\n}) => {\n const [signInUrl, setSignInUrl] = useState('#');\n\n useEffect(() => {\n if (typeof window !== 'undefined') {\n const origin = window.origin;\n if (!origin) {\n return;\n }\n\n const redirectPath = afterSignInUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n\n let signInUrlTemp = '#';\n if (SIGN_IN_URL) {\n signInUrlTemp = SIGN_IN_URL.includes('?')\n ? `${SIGN_IN_URL}&${params.toString()}`\n : `${SIGN_IN_URL}?${params.toString()}`;\n } else if (frontendApi) {\n const protocol = frontendApi.includes('localhost') ? 'http' : 'https';\n signInUrlTemp = `${protocol}://${frontendApi}/sign-in?${params.toString()}`;\n }\n\n setSignInUrl(signInUrlTemp);\n }\n }, [afterSignInUrl]);\n\n return (\n <a\n href={signInUrl}\n className={className}\n >\n {showLogo && <CabinLogo />}\n {typeof children === 'string' ? (\n <span className=\"text-white text-sm\">{children}</span>\n ) : (\n children\n )}\n </a>\n );\n};\n"],"mappings":";AAEA,OAAO,SAAS,WAAW,gBAAgB;AAC3C,SAAS,iBAAiB;AAC1B,SAAS,mBAAmB,aAAa,mBAAmB;AA2BrD,MAAM,eAA4C,CAAC;AAAA,EACxD,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA,WAAW;AACb,MAAM;AACJ,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,GAAG;AAE9C,YAAU,MAAM;AACd,QAAI,OAAO,WAAW,aAAa;AACjC,YAAM,SAAS,OAAO;AACtB,UAAI,CAAC,QAAQ;AACX;AAAA,MACF;AAEA,YAAM,eAAe,kBAAkB,qBAAqB;AAE5D,YAAM,gBAAiB,aAAa,WAAW,GAAG,KAAK,aAAa,WAAW,MAAM,IACjF,eACA,IAAI,YAAY;AAEpB,YAAM,sBAAsB,cAAc,WAAW,MAAM,IACvD,gBACA,GAAG,MAAM,GAAG,aAAa;AAE7B,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc;AAAA,MAChB,CAAC;AAED,UAAI,gBAAgB;AACpB,UAAI,aAAa;AACf,wBAAgB,YAAY,SAAS,GAAG,IACpC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC,KACnC,GAAG,WAAW,IAAI,OAAO,SAAS,CAAC;AAAA,MACzC,WAAW,aAAa;AACtB,cAAM,WAAW,YAAY,SAAS,WAAW,IAAI,SAAS;AAC9D,wBAAgB,GAAG,QAAQ,MAAM,WAAW,YAAY,OAAO,SAAS,CAAC;AAAA,MAC3E;AAEA,mBAAa,aAAa;AAAA,IAC5B;AAAA,EACF,GAAG,CAAC,cAAc,CAAC;AAEnB,SACE;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN;AAAA;AAAA,IAEC,YAAY,oCAAC,eAAU;AAAA,IACvB,OAAO,aAAa,WACnB,oCAAC,UAAK,WAAU,wBAAsB,QAAS,IAE/C;AAAA,EAEJ;AAEJ;","names":[]}
@@ -10,7 +10,8 @@ const SignOutButton = ({
10
10
  onSignOutSuccess,
11
11
  onSignOutError,
12
12
  showLoading = true,
13
- loadingText = "Signing out..."
13
+ loadingText = "Signing out...",
14
+ afterSignOutUrl
14
15
  }) => {
15
16
  const { signOut, isSignedIn, user } = useUser();
16
17
  const [isLoading, setIsLoading] = useState(false);
@@ -39,8 +40,11 @@ const SignOutButton = ({
39
40
  await signOut(() => {
40
41
  });
41
42
  const origin = typeof window !== "undefined" ? window.location.origin : "";
43
+ const redirectPath = afterSignOutUrl || AFTER_SIGN_IN_URL || "/";
44
+ const formattedPath = redirectPath.startsWith("/") || redirectPath.startsWith("http") ? redirectPath : `/${redirectPath}`;
45
+ const absoluteRedirectUrl = formattedPath.startsWith("http") ? formattedPath : `${origin}${formattedPath}`;
42
46
  const params = new URLSearchParams({
43
- redirect_url: `${origin}${AFTER_SIGN_IN_URL}`
47
+ redirect_url: absoluteRedirectUrl
44
48
  });
45
49
  const logoutUrl = `https://${frontendApi}/logout?${params.toString()}`;
46
50
  onSignOutSuccess == null ? void 0 : onSignOutSuccess();
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { baseApiUrlV2 } from '../constants';\nimport { AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport interface SignOutButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Sign Out\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Callback function called before sign out\n */\n onSignOutStart?: () => void;\n /**\n * Callback function called after successful sign out\n */\n onSignOutSuccess?: () => void;\n /**\n * Callback function called when sign out fails\n */\n onSignOutError?: (error: Error) => void;\n /**\n * Whether to show loading state\n * @default true\n */\n showLoading?: boolean;\n /**\n * Custom loading text\n * @default \"Signing out...\"\n */\n loadingText?: string;\n}\n\n/**\n * SignOutButton component that handles user logout with CabinID backend integration\n */\nexport const SignOutButton: React.FC<SignOutButtonProps> = ({\n children = 'Sign Out',\n className = 'px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50',\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n}) => {\n const { signOut, isSignedIn, user } = useUser();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignOut = async () => {\n if (isLoading || !isSignedIn) return;\n\n try {\n setIsLoading(true);\n onSignOutStart?.();\n\n // 1. Call backend sign-out endpoint first\n if (user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrlV2}/auth/sign-out`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`,\n 'Origin': typeof window !== 'undefined' ? window.location.origin : '',\n },\n });\n }\n } catch (backendError) {\n console.warn('Backend sign-out failed, proceeding with logout:', backendError);\n }\n }\n\n // 2. Clear local cookies and storage\n await signOut(() => {\n // Prevent automatic redirect, we'll handle it manually\n });\n\n // 3. Redirect to CabinID logout page with redirect_url\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n const params = new URLSearchParams({\n redirect_url: `${origin}${AFTER_SIGN_IN_URL}`,\n });\n const logoutUrl = `https://${frontendApi}/logout?${params.toString()}`;\n\n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n setIsLoading(false);\n }\n };\n\n // Helper function to get cookie value\n const getCookieValue = (name: string): string | null => {\n if (typeof window === 'undefined') return null;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) {\n return parts.pop()?.split(';').shift() || null;\n }\n return null;\n };\n\n // Don't render if user is not signed in\n if (!isSignedIn) {\n return null;\n }\n\n return (\n <button\n onClick={handleSignOut}\n disabled={isLoading}\n className={className}\n type=\"button\"\n >\n {isLoading && showLoading ? loadingText : children}\n </button>\n );\n};"],"mappings":";AAEA,OAAO,SAAS,gBAAgB;AAChC,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB,mBAAmB;AAuCxC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAChB,MAAM;AACJ,QAAM,EAAE,SAAS,YAAY,KAAK,IAAI,QAAQ;AAC9C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,QAAM,gBAAgB,YAAY;AAChC,QAAI,aAAa,CAAC,WAAY;AAE9B,QAAI;AACF,mBAAa,IAAI;AACjB;AAGA,UAAI,MAAM;AACR,YAAI;AACF,gBAAM,QAAQ,eAAe,UAAU,KAAK,eAAe,QAAQ;AACnE,cAAI,OAAO;AACT,kBAAM,MAAM,GAAG,YAAY,kBAAkB;AAAA,cAC3C,QAAQ;AAAA,cACR,SAAS;AAAA,gBACP,gBAAgB;AAAA,gBAChB,iBAAiB,UAAU,KAAK;AAAA,gBAChC,UAAU,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;AAAA,cACrE;AAAA,YACF,CAAC;AAAA,UACH;AAAA,QACF,SAAS,cAAc;AACrB,kBAAQ,KAAK,oDAAoD,YAAY;AAAA,QAC/E;AAAA,MACF;AAGA,YAAM,QAAQ,MAAM;AAAA,MAEpB,CAAC;AAGD,YAAM,SAAS,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;AACxE,YAAM,SAAS,IAAI,gBAAgB;AAAA,QACjC,cAAc,GAAG,MAAM,GAAG,iBAAiB;AAAA,MAC7C,CAAC;AACD,YAAM,YAAY,WAAW,WAAW,WAAW,OAAO,SAAS,CAAC;AAEpE;AACA,aAAO,SAAS,OAAO;AAAA,IACzB,SAAS,OAAO;AACd,cAAQ,MAAM,mBAAmB,KAAK;AACtC,uDAAiB;AACjB,mBAAa,KAAK;AAAA,IACpB;AAAA,EACF;AAGA,QAAM,iBAAiB,CAAC,SAAgC;AAxG1D;AAyGI,QAAI,OAAO,WAAW,YAAa,QAAO;AAC1C,UAAM,QAAQ,KAAK,SAAS,MAAM;AAClC,UAAM,QAAQ,MAAM,MAAM,KAAK,IAAI,GAAG;AACtC,QAAI,MAAM,WAAW,GAAG;AACtB,eAAO,WAAM,IAAI,MAAV,mBAAa,MAAM,KAAK,YAAW;AAAA,IAC5C;AACA,WAAO;AAAA,EACT;AAGA,MAAI,CAAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,UAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA;AAAA,IAEJ,aAAa,cAAc,cAAc;AAAA,EAC5C;AAEJ;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser } from '../hooks/useUser';\nimport { baseApiUrlV2 } from '../constants';\nimport { AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport interface SignOutButtonProps {\n /**\n * Custom text to display on the button\n * @default \"Sign Out\"\n */\n children?: React.ReactNode;\n /**\n * Custom CSS class name\n */\n className?: string;\n /**\n * Callback function called before sign out\n */\n onSignOutStart?: () => void;\n /**\n * Callback function called after successful sign out\n */\n onSignOutSuccess?: () => void;\n /**\n * Callback function called when sign out fails\n */\n onSignOutError?: (error: Error) => void;\n /**\n * Whether to show loading state\n * @default true\n */\n showLoading?: boolean;\n /**\n * Custom loading text\n * @default \"Signing out...\"\n */\n loadingText?: string;\n /**\n * Custom URL to redirect after successful sign out.\n * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.\n */\n afterSignOutUrl?: string;\n}\n\n/**\n * SignOutButton component that handles user logout with CabinID backend integration\n */\nexport const SignOutButton: React.FC<SignOutButtonProps> = ({\n children = 'Sign Out',\n className = 'px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50',\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n afterSignOutUrl,\n}) => {\n const { signOut, isSignedIn, user } = useUser();\n const [isLoading, setIsLoading] = useState(false);\n\n const handleSignOut = async () => {\n if (isLoading || !isSignedIn) return;\n\n try {\n setIsLoading(true);\n onSignOutStart?.();\n\n // 1. Call backend sign-out endpoint first\n if (user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrlV2}/auth/sign-out`, {\n method: 'POST',\n headers: {\n 'Content-Type': 'application/json',\n 'Authorization': `Bearer ${token}`,\n 'Origin': typeof window !== 'undefined' ? window.location.origin : '',\n },\n });\n }\n } catch (backendError) {\n console.warn('Backend sign-out failed, proceeding with logout:', backendError);\n }\n }\n\n // 2. Clear local cookies and storage\n await signOut(() => {\n // Prevent automatic redirect, we'll handle it manually\n });\n\n // 3. Redirect to CabinID logout page with redirect_url\n const origin = typeof window !== 'undefined' ? window.location.origin : '';\n\n const redirectPath = afterSignOutUrl || AFTER_SIGN_IN_URL || '/';\n // Ensure redirectPath starts with / if it's a relative path and doesn't already have it\n const formattedPath = (redirectPath.startsWith('/') || redirectPath.startsWith('http'))\n ? redirectPath\n : `/${redirectPath}`;\n\n const absoluteRedirectUrl = formattedPath.startsWith('http')\n ? formattedPath\n : `${origin}${formattedPath}`;\n\n const params = new URLSearchParams({\n redirect_url: absoluteRedirectUrl,\n });\n const logoutUrl = `https://${frontendApi}/logout?${params.toString()}`;\n\n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n setIsLoading(false);\n }\n };\n\n // Helper function to get cookie value\n const getCookieValue = (name: string): string | null => {\n if (typeof window === 'undefined') return null;\n const value = `; ${document.cookie}`;\n const parts = value.split(`; ${name}=`);\n if (parts.length === 2) {\n return parts.pop()?.split(';').shift() || null;\n }\n return null;\n };\n\n // Don't render if user is not signed in\n if (!isSignedIn) {\n return null;\n }\n\n return (\n <button\n onClick={handleSignOut}\n disabled={isLoading}\n className={className}\n type=\"button\"\n >\n {isLoading && showLoading ? loadingText : children}\n </button>\n );\n};"],"mappings":";AAEA,OAAO,SAAS,gBAAgB;AAChC,SAAS,eAAe;AACxB,SAAS,oBAAoB;AAC7B,SAAS,mBAAmB,mBAAmB;AA4CxC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAAA,EACd;AACF,MAAM;AACJ,QAAM,EAAE,SAAS,YAAY,KAAK,IAAI,QAAQ;AAC9C,QAAM,CAAC,WAAW,YAAY,IAAI,SAAS,KAAK;AAEhD,QAAM,gBAAgB,YAAY;AAChC,QAAI,aAAa,CAAC,WAAY;AAE9B,QAAI;AACF,mBAAa,IAAI;AACjB;AAGA,UAAI,MAAM;AACR,YAAI;AACF,g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AAC,YAAY;AACf,WAAO;AAAA,EACT;AAEA,SACE;AAAA,IAAC;AAAA;AAAA,MACC,SAAS;AAAA,MACT,UAAU;AAAA,MACV;AAAA,MACA,MAAK;AAAA;AAAA,IAEJ,aAAa,cAAc,cAAc;AAAA,EAC5C;AAEJ;","names":[]}
@@ -1,6 +1,8 @@
1
1
  import { SignInButton } from "./SignInButton";
2
2
  import { SignOutButton } from "./SignOutButton";
3
+ import { AuthButton } from "./AuthButton";
3
4
  export {
5
+ AuthButton,
4
6
  SignInButton,
5
7
  SignOutButton
6
8
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;","names":[]}
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\nexport { SignOutButton } from './SignOutButton';\nexport { AuthButton } from './AuthButton';\n"],"mappings":"AAAA,SAAS,oBAAoB;AAC7B,SAAS,qBAAqB;AAC9B,SAAS,kBAAkB;","names":[]}
@@ -28,6 +28,10 @@ const createRedirect = (params) => {
28
28
  const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } = params;
29
29
  const frontendApi = parsePublishableKey(publishableKey);
30
30
  const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);
31
+ const addClientId = (url) => {
32
+ url.searchParams.set("client_id", publishableKey);
33
+ return url;
34
+ };
31
35
  const redirectToSignUp = ({ returnBackUrl } = {}) => {
32
36
  if (!signUpUrl && !accountsBaseUrl) {
33
37
  throw new Error("Publish Key is not exist");
@@ -35,11 +39,11 @@ const createRedirect = (params) => {
35
39
  const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;
36
40
  let redirect = null;
37
41
  if (signUpUrl) {
38
- redirect = redirectAdapter(buildUrl(baseUrl, signUpUrl));
42
+ const url = new URL(buildUrl(baseUrl, signUpUrl));
43
+ redirect = redirectAdapter(addClientId(url).toString());
39
44
  } else {
40
- redirect = redirectAdapter(
41
- buildUrl(null, accountsSignUpUrl, returnBackUrl)
42
- );
45
+ const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));
46
+ redirect = redirectAdapter(addClientId(url).toString());
43
47
  }
44
48
  return redirect;
45
49
  };
@@ -50,11 +54,11 @@ const createRedirect = (params) => {
50
54
  const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;
51
55
  let redirect = null;
52
56
  if (signInUrl) {
53
- redirect = redirectAdapter(buildUrl(baseUrl, signInUrl));
57
+ const url = new URL(buildUrl(baseUrl, signInUrl));
58
+ redirect = redirectAdapter(addClientId(url).toString());
54
59
  } else {
55
- redirect = redirectAdapter(
56
- buildUrl(null, accountsSignInUrl, returnBackUrl)
57
- );
60
+ const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));
61
+ redirect = redirectAdapter(addClientId(url).toString());
58
62
  }
59
63
  return redirect;
60
64
  };
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n redirect = redirectAdapter(buildUrl(baseUrl, signUpUrl));\n } else {\n redirect = redirectAdapter(\n buildUrl(null, accountsSignUpUrl, returnBackUrl)\n );\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n redirect = redirectAdapter(buildUrl(baseUrl, signInUrl));\n } else {\n redirect = redirectAdapter(\n buildUrl(null, accountsSignInUrl, returnBackUrl)\n );\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":"AAAA,SAAS,2BAA2B;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AAC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C,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,UAAM,oBAAoB,GAAG,eAAe;AAE5C,QAAI,WAAW;AACf,QAAI,WAAW;AACb,iBAAW,gBAAgB,SAAS,SAAS,SAAS,CAAC;AAAA,IACzD,OAAO;AACL,iBAAW;AAAA,QACT,SAAS,MAAM,mBAAmB,aAAa;AAAA,MACjD;AAAA,IACF;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,kBAAkB,iBAAiB;AAC9C;","names":[]}
1
+ {"version":3,"sources":["../../../src/server/createRedirect.ts"],"sourcesContent":["import { parsePublishableKey } from '../utils/key';\n\ntype RedirectAdapter<RedirectReturn> = (url: string) => RedirectReturn;\ntype RedirectToParams = { returnBackUrl?: string | URL | null };\nexport type RedirectFun<ReturnType> = (params?: RedirectToParams) => ReturnType;\n\nconst buildUrl = (\n _baseUrl: string | URL | null,\n _targetUrl: string | URL,\n _returnBackUrl?: string | URL | null\n) => {\n if (!!_baseUrl) {\n const baseUrl = new URL(_baseUrl);\n const returnBackUrl = _returnBackUrl\n ? new URL(_returnBackUrl, baseUrl)\n : undefined;\n const res = new URL(_targetUrl, baseUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n } else {\n const returnBackUrl = _returnBackUrl ? new URL(_returnBackUrl) : undefined;\n const res = new URL(_targetUrl);\n\n if (returnBackUrl) {\n res.searchParams.set('redirect_url', returnBackUrl.toString());\n }\n return res.toString();\n }\n};\n\nconst buildAccountsBaseUrl = (frontendApi: string | null) => {\n if (!frontendApi) {\n return '';\n }\n\n // convert url from FAPI to accounts for Kima and legacy (prod & dev) instances\n const accountsBaseUrl = frontendApi;\n return `https://${accountsBaseUrl}`;\n};\n\n/**\n * @internal\n */\ntype CreateRedirect = <ReturnType>(params: {\n publishableKey: string;\n redirectAdapter: RedirectAdapter<ReturnType>;\n baseUrl: URL | string;\n signInUrl?: URL | string;\n signUpUrl?: URL | string;\n}) => {\n redirectToSignIn: RedirectFun<ReturnType>;\n redirectToSignUp: RedirectFun<ReturnType>;\n};\n\nexport const createRedirect: CreateRedirect = (params) => {\n const { publishableKey, redirectAdapter, signInUrl, signUpUrl, baseUrl } =\n params;\n const frontendApi = parsePublishableKey(publishableKey);\n const accountsBaseUrl = buildAccountsBaseUrl(frontendApi);\n\n const addClientId = (url: URL) => {\n url.searchParams.set('client_id', publishableKey);\n return url;\n };\n\n const redirectToSignUp = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signUpUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignUpUrl = `${accountsBaseUrl}/sign-up`;\n let redirect = null;\n\n if (signUpUrl) {\n const url = new URL(buildUrl(baseUrl, signUpUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignUpUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n return redirect;\n };\n\n const redirectToSignIn = ({ returnBackUrl }: RedirectToParams = {}) => {\n if (!signInUrl && !accountsBaseUrl) {\n throw new Error('Publish Key is not exist');\n }\n const accountsSignInUrl = `${accountsBaseUrl}/sign-in`;\n\n let redirect = null;\n if (signInUrl) {\n const url = new URL(buildUrl(baseUrl, signInUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n } else {\n const url = new URL(buildUrl(null, accountsSignInUrl, returnBackUrl));\n redirect = redirectAdapter(addClientId(url).toString());\n }\n\n return redirect;\n };\n\n return { redirectToSignUp, redirectToSignIn };\n};\n"],"mappings":"AAAA,SAAS,2BAA2B;AAMpC,MAAM,WAAW,CACf,UACA,YACA,mBACG;AACH,MAAI,CAAC,CAAC,UAAU;AACd,UAAM,UAAU,IAAI,IAAI,QAAQ;AAChC,UAAM,gBAAgB,iBAClB,IAAI,IAAI,gBAAgB,OAAO,IAC/B;AACJ,UAAM,MAAM,IAAI,IAAI,YAAY,OAAO;AAEvC,QAAI,eAAe;AACjB,UAAI,aAAa,IAAI,g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a,CAAC,iBAAiB;AAClC,YAAM,IAAI,MAAM,0BAA0B;AAAA,IAC5C;AACA,UAAM,oBAAoB,GAAG,eAAe;AAE5C,QAAI,WAAW;AACf,QAAI,WAAW;AACb,YAAM,MAAM,IAAI,IAAI,SAAS,SAAS,SAAS,CAAC;AAChD,iBAAW,gBAAgB,YAAY,GAAG,EAAE,SAAS,CAAC;AAAA,IACxD,OAAO;AACL,YAAM,MAAM,IAAI,IAAI,SAAS,MAAM,mBAAmB,aAAa,CAAC;AACpE,iBAAW,gBAAgB,YAAY,GAAG,EAAE,SAAS,CAAC;AAAA,IACxD;AAEA,WAAO;AAAA,EACT;AAEA,SAAO,EAAE,kBAAkB,iBAAiB;AAC9C;","names":[]}
@@ -365,12 +365,29 @@ video {
365
365
  .absolute {
366
366
  position: absolute;
367
367
  }
368
+ .relative {
369
+ position: relative;
370
+ }
368
371
  .flex {
369
372
  display: flex;
370
373
  }
374
+ .h-10 {
375
+ height: 2.5rem;
376
+ }
377
+ .w-24 {
378
+ width: 6rem;
379
+ }
371
380
  .max-w-48 {
372
381
  max-width: 12rem;
373
382
  }
383
+ @keyframes pulse {
384
+ 50% {
385
+ opacity: .5;
386
+ }
387
+ }
388
+ .animate-pulse {
389
+ animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
390
+ }
374
391
  .flex-row {
375
392
  flex-direction: row;
376
393
  }
@@ -392,6 +409,10 @@ video {
392
409
  --tw-bg-opacity: 1;
393
410
  background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
394
411
  }
412
+ .bg-gray-200 {
413
+ --tw-bg-opacity: 1;
414
+ background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));
415
+ }
395
416
  .bg-red-600 {
396
417
  --tw-bg-opacity: 1;
397
418
  background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.flex {\n display: flex;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yB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BAAmB;AACnB,SAAO,IAAI,IAAI,IAAI,IAAI,EAAE,IAAI,iBAAiB,EAAE;AAClD;AACA,CAAC;AACC,UAAQ,IAAI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,GAAG,GAAG,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
1
+ {"version":3,"sources":["../../../src/styles/global.css"],"sourcesContent":["*, ::before, ::after {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}\n\n::backdrop {\n --tw-border-spacing-x: 0;\n --tw-border-spacing-y: 0;\n --tw-translate-x: 0;\n --tw-translate-y: 0;\n --tw-rotate: 0;\n --tw-skew-x: 0;\n --tw-skew-y: 0;\n --tw-scale-x: 1;\n --tw-scale-y: 1;\n --tw-pan-x: ;\n --tw-pan-y: ;\n --tw-pinch-zoom: ;\n --tw-scroll-snap-strictness: proximity;\n --tw-gradient-from-position: ;\n --tw-gradient-via-position: ;\n --tw-gradient-to-position: ;\n --tw-ordinal: ;\n --tw-slashed-zero: ;\n --tw-numeric-figure: ;\n --tw-numeric-spacing: ;\n --tw-numeric-fraction: ;\n --tw-ring-inset: ;\n --tw-ring-offset-width: 0px;\n --tw-ring-offset-color: #fff;\n --tw-ring-color: rgb(59 130 246 / 0.5);\n --tw-ring-offset-shadow: 0 0 #0000;\n --tw-ring-shadow: 0 0 #0000;\n --tw-shadow: 0 0 #0000;\n --tw-shadow-colored: 0 0 #0000;\n --tw-blur: ;\n --tw-brightness: ;\n --tw-contrast: ;\n --tw-grayscale: ;\n --tw-hue-rotate: ;\n --tw-invert: ;\n --tw-saturate: ;\n --tw-sepia: ;\n --tw-drop-shadow: ;\n --tw-backdrop-blur: ;\n --tw-backdrop-brightness: ;\n --tw-backdrop-contrast: ;\n --tw-backdrop-grayscale: ;\n --tw-backdrop-hue-rotate: ;\n --tw-backdrop-invert: ;\n --tw-backdrop-opacity: ;\n --tw-backdrop-saturate: ;\n --tw-backdrop-sepia: ;\n --tw-contain-size: ;\n --tw-contain-layout: ;\n --tw-contain-paint: ;\n --tw-contain-style: ;\n}/*\n! tailwindcss v3.4.17 | MIT License | https://tailwindcss.com\n*//*\n1. Prevent padding and border from affecting element width. (https://github.com/mozdevs/cssremedy/issues/4)\n2. Allow adding a border to an element by just adding a border-width. (https://github.com/tailwindcss/tailwindcss/pull/116)\n*/\n\n*,\n::before,\n::after {\n box-sizing: border-box; /* 1 */\n border-width: 0; /* 2 */\n border-style: solid; /* 2 */\n border-color: #e5e7eb; /* 2 */\n}\n\n::before,\n::after {\n --tw-content: '';\n}\n\n/*\n1. Use a consistent sensible line-height in all browsers.\n2. Prevent adjustments of font size after orientation changes in iOS.\n3. Use a more readable tab size.\n4. Use the user's configured `sans` font-family by default.\n5. Use the user's configured `sans` font-feature-settings by default.\n6. Use the user's configured `sans` font-variation-settings by default.\n7. Disable tap highlights on iOS\n*/\n\nhtml,\n:host {\n line-height: 1.5; /* 1 */\n -webkit-text-size-adjust: 100%; /* 2 */\n -moz-tab-size: 4; /* 3 */\n -o-tab-size: 4;\n tab-size: 4; /* 3 */\n font-family: ui-sans-serif, system-ui, sans-serif, \"Apple Color Emoji\", \"Segoe UI Emoji\", \"Segoe UI Symbol\", \"Noto Color Emoji\"; /* 4 */\n font-feature-settings: normal; /* 5 */\n font-variation-settings: normal; /* 6 */\n -webkit-tap-highlight-color: transparent; /* 7 */\n}\n\n/*\n1. Remove the margin in all browsers.\n2. Inherit line-height from `html` so users can set them as a class directly on the `html` element.\n*/\n\nbody {\n margin: 0; /* 1 */\n line-height: inherit; /* 2 */\n}\n\n/*\n1. Add the correct height in Firefox.\n2. Correct the inheritance of border color in Firefox. (https://bugzilla.mozilla.org/show_bug.cgi?id=190655)\n3. Ensure horizontal rules are visible by default.\n*/\n\nhr {\n height: 0; /* 1 */\n color: inherit; /* 2 */\n border-top-width: 1px; /* 3 */\n}\n\n/*\nAdd the correct text decoration in Chrome, Edge, and Safari.\n*/\n\nabbr:where([title]) {\n -webkit-text-decoration: underline dotted;\n text-decoration: underline dotted;\n}\n\n/*\nRemove the default font size and weight for headings.\n*/\n\nh1,\nh2,\nh3,\nh4,\nh5,\nh6 {\n font-size: inherit;\n font-weight: inherit;\n}\n\n/*\nReset links to optimize for opt-in styling instead of opt-out.\n*/\n\na {\n color: inherit;\n text-decoration: inherit;\n}\n\n/*\nAdd the correct font weight in Edge and Safari.\n*/\n\nb,\nstrong {\n font-weight: bolder;\n}\n\n/*\n1. Use the user's configured `mono` font-family by default.\n2. Use the user's configured `mono` font-feature-settings by default.\n3. Use the user's configured `mono` font-variation-settings by default.\n4. Correct the odd `em` font sizing in all browsers.\n*/\n\ncode,\nkbd,\nsamp,\npre {\n font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, \"Liberation Mono\", \"Courier New\", monospace; /* 1 */\n font-feature-settings: normal; /* 2 */\n font-variation-settings: normal; /* 3 */\n font-size: 1em; /* 4 */\n}\n\n/*\nAdd the correct font size in all browsers.\n*/\n\nsmall {\n font-size: 80%;\n}\n\n/*\nPrevent `sub` and `sup` elements from affecting the line height in all browsers.\n*/\n\nsub,\nsup {\n font-size: 75%;\n line-height: 0;\n position: relative;\n vertical-align: baseline;\n}\n\nsub {\n bottom: -0.25em;\n}\n\nsup {\n top: -0.5em;\n}\n\n/*\n1. Remove text indentation from table contents in Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=999088, https://bugs.webkit.org/show_bug.cgi?id=201297)\n2. Correct table border color inheritance in all Chrome and Safari. (https://bugs.chromium.org/p/chromium/issues/detail?id=935729, https://bugs.webkit.org/show_bug.cgi?id=195016)\n3. Remove gaps between table borders by default.\n*/\n\ntable {\n text-indent: 0; /* 1 */\n border-color: inherit; /* 2 */\n border-collapse: collapse; /* 3 */\n}\n\n/*\n1. Change the font styles in all browsers.\n2. Remove the margin in Firefox and Safari.\n3. Remove default padding in all browsers.\n*/\n\nbutton,\ninput,\noptgroup,\nselect,\ntextarea {\n font-family: inherit; /* 1 */\n font-feature-settings: inherit; /* 1 */\n font-variation-settings: inherit; /* 1 */\n font-size: 100%; /* 1 */\n font-weight: inherit; /* 1 */\n line-height: inherit; /* 1 */\n letter-spacing: inherit; /* 1 */\n color: inherit; /* 1 */\n margin: 0; /* 2 */\n padding: 0; /* 3 */\n}\n\n/*\nRemove the inheritance of text transform in Edge and Firefox.\n*/\n\nbutton,\nselect {\n text-transform: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Remove default button styles.\n*/\n\nbutton,\ninput:where([type='button']),\ninput:where([type='reset']),\ninput:where([type='submit']) {\n -webkit-appearance: button; /* 1 */\n background-color: transparent; /* 2 */\n background-image: none; /* 2 */\n}\n\n/*\nUse the modern Firefox focus style for all focusable elements.\n*/\n\n:-moz-focusring {\n outline: auto;\n}\n\n/*\nRemove the additional `:invalid` styles in Firefox. (https://github.com/mozilla/gecko-dev/blob/2f9eacd9d3d995c937b4251a5557d95d494c9be1/layout/style/res/forms.css#L728-L737)\n*/\n\n:-moz-ui-invalid {\n box-shadow: none;\n}\n\n/*\nAdd the correct vertical alignment in Chrome and Firefox.\n*/\n\nprogress {\n vertical-align: baseline;\n}\n\n/*\nCorrect the cursor style of increment and decrement buttons in Safari.\n*/\n\n::-webkit-inner-spin-button,\n::-webkit-outer-spin-button {\n height: auto;\n}\n\n/*\n1. Correct the odd appearance in Chrome and Safari.\n2. Correct the outline style in Safari.\n*/\n\n[type='search'] {\n -webkit-appearance: textfield; /* 1 */\n outline-offset: -2px; /* 2 */\n}\n\n/*\nRemove the inner padding in Chrome and Safari on macOS.\n*/\n\n::-webkit-search-decoration {\n -webkit-appearance: none;\n}\n\n/*\n1. Correct the inability to style clickable types in iOS and Safari.\n2. Change font properties to `inherit` in Safari.\n*/\n\n::-webkit-file-upload-button {\n -webkit-appearance: button; /* 1 */\n font: inherit; /* 2 */\n}\n\n/*\nAdd the correct display in Chrome and Safari.\n*/\n\nsummary {\n display: list-item;\n}\n\n/*\nRemoves the default spacing and border for appropriate elements.\n*/\n\nblockquote,\ndl,\ndd,\nh1,\nh2,\nh3,\nh4,\nh5,\nh6,\nhr,\nfigure,\np,\npre {\n margin: 0;\n}\n\nfieldset {\n margin: 0;\n padding: 0;\n}\n\nlegend {\n padding: 0;\n}\n\nol,\nul,\nmenu {\n list-style: none;\n margin: 0;\n padding: 0;\n}\n\n/*\nReset default styling for dialogs.\n*/\ndialog {\n padding: 0;\n}\n\n/*\nPrevent resizing textareas horizontally by default.\n*/\n\ntextarea {\n resize: vertical;\n}\n\n/*\n1. Reset the default placeholder opacity in Firefox. (https://github.com/tailwindlabs/tailwindcss/issues/3300)\n2. Set the default placeholder color to the user's configured gray 400 color.\n*/\n\ninput::-moz-placeholder, textarea::-moz-placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\ninput::placeholder,\ntextarea::placeholder {\n opacity: 1; /* 1 */\n color: #9ca3af; /* 2 */\n}\n\n/*\nSet the default cursor for buttons.\n*/\n\nbutton,\n[role=\"button\"] {\n cursor: pointer;\n}\n\n/*\nMake sure disabled buttons don't get the pointer cursor.\n*/\n:disabled {\n cursor: default;\n}\n\n/*\n1. Make replaced elements `display: block` by default. (https://github.com/mozdevs/cssremedy/issues/14)\n2. Add `vertical-align: middle` to align replaced elements more sensibly by default. (https://github.com/jensimmons/cssremedy/issues/14#issuecomment-634934210)\n This can trigger a poorly considered lint error in some tools but is included by design.\n*/\n\nimg,\nsvg,\nvideo,\ncanvas,\naudio,\niframe,\nembed,\nobject {\n display: block; /* 1 */\n vertical-align: middle; /* 2 */\n}\n\n/*\nConstrain images and videos to the parent width and preserve their intrinsic aspect ratio. (https://github.com/mozdevs/cssremedy/issues/14)\n*/\n\nimg,\nvideo {\n max-width: 100%;\n height: auto;\n}\n\n/* Make elements with the HTML hidden attribute stay hidden by default */\n[hidden]:where(:not([hidden=\"until-found\"])) {\n display: none;\n}\n.container {\n width: 100%;\n}\n@media (min-width: 640px) {\n\n .container {\n max-width: 640px;\n }\n}\n@media (min-width: 768px) {\n\n .container {\n max-width: 768px;\n }\n}\n@media (min-width: 1024px) {\n\n .container {\n max-width: 1024px;\n }\n}\n@media (min-width: 1280px) {\n\n .container {\n max-width: 1280px;\n }\n}\n@media (min-width: 1536px) {\n\n .container {\n max-width: 1536px;\n }\n}\n.fixed {\n position: fixed;\n}\n.absolute {\n position: absolute;\n}\n.relative {\n position: relative;\n}\n.flex {\n display: flex;\n}\n.h-10 {\n height: 2.5rem;\n}\n.w-24 {\n width: 6rem;\n}\n.max-w-48 {\n max-width: 12rem;\n}\n@keyframes pulse {\n\n 50% {\n opacity: .5;\n }\n}\n.animate-pulse {\n animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;\n}\n.flex-row {\n flex-direction: row;\n}\n.items-center {\n align-items: center;\n}\n.space-x-2 > :not([hidden]) ~ :not([hidden]) {\n --tw-space-x-reverse: 0;\n margin-right: calc(0.5rem * var(--tw-space-x-reverse));\n margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));\n}\n.rounded {\n border-radius: 0.25rem;\n}\n.rounded-full {\n border-radius: 9999px;\n}\n.bg-blue-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));\n}\n.bg-gray-200 {\n --tw-bg-opacity: 1;\n background-color: rgb(229 231 235 / var(--tw-bg-opacity, 1));\n}\n.bg-red-600 {\n --tw-bg-opacity: 1;\n background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));\n}\n.px-4 {\n padding-left: 1rem;\n padding-right: 1rem;\n}\n.py-2 {\n padding-top: 0.5rem;\n padding-bottom: 0.5rem;\n}\n.pl-2 {\n padding-left: 0.5rem;\n}\n.pr-4 {\n padding-right: 1rem;\n}\n.text-sm {\n font-size: 0.875rem;\n line-height: 1.25rem;\n}\n.text-white {\n --tw-text-opacity: 1;\n color: rgb(255 255 255 / var(--tw-text-opacity, 1));\n}\n.filter {\n filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);\n}\n.hover\\:bg-red-700:hover {\n --tw-bg-opacity: 1;\n background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));\n}\n.hover\\:opacity-90:hover {\n opacity: 0.9;\n}\n.active\\:bg-blue-700:active {\n --tw-bg-opacity: 1;\n background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));\n}\n.disabled\\:opacity-50:disabled {\n opacity: 0.5;\n}\n"],"mappings":"AAAA;AAAG;AAAU;AACX,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACF;AAEA;AACE,yBAAuB;AACvB,yBAAuB;AACvB,oBAAkB;AAClB,oBAAkB;AAClB,eAAa;AACb,eAAa;AACb,eAAa;AACb,gBAAc;AACd,gBAAc;AACd;AACA;AACA;AACA,+BAA6B;AAC7B;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,0BAAwB;AACxB,0BAAwB;AACxB,mBAAiB,IAAI,GAAG,IAAI,IAAI,EAAE;AAClC,2BAAyB,EAAE,EAAE;AAC7B,oBAAkB,EAAE,EAAE;AACtB,eAAa,EAAE,EAAE;AACjB,uBAAqB,EAAE,EAAE;AACzB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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AI,WAAW,IAAI,iBAAiB,IAAI,eAAe,IAAI,gBAAgB,IAAI,iBAAiB,IAAI,aAAa,IAAI,eAAe,IAAI,YAAY,IAAI;AAClK;AACA,CAAC,iBAAiB;AAChB,mBAAiB;AACjB,oBAAkB,IAAI,IAAI,GAAG,GAAG,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,iBAAiB;AAChB,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC,oBAAoB;AACnB,WAAS;AACX;","names":[]}
@@ -0,0 +1,33 @@
1
+ import React from 'react';
2
+ export interface AuthButtonProps {
3
+ /**
4
+ * Custom text for sign in button
5
+ */
6
+ signInLabel?: React.ReactNode;
7
+ /**
8
+ * Custom text for sign out button
9
+ */
10
+ signOutLabel?: React.ReactNode;
11
+ /**
12
+ * Custom CSS class name for the button
13
+ */
14
+ className?: string;
15
+ /**
16
+ * URL to redirect after sign in
17
+ */
18
+ afterSignInUrl?: string;
19
+ /**
20
+ * URL to redirect after sign out
21
+ */
22
+ afterSignOutUrl?: string;
23
+ /**
24
+ * Whether to show the CabinID logo (only applies if using default children)
25
+ */
26
+ showLogo?: boolean;
27
+ }
28
+ /**
29
+ * AuthButton automatically toggles between SignIn and Out buttons
30
+ * based on the user's authentication state.
31
+ */
32
+ export declare const AuthButton: React.FC<AuthButtonProps>;
33
+ //# sourceMappingURL=AuthButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"AuthButton.d.ts","sourceRoot":"","sources":["../../../src/components/AuthButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,MAAM,OAAO,CAAC;AAK1B,MAAM,WAAW,eAAe;IAC5B;;OAEG;IACH,WAAW,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC9B;;OAEG;IACH,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC/B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;OAEG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;OAEG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACtB;AAED;;;GAGG;AACH,eAAO,MAAM,UAAU,EAAE,KAAK,CAAC,EAAE,CAAC,eAAe,CAoChD,CAAC"}
@@ -9,6 +9,16 @@ export interface SignInButtonProps {
9
9
  * Custom CSS class name
10
10
  */
11
11
  className?: string;
12
+ /**
13
+ * Custom URL to redirect after successful sign in.
14
+ * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.
15
+ */
16
+ afterSignInUrl?: string;
17
+ /**
18
+ * Whether to show the CabinID logo
19
+ * @default true
20
+ */
21
+ showLogo?: boolean;
12
22
  }
13
23
  /**
14
24
  * SignInButton component that handles user authentication redirect to CabinID
@@ -1 +1 @@
1
- {"version":3,"file":"SignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignInButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAuCpD,CAAC"}
1
+ {"version":3,"file":"SignInButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignInButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAInD,MAAM,WAAW,iBAAiB;IAChC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;;OAGG;IACH,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED;;GAEG;AACH,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAwDpD,CAAC"}
@@ -31,6 +31,11 @@ export interface SignOutButtonProps {
31
31
  * @default "Signing out..."
32
32
  */
33
33
  loadingText?: string;
34
+ /**
35
+ * Custom URL to redirect after successful sign out.
36
+ * If not provided, it will use NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL from env.
37
+ */
38
+ afterSignOutUrl?: string;
34
39
  }
35
40
  /**
36
41
  * SignOutButton component that handles user logout with CabinID backend integration
@@ -1 +1 @@
1
- {"version":3,"file":"SignOutButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignOutButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;CACtB;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAqFtD,CAAC"}
1
+ {"version":3,"file":"SignOutButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignOutButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AAKxC,MAAM,WAAW,kBAAkB;IACjC;;;OAGG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;OAEG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB;;OAEG;IACH,cAAc,CAAC,EAAE,MAAM,IAAI,CAAC;IAC5B;;OAEG;IACH,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B;;OAEG;IACH,cAAc,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACxC;;;OAGG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAiGtD,CAAC"}
@@ -1,3 +1,4 @@
1
1
  export { SignInButton } from './SignInButton';
2
2
  export { SignOutButton } from './SignOutButton';
3
+ export { AuthButton } from './AuthButton';
3
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAC9C,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createRedirect.d.ts","sourceRoot":"","sources":["../../../src/server/createRedirect.ts"],"names":[],"mappings":"AAEA,KAAK,eAAe,CAAC,cAAc,IA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AC;IACtB,SAAS,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;IACzB,SAAS,CAAC,EAAE,GAAG,GAAG,MAAM,CAAC;CAC1B,KAAK;IACJ,gBAAgB,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;IAC1C,gBAAgB,EAAE,WAAW,CAAC,UAAU,CAAC,CAAC;CAC3C,CAAC;AAEF,eAAO,MAAM,cAAc,EAAE,cA+C5B,CAAC"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@cabin-id/nextjs",
3
3
  "description": "NextJS SDK for CabinID",
4
- "version": "2.0.1",
4
+ "version": "2.2.0",
5
5
  "main": "./dist/index.js",
6
6
  "module": "./dist/index.mjs",
7
7
  "author": "CabinVN",
@@ -24,14 +24,6 @@
24
24
  "dist",
25
25
  "server"
26
26
  ],
27
- "scripts": {
28
- "build": "npm run clean && tsup",
29
- "build:declarations": "tsc -p tsconfig.declarations.json",
30
- "clean": "rimraf ./dist",
31
- "dev": "tsup --watch",
32
- "dev:publish": "npm run dev -- --env.publish",
33
- "publish:local": "npx yalc push --replace --sig"
34
- },
35
27
  "devDependencies": {
36
28
  "@babel/core": "^7.24.0",
37
29
  "@babel/plugin-transform-named-capturing-groups-regex": "^7.22.5",
@@ -61,5 +53,13 @@
61
53
  },
62
54
  "publishConfig": {
63
55
  "access": "public"
56
+ },
57
+ "scripts": {
58
+ "build": "npm run clean && tsup",
59
+ "build:declarations": "tsc -p tsconfig.declarations.json",
60
+ "clean": "rimraf ./dist",
61
+ "dev": "tsup --watch",
62
+ "dev:publish": "npm run dev -- --env.publish",
63
+ "publish:local": "npx yalc push --replace --sig"
64
64
  }
65
65
  }