@clerk/react 6.9.0 → 6.9.1-canary.v20260610190754

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 (75) hide show
  1. package/dist/ClerkProvider-9lxHp9j5.cjs +1623 -0
  2. package/dist/ClerkProvider-9lxHp9j5.cjs.map +1 -0
  3. package/dist/ClerkProvider-LQpPtmNL.mjs +1533 -0
  4. package/dist/ClerkProvider-LQpPtmNL.mjs.map +1 -0
  5. package/dist/errors.cjs +69 -0
  6. package/dist/errors.d.cts +2 -0
  7. package/dist/errors.d.mts +2 -1
  8. package/dist/errors.mjs +2 -29
  9. package/dist/experimental.cjs +270 -0
  10. package/dist/experimental.cjs.map +1 -0
  11. package/dist/{experimental.d.ts → experimental.d.cts} +18 -18
  12. package/dist/experimental.d.mts +18 -18
  13. package/dist/experimental.mjs +201 -165
  14. package/dist/experimental.mjs.map +1 -1
  15. package/dist/hooks-BiY5Zgpp.mjs +1369 -0
  16. package/dist/hooks-BiY5Zgpp.mjs.map +1 -0
  17. package/dist/hooks-CBghYU21.cjs +1606 -0
  18. package/dist/hooks-CBghYU21.cjs.map +1 -0
  19. package/dist/index.cjs +447 -0
  20. package/dist/index.cjs.map +1 -0
  21. package/dist/index.d.cts +345 -0
  22. package/dist/index.d.mts +183 -157
  23. package/dist/index.mjs +285 -380
  24. package/dist/index.mjs.map +1 -1
  25. package/dist/internal.cjs +107 -0
  26. package/dist/internal.cjs.map +1 -0
  27. package/dist/internal.d.cts +51 -0
  28. package/dist/internal.d.mts +24 -26
  29. package/dist/internal.mjs +39 -73
  30. package/dist/internal.mjs.map +1 -1
  31. package/dist/legacy.cjs +134 -0
  32. package/dist/legacy.cjs.map +1 -0
  33. package/dist/{legacy.d.ts → legacy.d.cts} +6 -3
  34. package/dist/legacy.d.mts +6 -3
  35. package/dist/legacy.mjs +126 -42
  36. package/dist/legacy.mjs.map +1 -1
  37. package/dist/types-Bwenmt7y.d.cts +10951 -0
  38. package/dist/types-CiIhevkA.d.mts +10951 -0
  39. package/dist/types.cjs +0 -0
  40. package/dist/types.d.cts +3 -0
  41. package/dist/types.d.mts +3 -109
  42. package/dist/types.mjs +1 -2
  43. package/dist/useAssertWrappedByClerkProvider-Cm0djUcB.cjs +52 -0
  44. package/dist/useAssertWrappedByClerkProvider-Cm0djUcB.cjs.map +1 -0
  45. package/dist/useAssertWrappedByClerkProvider-GaNwZpWo.mjs +29 -0
  46. package/dist/useAssertWrappedByClerkProvider-GaNwZpWo.mjs.map +1 -0
  47. package/dist/{useAuth-Dlg_G1_7.d.mts → useAuth-BK5Y4htK.d.mts} +58 -39
  48. package/dist/{useAuth-Cv6iRjL9.d.ts → useAuth-BMxaWktj.d.cts} +58 -39
  49. package/package.json +18 -18
  50. package/dist/chunk-E5QRIS4Z.mjs +0 -20
  51. package/dist/chunk-E5QRIS4Z.mjs.map +0 -1
  52. package/dist/chunk-FQVXBXXF.mjs +0 -1487
  53. package/dist/chunk-FQVXBXXF.mjs.map +0 -1
  54. package/dist/chunk-GVGS7DUS.mjs +0 -2097
  55. package/dist/chunk-GVGS7DUS.mjs.map +0 -1
  56. package/dist/chunk-RQWALB2R.mjs +0 -26
  57. package/dist/chunk-RQWALB2R.mjs.map +0 -1
  58. package/dist/errors.d.ts +0 -1
  59. package/dist/errors.js +0 -51
  60. package/dist/errors.js.map +0 -1
  61. package/dist/errors.mjs.map +0 -1
  62. package/dist/experimental.js +0 -1505
  63. package/dist/experimental.js.map +0 -1
  64. package/dist/index.d.ts +0 -319
  65. package/dist/index.js +0 -3919
  66. package/dist/index.js.map +0 -1
  67. package/dist/internal.d.ts +0 -53
  68. package/dist/internal.js +0 -3339
  69. package/dist/internal.js.map +0 -1
  70. package/dist/legacy.js +0 -90
  71. package/dist/legacy.js.map +0 -1
  72. package/dist/types.d.ts +0 -109
  73. package/dist/types.js +0 -19
  74. package/dist/types.js.map +0 -1
  75. package/dist/types.mjs.map +0 -1
