@clerk/react 5.54.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/LICENSE +21 -0
- package/README.md +71 -0
- package/dist/chunk-KLK6ZMZX.mjs +1011 -0
- package/dist/chunk-KLK6ZMZX.mjs.map +1 -0
- package/dist/chunk-MB46WFKC.mjs +28 -0
- package/dist/chunk-MB46WFKC.mjs.map +1 -0
- package/dist/chunk-OANWQR3B.mjs +16 -0
- package/dist/chunk-OANWQR3B.mjs.map +1 -0
- package/dist/chunk-PS5BRRRD.mjs +282 -0
- package/dist/chunk-PS5BRRRD.mjs.map +1 -0
- package/dist/chunk-Z2DSM5QN.mjs +171 -0
- package/dist/chunk-Z2DSM5QN.mjs.map +1 -0
- package/dist/errors.d.mts +1 -0
- package/dist/errors.d.ts +1 -0
- package/dist/errors.js +45 -0
- package/dist/errors.js.map +1 -0
- package/dist/errors.mjs +24 -0
- package/dist/errors.mjs.map +1 -0
- package/dist/experimental.d.mts +125 -0
- package/dist/experimental.d.ts +125 -0
- package/dist/experimental.js +1301 -0
- package/dist/experimental.js.map +1 -0
- package/dist/experimental.mjs +164 -0
- package/dist/experimental.mjs.map +1 -0
- package/dist/index.d.mts +217 -0
- package/dist/index.d.ts +217 -0
- package/dist/index.js +3304 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +1940 -0
- package/dist/index.mjs.map +1 -0
- package/dist/internal.d.mts +18 -0
- package/dist/internal.d.ts +18 -0
- package/dist/internal.js +260 -0
- package/dist/internal.js.map +1 -0
- package/dist/internal.mjs +58 -0
- package/dist/internal.mjs.map +1 -0
- package/dist/legacy.d.mts +95 -0
- package/dist/legacy.d.ts +95 -0
- package/dist/legacy.js +90 -0
- package/dist/legacy.js.map +1 -0
- package/dist/legacy.mjs +48 -0
- package/dist/legacy.mjs.map +1 -0
- package/dist/types-BS-xjOf_.d.mts +77 -0
- package/dist/types-BS-xjOf_.d.ts +77 -0
- package/dist/useAuth-CibrZ7p3.d.mts +182 -0
- package/dist/useAuth-yh0dHssU.d.ts +182 -0
- package/package.json +116 -0
|
@@ -0,0 +1,171 @@
|
|
|
1
|
+
import {
|
|
2
|
+
useAuth,
|
|
3
|
+
withClerk
|
|
4
|
+
} from "./chunk-PS5BRRRD.mjs";
|
|
5
|
+
import {
|
|
6
|
+
useAssertWrappedByClerkProvider,
|
|
7
|
+
useIsomorphicClerkContext
|
|
8
|
+
} from "./chunk-MB46WFKC.mjs";
|
|
9
|
+
|
|
10
|
+
// src/components/controlComponents.tsx
|
|
11
|
+
import { deprecated } from "@clerk/shared/deprecated";
|
|
12
|
+
import React from "react";
|
|
13
|
+
|
|
14
|
+
// src/contexts/SessionContext.tsx
|
|
15
|
+
import { SessionContext, useSessionContext } from "@clerk/shared/react";
|
|
16
|
+
|
|
17
|
+
// src/components/controlComponents.tsx
|
|
18
|
+
var SignedIn = ({ children, treatPendingAsSignedOut }) => {
|
|
19
|
+
useAssertWrappedByClerkProvider("SignedIn");
|
|
20
|
+
const { userId } = useAuth({ treatPendingAsSignedOut });
|
|
21
|
+
if (userId) {
|
|
22
|
+
return children;
|
|
23
|
+
}
|
|
24
|
+
return null;
|
|
25
|
+
};
|
|
26
|
+
var SignedOut = ({ children, treatPendingAsSignedOut }) => {
|
|
27
|
+
useAssertWrappedByClerkProvider("SignedOut");
|
|
28
|
+
const { userId } = useAuth({ treatPendingAsSignedOut });
|
|
29
|
+
if (userId === null) {
|
|
30
|
+
return children;
|
|
31
|
+
}
|
|
32
|
+
return null;
|
|
33
|
+
};
|
|
34
|
+
var ClerkLoaded = ({ children }) => {
|
|
35
|
+
useAssertWrappedByClerkProvider("ClerkLoaded");
|
|
36
|
+
const isomorphicClerk = useIsomorphicClerkContext();
|
|
37
|
+
if (!isomorphicClerk.loaded) {
|
|
38
|
+
return null;
|
|
39
|
+
}
|
|
40
|
+
return children;
|
|
41
|
+
};
|
|
42
|
+
var ClerkLoading = ({ children }) => {
|
|
43
|
+
useAssertWrappedByClerkProvider("ClerkLoading");
|
|
44
|
+
const isomorphicClerk = useIsomorphicClerkContext();
|
|
45
|
+
if (isomorphicClerk.status !== "loading") {
|
|
46
|
+
return null;
|
|
47
|
+
}
|
|
48
|
+
return children;
|
|
49
|
+
};
|
|
50
|
+
var ClerkFailed = ({ children }) => {
|
|
51
|
+
useAssertWrappedByClerkProvider("ClerkFailed");
|
|
52
|
+
const isomorphicClerk = useIsomorphicClerkContext();
|
|
53
|
+
if (isomorphicClerk.status !== "error") {
|
|
54
|
+
return null;
|
|
55
|
+
}
|
|
56
|
+
return children;
|
|
57
|
+
};
|
|
58
|
+
var ClerkDegraded = ({ children }) => {
|
|
59
|
+
useAssertWrappedByClerkProvider("ClerkDegraded");
|
|
60
|
+
const isomorphicClerk = useIsomorphicClerkContext();
|
|
61
|
+
if (isomorphicClerk.status !== "degraded") {
|
|
62
|
+
return null;
|
|
63
|
+
}
|
|
64
|
+
return children;
|
|
65
|
+
};
|
|
66
|
+
var Protect = ({ children, fallback, treatPendingAsSignedOut, ...restAuthorizedParams }) => {
|
|
67
|
+
useAssertWrappedByClerkProvider("Protect");
|
|
68
|
+
const { isLoaded, has, userId } = useAuth({ treatPendingAsSignedOut });
|
|
69
|
+
if (!isLoaded) {
|
|
70
|
+
return null;
|
|
71
|
+
}
|
|
72
|
+
const unauthorized = fallback != null ? fallback : null;
|
|
73
|
+
const authorized = children;
|
|
74
|
+
if (!userId) {
|
|
75
|
+
return unauthorized;
|
|
76
|
+
}
|
|
77
|
+
if (typeof restAuthorizedParams.condition === "function") {
|
|
78
|
+
if (restAuthorizedParams.condition(has)) {
|
|
79
|
+
return authorized;
|
|
80
|
+
}
|
|
81
|
+
return unauthorized;
|
|
82
|
+
}
|
|
83
|
+
if (restAuthorizedParams.role || restAuthorizedParams.permission || restAuthorizedParams.feature || restAuthorizedParams.plan) {
|
|
84
|
+
if (has(restAuthorizedParams)) {
|
|
85
|
+
return authorized;
|
|
86
|
+
}
|
|
87
|
+
return unauthorized;
|
|
88
|
+
}
|
|
89
|
+
return authorized;
|
|
90
|
+
};
|
|
91
|
+
var RedirectToSignIn = withClerk(({ clerk, ...props }) => {
|
|
92
|
+
const { client, session } = clerk;
|
|
93
|
+
const hasSignedInSessions = client.signedInSessions ? client.signedInSessions.length > 0 : (
|
|
94
|
+
// Compat for clerk-js<5.54.0 (which was released with the `signedInSessions` property)
|
|
95
|
+
client.activeSessions && client.activeSessions.length > 0
|
|
96
|
+
);
|
|
97
|
+
React.useEffect(() => {
|
|
98
|
+
if (session === null && hasSignedInSessions) {
|
|
99
|
+
void clerk.redirectToAfterSignOut();
|
|
100
|
+
} else {
|
|
101
|
+
void clerk.redirectToSignIn(props);
|
|
102
|
+
}
|
|
103
|
+
}, []);
|
|
104
|
+
return null;
|
|
105
|
+
}, "RedirectToSignIn");
|
|
106
|
+
var RedirectToSignUp = withClerk(({ clerk, ...props }) => {
|
|
107
|
+
React.useEffect(() => {
|
|
108
|
+
void clerk.redirectToSignUp(props);
|
|
109
|
+
}, []);
|
|
110
|
+
return null;
|
|
111
|
+
}, "RedirectToSignUp");
|
|
112
|
+
var RedirectToTasks = withClerk(({ clerk, ...props }) => {
|
|
113
|
+
React.useEffect(() => {
|
|
114
|
+
void clerk.redirectToTasks(props);
|
|
115
|
+
}, []);
|
|
116
|
+
return null;
|
|
117
|
+
}, "RedirectToTasks");
|
|
118
|
+
var RedirectToUserProfile = withClerk(({ clerk }) => {
|
|
119
|
+
React.useEffect(() => {
|
|
120
|
+
deprecated("RedirectToUserProfile", "Use the `redirectToUserProfile()` method instead.");
|
|
121
|
+
void clerk.redirectToUserProfile();
|
|
122
|
+
}, []);
|
|
123
|
+
return null;
|
|
124
|
+
}, "RedirectToUserProfile");
|
|
125
|
+
var RedirectToOrganizationProfile = withClerk(({ clerk }) => {
|
|
126
|
+
React.useEffect(() => {
|
|
127
|
+
deprecated("RedirectToOrganizationProfile", "Use the `redirectToOrganizationProfile()` method instead.");
|
|
128
|
+
void clerk.redirectToOrganizationProfile();
|
|
129
|
+
}, []);
|
|
130
|
+
return null;
|
|
131
|
+
}, "RedirectToOrganizationProfile");
|
|
132
|
+
var RedirectToCreateOrganization = withClerk(({ clerk }) => {
|
|
133
|
+
React.useEffect(() => {
|
|
134
|
+
deprecated("RedirectToCreateOrganization", "Use the `redirectToCreateOrganization()` method instead.");
|
|
135
|
+
void clerk.redirectToCreateOrganization();
|
|
136
|
+
}, []);
|
|
137
|
+
return null;
|
|
138
|
+
}, "RedirectToCreateOrganization");
|
|
139
|
+
var AuthenticateWithRedirectCallback = withClerk(
|
|
140
|
+
({ clerk, ...handleRedirectCallbackParams }) => {
|
|
141
|
+
React.useEffect(() => {
|
|
142
|
+
void clerk.handleRedirectCallback(handleRedirectCallbackParams);
|
|
143
|
+
}, []);
|
|
144
|
+
return null;
|
|
145
|
+
},
|
|
146
|
+
"AuthenticateWithRedirectCallback"
|
|
147
|
+
);
|
|
148
|
+
var MultisessionAppSupport = ({ children }) => {
|
|
149
|
+
useAssertWrappedByClerkProvider("MultisessionAppSupport");
|
|
150
|
+
const session = useSessionContext();
|
|
151
|
+
return /* @__PURE__ */ React.createElement(React.Fragment, { key: session ? session.id : "no-users" }, children);
|
|
152
|
+
};
|
|
153
|
+
|
|
154
|
+
export {
|
|
155
|
+
SignedIn,
|
|
156
|
+
SignedOut,
|
|
157
|
+
ClerkLoaded,
|
|
158
|
+
ClerkLoading,
|
|
159
|
+
ClerkFailed,
|
|
160
|
+
ClerkDegraded,
|
|
161
|
+
Protect,
|
|
162
|
+
RedirectToSignIn,
|
|
163
|
+
RedirectToSignUp,
|
|
164
|
+
RedirectToTasks,
|
|
165
|
+
RedirectToUserProfile,
|
|
166
|
+
RedirectToOrganizationProfile,
|
|
167
|
+
RedirectToCreateOrganization,
|
|
168
|
+
AuthenticateWithRedirectCallback,
|
|
169
|
+
MultisessionAppSupport
|
|
170
|
+
};
|
|
171
|
+
//# sourceMappingURL=chunk-Z2DSM5QN.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/components/controlComponents.tsx","../src/contexts/SessionContext.tsx"],"sourcesContent":["import { deprecated } from '@clerk/shared/deprecated';\nimport type {\n HandleOAuthCallbackParams,\n PendingSessionOptions,\n ProtectProps as _ProtectProps,\n} from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useIsomorphicClerkContext } from '../contexts/IsomorphicClerkContext';\nimport { useSessionContext } from '../contexts/SessionContext';\nimport { useAuth } from '../hooks';\nimport { useAssertWrappedByClerkProvider } from '../hooks/useAssertWrappedByClerkProvider';\nimport type { RedirectToSignInProps, RedirectToSignUpProps, RedirectToTasksProps, WithClerkProp } from '../types';\nimport { withClerk } from './withClerk';\n\nexport const SignedIn = ({ children, treatPendingAsSignedOut }: React.PropsWithChildren<PendingSessionOptions>) => {\n useAssertWrappedByClerkProvider('SignedIn');\n\n const { userId } = useAuth({ treatPendingAsSignedOut });\n if (userId) {\n return children;\n }\n return null;\n};\n\nexport const SignedOut = ({ children, treatPendingAsSignedOut }: React.PropsWithChildren<PendingSessionOptions>) => {\n useAssertWrappedByClerkProvider('SignedOut');\n\n const { userId } = useAuth({ treatPendingAsSignedOut });\n if (userId === null) {\n return children;\n }\n return null;\n};\n\nexport const ClerkLoaded = ({ children }: React.PropsWithChildren<unknown>) => {\n useAssertWrappedByClerkProvider('ClerkLoaded');\n\n const isomorphicClerk = useIsomorphicClerkContext();\n if (!isomorphicClerk.loaded) {\n return null;\n }\n return children;\n};\n\nexport const ClerkLoading = ({ children }: React.PropsWithChildren<unknown>) => {\n useAssertWrappedByClerkProvider('ClerkLoading');\n\n const isomorphicClerk = useIsomorphicClerkContext();\n if (isomorphicClerk.status !== 'loading') {\n return null;\n }\n return children;\n};\n\nexport const ClerkFailed = ({ children }: React.PropsWithChildren<unknown>) => {\n useAssertWrappedByClerkProvider('ClerkFailed');\n\n const isomorphicClerk = useIsomorphicClerkContext();\n if (isomorphicClerk.status !== 'error') {\n return null;\n }\n return children;\n};\n\nexport const ClerkDegraded = ({ children }: React.PropsWithChildren<unknown>) => {\n useAssertWrappedByClerkProvider('ClerkDegraded');\n\n const isomorphicClerk = useIsomorphicClerkContext();\n if (isomorphicClerk.status !== 'degraded') {\n return null;\n }\n return children;\n};\n\nexport type ProtectProps = React.PropsWithChildren<\n _ProtectProps & {\n fallback?: React.ReactNode;\n } & PendingSessionOptions\n>;\n\n/**\n * Use `<Protect/>` in order to prevent unauthenticated or unauthorized users from accessing the children passed to the component.\n *\n * Examples:\n * ```\n * <Protect permission=\"a_permission_key\" />\n * <Protect role=\"a_role_key\" />\n * <Protect condition={(has) => has({permission:\"a_permission_key\"})} />\n * <Protect condition={(has) => has({role:\"a_role_key\"})} />\n * <Protect fallback={<p>Unauthorized</p>} />\n * ```\n */\nexport const Protect = ({ children, fallback, treatPendingAsSignedOut, ...restAuthorizedParams }: ProtectProps) => {\n useAssertWrappedByClerkProvider('Protect');\n\n const { isLoaded, has, userId } = useAuth({ treatPendingAsSignedOut });\n\n /**\n * Avoid flickering children or fallback while clerk is loading sessionId or userId\n */\n if (!isLoaded) {\n return null;\n }\n\n /**\n * Fallback to UI provided by user or `null` if authorization checks failed\n */\n const unauthorized = fallback ?? null;\n\n const authorized = children;\n\n if (!userId) {\n return unauthorized;\n }\n\n /**\n * Check against the results of `has` called inside the callback\n */\n if (typeof restAuthorizedParams.condition === 'function') {\n if (restAuthorizedParams.condition(has)) {\n return authorized;\n }\n return unauthorized;\n }\n\n if (\n restAuthorizedParams.role ||\n restAuthorizedParams.permission ||\n restAuthorizedParams.feature ||\n restAuthorizedParams.plan\n ) {\n if (has(restAuthorizedParams)) {\n return authorized;\n }\n return unauthorized;\n }\n\n /**\n * If neither of the authorization params are passed behave as the `<SignedIn/>`.\n * If fallback is present render that instead of rendering nothing.\n */\n return authorized;\n};\n\nexport const RedirectToSignIn = withClerk(({ clerk, ...props }: WithClerkProp<RedirectToSignInProps>) => {\n const { client, session } = clerk;\n\n const hasSignedInSessions = client.signedInSessions\n ? client.signedInSessions.length > 0\n : // Compat for clerk-js<5.54.0 (which was released with the `signedInSessions` property)\n client.activeSessions && client.activeSessions.length > 0;\n\n React.useEffect(() => {\n if (session === null && hasSignedInSessions) {\n void clerk.redirectToAfterSignOut();\n } else {\n void clerk.redirectToSignIn(props);\n }\n }, []);\n\n return null;\n}, 'RedirectToSignIn');\n\nexport const RedirectToSignUp = withClerk(({ clerk, ...props }: WithClerkProp<RedirectToSignUpProps>) => {\n React.useEffect(() => {\n void clerk.redirectToSignUp(props);\n }, []);\n\n return null;\n}, 'RedirectToSignUp');\n\nexport const RedirectToTasks = withClerk(({ clerk, ...props }: WithClerkProp<RedirectToTasksProps>) => {\n React.useEffect(() => {\n void clerk.redirectToTasks(props);\n }, []);\n\n return null;\n}, 'RedirectToTasks');\n\n/**\n * @function\n * @deprecated Use [`redirectToUserProfile()`](https://clerk.com/docs/reference/javascript/clerk#redirect-to-user-profile) instead.\n */\nexport const RedirectToUserProfile = withClerk(({ clerk }) => {\n React.useEffect(() => {\n deprecated('RedirectToUserProfile', 'Use the `redirectToUserProfile()` method instead.');\n void clerk.redirectToUserProfile();\n }, []);\n\n return null;\n}, 'RedirectToUserProfile');\n\n/**\n * @function\n * @deprecated Use [`redirectToOrganizationProfile()`](https://clerk.com/docs/reference/javascript/clerk#redirect-to-organization-profile) instead.\n */\nexport const RedirectToOrganizationProfile = withClerk(({ clerk }) => {\n React.useEffect(() => {\n deprecated('RedirectToOrganizationProfile', 'Use the `redirectToOrganizationProfile()` method instead.');\n void clerk.redirectToOrganizationProfile();\n }, []);\n\n return null;\n}, 'RedirectToOrganizationProfile');\n\n/**\n * @function\n * @deprecated Use [`redirectToCreateOrganization()`](https://clerk.com/docs/reference/javascript/clerk#redirect-to-create-organization) instead.\n */\nexport const RedirectToCreateOrganization = withClerk(({ clerk }) => {\n React.useEffect(() => {\n deprecated('RedirectToCreateOrganization', 'Use the `redirectToCreateOrganization()` method instead.');\n void clerk.redirectToCreateOrganization();\n }, []);\n\n return null;\n}, 'RedirectToCreateOrganization');\n\nexport const AuthenticateWithRedirectCallback = withClerk(\n ({ clerk, ...handleRedirectCallbackParams }: WithClerkProp<HandleOAuthCallbackParams>) => {\n React.useEffect(() => {\n void clerk.handleRedirectCallback(handleRedirectCallbackParams);\n }, []);\n\n return null;\n },\n 'AuthenticateWithRedirectCallback',\n);\n\nexport const MultisessionAppSupport = ({ children }: React.PropsWithChildren<unknown>) => {\n useAssertWrappedByClerkProvider('MultisessionAppSupport');\n\n const session = useSessionContext();\n return <React.Fragment key={session ? session.id : 'no-users'}>{children}</React.Fragment>;\n};\n","export { SessionContext, useSessionContext } from '@clerk/shared/react';\n"],"mappings":"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","names":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmailLinkErrorCode, EmailLinkErrorCodeStatus, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isReverificationCancelledError } from '@clerk/shared/error';
|
package/dist/errors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export { EmailLinkErrorCode, EmailLinkErrorCodeStatus, isClerkAPIResponseError, isClerkRuntimeError, isEmailLinkError, isKnownError, isMetamaskError, isReverificationCancelledError } from '@clerk/shared/error';
|
package/dist/errors.js
ADDED
|
@@ -0,0 +1,45 @@
|
|
|
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
|
+
|
|
20
|
+
// src/errors.ts
|
|
21
|
+
var errors_exports = {};
|
|
22
|
+
__export(errors_exports, {
|
|
23
|
+
EmailLinkErrorCode: () => import_error.EmailLinkErrorCode,
|
|
24
|
+
EmailLinkErrorCodeStatus: () => import_error.EmailLinkErrorCodeStatus,
|
|
25
|
+
isClerkAPIResponseError: () => import_error.isClerkAPIResponseError,
|
|
26
|
+
isClerkRuntimeError: () => import_error.isClerkRuntimeError,
|
|
27
|
+
isEmailLinkError: () => import_error.isEmailLinkError,
|
|
28
|
+
isKnownError: () => import_error.isKnownError,
|
|
29
|
+
isMetamaskError: () => import_error.isMetamaskError,
|
|
30
|
+
isReverificationCancelledError: () => import_error.isReverificationCancelledError
|
|
31
|
+
});
|
|
32
|
+
module.exports = __toCommonJS(errors_exports);
|
|
33
|
+
var import_error = require("@clerk/shared/error");
|
|
34
|
+
// Annotate the CommonJS export names for ESM import in node:
|
|
35
|
+
0 && (module.exports = {
|
|
36
|
+
EmailLinkErrorCode,
|
|
37
|
+
EmailLinkErrorCodeStatus,
|
|
38
|
+
isClerkAPIResponseError,
|
|
39
|
+
isClerkRuntimeError,
|
|
40
|
+
isEmailLinkError,
|
|
41
|
+
isKnownError,
|
|
42
|
+
isMetamaskError,
|
|
43
|
+
isReverificationCancelledError
|
|
44
|
+
});
|
|
45
|
+
//# sourceMappingURL=errors.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts"],"sourcesContent":["export {\n isClerkAPIResponseError,\n isClerkRuntimeError,\n isEmailLinkError,\n isKnownError,\n isMetamaskError,\n isReverificationCancelledError,\n EmailLinkErrorCode,\n EmailLinkErrorCodeStatus,\n} from '@clerk/shared/error';\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,mBASO;","names":[]}
|
package/dist/errors.mjs
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import "./chunk-OANWQR3B.mjs";
|
|
2
|
+
|
|
3
|
+
// src/errors.ts
|
|
4
|
+
import {
|
|
5
|
+
isClerkAPIResponseError,
|
|
6
|
+
isClerkRuntimeError,
|
|
7
|
+
isEmailLinkError,
|
|
8
|
+
isKnownError,
|
|
9
|
+
isMetamaskError,
|
|
10
|
+
isReverificationCancelledError,
|
|
11
|
+
EmailLinkErrorCode,
|
|
12
|
+
EmailLinkErrorCodeStatus
|
|
13
|
+
} from "@clerk/shared/error";
|
|
14
|
+
export {
|
|
15
|
+
EmailLinkErrorCode,
|
|
16
|
+
EmailLinkErrorCodeStatus,
|
|
17
|
+
isClerkAPIResponseError,
|
|
18
|
+
isClerkRuntimeError,
|
|
19
|
+
isEmailLinkError,
|
|
20
|
+
isKnownError,
|
|
21
|
+
isMetamaskError,
|
|
22
|
+
isReverificationCancelledError
|
|
23
|
+
};
|
|
24
|
+
//# sourceMappingURL=errors.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/errors.ts"],"sourcesContent":["export {\n isClerkAPIResponseError,\n isClerkRuntimeError,\n isEmailLinkError,\n isKnownError,\n isMetamaskError,\n isReverificationCancelledError,\n EmailLinkErrorCode,\n EmailLinkErrorCodeStatus,\n} from '@clerk/shared/error';\n"],"mappings":";;;AAAA;AAAA,EACE;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,OACK;","names":[]}
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as _clerk_shared_types from '@clerk/shared/types';
|
|
2
|
+
import { __experimental_CheckoutButtonProps, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
3
|
+
export { __experimental_CheckoutButtonProps as CheckoutButtonProps, __experimental_PlanDetailsButtonProps as PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps as SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { W as WithClerkProp } from './types-BS-xjOf_.mjs';
|
|
6
|
+
export { __experimental_CheckoutProvider as CheckoutProvider, __experimental_PaymentElement as PaymentElement, __experimental_PaymentElementProvider as PaymentElementProvider, __experimental_useCheckout as useCheckout, __experimental_usePaymentAttempts as usePaymentAttempts, __experimental_usePaymentElement as usePaymentElement, __experimental_usePaymentMethods as usePaymentMethods, __experimental_usePlans as usePlans, __experimental_useStatements as useStatements, __experimental_useSubscription as useSubscription } from '@clerk/shared/react';
|
|
7
|
+
import '@clerk/shared/ui';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A button component that opens the Clerk Checkout drawer when clicked. This component must be rendered
|
|
11
|
+
* inside a `<SignedIn />` component to ensure the user is authenticated.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { SignedIn } from '@clerk/react';
|
|
16
|
+
* import { CheckoutButton } from '@clerk/react/experimental';
|
|
17
|
+
*
|
|
18
|
+
* // Basic usage with default "Checkout" text
|
|
19
|
+
* function BasicCheckout() {
|
|
20
|
+
* return (
|
|
21
|
+
* <SignedIn>
|
|
22
|
+
* <CheckoutButton planId="plan_123" />
|
|
23
|
+
* </SignedIn>
|
|
24
|
+
* );
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* // Custom button with organization subscription
|
|
28
|
+
* function OrganizationCheckout() {
|
|
29
|
+
* return (
|
|
30
|
+
* <SignedIn>
|
|
31
|
+
* <CheckoutButton
|
|
32
|
+
* planId="plan_123"
|
|
33
|
+
* planPeriod="month"
|
|
34
|
+
* for="organization"
|
|
35
|
+
* onSubscriptionComplete={() => console.log('Subscription completed!')}
|
|
36
|
+
* >
|
|
37
|
+
* <button className="custom-button">Subscribe Now</button>
|
|
38
|
+
* </CheckoutButton>
|
|
39
|
+
* </SignedIn>
|
|
40
|
+
* );
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @throws {Error} When rendered outside of a `<SignedIn />` component
|
|
45
|
+
* @throws {Error} When `for="organization"` is used without an active organization context
|
|
46
|
+
*
|
|
47
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
48
|
+
*/
|
|
49
|
+
declare const CheckoutButton: {
|
|
50
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_CheckoutButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A button component that opens the Clerk Plan Details drawer when clicked. This component is part of
|
|
56
|
+
* Clerk's Billing feature which is available under a public beta.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* import { SignedIn } from '@clerk/react';
|
|
61
|
+
* import { PlanDetailsButton } from '@clerk/react/experimental';
|
|
62
|
+
*
|
|
63
|
+
* // Basic usage with default "Plan details" text
|
|
64
|
+
* function BasicPlanDetails() {
|
|
65
|
+
* return (
|
|
66
|
+
* <PlanDetailsButton planId="plan_123" />
|
|
67
|
+
* );
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* // Custom button with custom text
|
|
71
|
+
* function CustomPlanDetails() {
|
|
72
|
+
* return (
|
|
73
|
+
* <PlanDetailsButton planId="plan_123">
|
|
74
|
+
* <button>View Plan Details</button>
|
|
75
|
+
* </PlanDetailsButton>
|
|
76
|
+
* );
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
81
|
+
*/
|
|
82
|
+
declare const PlanDetailsButton: {
|
|
83
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_PlanDetailsButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A button component that opens the Clerk Subscription Details drawer when clicked. This component must be rendered inside a `<SignedIn />` component to ensure the user is authenticated.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* import { SignedIn } from '@clerk/react';
|
|
93
|
+
* import { SubscriptionDetailsButton } from '@clerk/react/experimental';
|
|
94
|
+
*
|
|
95
|
+
* // Basic usage with default "Subscription details" text
|
|
96
|
+
* function BasicSubscriptionDetails() {
|
|
97
|
+
* return (
|
|
98
|
+
* <SubscriptionDetailsButton />
|
|
99
|
+
* );
|
|
100
|
+
* }
|
|
101
|
+
*
|
|
102
|
+
* // Custom button with organization subscription
|
|
103
|
+
* function OrganizationSubscriptionDetails() {
|
|
104
|
+
* return (
|
|
105
|
+
* <SubscriptionDetailsButton
|
|
106
|
+
* for="organization"
|
|
107
|
+
* onSubscriptionCancel={() => console.log('Subscription canceled')}
|
|
108
|
+
* >
|
|
109
|
+
* <button>View Organization Subscription</button>
|
|
110
|
+
* </SubscriptionDetailsButton>
|
|
111
|
+
* );
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @throws {Error} When rendered outside of a `<SignedIn />` component
|
|
116
|
+
* @throws {Error} When `for="organization"` is used without an active organization context
|
|
117
|
+
*
|
|
118
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
119
|
+
*/
|
|
120
|
+
declare const SubscriptionDetailsButton: {
|
|
121
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_SubscriptionDetailsButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
122
|
+
displayName: string;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export { CheckoutButton, PlanDetailsButton, SubscriptionDetailsButton };
|
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import * as _clerk_shared_types from '@clerk/shared/types';
|
|
2
|
+
import { __experimental_CheckoutButtonProps, __experimental_PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
3
|
+
export { __experimental_CheckoutButtonProps as CheckoutButtonProps, __experimental_PlanDetailsButtonProps as PlanDetailsButtonProps, __experimental_SubscriptionDetailsButtonProps as SubscriptionDetailsButtonProps } from '@clerk/shared/types';
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import { W as WithClerkProp } from './types-BS-xjOf_.js';
|
|
6
|
+
export { __experimental_CheckoutProvider as CheckoutProvider, __experimental_PaymentElement as PaymentElement, __experimental_PaymentElementProvider as PaymentElementProvider, __experimental_useCheckout as useCheckout, __experimental_usePaymentAttempts as usePaymentAttempts, __experimental_usePaymentElement as usePaymentElement, __experimental_usePaymentMethods as usePaymentMethods, __experimental_usePlans as usePlans, __experimental_useStatements as useStatements, __experimental_useSubscription as useSubscription } from '@clerk/shared/react';
|
|
7
|
+
import '@clerk/shared/ui';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* A button component that opens the Clerk Checkout drawer when clicked. This component must be rendered
|
|
11
|
+
* inside a `<SignedIn />` component to ensure the user is authenticated.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```tsx
|
|
15
|
+
* import { SignedIn } from '@clerk/react';
|
|
16
|
+
* import { CheckoutButton } from '@clerk/react/experimental';
|
|
17
|
+
*
|
|
18
|
+
* // Basic usage with default "Checkout" text
|
|
19
|
+
* function BasicCheckout() {
|
|
20
|
+
* return (
|
|
21
|
+
* <SignedIn>
|
|
22
|
+
* <CheckoutButton planId="plan_123" />
|
|
23
|
+
* </SignedIn>
|
|
24
|
+
* );
|
|
25
|
+
* }
|
|
26
|
+
*
|
|
27
|
+
* // Custom button with organization subscription
|
|
28
|
+
* function OrganizationCheckout() {
|
|
29
|
+
* return (
|
|
30
|
+
* <SignedIn>
|
|
31
|
+
* <CheckoutButton
|
|
32
|
+
* planId="plan_123"
|
|
33
|
+
* planPeriod="month"
|
|
34
|
+
* for="organization"
|
|
35
|
+
* onSubscriptionComplete={() => console.log('Subscription completed!')}
|
|
36
|
+
* >
|
|
37
|
+
* <button className="custom-button">Subscribe Now</button>
|
|
38
|
+
* </CheckoutButton>
|
|
39
|
+
* </SignedIn>
|
|
40
|
+
* );
|
|
41
|
+
* }
|
|
42
|
+
* ```
|
|
43
|
+
*
|
|
44
|
+
* @throws {Error} When rendered outside of a `<SignedIn />` component
|
|
45
|
+
* @throws {Error} When `for="organization"` is used without an active organization context
|
|
46
|
+
*
|
|
47
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
48
|
+
*/
|
|
49
|
+
declare const CheckoutButton: {
|
|
50
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_CheckoutButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
51
|
+
displayName: string;
|
|
52
|
+
};
|
|
53
|
+
|
|
54
|
+
/**
|
|
55
|
+
* A button component that opens the Clerk Plan Details drawer when clicked. This component is part of
|
|
56
|
+
* Clerk's Billing feature which is available under a public beta.
|
|
57
|
+
*
|
|
58
|
+
* @example
|
|
59
|
+
* ```tsx
|
|
60
|
+
* import { SignedIn } from '@clerk/react';
|
|
61
|
+
* import { PlanDetailsButton } from '@clerk/react/experimental';
|
|
62
|
+
*
|
|
63
|
+
* // Basic usage with default "Plan details" text
|
|
64
|
+
* function BasicPlanDetails() {
|
|
65
|
+
* return (
|
|
66
|
+
* <PlanDetailsButton planId="plan_123" />
|
|
67
|
+
* );
|
|
68
|
+
* }
|
|
69
|
+
*
|
|
70
|
+
* // Custom button with custom text
|
|
71
|
+
* function CustomPlanDetails() {
|
|
72
|
+
* return (
|
|
73
|
+
* <PlanDetailsButton planId="plan_123">
|
|
74
|
+
* <button>View Plan Details</button>
|
|
75
|
+
* </PlanDetailsButton>
|
|
76
|
+
* );
|
|
77
|
+
* }
|
|
78
|
+
* ```
|
|
79
|
+
*
|
|
80
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
81
|
+
*/
|
|
82
|
+
declare const PlanDetailsButton: {
|
|
83
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_PlanDetailsButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
84
|
+
displayName: string;
|
|
85
|
+
};
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* A button component that opens the Clerk Subscription Details drawer when clicked. This component must be rendered inside a `<SignedIn />` component to ensure the user is authenticated.
|
|
89
|
+
*
|
|
90
|
+
* @example
|
|
91
|
+
* ```tsx
|
|
92
|
+
* import { SignedIn } from '@clerk/react';
|
|
93
|
+
* import { SubscriptionDetailsButton } from '@clerk/react/experimental';
|
|
94
|
+
*
|
|
95
|
+
* // Basic usage with default "Subscription details" text
|
|
96
|
+
* function BasicSubscriptionDetails() {
|
|
97
|
+
* return (
|
|
98
|
+
* <SubscriptionDetailsButton />
|
|
99
|
+
* );
|
|
100
|
+
* }
|
|
101
|
+
*
|
|
102
|
+
* // Custom button with organization subscription
|
|
103
|
+
* function OrganizationSubscriptionDetails() {
|
|
104
|
+
* return (
|
|
105
|
+
* <SubscriptionDetailsButton
|
|
106
|
+
* for="organization"
|
|
107
|
+
* onSubscriptionCancel={() => console.log('Subscription canceled')}
|
|
108
|
+
* >
|
|
109
|
+
* <button>View Organization Subscription</button>
|
|
110
|
+
* </SubscriptionDetailsButton>
|
|
111
|
+
* );
|
|
112
|
+
* }
|
|
113
|
+
* ```
|
|
114
|
+
*
|
|
115
|
+
* @throws {Error} When rendered outside of a `<SignedIn />` component
|
|
116
|
+
* @throws {Error} When `for="organization"` is used without an active organization context
|
|
117
|
+
*
|
|
118
|
+
* @experimental This is an experimental API for the Billing feature that is available under a public beta, and the API is subject to change. It is advised to [pin](https://clerk.com/docs/pinning) the SDK version and the clerk-js version to avoid breaking changes.
|
|
119
|
+
*/
|
|
120
|
+
declare const SubscriptionDetailsButton: {
|
|
121
|
+
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<__experimental_SubscriptionDetailsButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
122
|
+
displayName: string;
|
|
123
|
+
};
|
|
124
|
+
|
|
125
|
+
export { CheckoutButton, PlanDetailsButton, SubscriptionDetailsButton };
|