@cabin-id/nextjs 0.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (144) hide show
  1. package/dist/cjs/api/getUserInfo.js +42 -0
  2. package/dist/cjs/api/getUserInfo.js.map +1 -0
  3. package/dist/cjs/client/provider.js +57 -0
  4. package/dist/cjs/client/provider.js.map +1 -0
  5. package/dist/cjs/component.client.js +2 -0
  6. package/dist/cjs/component.client.js.map +1 -0
  7. package/dist/cjs/component.server.js +29 -0
  8. package/dist/cjs/component.server.js.map +1 -0
  9. package/dist/cjs/components/SignInButton.js +58 -0
  10. package/dist/cjs/components/SignInButton.js.map +1 -0
  11. package/dist/cjs/components/index.js +29 -0
  12. package/dist/cjs/components/index.js.map +1 -0
  13. package/dist/cjs/constants.js +121 -0
  14. package/dist/cjs/constants.js.map +1 -0
  15. package/dist/cjs/global.d.js +17 -0
  16. package/dist/cjs/global.d.js.map +1 -0
  17. package/dist/cjs/hooks/index.js +29 -0
  18. package/dist/cjs/hooks/index.js.map +1 -0
  19. package/dist/cjs/hooks/useUser.js +48 -0
  20. package/dist/cjs/hooks/useUser.js.map +1 -0
  21. package/dist/cjs/icons/logo.js +98 -0
  22. package/dist/cjs/icons/logo.js.map +1 -0
  23. package/dist/cjs/index.js +44 -0
  24. package/dist/cjs/index.js.map +1 -0
  25. package/dist/cjs/server/auth.js +37 -0
  26. package/dist/cjs/server/auth.js.map +1 -0
  27. package/dist/cjs/server/createRedirect.js +89 -0
  28. package/dist/cjs/server/createRedirect.js.map +1 -0
  29. package/dist/cjs/server/getCurrentUser.js +43 -0
  30. package/dist/cjs/server/getCurrentUser.js.map +1 -0
  31. package/dist/cjs/server/middleware.js +185 -0
  32. package/dist/cjs/server/middleware.js.map +1 -0
  33. package/dist/cjs/server/routeMatcher.js +42 -0
  34. package/dist/cjs/server/routeMatcher.js.map +1 -0
  35. package/dist/cjs/server/serverRedirectWithAuth.js +39 -0
  36. package/dist/cjs/server/serverRedirectWithAuth.js.map +1 -0
  37. package/dist/cjs/server/type.js +17 -0
  38. package/dist/cjs/server/type.js.map +1 -0
  39. package/dist/cjs/server/utils.js +107 -0
  40. package/dist/cjs/server/utils.js.map +1 -0
  41. package/dist/cjs/styles/global.css +334 -0
  42. package/dist/cjs/styles/global.css.map +1 -0
  43. package/dist/cjs/types.js +17 -0
  44. package/dist/cjs/types.js.map +1 -0
  45. package/dist/cjs/utils/assertValidSecretKey.js +35 -0
  46. package/dist/cjs/utils/assertValidSecretKey.js.map +1 -0
  47. package/dist/cjs/utils/isomorphicAtob.js +36 -0
  48. package/dist/cjs/utils/isomorphicAtob.js.map +1 -0
  49. package/dist/cjs/utils/isomorphicBtoa.js +36 -0
  50. package/dist/cjs/utils/isomorphicBtoa.js.map +1 -0
  51. package/dist/cjs/utils/key.js +49 -0
  52. package/dist/cjs/utils/key.js.map +1 -0
  53. package/dist/cjs/utils/path.js +33 -0
  54. package/dist/cjs/utils/path.js.map +1 -0
  55. package/dist/cjs/utils/response.js +76 -0
  56. package/dist/cjs/utils/response.js.map +1 -0
  57. package/dist/cjs/utils.js +42 -0
  58. package/dist/cjs/utils.js.map +1 -0
  59. package/dist/esm/api/getUserInfo.js +18 -0
  60. package/dist/esm/api/getUserInfo.js.map +1 -0
  61. package/dist/esm/client/provider.js +22 -0
  62. package/dist/esm/client/provider.js.map +1 -0
  63. package/dist/esm/component.client.js +1 -0
  64. package/dist/esm/component.client.js.map +1 -0
  65. package/dist/esm/component.server.js +5 -0
  66. package/dist/esm/component.server.js.map +1 -0
  67. package/dist/esm/components/SignInButton.js +24 -0
  68. package/dist/esm/components/SignInButton.js.map +1 -0
  69. package/dist/esm/components/index.js +5 -0
  70. package/dist/esm/components/index.js.map +1 -0
  71. package/dist/esm/constants.js +87 -0
  72. package/dist/esm/constants.js.map +1 -0
  73. package/dist/esm/global.d.js +1 -0
  74. package/dist/esm/global.d.js.map +1 -0
  75. package/dist/esm/hooks/index.js +5 -0
  76. package/dist/esm/hooks/index.js.map +1 -0
  77. package/dist/esm/hooks/useUser.js +14 -0
  78. package/dist/esm/hooks/useUser.js.map +1 -0
  79. package/dist/esm/icons/logo.js +64 -0
  80. package/dist/esm/icons/logo.js.map +1 -0
  81. package/dist/esm/index.js +15 -0
  82. package/dist/esm/index.js.map +1 -0
  83. package/dist/esm/server/auth.js +13 -0
  84. package/dist/esm/server/auth.js.map +1 -0
  85. package/dist/esm/server/createRedirect.js +65 -0
  86. package/dist/esm/server/createRedirect.js.map +1 -0
  87. package/dist/esm/server/getCurrentUser.js +19 -0
  88. package/dist/esm/server/getCurrentUser.js.map +1 -0
  89. package/dist/esm/server/middleware.js +166 -0
  90. package/dist/esm/server/middleware.js.map +1 -0
  91. package/dist/esm/server/routeMatcher.js +18 -0
  92. package/dist/esm/server/routeMatcher.js.map +1 -0
  93. package/dist/esm/server/serverRedirectWithAuth.js +15 -0
  94. package/dist/esm/server/serverRedirectWithAuth.js.map +1 -0
  95. package/dist/esm/server/type.js +1 -0
  96. package/dist/esm/server/type.js.map +1 -0
  97. package/dist/esm/server/utils.js +79 -0
  98. package/dist/esm/server/utils.js.map +1 -0
  99. package/dist/esm/styles/global.css +334 -0
  100. package/dist/esm/styles/global.css.map +1 -0
  101. package/dist/esm/types.js +1 -0
  102. package/dist/esm/types.js.map +1 -0
  103. package/dist/esm/utils/assertValidSecretKey.js +11 -0
  104. package/dist/esm/utils/assertValidSecretKey.js.map +1 -0
  105. package/dist/esm/utils/isomorphicAtob.js +12 -0
  106. package/dist/esm/utils/isomorphicAtob.js.map +1 -0
  107. package/dist/esm/utils/isomorphicBtoa.js +12 -0
  108. package/dist/esm/utils/isomorphicBtoa.js.map +1 -0
  109. package/dist/esm/utils/key.js +24 -0
  110. package/dist/esm/utils/key.js.map +1 -0
  111. package/dist/esm/utils/path.js +9 -0
  112. package/dist/esm/utils/path.js.map +1 -0
  113. package/dist/esm/utils/response.js +49 -0
  114. package/dist/esm/utils/response.js.map +1 -0
  115. package/dist/esm/utils.js +18 -0
  116. package/dist/esm/utils.js.map +1 -0
  117. package/dist/types/api/getUserInfo.d.ts.map +1 -0
  118. package/dist/types/client/provider.d.ts.map +1 -0
  119. package/dist/types/component.client.d.ts.map +1 -0
  120. package/dist/types/component.server.d.ts.map +1 -0
  121. package/dist/types/components/SignInButton.d.ts.map +1 -0
  122. package/dist/types/components/index.d.ts.map +1 -0
  123. package/dist/types/constants.d.ts.map +1 -0
  124. package/dist/types/hooks/index.d.ts.map +1 -0
  125. package/dist/types/hooks/useUser.d.ts.map +1 -0
  126. package/dist/types/icons/logo.d.ts.map +1 -0
  127. package/dist/types/index.d.ts.map +1 -0
  128. package/dist/types/server/auth.d.ts.map +1 -0
  129. package/dist/types/server/createRedirect.d.ts.map +1 -0
  130. package/dist/types/server/getCurrentUser.d.ts.map +1 -0
  131. package/dist/types/server/middleware.d.ts.map +1 -0
  132. package/dist/types/server/routeMatcher.d.ts.map +1 -0
  133. package/dist/types/server/serverRedirectWithAuth.d.ts.map +1 -0
  134. package/dist/types/server/type.d.ts.map +1 -0
  135. package/dist/types/server/utils.d.ts.map +1 -0
  136. package/dist/types/types.d.ts.map +1 -0
  137. package/dist/types/utils/assertValidSecretKey.d.ts.map +1 -0
  138. package/dist/types/utils/isomorphicAtob.d.ts.map +1 -0
  139. package/dist/types/utils/isomorphicBtoa.d.ts.map +1 -0
  140. package/dist/types/utils/key.d.ts.map +1 -0
  141. package/dist/types/utils/path.d.ts.map +1 -0
  142. package/dist/types/utils/response.d.ts.map +1 -0
  143. package/dist/types/utils.d.ts.map +1 -0
  144. package/package.json +60 -0
