@clerk/react 6.0.0-snapshot.v20251204175016 → 6.0.0-snapshot.v20251208202852
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{chunk-ZXC453V5.mjs → chunk-FGM7Y3PB.mjs} +26 -4
- package/dist/chunk-FGM7Y3PB.mjs.map +1 -0
- package/dist/experimental.d.mts +2 -2
- package/dist/experimental.d.ts +2 -2
- package/dist/experimental.js +25 -2
- package/dist/experimental.js.map +1 -1
- package/dist/experimental.mjs +3 -1
- package/dist/experimental.mjs.map +1 -1
- package/dist/index.d.mts +8 -4
- package/dist/index.d.ts +8 -4
- package/dist/index.js +44 -3
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +22 -2
- package/dist/index.mjs.map +1 -1
- package/dist/internal.d.mts +2 -2
- package/dist/internal.d.ts +2 -2
- package/dist/{types-Bjumu7Zt.d.mts → types-C7pBea4d.d.mts} +2 -2
- package/dist/{types-Bjumu7Zt.d.ts → types-C7pBea4d.d.ts} +2 -2
- package/dist/{useAuth-C6dUCIl3.d.mts → useAuth-Deiz0BGe.d.mts} +1 -1
- package/dist/{useAuth-hGxwSzMQ.d.ts → useAuth-QSe8Smhk.d.ts} +1 -1
- package/package.json +4 -4
- package/dist/chunk-ZXC453V5.mjs.map +0 -1
|
@@ -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. This component must be rendered\n * inside a `<SignedIn />` component to ensure the user is authenticated.\n *\n * @example\n * ```tsx\n * import { SignedIn } from '@clerk/react';\n * import { CheckoutButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Checkout\" text\n * function BasicCheckout() {\n * return (\n * <SignedIn>\n * <CheckoutButton planId=\"plan_123\" />\n * </SignedIn>\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationCheckout() {\n * return (\n * <SignedIn>\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 * </SignedIn>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered outside of a `<SignedIn />` component\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 for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n checkoutProps,\n ...rest\n } = props;\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error('Clerk: Ensure that `<CheckoutButton />` is rendered inside a `<SignedIn />` component.');\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 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 { SignedIn } from '@clerk/react';\n * import { PlanDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Plan details\" text\n * function BasicPlanDetails() {\n * return (\n * <PlanDetailsButton planId=\"plan_123\" />\n * );\n * }\n *\n * // Custom button with custom text\n * function CustomPlanDetails() {\n * return (\n * <PlanDetailsButton planId=\"plan_123\">\n * <button>View Plan Details</button>\n * </PlanDetailsButton>\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, ...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. This component must be rendered inside a `<SignedIn />` component to ensure the user is authenticated.\n *\n * @example\n * ```tsx\n * import { SignedIn } 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 * <SubscriptionDetailsButton />\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationSubscriptionDetails() {\n * return (\n * <SubscriptionDetailsButton\n * for=\"organization\"\n * onSubscriptionCancel={() => console.log('Subscription canceled')}\n * >\n * <button>View Organization Subscription</button>\n * </SubscriptionDetailsButton>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered outside of a `<SignedIn />` component\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, ...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 inside a `<SignedIn />` component.',\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;AA+CX,IAAM,iBAAiB;AAAA,EAC5B,CAAC,EAAE,OAAO,UAAU,GAAG,MAAM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AC;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;;;AC9EA;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,"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. This component must be rendered\n * inside a `<SignedIn />` component to ensure the user is authenticated.\n *\n * @example\n * ```tsx\n * import { SignedIn } from '@clerk/react';\n * import { CheckoutButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Checkout\" text\n * function BasicCheckout() {\n * return (\n * <SignedIn>\n * <CheckoutButton planId=\"plan_123\" />\n * </SignedIn>\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationCheckout() {\n * return (\n * <SignedIn>\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 * </SignedIn>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered outside of a `<SignedIn />` component\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 for: _for,\n onSubscriptionComplete,\n newSubscriptionRedirectUrl,\n checkoutProps,\n ...rest\n } = props;\n\n const { userId, orgId } = useAuth();\n\n if (userId === null) {\n throw new Error('Clerk: Ensure that `<CheckoutButton />` is rendered inside a `<SignedIn />` component.');\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 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 { SignedIn } from '@clerk/react';\n * import { PlanDetailsButton } from '@clerk/react/experimental';\n *\n * // Basic usage with default \"Plan details\" text\n * function BasicPlanDetails() {\n * return (\n * <PlanDetailsButton planId=\"plan_123\" />\n * );\n * }\n *\n * // Custom button with custom text\n * function CustomPlanDetails() {\n * return (\n * <PlanDetailsButton planId=\"plan_123\">\n * <button>View Plan Details</button>\n * </PlanDetailsButton>\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, ...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. This component must be rendered inside a `<SignedIn />` component to ensure the user is authenticated.\n *\n * @example\n * ```tsx\n * import { SignedIn } 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 * <SubscriptionDetailsButton />\n * );\n * }\n *\n * // Custom button with organization subscription\n * function OrganizationSubscriptionDetails() {\n * return (\n * <SubscriptionDetailsButton\n * for=\"organization\"\n * onSubscriptionCancel={() => console.log('Subscription canceled')}\n * >\n * <button>View Organization Subscription</button>\n * </SubscriptionDetailsButton>\n * );\n * }\n * ```\n *\n * @throws {Error} When rendered outside of a `<SignedIn />` component\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, ...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 inside a `<SignedIn />` component.',\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_useAPIKeys as useAPIKeys,\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;AA+CX,IAAM,iBAAiB;AAAA,EAC5B,CAAC,EAAE,OAAO,UAAU,GAAG,MAAM,MAAkF;AAC7G,UAAM;AAAA,MACJ;AAAA,MACA;AAAA,MACA,KAAK;AAAA,MACL;AAAA,MACA;AAAA,MACA;AAAA,MACA,GAAG;AAAA,IACL,IAAI;AAEJ,UAAM,EAAE,QAAQ,MAAM,IAAI,QAAQ;AAElC,QAAI,WAAW,MAAM;AACnB,YAAM,IAAI,MAAM,wFAAwF;AAAA,IAC1G;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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jEA,OAAOC,YAAW;AAwCX,IAAM,4BAA4B;AAAA,EACvC,CAAC;AAAA,IACC;AAAA,IACA;AAAA,IACA,GAAG;AAAA,EACL,MAA6F;AAC3F,UAAM,EAAE,KAAK,MAAM,0BAA0B,sBAAsB,GAAG,KAAK,IAAI;AAC/E,eAAW,0BAA0B,UAAU,sBAAsB;AACrE,UAAM,QAAQ,kBAAkB,QAAQ,EAAE,2BAA2B;AAErE,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,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;;;AC9EA;AAAA,EAC+B;AAAA,EACY;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"]}
|
package/dist/index.d.mts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Theme, Ui } from '@clerk/ui/internal';
|
|
2
2
|
import * as _clerk_shared_types from '@clerk/shared/types';
|
|
3
|
-
import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, SignInSignalValue, SignUpSignalValue } from '@clerk/shared/types';
|
|
3
|
+
import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, SignInSignalValue, SignUpSignalValue } from '@clerk/shared/types';
|
|
4
4
|
export { BrowserClerk, BrowserClerkConstructor, ClerkProp, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, IsomorphicClerkOptions } from '@clerk/shared/types';
|
|
5
5
|
import React, { ReactNode, PropsWithChildren } from 'react';
|
|
6
|
-
import { W as WithClerkProp, O as OrganizationProfilePageProps, a as OrganizationProfileLinkProps, U as UserProfilePageProps, b as UserProfileLinkProps, c as UserButtonActionProps, d as UserButtonLinkProps, S as SignInWithMetamaskButtonProps, C as ClerkProviderProps } from './types-
|
|
7
|
-
export { A as AuthenticateWithRedirectCallback, C as ClerkDegraded, a as ClerkFailed, b as ClerkLoaded, c as ClerkLoading, P as Protect, j as ProtectProps, R as RedirectToCreateOrganization, d as RedirectToOrganizationProfile, e as RedirectToSignIn, f as RedirectToSignUp, g as RedirectToTasks, h as RedirectToUserProfile, S as SignedIn, i as SignedOut, k as useAuth } from './useAuth-
|
|
6
|
+
import { W as WithClerkProp, O as OrganizationProfilePageProps, a as OrganizationProfileLinkProps, U as UserProfilePageProps, b as UserProfileLinkProps, c as UserButtonActionProps, d as UserButtonLinkProps, S as SignInWithMetamaskButtonProps, C as ClerkProviderProps } from './types-C7pBea4d.mjs';
|
|
7
|
+
export { A as AuthenticateWithRedirectCallback, C as ClerkDegraded, a as ClerkFailed, b as ClerkLoaded, c as ClerkLoading, P as Protect, j as ProtectProps, R as RedirectToCreateOrganization, d as RedirectToOrganizationProfile, e as RedirectToSignIn, f as RedirectToSignUp, g as RedirectToTasks, h as RedirectToUserProfile, S as SignedIn, i as SignedOut, k as useAuth } from './useAuth-Deiz0BGe.mjs';
|
|
8
8
|
export { __experimental_CheckoutProvider, __experimental_PaymentElement, __experimental_PaymentElementProvider, __experimental_useCheckout, __experimental_usePaymentElement, useClerk, useOrganization, useOrganizationList, useReverification, useSession, useSessionList, useUser } from '@clerk/shared/react';
|
|
9
9
|
import '@clerk/shared/ui';
|
|
10
10
|
|
|
@@ -162,6 +162,10 @@ declare const TaskChooseOrganization: {
|
|
|
162
162
|
(props: Without<WithClerkProp<TaskChooseOrganizationProps & FallbackProp>, "clerk">): React.JSX.Element | null;
|
|
163
163
|
displayName: string;
|
|
164
164
|
};
|
|
165
|
+
declare const TaskResetPassword: {
|
|
166
|
+
(props: Without<WithClerkProp<TaskResetPasswordProps & FallbackProp>, "clerk">): React.JSX.Element | null;
|
|
167
|
+
displayName: string;
|
|
168
|
+
};
|
|
165
169
|
|
|
166
170
|
declare const SignInButton: {
|
|
167
171
|
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<SignInButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
@@ -229,4 +233,4 @@ declare function useSignIn(): SignInSignalValue;
|
|
|
229
233
|
*/
|
|
230
234
|
declare function useSignUp(): SignUpSignalValue;
|
|
231
235
|
|
|
232
|
-
export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
|
|
236
|
+
export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, TaskResetPassword, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
|
package/dist/index.d.ts
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { Theme, Ui } from '@clerk/ui/internal';
|
|
2
2
|
import * as _clerk_shared_types from '@clerk/shared/types';
|
|
3
|
-
import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, SignInSignalValue, SignUpSignalValue } from '@clerk/shared/types';
|
|
3
|
+
import { Without, APIKeysProps, CreateOrganizationProps, OrganizationListProps, OrganizationProfileProps, OrganizationSwitcherProps, SignInProps, SignUpProps, TaskChooseOrganizationProps, TaskResetPasswordProps, UserAvatarProps, UserButtonProps, UserProfileProps, WaitlistProps, SignInButtonProps, SignOutOptions, SignUpButtonProps, SignInResource, CreateEmailLinkFlowReturn, SignInStartEmailLinkFlowParams, SignUpResource, StartEmailLinkFlowParams, EmailAddressResource, SignInSignalValue, SignUpSignalValue } from '@clerk/shared/types';
|
|
4
4
|
export { BrowserClerk, BrowserClerkConstructor, ClerkProp, HeadlessBrowserClerk, HeadlessBrowserClerkConstructor, IsomorphicClerkOptions } from '@clerk/shared/types';
|
|
5
5
|
import React, { ReactNode, PropsWithChildren } from 'react';
|
|
6
|
-
import { W as WithClerkProp, O as OrganizationProfilePageProps, a as OrganizationProfileLinkProps, U as UserProfilePageProps, b as UserProfileLinkProps, c as UserButtonActionProps, d as UserButtonLinkProps, S as SignInWithMetamaskButtonProps, C as ClerkProviderProps } from './types-
|
|
7
|
-
export { A as AuthenticateWithRedirectCallback, C as ClerkDegraded, a as ClerkFailed, b as ClerkLoaded, c as ClerkLoading, P as Protect, j as ProtectProps, R as RedirectToCreateOrganization, d as RedirectToOrganizationProfile, e as RedirectToSignIn, f as RedirectToSignUp, g as RedirectToTasks, h as RedirectToUserProfile, S as SignedIn, i as SignedOut, k as useAuth } from './useAuth-
|
|
6
|
+
import { W as WithClerkProp, O as OrganizationProfilePageProps, a as OrganizationProfileLinkProps, U as UserProfilePageProps, b as UserProfileLinkProps, c as UserButtonActionProps, d as UserButtonLinkProps, S as SignInWithMetamaskButtonProps, C as ClerkProviderProps } from './types-C7pBea4d.js';
|
|
7
|
+
export { A as AuthenticateWithRedirectCallback, C as ClerkDegraded, a as ClerkFailed, b as ClerkLoaded, c as ClerkLoading, P as Protect, j as ProtectProps, R as RedirectToCreateOrganization, d as RedirectToOrganizationProfile, e as RedirectToSignIn, f as RedirectToSignUp, g as RedirectToTasks, h as RedirectToUserProfile, S as SignedIn, i as SignedOut, k as useAuth } from './useAuth-QSe8Smhk.js';
|
|
8
8
|
export { __experimental_CheckoutProvider, __experimental_PaymentElement, __experimental_PaymentElementProvider, __experimental_useCheckout, __experimental_usePaymentElement, useClerk, useOrganization, useOrganizationList, useReverification, useSession, useSessionList, useUser } from '@clerk/shared/react';
|
|
9
9
|
import '@clerk/shared/ui';
|
|
10
10
|
|
|
@@ -162,6 +162,10 @@ declare const TaskChooseOrganization: {
|
|
|
162
162
|
(props: Without<WithClerkProp<TaskChooseOrganizationProps & FallbackProp>, "clerk">): React.JSX.Element | null;
|
|
163
163
|
displayName: string;
|
|
164
164
|
};
|
|
165
|
+
declare const TaskResetPassword: {
|
|
166
|
+
(props: Without<WithClerkProp<TaskResetPasswordProps & FallbackProp>, "clerk">): React.JSX.Element | null;
|
|
167
|
+
displayName: string;
|
|
168
|
+
};
|
|
165
169
|
|
|
166
170
|
declare const SignInButton: {
|
|
167
171
|
(props: _clerk_shared_types.Without<WithClerkProp<React.PropsWithChildren<SignInButtonProps>>, "clerk">): React.JSX.Element | null;
|
|
@@ -229,4 +233,4 @@ declare function useSignIn(): SignInSignalValue;
|
|
|
229
233
|
*/
|
|
230
234
|
declare function useSignUp(): SignUpSignalValue;
|
|
231
235
|
|
|
232
|
-
export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
|
|
236
|
+
export { APIKeys, ClerkProvider, ClerkProviderProps, CreateOrganization, GoogleOneTap, OrganizationList, OrganizationProfile, OrganizationSwitcher, PricingTable, SignIn, SignInButton, SignInWithMetamaskButton, SignOutButton, SignUp, SignUpButton, TaskChooseOrganization, TaskResetPassword, UserAvatar, UserButton, UserProfile, Waitlist, useEmailLink, useSignIn, useSignUp };
|
package/dist/index.js
CHANGED
|
@@ -67,6 +67,7 @@ __export(src_exports, {
|
|
|
67
67
|
SignedIn: () => SignedIn,
|
|
68
68
|
SignedOut: () => SignedOut,
|
|
69
69
|
TaskChooseOrganization: () => TaskChooseOrganization,
|
|
70
|
+
TaskResetPassword: () => TaskResetPassword,
|
|
70
71
|
UserAvatar: () => UserAvatar,
|
|
71
72
|
UserButton: () => UserButton,
|
|
72
73
|
UserProfile: () => UserProfile,
|
|
@@ -215,7 +216,7 @@ var isThatComponent = (v, component) => {
|
|
|
215
216
|
|
|
216
217
|
// src/utils/useCustomPages.tsx
|
|
217
218
|
var useUserProfileCustomPages = (children, options) => {
|
|
218
|
-
const reorderItemsLabels = ["account", "security"];
|
|
219
|
+
const reorderItemsLabels = ["account", "security", "billing", "apiKeys"];
|
|
219
220
|
return useCustomPages(
|
|
220
221
|
{
|
|
221
222
|
children,
|
|
@@ -229,7 +230,7 @@ var useUserProfileCustomPages = (children, options) => {
|
|
|
229
230
|
);
|
|
230
231
|
};
|
|
231
232
|
var useOrganizationProfileCustomPages = (children, options) => {
|
|
232
|
-
const reorderItemsLabels = ["general", "members"];
|
|
233
|
+
const reorderItemsLabels = ["general", "members", "billing", "apiKeys"];
|
|
233
234
|
return useCustomPages(
|
|
234
235
|
{
|
|
235
236
|
children,
|
|
@@ -1132,6 +1133,27 @@ var TaskChooseOrganization = withClerk(
|
|
|
1132
1133
|
},
|
|
1133
1134
|
{ component: "TaskChooseOrganization", renderWhileLoading: true }
|
|
1134
1135
|
);
|
|
1136
|
+
var TaskResetPassword = withClerk(
|
|
1137
|
+
({ clerk, component, fallback, ...props }) => {
|
|
1138
|
+
const mountingStatus = useWaitForComponentMount(component);
|
|
1139
|
+
const shouldShowFallback = mountingStatus === "rendering" || !clerk.loaded;
|
|
1140
|
+
const rendererRootProps = {
|
|
1141
|
+
...shouldShowFallback && fallback && { style: { display: "none" } }
|
|
1142
|
+
};
|
|
1143
|
+
return /* @__PURE__ */ import_react13.default.createElement(import_react13.default.Fragment, null, shouldShowFallback && fallback, clerk.loaded && /* @__PURE__ */ import_react13.default.createElement(
|
|
1144
|
+
ClerkHostRenderer,
|
|
1145
|
+
{
|
|
1146
|
+
component,
|
|
1147
|
+
mount: clerk.mountTaskResetPassword,
|
|
1148
|
+
unmount: clerk.unmountTaskResetPassword,
|
|
1149
|
+
updateProps: clerk.__internal_updateProps,
|
|
1150
|
+
props,
|
|
1151
|
+
rootProps: rendererRootProps
|
|
1152
|
+
}
|
|
1153
|
+
));
|
|
1154
|
+
},
|
|
1155
|
+
{ component: "TaskResetPassword", renderWhileLoading: true }
|
|
1156
|
+
);
|
|
1135
1157
|
|
|
1136
1158
|
// src/components/controlComponents.tsx
|
|
1137
1159
|
var import_deprecated = require("@clerk/shared/deprecated");
|
|
@@ -1946,7 +1968,7 @@ if (typeof globalThis.__BUILD_DISABLE_RHC__ === "undefined") {
|
|
|
1946
1968
|
}
|
|
1947
1969
|
var SDK_METADATA = {
|
|
1948
1970
|
name: "@clerk/react",
|
|
1949
|
-
version: "6.0.0-snapshot.
|
|
1971
|
+
version: "6.0.0-snapshot.v20251208202852",
|
|
1950
1972
|
environment: process.env.NODE_ENV
|
|
1951
1973
|
};
|
|
1952
1974
|
var _status, _domain, _proxyUrl, _publishableKey, _eventBus, _stateProxy, _instance, _IsomorphicClerk_instances, waitForClerkJS_fn;
|
|
@@ -1981,6 +2003,7 @@ var _IsomorphicClerk = class _IsomorphicClerk {
|
|
|
1981
2003
|
this.premountAPIKeysNodes = /* @__PURE__ */ new Map();
|
|
1982
2004
|
this.premountOAuthConsentNodes = /* @__PURE__ */ new Map();
|
|
1983
2005
|
this.premountTaskChooseOrganizationNodes = /* @__PURE__ */ new Map();
|
|
2006
|
+
this.premountTaskResetPasswordNodes = /* @__PURE__ */ new Map();
|
|
1984
2007
|
// A separate Map of `addListener` method calls to handle multiple listeners.
|
|
1985
2008
|
this.premountAddListenerCalls = /* @__PURE__ */ new Map();
|
|
1986
2009
|
this.loadedListeners = [];
|
|
@@ -2266,6 +2289,9 @@ var _IsomorphicClerk = class _IsomorphicClerk {
|
|
|
2266
2289
|
this.premountTaskChooseOrganizationNodes.forEach((props, node) => {
|
|
2267
2290
|
clerkjs.mountTaskChooseOrganization(node, props);
|
|
2268
2291
|
});
|
|
2292
|
+
this.premountTaskResetPasswordNodes.forEach((props, node) => {
|
|
2293
|
+
clerkjs.mountTaskResetPassword(node, props);
|
|
2294
|
+
});
|
|
2269
2295
|
if (typeof this.clerkjs.status === "undefined") {
|
|
2270
2296
|
__privateGet(this, _eventBus).emit(import_clerkEventBus.clerkEvents.Status, "ready");
|
|
2271
2297
|
}
|
|
@@ -2667,6 +2693,20 @@ var _IsomorphicClerk = class _IsomorphicClerk {
|
|
|
2667
2693
|
this.premountTaskChooseOrganizationNodes.delete(node);
|
|
2668
2694
|
}
|
|
2669
2695
|
};
|
|
2696
|
+
this.mountTaskResetPassword = (node, props) => {
|
|
2697
|
+
if (this.clerkjs && this.loaded) {
|
|
2698
|
+
this.clerkjs.mountTaskResetPassword(node, props);
|
|
2699
|
+
} else {
|
|
2700
|
+
this.premountTaskResetPasswordNodes.set(node, props);
|
|
2701
|
+
}
|
|
2702
|
+
};
|
|
2703
|
+
this.unmountTaskResetPassword = (node) => {
|
|
2704
|
+
if (this.clerkjs && this.loaded) {
|
|
2705
|
+
this.clerkjs.unmountTaskResetPassword(node);
|
|
2706
|
+
} else {
|
|
2707
|
+
this.premountTaskResetPasswordNodes.delete(node);
|
|
2708
|
+
}
|
|
2709
|
+
};
|
|
2670
2710
|
this.addListener = (listener) => {
|
|
2671
2711
|
if (this.clerkjs) {
|
|
2672
2712
|
return this.clerkjs.addListener(listener);
|
|
@@ -3373,6 +3413,7 @@ setErrorThrowerOptions({ packageName: "@clerk/react" });
|
|
|
3373
3413
|
SignedIn,
|
|
3374
3414
|
SignedOut,
|
|
3375
3415
|
TaskChooseOrganization,
|
|
3416
|
+
TaskResetPassword,
|
|
3376
3417
|
UserAvatar,
|
|
3377
3418
|
UserButton,
|
|
3378
3419
|
UserProfile,
|