@@ -1,170 +1,206 @@
1
- import {
2
- assertSingleChild,
3
- normalizeWithDefaultValue,
4
- safeExecute,
5
- useAuth,
6
- withClerk
7
- } from "./chunk-FQVXBXXF.mjs";
8
- import "./chunk-RQWALB2R.mjs";
9
- import "./chunk-E5QRIS4Z.mjs";
10
-
11
- // src/components/CheckoutButton.tsx
1
+ import { G as safeExecute, U as assertSingleChild, W as normalizeWithDefaultValue, b as useAuth, z as withClerk } from "./hooks-BiY5Zgpp.mjs";
12
2
  import React from "react";
13
- var CheckoutButton = withClerk(
14
- ({ clerk, children, ...props }) => {
15
- const {
16
- planId,
17
- planPeriod,
18
- seatsQuantity,
19
- priceId,
20
- for: _for,
21
- onSubscriptionComplete,
22
- newSubscriptionRedirectUrl,
23
- checkoutProps,
24
- getContainer,
25
- component,
26
- ...rest
27
- } = props;
28
- const { userId, orgId } = useAuth();
29
- if (userId === null) {
30
- throw new Error(
31
- 'Clerk: Ensure that `<CheckoutButton />` is rendered only when the user is signed in (wrap with `<Show when="signed-in">` or guard with `useAuth()`).'
32
- );
33
- }
34
- if (orgId === null && _for === "organization") {
35
- throw new Error(
36
- 'Clerk: Wrap `<CheckoutButton for="organization" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object'
37
- );
38
- }
39
- children = normalizeWithDefaultValue(children, "Checkout");
40
- const child = assertSingleChild(children)("CheckoutButton");
41
- const clickHandler = () => {
42
- if (!clerk) {
43
- return;
44
- }
45
- return clerk.__internal_openCheckout({
46
- planId,
47
- planPeriod,
48
- seatsQuantity,
49
- priceId,
50
- for: _for,
51
- onSubscriptionComplete,
52
- newSubscriptionRedirectUrl,
53
- ...checkoutProps
54
- });
55
- };
56
- const wrappedChildClickHandler = async (e) => {
57
- if (child && typeof child === "object" && "props" in child) {
58
- await safeExecute(child.props.onClick)(e);
59
- }
60
- return clickHandler();
61
- };
62
- const childProps = { ...rest, onClick: wrappedChildClickHandler };
63
- return React.cloneElement(child, childProps);
64
- },
65
- { component: "CheckoutButton", renderWhileLoading: true }
66
- );
3
+ import { __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";
4
+
5
+ //#region src/components/CheckoutButton.tsx
6
+ /**
7
+ * A button component that opens the Clerk Checkout drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when="signed-in">`).
8
+ *
9
+ * @example
10
+ * ```tsx
11
+ * import { Show } from '@clerk/react';
12
+ * import { CheckoutButton } from '@clerk/react/experimental';
13
+ *
14
+ * // Basic usage with default "Checkout" text
15
+ * function BasicCheckout() {
16
+ * return (
17
+ * <Show when="signed-in">
18
+ * <CheckoutButton planId="plan_123" />
19
+ * </Show>
20
+ * );
21
+ * }
22
+ *
23
+ * // Custom button with organization subscription
24
+ * function OrganizationCheckout() {
25
+ * return (
26
+ * <Show when="signed-in">
27
+ * <CheckoutButton
28
+ * planId="plan_123"
29
+ * planPeriod="month"
30
+ * for="organization"
31
+ * onSubscriptionComplete={() => console.log('Subscription completed!')}
32
+ * >
33
+ * <button className="custom-button">Subscribe Now</button>
34
+ * </CheckoutButton>
35
+ * </Show>
36
+ * );
37
+ * }
38
+ * ```
39
+ *
40
+ * @throws {Error} When rendered while the user is signed out
41
+ * @throws {Error} When `for="organization"` is used without an active organization context
42
+ *
43
+ * @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.
44
+ */
45
+ const CheckoutButton = withClerk(({ clerk, children, ...props }) => {
46
+ const { planId, planPeriod, seatsQuantity, priceId, for: _for, onSubscriptionComplete, newSubscriptionRedirectUrl, checkoutProps, getContainer, component, ...rest } = props;
47
+ const { userId, orgId } = useAuth();
48
+ if (userId === null) throw new Error("Clerk: Ensure that `<CheckoutButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).");
49
+ if (orgId === null && _for === "organization") throw new Error("Clerk: Wrap `<CheckoutButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object");
50
+ children = normalizeWithDefaultValue(children, "Checkout");
51
+ const child = assertSingleChild(children)("CheckoutButton");
52
+ const clickHandler = () => {
53
+ if (!clerk) return;
54
+ return clerk.__internal_openCheckout({
55
+ planId,
56
+ planPeriod,
57
+ seatsQuantity,
58
+ priceId,
59
+ for: _for,
60
+ onSubscriptionComplete,
61
+ newSubscriptionRedirectUrl,
62
+ ...checkoutProps
63
+ });
64
+ };
65
+ const wrappedChildClickHandler = async (e) => {
66
+ if (child && typeof child === "object" && "props" in child) await safeExecute(child.props.onClick)(e);
67
+ return clickHandler();
68
+ };
69
+ const childProps = {
70
+ ...rest,
71
+ onClick: wrappedChildClickHandler
72
+ };
73
+ return React.cloneElement(child, childProps);
74
+ }, {
75
+ component: "CheckoutButton",
76
+ renderWhileLoading: true
77
+ });
67
78
 
68
- // src/components/PlanDetailsButton.tsx
69
- import React2 from "react";
70
- var PlanDetailsButton = withClerk(
71
- ({ clerk, children, ...props }) => {
72
- const { plan, planId, initialPlanPeriod, planDetailsProps, getContainer, component, ...rest } = props;
73
- children = normalizeWithDefaultValue(children, "Plan details");
74
- const child = assertSingleChild(children)("PlanDetailsButton");
75
- const clickHandler = () => {
76
- if (!clerk) {
77
- return;
78
- }
79
- return clerk.__internal_openPlanDetails({
80
- plan,
81
- planId,
82
- initialPlanPeriod,
83
- ...planDetailsProps
84
- });
85
- };
86
- const wrappedChildClickHandler = async (e) => {
87
- if (child && typeof child === "object" && "props" in child) {
88
- await safeExecute(child.props.onClick)(e);
89
- }
90
- return clickHandler();
91
- };
92
- const childProps = { ...rest, onClick: wrappedChildClickHandler };
93
- return React2.cloneElement(child, childProps);
94
- },
95
- { component: "PlanDetailsButton", renderWhileLoading: true }
96
- );
79
+ //#endregion
80
+ //#region src/components/PlanDetailsButton.tsx
81
+ /**
82
+ * A button component that opens the Clerk Plan Details drawer when clicked. This component is part of
83
+ * Clerk's Billing feature which is available under a public beta.
84
+ *
85
+ * @example
86
+ * ```tsx
87
+ * import { Show } from '@clerk/react';
88
+ * import { PlanDetailsButton } from '@clerk/react/experimental';
89
+ *
90
+ * // Basic usage with default "Plan details" text
91
+ * function BasicPlanDetails() {
92
+ * return <PlanDetailsButton planId="plan_123" />;
93
+ * }
94
+ *
95
+ * // Custom button with custom text
96
+ * function CustomPlanDetails() {
97
+ * return (
98
+ * <Show when="signed-in">
99
+ * <PlanDetailsButton planId="plan_123">
100
+ * <button>View Plan Details</button>
101
+ * </PlanDetailsButton>
102
+ * </Show>
103
+ * );
104
+ * }
105
+ * ```
106
+ *
107
+ * @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.
108
+ */
109
+ const PlanDetailsButton = withClerk(({ clerk, children, ...props }) => {
110
+ const { plan, planId, initialPlanPeriod, planDetailsProps, getContainer, component, ...rest } = props;
111
+ children = normalizeWithDefaultValue(children, "Plan details");
112
+ const child = assertSingleChild(children)("PlanDetailsButton");
113
+ const clickHandler = () => {
114
+ if (!clerk) return;
115
+ return clerk.__internal_openPlanDetails({
116
+ plan,
117
+ planId,
118
+ initialPlanPeriod,
119
+ ...planDetailsProps
120
+ });
121
+ };
122
+ const wrappedChildClickHandler = async (e) => {
123
+ if (child && typeof child === "object" && "props" in child) await safeExecute(child.props.onClick)(e);
124
+ return clickHandler();
125
+ };
126
+ const childProps = {
127
+ ...rest,
128
+ onClick: wrappedChildClickHandler
129
+ };
130
+ return React.cloneElement(child, childProps);
131
+ }, {
132
+ component: "PlanDetailsButton",
133
+ renderWhileLoading: true
134
+ });
97
135
 
98
- // src/components/SubscriptionDetailsButton.tsx
99
- import React3 from "react";
100
- var SubscriptionDetailsButton = withClerk(
101
- ({
102
- clerk,
103
- children,
104
- ...props
105
- }) => {
106
- const { for: _for, subscriptionDetailsProps, onSubscriptionCancel, getContainer, component, ...rest } = props;
107
- children = normalizeWithDefaultValue(children, "Subscription details");
108
- const child = assertSingleChild(children)("SubscriptionDetailsButton");
109
- const { userId, orgId } = useAuth();
110
- if (userId === null) {
111
- throw new Error(
112
- 'Clerk: Ensure that `<SubscriptionDetailsButton />` is rendered only when the user is signed in (wrap with `<Show when="signed-in">` or guard with `useAuth()`).'
113
- );
114
- }
115
- if (orgId === null && _for === "organization") {
116
- throw new Error(
117
- 'Clerk: Wrap `<SubscriptionDetailsButton for="organization" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object'
118
- );
119
- }
120
- const clickHandler = () => {
121
- if (!clerk) {
122
- return;
123
- }
124
- return clerk.__internal_openSubscriptionDetails({
125
- for: _for,
126
- onSubscriptionCancel,
127
- ...subscriptionDetailsProps
128
- });
129
- };
130
- const wrappedChildClickHandler = async (e) => {
131
- if (child && typeof child === "object" && "props" in child) {
132
- await safeExecute(child.props.onClick)(e);
133
- }
134
- return clickHandler();
135
- };
136
- const childProps = { ...rest, onClick: wrappedChildClickHandler };
137
- return React3.cloneElement(child, childProps);
138
- },
139
- { component: "SubscriptionDetailsButton", renderWhileLoading: true }
140
- );
136
+ //#endregion
137
+ //#region src/components/SubscriptionDetailsButton.tsx
138
+ /**
139
+ * A button component that opens the Clerk Subscription Details drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when="signed-in">`).
140
+ *
141
+ * @example
142
+ * ```tsx
143
+ * import { Show } from '@clerk/react';
144
+ * import { SubscriptionDetailsButton } from '@clerk/react/experimental';
145
+ *
146
+ * // Basic usage with default "Subscription details" text
147
+ * function BasicSubscriptionDetails() {
148
+ * return (
149
+ * <Show when="signed-in">
150
+ * <SubscriptionDetailsButton />
151
+ * </Show>
152
+ * );
153
+ * }
154
+ *
155
+ * // Custom button with Organization Subscription
156
+ * function OrganizationSubscriptionDetails() {
157
+ * return (
158
+ * <Show when="signed-in">
159
+ * <SubscriptionDetailsButton
160
+ * for="organization"
161
+ * onSubscriptionCancel={() => console.log('Subscription canceled')}
162
+ * >
163
+ * <button>View Organization Subscription</button>
164
+ * </SubscriptionDetailsButton>
165
+ * </Show>
166
+ * );
167
+ * }
168
+ * ```
169
+ *
170
+ * @throws {Error} When rendered while the user is signed out
171
+ * @throws {Error} When `for="organization"` is used without an Active Organization context
172
+ *
173
+ * @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.
174
+ */
175
+ const SubscriptionDetailsButton = withClerk(({ clerk, children, ...props }) => {
176
+ const { for: _for, subscriptionDetailsProps, onSubscriptionCancel, getContainer, component, ...rest } = props;
177
+ children = normalizeWithDefaultValue(children, "Subscription details");
178
+ const child = assertSingleChild(children)("SubscriptionDetailsButton");
179
+ const { userId, orgId } = useAuth();
180
+ if (userId === null) throw new Error("Clerk: Ensure that `<SubscriptionDetailsButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).");
181
+ if (orgId === null && _for === "organization") throw new Error("Clerk: Wrap `<SubscriptionDetailsButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object");
182
+ const clickHandler = () => {
183
+ if (!clerk) return;
184
+ return clerk.__internal_openSubscriptionDetails({
185
+ for: _for,
186
+ onSubscriptionCancel,
187
+ ...subscriptionDetailsProps
188
+ });
189
+ };
190
+ const wrappedChildClickHandler = async (e) => {
191
+ if (child && typeof child === "object" && "props" in child) await safeExecute(child.props.onClick)(e);
192
+ return clickHandler();
193
+ };
194
+ const childProps = {
195
+ ...rest,
196
+ onClick: wrappedChildClickHandler
197
+ };
198
+ return React.cloneElement(child, childProps);
199
+ }, {
200
+ component: "SubscriptionDetailsButton",
201
+ renderWhileLoading: true
202
+ });
141
203
 
142
- // src/experimental.ts
143
- import {
144
- __experimental_PaymentElementProvider,
145
- __experimental_usePaymentElement,
146
- __experimental_PaymentElement,
147
- __experimental_usePaymentAttempts,
148
- __experimental_useStatements,
149
- __experimental_usePaymentMethods,
150
- __experimental_usePlans,
151
- __experimental_useSubscription,
152
- __experimental_CheckoutProvider,
153
- __experimental_useCheckout
154
- } from "@clerk/shared/react";
155
- export {
156
- CheckoutButton,
157
- __experimental_CheckoutProvider as CheckoutProvider,
158
- __experimental_PaymentElement as PaymentElement,
159
- __experimental_PaymentElementProvider as PaymentElementProvider,
160
- PlanDetailsButton,
161
- SubscriptionDetailsButton,
162
- __experimental_useCheckout as useCheckout,
163
- __experimental_usePaymentAttempts as usePaymentAttempts,
164
- __experimental_usePaymentElement as usePaymentElement,
165
- __experimental_usePaymentMethods as usePaymentMethods,
166
- __experimental_usePlans as usePlans,
167
- __experimental_useStatements as useStatements,
168
- __experimental_useSubscription as useSubscription
169
- };
204
+ //#endregion
205
+ export { CheckoutButton, CheckoutProvider, PaymentElement, PaymentElementProvider, PlanDetailsButton, SubscriptionDetailsButton, useCheckout, usePaymentAttempts, usePaymentElement, usePaymentMethods, usePlans, useStatements, useSubscription };
170
206
  //# sourceMappingURL=experimental.mjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/components/CheckoutButton.tsx","../src/components/PlanDetailsButton.tsx","../src/components/SubscriptionDetailsButton.tsx","../src/experimental.ts"],"sourcesContent":["import type { __experimental_CheckoutButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useAuth } from '../hooks';\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Checkout drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when=\"signed-in\">`).\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { CheckoutButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Checkout\" text\n * function BasicCheckout() {\n * return (\n * <Show when=\"signed-in\">\n * <CheckoutButton planId=\"plan_123\" />\n * </Show>\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationCheckout() {\n * return (\n * <Show when=\"signed-in\">\n * <CheckoutButton\n * planId=\"plan_123\"\n * planPeriod=\"month\"\n * for=\"organization\"\n * onSubscriptionComplete={() => console.log('Subscription completed!')}\n * >\n * <button className=\"custom-button\">Subscribe Now</button>\n * </CheckoutButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered while the user is signed out\n * @throws {Error} When `for=\"organization\"` is used without an active organization context\n *\n * @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.\n */\nexport const CheckoutButton = withClerk(\n ({ clerk, children, ...props }: WithClerkProp<React.PropsWithChildren<__experimental_CheckoutButtonProps>>) => {\n const {\n planId,\n planPeriod,\n seatsQuantity,\n priceId,\n for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n checkoutProps,\n getContainer,\n component,\n ...rest\n } = props;\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error(\n 'Clerk: Ensure that `<CheckoutButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).',\n );\n }\n\n if (orgId === null && _for === 'organization') {\n throw new Error(\n 'Clerk: Wrap `<CheckoutButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object',\n );\n }\n\n children = normalizeWithDefaultValue(children, 'Checkout');\n const child = assertSingleChild(children)('CheckoutButton');\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openCheckout({\n planId,\n planPeriod,\n seatsQuantity,\n priceId,\n for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n ...checkoutProps,\n });\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'CheckoutButton', renderWhileLoading: true },\n);\n","import type { __experimental_PlanDetailsButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Plan Details drawer when clicked. This component is part of\n * Clerk's Billing feature which is available under a public beta.\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { PlanDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Plan details\" text\n * function BasicPlanDetails() {\n * return <PlanDetailsButton planId=\"plan_123\" />;\n * }\n *\n * // Custom button with custom text\n * function CustomPlanDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <PlanDetailsButton planId=\"plan_123\">\n * <button>View Plan Details</button>\n * </PlanDetailsButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @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.\n */\nexport const PlanDetailsButton = withClerk(\n ({ clerk, children, ...props }: WithClerkProp<React.PropsWithChildren<__experimental_PlanDetailsButtonProps>>) => {\n const { plan, planId, initialPlanPeriod, planDetailsProps, getContainer, component, ...rest } = props;\n\n children = normalizeWithDefaultValue(children, 'Plan details');\n const child = assertSingleChild(children)('PlanDetailsButton');\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openPlanDetails({\n plan,\n planId,\n initialPlanPeriod,\n ...planDetailsProps,\n } as __experimental_PlanDetailsButtonProps);\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'PlanDetailsButton', renderWhileLoading: true },\n);\n","import type { __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useAuth } from '../hooks';\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Subscription Details drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when=\"signed-in\">`).\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { SubscriptionDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Subscription details\" text\n * function BasicSubscriptionDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <SubscriptionDetailsButton />\n * </Show>\n * );\n * }\n *\n * // Custom button with Organization Subscription\n * function OrganizationSubscriptionDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <SubscriptionDetailsButton\n * for=\"organization\"\n * onSubscriptionCancel={() => console.log('Subscription canceled')}\n * >\n * <button>View Organization Subscription</button>\n * </SubscriptionDetailsButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered while the user is signed out\n * @throws {Error} When `for=\"organization\"` is used without an Active Organization context\n *\n * @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.\n */\nexport const SubscriptionDetailsButton = withClerk(\n ({\n clerk,\n children,\n ...props\n }: WithClerkProp<React.PropsWithChildren<__experimental_SubscriptionDetailsButtonProps>>) => {\n const { for: _for, subscriptionDetailsProps, onSubscriptionCancel, getContainer, component, ...rest } = props;\n children = normalizeWithDefaultValue(children, 'Subscription details');\n const child = assertSingleChild(children)('SubscriptionDetailsButton');\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error(\n 'Clerk: Ensure that `<SubscriptionDetailsButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).',\n );\n }\n\n if (orgId === null && _for === 'organization') {\n throw new Error(\n 'Clerk: Wrap `<SubscriptionDetailsButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object',\n );\n }\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openSubscriptionDetails({\n for: _for,\n onSubscriptionCancel,\n ...subscriptionDetailsProps,\n });\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'SubscriptionDetailsButton', renderWhileLoading: true },\n);\n","export { CheckoutButton } from './components/CheckoutButton';\nexport { PlanDetailsButton } from './components/PlanDetailsButton';\nexport { SubscriptionDetailsButton } from './components/SubscriptionDetailsButton';\n\nexport type {\n __experimental_CheckoutButtonProps as CheckoutButtonProps,\n __experimental_SubscriptionDetailsButtonProps as SubscriptionDetailsButtonProps,\n __experimental_PlanDetailsButtonProps as PlanDetailsButtonProps,\n} from '@clerk/shared/types';\n\nexport {\n __experimental_PaymentElementProvider as PaymentElementProvider,\n __experimental_usePaymentElement as usePaymentElement,\n __experimental_PaymentElement as PaymentElement,\n __experimental_usePaymentAttempts as usePaymentAttempts,\n __experimental_useStatements as useStatements,\n __experimental_usePaymentMethods as usePaymentMethods,\n __experimental_usePlans as usePlans,\n __experimental_useSubscription as useSubscription,\n __experimental_CheckoutProvider as CheckoutProvider,\n __experimental_useCheckout as useCheckout,\n} from '@clerk/shared/react';\n"],"mappings":";;;;;;;;;;;AACA,OAAO,WAAW;AA8CX,IAAM,iBAAiB;AAAA,EAC5B,CAAC,EAAE,OAAO,UAAU,GAAG,MAAM,MAAkF;AAC7G,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AAEJ,UAAM,EAAE,QAAQ,MAAM,IAAI,QAAQ;AAElC,QAAI,WAAW,MAAM;AACnB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,QAAI,UAAU,QAAQ,SAAS,gBAAgB;AAC7C,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,eAAW,0BAA0B,UAAU,UAAU;AACzD,UAAM,QAAQ,kBAAkB,QAAQ,EAAE,gBAAgB;AAE1D,UAAM,eAAe,MAAM;AACzB,UAAI,CAAC,OAAO;AACV;AAAA,MACF;AAEA,aAAO,MAAM,wBAAwB;AAAA,QACnC;AAAA,QACA;AAAA,QACA;AAAA,QACA;AAAA,QACA,KAAK;AAAA,QACL;AAAA,QACA;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAAA,IACH;AAEA,UAAM,2BAAoD,OAAM,MAAK;AACnE,UAAI,SAAS,OAAO,UAAU,YAAY,WAAW,OAAO;AAC1D,cAAM,YAAY,MAAM,MAAM,OAAO,EAAE,CAAC;AAAA,MAC1C;AACA,aAAO,aAAa;AAAA,IACtB;AAEA,UAAM,aAAa,EA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AI,WAAW,MAAM;AACnB,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,QAAI,UAAU,QAAQ,SAAS,gBAAgB;AAC7C,YAAM,IAAI;AAAA,QACR;AAAA,MACF;AAAA,IACF;AAEA,UAAM,eAAe,MAAM;AACzB,UAAI,CAAC,OAAO;AACV;AAAA,MACF;AAEA,aAAO,MAAM,mCAAmC;AAAA,QAC9C,KAAK;AAAA,QACL;AAAA,QACA,GAAG;AAAA,MACL,CAAC;AAAA,IACH;AAEA,UAAM,2BAAoD,OAAM,MAAK;AACnE,UAAI,SAAS,OAAO,UAAU,YAAY,WAAW,OAAO;AAC1D,cAAM,YAAY,MAAM,MAAM,OAAO,EAAE,CAAC;AAAA,MAC1C;AACA,aAAO,aAAa;AAAA,IACtB;AAEA,UAAM,aAAa,EAAE,GAAG,MAAM,SAAS,yBAAyB;AAChE,WAAOC,OAAM,aAAa,OAAsC,UAAU;AAAA,EAC5E;AAAA,EACA,EAAE,WAAW,6BAA6B,oBAAoB,KAAK;AACrE;;;AClFA;AAAA,EAC2C;AAAA,EACL;AAAA,EACH;AAAA,EACI;AAAA,EACL;AAAA,EACI;AAAA,EACT;AAAA,EACO;AAAA,EACC;AAAA,EACL;AAAA,OACzB;","names":["React","React","React","React"]}
1
+ {"version":3,"file":"experimental.mjs","names":[],"sources":["../src/components/CheckoutButton.tsx","../src/components/PlanDetailsButton.tsx","../src/components/SubscriptionDetailsButton.tsx"],"sourcesContent":["import type { __experimental_CheckoutButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useAuth } from '../hooks';\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Checkout drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when=\"signed-in\">`).\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { CheckoutButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Checkout\" text\n * function BasicCheckout() {\n * return (\n * <Show when=\"signed-in\">\n * <CheckoutButton planId=\"plan_123\" />\n * </Show>\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationCheckout() {\n * return (\n * <Show when=\"signed-in\">\n * <CheckoutButton\n * planId=\"plan_123\"\n * planPeriod=\"month\"\n * for=\"organization\"\n * onSubscriptionComplete={() => console.log('Subscription completed!')}\n * >\n * <button className=\"custom-button\">Subscribe Now</button>\n * </CheckoutButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered while the user is signed out\n * @throws {Error} When `for=\"organization\"` is used without an active organization context\n *\n * @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.\n */\nexport const CheckoutButton = withClerk(\n ({ clerk, children, ...props }: WithClerkProp<React.PropsWithChildren<__experimental_CheckoutButtonProps>>) => {\n const {\n planId,\n planPeriod,\n seatsQuantity,\n priceId,\n for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n checkoutProps,\n getContainer,\n component,\n ...rest\n } = props;\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error(\n 'Clerk: Ensure that `<CheckoutButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).',\n );\n }\n\n if (orgId === null && _for === 'organization') {\n throw new Error(\n 'Clerk: Wrap `<CheckoutButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object',\n );\n }\n\n children = normalizeWithDefaultValue(children, 'Checkout');\n const child = assertSingleChild(children)('CheckoutButton');\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openCheckout({\n planId,\n planPeriod,\n seatsQuantity,\n priceId,\n for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n ...checkoutProps,\n });\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'CheckoutButton', renderWhileLoading: true },\n);\n","import type { __experimental_PlanDetailsButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Plan Details drawer when clicked. This component is part of\n * Clerk's Billing feature which is available under a public beta.\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { PlanDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Plan details\" text\n * function BasicPlanDetails() {\n * return <PlanDetailsButton planId=\"plan_123\" />;\n * }\n *\n * // Custom button with custom text\n * function CustomPlanDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <PlanDetailsButton planId=\"plan_123\">\n * <button>View Plan Details</button>\n * </PlanDetailsButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @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.\n */\nexport const PlanDetailsButton = withClerk(\n ({ clerk, children, ...props }: WithClerkProp<React.PropsWithChildren<__experimental_PlanDetailsButtonProps>>) => {\n const { plan, planId, initialPlanPeriod, planDetailsProps, getContainer, component, ...rest } = props;\n\n children = normalizeWithDefaultValue(children, 'Plan details');\n const child = assertSingleChild(children)('PlanDetailsButton');\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openPlanDetails({\n plan,\n planId,\n initialPlanPeriod,\n ...planDetailsProps,\n } as __experimental_PlanDetailsButtonProps);\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'PlanDetailsButton', renderWhileLoading: true },\n);\n","import type { __experimental_SubscriptionDetailsButtonProps } from '@clerk/shared/types';\nimport React from 'react';\n\nimport { useAuth } from '../hooks';\nimport type { WithClerkProp } from '../types';\nimport { assertSingleChild, normalizeWithDefaultValue, safeExecute } from '../utils';\nimport { withClerk } from './withClerk';\n\n/**\n * A button component that opens the Clerk Subscription Details drawer when clicked. Render only when the user is signed in (e.g., wrap with `<Show when=\"signed-in\">`).\n *\n * @example\n * ```tsx\n * import { Show } from '@clerk/react';\n * import { SubscriptionDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Subscription details\" text\n * function BasicSubscriptionDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <SubscriptionDetailsButton />\n * </Show>\n * );\n * }\n *\n * // Custom button with Organization Subscription\n * function OrganizationSubscriptionDetails() {\n * return (\n * <Show when=\"signed-in\">\n * <SubscriptionDetailsButton\n * for=\"organization\"\n * onSubscriptionCancel={() => console.log('Subscription canceled')}\n * >\n * <button>View Organization Subscription</button>\n * </SubscriptionDetailsButton>\n * </Show>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered while the user is signed out\n * @throws {Error} When `for=\"organization\"` is used without an Active Organization context\n *\n * @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.\n */\nexport const SubscriptionDetailsButton = withClerk(\n ({\n clerk,\n children,\n ...props\n }: WithClerkProp<React.PropsWithChildren<__experimental_SubscriptionDetailsButtonProps>>) => {\n const { for: _for, subscriptionDetailsProps, onSubscriptionCancel, getContainer, component, ...rest } = props;\n children = normalizeWithDefaultValue(children, 'Subscription details');\n const child = assertSingleChild(children)('SubscriptionDetailsButton');\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error(\n 'Clerk: Ensure that `<SubscriptionDetailsButton />` is rendered only when the user is signed in (wrap with `<Show when=\"signed-in\">` or guard with `useAuth()`).',\n );\n }\n\n if (orgId === null && _for === 'organization') {\n throw new Error(\n 'Clerk: Wrap `<SubscriptionDetailsButton for=\"organization\" />` with a check for an active organization. Retrieve `orgId` from `useAuth()` and confirm it is defined. For SSR, see: https://clerk.com/docs/reference/backend/types/auth-object#how-to-access-the-auth-object',\n );\n }\n\n const clickHandler = () => {\n if (!clerk) {\n return;\n }\n\n return clerk.__internal_openSubscriptionDetails({\n for: _for,\n onSubscriptionCancel,\n ...subscriptionDetailsProps,\n });\n };\n\n const wrappedChildClickHandler: React.MouseEventHandler = async e => {\n if (child && typeof child === 'object' && 'props' in child) {\n await safeExecute(child.props.onClick)(e);\n }\n return clickHandler();\n };\n\n const childProps = { ...rest, onClick: wrappedChildClickHandler };\n return React.cloneElement(child as React.ReactElement<unknown>, childProps);\n },\n { component: 'SubscriptionDetailsButton', renderWhileLoading: true },\n);\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+CA,MAAa,iBAAiB,WAC3B,EAAE,OAAO,UAAU,GAAG,YAAwF;CAC7G,MAAM,EACJ,QACA,YACA,eACA,SACA,KAAK,MACL,wBACA,4BACA,eACA,cACA,WACA,GAAG,SACD;CAEJ,MAAM,EAAE,QAAQ,UAAU,QAAQ;CAElC,IAAI,WAAW,MACb,MAAM,IAAI,MACR,wJACF;CAGF,IAAI,UAAU,QAAQ,SAAS,gBAC7B,MAAM,IAAI,MACR,oQACF;CAGF,WAAW,0BAA0B,UAAU,UAAU;CACzD,MAAM,QAAQ,kBAAkB,QAAQ,CAAC,CAAC,gBAAgB;CAE1D,MAAM,qBAAqB;EACzB,IAAI,CAAC,OACH;EAGF,OAAO,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