@@ -0,0 +1,42 @@
1
+ "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 getUserInfo_exports = {};
20
+ __export(getUserInfo_exports, {
21
+ getUserInfo: () => getUserInfo
22
+ });
23
+ module.exports = __toCommonJS(getUserInfo_exports);
24
+ var import_constants = require("src/constants");
25
+ const getUserInfo = async (accessToken) => {
26
+ const res = await fetch(`${import_constants.baseApiUrl}/user/me`, {
27
+ method: "GET",
28
+ headers: {
29
+ "Content-Type": "application/json",
30
+ Authorization: `Bearer ${accessToken}`
31
+ }
32
+ });
33
+ if (!res.ok) {
34
+ return null;
35
+ }
36
+ return await res.json();
37
+ };
38
+ // Annotate the CommonJS export names for ESM import in node:
39
+ 0 && (module.exports = {
40
+ getUserInfo
41
+ });
42
+ //# sourceMappingURL=getUserInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/api/getUserInfo.ts"],"sourcesContent":["import { baseApiUrl } from 'src/constants';\n\nexport const getUserInfo = async (accessToken: string) => {\n const res = await fetch(`${baseApiUrl}/user/me`, {\n method: 'GET',\n headers: {\n 'Content-Type': 'application/json',\n Authorization: `Bearer ${accessToken}`,\n },\n });\n if (!res.ok) {\n return null;\n }\n return await res.json();\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,uBAA2B;AAEpB,MAAM,cAAc,OAAO,gBAAwB;AACxD,QAAM,MAAM,MAAM,MAAM,GAAG,2BAAU,YAAY;AAAA,IAC/C,QAAQ;AAAA,IACR,SAAS;AAAA,MACP,gBAAgB;AAAA,MAChB,eAAe,UAAU,WAAW;AAAA,IACtC;AAAA,EACF,CAAC;AACD,MAAI,CAAC,IAAI,IAAI;AACX,WAAO;AAAA,EACT;AACA,SAAO,MAAM,IAAI,KAAK;AACxB;","names":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var provider_exports = {};
30
+ __export(provider_exports, {
31
+ CabinIDContext: () => CabinIDContext,
32
+ CabinIDProvider: () => CabinIDProvider
33
+ });
34
+ module.exports = __toCommonJS(provider_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_constants = require("../constants");
37
+ const CabinIDContext = import_react.default.createContext({
38
+ signInUrl: "",
39
+ user: null
40
+ });
41
+ const CabinIDProvider = ({ children }) => {
42
+ const [user] = import_react.default.useState(null);
43
+ const signInUrl = import_constants.frontendApi || "";
44
+ const redirectUrl = import_constants.CUSTOM_AFTER_SIGN_IN_URL;
45
+ if (!redirectUrl) {
46
+ throw new Error(
47
+ "You must provide the NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL environment variable."
48
+ );
49
+ }
50
+ return /* @__PURE__ */ import_react.default.createElement(CabinIDContext.Provider, { value: { user, signInUrl } }, children);
51
+ };
52
+ // Annotate the CommonJS export names for ESM import in node:
53
+ 0 && (module.exports = {
54
+ CabinIDContext,
55
+ CabinIDProvider
56
+ });
57
+ //# sourceMappingURL=provider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/client/provider.tsx"],"sourcesContent":["import React from 'react';\nimport type { PropsWithChildren } from 'react';\nimport { CabinIDProviderProps, CabinIDUser } from '../types';\nimport { CUSTOM_AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport const CabinIDContext = React.createContext<CabinIDProviderProps>({\n signInUrl: '',\n user: null,\n});\n\nconst CabinIDProvider = ({ children }: PropsWithChildren<any>) => {\n const [user] = React.useState<CabinIDUser | null>(null);\n const signInUrl = frontendApi || '';\n\n const redirectUrl = CUSTOM_AFTER_SIGN_IN_URL;\n\n if (!redirectUrl) {\n throw new Error(\n 'You must provide the NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL environment variable.'\n );\n }\n\n return (\n <CabinIDContext.Provider value={{ user, signInUrl }}>\n {children}\n </CabinIDContext.Provider>\n );\n};\n\nexport { CabinIDProvider };\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAGlB,uBAAsD;AAE/C,MAAM,iBAAiB,aAAAA,QAAM,cAAoC;AAAA,EACtE,WAAW;AAAA,EACX,MAAM;AACR,CAAC;AAED,MAAM,kBAAkB,CAAC,EAAE,SAAS,MAA8B;AAChE,QAAM,CAAC,IAAI,IAAI,aAAAA,QAAM,SAA6B,IAAI;AACtD,QAAM,YAAY,gCAAe;AAEjC,QAAM,cAAc;AAEpB,MAAI,CAAC,aAAa;AAChB,UAAM,IAAI;AAAA,MACR;AAAA,IACF;AAAA,EACF;AAEA,SACE,6BAAAA,QAAA,cAAC,eAAe,UAAf,EAAwB,OAAO,EAAE,MAAM,UAAU,KAC/C,QACH;AAEJ;","names":["React"]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=component.client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":[],"sourcesContent":[],"mappings":"","names":[]}
@@ -0,0 +1,29 @@
1
+ "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 component_server_exports = {};
20
+ __export(component_server_exports, {
21
+ auth: () => import_auth.auth
22
+ });
23
+ module.exports = __toCommonJS(component_server_exports);
24
+ var import_auth = require("./server/auth");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ auth
28
+ });
29
+ //# sourceMappingURL=component.server.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/component.server.ts"],"sourcesContent":["export { auth } from './server/auth';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,kBAAqB;","names":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var SignInButton_exports = {};
30
+ __export(SignInButton_exports, {
31
+ SignInButton: () => SignInButton
32
+ });
33
+ module.exports = __toCommonJS(SignInButton_exports);
34
+ var import_react = __toESM(require("react"));
35
+ var import_logo = require("../icons/logo");
36
+ var import_constants = require("../constants");
37
+ const SignInButton = () => {
38
+ const signInUrl = import_react.default.useMemo(() => {
39
+ const params = new URLSearchParams({
40
+ redirect_url: import_constants.CUSTOM_AFTER_SIGN_IN_URL
41
+ });
42
+ return import_constants.frontendApi ? `http://${import_constants.frontendApi}/sign-in?${params.toString()}` : "#";
43
+ }, [import_constants.frontendApi, import_constants.CUSTOM_AFTER_SIGN_IN_URL]);
44
+ return /* @__PURE__ */ import_react.default.createElement(
45
+ "a",
46
+ {
47
+ href: signInUrl,
48
+ className: "max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700"
49
+ },
50
+ /* @__PURE__ */ import_react.default.createElement(import_logo.CabinLogo, null),
51
+ /* @__PURE__ */ import_react.default.createElement("span", { className: "text-white text-sm" }, "Continue to CabinID")
52
+ );
53
+ };
54
+ // Annotate the CommonJS export names for ESM import in node:
55
+ 0 && (module.exports = {
56
+ SignInButton
57
+ });
58
+ //# sourceMappingURL=SignInButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/SignInButton.tsx"],"sourcesContent":["import React from 'react';\nimport { CabinLogo } from '../icons/logo';\nimport { CUSTOM_AFTER_SIGN_IN_URL, frontendApi } from '../constants';\n\nexport const SignInButton = () => {\n const signInUrl = React.useMemo(() => {\n const params = new URLSearchParams({\n redirect_url: CUSTOM_AFTER_SIGN_IN_URL,\n });\n return frontendApi\n ? `http://${frontendApi}/sign-in?${params.toString()}`\n : '#';\n }, [frontendApi, CUSTOM_AFTER_SIGN_IN_URL]);\n\n return (\n <a\n href={signInUrl}\n className=\"max-w-48 pl-2 py-2 pr-4 bg-blue-600 rounded-full flex flex-row space-x-2 items-center hover:opacity-90 active:bg-blue-700\"\n >\n <CabinLogo />\n <span className=\"text-white text-sm\">Continue to CabinID</span>\n </a>\n );\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAClB,kBAA0B;AAC1B,uBAAsD;AAE/C,MAAM,eAAe,MAAM;AAChC,QAAM,YAAY,aAAAA,QAAM,QAAQ,MAAM;AACpC,UAAM,SAAS,IAAI,gBAAgB;AAAA,MACjC,cAAc;AAAA,IAChB,CAAC;AACD,WAAO,+BACH,UAAU,4BAAW,YAAY,OAAO,SAAS,CAAC,KAClD;AAAA,EACN,GAAG,CAAC,8BAAa,yCAAwB,CAAC;AAE1C,SACE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,MAAM;AAAA,MACN,WAAU;AAAA;AAAA,IAEV,6BAAAA,QAAA,cAAC,2BAAU;AAAA,IACX,6BAAAA,QAAA,cAAC,UAAK,WAAU,wBAAqB,qBAAmB;AAAA,EAC1D;AAEJ;","names":["React"]}
@@ -0,0 +1,29 @@
1
+ "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 components_exports = {};
20
+ __export(components_exports, {
21
+ SignInButton: () => import_SignInButton.SignInButton
22
+ });
23
+ module.exports = __toCommonJS(components_exports);
24
+ var import_SignInButton = require("./SignInButton");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ SignInButton
28
+ });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/index.ts"],"sourcesContent":["export { SignInButton } from './SignInButton';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,0BAA6B;","names":[]}
@@ -0,0 +1,121 @@
1
+ "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 constants_exports = {};
20
+ __export(constants_exports, {
21
+ API_URL: () => API_URL,
22
+ API_VERSION: () => API_VERSION,
23
+ CUSTOM_AFTER_SIGN_IN_URL: () => CUSTOM_AFTER_SIGN_IN_URL,
24
+ CUSTOM_AFTER_SIGN_UP_URL: () => CUSTOM_AFTER_SIGN_UP_URL,
25
+ CUSTOM_SIGN_IN_URL: () => CUSTOM_SIGN_IN_URL,
26
+ CUSTOM_SIGN_Up_URL: () => CUSTOM_SIGN_Up_URL,
27
+ PUBLISHABLE_KEY: () => PUBLISHABLE_KEY,
28
+ SECRET_KEY: () => SECRET_KEY,
29
+ baseApiUrl: () => baseApiUrl,
30
+ constants: () => constants,
31
+ frontendApi: () => frontendApi
32
+ });
33
+ module.exports = __toCommonJS(constants_exports);
34
+ var import_key = require("./utils/key");
35
+ var import_path = require("./utils/path");
36
+ const API_URL = "https://api.cabinid.dev/";
37
+ const API_VERSION = "v1";
38
+ const PUBLISHABLE_KEY = process.env.NEXT_PUBLIC_CABIN_ID_PUBLISH_KEY || "";
39
+ const SECRET_KEY = process.env.CABIN_ID_SECRET_KEY || "";
40
+ const CUSTOM_SIGN_IN_URL = process.env.NEXT_PUBLIC_CABIN_ID_SIGN_IN_URL || "";
41
+ const CUSTOM_SIGN_Up_URL = process.env.NEXT_PUBLIC_CABIN_ID_SIGN_UP_URL || "";
42
+ const CUSTOM_AFTER_SIGN_IN_URL = process.env.NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL || "";
43
+ const CUSTOM_AFTER_SIGN_UP_URL = process.env.NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_UP_URL || "";
44
+ const baseApiUrl = (0, import_path.joinPaths)(API_URL, API_VERSION);
45
+ const frontendApi = (0, import_key.parsePublishableKey)(PUBLISHABLE_KEY);
46
+ const Attributes = {
47
+ AuthToken: "__clerkAuthToken",
48
+ AuthSignature: "__clerkAuthSignature",
49
+ AuthStatus: "__clerkAuthStatus",
50
+ AuthReason: "__clerkAuthReason",
51
+ AuthMessage: "__clerkAuthMessage",
52
+ ClerkUrl: "__clerkUrl"
53
+ };
54
+ const Cookies = {
55
+ Session: "__session",
56
+ Client: "__client",
57
+ User: "__user"
58
+ };
59
+ const QueryParams = {
60
+ UserId: "user_id",
61
+ Token: "token"
62
+ };
63
+ const Headers = {
64
+ AuthToken: "x-cabin-id-auth-token",
65
+ AuthSignature: "x-cabin-id-auth-signature",
66
+ AuthStatus: "x-cabin-id-auth-status",
67
+ AuthReason: "x-cabin-id-auth-reason",
68
+ AuthMessage: "x-cabin-id-auth-message",
69
+ CabinIdUrl: "x-cabin-id-cabin-id-url",
70
+ EnableDebug: "x-cabin-id-debug",
71
+ CabinIdRedirectTo: "x-cabin-id-redirect-to",
72
+ CloudFrontForwardedProto: "cloudfront-forwarded-proto",
73
+ Authorization: "authorization",
74
+ ForwardedPort: "x-forwarded-port",
75
+ ForwardedProto: "x-forwarded-proto",
76
+ ForwardedHost: "x-forwarded-host",
77
+ Accept: "accept",
78
+ Referrer: "referer",
79
+ UserAgent: "user-agent",
80
+ Origin: "origin",
81
+ Host: "host",
82
+ ContentType: "content-type",
83
+ SecFetchDest: "sec-fetch-dest",
84
+ Location: "location"
85
+ };
86
+ const ContentTypes = {
87
+ Json: "application/json"
88
+ };
89
+ const NextHeaders = {
90
+ NextRewrite: "x-middleware-rewrite",
91
+ NextResume: "x-middleware-next",
92
+ NextRedirect: "Location",
93
+ // Used by next to identify internal navigation for app router
94
+ NextUrl: "next-url",
95
+ NextAction: "next-action",
96
+ // Used by next to identify internal navigation for pages router
97
+ NextjsData: "x-nextjs-data"
98
+ };
99
+ const constants = {
100
+ Attributes,
101
+ Cookies,
102
+ Headers,
103
+ ContentTypes,
104
+ QueryParams,
105
+ NextHeaders
106
+ };
107
+ // Annotate the CommonJS export names for ESM import in node:
108
+ 0 && (module.exports = {
109
+ API_URL,
110
+ API_VERSION,
111
+ CUSTOM_AFTER_SIGN_IN_URL,
112
+ CUSTOM_AFTER_SIGN_UP_URL,
113
+ CUSTOM_SIGN_IN_URL,
114
+ CUSTOM_SIGN_Up_URL,
115
+ PUBLISHABLE_KEY,
116
+ SECRET_KEY,
117
+ baseApiUrl,
118
+ constants,
119
+ frontendApi
120
+ });
121
+ //# sourceMappingURL=constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/constants.ts"],"sourcesContent":["import { parsePublishableKey } from './utils/key';\nimport { joinPaths } from './utils/path';\n\n/* The line `// export const API_URL = 'https://api.cabinid.dev/';` is a commented-out line of code in\nTypeScript. It is currently not active or being used in the code because it is preceded by `//`,\nwhich makes it a comment. */\nexport const API_URL = 'https://api.cabinid.dev/';\n// export const API_URL = 'http://localhost:3001/';\nexport const API_VERSION = 'v1';\nexport const PUBLISHABLE_KEY =\n process.env.NEXT_PUBLIC_CABIN_ID_PUBLISH_KEY! || '';\nexport const SECRET_KEY = process.env.CABIN_ID_SECRET_KEY! || '';\nexport const CUSTOM_SIGN_IN_URL =\n process.env.NEXT_PUBLIC_CABIN_ID_SIGN_IN_URL! || '';\nexport const CUSTOM_SIGN_Up_URL =\n process.env.NEXT_PUBLIC_CABIN_ID_SIGN_UP_URL! || '';\nexport const CUSTOM_AFTER_SIGN_IN_URL =\n process.env.NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL || '';\nexport const CUSTOM_AFTER_SIGN_UP_URL =\n process.env.NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_UP_URL || '';\n\nexport const baseApiUrl = joinPaths(API_URL, API_VERSION);\nexport const frontendApi = parsePublishableKey(PUBLISHABLE_KEY);\n\nconst Attributes = {\n AuthToken: '__clerkAuthToken',\n AuthSignature: '__clerkAuthSignature',\n AuthStatus: '__clerkAuthStatus',\n AuthReason: '__clerkAuthReason',\n AuthMessage: '__clerkAuthMessage',\n ClerkUrl: '__clerkUrl',\n} as const;\n\nconst Cookies = {\n Session: '__session',\n Client: '__client',\n User: '__user',\n} as const;\n\nconst QueryParams = {\n UserId: 'user_id',\n Token: 'token',\n} as const;\n\nconst Headers = {\n AuthToken: 'x-cabin-id-auth-token',\n AuthSignature: 'x-cabin-id-auth-signature',\n AuthStatus: 'x-cabin-id-auth-status',\n AuthReason: 'x-cabin-id-auth-reason',\n AuthMessage: 'x-cabin-id-auth-message',\n CabinIdUrl: 'x-cabin-id-cabin-id-url',\n EnableDebug: 'x-cabin-id-debug',\n CabinIdRedirectTo: 'x-cabin-id-redirect-to',\n CloudFrontForwardedProto: 'cloudfront-forwarded-proto',\n Authorization: 'authorization',\n ForwardedPort: 'x-forwarded-port',\n ForwardedProto: 'x-forwarded-proto',\n ForwardedHost: 'x-forwarded-host',\n Accept: 'accept',\n Referrer: 'referer',\n UserAgent: 'user-agent',\n Origin: 'origin',\n Host: 'host',\n ContentType: 'content-type',\n SecFetchDest: 'sec-fetch-dest',\n Location: 'location',\n} as const;\n\nconst ContentTypes = {\n Json: 'application/json',\n} as const;\n\nconst NextHeaders = {\n NextRewrite: 'x-middleware-rewrite',\n NextResume: 'x-middleware-next',\n NextRedirect: 'Location',\n // Used by next to identify internal navigation for app router\n NextUrl: 'next-url',\n NextAction: 'next-action',\n // Used by next to identify internal navigation for pages router\n NextjsData: 'x-nextjs-data',\n} as const;\n\n/**\n * @internal\n */\nexport const constants = {\n Attributes,\n Cookies,\n Headers,\n ContentTypes,\n QueryParams,\n NextHeaders,\n} as const;\n\nexport type Constants = typeof constants;\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,iBAAoC;AACpC,kBAA0B;AAKnB,MAAM,UAAU;AAEhB,MAAM,cAAc;AACpB,MAAM,kBACX,QAAQ,IAAI,oCAAqC;AAC5C,MAAM,aAAa,QAAQ,IAAI,uBAAwB;AACvD,MAAM,qBACX,QAAQ,IAAI,oCAAqC;AAC5C,MAAM,qBACX,QAAQ,IAAI,oCAAqC;AAC5C,MAAM,2BACX,QAAQ,IAAI,0CAA0C;AACjD,MAAM,2BACX,QAAQ,IAAI,0CAA0C;AAEjD,MAAM,iBAAa,uBAAU,SAAS,WAAW;AACjD,MAAM,kBAAc,gCAAoB,eAAe;AAE9D,MAAM,aAAa;AAAA,EACjB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,UAAU;AACZ;AAEA,MAAM,UAAU;AAAA,EACd,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,MAAM;AACR;AAEA,MAAM,cAAc;AAAA,EAClB,QAAQ;AAAA,EACR,OAAO;AACT;AAEA,MAAM,UAAU;AAAA,EACd,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,mBAAmB;AAAA,EACnB,0BAA0B;AAAA,EAC1B,eAAe;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,eAAe;AAAA,EACf,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,WAAW;AAAA,EACX,QAAQ;AAAA,EACR,MAAM;AAAA,EACN,aAAa;AAAA,EACb,cAAc;AAAA,EACd,UAAU;AACZ;AAEA,MAAM,eAAe;AAAA,EACnB,MAAM;AACR;AAEA,MAAM,cAAc;AAAA,EAClB,aAAa;AAAA,EACb,YAAY;AAAA,EACZ,cAAc;AAAA;AAAA,EAEd,SAAS;AAAA,EACT,YAAY;AAAA;AAAA,EAEZ,YAAY;AACd;AAKO,MAAM,YAAY;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
@@ -0,0 +1,17 @@
1
+ "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 __copyProps = (to, from, except, desc) => {
7
+ if (from && typeof from === "object" || typeof from === "function") {
8
+ for (let key of __getOwnPropNames(from))
9
+ if (!__hasOwnProp.call(to, key) && key !== except)
10
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
11
+ }
12
+ return to;
13
+ };
14
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
15
+ var global_d_exports = {};
16
+ module.exports = __toCommonJS(global_d_exports);
17
+ //# sourceMappingURL=global.d.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/global.d.ts"],"sourcesContent":["declare global {\n namespace NodeJS {\n interface ProcessEnv {\n CABIN_ID_SECRET_KEY: string | undefined;\n NEXT_PUBLIC_CABIN_ID_PUBLISH_KEY: string | undefined;\n NEXT_PUBLIC_CABIN_ID_SIGN_IN_URL: string | undefined;\n NEXT_PUBLIC_CABIN_ID_SIGN_UP_URL: string | undefined;\n NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_IN_URL: string | undefined;\n NEXT_PUBLIC_CABIN_ID_AFTER_SIGN_UP_URL: string | undefined;\n }\n }\n}\n\nexport {};\n"],"mappings":";;;;;;;;;;;;;;AAAA;AAAA;","names":[]}
@@ -0,0 +1,29 @@
1
+ "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 hooks_exports = {};
20
+ __export(hooks_exports, {
21
+ useUser: () => import_useUser.useUser
22
+ });
23
+ module.exports = __toCommonJS(hooks_exports);
24
+ var import_useUser = require("./useUser");
25
+ // Annotate the CommonJS export names for ESM import in node:
26
+ 0 && (module.exports = {
27
+ useUser
28
+ });
29
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/hooks/index.ts"],"sourcesContent":["export { useUser } from './useUser';\n"],"mappings":";;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,qBAAwB;","names":[]}
@@ -0,0 +1,48 @@
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 useUser_exports = {};
31
+ __export(useUser_exports, {
32
+ useUser: () => useUser
33
+ });
34
+ module.exports = __toCommonJS(useUser_exports);
35
+ var import_react = __toESM(require("react"));
36
+ var import_provider = require("../client/provider");
37
+ const useUser = () => {
38
+ const useCabinIDContext = import_react.default.useContext(import_provider.CabinIDContext);
39
+ if (!useCabinIDContext) {
40
+ throw new Error("Please wrap your app with CabinID Provider");
41
+ }
42
+ return useCabinIDContext.user;
43
+ };
44
+ // Annotate the CommonJS export names for ESM import in node:
45
+ 0 && (module.exports = {
46
+ useUser
47
+ });
48
+ //# sourceMappingURL=useUser.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/hooks/useUser.ts"],"sourcesContent":["'use client';\n\nimport React from 'react';\nimport { CabinIDContext } from '../client/provider';\n\nexport const useUser = () => {\n const useCabinIDContext = React.useContext(CabinIDContext);\n if (!useCabinIDContext) {\n throw new Error('Please wrap your app with CabinID Provider');\n }\n return useCabinIDContext.user;\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAEA,mBAAkB;AAClB,sBAA+B;AAExB,MAAM,UAAU,MAAM;AAC3B,QAAM,oBAAoB,aAAAA,QAAM,WAAW,8BAAc;AACzD,MAAI,CAAC,mBAAmB;AACtB,UAAM,IAAI,MAAM,4CAA4C;AAAA,EAC9D;AACA,SAAO,kBAAkB;AAC3B;","names":["React"]}
@@ -0,0 +1,98 @@
1
+ "use strict";
2
+ var __create = Object.create;
3
+ var __defProp = Object.defineProperty;
4
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
+ var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getProtoOf = Object.getPrototypeOf;
7
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
8
+ var __export = (target, all) => {
9
+ for (var name in all)
10
+ __defProp(target, name, { get: all[name], enumerable: true });
11
+ };
12
+ var __copyProps = (to, from, except, desc) => {
13
+ if (from && typeof from === "object" || typeof from === "function") {
14
+ for (let key of __getOwnPropNames(from))
15
+ if (!__hasOwnProp.call(to, key) && key !== except)
16
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
17
+ }
18
+ return to;
19
+ };
20
+ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
21
+ // If the importer is in node compatibility mode or this is not an ESM
22
+ // file that has been converted to a CommonJS file using a Babel-
23
+ // compatible transform (i.e. "__esModule" has not been set), then set
24
+ // "default" to the CommonJS "module.exports" for node compatibility.
25
+ isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
26
+ mod
27
+ ));
28
+ var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
29
+ var logo_exports = {};
30
+ __export(logo_exports, {
31
+ CabinLogo: () => CabinLogo
32
+ });
33
+ module.exports = __toCommonJS(logo_exports);
34
+ var import_react = __toESM(require("react"));
35
+ const CabinLogo = (props) => /* @__PURE__ */ import_react.default.createElement(
36
+ "svg",
37
+ {
38
+ width: 24,
39
+ height: 25,
40
+ viewBox: "0 0 24 25",
41
+ fill: "none",
42
+ xmlns: "http://www.w3.org/2000/svg",
43
+ ...props
44
+ },
45
+ /* @__PURE__ */ import_react.default.createElement("path", { d: "M24 12.816q0 12-12 12t-12-12 12-12 12 12", fill: "url(#a)" }),
46
+ /* @__PURE__ */ import_react.default.createElement(
47
+ "mask",
48
+ {
49
+ id: "c",
50
+ style: {
51
+ maskType: "alpha"
52
+ },
53
+ maskUnits: "userSpaceOnUse",
54
+ x: 0,
55
+ y: 0,
56
+ width: 24,
57
+ height: 25
58
+ },
59
+ /* @__PURE__ */ import_react.default.createElement("path", { d: "M24 12.816q0 12-12 12t-12-12 12-12 12 12", fill: "url(#b)" })
60
+ ),
61
+ /* @__PURE__ */ import_react.default.createElement("g", { mask: "url(#c)" }, /* @__PURE__ */ import_react.default.createElement(
62
+ "path",
63
+ {
64
+ d: "M12.274 19.263q-2.97 0-4.853-1.79t-1.882-4.67q0-2.892 1.87-4.67 1.883-1.779 4.865-1.779 2.42 0 4.071 1.198t2.103 3.376l-3.252.35q-.281-1.089-1.051-1.633-.771-.544-1.907-.544-1.419 0-2.299 1.016t-.88 2.686q0 1.657.88 2.686.88 1.016 2.299 1.016 1.138 0 1.894-.544.77-.546 1.064-1.634l3.252.251c-.302 1.444-1.01 2.669-2.127 3.476q-1.663 1.21-4.047 1.21",
65
+ fill: "#1F5AF5"
66
+ }
67
+ )),
68
+ /* @__PURE__ */ import_react.default.createElement("defs", null, /* @__PURE__ */ import_react.default.createElement(
69
+ "linearGradient",
70
+ {
71
+ id: "a",
72
+ x1: 8.282,
73
+ y1: 15.013,
74
+ x2: 13.252,
75
+ y2: 30.181,
76
+ gradientUnits: "userSpaceOnUse"
77
+ },
78
+ /* @__PURE__ */ import_react.default.createElement("stop", { stopColor: "#fff" }),
79
+ /* @__PURE__ */ import_react.default.createElement("stop", { offset: 1, stopColor: "#fff", stopOpacity: 0 })
80
+ ), /* @__PURE__ */ import_react.default.createElement(
81
+ "linearGradient",
82
+ {
83
+ id: "b",
84
+ x1: 8.282,
85
+ y1: 15.013,
86
+ x2: 13.252,
87
+ y2: 30.181,
88
+ gradientUnits: "userSpaceOnUse"
89
+ },
90
+ /* @__PURE__ */ import_react.default.createElement("stop", { stopColor: "#fff" }),
91
+ /* @__PURE__ */ import_react.default.createElement("stop", { offset: 1, stopColor: "#fff", stopOpacity: 0 })
92
+ ))
93
+ );
94
+ // Annotate the CommonJS export names for ESM import in node:
95
+ 0 && (module.exports = {
96
+ CabinLogo
97
+ });
98
+ //# sourceMappingURL=logo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/icons/logo.tsx"],"sourcesContent":["import React from 'react';\n\nexport const CabinLogo: React.FC<React.SVGProps<SVGSVGElement>> = (props) => (\n <svg\n width={24}\n height={25}\n viewBox=\"0 0 24 25\"\n fill=\"none\"\n xmlns=\"http://www.w3.org/2000/svg\"\n {...props}\n >\n <path d=\"M24 12.816q0 12-12 12t-12-12 12-12 12 12\" fill=\"url(#a)\" />\n <mask\n id=\"c\"\n style={{\n maskType: 'alpha',\n }}\n maskUnits=\"userSpaceOnUse\"\n x={0}\n y={0}\n width={24}\n height={25}\n >\n <path d=\"M24 12.816q0 12-12 12t-12-12 12-12 12 12\" fill=\"url(#b)\" />\n </mask>\n <g mask=\"url(#c)\">\n <path\n d=\"M12.274 19.263q-2.97 0-4.853-1.79t-1.882-4.67q0-2.892 1.87-4.67 1.883-1.779 4.865-1.779 2.42 0 4.071 1.198t2.103 3.376l-3.252.35q-.281-1.089-1.051-1.633-.771-.544-1.907-.544-1.419 0-2.299 1.016t-.88 2.686q0 1.657.88 2.686.88 1.016 2.299 1.016 1.138 0 1.894-.544.77-.546 1.064-1.634l3.252.251c-.302 1.444-1.01 2.669-2.127 3.476q-1.663 1.21-4.047 1.21\"\n fill=\"#1F5AF5\"\n />\n </g>\n <defs>\n <linearGradient\n id=\"a\"\n x1={8.282}\n y1={15.013}\n x2={13.252}\n y2={30.181}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#fff\" />\n <stop offset={1} stopColor=\"#fff\" stopOpacity={0} />\n </linearGradient>\n <linearGradient\n id=\"b\"\n x1={8.282}\n y1={15.013}\n x2={13.252}\n y2={30.181}\n gradientUnits=\"userSpaceOnUse\"\n >\n <stop stopColor=\"#fff\" />\n <stop offset={1} stopColor=\"#fff\" stopOpacity={0} />\n </linearGradient>\n </defs>\n </svg>\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBAAkB;AAEX,MAAM,YAAqD,CAAC,UACjE,6BAAAA,QAAA;AAAA,EAAC;AAAA;AAAA,IACC,OAAO;AAAA,IACP,QAAQ;AAAA,IACR,SAAQ;AAAA,IACR,MAAK;AAAA,IACL,OAAM;AAAA,IACL,GAAG;AAAA;AAAA,EAEJ,6BAAAA,QAAA,cAAC,UAAK,GAAE,4CAA2C,MAAK,WAAU;AAAA,EAClE,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,OAAO;AAAA,QACL,UAAU;AAAA,MACZ;AAAA,MACA,WAAU;AAAA,MACV,GAAG;AAAA,MACH,GAAG;AAAA,MACH,OAAO;AAAA,MACP,QAAQ;AAAA;AAAA,IAER,6BAAAA,QAAA,cAAC,UAAK,GAAE,4CAA2C,MAAK,WAAU;AAAA,EACpE;AAAA,EACA,6BAAAA,QAAA,cAAC,OAAE,MAAK,aACN,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,GAAE;AAAA,MACF,MAAK;AAAA;AAAA,EACP,CACF;AAAA,EACA,6BAAAA,QAAA,cAAC,cACC,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,eAAc;AAAA;AAAA,IAEd,6BAAAA,QAAA,cAAC,UAAK,WAAU,QAAO;AAAA,IACvB,6BAAAA,QAAA,cAAC,UAAK,QAAQ,GAAG,WAAU,QAAO,aAAa,GAAG;AAAA,EACpD,GACA,6BAAAA,QAAA;AAAA,IAAC;AAAA;AAAA,MACC,IAAG;AAAA,MACH,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,IAAI;AAAA,MACJ,eAAc;AAAA;AAAA,IAEd,6BAAAA,QAAA,cAAC,UAAK,WAAU,QAAO;AAAA,IACvB,6BAAAA,QAAA,cAAC,UAAK,QAAQ,GAAG,WAAU,QAAO,aAAa,GAAG;AAAA,EACpD,CACF;AACF;","names":["React"]}
@@ -0,0 +1,44 @@
1
+ "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 src_exports = {};
20
+ __export(src_exports, {
21
+ CabinIDProvider: () => import_provider.CabinIDProvider,
22
+ SignInButton: () => import_components.SignInButton,
23
+ auth: () => import_auth.auth,
24
+ authMiddleware: () => import_middleware.authMiddleware,
25
+ currentUser: () => import_getCurrentUser.currentUser,
26
+ useUser: () => import_hooks.useUser
27
+ });
28
+ module.exports = __toCommonJS(src_exports);
29
+ var import_auth = require("./server/auth");
30
+ var import_getCurrentUser = require("./server/getCurrentUser");
31
+ var import_provider = require("./client/provider");
32
+ var import_hooks = require("./hooks");
33
+ var import_middleware = require("./server/middleware");
34
+ var import_components = require("./components");
35
+ // Annotate the CommonJS export names for ESM import in node:
36
+ 0 && (module.exports = {
37
+ CabinIDProvider,
38
+ SignInButton,
39
+ auth,
40
+ authMiddleware,
41
+ currentUser,
42
+ useUser
43
+ });
44
+ //# sourceMappingURL=index.js.map
@@ -0,0 +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 './client/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;AAEA,kBAAqB;AACrB,4BAA4B;AAC5B,sBAAgC;AAChC,mBAAwB;AACxB,wBAA+B;AAC/B,wBAA6B;","names":[]}