@cabin-id/nextjs 1.0.5 → 1.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.
- package/dist/cjs/components/SignOutButton.js +140 -0
- package/dist/cjs/components/SignOutButton.js.map +1 -0
- package/dist/cjs/components/index.js +5 -2
- package/dist/cjs/components/index.js.map +1 -1
- package/dist/cjs/index.js +9 -0
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/styles/global.css +18 -0
- package/dist/cjs/styles/global.css.map +1 -1
- package/dist/cjs/utils/subdomain.js +62 -0
- package/dist/cjs/utils/subdomain.js.map +1 -0
- package/dist/esm/components/SignOutButton.js +106 -0
- package/dist/esm/components/SignOutButton.js.map +1 -0
- package/dist/esm/components/index.js +3 -1
- package/dist/esm/components/index.js.map +1 -1
- package/dist/esm/index.js +6 -1
- package/dist/esm/index.js.map +1 -1
- package/dist/esm/styles/global.css +18 -0
- package/dist/esm/styles/global.css.map +1 -1
- package/dist/esm/utils/subdomain.js +36 -0
- package/dist/esm/utils/subdomain.js.map +1 -0
- package/dist/types/components/SignOutButton.d.ts +59 -0
- package/dist/types/components/SignOutButton.d.ts.map +1 -0
- package/dist/types/components/index.d.ts +1 -0
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/utils/subdomain.d.ts +18 -0
- package/dist/types/utils/subdomain.d.ts.map +1 -0
- package/package.json +1 -1
|
@@ -0,0 +1,140 @@
|
|
|
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 SignOutButton_exports = {};
|
|
31
|
+
__export(SignOutButton_exports, {
|
|
32
|
+
SignOutButton: () => SignOutButton
|
|
33
|
+
});
|
|
34
|
+
module.exports = __toCommonJS(SignOutButton_exports);
|
|
35
|
+
var import_react = __toESM(require("react"));
|
|
36
|
+
var import_useUser = require("../hooks/useUser");
|
|
37
|
+
var import_constants = require("../constants");
|
|
38
|
+
var import_subdomain = require("../utils/subdomain");
|
|
39
|
+
const SignOutButton = ({
|
|
40
|
+
children = "Sign Out",
|
|
41
|
+
className = "px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50",
|
|
42
|
+
signOutOptions,
|
|
43
|
+
onSignOutStart,
|
|
44
|
+
onSignOutSuccess,
|
|
45
|
+
onSignOutError,
|
|
46
|
+
showLoading = true,
|
|
47
|
+
loadingText = "Signing out...",
|
|
48
|
+
callBackend = true,
|
|
49
|
+
cabinIdSubdomain,
|
|
50
|
+
useCrossDomainLogout = true
|
|
51
|
+
}) => {
|
|
52
|
+
const { signOut, isSignedIn, user } = (0, import_useUser.useUser)();
|
|
53
|
+
const [isLoading, setIsLoading] = (0, import_react.useState)(false);
|
|
54
|
+
const handleSignOut = async () => {
|
|
55
|
+
if (isLoading || !isSignedIn) return;
|
|
56
|
+
try {
|
|
57
|
+
setIsLoading(true);
|
|
58
|
+
onSignOutStart == null ? void 0 : onSignOutStart();
|
|
59
|
+
const subdomain = cabinIdSubdomain || (0, import_subdomain.detectCabinIdSubdomain)();
|
|
60
|
+
if (useCrossDomainLogout && subdomain) {
|
|
61
|
+
if (callBackend && user) {
|
|
62
|
+
try {
|
|
63
|
+
const token = getCookieValue("__client") || getCookieValue("__user");
|
|
64
|
+
if (token) {
|
|
65
|
+
await fetch(`${import_constants.baseApiUrl}/auth/sign-out`, {
|
|
66
|
+
method: "POST",
|
|
67
|
+
headers: {
|
|
68
|
+
"Content-Type": "application/json",
|
|
69
|
+
"Authorization": `Bearer ${token}`,
|
|
70
|
+
"Origin": typeof window !== "undefined" ? window.location.origin : ""
|
|
71
|
+
}
|
|
72
|
+
});
|
|
73
|
+
}
|
|
74
|
+
} catch (backendError) {
|
|
75
|
+
console.warn("Backend sign-out failed, proceeding with logout:", backendError);
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
await signOut(() => {
|
|
79
|
+
});
|
|
80
|
+
const currentDomain = typeof window !== "undefined" ? window.location.hostname : "";
|
|
81
|
+
const logoutUrl = `https://${subdomain}.cabinid.dev/${subdomain}/logout?redirect_url=${encodeURIComponent(currentDomain)}`;
|
|
82
|
+
onSignOutSuccess == null ? void 0 : onSignOutSuccess();
|
|
83
|
+
window.location.href = logoutUrl;
|
|
84
|
+
return;
|
|
85
|
+
}
|
|
86
|
+
if (callBackend && user) {
|
|
87
|
+
try {
|
|
88
|
+
const token = getCookieValue("__client") || getCookieValue("__user");
|
|
89
|
+
if (token) {
|
|
90
|
+
await fetch(`${import_constants.baseApiUrl}/auth/sign-out`, {
|
|
91
|
+
method: "POST",
|
|
92
|
+
headers: {
|
|
93
|
+
"Content-Type": "application/json",
|
|
94
|
+
"Authorization": `Bearer ${token}`,
|
|
95
|
+
"Origin": typeof window !== "undefined" ? window.location.origin : ""
|
|
96
|
+
}
|
|
97
|
+
});
|
|
98
|
+
}
|
|
99
|
+
} catch (backendError) {
|
|
100
|
+
console.warn("Backend sign-out failed, proceeding with client-side cleanup:", backendError);
|
|
101
|
+
}
|
|
102
|
+
}
|
|
103
|
+
await signOut(signOutOptions);
|
|
104
|
+
onSignOutSuccess == null ? void 0 : onSignOutSuccess();
|
|
105
|
+
} catch (error) {
|
|
106
|
+
console.error("Sign out error:", error);
|
|
107
|
+
onSignOutError == null ? void 0 : onSignOutError(error);
|
|
108
|
+
} finally {
|
|
109
|
+
setIsLoading(false);
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
const getCookieValue = (name) => {
|
|
113
|
+
var _a;
|
|
114
|
+
if (typeof window === "undefined") return null;
|
|
115
|
+
const value = `; ${document.cookie}`;
|
|
116
|
+
const parts = value.split(`; ${name}=`);
|
|
117
|
+
if (parts.length === 2) {
|
|
118
|
+
return ((_a = parts.pop()) == null ? void 0 : _a.split(";").shift()) || null;
|
|
119
|
+
}
|
|
120
|
+
return null;
|
|
121
|
+
};
|
|
122
|
+
if (!isSignedIn) {
|
|
123
|
+
return null;
|
|
124
|
+
}
|
|
125
|
+
return /* @__PURE__ */ import_react.default.createElement(
|
|
126
|
+
"button",
|
|
127
|
+
{
|
|
128
|
+
onClick: handleSignOut,
|
|
129
|
+
disabled: isLoading,
|
|
130
|
+
className,
|
|
131
|
+
type: "button"
|
|
132
|
+
},
|
|
133
|
+
isLoading && showLoading ? loadingText : children
|
|
134
|
+
);
|
|
135
|
+
};
|
|
136
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
137
|
+
0 && (module.exports = {
|
|
138
|
+
SignOutButton
|
|
139
|
+
});
|
|
140
|
+
//# sourceMappingURL=SignOutButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser, SignOutOptions } from '../hooks/useUser';\nimport { baseApiUrl } from '../constants';\nimport { detectCabinIdSubdomain } from '../utils/subdomain';\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 * Sign out options\n */\n signOutOptions?: SignOutOptions;\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 * Whether to call the backend sign-out endpoint\n * @default true\n */\n callBackend?: boolean;\n /**\n * CabinID subdomain for cross-domain logout\n * @example \"myapp\" for myapp.cabinid.dev\n */\n cabinIdSubdomain?: string;\n /**\n * Whether to use cross-domain logout flow\n * @default true\n */\n useCrossDomainLogout?: boolean;\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 signOutOptions,\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n callBackend = true,\n cabinIdSubdomain,\n useCrossDomainLogout = true,\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 // Cross-domain logout flow\n const subdomain = cabinIdSubdomain || detectCabinIdSubdomain();\n if (useCrossDomainLogout && subdomain) {\n // Call backend sign-out endpoint first\n if (callBackend && user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrl}/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 // Clear local cookies and storage\n await signOut(() => {\n // Don't redirect yet, we'll handle it manually\n });\n\n // Redirect to CabinID logout page for complete cleanup\n const currentDomain = typeof window !== 'undefined' ? window.location.hostname : '';\n const logoutUrl = `https://${subdomain}.cabinid.dev/${subdomain}/logout?redirect_url=${encodeURIComponent(currentDomain)}`;\n \n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n return;\n }\n\n // Standard logout flow (backward compatibility)\n if (callBackend && user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrl}/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 client-side cleanup:', backendError);\n }\n }\n\n await signOut(signOutOptions);\n onSignOutSuccess?.();\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n } finally {\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,qBAAwC;AACxC,uBAA2B;AAC3B,uBAAuC;AA0DhC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA,uBAAuB;AACzB,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;AACF,mBAAa,IAAI;AACjB;AAGA,YAAM,YAAY,wBAAoB,yCAAuB;AAC7D,UAAI,wBAAwB,WAAW;AAErC,YAAI,eAAe,MAAM;AACvB,cAAI;AACF,kBAAM,QAAQ,eAAe,UAAU,KAAK,eAAe,QAAQ;AACnE,gBAAI,OAAO;AACT,oBAAM,MAAM,GAAG,2BAAU,kBAAkB;AAAA,gBACzC,QAAQ;AAAA,gBACR,SAAS;AAAA,kBACP,gBAAgB;AAAA,kBAChB,iBAAiB,UAAU,KAAK;AAAA,kBAChC,UAAU,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;AAAA,gBACrE;AAAA,cACF,CAAC;AAAA,YACH;AAAA,UACF,SAAS,cAAc;AACrB,oBAAQ,KAAK,oDAAoD,YAAY;AAAA,UAC/E;AAAA,QACF;AAGA,cAAM,QAAQ,MAAM;AAAA,QAEpB,CAAC;AAGD,cAAM,gB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names":["React"]}
|
|
@@ -18,12 +18,15 @@ 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
|
-
SignInButton: () => import_SignInButton.SignInButton
|
|
21
|
+
SignInButton: () => import_SignInButton.SignInButton,
|
|
22
|
+
SignOutButton: () => import_SignOutButton.SignOutButton
|
|
22
23
|
});
|
|
23
24
|
module.exports = __toCommonJS(components_exports);
|
|
24
25
|
var import_SignInButton = require("./SignInButton");
|
|
26
|
+
var import_SignOutButton = require("./SignOutButton");
|
|
25
27
|
// Annotate the CommonJS export names for ESM import in node:
|
|
26
28
|
0 && (module.exports = {
|
|
27
|
-
SignInButton
|
|
29
|
+
SignInButton,
|
|
30
|
+
SignOutButton
|
|
28
31
|
});
|
|
29
32
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;","names":[]}
|
|
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":[]}
|
package/dist/cjs/index.js
CHANGED
|
@@ -20,9 +20,13 @@ var index_exports = {};
|
|
|
20
20
|
__export(index_exports, {
|
|
21
21
|
CabinIDProvider: () => import_main.CabinIDProvider,
|
|
22
22
|
SignInButton: () => import_components.SignInButton,
|
|
23
|
+
SignOutButton: () => import_components.SignOutButton,
|
|
23
24
|
auth: () => import_auth.auth,
|
|
24
25
|
authMiddleware: () => import_middleware.authMiddleware,
|
|
26
|
+
clearCabinIdSubdomain: () => import_subdomain.clearCabinIdSubdomain,
|
|
25
27
|
currentUser: () => import_getCurrentUser.currentUser,
|
|
28
|
+
detectCabinIdSubdomain: () => import_subdomain.detectCabinIdSubdomain,
|
|
29
|
+
storeCabinIdSubdomain: () => import_subdomain.storeCabinIdSubdomain,
|
|
26
30
|
useUser: () => import_hooks.useUser
|
|
27
31
|
});
|
|
28
32
|
module.exports = __toCommonJS(index_exports);
|
|
@@ -33,13 +37,18 @@ var import_main = require("./provider/main.provider");
|
|
|
33
37
|
var import_hooks = require("./hooks");
|
|
34
38
|
var import_middleware = require("./server/middleware");
|
|
35
39
|
var import_components = require("./components");
|
|
40
|
+
var import_subdomain = require("./utils/subdomain");
|
|
36
41
|
// Annotate the CommonJS export names for ESM import in node:
|
|
37
42
|
0 && (module.exports = {
|
|
38
43
|
CabinIDProvider,
|
|
39
44
|
SignInButton,
|
|
45
|
+
SignOutButton,
|
|
40
46
|
auth,
|
|
41
47
|
authMiddleware,
|
|
48
|
+
clearCabinIdSubdomain,
|
|
42
49
|
currentUser,
|
|
50
|
+
detectCabinIdSubdomain,
|
|
51
|
+
storeCabinIdSubdomain,
|
|
43
52
|
useUser
|
|
44
53
|
});
|
|
45
54
|
//# sourceMappingURL=index.js.map
|
package/dist/cjs/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import './styles/global.css';\n\nexport { auth } from './server/auth';\nexport { currentUser } from './server/getCurrentUser';\nexport { CabinIDProvider } from './provider/main.provider';\nexport { useUser } from './hooks';\nexport { authMiddleware } from './server/middleware';\nexport { SignInButton } from './components';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAO;AAEP,kBAAqB;AACrB,4BAA4B;AAC5B,kBAAgC;AAChC,mBAAwB;AACxB,wBAA+B;AAC/B,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import './styles/global.css';\n\nexport { auth } from './server/auth';\nexport { currentUser } from './server/getCurrentUser';\nexport { CabinIDProvider } from './provider/main.provider';\nexport { useUser } from './hooks';\nexport { authMiddleware } from './server/middleware';\nexport { SignInButton, SignOutButton } from './components';\nexport { detectCabinIdSubdomain, storeCabinIdSubdomain, clearCabinIdSubdomain } from './utils/subdomain';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAO;AAEP,kBAAqB;AACrB,4BAA4B;AAC5B,kBAAgC;AAChC,mBAAwB;AACxB,wBAA+B;AAC/B,wBAA4C;AAC5C,uBAAqF;","names":[]}
|
|
@@ -382,6 +382,9 @@ video {
|
|
|
382
382
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
383
383
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
384
384
|
}
|
|
385
|
+
.rounded {
|
|
386
|
+
border-radius: 0.25rem;
|
|
387
|
+
}
|
|
385
388
|
.rounded-full {
|
|
386
389
|
border-radius: 9999px;
|
|
387
390
|
}
|
|
@@ -389,6 +392,14 @@ video {
|
|
|
389
392
|
--tw-bg-opacity: 1;
|
|
390
393
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
391
394
|
}
|
|
395
|
+
.bg-red-600 {
|
|
396
|
+
--tw-bg-opacity: 1;
|
|
397
|
+
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
|
|
398
|
+
}
|
|
399
|
+
.px-4 {
|
|
400
|
+
padding-left: 1rem;
|
|
401
|
+
padding-right: 1rem;
|
|
402
|
+
}
|
|
392
403
|
.py-2 {
|
|
393
404
|
padding-top: 0.5rem;
|
|
394
405
|
padding-bottom: 0.5rem;
|
|
@@ -410,6 +421,10 @@ video {
|
|
|
410
421
|
.filter {
|
|
411
422
|
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);
|
|
412
423
|
}
|
|
424
|
+
.hover\:bg-red-700:hover {
|
|
425
|
+
--tw-bg-opacity: 1;
|
|
426
|
+
background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
|
|
427
|
+
}
|
|
413
428
|
.hover\:opacity-90:hover {
|
|
414
429
|
opacity: 0.9;
|
|
415
430
|
}
|
|
@@ -417,4 +432,7 @@ video {
|
|
|
417
432
|
--tw-bg-opacity: 1;
|
|
418
433
|
background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));
|
|
419
434
|
}
|
|
435
|
+
.disabled\:opacity-50:disabled {
|
|
436
|
+
opacity: 0.5;
|
|
437
|
+
}
|
|
420
438
|
/*# sourceMappingURL=global.css.map */
|
|
@@ -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-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.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\\: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"],"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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B;AACA,CAAC;AACC,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC;AACC,eAAa;AACb,kBAAgB;AAClB;AACA,CAAC;AACC,gBAAc;AAChB;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAAC;AACC,qBAAmB;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,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;","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.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;AACA;AACA;AACA;AACA;AACA;AACF;AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;AACd,gBAAc;AACd,gBAAc;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|
+
"use strict";
|
|
2
|
+
var __defProp = Object.defineProperty;
|
|
3
|
+
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
+
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
+
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
+
var __export = (target, all) => {
|
|
7
|
+
for (var name in all)
|
|
8
|
+
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
+
};
|
|
10
|
+
var __copyProps = (to, from, except, desc) => {
|
|
11
|
+
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
+
for (let key of __getOwnPropNames(from))
|
|
13
|
+
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
+
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
+
}
|
|
16
|
+
return to;
|
|
17
|
+
};
|
|
18
|
+
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
+
var subdomain_exports = {};
|
|
20
|
+
__export(subdomain_exports, {
|
|
21
|
+
clearCabinIdSubdomain: () => clearCabinIdSubdomain,
|
|
22
|
+
detectCabinIdSubdomain: () => detectCabinIdSubdomain,
|
|
23
|
+
storeCabinIdSubdomain: () => storeCabinIdSubdomain
|
|
24
|
+
});
|
|
25
|
+
module.exports = __toCommonJS(subdomain_exports);
|
|
26
|
+
const detectCabinIdSubdomain = () => {
|
|
27
|
+
if (typeof window === "undefined") return null;
|
|
28
|
+
const referrer = document.referrer;
|
|
29
|
+
if (referrer) {
|
|
30
|
+
const referrerMatch = referrer.match(/https?:\/\/([^.]+)\.cabinid\.dev/);
|
|
31
|
+
if (referrerMatch) {
|
|
32
|
+
return referrerMatch[1];
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
const storedSubdomain = localStorage.getItem("cabinid_subdomain");
|
|
36
|
+
if (storedSubdomain) {
|
|
37
|
+
return storedSubdomain;
|
|
38
|
+
}
|
|
39
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
40
|
+
const subdomainParam = urlParams.get("cabinid_subdomain");
|
|
41
|
+
if (subdomainParam) {
|
|
42
|
+
return subdomainParam;
|
|
43
|
+
}
|
|
44
|
+
return null;
|
|
45
|
+
};
|
|
46
|
+
const storeCabinIdSubdomain = (subdomain) => {
|
|
47
|
+
if (typeof window !== "undefined") {
|
|
48
|
+
localStorage.setItem("cabinid_subdomain", subdomain);
|
|
49
|
+
}
|
|
50
|
+
};
|
|
51
|
+
const clearCabinIdSubdomain = () => {
|
|
52
|
+
if (typeof window !== "undefined") {
|
|
53
|
+
localStorage.removeItem("cabinid_subdomain");
|
|
54
|
+
}
|
|
55
|
+
};
|
|
56
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
57
|
+
0 && (module.exports = {
|
|
58
|
+
clearCabinIdSubdomain,
|
|
59
|
+
detectCabinIdSubdomain,
|
|
60
|
+
storeCabinIdSubdomain
|
|
61
|
+
});
|
|
62
|
+
//# sourceMappingURL=subdomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/subdomain.ts"],"sourcesContent":["/**\n * Utility functions for handling CabinID subdomain detection\n */\n\n/**\n * Extracts the CabinID subdomain from referrer or current URL\n * @returns The subdomain if detected, null otherwise\n */\nexport const detectCabinIdSubdomain = (): string | null => {\n if (typeof window === 'undefined') return null;\n\n // Check referrer first (where user came from during authentication flow)\n const referrer = document.referrer;\n if (referrer) {\n const referrerMatch = referrer.match(/https?:\\/\\/([^.]+)\\.cabinid\\.dev/);\n if (referrerMatch) {\n return referrerMatch[1];\n }\n }\n\n // Check if there's a stored subdomain from authentication flow\n const storedSubdomain = localStorage.getItem('cabinid_subdomain');\n if (storedSubdomain) {\n return storedSubdomain;\n }\n\n // Check URL parameters for subdomain hint\n const urlParams = new URLSearchParams(window.location.search);\n const subdomainParam = urlParams.get('cabinid_subdomain');\n if (subdomainParam) {\n return subdomainParam;\n }\n\n return null;\n};\n\n/**\n * Stores the CabinID subdomain for later use\n * @param subdomain The subdomain to store\n */\nexport const storeCabinIdSubdomain = (subdomain: string): void => {\n if (typeof window !== 'undefined') {\n localStorage.setItem('cabinid_subdomain', subdomain);\n }\n};\n\n/**\n * Clears the stored CabinID subdomain\n */\nexport const clearCabinIdSubdomain = (): void => {\n if (typeof window !== 'undefined') {\n localStorage.removeItem('cabinid_subdomain');\n }\n};"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAQO,MAAM,yBAAyB,MAAqB;AACzD,MAAI,OAAO,WAAW,YAAa,QAAO;AAG1C,QAAM,WAAW,SAAS;AAC1B,MAAI,UAAU;AACZ,UAAM,gBAAgB,SAAS,MAAM,kCAAkC;AACvE,QAAI,eAAe;AACjB,aAAO,cAAc,CAAC;AAAA,IACxB;AAAA,EACF;AAGA,QAAM,kBAAkB,aAAa,QAAQ,mBAAmB;AAChE,MAAI,iBAAiB;AACnB,WAAO;AAAA,EACT;AAGA,QAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,QAAM,iBAAiB,UAAU,IAAI,mBAAmB;AACxD,MAAI,gBAAgB;AAClB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAMO,MAAM,wBAAwB,CAAC,cAA4B;AAChE,MAAI,OAAO,WAAW,aAAa;AACjC,iBAAa,QAAQ,qBAAqB,SAAS;AAAA,EACrD;AACF;AAKO,MAAM,wBAAwB,MAAY;AAC/C,MAAI,OAAO,WAAW,aAAa;AACjC,iBAAa,WAAW,mBAAmB;AAAA,EAC7C;AACF;","names":[]}
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
"use client";
|
|
2
|
+
import React, { useState } from "react";
|
|
3
|
+
import { useUser } from "../hooks/useUser";
|
|
4
|
+
import { baseApiUrl } from "../constants";
|
|
5
|
+
import { detectCabinIdSubdomain } from "../utils/subdomain";
|
|
6
|
+
const SignOutButton = ({
|
|
7
|
+
children = "Sign Out",
|
|
8
|
+
className = "px-4 py-2 bg-red-600 text-white rounded hover:bg-red-700 disabled:opacity-50",
|
|
9
|
+
signOutOptions,
|
|
10
|
+
onSignOutStart,
|
|
11
|
+
onSignOutSuccess,
|
|
12
|
+
onSignOutError,
|
|
13
|
+
showLoading = true,
|
|
14
|
+
loadingText = "Signing out...",
|
|
15
|
+
callBackend = true,
|
|
16
|
+
cabinIdSubdomain,
|
|
17
|
+
useCrossDomainLogout = true
|
|
18
|
+
}) => {
|
|
19
|
+
const { signOut, isSignedIn, user } = useUser();
|
|
20
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
21
|
+
const handleSignOut = async () => {
|
|
22
|
+
if (isLoading || !isSignedIn) return;
|
|
23
|
+
try {
|
|
24
|
+
setIsLoading(true);
|
|
25
|
+
onSignOutStart == null ? void 0 : onSignOutStart();
|
|
26
|
+
const subdomain = cabinIdSubdomain || detectCabinIdSubdomain();
|
|
27
|
+
if (useCrossDomainLogout && subdomain) {
|
|
28
|
+
if (callBackend && user) {
|
|
29
|
+
try {
|
|
30
|
+
const token = getCookieValue("__client") || getCookieValue("__user");
|
|
31
|
+
if (token) {
|
|
32
|
+
await fetch(`${baseApiUrl}/auth/sign-out`, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
headers: {
|
|
35
|
+
"Content-Type": "application/json",
|
|
36
|
+
"Authorization": `Bearer ${token}`,
|
|
37
|
+
"Origin": typeof window !== "undefined" ? window.location.origin : ""
|
|
38
|
+
}
|
|
39
|
+
});
|
|
40
|
+
}
|
|
41
|
+
} catch (backendError) {
|
|
42
|
+
console.warn("Backend sign-out failed, proceeding with logout:", backendError);
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
await signOut(() => {
|
|
46
|
+
});
|
|
47
|
+
const currentDomain = typeof window !== "undefined" ? window.location.hostname : "";
|
|
48
|
+
const logoutUrl = `https://${subdomain}.cabinid.dev/${subdomain}/logout?redirect_url=${encodeURIComponent(currentDomain)}`;
|
|
49
|
+
onSignOutSuccess == null ? void 0 : onSignOutSuccess();
|
|
50
|
+
window.location.href = logoutUrl;
|
|
51
|
+
return;
|
|
52
|
+
}
|
|
53
|
+
if (callBackend && user) {
|
|
54
|
+
try {
|
|
55
|
+
const token = getCookieValue("__client") || getCookieValue("__user");
|
|
56
|
+
if (token) {
|
|
57
|
+
await fetch(`${baseApiUrl}/auth/sign-out`, {
|
|
58
|
+
method: "POST",
|
|
59
|
+
headers: {
|
|
60
|
+
"Content-Type": "application/json",
|
|
61
|
+
"Authorization": `Bearer ${token}`,
|
|
62
|
+
"Origin": typeof window !== "undefined" ? window.location.origin : ""
|
|
63
|
+
}
|
|
64
|
+
});
|
|
65
|
+
}
|
|
66
|
+
} catch (backendError) {
|
|
67
|
+
console.warn("Backend sign-out failed, proceeding with client-side cleanup:", backendError);
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
await signOut(signOutOptions);
|
|
71
|
+
onSignOutSuccess == null ? void 0 : onSignOutSuccess();
|
|
72
|
+
} catch (error) {
|
|
73
|
+
console.error("Sign out error:", error);
|
|
74
|
+
onSignOutError == null ? void 0 : onSignOutError(error);
|
|
75
|
+
} finally {
|
|
76
|
+
setIsLoading(false);
|
|
77
|
+
}
|
|
78
|
+
};
|
|
79
|
+
const getCookieValue = (name) => {
|
|
80
|
+
var _a;
|
|
81
|
+
if (typeof window === "undefined") return null;
|
|
82
|
+
const value = `; ${document.cookie}`;
|
|
83
|
+
const parts = value.split(`; ${name}=`);
|
|
84
|
+
if (parts.length === 2) {
|
|
85
|
+
return ((_a = parts.pop()) == null ? void 0 : _a.split(";").shift()) || null;
|
|
86
|
+
}
|
|
87
|
+
return null;
|
|
88
|
+
};
|
|
89
|
+
if (!isSignedIn) {
|
|
90
|
+
return null;
|
|
91
|
+
}
|
|
92
|
+
return /* @__PURE__ */ React.createElement(
|
|
93
|
+
"button",
|
|
94
|
+
{
|
|
95
|
+
onClick: handleSignOut,
|
|
96
|
+
disabled: isLoading,
|
|
97
|
+
className,
|
|
98
|
+
type: "button"
|
|
99
|
+
},
|
|
100
|
+
isLoading && showLoading ? loadingText : children
|
|
101
|
+
);
|
|
102
|
+
};
|
|
103
|
+
export {
|
|
104
|
+
SignOutButton
|
|
105
|
+
};
|
|
106
|
+
//# sourceMappingURL=SignOutButton.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/SignOutButton.tsx"],"sourcesContent":["'use client';\n\nimport React, { useState } from 'react';\nimport { useUser, SignOutOptions } from '../hooks/useUser';\nimport { baseApiUrl } from '../constants';\nimport { detectCabinIdSubdomain } from '../utils/subdomain';\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 * Sign out options\n */\n signOutOptions?: SignOutOptions;\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 * Whether to call the backend sign-out endpoint\n * @default true\n */\n callBackend?: boolean;\n /**\n * CabinID subdomain for cross-domain logout\n * @example \"myapp\" for myapp.cabinid.dev\n */\n cabinIdSubdomain?: string;\n /**\n * Whether to use cross-domain logout flow\n * @default true\n */\n useCrossDomainLogout?: boolean;\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 signOutOptions,\n onSignOutStart,\n onSignOutSuccess,\n onSignOutError,\n showLoading = true,\n loadingText = 'Signing out...',\n callBackend = true,\n cabinIdSubdomain,\n useCrossDomainLogout = true,\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 // Cross-domain logout flow\n const subdomain = cabinIdSubdomain || detectCabinIdSubdomain();\n if (useCrossDomainLogout && subdomain) {\n // Call backend sign-out endpoint first\n if (callBackend && user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrl}/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 // Clear local cookies and storage\n await signOut(() => {\n // Don't redirect yet, we'll handle it manually\n });\n\n // Redirect to CabinID logout page for complete cleanup\n const currentDomain = typeof window !== 'undefined' ? window.location.hostname : '';\n const logoutUrl = `https://${subdomain}.cabinid.dev/${subdomain}/logout?redirect_url=${encodeURIComponent(currentDomain)}`;\n \n onSignOutSuccess?.();\n window.location.href = logoutUrl;\n return;\n }\n\n // Standard logout flow (backward compatibility)\n if (callBackend && user) {\n try {\n const token = getCookieValue('__client') || getCookieValue('__user');\n if (token) {\n await fetch(`${baseApiUrl}/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 client-side cleanup:', backendError);\n }\n }\n\n await signOut(signOutOptions);\n onSignOutSuccess?.();\n } catch (error) {\n console.error('Sign out error:', error);\n onSignOutError?.(error as Error);\n } finally {\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,eAA+B;AACxC,SAAS,kBAAkB;AAC3B,SAAS,8BAA8B;AA0DhC,MAAM,gBAA8C,CAAC;AAAA,EAC1D,WAAW;AAAA,EACX,YAAY;AAAA,EACZ;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA,cAAc;AAAA,EACd,cAAc;AAAA,EACd,cAAc;AAAA,EACd;AAAA,EACA,uBAAuB;AACzB,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,YAAM,YAAY,oBAAoB,uBAAuB;AAC7D,UAAI,wBAAwB,WAAW;AAErC,YAAI,eAAe,MAAM;AACvB,cAAI;AACF,kBAAM,QAAQ,eAAe,UAAU,KAAK,eAAe,QAAQ;AACnE,gBAAI,OAAO;AACT,oBAAM,MAAM,GAAG,UAAU,kBAAkB;AAAA,gBACzC,QAAQ;AAAA,gBACR,SAAS;AAAA,kBACP,gBAAgB;AAAA,kBAChB,iBAAiB,UAAU,KAAK;AAAA,kBAChC,UAAU,OAAO,WAAW,cAAc,OAAO,SAAS,SAAS;AAAA,gBACrE;AAAA,cACF,CAAC;AAAA,YACH;AAAA,UACF,SAAS,cAAc;AACrB,oBAAQ,KAAK,oDAAoD,YAAY;AAAA,UAC/E;AAAA,QACF;AAGA,cAAM,QAAQ,MAAM;AAAA,QAEp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AEJ;","names":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\n"],"mappings":"AAAA,SAAS,oBAAoB;","names":[]}
|
|
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":[]}
|
package/dist/esm/index.js
CHANGED
|
@@ -4,13 +4,18 @@ import { currentUser } from "./server/getCurrentUser";
|
|
|
4
4
|
import { CabinIDProvider } from "./provider/main.provider";
|
|
5
5
|
import { useUser } from "./hooks";
|
|
6
6
|
import { authMiddleware } from "./server/middleware";
|
|
7
|
-
import { SignInButton } from "./components";
|
|
7
|
+
import { SignInButton, SignOutButton } from "./components";
|
|
8
|
+
import { detectCabinIdSubdomain, storeCabinIdSubdomain, clearCabinIdSubdomain } from "./utils/subdomain";
|
|
8
9
|
export {
|
|
9
10
|
CabinIDProvider,
|
|
10
11
|
SignInButton,
|
|
12
|
+
SignOutButton,
|
|
11
13
|
auth,
|
|
12
14
|
authMiddleware,
|
|
15
|
+
clearCabinIdSubdomain,
|
|
13
16
|
currentUser,
|
|
17
|
+
detectCabinIdSubdomain,
|
|
18
|
+
storeCabinIdSubdomain,
|
|
14
19
|
useUser
|
|
15
20
|
};
|
|
16
21
|
//# sourceMappingURL=index.js.map
|
package/dist/esm/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import './styles/global.css';\n\nexport { auth } from './server/auth';\nexport { currentUser } from './server/getCurrentUser';\nexport { CabinIDProvider } from './provider/main.provider';\nexport { useUser } from './hooks';\nexport { authMiddleware } from './server/middleware';\nexport { SignInButton } from './components';\n"],"mappings":"AAAA,OAAO;AAEP,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B,SAAS,
|
|
1
|
+
{"version":3,"sources":["../../src/index.ts"],"sourcesContent":["import './styles/global.css';\n\nexport { auth } from './server/auth';\nexport { currentUser } from './server/getCurrentUser';\nexport { CabinIDProvider } from './provider/main.provider';\nexport { useUser } from './hooks';\nexport { authMiddleware } from './server/middleware';\nexport { SignInButton, SignOutButton } from './components';\nexport { detectCabinIdSubdomain, storeCabinIdSubdomain, clearCabinIdSubdomain } from './utils/subdomain';\n"],"mappings":"AAAA,OAAO;AAEP,SAAS,YAAY;AACrB,SAAS,mBAAmB;AAC5B,SAAS,uBAAuB;AAChC,SAAS,eAAe;AACxB,SAAS,sBAAsB;AAC/B,SAAS,cAAc,qBAAqB;AAC5C,SAAS,wBAAwB,uBAAuB,6BAA6B;","names":[]}
|
|
@@ -382,6 +382,9 @@ video {
|
|
|
382
382
|
margin-right: calc(0.5rem * var(--tw-space-x-reverse));
|
|
383
383
|
margin-left: calc(0.5rem * calc(1 - var(--tw-space-x-reverse)));
|
|
384
384
|
}
|
|
385
|
+
.rounded {
|
|
386
|
+
border-radius: 0.25rem;
|
|
387
|
+
}
|
|
385
388
|
.rounded-full {
|
|
386
389
|
border-radius: 9999px;
|
|
387
390
|
}
|
|
@@ -389,6 +392,14 @@ video {
|
|
|
389
392
|
--tw-bg-opacity: 1;
|
|
390
393
|
background-color: rgb(37 99 235 / var(--tw-bg-opacity, 1));
|
|
391
394
|
}
|
|
395
|
+
.bg-red-600 {
|
|
396
|
+
--tw-bg-opacity: 1;
|
|
397
|
+
background-color: rgb(220 38 38 / var(--tw-bg-opacity, 1));
|
|
398
|
+
}
|
|
399
|
+
.px-4 {
|
|
400
|
+
padding-left: 1rem;
|
|
401
|
+
padding-right: 1rem;
|
|
402
|
+
}
|
|
392
403
|
.py-2 {
|
|
393
404
|
padding-top: 0.5rem;
|
|
394
405
|
padding-bottom: 0.5rem;
|
|
@@ -410,6 +421,10 @@ video {
|
|
|
410
421
|
.filter {
|
|
411
422
|
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);
|
|
412
423
|
}
|
|
424
|
+
.hover\:bg-red-700:hover {
|
|
425
|
+
--tw-bg-opacity: 1;
|
|
426
|
+
background-color: rgb(185 28 28 / var(--tw-bg-opacity, 1));
|
|
427
|
+
}
|
|
413
428
|
.hover\:opacity-90:hover {
|
|
414
429
|
opacity: 0.9;
|
|
415
430
|
}
|
|
@@ -417,4 +432,7 @@ video {
|
|
|
417
432
|
--tw-bg-opacity: 1;
|
|
418
433
|
background-color: rgb(29 78 216 / var(--tw-bg-opacity, 1));
|
|
419
434
|
}
|
|
435
|
+
.disabled\:opacity-50:disabled {
|
|
436
|
+
opacity: 0.5;
|
|
437
|
+
}
|
|
420
438
|
/*# sourceMappingURL=global.css.map */
|
|
@@ -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-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.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\\: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"],"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,2BAAy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,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;AACA,CAAC;AACC,eAAa;AACb,kBAAgB;AAClB;AACA,CAAC;AACC,gBAAc;AAChB;AACA,CAAC;AACC,iBAAe;AACjB;AACA,CAAC;AACC,aAAW;AACX,eAAa;AACf;AACA,CAAC;AACC,qBAAmB;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,WAAS;AACX;AACA,CAAC,mBAAmB;AAClB,mBAAiB;AACjB,oBAAkB,IAAI,GAAG,GAAG,IAAI,EAAE,IAAI,eAAe,EAAE;AACzD;","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.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;AACA;AACA;AACA;AACA;AACA;AACF;AAOA;AACA;AACA;AACE,cAAY;AACZ,gBAAc;A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,0 +1,36 @@
|
|
|
1
|
+
const detectCabinIdSubdomain = () => {
|
|
2
|
+
if (typeof window === "undefined") return null;
|
|
3
|
+
const referrer = document.referrer;
|
|
4
|
+
if (referrer) {
|
|
5
|
+
const referrerMatch = referrer.match(/https?:\/\/([^.]+)\.cabinid\.dev/);
|
|
6
|
+
if (referrerMatch) {
|
|
7
|
+
return referrerMatch[1];
|
|
8
|
+
}
|
|
9
|
+
}
|
|
10
|
+
const storedSubdomain = localStorage.getItem("cabinid_subdomain");
|
|
11
|
+
if (storedSubdomain) {
|
|
12
|
+
return storedSubdomain;
|
|
13
|
+
}
|
|
14
|
+
const urlParams = new URLSearchParams(window.location.search);
|
|
15
|
+
const subdomainParam = urlParams.get("cabinid_subdomain");
|
|
16
|
+
if (subdomainParam) {
|
|
17
|
+
return subdomainParam;
|
|
18
|
+
}
|
|
19
|
+
return null;
|
|
20
|
+
};
|
|
21
|
+
const storeCabinIdSubdomain = (subdomain) => {
|
|
22
|
+
if (typeof window !== "undefined") {
|
|
23
|
+
localStorage.setItem("cabinid_subdomain", subdomain);
|
|
24
|
+
}
|
|
25
|
+
};
|
|
26
|
+
const clearCabinIdSubdomain = () => {
|
|
27
|
+
if (typeof window !== "undefined") {
|
|
28
|
+
localStorage.removeItem("cabinid_subdomain");
|
|
29
|
+
}
|
|
30
|
+
};
|
|
31
|
+
export {
|
|
32
|
+
clearCabinIdSubdomain,
|
|
33
|
+
detectCabinIdSubdomain,
|
|
34
|
+
storeCabinIdSubdomain
|
|
35
|
+
};
|
|
36
|
+
//# sourceMappingURL=subdomain.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/utils/subdomain.ts"],"sourcesContent":["/**\n * Utility functions for handling CabinID subdomain detection\n */\n\n/**\n * Extracts the CabinID subdomain from referrer or current URL\n * @returns The subdomain if detected, null otherwise\n */\nexport const detectCabinIdSubdomain = (): string | null => {\n if (typeof window === 'undefined') return null;\n\n // Check referrer first (where user came from during authentication flow)\n const referrer = document.referrer;\n if (referrer) {\n const referrerMatch = referrer.match(/https?:\\/\\/([^.]+)\\.cabinid\\.dev/);\n if (referrerMatch) {\n return referrerMatch[1];\n }\n }\n\n // Check if there's a stored subdomain from authentication flow\n const storedSubdomain = localStorage.getItem('cabinid_subdomain');\n if (storedSubdomain) {\n return storedSubdomain;\n }\n\n // Check URL parameters for subdomain hint\n const urlParams = new URLSearchParams(window.location.search);\n const subdomainParam = urlParams.get('cabinid_subdomain');\n if (subdomainParam) {\n return subdomainParam;\n }\n\n return null;\n};\n\n/**\n * Stores the CabinID subdomain for later use\n * @param subdomain The subdomain to store\n */\nexport const storeCabinIdSubdomain = (subdomain: string): void => {\n if (typeof window !== 'undefined') {\n localStorage.setItem('cabinid_subdomain', subdomain);\n }\n};\n\n/**\n * Clears the stored CabinID subdomain\n */\nexport const clearCabinIdSubdomain = (): void => {\n if (typeof window !== 'undefined') {\n localStorage.removeItem('cabinid_subdomain');\n }\n};"],"mappings":"AAQO,MAAM,yBAAyB,MAAqB;AACzD,MAAI,OAAO,WAAW,YAAa,QAAO;AAG1C,QAAM,WAAW,SAAS;AAC1B,MAAI,UAAU;AACZ,UAAM,gBAAgB,SAAS,MAAM,kCAAkC;AACvE,QAAI,eAAe;AACjB,aAAO,cAAc,CAAC;AAAA,IACxB;AAAA,EACF;AAGA,QAAM,kBAAkB,aAAa,QAAQ,mBAAmB;AAChE,MAAI,iBAAiB;AACnB,WAAO;AAAA,EACT;AAGA,QAAM,YAAY,IAAI,gBAAgB,OAAO,SAAS,MAAM;AAC5D,QAAM,iBAAiB,UAAU,IAAI,mBAAmB;AACxD,MAAI,gBAAgB;AAClB,WAAO;AAAA,EACT;AAEA,SAAO;AACT;AAMO,MAAM,wBAAwB,CAAC,cAA4B;AAChE,MAAI,OAAO,WAAW,aAAa;AACjC,iBAAa,QAAQ,qBAAqB,SAAS;AAAA,EACrD;AACF;AAKO,MAAM,wBAAwB,MAAY;AAC/C,MAAI,OAAO,WAAW,aAAa;AACjC,iBAAa,WAAW,mBAAmB;AAAA,EAC7C;AACF;","names":[]}
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { SignOutOptions } from '../hooks/useUser';
|
|
3
|
+
export interface SignOutButtonProps {
|
|
4
|
+
/**
|
|
5
|
+
* Custom text to display on the button
|
|
6
|
+
* @default "Sign Out"
|
|
7
|
+
*/
|
|
8
|
+
children?: React.ReactNode;
|
|
9
|
+
/**
|
|
10
|
+
* Custom CSS class name
|
|
11
|
+
*/
|
|
12
|
+
className?: string;
|
|
13
|
+
/**
|
|
14
|
+
* Sign out options
|
|
15
|
+
*/
|
|
16
|
+
signOutOptions?: SignOutOptions;
|
|
17
|
+
/**
|
|
18
|
+
* Callback function called before sign out
|
|
19
|
+
*/
|
|
20
|
+
onSignOutStart?: () => void;
|
|
21
|
+
/**
|
|
22
|
+
* Callback function called after successful sign out
|
|
23
|
+
*/
|
|
24
|
+
onSignOutSuccess?: () => void;
|
|
25
|
+
/**
|
|
26
|
+
* Callback function called when sign out fails
|
|
27
|
+
*/
|
|
28
|
+
onSignOutError?: (error: Error) => void;
|
|
29
|
+
/**
|
|
30
|
+
* Whether to show loading state
|
|
31
|
+
* @default true
|
|
32
|
+
*/
|
|
33
|
+
showLoading?: boolean;
|
|
34
|
+
/**
|
|
35
|
+
* Custom loading text
|
|
36
|
+
* @default "Signing out..."
|
|
37
|
+
*/
|
|
38
|
+
loadingText?: string;
|
|
39
|
+
/**
|
|
40
|
+
* Whether to call the backend sign-out endpoint
|
|
41
|
+
* @default true
|
|
42
|
+
*/
|
|
43
|
+
callBackend?: boolean;
|
|
44
|
+
/**
|
|
45
|
+
* CabinID subdomain for cross-domain logout
|
|
46
|
+
* @example "myapp" for myapp.cabinid.dev
|
|
47
|
+
*/
|
|
48
|
+
cabinIdSubdomain?: string;
|
|
49
|
+
/**
|
|
50
|
+
* Whether to use cross-domain logout flow
|
|
51
|
+
* @default true
|
|
52
|
+
*/
|
|
53
|
+
useCrossDomainLogout?: boolean;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* SignOutButton component that handles user logout with CabinID backend integration
|
|
57
|
+
*/
|
|
58
|
+
export declare const SignOutButton: React.FC<SignOutButtonProps>;
|
|
59
|
+
//# sourceMappingURL=SignOutButton.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SignOutButton.d.ts","sourceRoot":"","sources":["../../../src/components/SignOutButton.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAmB,MAAM,OAAO,CAAC;AACxC,OAAO,EAAW,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAI3D,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,cAAc,CAAC;IAChC;;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,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB;;;OAGG;IACH,gBAAgB,CAAC,EAAE,MAAM,CAAC;IAC1B;;;OAGG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED;;GAEG;AACH,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CAkHtD,CAAC"}
|
|
@@ -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"}
|
|
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"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -4,5 +4,6 @@ export { currentUser } from './server/getCurrentUser';
|
|
|
4
4
|
export { CabinIDProvider } from './provider/main.provider';
|
|
5
5
|
export { useUser } from './hooks';
|
|
6
6
|
export { authMiddleware } from './server/middleware';
|
|
7
|
-
export { SignInButton } from './components';
|
|
7
|
+
export { SignInButton, SignOutButton } from './components';
|
|
8
|
+
export { detectCabinIdSubdomain, storeCabinIdSubdomain, clearCabinIdSubdomain } from './utils/subdomain';
|
|
8
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,MAAM,cAAc,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,qBAAqB,CAAC;AAE7B,OAAO,EAAE,IAAI,EAAE,MAAM,eAAe,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,yBAAyB,CAAC;AACtD,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,EAAE,OAAO,EAAE,MAAM,SAAS,CAAC;AAClC,OAAO,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AACrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,qBAAqB,EAAE,qBAAqB,EAAE,MAAM,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Utility functions for handling CabinID subdomain detection
|
|
3
|
+
*/
|
|
4
|
+
/**
|
|
5
|
+
* Extracts the CabinID subdomain from referrer or current URL
|
|
6
|
+
* @returns The subdomain if detected, null otherwise
|
|
7
|
+
*/
|
|
8
|
+
export declare const detectCabinIdSubdomain: () => string | null;
|
|
9
|
+
/**
|
|
10
|
+
* Stores the CabinID subdomain for later use
|
|
11
|
+
* @param subdomain The subdomain to store
|
|
12
|
+
*/
|
|
13
|
+
export declare const storeCabinIdSubdomain: (subdomain: string) => void;
|
|
14
|
+
/**
|
|
15
|
+
* Clears the stored CabinID subdomain
|
|
16
|
+
*/
|
|
17
|
+
export declare const clearCabinIdSubdomain: () => void;
|
|
18
|
+
//# sourceMappingURL=subdomain.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"subdomain.d.ts","sourceRoot":"","sources":["../../../src/utils/subdomain.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,eAAO,MAAM,sBAAsB,QAAO,MAAM,GAAG,IA0BlD,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAAI,WAAW,MAAM,KAAG,IAIzD,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,QAAO,IAIxC,CAAC"}
|